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: 27231 34493 78.9 %
Date: 2025-05-31 00:00:17 Functions: 976 1062 91.9 %

          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       66875 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
     449       66875 :   if (ty) {
     450       66875 :     swig_cast_info *iter = ty->cast;
     451       70569 :     while (iter) {
     452       70568 :       if (strcmp(iter->type->name, c) == 0) {
     453       66874 :         if (iter == ty->cast)
     454             :           return iter;
     455             :         /* Move iter to the top of the linked list */
     456        2811 :         iter->prev->next = iter->next;
     457        2811 :         if (iter->next)
     458        2697 :           iter->next->prev = iter->prev;
     459        2811 :         iter->next = ty->cast;
     460        2811 :         iter->prev = 0;
     461        2811 :         if (ty->cast) ty->cast->prev = iter;
     462        2811 :         ty->cast = iter;
     463        2811 :         return iter;
     464             :       }
     465        3694 :       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       66874 : SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
     503       66874 :   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       11868 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
     571       11868 :   SWIG_TypeClientData(ti, clientdata);
     572       11868 :   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         312 : SWIG_Python_str_FromChar(const char *c)
     839             : {
     840             : #if PY_VERSION_HEX >= 0x03000000
     841         312 :   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        2311 : SWIG_Python_ErrorType(int code) {
     868        2311 :   PyObject* type = 0;
     869          25 :   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        2119 :   case SWIG_RuntimeError:
     877        2119 :     type = PyExc_RuntimeError;
     878           0 :     break;
     879           0 :   case SWIG_IndexError:
     880           0 :     type = PyExc_IndexError;
     881           0 :     break;
     882          25 :   case SWIG_TypeError:
     883          25 :     type = PyExc_TypeError;
     884          25 :     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         167 :   case SWIG_ValueError:
     895         167 :     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        2119 :   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      839538 :          SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
     987       31035 :          ~SWIG_Python_Thread_Block() { end(); }
     988             :        };
     989             :        class SWIG_Python_Thread_Allow {
     990             :          bool status;
     991             :          PyThreadState *save;
     992             :        public:
     993     7494990 :          void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
     994     7494990 :          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        2314 : SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
    1143        2314 :   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    1144        2314 :   PyErr_SetString(errtype, msg);
    1145        2314 :   SWIG_PYTHON_THREAD_END_BLOCK;
    1146        2314 : }
    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        5520 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
    1173        5520 :   PyDict_SetItemString(d, name, obj);
    1174        5520 :   Py_DECREF(obj);                            
    1175        5520 : }
    1176             : 
    1177             : #endif
    1178             : 
    1179             : /* Append a value to the result obj */
    1180             : 
    1181             : SWIGINTERN PyObject*
    1182      429292 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
    1183      429292 :   if (!result) {
    1184             :     result = obj;
    1185      428982 :   } else if (result == Py_None) {
    1186      416796 :     Py_DECREF(result);
    1187             :     result = obj;
    1188             :   } else {
    1189       12186 :     if (!PyList_Check(result)) {
    1190       11438 :       PyObject *o2 = result;
    1191       11438 :       result = PyList_New(1);
    1192       11438 :       PyList_SetItem(result, 0, o2);
    1193             :     }
    1194       12186 :     PyList_Append(result,obj);
    1195       12186 :     Py_DECREF(obj);
    1196             :   }
    1197      429292 :   return result;
    1198             : }
    1199             : 
    1200             : /* Unpack the argument tuple */
    1201             : 
    1202             : SWIGINTERN Py_ssize_t
    1203     1249880 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
    1204             : {
    1205     1249880 :   if (!args) {
    1206      101920 :     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     1147960 :   if (!PyTuple_Check(args)) {
    1215       11868 :     if (min <= 1 && max >= 1) {
    1216       11868 :       Py_ssize_t i;
    1217       11868 :       objs[0] = args;
    1218       11868 :       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     1136090 :     Py_ssize_t l = PyTuple_GET_SIZE(args);
    1227     1136090 :     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     1136090 :     } 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     4155480 :       for (i = 0; i < l; ++i) {
    1238     3019390 :   objs[i] = PyTuple_GET_ITEM(args, i);
    1239             :       }
    1240     1428400 :       for (; l < max; ++l) {
    1241      292316 :   objs[l] = 0;
    1242             :       }
    1243     1136090 :       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      682873 : SWIG_Py_Void(void)
    1282             : {
    1283      682873 :   PyObject *none = Py_None;
    1284           0 :   Py_INCREF(none);
    1285       96413 :   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       11868 : SwigPyClientData_New(PyObject* obj)
    1320             : {
    1321       11868 :   if (!obj) {
    1322             :     return 0;
    1323             :   } else {
    1324       11868 :     SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    1325             :     /* the klass element */
    1326       11868 :     data->klass = obj;
    1327       11868 :     Py_INCREF(data->klass);
    1328             :     /* the newraw method and newargs arguments used to create a new raw instance */
    1329       11868 :     if (PyClass_Check(obj)) {
    1330       11868 :       data->newraw = 0;
    1331       11868 :       data->newargs = obj;
    1332       11868 :       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       11868 :     data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
    1346       11868 :     if (PyErr_Occurred()) {
    1347        1380 :       PyErr_Clear();
    1348        1380 :       data->destroy = 0;
    1349             :     }
    1350       11868 :     if (data->destroy) {
    1351       10488 :       int flags;
    1352       10488 :       Py_INCREF(data->destroy);
    1353       10488 :       flags = PyCFunction_GET_FLAGS(data->destroy);
    1354       10488 :       data->delargs = !(flags & (METH_O));
    1355             :     } else {
    1356        1380 :       data->delargs = 0;
    1357             :     }
    1358       11868 :     data->implicitconv = 0;
    1359       11868 :     data->pytype = 0;
    1360       11868 :     return data;
    1361             :   }
    1362             : }
    1363             : 
    1364             : SWIGRUNTIME void 
    1365       13800 : SwigPyClientData_Del(SwigPyClientData *data) {
    1366       13800 :   Py_XDECREF(data->newraw);
    1367       13800 :   Py_XDECREF(data->newargs);
    1368       13800 :   Py_XDECREF(data->destroy);
    1369       13800 : }
    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     7885400 : SwigPyObject_type(void) {
    1506     7885400 :   static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
    1507     7885400 :   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      494656 : SwigPyObject_dealloc(PyObject *v)
    1529             : {
    1530      494656 :   SwigPyObject *sobj = (SwigPyObject *) v;
    1531      494656 :   PyObject *next = sobj->next;
    1532      494656 :   if (sobj->own == SWIG_POINTER_OWN) {
    1533       89948 :     swig_type_info *ty = sobj->ty;
    1534       89948 :     SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    1535       89948 :     PyObject *destroy = data ? data->destroy : 0;
    1536       89948 :     if (destroy) {
    1537             :       /* destroy is always a VARARGS method */
    1538       89948 :       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       89948 :       PyObject *type = NULL, *value = NULL, *traceback = NULL;
    1548       89948 :       PyErr_Fetch(&type, &value, &traceback);
    1549             : 
    1550       89948 :       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       89948 :         PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
    1557       89948 :         PyObject *mself = PyCFunction_GET_SELF(destroy);
    1558       89948 :         res = ((*meth)(mself, v));
    1559             :       }
    1560       89948 :       if (!res)
    1561           0 :         PyErr_WriteUnraisable(destroy);
    1562             : 
    1563       89948 :       PyErr_Restore(type, value, traceback);
    1564             : 
    1565      179896 :       Py_XDECREF(res);
    1566             :     } 
    1567             : #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
    1568             :     else {
    1569             :       const char *name = SWIG_TypePrettyName(ty);
    1570             :       printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
    1571             :     }
    1572             : #endif
    1573             :   } 
    1574      494656 :   Py_XDECREF(next);
    1575      494656 :   PyObject_DEL(v);
    1576      494656 : }
    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        5944 : SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    1605             : {
    1606        5944 :   SwigPyObject *sobj = (SwigPyObject *)v;
    1607        5944 :   sobj->own = 0;
    1608        5944 :   return SWIG_Py_Void();
    1609             : }
    1610             : 
    1611             : SWIGINTERN PyObject*
    1612         213 : SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    1613             : {
    1614         213 :   SwigPyObject *sobj = (SwigPyObject *)v;
    1615         213 :   sobj->own = SWIG_POINTER_OWN;
    1616         213 :   return SWIG_Py_Void();
    1617             : }
    1618             : 
    1619             : SWIGINTERN PyObject*
    1620        6157 : SwigPyObject_own(PyObject *v, PyObject *args)
    1621             : {
    1622        6157 :   PyObject *val = 0;
    1623        6157 :   if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
    1624             :     return NULL;
    1625             :   } else {
    1626        6157 :     SwigPyObject *sobj = (SwigPyObject *)v;
    1627        6157 :     PyObject *obj = PyBool_FromLong(sobj->own);
    1628        6157 :     if (val) {
    1629        6157 :       if (PyObject_IsTrue(val)) {
    1630         213 :         SwigPyObject_acquire(v,args);
    1631             :       } else {
    1632        5944 :         SwigPyObject_disown(v,args);
    1633             :       }
    1634             :     } 
    1635        6157 :     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         276 : SwigPyObject_TypeOnce(void) {
    1652         276 :   static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
    1653             : 
    1654         276 :   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         276 :   static PyTypeObject swigpyobject_type;
    1699         276 :   static int type_init = 0;
    1700         276 :   if (!type_init) {
    1701         276 :     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         276 :     swigpyobject_type = tmp;
    1770         276 :     type_init = 1;
    1771         276 :     if (PyType_Ready(&swigpyobject_type) < 0)
    1772           0 :       return NULL;
    1773             :   }
    1774             :   return &swigpyobject_type;
    1775             : }
    1776             : 
    1777             : SWIGRUNTIME PyObject *
    1778      494729 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
    1779             : {
    1780      494729 :   SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
    1781      494729 :   if (sobj) {
    1782      494729 :     sobj->ptr  = ptr;
    1783      494729 :     sobj->ty   = ty;
    1784      494729 :     sobj->own  = own;
    1785      494729 :     sobj->next = 0;
    1786             :   }
    1787      494729 :   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         276 : SwigPyPacked_type(void) {
    1836         276 :   static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
    1837         276 :   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         276 : SwigPyPacked_TypeOnce(void) {
    1858         276 :   static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
    1859         276 :   static PyTypeObject swigpypacked_type;
    1860         276 :   static int type_init = 0;
    1861         276 :   if (!type_init) {
    1862         276 :     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         276 :     swigpypacked_type = tmp;
    1931         276 :     type_init = 1;
    1932         276 :     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     3408240 : SWIG_This(void)
    1978             : {
    1979     3408240 :   if (Swig_This_global == NULL)
    1980         276 :     Swig_This_global = SWIG_Python_str_FromChar("this");
    1981     3408240 :   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     3497080 : SWIG_Python_GetSwigThis(PyObject *pyobj) 
    1993             : {
    1994     3497100 :   PyObject *obj;
    1995             : 
    1996     3497100 :   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     3403460 :   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     3403460 :   obj = PyObject_GetAttr(pyobj,SWIG_This());
    2039     3403460 :   if (obj) {
    2040     3398570 :     Py_DECREF(obj);
    2041             :   } else {
    2042        4885 :     if (PyErr_Occurred()) PyErr_Clear();
    2043        4885 :     return 0;
    2044             :   }
    2045             : #endif
    2046     3398570 :   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     3512610 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
    2074     3512610 :   int res;
    2075     3512610 :   SwigPyObject *sobj;
    2076     3512610 :   int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
    2077             : 
    2078     3512610 :   if (!obj)
    2079             :     return SWIG_ERROR;
    2080     3512610 :   if (obj == Py_None && !implicit_conv) {
    2081       19762 :     if (ptr)
    2082       19762 :       *ptr = 0;
    2083       39524 :     return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
    2084             :   }
    2085             : 
    2086     3492840 :   res = SWIG_ERROR;
    2087             : 
    2088     3492840 :   sobj = SWIG_Python_GetSwigThis(obj);
    2089     3492840 :   if (own)
    2090           0 :     *own = 0;
    2091     3492840 :   while (sobj) {
    2092     3492200 :     void *vptr = sobj->ptr;
    2093     3492200 :     if (ty) {
    2094     3492200 :       swig_type_info *to = sobj->ty;
    2095     3492200 :       if (to == ty) {
    2096             :         /* no type cast needed */
    2097     3425320 :         if (ptr) *ptr = vptr;
    2098             :         break;
    2099             :       } else {
    2100       66875 :         swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
    2101       66875 :         if (!tc) {
    2102           1 :           sobj = (SwigPyObject *)sobj->next;
    2103             :         } else {
    2104       66874 :           if (ptr) {
    2105       66874 :             int newmemory = 0;
    2106       66874 :             *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
    2107       66874 :             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     3492840 :   if (sobj) {
    2122     3492190 :     if (own)
    2123           0 :       *own = *own | sobj->own;
    2124     3492190 :     if (flags & SWIG_POINTER_DISOWN) {
    2125       96269 :       sobj->own = 0;
    2126             :     }
    2127             :     res = SWIG_OK;
    2128             :   } else {
    2129         650 :     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        4236 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
    2281             : {
    2282        4236 :  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        4236 :  dict = PyObject_GetAttrString(inst, "__dict__");
    2296        4236 :  PyDict_SetItem(dict, SWIG_This(), swig_this);
    2297        4236 :  Py_DECREF(dict);
    2298        4236 : } 
    2299             : 
    2300             : 
    2301             : SWIGINTERN PyObject *
    2302        4236 : SWIG_Python_InitShadowInstance(PyObject *args) {
    2303        4236 :   PyObject *obj[2];
    2304        4236 :   if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
    2305             :     return NULL;
    2306             :   } else {
    2307        4236 :     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
    2308        4236 :     if (sthis) {
    2309           0 :       SwigPyObject_append((PyObject*) sthis, obj[1]);
    2310             :     } else {
    2311        4236 :       SWIG_Python_SetSwigThis(obj[0], obj[1]);
    2312             :     }
    2313        4236 :     return SWIG_Py_Void();
    2314             :   }
    2315             : }
    2316             : 
    2317             : /* Create a new pointer object */
    2318             : 
    2319             : SWIGRUNTIME PyObject *
    2320      512591 : SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
    2321      512591 :   SwigPyClientData *clientdata;
    2322      512591 :   PyObject * robj;
    2323      512591 :   int own;
    2324             : 
    2325      512591 :   if (!ptr)
    2326       17862 :     return SWIG_Py_Void();
    2327             : 
    2328      494729 :   clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
    2329      494729 :   own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
    2330      494729 :   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      494729 :   assert(!(flags & SWIG_BUILTIN_TP_INIT));
    2361             : 
    2362      494729 :   robj = SwigPyObject_New(ptr, type, own);
    2363      494729 :   if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    2364      490187 :     PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    2365      490187 :     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         276 : SWIG_Python_DestroyModule(PyObject *obj)
    2406             : {
    2407         276 :   swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
    2408         276 :   swig_type_info **types = swig_module->types;
    2409         276 :   size_t i;
    2410       24564 :   for (i =0; i < swig_module->size; ++i) {
    2411       24288 :     swig_type_info *ty = types[i];
    2412       24288 :     if (ty->owndata) {
    2413       13800 :       SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
    2414       13800 :       if (data) SwigPyClientData_Del(data);
    2415             :     }
    2416             :   }
    2417         276 :   Py_DECREF(SWIG_This());
    2418         276 :   Swig_This_global = NULL;
    2419         276 : }
    2420             : 
    2421             : SWIGRUNTIME void
    2422         276 : SWIG_Python_SetModule(swig_module_info *swig_module) {
    2423             : #if PY_VERSION_HEX >= 0x03000000
    2424             :  /* Add a dummy module object into sys.modules */
    2425         276 :   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         276 :   PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
    2431         276 :   if (pointer && module) {
    2432         276 :     PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
    2433             :   } else {
    2434           0 :     Py_XDECREF(pointer);
    2435             :   }
    2436         276 : }
    2437             : 
    2438             : /* The python cached type query */
    2439             : SWIGRUNTIME PyObject *
    2440         312 : SWIG_Python_TypeCache(void) {
    2441         312 :   static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
    2442         312 :   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_GDALAlgorithmArgHS swig_types[5]
    2671             : #define SWIGTYPE_p_GDALAlgorithmHS swig_types[6]
    2672             : #define SWIGTYPE_p_GDALAlgorithmRegistryHS swig_types[7]
    2673             : #define SWIGTYPE_p_GDALArgDatasetValueHS swig_types[8]
    2674             : #define SWIGTYPE_p_GDALAsyncReaderShadow swig_types[9]
    2675             : #define SWIGTYPE_p_GDALAttributeHS swig_types[10]
    2676             : #define SWIGTYPE_p_GDALBuildVRTOptions swig_types[11]
    2677             : #define SWIGTYPE_p_GDALColorEntry swig_types[12]
    2678             : #define SWIGTYPE_p_GDALColorTableShadow swig_types[13]
    2679             : #define SWIGTYPE_p_GDALContourOptions swig_types[14]
    2680             : #define SWIGTYPE_p_GDALDEMProcessingOptions swig_types[15]
    2681             : #define SWIGTYPE_p_GDALDatasetShadow swig_types[16]
    2682             : #define SWIGTYPE_p_GDALDimensionHS swig_types[17]
    2683             : #define SWIGTYPE_p_GDALDriverShadow swig_types[18]
    2684             : #define SWIGTYPE_p_GDALEDTComponentHS swig_types[19]
    2685             : #define SWIGTYPE_p_GDALExtendedDataTypeClass swig_types[20]
    2686             : #define SWIGTYPE_p_GDALExtendedDataTypeHS swig_types[21]
    2687             : #define SWIGTYPE_p_GDALExtendedDataTypeSubType swig_types[22]
    2688             : #define SWIGTYPE_p_GDALFootprintOptions swig_types[23]
    2689             : #define SWIGTYPE_p_GDALGridOptions swig_types[24]
    2690             : #define SWIGTYPE_p_GDALGroupHS swig_types[25]
    2691             : #define SWIGTYPE_p_GDALInfoOptions swig_types[26]
    2692             : #define SWIGTYPE_p_GDALMDArrayHS swig_types[27]
    2693             : #define SWIGTYPE_p_GDALMajorObjectShadow swig_types[28]
    2694             : #define SWIGTYPE_p_GDALMultiDimInfoOptions swig_types[29]
    2695             : #define SWIGTYPE_p_GDALMultiDimTranslateOptions swig_types[30]
    2696             : #define SWIGTYPE_p_GDALNearblackOptions swig_types[31]
    2697             : #define SWIGTYPE_p_GDALProgressFunc swig_types[32]
    2698             : #define SWIGTYPE_p_GDALRasterAttributeTableShadow swig_types[33]
    2699             : #define SWIGTYPE_p_GDALRasterBandShadow swig_types[34]
    2700             : #define SWIGTYPE_p_GDALRasterizeOptions swig_types[35]
    2701             : #define SWIGTYPE_p_GDALRelationshipShadow swig_types[36]
    2702             : #define SWIGTYPE_p_GDALSubdatasetInfo swig_types[37]
    2703             : #define SWIGTYPE_p_GDALTileIndexOptions swig_types[38]
    2704             : #define SWIGTYPE_p_GDALTransformerInfoShadow swig_types[39]
    2705             : #define SWIGTYPE_p_GDALTranslateOptions swig_types[40]
    2706             : #define SWIGTYPE_p_GDALVectorInfoOptions swig_types[41]
    2707             : #define SWIGTYPE_p_GDALVectorTranslateOptions swig_types[42]
    2708             : #define SWIGTYPE_p_GDALViewshedMode swig_types[43]
    2709             : #define SWIGTYPE_p_GDALViewshedOutputType swig_types[44]
    2710             : #define SWIGTYPE_p_GDALWarpAppOptions swig_types[45]
    2711             : #define SWIGTYPE_p_GDAL_GCP swig_types[46]
    2712             : #define SWIGTYPE_p_GIntBig swig_types[47]
    2713             : #define SWIGTYPE_p_GUIntBig swig_types[48]
    2714             : #define SWIGTYPE_p_OGRFeatureShadow swig_types[49]
    2715             : #define SWIGTYPE_p_OGRFieldDomainShadow swig_types[50]
    2716             : #define SWIGTYPE_p_OGRGeomFieldDefnShadow swig_types[51]
    2717             : #define SWIGTYPE_p_OGRGeometryShadow swig_types[52]
    2718             : #define SWIGTYPE_p_OGRLayerShadow swig_types[53]
    2719             : #define SWIGTYPE_p_OGRStyleTableShadow swig_types[54]
    2720             : #define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[55]
    2721             : #define SWIGTYPE_p_StatBuf swig_types[56]
    2722             : #define SWIGTYPE_p_Statistics swig_types[57]
    2723             : #define SWIGTYPE_p_SuggestedWarpOutputRes swig_types[58]
    2724             : #define SWIGTYPE_p_VSIDIR swig_types[59]
    2725             : #define SWIGTYPE_p_VSILFILE swig_types[60]
    2726             : #define SWIGTYPE_p_bool swig_types[61]
    2727             : #define SWIGTYPE_p_char swig_types[62]
    2728             : #define SWIGTYPE_p_double swig_types[63]
    2729             : #define SWIGTYPE_p_f_double_p_q_const__char_p_void__int swig_types[64]
    2730             : #define SWIGTYPE_p_int swig_types[65]
    2731             : #define SWIGTYPE_p_long_long swig_types[66]
    2732             : #define SWIGTYPE_p_p_GByte swig_types[67]
    2733             : #define SWIGTYPE_p_p_GDALDatasetShadow swig_types[68]
    2734             : #define SWIGTYPE_p_p_GDALDimensionHS swig_types[69]
    2735             : #define SWIGTYPE_p_p_GDALEDTComponentHS swig_types[70]
    2736             : #define SWIGTYPE_p_p_GDALMDArrayHS swig_types[71]
    2737             : #define SWIGTYPE_p_p_GDALRasterBandShadow swig_types[72]
    2738             : #define SWIGTYPE_p_p_GDAL_GCP swig_types[73]
    2739             : #define SWIGTYPE_p_p_GUIntBig swig_types[74]
    2740             : #define SWIGTYPE_p_p_OGRLayerShadow swig_types[75]
    2741             : #define SWIGTYPE_p_p_OSRSpatialReferenceShadow swig_types[76]
    2742             : #define SWIGTYPE_p_p_char swig_types[77]
    2743             : #define SWIGTYPE_p_p_double swig_types[78]
    2744             : #define SWIGTYPE_p_p_int swig_types[79]
    2745             : #define SWIGTYPE_p_p_long_long swig_types[80]
    2746             : #define SWIGTYPE_p_p_p_GDALAttributeHS swig_types[81]
    2747             : #define SWIGTYPE_p_p_p_GDALDimensionHS swig_types[82]
    2748             : #define SWIGTYPE_p_p_p_GDALEDTComponentHS swig_types[83]
    2749             : #define SWIGTYPE_p_p_p_GDALMDArrayHS swig_types[84]
    2750             : #define SWIGTYPE_p_p_void swig_types[85]
    2751             : #define SWIGTYPE_p_size_t swig_types[86]
    2752             : #define SWIGTYPE_p_vsi_l_offset swig_types[87]
    2753             : static swig_type_info *swig_types[89];
    2754             : static swig_module_info swig_module = {swig_types, 88, 0, 0, 0, 0};
    2755             : #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
    2756             : #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
    2757             : 
    2758             : /* -------- TYPES TABLE (END) -------- */
    2759             : 
    2760             : #ifdef SWIG_TypeQuery
    2761             : # undef SWIG_TypeQuery
    2762             : #endif
    2763             : #define SWIG_TypeQuery SWIG_Python_TypeQuery
    2764             : 
    2765             : /*-----------------------------------------------
    2766             :               @(target):= _gdal.so
    2767             :   ------------------------------------------------*/
    2768             : #if PY_VERSION_HEX >= 0x03000000
    2769             : #  define SWIG_init    PyInit__gdal
    2770             : 
    2771             : #else
    2772             : #  define SWIG_init    init_gdal
    2773             : 
    2774             : #endif
    2775             : #define SWIG_name    "_gdal"
    2776             : 
    2777             : #define SWIGVERSION 0x040001 
    2778             : #define SWIG_VERSION SWIGVERSION
    2779             : 
    2780             : 
    2781             : #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
    2782             : #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 
    2783             : 
    2784             : 
    2785             : #include <stdexcept>
    2786             : 
    2787             : 
    2788             : namespace swig {
    2789             :   class SwigPtr_PyObject {
    2790             :   protected:
    2791             :     PyObject *_obj;
    2792             : 
    2793             :   public:
    2794             :     SwigPtr_PyObject() :_obj(0)
    2795             :     {
    2796             :     }
    2797             : 
    2798             :     SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
    2799             :     {
    2800             :       SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2801             :       Py_XINCREF(_obj);      
    2802             :       SWIG_PYTHON_THREAD_END_BLOCK;
    2803             :     }
    2804             :     
    2805             :     SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
    2806             :     {
    2807             :       if (initial_ref) {
    2808             :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2809             :         Py_XINCREF(_obj);
    2810             :         SWIG_PYTHON_THREAD_END_BLOCK;
    2811             :       }
    2812             :     }
    2813             :     
    2814             :     SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
    2815             :     {
    2816             :       SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2817             :       Py_XINCREF(item._obj);
    2818             :       Py_XDECREF(_obj);
    2819             :       _obj = item._obj;
    2820             :       SWIG_PYTHON_THREAD_END_BLOCK;
    2821             :       return *this;      
    2822             :     }
    2823             :     
    2824             :     ~SwigPtr_PyObject() 
    2825             :     {
    2826             :       SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2827             :       Py_XDECREF(_obj);
    2828             :       SWIG_PYTHON_THREAD_END_BLOCK;
    2829             :     }
    2830             :     
    2831             :     operator PyObject *() const
    2832             :     {
    2833             :       return _obj;
    2834             :     }
    2835             : 
    2836             :     PyObject *operator->() const
    2837             :     {
    2838             :       return _obj;
    2839             :     }
    2840             :   };
    2841             : }
    2842             : 
    2843             : 
    2844             : namespace swig {
    2845             :   struct SwigVar_PyObject : SwigPtr_PyObject {
    2846             :     SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
    2847             :     
    2848             :     SwigVar_PyObject & operator = (PyObject* obj)
    2849             :     {
    2850             :       Py_XDECREF(_obj);
    2851             :       _obj = obj;
    2852             :       return *this;      
    2853             :     }
    2854             :   };
    2855             : }
    2856             : 
    2857             : 
    2858             : #include <iostream>
    2859             : #include <vector>
    2860             : using namespace std;
    2861             : 
    2862             : #define CPL_SUPRESS_CPLUSPLUS
    2863             : 
    2864             : // Suppress deprecation warning for GDALApplyVerticalShiftGrid
    2865             : #define CPL_WARN_DEPRECATED_GDALApplyVerticalShiftGrid(x)
    2866             : 
    2867             : #include "cpl_port.h"
    2868             : #include "cpl_string.h"
    2869             : #include "cpl_multiproc.h"
    2870             : #include "cpl_http.h"
    2871             : #include "cpl_vsi_error.h"
    2872             : 
    2873             : #include "gdal.h"
    2874             : #include "gdal_alg.h"
    2875             : 
    2876             : #include "gdalwarper.h"
    2877             : #include "ogr_srs_api.h"
    2878             : 
    2879             : // From gdal_priv.h
    2880             : void CPL_DLL GDALEnablePixelTypeSignedByteWarning(GDALRasterBandH hBand, bool b);
    2881             : 
    2882             : typedef void GDALMajorObjectShadow;
    2883             : typedef void GDALDriverShadow;
    2884             : typedef void GDALDatasetShadow;
    2885             : typedef void GDALRasterBandShadow;
    2886             : typedef void GDALColorTableShadow;
    2887             : typedef void GDALRasterAttributeTableShadow;
    2888             : typedef void GDALSubdatasetInfoShadow;
    2889             : typedef void GDALTransformerInfoShadow;
    2890             : typedef void GDALAsyncReaderShadow;
    2891             : typedef void GDALRelationshipShadow;
    2892             : 
    2893             : typedef GDALExtendedDataTypeHS GDALExtendedDataTypeHS;
    2894             : typedef GDALEDTComponentHS GDALEDTComponentHS;
    2895             : typedef GDALGroupHS GDALGroupHS;
    2896             : typedef GDALMDArrayHS GDALMDArrayHS;
    2897             : typedef GDALAttributeHS GDALAttributeHS;
    2898             : typedef GDALDimensionHS GDALDimensionHS;
    2899             : 
    2900             : 
    2901             : 
    2902             : #ifdef DEBUG
    2903             : typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
    2904             : typedef struct OGRLayerHS OGRLayerShadow;
    2905             : typedef struct OGRFeatureHS OGRFeatureShadow;
    2906             : typedef struct OGRGeometryHS OGRGeometryShadow;
    2907             : #else
    2908             : typedef void OSRSpatialReferenceShadow;
    2909             : typedef void OGRLayerShadow;
    2910             : typedef void OGRFeatureShadow;
    2911             : typedef void OGRGeometryShadow;
    2912             : #endif
    2913             : 
    2914             : typedef struct OGRStyleTableHS OGRStyleTableShadow;
    2915             : typedef struct OGRFieldDomainHS OGRFieldDomainShadow;
    2916             : typedef struct OGRGeomFieldDefnHS OGRGeomFieldDefnShadow;
    2917             : 
    2918             : 
    2919             : /* use this to not return the int returned by GDAL */
    2920             : typedef int RETURN_NONE;
    2921             : /* return value that is used for VSI methods that return -1 on error (and set errno) */
    2922             : typedef int VSI_RETVAL;
    2923             : 
    2924             : 
    2925          65 : static int getAlignment(GDALDataType ntype)
    2926             : {
    2927          65 :     switch(ntype)
    2928             :     {
    2929             :         case GDT_Unknown:
    2930             :             break; // shouldn't happen
    2931             :         case GDT_Byte:
    2932             :         case GDT_Int8:
    2933             :             return 1;
    2934             :         case GDT_Int16:
    2935             :         case GDT_UInt16:
    2936             :         case GDT_Float16:
    2937             :             return 2;
    2938             :         case GDT_Int32:
    2939             :         case GDT_UInt32:
    2940             :         case GDT_Float32:
    2941             :             return 4;
    2942             :         case GDT_Float64:
    2943             :         case GDT_Int64:
    2944             :         case GDT_UInt64:
    2945             :             return 8;
    2946             :         case GDT_CInt16:
    2947             :         case GDT_CFloat16:
    2948             :             return 2;
    2949             :         case GDT_CInt32:
    2950             :         case GDT_CFloat32:
    2951             :             return 4;
    2952             :         case GDT_CFloat64:
    2953             :             return 8;
    2954             :         case GDT_TypeCount:
    2955             :             break; // shouldn't happen
    2956             :     }
    2957             :     // shouldn't happen
    2958             :     CPLAssert(false);
    2959             :     return 1;
    2960             : }
    2961             : 
    2962      186387 : static bool readraster_acquirebuffer(void** buf,
    2963             :                                      void*& inputOutputBuf,
    2964             :                                      size_t buf_size,
    2965             :                                      GDALDataType ntype,
    2966             :                                      int l_bUseExceptions,
    2967             :                                      char*& data,
    2968             :                                      Py_buffer& view)
    2969             : {
    2970      372774 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2971             : 
    2972      186387 :     if( inputOutputBuf == Py_None )
    2973      186255 :         inputOutputBuf = NULL;
    2974             : 
    2975      186387 :     if( inputOutputBuf )
    2976             :     {
    2977          75 :         if (PyObject_GetBuffer( (PyObject*)inputOutputBuf, &view,
    2978             :                                 PyBUF_SIMPLE | PyBUF_WRITABLE) == 0)
    2979             :         {
    2980          69 :             if( static_cast<GUIntBig>(view.len) < buf_size )
    2981             :             {
    2982           4 :                 PyBuffer_Release(&view);
    2983           4 :                 SWIG_PYTHON_THREAD_END_BLOCK;
    2984           4 :                 CPLError(CE_Failure, CPLE_AppDefined,
    2985             :                     "buf_obj length is " CPL_FRMT_GUIB " bytes. "
    2986             :                     "It should be at least " CPL_FRMT_GUIB,
    2987           4 :                     static_cast<GUIntBig>(view.len),
    2988             :                     static_cast<GUIntBig>(buf_size));
    2989             :                 return false;
    2990             :             }
    2991          65 :             data = (char*)view.buf;
    2992         124 :             if( (reinterpret_cast<uintptr_t>(data) % getAlignment(ntype)) != 0 )
    2993             :             {
    2994          29 :                 PyBuffer_Release(&view);
    2995          29 :                 SWIG_PYTHON_THREAD_END_BLOCK;
    2996          29 :                 CPLError(CE_Failure, CPLE_AppDefined,
    2997             :                          "buffer has not the appropriate alignment");
    2998             :                 return false;
    2999             :             }
    3000             :         }
    3001             :         else
    3002             :         {
    3003           6 :             PyErr_Clear();
    3004           6 :             SWIG_PYTHON_THREAD_END_BLOCK;
    3005           6 :             CPLError(CE_Failure, CPLE_AppDefined,
    3006             :                      "buf_obj is not a simple writable buffer");
    3007             :             return false;
    3008             :         }
    3009             :     }
    3010             :     else
    3011             :     {
    3012      186312 :         *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    3013      186312 :         if (*buf == NULL)
    3014             :         {
    3015           0 :             *buf = Py_None;
    3016           0 :             if( !l_bUseExceptions )
    3017             :             {
    3018           0 :                 PyErr_Clear();
    3019             :             }
    3020           0 :             SWIG_PYTHON_THREAD_END_BLOCK;
    3021           0 :             CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    3022             :             return false;
    3023             :         }
    3024      186312 :         data = PyByteArray_AsString( (PyObject *)*buf );
    3025             :     }
    3026      186348 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3027             :     return true;
    3028             : }
    3029             : 
    3030      186348 : static void readraster_releasebuffer(CPLErr eErr,
    3031             :                                      void** buf,
    3032             :                                      void* inputOutputBuf,
    3033             :                                      Py_buffer& view)
    3034             : {
    3035      186348 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3036             : 
    3037      186348 :     if( inputOutputBuf )
    3038          36 :         PyBuffer_Release(&view);
    3039             : 
    3040      186348 :     if (eErr == CE_Failure)
    3041             :     {
    3042        1332 :         if( inputOutputBuf == NULL )
    3043        1332 :             Py_DECREF((PyObject*)*buf);
    3044        1332 :         *buf = NULL;
    3045             :     }
    3046      185016 :     else if( inputOutputBuf )
    3047             :     {
    3048          36 :         *buf = inputOutputBuf;
    3049          36 :         Py_INCREF((PyObject*)*buf);
    3050             :     }
    3051             : 
    3052      186348 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3053      186348 : }
    3054             : 
    3055             : 
    3056             : 
    3057             : #define MODULE_NAME           "gdal"
    3058             : 
    3059             : 
    3060             : #include "cpl_string.h"
    3061             : #include "cpl_conv.h"
    3062             : 
    3063             : static int bUseExceptions=0;
    3064             : static int bUserHasSpecifiedIfUsingExceptions = FALSE;
    3065             : static thread_local int bUseExceptionsLocal = -1;
    3066             : 
    3067     2976820 : struct PythonBindingErrorHandlerContext
    3068             : {
    3069             :     std::string     osInitialMsg{};
    3070             :     std::string     osFailureMsg{};
    3071             :     CPLErrorNum     nLastCode = CPLE_None;
    3072             :     bool            bMemoryError = false;
    3073             : };
    3074             : 
    3075             : static void CPL_STDCALL
    3076       21736 : PythonBindingErrorHandler(CPLErr eclass, CPLErrorNum err_no, const char *msg )
    3077             : {
    3078       21736 :   PythonBindingErrorHandlerContext* ctxt = static_cast<
    3079       21736 :       PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
    3080             : 
    3081             :   /*
    3082             :   ** Generally we want to suppress error reporting if we have exceptions
    3083             :   ** enabled as the error message will be in the exception thrown in
    3084             :   ** Python.
    3085             :   */
    3086             : 
    3087             :   /* If the error class is CE_Fatal, we want to have a message issued
    3088             :      because the CPL support code does an abort() before any exception
    3089             :      can be generated */
    3090       21736 :   if (eclass == CE_Fatal ) {
    3091           0 :     CPLCallPreviousHandler(eclass, err_no, msg );
    3092             :   }
    3093             : 
    3094             :   /*
    3095             :   ** We do not want to interfere with non-failure messages since
    3096             :   ** they won't be translated into exceptions.
    3097             :   */
    3098       21736 :   else if (eclass != CE_Failure ) {
    3099       19303 :     CPLCallPreviousHandler(eclass, err_no, msg );
    3100             :   }
    3101             :   else {
    3102        2433 :     ctxt->nLastCode = err_no;
    3103        2433 :     try
    3104             :     {
    3105        2433 :         if( ctxt->osFailureMsg.empty() ) {
    3106        2169 :           ctxt->osFailureMsg = msg;
    3107        2169 :           ctxt->osInitialMsg = ctxt->osFailureMsg;
    3108             :         } else {
    3109         264 :           if( ctxt->osFailureMsg.size() < 10000 ) {
    3110         528 :             std::string osTmp(msg);
    3111         264 :             osTmp += "\nMay be caused by: ";
    3112         264 :             osTmp += ctxt->osFailureMsg;
    3113         264 :             ctxt->osFailureMsg = std::move(osTmp);
    3114         264 :             ctxt->osInitialMsg = ctxt->osFailureMsg;
    3115             :           }
    3116             :           else
    3117             :           {
    3118           0 :             std::string osTmp(msg);
    3119           0 :             osTmp += "\n[...]\nMay be caused by: ";
    3120           0 :             osTmp += ctxt->osInitialMsg;
    3121           0 :             ctxt->osFailureMsg = std::move(osTmp);
    3122             :           }
    3123             :         }
    3124             :     }
    3125           0 :     catch( const std::exception& )
    3126             :     {
    3127           0 :         ctxt->bMemoryError = true;
    3128             :     }
    3129             :   }
    3130       21736 : }
    3131             : 
    3132             : 
    3133             : 
    3134             : 
    3135             : static
    3136     7728010 : int GetUseExceptions() {
    3137     5857300 :   return bUseExceptionsLocal >= 0 ? bUseExceptionsLocal : bUseExceptions;
    3138             : }
    3139             : 
    3140        9978 : static int _GetExceptionsLocal()
    3141             : {
    3142        9978 :   return bUseExceptionsLocal;
    3143             : }
    3144             : 
    3145       19956 : static void _SetExceptionsLocal(int bVal)
    3146             : {
    3147       19956 :   bUseExceptionsLocal = bVal;
    3148             : }
    3149             : 
    3150             : static
    3151          28 : void _UseExceptions() {
    3152          28 :   CPLErrorReset();
    3153          28 :   bUserHasSpecifiedIfUsingExceptions = TRUE;
    3154          28 :   if( !bUseExceptions )
    3155             :   {
    3156          25 :     bUseExceptions = 1;
    3157             :   }
    3158             : }
    3159             : 
    3160             : static
    3161           5 : void _DontUseExceptions() {
    3162           5 :   CPLErrorReset();
    3163           5 :   bUserHasSpecifiedIfUsingExceptions = TRUE;
    3164           5 :   if( bUseExceptions )
    3165             :   {
    3166           0 :     bUseExceptions = 0;
    3167             :   }
    3168             : }
    3169             : 
    3170       56704 : static int _UserHasSpecifiedIfUsingExceptions()
    3171             : {
    3172        1597 :     return bUserHasSpecifiedIfUsingExceptions || bUseExceptionsLocal >= 0;
    3173             : }
    3174             : 
    3175             : 
    3176             : 
    3177             : SWIGINTERNINLINE PyObject*
    3178     2422070 :   SWIG_From_int  (int value)
    3179             : {
    3180     2422070 :   return PyInt_FromLong((long) value);
    3181             : }
    3182             : 
    3183             : 
    3184             : #include <limits.h>
    3185             : #if !defined(SWIG_NO_LLONG_MAX)
    3186             : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
    3187             : #   define LLONG_MAX __LONG_LONG_MAX__
    3188             : #   define LLONG_MIN (-LLONG_MAX - 1LL)
    3189             : #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
    3190             : # endif
    3191             : #endif
    3192             : 
    3193             : 
    3194             : SWIGINTERN int
    3195      955607 : SWIG_AsVal_double (PyObject *obj, double *val)
    3196             : {
    3197      955607 :   int res = SWIG_TypeError;
    3198      955607 :   if (PyFloat_Check(obj)) {
    3199       39473 :     if (val) *val = PyFloat_AsDouble(obj);
    3200       39473 :     return SWIG_OK;
    3201             : #if PY_VERSION_HEX < 0x03000000
    3202             :   } else if (PyInt_Check(obj)) {
    3203             :     if (val) *val = (double) PyInt_AsLong(obj);
    3204             :     return SWIG_OK;
    3205             : #endif
    3206      916134 :   } else if (PyLong_Check(obj)) {
    3207      916134 :     double v = PyLong_AsDouble(obj);
    3208      916134 :     if (!PyErr_Occurred()) {
    3209      916134 :       if (val) *val = v;
    3210      916134 :       return SWIG_OK;
    3211             :     } else {
    3212           0 :       PyErr_Clear();
    3213             :     }
    3214             :   }
    3215             : #ifdef SWIG_PYTHON_CAST_MODE
    3216             :   {
    3217             :     int dispatch = 0;
    3218             :     double d = PyFloat_AsDouble(obj);
    3219             :     if (!PyErr_Occurred()) {
    3220             :       if (val) *val = d;
    3221             :       return SWIG_AddCast(SWIG_OK);
    3222             :     } else {
    3223             :       PyErr_Clear();
    3224             :     }
    3225             :     if (!dispatch) {
    3226             :       long v = PyLong_AsLong(obj);
    3227             :       if (!PyErr_Occurred()) {
    3228             :   if (val) *val = v;
    3229             :   return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
    3230             :       } else {
    3231             :   PyErr_Clear();
    3232             :       }
    3233             :     }
    3234             :   }
    3235             : #endif
    3236             :   return res;
    3237             : }
    3238             : 
    3239             : 
    3240             : #include <float.h>
    3241             : 
    3242             : 
    3243             : #include <math.h>
    3244             : 
    3245             : 
    3246             : SWIGINTERNINLINE int
    3247             : SWIG_CanCastAsInteger(double *d, double min, double max) {
    3248             :   double x = *d;
    3249             :   if ((min <= x && x <= max)) {
    3250             :    double fx = floor(x);
    3251             :    double cx = ceil(x);
    3252             :    double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
    3253             :    if ((errno == EDOM) || (errno == ERANGE)) {
    3254             :      errno = 0;
    3255             :    } else {
    3256             :      double summ, reps, diff;
    3257             :      if (rd < x) {
    3258             :        diff = x - rd;
    3259             :      } else if (rd > x) {
    3260             :        diff = rd - x;
    3261             :      } else {
    3262             :        return 1;
    3263             :      }
    3264             :      summ = rd + x;
    3265             :      reps = diff/summ;
    3266             :      if (reps < 8*DBL_EPSILON) {
    3267             :        *d = rd;
    3268             :        return 1;
    3269             :      }
    3270             :    }
    3271             :   }
    3272             :   return 0;
    3273             : }
    3274             : 
    3275             : 
    3276             : SWIGINTERN int
    3277     2516330 : SWIG_AsVal_long (PyObject *obj, long* val)
    3278             : {
    3279             : #if PY_VERSION_HEX < 0x03000000
    3280             :   if (PyInt_Check(obj)) {
    3281             :     if (val) *val = PyInt_AsLong(obj);
    3282             :     return SWIG_OK;
    3283             :   } else
    3284             : #endif
    3285     2516330 :   if (PyLong_Check(obj)) {
    3286     2516320 :     long v = PyLong_AsLong(obj);
    3287     2516320 :     if (!PyErr_Occurred()) {
    3288     2516320 :       if (val) *val = v;
    3289     2516320 :       return SWIG_OK;
    3290             :     } else {
    3291           0 :       PyErr_Clear();
    3292           0 :       return SWIG_OverflowError;
    3293             :     }
    3294             :   }
    3295             : #ifdef SWIG_PYTHON_CAST_MODE
    3296             :   {
    3297             :     int dispatch = 0;
    3298             :     long v = PyInt_AsLong(obj);
    3299             :     if (!PyErr_Occurred()) {
    3300             :       if (val) *val = v;
    3301             :       return SWIG_AddCast(SWIG_OK);
    3302             :     } else {
    3303             :       PyErr_Clear();
    3304             :     }
    3305             :     if (!dispatch) {
    3306             :       double d;
    3307             :       int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
    3308             :       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
    3309             :   if (val) *val = (long)(d);
    3310             :   return res;
    3311             :       }
    3312             :     }
    3313             :   }
    3314             : #endif
    3315             :   return SWIG_TypeError;
    3316             : }
    3317             : 
    3318             : 
    3319             : SWIGINTERN int
    3320     2507650 : SWIG_AsVal_int (PyObject * obj, int *val)
    3321             : {
    3322     2507650 :   long v;
    3323     5015300 :   int res = SWIG_AsVal_long (obj, &v);
    3324     2507650 :   if (SWIG_IsOK(res)) {
    3325     2507650 :     if ((v < INT_MIN || v > INT_MAX)) {
    3326             :       return SWIG_OverflowError;
    3327             :     } else {
    3328     2498960 :       if (val) *val = static_cast< int >(v);
    3329             :     }
    3330             :   }  
    3331             :   return res;
    3332             : }
    3333             : 
    3334             : 
    3335             : /* Completely unrelated: just to avoid Coverity warnings */
    3336             : 
    3337             : static int bReturnSame = 1;
    3338             : 
    3339           0 : void NeverCallMePlease() {
    3340           0 :     bReturnSame = 0;
    3341           0 : }
    3342             : 
    3343             : /* Some SWIG code generates dead code, which Coverity warns about */
    3344     4246210 : template<class T> static T ReturnSame(T x)
    3345             : {
    3346     4246210 :     if( bReturnSame )
    3347             :         return x;
    3348             :     return 0;
    3349             : }
    3350             : 
    3351     2976820 : static void pushErrorHandler()
    3352             : {
    3353     2976820 :     CPLErrorReset();
    3354     2976820 :     PythonBindingErrorHandlerContext* ctxt = new PythonBindingErrorHandlerContext();
    3355     2976820 :     CPLPushErrorHandlerEx(PythonBindingErrorHandler, ctxt);
    3356     2976820 : }
    3357             : 
    3358     2976820 : static void popErrorHandler()
    3359             : {
    3360     2976820 :     PythonBindingErrorHandlerContext* ctxt = static_cast<
    3361     2976820 :       PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
    3362     2976820 :     CPLPopErrorHandler();
    3363     2976820 :     if( ctxt->bMemoryError )
    3364             :     {
    3365           0 :         CPLErrorSetState(
    3366             :           CE_Failure, CPLE_OutOfMemory, "Out of memory");
    3367             :     }
    3368     2976820 :     else if( !ctxt->osFailureMsg.empty() )
    3369             :     {
    3370        2182 :       CPLErrorSetState(
    3371        2169 :           CPLGetLastErrorType() == CE_Failure ? CE_Failure: CE_Warning,
    3372             :           ctxt->nLastCode, ctxt->osFailureMsg.c_str());
    3373             :     }
    3374     2976820 :     delete ctxt;
    3375     2976820 : }
    3376             : 
    3377             : 
    3378             : 
    3379             : 
    3380             : /* Return a PyObject* from a NULL terminated C String */
    3381             : static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
    3382      110751 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
    3383             : {
    3384      110751 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    3385    14631300 :   while(*pszIter != 0)
    3386             :   {
    3387    14520700 :     if (*pszIter > 127)
    3388             :     {
    3389         113 :         PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "strict");
    3390         113 :         if (pyObj != NULL && !PyErr_Occurred())
    3391             :             return pyObj;
    3392           1 :         PyErr_Clear();
    3393           1 :         return PyBytes_FromString(pszStr);
    3394             :     }
    3395    14520600 :     pszIter ++;
    3396             :   }
    3397      110638 :   return PyUnicode_FromString(pszStr);
    3398             : }
    3399             : 
    3400             : /* Return a NULL terminated c String from a PyObject */
    3401             : /* Result must be freed with GDALPythonFreeCStr */
    3402             : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
    3403      100982 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
    3404             : {
    3405      100982 :   *pbToFree = 0;
    3406      100982 :   if (PyUnicode_Check(pyObject))
    3407             :   {
    3408      100980 :       char *pszStr;
    3409      100980 :       char *pszNewStr;
    3410      100980 :       Py_ssize_t nLen;
    3411      100980 :       PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
    3412      100980 :       if( pyUTF8Str == NULL )
    3413             :         return NULL;
    3414      100980 :       PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    3415      100980 :       pszNewStr = (char *) malloc(nLen+1);
    3416      100980 :       if( pszNewStr == NULL )
    3417             :       {
    3418           0 :           CPLError(CE_Failure, CPLE_OutOfMemory, "Failed to allocate %llu bytes",
    3419             :                    (unsigned long long)(nLen + 1));
    3420           0 :           Py_XDECREF(pyUTF8Str);
    3421           0 :           return NULL;
    3422             :       }
    3423      100980 :       memcpy(pszNewStr, pszStr, nLen+1);
    3424      100980 :       Py_XDECREF(pyUTF8Str);
    3425      100980 :       *pbToFree = 1;
    3426      100980 :       return pszNewStr;
    3427             :   }
    3428           2 :   else if( PyBytes_Check(pyObject) )
    3429             :   {
    3430           2 :       char* ret = PyBytes_AsString(pyObject);
    3431             : 
    3432             :       // Check if there are \0 bytes inside the string
    3433           2 :       const Py_ssize_t size = PyBytes_Size(pyObject);
    3434          24 :       for( Py_ssize_t i = 0; i < size; i++ )
    3435             :       {
    3436          23 :           if( ret[i] == 0 )
    3437             :           {
    3438           1 :               CPLError(CE_Failure, CPLE_AppDefined,
    3439             :                        "bytes object cast as string contains a zero-byte.");
    3440           1 :               return NULL;
    3441             :           }
    3442             :       }
    3443             : 
    3444             :       return ret;
    3445             :   }
    3446             :   else
    3447             :   {
    3448           0 :       CPLError(CE_Failure, CPLE_AppDefined,
    3449             :                "Passed object is neither of type string nor bytes");
    3450           0 :       return NULL;
    3451             :   }
    3452             : }
    3453             : 
    3454             : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
    3455        9957 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree)
    3456             : {
    3457        9957 :     PyObject* os = PyImport_ImportModule("os");
    3458        9957 :     if (os == NULL)
    3459             :     {
    3460             :         return NULL;
    3461             :     }
    3462             : 
    3463        9957 :     PyObject* pathLike = PyObject_GetAttrString(os, "PathLike");
    3464        9957 :     if (pathLike == NULL)
    3465             :     {
    3466           0 :         Py_DECREF(os);
    3467           0 :         return NULL;
    3468             :     }
    3469             : 
    3470        9957 :     if (!PyObject_IsInstance(pyObject, pathLike))
    3471             :     {
    3472           4 :         Py_DECREF(pathLike);
    3473           4 :         Py_DECREF(os);
    3474           4 :         return NULL;
    3475             :     }
    3476             : 
    3477        9953 :     PyObject* str = PyObject_Str(pyObject);
    3478        9953 :     char* ret = NULL;
    3479        9953 :     if (str != NULL)
    3480             :     {
    3481        9953 :         ret = GDALPythonObjectToCStr(str, pbToFree);
    3482        9953 :         Py_DECREF(str);
    3483             :     }
    3484             : 
    3485        9953 :     Py_DECREF(pathLike);
    3486        9953 :     Py_DECREF(os);
    3487             : 
    3488             :     return ret;
    3489             : }
    3490             : 
    3491             : 
    3492             : static void GDALPythonFreeCStr(void* ptr, int bToFree) CPL_UNUSED;
    3493      100986 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
    3494             : {
    3495      100986 :    if (bToFree)
    3496      100980 :        free(ptr);
    3497             : }
    3498             : 
    3499             : 
    3500             : 
    3501       27497 : unsigned int wrapper_VSIFReadL( void **buf, unsigned int nMembSize, unsigned int nMembCount, VSILFILE *fp)
    3502             : {
    3503       27497 :     size_t buf_size = static_cast<size_t>(nMembSize) * nMembCount;
    3504       27497 :     if( buf_size > 0xFFFFFFFFU )
    3505             :    {
    3506           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Too big request");
    3507           0 :         *buf = NULL;
    3508           0 :         return 0;
    3509             :     }
    3510             : 
    3511       27497 :     if (buf_size == 0)
    3512             :     {
    3513          12 :         *buf = NULL;
    3514          12 :         return 0;
    3515             :     }
    3516             : 
    3517       54982 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3518       27485 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    3519       27485 :     if (*buf == NULL)
    3520             :     {
    3521           0 :         *buf = Py_None;
    3522           0 :         if( !GetUseExceptions() )
    3523             :         {
    3524           0 :             PyErr_Clear();
    3525             :         }
    3526           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3527           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    3528             :         return 0;
    3529             :     }
    3530       27485 :     PyObject* o = (PyObject*) *buf;
    3531       27485 :     char *data = PyByteArray_AsString(o);
    3532       27485 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3533       27485 :     size_t nRet = (size_t)VSIFReadL( data, nMembSize, nMembCount, fp );
    3534       27485 :     if (nRet * (size_t)nMembSize < buf_size)
    3535             :     {
    3536       11144 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3537       11144 :         PyByteArray_Resize(o, nRet * nMembSize);
    3538       11144 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3539       11144 :         *buf = o;
    3540             :     }
    3541       27485 :     return static_cast<unsigned int>(nRet);
    3542             : }
    3543             : 
    3544             : 
    3545             : SWIGINTERN int
    3546       59066 : SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
    3547             : {
    3548             : #if PY_VERSION_HEX < 0x03000000
    3549             :   if (PyInt_Check(obj)) {
    3550             :     long v = PyInt_AsLong(obj);
    3551             :     if (v >= 0) {
    3552             :       if (val) *val = v;
    3553             :       return SWIG_OK;
    3554             :     } else {
    3555             :       return SWIG_OverflowError;
    3556             :     }
    3557             :   } else
    3558             : #endif
    3559       59066 :   if (PyLong_Check(obj)) {
    3560       59066 :     unsigned long v = PyLong_AsUnsignedLong(obj);
    3561       59066 :     if (!PyErr_Occurred()) {
    3562       59066 :       if (val) *val = v;
    3563       59066 :       return SWIG_OK;
    3564             :     } else {
    3565           0 :       PyErr_Clear();
    3566           0 :       return SWIG_OverflowError;
    3567             :     }
    3568             :   }
    3569             : #ifdef SWIG_PYTHON_CAST_MODE
    3570             :   {
    3571             :     int dispatch = 0;
    3572             :     unsigned long v = PyLong_AsUnsignedLong(obj);
    3573             :     if (!PyErr_Occurred()) {
    3574             :       if (val) *val = v;
    3575             :       return SWIG_AddCast(SWIG_OK);
    3576             :     } else {
    3577             :       PyErr_Clear();
    3578             :     }
    3579             :     if (!dispatch) {
    3580             :       double d;
    3581             :       int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
    3582             :       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
    3583             :   if (val) *val = (unsigned long)(d);
    3584             :   return res;
    3585             :       }
    3586             :     }
    3587             :   }
    3588             : #endif
    3589             :   return SWIG_TypeError;
    3590             : }
    3591             : 
    3592             : 
    3593             : SWIGINTERN int
    3594       58856 : SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
    3595             : {
    3596       58856 :   unsigned long v;
    3597      117712 :   int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
    3598       58856 :   if (SWIG_IsOK(res)) {
    3599       58856 :     if ((v > UINT_MAX)) {
    3600             :       return SWIG_OverflowError;
    3601             :     } else {
    3602       58856 :       if (val) *val = static_cast< unsigned int >(v);
    3603             :     }
    3604             :   }  
    3605             :   return res;
    3606             : }
    3607             : 
    3608             : 
    3609             : SWIGINTERNINLINE PyObject*
    3610       27497 :   SWIG_From_unsigned_SS_int  (unsigned int value)
    3611             : {
    3612       27497 :   return PyInt_FromSize_t((size_t) value);
    3613             : }
    3614             : 
    3615             : 
    3616           2 : void wrapper_VSIGetMemFileBuffer(const char *utf8_path, GByte **out, vsi_l_offset *length)
    3617             : {
    3618           2 :     *out = VSIGetMemFileBuffer(utf8_path, length, 0);
    3619           2 : }
    3620             : 
    3621             : 
    3622             : SWIGINTERN swig_type_info*
    3623        8395 : SWIG_pchar_descriptor(void)
    3624             : {
    3625        8395 :   static int init = 0;
    3626        8395 :   static swig_type_info* info = 0;
    3627        8395 :   if (!init) {
    3628          36 :     info = SWIG_TypeQuery("_p_char");
    3629          36 :     init = 1;
    3630             :   }
    3631        8395 :   return info;
    3632             : }
    3633             : 
    3634             : 
    3635             : SWIGINTERN int
    3636      571872 : SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
    3637             : {
    3638             : #if PY_VERSION_HEX>=0x03000000
    3639             : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3640             :   if (PyBytes_Check(obj))
    3641             : #else
    3642      571872 :   if (PyUnicode_Check(obj))
    3643             : #endif
    3644             : #else  
    3645             :   if (PyString_Check(obj))
    3646             : #endif
    3647             :   {
    3648      563477 :     char *cstr; Py_ssize_t len;
    3649      563477 :     int ret = SWIG_OK;
    3650             : #if PY_VERSION_HEX>=0x03000000
    3651             : #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3652      563477 :     if (!alloc && cptr) {
    3653             :         /* We can't allow converting without allocation, since the internal
    3654             :            representation of string in Python 3 is UCS-2/UCS-4 but we require
    3655             :            a UTF-8 representation.
    3656             :            TODO(bhy) More detailed explanation */
    3657             :         return SWIG_RuntimeError;
    3658             :     }
    3659      563477 :     obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
    3660      563477 :     if (!obj)
    3661             :       return SWIG_TypeError;
    3662      563477 :     if (alloc)
    3663      563344 :       *alloc = SWIG_NEWOBJ;
    3664             : #endif
    3665      563477 :     PyBytes_AsStringAndSize(obj, &cstr, &len);
    3666             : #else
    3667             :     PyString_AsStringAndSize(obj, &cstr, &len);
    3668             : #endif
    3669      563477 :     if (cptr) {
    3670      563344 :       if (alloc) {
    3671      563344 :   if (*alloc == SWIG_NEWOBJ) {
    3672      563344 :     *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
    3673      563344 :     *alloc = SWIG_NEWOBJ;
    3674             :   } else {
    3675           0 :     *cptr = cstr;
    3676           0 :     *alloc = SWIG_OLDOBJ;
    3677             :   }
    3678             :       } else {
    3679             : #if PY_VERSION_HEX>=0x03000000
    3680             : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3681             :   *cptr = PyBytes_AsString(obj);
    3682             : #else
    3683             :   assert(0); /* Should never reach here with Unicode strings in Python 3 */
    3684             : #endif
    3685             : #else
    3686             :   *cptr = SWIG_Python_str_AsChar(obj);
    3687             :         if (!*cptr)
    3688             :           ret = SWIG_TypeError;
    3689             : #endif
    3690             :       }
    3691             :     }
    3692      563477 :     if (psize) *psize = len + 1;
    3693             : #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3694      563477 :     Py_XDECREF(obj);
    3695             : #endif
    3696      563477 :     return ret;
    3697             :   } else {
    3698             : #if defined(SWIG_PYTHON_2_UNICODE)
    3699             : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3700             : #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
    3701             : #endif
    3702             : #if PY_VERSION_HEX<0x03000000
    3703             :     if (PyUnicode_Check(obj)) {
    3704             :       char *cstr; Py_ssize_t len;
    3705             :       if (!alloc && cptr) {
    3706             :         return SWIG_RuntimeError;
    3707             :       }
    3708             :       obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
    3709             :       if (!obj)
    3710             :         return SWIG_TypeError;
    3711             :       if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
    3712             :         if (cptr) {
    3713             :           if (alloc) *alloc = SWIG_NEWOBJ;
    3714             :           *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
    3715             :         }
    3716             :         if (psize) *psize = len + 1;
    3717             : 
    3718             :         Py_XDECREF(obj);
    3719             :         return SWIG_OK;
    3720             :       } else {
    3721             :         Py_XDECREF(obj);
    3722             :       }
    3723             :     }
    3724             : #endif
    3725             : #endif
    3726             : 
    3727        8395 :     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3728        8395 :     if (pchar_descriptor) {
    3729        8395 :       void* vptr = 0;
    3730        8395 :       if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
    3731        7993 :   if (cptr) *cptr = (char *) vptr;
    3732        7993 :   if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
    3733        7993 :   if (alloc) *alloc = SWIG_OLDOBJ;
    3734        7993 :   return SWIG_OK;
    3735             :       }
    3736             :     }
    3737             :   }
    3738             :   return SWIG_TypeError;
    3739             : }
    3740             : 
    3741             : 
    3742             : 
    3743             : 
    3744             : 
    3745             : 
    3746             : typedef struct {
    3747             :     PyObject *psPyCallback;
    3748             :     PyObject *psPyCallbackData;
    3749             :     int nLastReported;
    3750             : } PyProgressData;
    3751             : 
    3752             : /************************************************************************/
    3753             : /*                          PyProgressProxy()                           */
    3754             : /************************************************************************/
    3755             : 
    3756             : 
    3757             : static int CPL_STDCALL
    3758             : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData ) CPL_UNUSED;
    3759             : 
    3760             : static int CPL_STDCALL
    3761        7471 : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )
    3762             : 
    3763             : {
    3764        7471 :     PyProgressData *psInfo = (PyProgressData *) pData;
    3765        7471 :     PyObject *psArgs, *psResult;
    3766        7471 :     int      bContinue = TRUE;
    3767             : 
    3768        7471 :     if( dfComplete > 0 && psInfo->nLastReported == (int) (100.0 * dfComplete) )
    3769             :         return TRUE;
    3770             : 
    3771        3508 :     if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
    3772             :         return TRUE;
    3773             : 
    3774        3508 :     psInfo->nLastReported = (int) (100.0 * dfComplete);
    3775             : 
    3776        3508 :     if( pszMessage == NULL )
    3777         715 :         pszMessage = "";
    3778             : 
    3779       10979 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3780             : 
    3781        3508 :     if( psInfo->psPyCallbackData == NULL )
    3782        2341 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
    3783             :     else
    3784        1167 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage,
    3785             :                          psInfo->psPyCallbackData );
    3786             : 
    3787        3508 :     psResult = PyObject_CallObject( psInfo->psPyCallback, psArgs);
    3788        3508 :     Py_XDECREF(psArgs);
    3789             : 
    3790        3508 :     if( PyErr_Occurred() != NULL )
    3791             :     {
    3792           1 :         PyErr_Print();
    3793           1 :         PyErr_Clear();
    3794           1 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3795             :         return FALSE;
    3796             :     }
    3797             : 
    3798        3507 :     if( psResult == NULL )
    3799             :     {
    3800           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3801             :         return TRUE;
    3802             :     }
    3803             : 
    3804        3507 :     if( psResult == Py_None )
    3805             :     {
    3806          14 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3807             :         return TRUE;
    3808             :     }
    3809             : 
    3810        3493 :     if( !PyArg_Parse( psResult, "i", &bContinue ) )
    3811             :     {
    3812           1 :         PyErr_Clear();
    3813           1 :         CPLError(CE_Failure, CPLE_AppDefined, "bad progress return value");
    3814           1 :         Py_XDECREF(psResult);
    3815           1 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3816             :         return FALSE;
    3817             :     }
    3818             : 
    3819        3492 :     Py_XDECREF(psResult);
    3820        3492 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3821             : 
    3822        3492 :     return bContinue;
    3823             : }
    3824             : 
    3825             : 
    3826             : typedef char retStringAndCPLFree;
    3827             : 
    3828             : 
    3829         147 :   void Debug( const char *msg_class, const char *message ) {
    3830         147 :     CPLDebug( msg_class, "%s", message );
    3831         147 :   }
    3832             : 
    3833             : 
    3834           6 :   CPLErr SetErrorHandler( CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL )
    3835             :   {
    3836           6 :     if( pfnErrorHandler == NULL )
    3837             :     {
    3838           0 :         pfnErrorHandler = CPLDefaultErrorHandler;
    3839             :     }
    3840             : 
    3841           6 :     CPLSetErrorHandlerEx( pfnErrorHandler, user_data );
    3842             : 
    3843           6 :     return CE_None;
    3844             :   }
    3845             : 
    3846             : 
    3847             : extern "C" int CPL_DLL GDALIsInGlobalDestructor();
    3848             : 
    3849         642 : void CPL_STDCALL PyCPLErrorHandler(CPLErr eErrClass, CPLErrorNum err_no, const char* pszErrorMsg)
    3850             : {
    3851         642 :     if( GDALIsInGlobalDestructor() )
    3852             :     {
    3853             :         // this is typically during Python interpreter shutdown, and ends up in a crash
    3854             :         // because error handling tries to do thread initialization.
    3855           0 :         return;
    3856             :     }
    3857             : 
    3858         642 :     void* user_data = CPLGetErrorHandlerUserData();
    3859         642 :     PyObject *psArgs;
    3860             : 
    3861        1284 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3862             : 
    3863         642 :     psArgs = Py_BuildValue("(iis)", eErrClass, err_no, pszErrorMsg );
    3864         642 :     PyObject_CallObject( (PyObject*)user_data, psArgs);
    3865         642 :     Py_XDECREF(psArgs);
    3866             : 
    3867         642 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3868             : }
    3869             : 
    3870             : 
    3871       28740 :   CPLErr PushErrorHandler( CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL )
    3872             :   {
    3873       28740 :     if( pfnErrorHandler == NULL )
    3874          76 :         CPLPushErrorHandler(CPLQuietErrorHandler);
    3875             :     else
    3876       28664 :         CPLPushErrorHandlerEx(pfnErrorHandler, user_data);
    3877       28740 :     return CE_None;
    3878             :   }
    3879             : 
    3880             : 
    3881       28735 :   void PopErrorHandler()
    3882             :   {
    3883       28735 :      void* user_data = CPLGetErrorHandlerUserData();
    3884       28735 :      if( user_data != NULL )
    3885             :      {
    3886         143 :          Py_XDECREF((PyObject*)user_data);
    3887             :      }
    3888       28735 :      CPLPopErrorHandler();
    3889       28735 :   }
    3890             : 
    3891             : 
    3892          27 :   void Error( CPLErr msg_class = CE_Failure, int err_code = 0, const char* msg = "error" ) {
    3893          27 :     CPLError( msg_class, err_code, "%s", msg );
    3894          27 :   }
    3895             : 
    3896             : 
    3897         170 : retStringAndCPLFree* wrapper_EscapeString(int len, char *bin_string , int scheme=CPLES_SQL) {
    3898         170 :     return CPLEscapeString(bin_string, len, scheme);
    3899             : }
    3900             : 
    3901             : 
    3902             : static bool
    3903      347067 : GetBufferAsCharPtrIntSize( PyObject* input, int *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
    3904      347067 :   {
    3905      347067 :     if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    3906             :     {
    3907        6611 :       if( view->len > INT_MAX ) {
    3908           0 :         PyBuffer_Release(view);
    3909           0 :         PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
    3910           0 :         return false;
    3911             :       }
    3912        6611 :       *viewIsValid = true;
    3913        6611 :       *nLen = (int) view->len;
    3914        6611 :       *pBuf = (char*) view->buf;
    3915        6611 :       return true;
    3916             :     }
    3917             :     else
    3918             :     {
    3919      340456 :       PyErr_Clear();
    3920             :     }
    3921             :   }
    3922      340456 :   if (PyUnicode_Check(input))
    3923             :   {
    3924      340456 :     size_t safeLen = 0;
    3925      340456 :     int ret;
    3926      340456 :     try {
    3927      340456 :       ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
    3928             :     }
    3929           0 :     catch( const std::exception& )
    3930             :     {
    3931           0 :       PyErr_SetString(PyExc_MemoryError, "out of memory");
    3932           0 :       return false;
    3933             :     }
    3934      340456 :     if (!SWIG_IsOK(ret)) {
    3935           0 :       PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
    3936           0 :       return false;
    3937             :     }
    3938             : 
    3939      340456 :     if (safeLen) safeLen--;
    3940      340456 :     if( safeLen > INT_MAX ) {
    3941           0 :       PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
    3942           0 :       return false;
    3943             :     }
    3944      340456 :     *nLen = (int) safeLen;
    3945      340456 :     return true;
    3946             :   }
    3947             :   else
    3948             :   {
    3949           0 :     PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
    3950           0 :     return false;
    3951             :   }
    3952             : }
    3953             : 
    3954             : 
    3955          81 : void EscapeBinary(int len, char *bin_string, size_t *pnLenOut, char** pOut, int scheme=CPLES_SQL) {
    3956          81 :     *pOut = CPLEscapeString(bin_string, len, scheme);
    3957          81 :     *pnLenOut = *pOut ? strlen(*pOut) : 0;
    3958          81 : }
    3959             : 
    3960             : 
    3961             : SWIGINTERNINLINE PyObject *
    3962      194827 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
    3963             : {
    3964      194827 :   if (carray) {
    3965      138537 :     if (size > INT_MAX) {
    3966           0 :       swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3967           0 :       return pchar_descriptor ? 
    3968           0 :   SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    3969             :     } else {
    3970             : #if PY_VERSION_HEX >= 0x03000000
    3971             : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3972             :       return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
    3973             : #else
    3974      138537 :       return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
    3975             : #endif
    3976             : #else
    3977             :       return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
    3978             : #endif
    3979             :     }
    3980             :   } else {
    3981       56290 :     return SWIG_Py_Void();
    3982             :   }
    3983             : }
    3984             : 
    3985             : 
    3986             : SWIGINTERNINLINE PyObject * 
    3987      194827 : SWIG_FromCharPtr(const char *cptr)
    3988             : { 
    3989      194827 :   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
    3990             : }
    3991             : 
    3992             : 
    3993        3212 : char **wrapper_VSIReadDirEx( const char * utf8_path, int nMaxFiles = 0 )
    3994             : {
    3995        3212 :     return VSIReadDirEx(utf8_path, nMaxFiles);
    3996             : }
    3997             : 
    3998             : 
    3999        7135 : static PyObject* CSLToList( char** stringarray, bool *pbErr )
    4000             : {
    4001        7135 :   PyObject* res;
    4002        7135 :   if ( stringarray == NULL ) {
    4003        3586 :     res = Py_None;
    4004        3586 :     Py_INCREF( res );
    4005             :   }
    4006             :   else {
    4007        3549 :     int len = CSLCount( stringarray );
    4008        3549 :     res = PyList_New( len );
    4009        3549 :     if( !res ) {
    4010           0 :       *pbErr = true;
    4011           0 :       return res;
    4012             :     }
    4013       25662 :     for ( int i = 0; i < len; ++i ) {
    4014       22113 :       PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    4015       22113 :       PyList_SetItem(res, i, o );
    4016             :     }
    4017             :   }
    4018        7135 :   *pbErr = false;
    4019        7135 :   return res;
    4020             : }
    4021             : 
    4022             : 
    4023          32 : VSIDIR* wrapper_VSIOpenDir( const char * utf8_path,
    4024             :                             int nRecurseDepth = -1,
    4025             :                             char** options = NULL )
    4026             : {
    4027          32 :     return VSIOpenDir(utf8_path, nRecurseDepth, options);
    4028             : }
    4029             : 
    4030             : 
    4031             : /************************************************************************/
    4032             : /*                         CSLFromPySequence()                          */
    4033             : /************************************************************************/
    4034       17521 : static char **CSLFromPySequence( PyObject *pySeq, int *pbErr )
    4035             : 
    4036             : {
    4037       17521 :   *pbErr = FALSE;
    4038             :   /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    4039       17521 :   if ( ! PySequence_Check(pySeq) || PyUnicode_Check(pySeq) ) {
    4040           0 :     PyErr_SetString(PyExc_TypeError,"not a sequence");
    4041           0 :     *pbErr = TRUE;
    4042           0 :     return NULL;
    4043             :   }
    4044             : 
    4045       17521 :   Py_ssize_t size = PySequence_Size(pySeq);
    4046       17521 :   if( size > (Py_ssize_t)(INT_MAX - 1) ) {
    4047           0 :     PyErr_SetString(PyExc_TypeError, "too big sequence");
    4048           0 :     *pbErr = TRUE;
    4049           0 :     return NULL;
    4050             :   }
    4051       17521 :   if( size == 0 ) {
    4052             :     return NULL;
    4053             :   }
    4054       12105 :   char** papszRet = (char**) VSICalloc((int)size + 1, sizeof(char*));
    4055       12105 :   if( !papszRet ) {
    4056           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    4057           0 :     *pbErr = TRUE;
    4058           0 :     return NULL;
    4059             :   }
    4060      107666 :   for (int i = 0; i < (int)size; i++) {
    4061       95562 :     PyObject* pyObj = PySequence_GetItem(pySeq,i);
    4062       95562 :     if (PyUnicode_Check(pyObj))
    4063             :     {
    4064       95558 :       char *pszStr;
    4065       95558 :       Py_ssize_t nLen;
    4066       95558 :       PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    4067       95558 :       if( !pyUTF8Str )
    4068             :       {
    4069           0 :         Py_DECREF(pyObj);
    4070           0 :         PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
    4071           0 :         CSLDestroy(papszRet);
    4072           0 :         *pbErr = TRUE;
    4073           0 :         return NULL;
    4074             :       }
    4075       95558 :       PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    4076       95558 :       papszRet[i] = VSIStrdup(pszStr);
    4077      188279 :       Py_XDECREF(pyUTF8Str);
    4078             :     }
    4079           4 :     else if (PyBytes_Check(pyObj))
    4080           3 :       papszRet[i] = VSIStrdup(PyBytes_AsString(pyObj));
    4081             :     else
    4082             :     {
    4083           1 :         Py_DECREF(pyObj);
    4084           1 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    4085           1 :         CSLDestroy(papszRet);
    4086           1 :         *pbErr = TRUE;
    4087           1 :         return NULL;
    4088             :     }
    4089       95561 :     Py_DECREF(pyObj);
    4090       95561 :     if( !papszRet[i] )
    4091             :     {
    4092           0 :         PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    4093           0 :         CSLDestroy(papszRet);
    4094           0 :         *pbErr = TRUE;
    4095           0 :         return NULL;
    4096             :     }
    4097             :   }
    4098             :   return papszRet;
    4099             : }
    4100             : 
    4101             : 
    4102         451 : static char **CSLFromPyMapping( PyObject *pyObj, int *pbErr )
    4103             : 
    4104             : {
    4105         451 :     char** retCSL = NULL;
    4106         451 :     Py_ssize_t size = PyMapping_Length( pyObj );
    4107         451 :     if ( size > 0 && size == (int)size) {
    4108         265 :       PyObject *item_list = PyMapping_Items( pyObj );
    4109        1202 :       for( int i=0; i<(int)size; i++ ) {
    4110         940 :         PyObject *it = PySequence_GetItem( item_list, i );
    4111             : 
    4112         940 :         PyObject *k, *v;
    4113         940 :         if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
    4114           0 :           Py_DECREF(it);
    4115           0 :           Py_DECREF(item_list);
    4116           0 :           PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
    4117           0 :           CSLDestroy(retCSL);
    4118           0 :           *pbErr = TRUE;
    4119           3 :           return NULL;
    4120             :         }
    4121             : 
    4122         940 :         PyObject* kStr = PyObject_Str(k);
    4123         940 :         if( PyErr_Occurred() )
    4124             :         {
    4125           1 :             Py_DECREF(it);
    4126           1 :             Py_DECREF(item_list);
    4127           1 :             CSLDestroy(retCSL);
    4128           1 :             *pbErr = TRUE;
    4129           1 :             return NULL;
    4130             :         }
    4131             : 
    4132         939 :         PyObject* vStr;
    4133         939 :         if( PyBytes_Check(v) )
    4134             :         {
    4135           2 :             vStr = v;
    4136           2 :             Py_INCREF(vStr);
    4137             :         }
    4138             :         else
    4139             :         {
    4140         937 :             vStr = PyObject_Str(v);
    4141         937 :             if( PyErr_Occurred() )
    4142             :             {
    4143           1 :                 Py_DECREF(it);
    4144           1 :                 Py_DECREF(kStr);
    4145           1 :                 Py_DECREF(item_list);
    4146           1 :                 CSLDestroy(retCSL);
    4147           1 :                 *pbErr = TRUE;
    4148           1 :                 return NULL;
    4149             :             }
    4150             :         }
    4151             : 
    4152         938 :         int bFreeK, bFreeV;
    4153         938 :         char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
    4154         938 :         char* pszV = GDALPythonObjectToCStr(vStr, &bFreeV);
    4155         938 :         if( pszK == NULL || pszV == NULL )
    4156             :         {
    4157           1 :             GDALPythonFreeCStr(pszK, bFreeK);
    4158           1 :             GDALPythonFreeCStr(pszV, bFreeV);
    4159           1 :             Py_DECREF(kStr);
    4160           1 :             Py_DECREF(vStr);
    4161           1 :             Py_DECREF(it);
    4162           1 :             Py_DECREF(item_list);
    4163           1 :             PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
    4164           1 :             CSLDestroy(retCSL);
    4165           1 :             *pbErr = TRUE;
    4166           1 :             return NULL;
    4167             :         }
    4168         937 :         retCSL = CSLAddNameValue( retCSL, pszK, pszV );
    4169             : 
    4170         937 :         GDALPythonFreeCStr(pszK, bFreeK);
    4171         937 :         GDALPythonFreeCStr(pszV, bFreeV);
    4172         937 :         Py_DECREF(kStr);
    4173         937 :         Py_DECREF(vStr);
    4174         937 :         Py_DECREF(it);
    4175             :       }
    4176         262 :       Py_DECREF(item_list);
    4177             :     }
    4178         448 :     *pbErr = FALSE;
    4179         448 :     return retCSL;
    4180             : }
    4181             : 
    4182             : 
    4183             : typedef struct
    4184             : {
    4185             :     char*        name;
    4186             :     int          mode;
    4187             :     GIntBig      size;
    4188             :     GIntBig      mtime;
    4189             :     bool         modeKnown;
    4190             :     bool         sizeKnown;
    4191             :     bool         mtimeKnown;
    4192             :     char**       extra;
    4193             : } DirEntry;
    4194             : 
    4195             : 
    4196             : SWIGINTERNINLINE PyObject*
    4197        8395 :   SWIG_From_bool  (bool value)
    4198             : {
    4199        8395 :   return PyBool_FromLong(value ? 1 : 0);
    4200             : }
    4201             : 
    4202             : 
    4203             : /* Return a PyObject* from a C String */
    4204       88064 : static PyObject* GDALPythonObjectFromCStrAndSize(const char *pszStr, size_t nLen)
    4205             : {
    4206       88064 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    4207     1549060 :   for( size_t i = 0; i < nLen; ++i)
    4208             :   {
    4209     1461000 :     if (pszIter[i] > 127)
    4210             :     {
    4211           3 :         PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, nLen, "strict");
    4212           3 :         if (pyObj != NULL && !PyErr_Occurred())
    4213             :             return pyObj;
    4214           0 :         PyErr_Clear();
    4215           0 :         return PyBytes_FromStringAndSize(pszStr, nLen);
    4216             :     }
    4217             :   }
    4218       88061 :   return PyUnicode_FromStringAndSize(pszStr, nLen);
    4219             : }
    4220             : 
    4221             : 
    4222             : static PyObject*
    4223        6943 : GetCSLStringAsPyDict( char **stringarray, bool bFreeCSL ) {
    4224        6943 :   PyObject* dict = PyDict_New();
    4225        6943 :   if ( stringarray != NULL ) {
    4226       94730 :     for (char** iter = stringarray; *iter; ++iter ) {
    4227       88329 :       const char* pszSep = strchr( *iter, '=' );
    4228       88329 :       if ( pszSep != NULL) {
    4229       88064 :         const char* keyptr = *iter;
    4230       88064 :         const char* valptr = pszSep + 1;
    4231       88064 :         PyObject *nm = GDALPythonObjectFromCStrAndSize( keyptr, (size_t)(pszSep - keyptr) );
    4232       88064 :         PyObject *val = GDALPythonObjectFromCStr( valptr );
    4233       88064 :         PyDict_SetItem(dict, nm, val );
    4234       88064 :         Py_DECREF(nm);
    4235       88329 :         Py_DECREF(val);
    4236             :       }
    4237             :     }
    4238             :   }
    4239        6943 :   if( bFreeCSL )
    4240          40 :     CSLDestroy(stringarray);
    4241        6943 :   return dict;
    4242             : }
    4243             : 
    4244           0 : SWIGINTERN DirEntry *new_DirEntry(DirEntry const *entryIn){
    4245           0 :     DirEntry *self = (DirEntry*) CPLMalloc( sizeof( DirEntry ) );
    4246           0 :     self->name = CPLStrdup(entryIn->name);
    4247           0 :     self->mode = entryIn->mode;
    4248           0 :     self->size = entryIn->size;
    4249           0 :     self->mtime = entryIn->mtime;
    4250           0 :     self->modeKnown = entryIn->modeKnown;
    4251           0 :     self->sizeKnown = entryIn->sizeKnown;
    4252           0 :     self->mtimeKnown = entryIn->mtimeKnown;
    4253           0 :     self->extra = CSLDuplicate(entryIn->extra);
    4254           0 :     return self;
    4255             :   }
    4256          76 : SWIGINTERN void delete_DirEntry(DirEntry *self){
    4257          76 :     CPLFree(self->name);
    4258          76 :     CSLDestroy(self->extra);
    4259          76 :     CPLFree(self);
    4260          76 :   }
    4261           0 : SWIGINTERN bool DirEntry_IsDirectory(DirEntry *self){
    4262           0 :      return (self->mode & S_IFDIR) != 0;
    4263             :   }
    4264             : 
    4265         106 : DirEntry* wrapper_VSIGetNextDirEntry(VSIDIR* dir)
    4266             : {
    4267         106 :     const VSIDIREntry* vsiEntry = VSIGetNextDirEntry(dir);
    4268         106 :     if( vsiEntry == nullptr )
    4269             :     {
    4270             :         return nullptr;
    4271             :     }
    4272          76 :     DirEntry* entry = (DirEntry*) CPLMalloc( sizeof( DirEntry ) );
    4273          76 :     entry->name = CPLStrdup(vsiEntry->pszName);
    4274          76 :     entry->mode = vsiEntry->nMode;
    4275          76 :     entry->size = vsiEntry->nSize;
    4276          76 :     entry->mtime = vsiEntry->nMTime;
    4277          76 :     entry->modeKnown = vsiEntry->bModeKnown == TRUE;
    4278          76 :     entry->sizeKnown = vsiEntry->bSizeKnown == TRUE;
    4279          76 :     entry->mtimeKnown = vsiEntry->bMTimeKnown == TRUE;
    4280          76 :     entry->extra = CSLDuplicate(vsiEntry->papszExtra);
    4281          76 :     return entry;
    4282             : }
    4283             : 
    4284             : 
    4285       20741 : const char *wrapper_CPLGetConfigOption( const char * pszKey, const char * pszDefault = NULL )
    4286             : {
    4287       20741 :     return CPLGetConfigOption( pszKey, pszDefault );
    4288             : }
    4289        1856 : const char *wrapper_CPLGetGlobalConfigOption( const char * pszKey, const char * pszDefault = NULL )
    4290             : {
    4291        1856 :     return CPLGetGlobalConfigOption( pszKey, pszDefault );
    4292             : }
    4293        2987 : const char *wrapper_CPLGetThreadLocalConfigOption( const char * pszKey, const char * pszDefault = NULL )
    4294             : {
    4295        2987 :     return CPLGetThreadLocalConfigOption( pszKey, pszDefault );
    4296             : }
    4297             : 
    4298             : 
    4299           6 : char** wrapper_GetConfigOptions() {
    4300           6 :     char ** papszOpts = CPLGetConfigOptions();
    4301           6 :     char ** papszTLOpts = CPLGetThreadLocalConfigOptions();
    4302             : 
    4303           6 :     papszOpts = CSLMerge(papszOpts, papszTLOpts);
    4304             : 
    4305           6 :     CSLDestroy(papszTLOpts);
    4306             : 
    4307           6 :     return papszOpts;
    4308             : };
    4309             : 
    4310             : 
    4311          56 : void wrapper_VSISetCredential( const char* pszPathPrefix, const char * pszKey, const char * pszValue )
    4312             : {
    4313          56 :     VSISetPathSpecificOption(pszPathPrefix, pszKey, pszValue);
    4314          56 : }
    4315             : 
    4316           0 : const char *wrapper_VSIGetCredential( const char* pszPathPrefix, const char * pszKey, const char * pszDefault = NULL )
    4317             : {
    4318           0 :     return VSIGetPathSpecificOption( pszPathPrefix, pszKey, pszDefault );
    4319             : }
    4320             : 
    4321          10 : const char *wrapper_VSIGetPathSpecificOption( const char* pszPathPrefix, const char * pszKey, const char * pszDefault = NULL )
    4322             : {
    4323          10 :     return VSIGetPathSpecificOption( pszPathPrefix, pszKey, pszDefault );
    4324             : }
    4325             : 
    4326             : 
    4327           8 : void wrapper_VSIClearCredentials(const char * pszPathPrefix = NULL)
    4328             : {
    4329           8 :     VSIClearPathSpecificOptions( pszPathPrefix );
    4330           8 : }
    4331           9 : void wrapper_VSIClearPathSpecificOptions(const char * pszPathPrefix = NULL)
    4332             : {
    4333           9 :     VSIClearPathSpecificOptions( pszPathPrefix );
    4334           9 : }
    4335             : 
    4336             : 
    4337        3562 : VSI_RETVAL wrapper_VSIFileFromMemBuffer( const char* utf8_path, GIntBig nBytes, const char *pabyData)
    4338             : {
    4339        3562 :     const size_t nSize = static_cast<size_t>(nBytes);
    4340        3562 :     void* pabyDataDup = VSIMalloc(nSize);
    4341        3562 :     if (pabyDataDup == NULL)
    4342             :             return -1;
    4343        3562 :     memcpy(pabyDataDup, pabyData, nSize);
    4344        3562 :     VSILFILE *fp = VSIFileFromMemBuffer(utf8_path, (GByte*) pabyDataDup, nSize, TRUE);
    4345             : 
    4346        3562 :     if (fp == NULL) {
    4347           1 :         VSIFree(pabyDataDup);
    4348           1 :         return -1;
    4349             :     } else {
    4350        3561 :         VSIFCloseL(fp);
    4351        3561 :         return 0;
    4352             :     }
    4353             : }
    4354             : 
    4355             : 
    4356             : static bool
    4357      189073 : GetBufferAsCharPtrGIntBigSize( PyObject* input, GIntBig *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
    4358      189073 :   {
    4359      189073 :     if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    4360             :     {
    4361      179685 :       *viewIsValid = true;
    4362      179685 :       *nLen = view->len;
    4363      179685 :       *pBuf = (char*) view->buf;
    4364      179685 :       return true;
    4365             :     }
    4366             :     else
    4367             :     {
    4368        9388 :       PyErr_Clear();
    4369             :     }
    4370             :   }
    4371        9388 :   if (PyUnicode_Check(input))
    4372             :   {
    4373        9386 :     size_t safeLen = 0;
    4374        9386 :     int ret;
    4375        9386 :     try {
    4376        9386 :       ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
    4377             :     }
    4378           0 :     catch( const std::exception& )
    4379             :     {
    4380           0 :       PyErr_SetString(PyExc_MemoryError, "out of memory");
    4381           0 :       return false;
    4382             :     }
    4383        9386 :     if (!SWIG_IsOK(ret)) {
    4384           0 :       PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
    4385           0 :       return false;
    4386             :     }
    4387             : 
    4388        9386 :     if (safeLen) safeLen--;
    4389        9386 :     *nLen = (GIntBig)safeLen;
    4390        9386 :     return true;
    4391             :   }
    4392             :   else
    4393             :   {
    4394           2 :     PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
    4395           2 :     return false;
    4396             :   }
    4397             : }
    4398             : 
    4399             : 
    4400          10 : bool wrapper_VSIUnlinkBatch(char** files)
    4401             : {
    4402          10 :     int* success = VSIUnlinkBatch(files);
    4403          10 :     if( !success )
    4404             :         return false;
    4405          24 :     int bRet = true;
    4406          24 :     for( int i = 0; files && files[i]; i++ )
    4407             :     {
    4408          17 :         if( !success[i] ) {
    4409             :             bRet = false;
    4410             :             break;
    4411             :         }
    4412             :     }
    4413           8 :     VSIFree(success);
    4414           8 :     return bRet;
    4415             : }
    4416             : 
    4417             : 
    4418           0 : int wrapper_HasThreadSupport()
    4419             : {
    4420           0 :     return strcmp(CPLGetThreadingModel(), "stub") != 0;
    4421             : }
    4422             : 
    4423             : 
    4424           7 : VSI_RETVAL wrapper_VSIMove(const char * old_path, const char *new_path, char** options = NULL,
    4425             :                            GDALProgressFunc callback=NULL,
    4426             :                            void* callback_data=NULL)
    4427             : {
    4428           7 :     return VSIMove(old_path, new_path, options, callback, callback_data);
    4429             : }
    4430             : 
    4431             : 
    4432          42 : bool wrapper_VSISync(const char* pszSource,
    4433             :                      const char* pszTarget,
    4434             :                      char** options = NULL,
    4435             :                      GDALProgressFunc callback=NULL,
    4436             :                      void* callback_data=NULL)
    4437             : {
    4438          42 :     return VSISync( pszSource, pszTarget, options, callback, callback_data, nullptr );
    4439             : }
    4440             : 
    4441             : 
    4442          19 : int wrapper_VSICopyFile(const char* pszSource,
    4443             :                         const char* pszTarget,
    4444             :                         VSILFILE* fpSource = NULL,
    4445             :                         GIntBig nSourceSize = -1,
    4446             :                         char** options = NULL,
    4447             :                         GDALProgressFunc callback=NULL,
    4448             :                         void* callback_data=NULL)
    4449             : {
    4450          19 :     return VSICopyFile(
    4451             :         pszSource, pszTarget, fpSource,
    4452             :         nSourceSize < 0 ? static_cast<vsi_l_offset>(-1) : static_cast<vsi_l_offset>(nSourceSize),
    4453          19 :         options, callback, callback_data );
    4454             : }
    4455             : 
    4456             : 
    4457          20 : void CopyFileRestartable(const char* pszSource,
    4458             :                          const char* pszTarget,
    4459             :                          const char* pszInputPayload,
    4460             :                          int* pnRetCode,
    4461             :                          char** ppszOutputPayload,
    4462             :                          char** options = NULL,
    4463             :                          GDALProgressFunc callback=NULL,
    4464             :                          void* callback_data=NULL)
    4465             : {
    4466          20 :     *pnRetCode = VSICopyFileRestartable(pszSource, pszTarget, pszInputPayload,
    4467             :                                         ppszOutputPayload, options, callback,
    4468             :                                         callback_data);
    4469          20 : }
    4470             : 
    4471             : 
    4472             : 
    4473             : 
    4474           0 : int wrapper_MoveFile(const char* pszSource, const char* pszTarget)
    4475             : {
    4476           0 :     return CPLMoveFile(pszTarget, pszSource);
    4477             : }
    4478             : 
    4479             : 
    4480          23 : retStringAndCPLFree* wrapper_VSIGetSignedURL(const char * utf8_path, char** options = NULL )
    4481             : {
    4482          23 :     return VSIGetSignedURL( utf8_path, options );
    4483             : }
    4484             : 
    4485             : 
    4486             : typedef struct
    4487             : {
    4488             :   int     mode;
    4489             :   GIntBig size;
    4490             :   GIntBig mtime;
    4491             : } StatBuf;
    4492             : 
    4493        4763 : SWIGINTERN StatBuf *new_StatBuf(StatBuf *psStatBuf){
    4494        9526 :     StatBuf *self = (StatBuf*) CPLMalloc( sizeof( StatBuf ) );
    4495        4763 :     self->mode = psStatBuf->mode;
    4496        4763 :     self->size = psStatBuf->size;
    4497        4763 :     self->mtime = psStatBuf->mtime;
    4498        4763 :     return self;
    4499             :   }
    4500        4763 : SWIGINTERN void delete_StatBuf(StatBuf *self){
    4501        4763 :     CPLFree(self);
    4502        4763 :   }
    4503        2472 : SWIGINTERN int StatBuf_IsDirectory(StatBuf *self){
    4504        2472 :      return (self->mode & S_IFDIR) != 0;
    4505             :   }
    4506             : 
    4507        6127 : int wrapper_VSIStatL( const char * utf8_path, StatBuf *psStatBufOut, int nFlags = 0 )
    4508             : {
    4509        6127 :     VSIStatBufL sStat;
    4510        6127 :     memset(&sStat, 0, sizeof(sStat));
    4511        6127 :     memset(psStatBufOut, 0, sizeof(StatBuf));
    4512        6127 :     int nRet = VSIStatExL(utf8_path, &sStat, nFlags);
    4513        6127 :     psStatBufOut->mode = sStat.st_mode;
    4514        6127 :     psStatBufOut->size = (GIntBig)sStat.st_size;
    4515        6127 :     psStatBufOut->mtime = (GIntBig)sStat.st_mtime;
    4516        6127 :     return nRet;
    4517             : }
    4518             : 
    4519             : 
    4520        4592 : VSILFILE   *wrapper_VSIFOpenL( const char *utf8_path, const char *pszMode )
    4521             : {
    4522        4592 :     if (!pszMode) /* would lead to segfault */
    4523           0 :         pszMode = "r";
    4524        4592 :     return VSIFOpenL( utf8_path, pszMode );
    4525             : }
    4526             : 
    4527             : 
    4528         353 : VSILFILE   *wrapper_VSIFOpenExL( const char *utf8_path, const char *pszMode, int bSetError = FALSE, char** options = NULL )
    4529             : {
    4530         353 :     if (!pszMode) /* would lead to segfault */
    4531           0 :         pszMode = "r";
    4532         353 :     return VSIFOpenEx2L( utf8_path, pszMode, bSetError, options );
    4533             : }
    4534             : 
    4535             : 
    4536             : 
    4537       65875 : int wrapper_VSIFSeekL( VSILFILE* fp, GIntBig offset, int whence) {
    4538             : 
    4539             : 
    4540             : 
    4541       65875 : if (offset < 0) {
    4542           3 :     switch (whence) {
    4543           1 :         case SEEK_END: VSIFSeekL(fp, 0, SEEK_END);
    4544           2 :         case SEEK_CUR:
    4545           2 :             offset = VSIFTellL(fp) + offset;
    4546           2 :             whence = SEEK_SET;
    4547           2 :             break;
    4548           1 :         default:
    4549           1 :             VSIError(VSIE_FileError, "Cannot use negative offset with SEEK_SET");
    4550           1 :             return -1;
    4551             :     }
    4552             : }
    4553             : 
    4554       65874 : return VSIFSeekL(fp, offset, whence);
    4555             : }
    4556             : 
    4557             : 
    4558      346816 : int wrapper_VSIFWriteL( int nLen, char *pBuf, int size, int memb, VSILFILE* fp)
    4559             : {
    4560      346816 :     if (nLen < static_cast<GIntBig>(size) * memb)
    4561             :     {
    4562           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Inconsistent buffer size with 'size' and 'memb' values");
    4563           0 :         return 0;
    4564             :     }
    4565      346816 :     return static_cast<int>(VSIFWriteL(pBuf, size, memb, fp));
    4566             : }
    4567             : 
    4568             : 
    4569           7 : void MultipartUploadGetCapabilities(
    4570             :     const char *pszFilename, int* pnRetCode, int *pbNonSequentialUploadSupported,
    4571             :     int *pbParallelUploadSupported, int *pbSupportsAbort, size_t *pnMinPartSize,
    4572             :     size_t *pnMaxPartSize, int *pnMaxPartCount)
    4573             : {
    4574           7 :     *pnRetCode = VSIMultipartUploadGetCapabilities(pszFilename,
    4575             :                         pbNonSequentialUploadSupported,
    4576             :                         pbParallelUploadSupported,
    4577             :                         pbSupportsAbort,
    4578             :                         pnMinPartSize,
    4579             :                         pnMaxPartSize,
    4580             :                         pnMaxPartCount);
    4581           7 : }
    4582             : 
    4583             : 
    4584           4 : retStringAndCPLFree* MultipartUploadStart(const char *pszFilename, char** options = NULL)
    4585             : {
    4586           4 :     return VSIMultipartUploadStart(pszFilename, options);
    4587             : }
    4588             : 
    4589             : 
    4590           5 : retStringAndCPLFree* MultipartUploadAddPart(const char *pszFilename,
    4591             :                              const char *pszUploadId,
    4592             :                              int nPartNumber,
    4593             :                              GUIntBig nFileOffset,
    4594             :                              size_t nDataLength, const char *pData,
    4595             :                              char** options = NULL)
    4596             : {
    4597           5 :     return VSIMultipartUploadAddPart(pszFilename, pszUploadId,
    4598             :                                      nPartNumber, nFileOffset,
    4599             :                                      pData, nDataLength,
    4600           5 :                                      options);
    4601             : }
    4602             : 
    4603             : 
    4604             : static bool
    4605           7 : GetBufferAsCharPtrSizetSize( PyObject* input, size_t *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
    4606           7 :   {
    4607           7 :     if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    4608             :     {
    4609           7 :       *viewIsValid = true;
    4610           7 :       *nLen = view->len;
    4611           7 :       *pBuf = (char*) view->buf;
    4612           7 :       return true;
    4613             :     }
    4614             :     else
    4615             :     {
    4616           0 :       PyErr_Clear();
    4617             :     }
    4618             :   }
    4619           0 :   if (PyUnicode_Check(input))
    4620             :   {
    4621           0 :     size_t safeLen = 0;
    4622           0 :     int ret;
    4623           0 :     try {
    4624           0 :       ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
    4625             :     }
    4626           0 :     catch( const std::exception& )
    4627             :     {
    4628           0 :       PyErr_SetString(PyExc_MemoryError, "out of memory");
    4629           0 :       return false;
    4630             :     }
    4631           0 :     if (!SWIG_IsOK(ret)) {
    4632           0 :       PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
    4633           0 :       return false;
    4634             :     }
    4635             : 
    4636           0 :     if (safeLen) safeLen--;
    4637           0 :     *nLen = safeLen;
    4638           0 :     return true;
    4639             :   }
    4640             :   else
    4641             :   {
    4642           0 :     PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
    4643           0 :     return false;
    4644             :   }
    4645             : }
    4646             : 
    4647             : 
    4648             : #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
    4649             : #  define SWIG_LONG_LONG_AVAILABLE
    4650             : #endif
    4651             : 
    4652             : 
    4653             : #ifdef SWIG_LONG_LONG_AVAILABLE
    4654             : SWIGINTERN int
    4655             : SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
    4656             : {
    4657             :   int res = SWIG_TypeError;
    4658             :   if (PyLong_Check(obj)) {
    4659             :     unsigned long long v = PyLong_AsUnsignedLongLong(obj);
    4660             :     if (!PyErr_Occurred()) {
    4661             :       if (val) *val = v;
    4662             :       return SWIG_OK;
    4663             :     } else {
    4664             :       PyErr_Clear();
    4665             :       res = SWIG_OverflowError;
    4666             :     }
    4667             :   } else {
    4668             :     unsigned long v;
    4669             :     res = SWIG_AsVal_unsigned_SS_long (obj,&v);
    4670             :     if (SWIG_IsOK(res)) {
    4671             :       if (val) *val = v;
    4672             :       return res;
    4673             :     }
    4674             :   }
    4675             : #ifdef SWIG_PYTHON_CAST_MODE
    4676             :   {
    4677             :     const double mant_max = 1LL << DBL_MANT_DIG;
    4678             :     double d;
    4679             :     res = SWIG_AsVal_double (obj,&d);
    4680             :     if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
    4681             :       return SWIG_OverflowError;
    4682             :     if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
    4683             :       if (val) *val = (unsigned long long)(d);
    4684             :       return SWIG_AddCast(res);
    4685             :     }
    4686             :     res = SWIG_TypeError;
    4687             :   }
    4688             : #endif
    4689             :   return res;
    4690             : }
    4691             : #endif
    4692             : 
    4693             : 
    4694             : SWIGINTERNINLINE int
    4695         210 : SWIG_AsVal_size_t (PyObject * obj, size_t *val)
    4696             : {
    4697         210 :   int res = SWIG_TypeError;
    4698             : #ifdef SWIG_LONG_LONG_AVAILABLE
    4699         210 :   if (sizeof(size_t) <= sizeof(unsigned long)) {
    4700             : #endif
    4701         210 :     unsigned long v;
    4702         420 :     res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
    4703         210 :     if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
    4704             : #ifdef SWIG_LONG_LONG_AVAILABLE
    4705             :   } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
    4706             :     unsigned long long v;
    4707             :     res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
    4708             :     if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
    4709             :   }
    4710             : #endif
    4711         210 :   return res;
    4712             : }
    4713             : 
    4714             : 
    4715           5 : bool MultipartUploadEnd(const char *pszFilename,
    4716             :                         const char *pszUploadId,
    4717             :                         char** partIds,
    4718             :                         GUIntBig nTotalSize,
    4719             :                         char** options = NULL)
    4720             : 
    4721             : {
    4722           5 :     return VSIMultipartUploadEnd(pszFilename, pszUploadId,
    4723           5 :                                  CSLCount(partIds), partIds,
    4724             :                                  nTotalSize,
    4725           5 :                                  options);
    4726             : }
    4727             : 
    4728             : 
    4729           6 : bool MultipartUploadAbort(const char *pszFilename,
    4730             :                           const char *pszUploadId,
    4731             :                           char** options = NULL)
    4732             : {
    4733           6 :     return VSIMultipartUploadAbort(pszFilename, pszUploadId, options);
    4734             : }
    4735             : 
    4736        2479 : SWIGINTERN char const *GDALMajorObjectShadow_GetDescription(GDALMajorObjectShadow *self){
    4737        2479 :     return GDALGetDescription( self );
    4738             :   }
    4739          41 : SWIGINTERN void GDALMajorObjectShadow_SetDescription(GDALMajorObjectShadow *self,char const *pszNewDesc){
    4740          41 :     GDALSetDescription( self, pszNewDesc );
    4741          41 :   }
    4742          72 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadataDomainList(GDALMajorObjectShadow *self){
    4743          72 :     return GDALGetMetadataDomainList( self );
    4744             :   }
    4745        6882 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_Dict(GDALMajorObjectShadow *self,char const *pszDomain=""){
    4746        6882 :     return GDALGetMetadata( self, pszDomain );
    4747             :   }
    4748         408 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_List(GDALMajorObjectShadow *self,char const *pszDomain=""){
    4749         408 :     return GDALGetMetadata( self, pszDomain );
    4750             :   }
    4751             : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_0(GDALMajorObjectShadow *self,char **papszMetadata,char const *pszDomain=""){
    4752             :     return GDALSetMetadata( self, papszMetadata, pszDomain );
    4753             :   }
    4754             : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_1(GDALMajorObjectShadow *self,char *pszMetadataString,char const *pszDomain=""){
    4755             :     char *tmpList[2];
    4756             :     tmpList[0] = pszMetadataString;
    4757             :     tmpList[1] = 0;
    4758             :     return GDALSetMetadata( self, tmpList, pszDomain );
    4759             :   }
    4760       55946 : SWIGINTERN char const *GDALMajorObjectShadow_GetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszDomain=""){
    4761       55946 :     return GDALGetMetadataItem( self, pszName, pszDomain);
    4762             :   }
    4763         474 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszValue,char const *pszDomain=""){
    4764         474 :     return GDALSetMetadataItem( self, pszName, pszValue, pszDomain);
    4765             :   }
    4766       16346 : SWIGINTERN GDALDatasetShadow *GDALDriverShadow_Create(GDALDriverShadow *self,char const *utf8_path,int xsize,int ysize,int bands=1,GDALDataType eType=GDT_Byte,char **options=0){
    4767             : 
    4768       32692 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate(    self,
    4769             :                                                                 utf8_path,
    4770             :                                                                 xsize,
    4771             :                                                                 ysize,
    4772             :                                                                 bands,
    4773             :                                                                 eType,
    4774             :                                                                 options );
    4775       16346 :     return ds;
    4776             :   }
    4777          53 : SWIGINTERN GDALDatasetShadow *GDALDriverShadow_CreateVector(GDALDriverShadow *self,char const *utf8_path,char **options=0){
    4778         106 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate(self, utf8_path, 0, 0, 0, GDT_Unknown, options);
    4779          53 :     return ds;
    4780             :   }
    4781         419 : SWIGINTERN GDALDatasetShadow *GDALDriverShadow_CreateMultiDimensional(GDALDriverShadow *self,char const *utf8_path,char **root_group_options=0,char **options=0){
    4782             : 
    4783         838 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreateMultiDimensional(    self,
    4784             :                                                                 utf8_path,
    4785             :                                                                 root_group_options,
    4786             :                                                                 options );
    4787         419 :     return ds;
    4788             :   }
    4789        3827 : 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){
    4790             : 
    4791        7654 :     GDALDatasetShadow *ds = (GDALDatasetShadow*) GDALCreateCopy(    self,
    4792             :                                                                     utf8_path,
    4793             :                                                                     src,
    4794             :                                                                     strict,
    4795             :                                                                     options,
    4796             :                                                                     callback,
    4797             :                                                                     callback_data );
    4798        3827 :     return ds;
    4799             :   }
    4800        2465 : SWIGINTERN CPLErr GDALDriverShadow_Delete(GDALDriverShadow *self,char const *utf8_path){
    4801        2465 :     return GDALDeleteDataset( self, utf8_path );
    4802             :   }
    4803         173 : SWIGINTERN CPLErr GDALDriverShadow_Rename(GDALDriverShadow *self,char const *newName,char const *oldName){
    4804         173 :     return GDALRenameDataset( self, newName, oldName );
    4805             :   }
    4806           3 : SWIGINTERN CPLErr GDALDriverShadow_CopyFiles(GDALDriverShadow *self,char const *newName,char const *oldName){
    4807           3 :     return GDALCopyDatasetFiles( self, newName, oldName );
    4808             :   }
    4809           2 : SWIGINTERN bool GDALDriverShadow_HasOpenOption(GDALDriverShadow *self,char const *openOptionName){
    4810           2 :     return GDALDriverHasOpenOption( self, openOptionName );
    4811             :   }
    4812           6 : SWIGINTERN bool GDALDriverShadow_TestCapability(GDALDriverShadow *self,char const *cap){
    4813             :     // TODO: should this also check DCAP entries in driver metadata?
    4814          12 :     return (OGR_Dr_TestCapability(self, cap) > 0);
    4815             :   }
    4816          92 : SWIGINTERN int GDALDriverShadow_Register(GDALDriverShadow *self){
    4817          92 :     return GDALRegisterDriver( self );
    4818             :   }
    4819          92 : SWIGINTERN void GDALDriverShadow_Deregister(GDALDriverShadow *self){
    4820          92 :     GDALDeregisterDriver( self );
    4821          92 :   }
    4822             : 
    4823       96564 : char const *GDALDriverShadow_ShortName_get( GDALDriverShadow *h ) {
    4824       96564 :   return GDALGetDriverShortName( h );
    4825             : }
    4826          17 : char const *GDALDriverShadow_LongName_get( GDALDriverShadow *h ) {
    4827          17 :   return GDALGetDriverLongName( h );
    4828             : }
    4829           0 : char const *GDALDriverShadow_HelpTopic_get( GDALDriverShadow *h ) {
    4830           0 :   return GDALGetDriverHelpTopic( h );
    4831             : }
    4832             : 
    4833             : 
    4834             : SWIGINTERN int
    4835           0 : SWIG_AsVal_short (PyObject * obj, short *val)
    4836             : {
    4837           0 :   long v;
    4838           0 :   int res = SWIG_AsVal_long (obj, &v);
    4839           0 :   if (SWIG_IsOK(res)) {
    4840           0 :     if ((v < SHRT_MIN || v > SHRT_MAX)) {
    4841             :       return SWIG_OverflowError;
    4842             :     } else {
    4843           0 :       if (val) *val = static_cast< short >(v);
    4844             :     }
    4845             :   }  
    4846             :   return res;
    4847             : }
    4848             : 
    4849             : 
    4850             :   #define SWIG_From_long   PyInt_FromLong 
    4851             : 
    4852             : 
    4853             : SWIGINTERNINLINE PyObject *
    4854           0 : SWIG_From_short  (short value)
    4855             : {    
    4856           0 :   return SWIG_From_long  (value);
    4857             : }
    4858             : 
    4859             : 
    4860             :   #define SWIG_From_double   PyFloat_FromDouble 
    4861             : 
    4862        3432 : 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=""){
    4863             : 
    4864        3432 :     GDAL_GCP *self = (GDAL_GCP*) CPLMalloc( sizeof( GDAL_GCP ) );
    4865        3432 :     self->dfGCPX = x;
    4866        3432 :     self->dfGCPY = y;
    4867        3432 :     self->dfGCPZ = z;
    4868        3432 :     self->dfGCPPixel = pixel;
    4869        3432 :     self->dfGCPLine = line;
    4870        3432 :     self->pszInfo =  CPLStrdup( (info == 0) ? "" : info );
    4871        3432 :     self->pszId = CPLStrdup( (id==0)? "" : id );
    4872        3432 :     return self;
    4873             :   }
    4874        3432 : SWIGINTERN void delete_GDAL_GCP(GDAL_GCP *self){
    4875        3432 :     if ( self->pszInfo )
    4876        3432 :       CPLFree( self->pszInfo );
    4877        3432 :     if ( self->pszId )
    4878        3432 :       CPLFree( self->pszId );
    4879        3432 :     CPLFree( self );
    4880        3432 :   }
    4881             : 
    4882             : 
    4883        2205 : double GDAL_GCP_GCPX_get( GDAL_GCP *gcp ) {
    4884        2205 :   return gcp->dfGCPX;
    4885             : }
    4886          92 : void GDAL_GCP_GCPX_set( GDAL_GCP *gcp, double dfGCPX ) {
    4887          92 :   gcp->dfGCPX = dfGCPX;
    4888          92 : }
    4889        2205 : double GDAL_GCP_GCPY_get( GDAL_GCP *gcp ) {
    4890        2205 :   return gcp->dfGCPY;
    4891             : }
    4892          92 : void GDAL_GCP_GCPY_set( GDAL_GCP *gcp, double dfGCPY ) {
    4893          92 :   gcp->dfGCPY = dfGCPY;
    4894          92 : }
    4895          42 : double GDAL_GCP_GCPZ_get( GDAL_GCP *gcp ) {
    4896          42 :   return gcp->dfGCPZ;
    4897             : }
    4898           0 : void GDAL_GCP_GCPZ_set( GDAL_GCP *gcp, double dfGCPZ ) {
    4899           0 :   gcp->dfGCPZ = dfGCPZ;
    4900           0 : }
    4901        8554 : double GDAL_GCP_GCPPixel_get( GDAL_GCP *gcp ) {
    4902        8554 :   return gcp->dfGCPPixel;
    4903             : }
    4904         100 : void GDAL_GCP_GCPPixel_set( GDAL_GCP *gcp, double dfGCPPixel ) {
    4905         100 :   gcp->dfGCPPixel = dfGCPPixel;
    4906         100 : }
    4907        8554 : double GDAL_GCP_GCPLine_get( GDAL_GCP *gcp ) {
    4908        8554 :   return gcp->dfGCPLine;
    4909             : }
    4910         100 : void GDAL_GCP_GCPLine_set( GDAL_GCP *gcp, double dfGCPLine ) {
    4911         100 :   gcp->dfGCPLine = dfGCPLine;
    4912         100 : }
    4913           9 : const char * GDAL_GCP_Info_get( GDAL_GCP *gcp ) {
    4914           9 :   return gcp->pszInfo;
    4915             : }
    4916           1 : void GDAL_GCP_Info_set( GDAL_GCP *gcp, const char * pszInfo ) {
    4917           1 :   if ( gcp->pszInfo )
    4918           1 :     CPLFree( gcp->pszInfo );
    4919           1 :   gcp->pszInfo = CPLStrdup(pszInfo);
    4920           1 : }
    4921           9 : const char * GDAL_GCP_Id_get( GDAL_GCP *gcp ) {
    4922           9 :   return gcp->pszId;
    4923             : }
    4924           1 : void GDAL_GCP_Id_set( GDAL_GCP *gcp, const char * pszId ) {
    4925           1 :   if ( gcp->pszId )
    4926           1 :     CPLFree( gcp->pszId );
    4927           1 :   gcp->pszId = CPLStrdup(pszId);
    4928           1 : }
    4929             : 
    4930             : 
    4931             : static PyObject *
    4932       13915 : CreateTupleFromDoubleArray( const double *first, size_t size ) {
    4933       13915 :   PyObject *out = PyTuple_New( size );
    4934       65810 :   for( unsigned int i=0; i<size; i++ ) {
    4935       51895 :     PyObject *val = PyFloat_FromDouble( *first );
    4936       51895 :     ++first;
    4937       51895 :     PyTuple_SetItem( out, i, val );
    4938             :   }
    4939       13915 :   return out;
    4940             : }
    4941             : 
    4942             : 
    4943             : #include "gdal.h"
    4944             : 
    4945             : typedef struct
    4946             : {
    4947             :     CPLVirtualMem *vmem;
    4948             :     int            bAuto;
    4949             :     GDALDataType   eBufType;
    4950             :     int            bIsBandSequential;
    4951             :     int            bReadOnly;
    4952             :     int            nBufXSize;
    4953             :     int            nBufYSize;
    4954             :     int            nBandCount;
    4955             :     GDALTileOrganization eTileOrganization;
    4956             :     int                  nTileXSize;
    4957             :     int                  nTileYSize;
    4958             :     int            nPixelSpace; /* if bAuto == TRUE */
    4959             :     GIntBig        nLineSpace; /* if bAuto == TRUE */
    4960             : } CPLVirtualMemShadow;
    4961             : 
    4962             : 
    4963           0 : SWIGINTERN void delete_CPLVirtualMemShadow(CPLVirtualMemShadow *self){
    4964           0 :         CPLVirtualMemFree( self->vmem );
    4965           0 :         free(self);
    4966             :     }
    4967           0 : SWIGINTERN void CPLVirtualMemShadow_GetAddr(CPLVirtualMemShadow *self,void **pptr,size_t *pnsize,GDALDataType *pdatatype,int *preadonly){
    4968           0 :         *pptr = CPLVirtualMemGetAddr( self->vmem );
    4969           0 :         *pnsize = CPLVirtualMemGetSize( self->vmem );
    4970           0 :         *pdatatype = self->eBufType;
    4971           0 :         *preadonly = self->bReadOnly;
    4972             :     }
    4973             : SWIGINTERN void CPLVirtualMemShadow_Pin(CPLVirtualMemShadow *self,size_t start_offset=0,size_t nsize=0,int bWriteOp=0){
    4974             :         if( nsize == 0 || start_offset + nsize >= CPLVirtualMemGetSize( self->vmem ) )
    4975             :             nsize = CPLVirtualMemGetSize( self->vmem ) - start_offset;
    4976             :         char* start_addr = (char*)CPLVirtualMemGetAddr( self->vmem ) + start_offset;
    4977             :         CPLVirtualMemPin(self->vmem, start_addr, nsize, bWriteOp);
    4978             :     }
    4979             : 
    4980             : /* Returned size is in bytes or 0 if an error occurred. */
    4981             : static
    4982      352613 : GIntBig ComputeDatasetRasterIOSize (int buf_xsize, int buf_ysize, int nPixelSize,
    4983             :                                 int nBands, int* bandMap, int nBandMapArrayLength,
    4984             :                                 GIntBig nPixelSpace, GIntBig nLineSpace, GIntBig nBandSpace,
    4985             :                                 int bSpacingShouldBeMultipleOfPixelSize )
    4986             : {
    4987      352613 :     if (buf_xsize <= 0 || buf_ysize <= 0)
    4988             :     {
    4989           2 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for buffer size");
    4990           2 :         return 0;
    4991             :     }
    4992             : 
    4993      352611 :     if (nPixelSpace < 0 || nLineSpace < 0 || nBandSpace < 0)
    4994             :     {
    4995           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for space arguments");
    4996           0 :         return 0;
    4997             :     }
    4998             : 
    4999      352611 :     if (nPixelSize == 0)
    5000             :     {
    5001           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    5002           1 :         return 0;
    5003             :     }
    5004             : 
    5005      352610 :     if( nPixelSpace == 0 )
    5006      351505 :         nPixelSpace = nPixelSize;
    5007        1105 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nPixelSpace % nPixelSize) != 0 )
    5008             :     {
    5009           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nPixelSpace should be a multiple of nPixelSize");
    5010           0 :         return 0;
    5011             :     }
    5012             : 
    5013      352610 :     if( nLineSpace == 0 )
    5014             :     {
    5015      352571 :         nLineSpace = nPixelSpace * buf_xsize;
    5016             :     }
    5017          39 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nLineSpace % nPixelSize) != 0 )
    5018             :     {
    5019           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    5020           0 :         return 0;
    5021             :     }
    5022             : 
    5023      352610 :     if( nBandSpace == 0 )
    5024             :     {
    5025      351509 :         nBandSpace = nLineSpace * buf_ysize;
    5026             :     }
    5027        1101 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nBandSpace % nPixelSize) != 0 )
    5028             :     {
    5029           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    5030           0 :         return 0;
    5031             :     }
    5032             : 
    5033      352610 :     if (nBands <= 0 || (bandMap != NULL && nBands > nBandMapArrayLength))
    5034             :     {
    5035           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Invalid band count");
    5036           0 :         return 0;
    5037             :     }
    5038             : 
    5039      352610 :     GIntBig nRet = (GIntBig)(buf_ysize - 1) * nLineSpace + (GIntBig)(buf_xsize - 1) * nPixelSpace + (GIntBig)(nBands - 1) * nBandSpace + nPixelSize;
    5040             : #if SIZEOF_VOIDP == 4
    5041             :     if (nRet > INT_MAX)
    5042             :     {
    5043             :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    5044             :         return 0;
    5045             :     }
    5046             : #endif
    5047             : 
    5048      352610 :     return nRet;
    5049             : }
    5050             : 
    5051             : 
    5052             : typedef struct
    5053             : {
    5054             :     GDALAsyncReaderH  hAsyncReader;
    5055             :     void             *pyObject;
    5056             : } GDALAsyncReaderWrapper;
    5057             : 
    5058             : typedef void* GDALAsyncReaderWrapperH;
    5059             : 
    5060           3 : static GDALAsyncReaderH AsyncReaderWrapperGetReader(GDALAsyncReaderWrapperH hWrapper)
    5061             : {
    5062           3 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    5063           3 :     if (psWrapper->hAsyncReader == NULL)
    5064             :     {
    5065           0 :         CPLError(CE_Failure, CPLE_AppDefined, "AsyncReader object is defunct");
    5066             :     }
    5067           3 :     return psWrapper->hAsyncReader;
    5068             : }
    5069             : 
    5070             : #if defined(SWIGPYTHON)
    5071           1 : static void* AsyncReaderWrapperGetPyObject(GDALAsyncReaderWrapperH hWrapper)
    5072             : {
    5073           1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    5074           1 :     return psWrapper->pyObject;
    5075             : }
    5076             : #endif
    5077             : 
    5078           1 : static void DeleteAsyncReaderWrapper(GDALAsyncReaderWrapperH hWrapper)
    5079             : {
    5080           1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    5081           1 :     if (psWrapper->hAsyncReader != NULL)
    5082             :     {
    5083           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    5084             :                  "Native AsyncReader object will leak. EndAsyncReader() should have been called before");
    5085             :     }
    5086           1 :     CPLFree(psWrapper);
    5087           1 : }
    5088             : 
    5089             : 
    5090             : 
    5091             : 
    5092           1 : static GDALAsyncReaderWrapper* CreateAsyncReaderWrapper(GDALAsyncReaderH  hAsyncReader,
    5093             :                                                         void             *pyObject)
    5094             : {
    5095           2 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper* )CPLMalloc(sizeof(GDALAsyncReaderWrapper));
    5096           1 :     psWrapper->hAsyncReader = hAsyncReader;
    5097           1 :     psWrapper->pyObject = pyObject;
    5098           1 :     Py_INCREF((PyObject*) psWrapper->pyObject);
    5099           1 :     return psWrapper;
    5100             : }
    5101             : 
    5102           1 : static void DisableAsyncReaderWrapper(GDALAsyncReaderWrapperH hWrapper)
    5103             : {
    5104           1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    5105           1 :     if (psWrapper->pyObject)
    5106             :     {
    5107           1 :         Py_XDECREF((PyObject*) psWrapper->pyObject);
    5108             :     }
    5109           1 :     psWrapper->pyObject = NULL;
    5110           1 :     psWrapper->hAsyncReader = NULL;
    5111           1 : }
    5112             : 
    5113           1 : SWIGINTERN void delete_GDALAsyncReaderShadow(GDALAsyncReaderShadow *self){
    5114           1 :         DeleteAsyncReaderWrapper(self);
    5115           1 :     }
    5116           1 : SWIGINTERN GDALAsyncStatusType GDALAsyncReaderShadow_GetNextUpdatedRegion(GDALAsyncReaderShadow *self,double timeout,int *xoff,int *yoff,int *buf_xsize,int *buf_ysize){
    5117           1 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    5118           1 :         if (hReader == NULL)
    5119             :         {
    5120           0 :             *xoff = 0;
    5121           0 :             *yoff = 0;
    5122           0 :             *buf_xsize = 0;
    5123           0 :             *buf_ysize = 0;
    5124           0 :             return GARIO_ERROR;
    5125             :         }
    5126           1 :         return GDALARGetNextUpdatedRegion(hReader, timeout, xoff, yoff, buf_xsize, buf_ysize );
    5127             :     }
    5128           1 : SWIGINTERN void GDALAsyncReaderShadow_GetBuffer(GDALAsyncReaderShadow *self,void **ppRetPyObject){
    5129           1 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    5130           1 :         if (hReader == NULL)
    5131             :         {
    5132           0 :             *ppRetPyObject = NULL;
    5133           0 :             return;
    5134             :         }
    5135           1 :         *ppRetPyObject = AsyncReaderWrapperGetPyObject(self);
    5136           1 :         Py_INCREF((PyObject*)*ppRetPyObject);
    5137             :     }
    5138           0 : SWIGINTERN int GDALAsyncReaderShadow_LockBuffer(GDALAsyncReaderShadow *self,double timeout){
    5139           0 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    5140           0 :         if (hReader == NULL)
    5141             :         {
    5142             :             return 0;
    5143             :         }
    5144           0 :         return GDALARLockBuffer(hReader,timeout);
    5145             :     }
    5146           0 : SWIGINTERN void GDALAsyncReaderShadow_UnlockBuffer(GDALAsyncReaderShadow *self){
    5147           0 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    5148           0 :         if (hReader == NULL)
    5149             :         {
    5150             :             return;
    5151             :         }
    5152           0 :         GDALARUnlockBuffer(hReader);
    5153             :     }
    5154       54424 : SWIGINTERN void delete_GDALDatasetShadow(GDALDatasetShadow *self){
    5155       54424 :     if ( GDALDereferenceDataset( self ) <= 0 ) {
    5156       47755 :       if( GDALClose(self) != CE_None )
    5157             :       {
    5158           5 :           if( CPLGetLastErrorType() == CE_None )
    5159           1 :               CPLError(CE_Failure, CPLE_AppDefined, "Error occurred in GDALClose()");
    5160             :       }
    5161             :     }
    5162       54424 :   }
    5163        3515 : SWIGINTERN CPLErr GDALDatasetShadow_Close(GDALDatasetShadow *self){
    5164        3515 :      return GDALClose(self);
    5165             :   }
    5166        1321 : SWIGINTERN GDALDriverShadow *GDALDatasetShadow_GetDriver(GDALDatasetShadow *self){
    5167        1321 :     return (GDALDriverShadow*) GDALGetDatasetDriver( self );
    5168             :   }
    5169      259422 : SWIGINTERN GDALRasterBandShadow *GDALDatasetShadow_GetRasterBand(GDALDatasetShadow *self,int nBand){
    5170      259422 :     return (GDALRasterBandShadow*) GDALGetRasterBand( self, nBand );
    5171             :   }
    5172           5 : SWIGINTERN bool GDALDatasetShadow_IsThreadSafe(GDALDatasetShadow *self,int nScopeFlags){
    5173           5 :       return GDALDatasetIsThreadSafe(self, nScopeFlags, nullptr);
    5174             :   }
    5175           8 : SWIGINTERN GDALDatasetShadow *GDALDatasetShadow_GetThreadSafeDataset(GDALDatasetShadow *self,int nScopeFlags){
    5176           8 :       return GDALGetThreadSafeDataset(self, nScopeFlags, nullptr);
    5177             :   }
    5178        1172 : SWIGINTERN GDALGroupHS *GDALDatasetShadow_GetRootGroup(GDALDatasetShadow *self){
    5179        1172 :     return GDALDatasetGetRootGroup(self);
    5180             :   }
    5181         447 : SWIGINTERN char const *GDALDatasetShadow_GetProjection(GDALDatasetShadow *self){
    5182         447 :     return GDALGetProjectionRef( self );
    5183             :   }
    5184         863 : SWIGINTERN char const *GDALDatasetShadow_GetProjectionRef(GDALDatasetShadow *self){
    5185         863 :     return GDALGetProjectionRef( self );
    5186             :   }
    5187          14 : SWIGINTERN int GDALDatasetShadow_GetRefCount(GDALDatasetShadow *self){
    5188          14 :     return OGR_DS_GetRefCount(self);
    5189             :   }
    5190           0 : SWIGINTERN int GDALDatasetShadow_GetSummaryRefCount(GDALDatasetShadow *self){
    5191           0 :     return OGR_DS_GetSummaryRefCount(self);
    5192             :   }
    5193        1206 : SWIGINTERN OSRSpatialReferenceShadow *GDALDatasetShadow_GetSpatialRef(GDALDatasetShadow *self){
    5194        1206 :     OGRSpatialReferenceH ref = GDALGetSpatialRef(self);
    5195        1206 :     if( ref )
    5196         791 :        ref = OSRClone( ref );
    5197        1206 :     return (OSRSpatialReferenceShadow*) ref;
    5198             :   }
    5199        1623 : SWIGINTERN CPLErr GDALDatasetShadow_SetProjection(GDALDatasetShadow *self,char const *prj){
    5200        1623 :     return GDALSetProjection( self, prj );
    5201             :   }
    5202         270 : SWIGINTERN CPLErr GDALDatasetShadow_SetSpatialRef(GDALDatasetShadow *self,OSRSpatialReferenceShadow *srs){
    5203         270 :      return GDALSetSpatialRef( self, (OGRSpatialReferenceH)srs );
    5204             :   }
    5205        3910 : SWIGINTERN void GDALDatasetShadow_GetGeoTransform(GDALDatasetShadow *self,double argout[6],int *isvalid,int *can_return_null=0){
    5206        3910 :     if (can_return_null && *can_return_null)
    5207             :     {
    5208         403 :         *isvalid = (GDALGetGeoTransform( self, argout ) == CE_None );
    5209             :     }
    5210             :     else
    5211             :     {
    5212        3507 :         *isvalid = TRUE;
    5213        3507 :         if ( GDALGetGeoTransform( self, argout ) != CE_None ) {
    5214          82 :             argout[0] = 0.0;
    5215          82 :             argout[1] = 1.0;
    5216          82 :             argout[2] = 0.0;
    5217          82 :             argout[3] = 0.0;
    5218          82 :             argout[4] = 0.0;
    5219          82 :             argout[5] = 1.0;
    5220             :         }
    5221             :     }
    5222        3910 :   }
    5223        2839 : SWIGINTERN CPLErr GDALDatasetShadow_SetGeoTransform(GDALDatasetShadow *self,double argin[6]){
    5224        2839 :     return GDALSetGeoTransform( self, argin );
    5225             :   }
    5226             : 
    5227             : static int*
    5228      353443 : CreateCIntListFromSequence( PyObject* pySeq, int* pnSize ) {
    5229             :   /* check if is List */
    5230      353443 :   if ( !PySequence_Check(pySeq) ) {
    5231           1 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    5232           1 :     *pnSize = -1;
    5233           1 :     return NULL;
    5234             :   }
    5235      353442 :   Py_ssize_t size = PySequence_Size(pySeq);
    5236      353442 :   if( size > (Py_ssize_t)INT_MAX ) {
    5237           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    5238           0 :     *pnSize = -1;
    5239           0 :     return NULL;
    5240             :   }
    5241      353442 :   if( (size_t)size > SIZE_MAX / sizeof(int) ) {
    5242           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    5243           0 :     *pnSize = -1;
    5244           0 :     return NULL;
    5245             :   }
    5246      353442 :   *pnSize = (int)size;
    5247      353442 :   int* ret = (int*) malloc((*pnSize)*sizeof(int));
    5248      353442 :   if( !ret ) {
    5249           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    5250           0 :     *pnSize = -1;
    5251           0 :     return NULL;
    5252             :   }
    5253      797004 :   for( int i = 0; i<*pnSize; i++ ) {
    5254      443563 :     PyObject *o = PySequence_GetItem(pySeq,i);
    5255      443563 :     if ( !PyArg_Parse(o,"i",&ret[i]) ) {
    5256           1 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    5257           1 :         Py_DECREF(o);
    5258           1 :         free(ret);
    5259           1 :         *pnSize = -1;
    5260           1 :         return NULL;
    5261             :     }
    5262      443562 :     Py_DECREF(o);
    5263             :   }
    5264             :   return ret;
    5265             : }
    5266             : 
    5267         670 : 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){
    5268             : 
    5269         670 :     return GDALBuildOverviewsEx(  self,
    5270             :                                 resampling ? resampling : "NEAREST",
    5271             :                                 overviewlist,
    5272             :                                 pOverviews,
    5273             :                                 0,
    5274             :                                 0,
    5275             :                                 callback,
    5276             :                                 callback_data,
    5277         670 :                                 options);
    5278             :   }
    5279         118 : SWIGINTERN int GDALDatasetShadow_GetGCPCount(GDALDatasetShadow *self){
    5280         118 :     return GDALGetGCPCount( self );
    5281             :   }
    5282         455 : SWIGINTERN char const *GDALDatasetShadow_GetGCPProjection(GDALDatasetShadow *self){
    5283         455 :     return GDALGetGCPProjection( self );
    5284             :   }
    5285         426 : SWIGINTERN OSRSpatialReferenceShadow *GDALDatasetShadow_GetGCPSpatialRef(GDALDatasetShadow *self){
    5286         426 :     OGRSpatialReferenceH ref = GDALGetGCPSpatialRef(self);
    5287         426 :     if( ref )
    5288         217 :        ref = OSRClone( ref );
    5289         426 :     return (OSRSpatialReferenceShadow*) ref;
    5290             :   }
    5291         530 : SWIGINTERN void GDALDatasetShadow_GetGCPs(GDALDatasetShadow *self,int *nGCPs,GDAL_GCP const **pGCPs){
    5292        1060 :     *nGCPs = GDALGetGCPCount( self );
    5293         530 :     *pGCPs = GDALGetGCPs( self );
    5294             :   }
    5295          29 : SWIGINTERN CPLErr GDALDatasetShadow_SetGCPs(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,char const *pszGCPProjection){
    5296          29 :     return GDALSetGCPs( self, nGCPs, pGCPs, pszGCPProjection );
    5297             :   }
    5298           9 : SWIGINTERN CPLErr GDALDatasetShadow_SetGCPs2(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,OSRSpatialReferenceShadow *hSRS){
    5299           9 :     return GDALSetGCPs2( self, nGCPs, pGCPs, (OGRSpatialReferenceH)hSRS );
    5300             :   }
    5301        1622 : SWIGINTERN CPLErr GDALDatasetShadow_FlushCache(GDALDatasetShadow *self){
    5302        1622 :     return GDALFlushCache( self );
    5303             :   }
    5304          29 : SWIGINTERN CPLErr GDALDatasetShadow_AddBand(GDALDatasetShadow *self,GDALDataType datatype=GDT_Byte,char **options=0){
    5305          29 :     return GDALAddBand( self, datatype, options );
    5306             :   }
    5307          54 : SWIGINTERN CPLErr GDALDatasetShadow_CreateMaskBand(GDALDatasetShadow *self,int nFlags){
    5308          54 :       return GDALCreateDatasetMaskBand( self, nFlags );
    5309             :   }
    5310         455 : SWIGINTERN char **GDALDatasetShadow_GetFileList(GDALDatasetShadow *self){
    5311         455 :     return GDALGetFileList( self );
    5312             :   }
    5313      176156 : 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){
    5314      176156 :     CPLErr eErr;
    5315      176156 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    5316      176156 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    5317      176156 :     GDALDataType ntype;
    5318      176156 :     if ( buf_type != 0 ) {
    5319      176156 :       ntype = (GDALDataType) *buf_type;
    5320             :     } else {
    5321           0 :       int lastband = GDALGetRasterCount( self );
    5322           0 :       if (lastband <= 0)
    5323             :         return CE_Failure;
    5324           0 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    5325             :     }
    5326             : 
    5327      176156 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    5328      176156 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    5329      176156 :     GIntBig band_space = (buf_band_space == 0) ? 0 : *buf_band_space;
    5330             : 
    5331      176156 :     GIntBig min_buffer_size =
    5332      176156 :       ComputeDatasetRasterIOSize (nxsize, nysize, GDALGetDataTypeSize( ntype ) / 8,
    5333           0 :                                   band_list ? band_list : GDALGetRasterCount(self), pband_list, band_list,
    5334             :                                   pixel_space, line_space, band_space, FALSE);
    5335      176156 :     if (min_buffer_size == 0)
    5336             :         return CE_Failure;
    5337             : 
    5338      176155 :     if ( buf_len < min_buffer_size )
    5339             :     {
    5340           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    5341           1 :         return CE_Failure;
    5342             :     }
    5343             : 
    5344      176154 :     GDALRasterIOExtraArg* psExtraArg = NULL;
    5345             : 
    5346      176154 :     eErr = GDALDatasetRasterIOEx( self, GF_Write, xoff, yoff, xsize, ysize,
    5347             :                                   (void*) buf_string, nxsize, nysize, ntype,
    5348             :                                   band_list, pband_list, pixel_space, line_space, band_space, psExtraArg );
    5349             : 
    5350      176154 :     return eErr;
    5351             :   }
    5352           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){
    5353           1 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    5354           1 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    5355           1 :     GDALDataType ntype;
    5356           1 :     if ( buf_type != 0 ) {
    5357           0 :       ntype = (GDALDataType) *buf_type;
    5358             :     } else {
    5359           1 :       int lastband = GDALGetRasterCount( self );
    5360           1 :       if (lastband <= 0)
    5361             :         return CE_Failure;
    5362           1 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    5363             :     }
    5364           1 :     return GDALDatasetAdviseRead(self, xoff, yoff, xsize, ysize,
    5365             :                                  nxsize, nysize, ntype,
    5366           1 :                                  band_list, pband_list, options);
    5367             : }
    5368           2 : 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){
    5369             : 
    5370           2 :     if ((options != NULL) && (buf_xsize ==0) && (buf_ysize == 0))
    5371             :     {
    5372             :         // calculate an appropriate buffer size
    5373           0 :         const char* pszLevel = CSLFetchNameValue(options, "LEVEL");
    5374           0 :         if (pszLevel)
    5375             :         {
    5376             :             // round up
    5377           0 :             int nLevel = atoi(pszLevel);
    5378           0 :             if( nLevel < 0 || nLevel > 30 )
    5379             :             {
    5380           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Invalid LEVEL: %d", nLevel);
    5381             :             }
    5382             :             else
    5383             :             {
    5384           0 :                 int nRes = 1 << nLevel;
    5385           0 :                 buf_xsize = static_cast<int>(ceil(xSize / (1.0 * nRes)));
    5386           0 :                 buf_ysize = static_cast<int>(ceil(ySize / (1.0 * nRes)));
    5387             :             }
    5388             :         }
    5389             :     }
    5390             : 
    5391           2 :     int nxsize = (buf_xsize == 0) ? xSize : buf_xsize;
    5392           2 :     int nysize = (buf_ysize == 0) ? ySize : buf_ysize;
    5393             : 
    5394           2 :     GDALDataType ntype;
    5395           2 :     if (bufType != 0) {
    5396             :         ntype = (GDALDataType) bufType;
    5397             :     }
    5398             :     else {
    5399             :         ntype = GDT_Byte;
    5400             :     }
    5401             : 
    5402           2 :     int nBCount = (band_list) != 0 ? band_list : GDALGetRasterCount(self);
    5403           2 :     uint64_t nMinSize = (uint64_t)nxsize * nysize * nBCount * GDALGetDataTypeSizeBytes(ntype);
    5404           2 :     if (buf_string == NULL || buf_len < nMinSize)
    5405             :     {
    5406           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer is too small");
    5407           0 :         return NULL;
    5408             :     }
    5409             : 
    5410           2 :     bool myBandList = false;
    5411           2 :     int* pBandList;
    5412             : 
    5413           2 :     if (band_list != 0){
    5414             :         myBandList = false;
    5415             :         pBandList = pband_list;
    5416             :     }
    5417             :     else
    5418             :     {
    5419           0 :         myBandList = true;
    5420           0 :         pBandList = (int*)CPLMalloc(sizeof(int) * nBCount);
    5421           0 :         for (int i = 0; i < nBCount; ++i) {
    5422           0 :             pBandList[i] = i + 1;
    5423             :         }
    5424             :     }
    5425             : 
    5426           2 :     GDALAsyncReaderH hAsyncReader =
    5427           2 :             GDALBeginAsyncReader(self, xOff, yOff, xSize, ySize, (void*) buf_string, nxsize, nysize, ntype, nBCount, pBandList, nPixelSpace, nLineSpace,
    5428             :     nBandSpace, options);
    5429             : 
    5430           2 :     if ( myBandList ) {
    5431           0 :        CPLFree( pBandList );
    5432             :     }
    5433             : 
    5434           2 :     if (hAsyncReader)
    5435             :     {
    5436           1 :         return (GDALAsyncReaderShadow*) CreateAsyncReaderWrapper(hAsyncReader, pyObject);
    5437             :     }
    5438             :     else
    5439             :     {
    5440             :         return NULL;
    5441             :     }
    5442             : 
    5443             :   }
    5444           1 : SWIGINTERN void GDALDatasetShadow_EndAsyncReader(GDALDatasetShadow *self,GDALAsyncReaderShadow *ario){
    5445           1 :     if( ario == NULL ) return;
    5446           1 :     GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(ario);
    5447           1 :     if (hReader == NULL)
    5448             :     {
    5449             :         return;
    5450             :     }
    5451           1 :     GDALEndAsyncReader(self, hReader);
    5452           1 :     DisableAsyncReaderWrapper(ario);
    5453             :   }
    5454           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){
    5455           3 :         int nPixelSpace;
    5456           3 :         int nBandSpace;
    5457           3 :         if( bIsBandSequential != 0 && bIsBandSequential != 1 )
    5458             :             return NULL;
    5459           3 :         if( band_list == 0 )
    5460             :             return NULL;
    5461           3 :         if( bIsBandSequential || band_list == 1 )
    5462             :         {
    5463             :             nPixelSpace = 0;
    5464             :             nBandSpace = 0;
    5465             :         }
    5466             :         else
    5467             :         {
    5468           1 :             nBandSpace = GDALGetDataTypeSize(eBufType) / 8;
    5469           1 :             nPixelSpace = nBandSpace * band_list;
    5470             :         }
    5471           3 :         CPLVirtualMem* vmem = GDALDatasetGetVirtualMem( self,
    5472             :                                          eRWFlag,
    5473             :                                          nXOff, nYOff,
    5474             :                                          nXSize, nYSize,
    5475             :                                          nBufXSize, nBufYSize,
    5476             :                                          eBufType,
    5477             :                                          band_list, pband_list,
    5478             :                                          nPixelSpace,
    5479             :                                          0,
    5480             :                                          nBandSpace,
    5481             :                                          nCacheSize,
    5482             :                                          nPageSizeHint,
    5483             :                                          FALSE,
    5484             :                                          options );
    5485           3 :         if( vmem == NULL )
    5486             :             return NULL;
    5487           3 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    5488           3 :         vmemshadow->vmem = vmem;
    5489           3 :         vmemshadow->eBufType = eBufType;
    5490           3 :         vmemshadow->bIsBandSequential = bIsBandSequential;
    5491           3 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    5492           3 :         vmemshadow->nBufXSize = nBufXSize;
    5493           3 :         vmemshadow->nBufYSize = nBufYSize;
    5494           3 :         vmemshadow->nBandCount = band_list;
    5495           3 :         return vmemshadow;
    5496             :     }
    5497           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){
    5498           3 :         if( band_list == 0 )
    5499             :             return NULL;
    5500           3 :         CPLVirtualMem* vmem = GDALDatasetGetTiledVirtualMem( self,
    5501             :                                          eRWFlag,
    5502             :                                          nXOff, nYOff,
    5503             :                                          nXSize, nYSize,
    5504             :                                          nTileXSize, nTileYSize,
    5505             :                                          eBufType,
    5506             :                                          band_list, pband_list,
    5507             :                                          eTileOrganization,
    5508             :                                          nCacheSize,
    5509             :                                          FALSE,
    5510             :                                          options );
    5511           3 :         if( vmem == NULL )
    5512             :             return NULL;
    5513           3 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    5514           3 :         vmemshadow->vmem = vmem;
    5515           3 :         vmemshadow->eBufType = eBufType;
    5516           3 :         vmemshadow->bIsBandSequential = -1;
    5517           3 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    5518           3 :         vmemshadow->nBufXSize = nXSize;
    5519           3 :         vmemshadow->nBufYSize = nYSize;
    5520           3 :         vmemshadow->eTileOrganization = eTileOrganization;
    5521           3 :         vmemshadow->nTileXSize = nTileXSize;
    5522           3 :         vmemshadow->nTileYSize = nTileYSize;
    5523           3 :         vmemshadow->nBandCount = band_list;
    5524           3 :         return vmemshadow;
    5525             :     }
    5526        5865 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CreateLayer(GDALDatasetShadow *self,char const *name,OSRSpatialReferenceShadow *srs=NULL,OGRwkbGeometryType geom_type=wkbUnknown,char **options=0){
    5527       11730 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCreateLayer( self,
    5528             :                                   name,
    5529             :                                   srs,
    5530             :                                   geom_type,
    5531             :                                   options);
    5532        5865 :     return layer;
    5533             :   }
    5534          14 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CreateLayerFromGeomFieldDefn(GDALDatasetShadow *self,char const *name,OGRGeomFieldDefnShadow *geom_field,char **options=0){
    5535          28 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCreateLayerFromGeomFieldDefn( self,
    5536             :                                   name,
    5537             :                                   geom_field,
    5538             :                                   options);
    5539          14 :     return layer;
    5540             :   }
    5541          12 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CopyLayer(GDALDatasetShadow *self,OGRLayerShadow *src_layer,char const *new_name,char **options=0){
    5542          24 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCopyLayer( self,
    5543             :                                                       src_layer,
    5544             :                                                       new_name,
    5545             :                                                       options);
    5546          12 :     return layer;
    5547             :   }
    5548          40 : SWIGINTERN OGRErr GDALDatasetShadow_DeleteLayer(GDALDatasetShadow *self,int index){
    5549          40 :     return GDALDatasetDeleteLayer(self, index);
    5550             :   }
    5551             : 
    5552             : 
    5553             : #include "ogr_core.h"
    5554             : static char const *
    5555           0 : OGRErrMessages( int rc ) {
    5556           0 :   switch( rc ) {
    5557             :   case OGRERR_NONE:
    5558             :     return "OGR Error: None";
    5559           0 :   case OGRERR_NOT_ENOUGH_DATA:
    5560           0 :     return "OGR Error: Not enough data to deserialize";
    5561           0 :   case OGRERR_NOT_ENOUGH_MEMORY:
    5562           0 :     return "OGR Error: Not enough memory";
    5563           0 :   case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
    5564           0 :     return "OGR Error: Unsupported geometry type";
    5565           0 :   case OGRERR_UNSUPPORTED_OPERATION:
    5566           0 :     return "OGR Error: Unsupported operation";
    5567           0 :   case OGRERR_CORRUPT_DATA:
    5568           0 :     return "OGR Error: Corrupt data";
    5569           0 :   case OGRERR_FAILURE:
    5570           0 :     return "OGR Error: General Error";
    5571           0 :   case OGRERR_UNSUPPORTED_SRS:
    5572           0 :     return "OGR Error: Unsupported SRS";
    5573           0 :   case OGRERR_INVALID_HANDLE:
    5574           0 :     return "OGR Error: Invalid handle";
    5575           0 :   case OGRERR_NON_EXISTING_FEATURE:
    5576           0 :     return "OGR Error: Non existing feature";
    5577           0 :   default:
    5578           0 :     return "OGR Error: Unknown";
    5579             :   }
    5580             : }
    5581             : 
    5582          91 : SWIGINTERN bool GDALDatasetShadow_IsLayerPrivate(GDALDatasetShadow *self,int index){
    5583         182 :     return GDALDatasetIsLayerPrivate(self, index);
    5584             :   }
    5585             : 
    5586             : SWIGINTERN int
    5587        5499 : SWIG_AsVal_bool (PyObject *obj, bool *val)
    5588             : {
    5589        5499 :   int r;
    5590        5499 :   if (!PyBool_Check(obj))
    5591             :     return SWIG_ERROR;
    5592        5498 :   r = PyObject_IsTrue(obj);
    5593        5498 :   if (r == -1)
    5594             :     return SWIG_ERROR;
    5595        5498 :   if (val) *val = r ? true : false;
    5596             :   return SWIG_OK;
    5597             : }
    5598             : 
    5599        1917 : 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){
    5600        1917 :     OGRLayerH hLayer = NULL;
    5601        3834 :     OGRFeatureShadow* feat = (OGRFeatureShadow*)GDALDatasetGetNextFeature( self, &hLayer, pdfProgressPct,
    5602             :                                       callback, callback_data );
    5603        1917 :     *ppoBelongingLayer = (OGRLayerShadow*)hLayer;
    5604        1917 :     return feat;
    5605             :   }
    5606         118 : SWIGINTERN bool GDALDatasetShadow_TestCapability(GDALDatasetShadow *self,char const *cap){
    5607         236 :     return (GDALDatasetTestCapability(self, cap) > 0);
    5608             :   }
    5609        9856 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_ExecuteSQL(GDALDatasetShadow *self,char const *statement,OGRGeometryShadow *spatialFilter=NULL,char const *dialect=""){
    5610       19712 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetExecuteSQL(self,
    5611             :                                                       statement,
    5612             :                                                       spatialFilter,
    5613             :                                                       dialect);
    5614        9856 :     return layer;
    5615             :   }
    5616        2813 : SWIGINTERN void GDALDatasetShadow_ReleaseResultSet(GDALDatasetShadow *self,OGRLayerShadow *layer){
    5617        2813 :     GDALDatasetReleaseResultSet(self, layer);
    5618        2813 :   }
    5619           6 : SWIGINTERN OGRStyleTableShadow *GDALDatasetShadow_GetStyleTable(GDALDatasetShadow *self){
    5620           6 :     return (OGRStyleTableShadow*) GDALDatasetGetStyleTable(self);
    5621             :   }
    5622           7 : SWIGINTERN void GDALDatasetShadow_SetStyleTable(GDALDatasetShadow *self,OGRStyleTableShadow *table){
    5623           7 :     if( table != NULL )
    5624           5 :         GDALDatasetSetStyleTable(self, (OGRStyleTableH) table);
    5625             :   }
    5626        9102 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_GetLayerByIndex(GDALDatasetShadow *self,int index=0){
    5627             : 
    5628             : 
    5629             : 
    5630       18204 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetGetLayer(self, index);
    5631        9102 :     return layer;
    5632             :   }
    5633        2721 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_GetLayerByName(GDALDatasetShadow *self,char const *layer_name){
    5634        5442 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetGetLayerByName(self, layer_name);
    5635        2721 :     return layer;
    5636             :   }
    5637          14 : SWIGINTERN void GDALDatasetShadow_ResetReading(GDALDatasetShadow *self){
    5638          14 :     GDALDatasetResetReading(self);
    5639          14 :   }
    5640        1424 : SWIGINTERN int GDALDatasetShadow_GetLayerCount(GDALDatasetShadow *self){
    5641        1424 :     return GDALDatasetGetLayerCount(self);
    5642             :   }
    5643           6 : SWIGINTERN OGRErr GDALDatasetShadow_AbortSQL(GDALDatasetShadow *self){
    5644           6 :     return GDALDatasetAbortSQL(self);
    5645             : }
    5646         105 : SWIGINTERN OGRErr GDALDatasetShadow_StartTransaction(GDALDatasetShadow *self,int force=FALSE){
    5647         105 :     return GDALDatasetStartTransaction(self, force);
    5648             :   }
    5649          76 : SWIGINTERN OGRErr GDALDatasetShadow_CommitTransaction(GDALDatasetShadow *self){
    5650          76 :     return GDALDatasetCommitTransaction(self);
    5651             :   }
    5652          44 : SWIGINTERN OGRErr GDALDatasetShadow_RollbackTransaction(GDALDatasetShadow *self){
    5653          44 :     return GDALDatasetRollbackTransaction(self);
    5654             :   }
    5655           2 : SWIGINTERN void GDALDatasetShadow_ClearStatistics(GDALDatasetShadow *self){
    5656           2 :       GDALDatasetClearStatistics(self);
    5657           2 :   }
    5658          32 : SWIGINTERN char **GDALDatasetShadow_GetFieldDomainNames(GDALDatasetShadow *self,char **options=0){
    5659          32 :     return GDALDatasetGetFieldDomainNames(self, options);
    5660             :   }
    5661         112 : SWIGINTERN OGRFieldDomainShadow *GDALDatasetShadow_GetFieldDomain(GDALDatasetShadow *self,char const *name){
    5662         112 :     return (OGRFieldDomainShadow*) GDALDatasetGetFieldDomain(self, name);
    5663             :   }
    5664          34 : SWIGINTERN bool GDALDatasetShadow_AddFieldDomain(GDALDatasetShadow *self,OGRFieldDomainShadow *fieldDomain){
    5665          34 :       return GDALDatasetAddFieldDomain(self, (OGRFieldDomainH)fieldDomain, NULL);
    5666             :   }
    5667           8 : SWIGINTERN bool GDALDatasetShadow_DeleteFieldDomain(GDALDatasetShadow *self,char const *name){
    5668           8 :       return GDALDatasetDeleteFieldDomain(self, name, NULL);
    5669             :   }
    5670           4 : SWIGINTERN bool GDALDatasetShadow_UpdateFieldDomain(GDALDatasetShadow *self,OGRFieldDomainShadow *fieldDomain){
    5671           4 :       return GDALDatasetUpdateFieldDomain(self, (OGRFieldDomainH)fieldDomain, NULL);
    5672             :   }
    5673          46 : SWIGINTERN char **GDALDatasetShadow_GetRelationshipNames(GDALDatasetShadow *self,char **options=0){
    5674          46 :     return GDALDatasetGetRelationshipNames(self, options);
    5675             :   }
    5676          52 : SWIGINTERN GDALRelationshipShadow *GDALDatasetShadow_GetRelationship(GDALDatasetShadow *self,char const *name){
    5677          52 :     return (GDALRelationshipShadow*) GDALDatasetGetRelationship(self, name);
    5678             :   }
    5679          42 : SWIGINTERN bool GDALDatasetShadow_AddRelationship(GDALDatasetShadow *self,GDALRelationshipShadow *relationship){
    5680          42 :       return GDALDatasetAddRelationship(self, (GDALRelationshipH)relationship, NULL);
    5681             :   }
    5682           6 : SWIGINTERN bool GDALDatasetShadow_DeleteRelationship(GDALDatasetShadow *self,char const *name){
    5683           6 :       return GDALDatasetDeleteRelationship(self, name, NULL);
    5684             :   }
    5685           9 : SWIGINTERN bool GDALDatasetShadow_UpdateRelationship(GDALDatasetShadow *self,GDALRelationshipShadow *relationship){
    5686           9 :       return GDALDatasetUpdateRelationship(self, (GDALRelationshipH)relationship, NULL);
    5687             :   }
    5688      176457 : 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){
    5689      176457 :     *buf = NULL;
    5690             : 
    5691      176457 :     int nxsize = (buf_xsize==0) ? static_cast<int>(xsize) : *buf_xsize;
    5692      176457 :     int nysize = (buf_ysize==0) ? static_cast<int>(ysize) : *buf_ysize;
    5693      176457 :     GDALDataType ntype;
    5694      176457 :     if ( buf_type != 0 ) {
    5695      176457 :       ntype = *buf_type;
    5696             :     } else {
    5697           0 :       int lastband = GDALGetRasterCount( self ) - 1;
    5698           0 :       if (lastband < 0)
    5699             :       {
    5700             :           return CE_Failure;
    5701             :       }
    5702           0 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    5703             :     }
    5704             : 
    5705      176457 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    5706      176457 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    5707      176457 :     GIntBig band_space = (buf_band_space == 0) ? 0 : *buf_band_space;
    5708             : 
    5709      176457 :     int ntypesize = GDALGetDataTypeSize( ntype ) / 8;
    5710      176457 :     size_t buf_size = static_cast<size_t>(
    5711      176457 :         ComputeDatasetRasterIOSize (nxsize, nysize, ntypesize,
    5712             :                                     band_list ? band_list :
    5713           0 :                                         GDALGetRasterCount(self),
    5714             :                                     pband_list, band_list,
    5715             :                                     pixel_space, line_space, band_space,
    5716      176457 :                                     FALSE));
    5717      176457 :     if (buf_size == 0)
    5718             :     {
    5719             :         return CE_Failure;
    5720             :     }
    5721             : 
    5722      176455 :     char *data;
    5723      176455 :     Py_buffer view;
    5724             : 
    5725      345880 :     if( !readraster_acquirebuffer(buf, inputOutputBuf, buf_size, ntype,
    5726             :                                   GetUseExceptions(), data, view) )
    5727             :     {
    5728             :         return CE_Failure;
    5729             :     }
    5730             : 
    5731      176442 :     if( inputOutputBuf == NULL )
    5732             :     {
    5733             :         /* Should we clear the buffer in case there are hole in it ? */
    5734      176430 :         if( line_space != 0 && pixel_space != 0 && line_space > pixel_space * nxsize )
    5735             :         {
    5736           4 :             memset(data, 0, buf_size);
    5737             :         }
    5738      176426 :         else if( band_list > 1 && band_space != 0 )
    5739             :         {
    5740        1069 :             if( line_space != 0 && band_space > line_space * nysize )
    5741           0 :                 memset(data, 0, buf_size);
    5742        1069 :             else if( pixel_space != 0 && band_space < pixel_space &&
    5743        1063 :                      pixel_space != (GIntBig)GDALGetRasterCount(self) * ntypesize )
    5744         160 :                 memset(data, 0, buf_size);
    5745             :         }
    5746             :     }
    5747             : 
    5748      176442 :     GDALRasterIOExtraArg sExtraArg;
    5749      176442 :     INIT_RASTERIO_EXTRA_ARG(sExtraArg);
    5750      176442 :     sExtraArg.eResampleAlg = resample_alg;
    5751      176442 :     sExtraArg.pfnProgress = callback;
    5752      176442 :     sExtraArg.pProgressData = callback_data;
    5753             : 
    5754      176442 :     int nXOff = (int)(xoff + 0.5);
    5755      176442 :     int nYOff = (int)(yoff + 0.5);
    5756      176442 :     int nXSize = (int)(xsize + 0.5);
    5757      176442 :     int nYSize = (int)(ysize + 0.5);
    5758      176442 :     if( fabs(xoff-nXOff) > 1e-8 || fabs(yoff-nYOff) > 1e-8 ||
    5759      176433 :         fabs(xsize-nXSize) > 1e-8 || fabs(ysize-nYSize) > 1e-8 )
    5760             :     {
    5761          11 :         sExtraArg.bFloatingPointWindowValidity = TRUE;
    5762          11 :         sExtraArg.dfXOff = xoff;
    5763          11 :         sExtraArg.dfYOff = yoff;
    5764          11 :         sExtraArg.dfXSize = xsize;
    5765          11 :         sExtraArg.dfYSize = ysize;
    5766             :     }
    5767             : 
    5768      176442 :     CPLErr eErr = GDALDatasetRasterIOEx(self, GF_Read, nXOff, nYOff, nXSize, nYSize,
    5769             :                                data, nxsize, nysize, ntype,
    5770             :                                band_list, pband_list, pixel_space, line_space, band_space,
    5771             :                                &sExtraArg );
    5772             : 
    5773      176442 :     readraster_releasebuffer(eErr, buf, inputOutputBuf, view);
    5774             : 
    5775             :     return eErr;
    5776             : }
    5777             : 
    5778       19702 : int GDALDatasetShadow_RasterXSize_get( GDALDatasetShadow *h ) {
    5779       19702 :   return GDALGetRasterXSize( h );
    5780             : }
    5781       19961 : int GDALDatasetShadow_RasterYSize_get( GDALDatasetShadow *h ) {
    5782       19961 :   return GDALGetRasterYSize( h );
    5783             : }
    5784      354704 : int GDALDatasetShadow_RasterCount_get( GDALDatasetShadow *h ) {
    5785      354704 :   return GDALGetRasterCount( h );
    5786             : }
    5787             : 
    5788          10 : SWIGINTERN GDALRasterAttributeTableShadow *new_GDALRasterAttributeTableShadow(){
    5789          10 :         return (GDALRasterAttributeTableShadow*)
    5790          10 :     GDALCreateRasterAttributeTable();
    5791             :     }
    5792          17 : SWIGINTERN void delete_GDALRasterAttributeTableShadow(GDALRasterAttributeTableShadow *self){
    5793          17 :         GDALDestroyRasterAttributeTable(self);
    5794          17 :     }
    5795           5 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterAttributeTableShadow_Clone(GDALRasterAttributeTableShadow *self){
    5796           5 :         return (GDALRasterAttributeTableShadow*) GDALRATClone(self);
    5797             :     }
    5798          37 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColumnCount(GDALRasterAttributeTableShadow *self){
    5799          37 :         return GDALRATGetColumnCount( self );
    5800             :     }
    5801          60 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetNameOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5802          60 :         return GDALRATGetNameOfCol( self, iCol );
    5803             :     }
    5804          61 : SWIGINTERN GDALRATFieldUsage GDALRasterAttributeTableShadow_GetUsageOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5805          61 :         return GDALRATGetUsageOfCol( self, iCol );
    5806             :     }
    5807          66 : SWIGINTERN GDALRATFieldType GDALRasterAttributeTableShadow_GetTypeOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5808          66 :         return GDALRATGetTypeOfCol( self, iCol );
    5809             :     }
    5810          13 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColOfUsage(GDALRasterAttributeTableShadow *self,GDALRATFieldUsage eUsage){
    5811          13 :         return GDALRATGetColOfUsage( self, eUsage );
    5812             :     }
    5813          45 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowCount(GDALRasterAttributeTableShadow *self){
    5814          45 :         return GDALRATGetRowCount( self );
    5815             :     }
    5816          50 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5817          50 :         return GDALRATGetValueAsString( self, iRow, iCol );
    5818             :     }
    5819          72 : SWIGINTERN int GDALRasterAttributeTableShadow_GetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5820          72 :         return GDALRATGetValueAsInt( self, iRow, iCol );
    5821             :     }
    5822          38 : SWIGINTERN double GDALRasterAttributeTableShadow_GetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5823          38 :         return GDALRATGetValueAsDouble( self, iRow, iCol );
    5824             :     }
    5825           5 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsString(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,char **ppszData){
    5826           5 :         return GDALRATValuesIOAsString(self, GF_Read, iField, iStartRow, iLength, ppszData);
    5827             :     }
    5828           5 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsInteger(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,int *pnData){
    5829           5 :         return GDALRATValuesIOAsInteger(self, GF_Read, iField, iStartRow, iLength, pnData);
    5830             :     }
    5831           5 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsDouble(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,double *pdfData){
    5832           5 :         return GDALRATValuesIOAsDouble(self, GF_Read, iField, iStartRow, iLength, pdfData);
    5833             :     }
    5834          27 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol,char const *pszValue){
    5835          27 :         GDALRATSetValueAsString( self, iRow, iCol, pszValue );
    5836          27 :     }
    5837          39 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol,int nValue){
    5838          39 :         GDALRATSetValueAsInt( self, iRow, iCol, nValue );
    5839          39 :     }
    5840          25 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol,double dfValue){
    5841          25 :         GDALRATSetValueAsDouble( self, iRow, iCol, dfValue );
    5842          25 :     }
    5843           5 : SWIGINTERN void GDALRasterAttributeTableShadow_SetRowCount(GDALRasterAttributeTableShadow *self,int nCount){
    5844           5 :         GDALRATSetRowCount( self, nCount );
    5845           5 :     }
    5846          25 : SWIGINTERN int GDALRasterAttributeTableShadow_CreateColumn(GDALRasterAttributeTableShadow *self,char const *pszName,GDALRATFieldType eType,GDALRATFieldUsage eUsage){
    5847          50 :         return GDALRATCreateColumn( self, pszName, eType, eUsage );
    5848             :     }
    5849           1 : SWIGINTERN bool GDALRasterAttributeTableShadow_GetLinearBinning(GDALRasterAttributeTableShadow *self,double *pdfRow0Min,double *pdfBinSize){
    5850           2 :         return (GDALRATGetLinearBinning(self, pdfRow0Min, pdfBinSize) != 0) ? true : false;
    5851             :     }
    5852           1 : SWIGINTERN int GDALRasterAttributeTableShadow_SetLinearBinning(GDALRasterAttributeTableShadow *self,double dfRow0Min,double dfBinSize){
    5853           2 :         return GDALRATSetLinearBinning(self, dfRow0Min, dfBinSize);
    5854             :     }
    5855           3 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowOfValue(GDALRasterAttributeTableShadow *self,double dfValue){
    5856           3 :         return GDALRATGetRowOfValue( self, dfValue );
    5857             :     }
    5858           2 : SWIGINTERN int GDALRasterAttributeTableShadow_ChangesAreWrittenToFile(GDALRasterAttributeTableShadow *self){
    5859           2 :         return GDALRATChangesAreWrittenToFile( self );
    5860             :     }
    5861           0 : SWIGINTERN void GDALRasterAttributeTableShadow_DumpReadable(GDALRasterAttributeTableShadow *self){
    5862           0 :         GDALRATDumpReadable( self, NULL );
    5863           0 :     }
    5864           3 : SWIGINTERN void GDALRasterAttributeTableShadow_SetTableType(GDALRasterAttributeTableShadow *self,GDALRATTableType eTableType){
    5865           3 :         GDALRATSetTableType( self, eTableType );
    5866           3 :     }
    5867          10 : SWIGINTERN GDALRATTableType GDALRasterAttributeTableShadow_GetTableType(GDALRasterAttributeTableShadow *self){
    5868          10 :         return GDALRATGetTableType( self );
    5869             :     }
    5870           1 : SWIGINTERN void GDALRasterAttributeTableShadow_RemoveStatistics(GDALRasterAttributeTableShadow *self){
    5871           1 :         GDALRATRemoveStatistics(self);
    5872           1 :     }
    5873        1439 : SWIGINTERN void delete_GDALGroupHS(GDALGroupHS *self){
    5874        1439 :     GDALGroupRelease(self);
    5875        1439 :   }
    5876          95 : SWIGINTERN char const *GDALGroupHS_GetName(GDALGroupHS *self){
    5877          95 :     return GDALGroupGetName(self);
    5878             :   }
    5879          47 : SWIGINTERN char const *GDALGroupHS_GetFullName(GDALGroupHS *self){
    5880          47 :     return GDALGroupGetFullName(self);
    5881             :   }
    5882         329 : SWIGINTERN char **GDALGroupHS_GetMDArrayNames(GDALGroupHS *self,char **options=0){
    5883         329 :     return GDALGroupGetMDArrayNames( self, options );
    5884             :   }
    5885           1 : SWIGINTERN char **GDALGroupHS_GetMDArrayFullNamesRecursive(GDALGroupHS *self,char **groupOptions=0,char **arrayOptions=0){
    5886           1 :     return GDALGroupGetMDArrayFullNamesRecursive( self, groupOptions, arrayOptions );
    5887             :   }
    5888         806 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_OpenMDArray(GDALGroupHS *self,char const *name,char **options=0){
    5889             : 
    5890         806 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5891             : 
    5892         806 :     GDALMDArrayH hRet = GDALGroupOpenMDArray(self, name, options);
    5893             : 
    5894         927 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5895          17 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5896             : 
    5897         806 :     return hRet;
    5898             :   }
    5899          16 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_OpenMDArrayFromFullname(GDALGroupHS *self,char const *name,char **options=0){
    5900             : 
    5901          16 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5902             : 
    5903          16 :     GDALMDArrayH hRet = GDALGroupOpenMDArrayFromFullname(self, name, options);
    5904             : 
    5905          23 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5906           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5907             : 
    5908          16 :     return hRet;
    5909             :   }
    5910          19 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_ResolveMDArray(GDALGroupHS *self,char const *name,char const *starting_point,char **options=0){
    5911             : 
    5912          19 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5913             : 
    5914          19 :     GDALMDArrayH hRet = GDALGroupResolveMDArray(self, name, starting_point, options);
    5915             : 
    5916          19 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5917           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5918             : 
    5919          19 :     return hRet;
    5920             :   }
    5921          97 : SWIGINTERN char **GDALGroupHS_GetGroupNames(GDALGroupHS *self,char **options=0){
    5922          97 :     return GDALGroupGetGroupNames( self, options );
    5923             :   }
    5924         163 : SWIGINTERN GDALGroupHS *GDALGroupHS_OpenGroup(GDALGroupHS *self,char const *name,char **options=0){
    5925             : 
    5926         163 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5927             : 
    5928         163 :     GDALGroupH hRet = GDALGroupOpenGroup(self, name, options);
    5929             : 
    5930         171 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5931          12 :         CPLError(CE_Failure, CPLE_AppDefined, "Group %s does not exist", name);
    5932             : 
    5933         163 :     return hRet;
    5934             :   }
    5935           3 : SWIGINTERN GDALGroupHS *GDALGroupHS_OpenGroupFromFullname(GDALGroupHS *self,char const *name,char **options=0){
    5936             : 
    5937           3 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5938             : 
    5939           3 :     GDALGroupH hRet = GDALGroupOpenGroupFromFullname(self, name, options);
    5940             : 
    5941           3 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5942           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Group %s does not exist", name);
    5943             : 
    5944           3 :     return hRet;
    5945             :   }
    5946           8 : SWIGINTERN char **GDALGroupHS_GetVectorLayerNames(GDALGroupHS *self,char **options=0){
    5947           8 :     return GDALGroupGetVectorLayerNames( self, options );
    5948             :   }
    5949          12 : SWIGINTERN OGRLayerShadow *GDALGroupHS_OpenVectorLayer(GDALGroupHS *self,char const *name,char **options=0){
    5950             : 
    5951          12 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5952             : 
    5953          12 :     OGRLayerH hRet = GDALGroupOpenVectorLayer(self, name, options);
    5954             : 
    5955          12 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5956           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Vector layer %s does not exist", name);
    5957             : 
    5958          12 :     return (OGRLayerShadow*) hRet;
    5959             :   }
    5960          73 : SWIGINTERN void GDALGroupHS_GetDimensions(GDALGroupHS *self,GDALDimensionHS ***pdims,size_t *pnCount,char **options=0){
    5961         146 :     *pdims = GDALGroupGetDimensions(self, pnCount, options);
    5962             :   }
    5963          80 : SWIGINTERN GDALAttributeHS *GDALGroupHS_GetAttribute(GDALGroupHS *self,char const *name){
    5964             : 
    5965          80 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5966             : 
    5967          80 :     GDALAttributeH hRet = GDALGroupGetAttribute(self, name);
    5968             : 
    5969          85 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5970           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Attribute %s does not exist", name);
    5971             : 
    5972          80 :     return hRet;
    5973             :   }
    5974          71 : SWIGINTERN void GDALGroupHS_GetAttributes(GDALGroupHS *self,GDALAttributeHS ***pattrs,size_t *pnCount,char **options=0){
    5975         142 :     *pattrs = GDALGroupGetAttributes(self, pnCount, options);
    5976             :   }
    5977           4 : SWIGINTERN char **GDALGroupHS_GetStructuralInfo(GDALGroupHS *self){
    5978           4 :     return GDALGroupGetStructuralInfo( self );
    5979             :   }
    5980         176 : SWIGINTERN GDALGroupHS *GDALGroupHS_CreateGroup(GDALGroupHS *self,char const *name,char **options=0){
    5981         176 :     return GDALGroupCreateGroup(self, name, options);
    5982             :   }
    5983          20 : SWIGINTERN CPLErr GDALGroupHS_DeleteGroup(GDALGroupHS *self,char const *name,char **options=0){
    5984          20 :     return GDALGroupDeleteGroup(self, name, options) ? CE_None : CE_Failure;
    5985             :   }
    5986         654 : SWIGINTERN GDALDimensionHS *GDALGroupHS_CreateDimension(GDALGroupHS *self,char const *name,char const *dim_type,char const *direction,GUIntBig size,char **options=0){
    5987         654 :     return GDALGroupCreateDimension(self, name, dim_type, direction, size, options);
    5988             :   }
    5989         603 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_CreateMDArray(GDALGroupHS *self,char const *name,int dimensions,GDALDimensionHS **dimensionsValues,GDALExtendedDataTypeHS *data_type,char **options=0){
    5990         603 :     return GDALGroupCreateMDArray(self, name, dimensions, dimensionsValues,
    5991             :                                   data_type, options);
    5992             :   }
    5993          20 : SWIGINTERN CPLErr GDALGroupHS_DeleteMDArray(GDALGroupHS *self,char const *name,char **options=0){
    5994          20 :     return GDALGroupDeleteMDArray(self, name, options) ? CE_None : CE_Failure;
    5995             :   }
    5996             : 
    5997             : static GUIntBig*
    5998        5199 : CreateCGUIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
    5999             :   /* check if is List */
    6000        5199 :   if ( !PySequence_Check(pySeq) ) {
    6001           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    6002           0 :     *pnSize = -1;
    6003           0 :     return NULL;
    6004             :   }
    6005        5199 :   Py_ssize_t size = PySequence_Size(pySeq);
    6006        5199 :   if( size > (Py_ssize_t)INT_MAX ) {
    6007           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6008           0 :     *pnSize = -1;
    6009           0 :     return NULL;
    6010             :   }
    6011        5199 :   if( (size_t)size > SIZE_MAX / sizeof(GUIntBig) ) {
    6012           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6013           0 :     *pnSize = -1;
    6014           0 :     return NULL;
    6015             :   }
    6016        5199 :   *pnSize = (int)size;
    6017        5199 :   GUIntBig* ret = (GUIntBig*) malloc((*pnSize)*sizeof(GUIntBig));
    6018        5199 :   if( !ret ) {
    6019           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    6020           0 :     *pnSize = -1;
    6021           0 :     return NULL;
    6022             :   }
    6023       14602 :   for( int i = 0; i<*pnSize; i++ ) {
    6024        9403 :     PyObject *o = PySequence_GetItem(pySeq,i);
    6025        9403 :     if ( !PyArg_Parse(o,"K",&ret[i]) ) {
    6026           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    6027           0 :         Py_DECREF(o);
    6028           0 :         free(ret);
    6029           0 :         *pnSize = -1;
    6030           0 :         return NULL;
    6031             :     }
    6032        9403 :     Py_DECREF(o);
    6033             :   }
    6034             :   return ret;
    6035             : }
    6036             : 
    6037         120 : SWIGINTERN GDALAttributeHS *GDALGroupHS_CreateAttribute(GDALGroupHS *self,char const *name,int dimensions,GUIntBig *sizes,GDALExtendedDataTypeHS *data_type,char **options=0){
    6038         120 :     return GDALGroupCreateAttribute(self, name, dimensions,
    6039             :                                     (const GUInt64*) sizes,
    6040             :                                     data_type, options);
    6041             :   }
    6042          25 : SWIGINTERN CPLErr GDALGroupHS_DeleteAttribute(GDALGroupHS *self,char const *name,char **options=0){
    6043          25 :     return GDALGroupDeleteAttribute(self, name, options) ? CE_None : CE_Failure;
    6044             :   }
    6045          45 : SWIGINTERN CPLErr GDALGroupHS_Rename(GDALGroupHS *self,char const *newName){
    6046          45 :     return GDALGroupRename( self, newName ) ? CE_None : CE_Failure;
    6047             :   }
    6048          14 : SWIGINTERN GDALGroupHS *GDALGroupHS_SubsetDimensionFromSelection(GDALGroupHS *self,char const *selection,char **options=0){
    6049          14 :     return GDALGroupSubsetDimensionFromSelection(self, selection, options);
    6050             :   }
    6051           2 : SWIGINTERN size_t GDALGroupHS_GetDataTypeCount(GDALGroupHS *self){
    6052           2 :     return GDALGroupGetDataTypeCount(self);
    6053             :   }
    6054             : 
    6055             : SWIGINTERNINLINE PyObject* 
    6056        3604 : SWIG_From_unsigned_SS_long  (unsigned long value)
    6057             : {
    6058        3604 :   return (value > LONG_MAX) ?
    6059        3604 :     PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
    6060             : }
    6061             : 
    6062             : 
    6063             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6064             : SWIGINTERNINLINE PyObject* 
    6065             : SWIG_From_unsigned_SS_long_SS_long  (unsigned long long value)
    6066             : {
    6067             :   return (value > LONG_MAX) ?
    6068             :     PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
    6069             : }
    6070             : #endif
    6071             : 
    6072             : 
    6073             : SWIGINTERNINLINE PyObject *
    6074        3604 : SWIG_From_size_t  (size_t value)
    6075             : {    
    6076             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6077        3604 :   if (sizeof(size_t) <= sizeof(unsigned long)) {
    6078             : #endif
    6079        3604 :     return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
    6080             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6081             :   } else {
    6082             :     /* assume sizeof(size_t) <= sizeof(unsigned long long) */
    6083             :     return SWIG_From_unsigned_SS_long_SS_long  (static_cast< unsigned long long >(value));
    6084             :   }
    6085             : #endif
    6086             : }
    6087             : 
    6088           2 : SWIGINTERN GDALExtendedDataTypeHS *GDALGroupHS_GetDataType(GDALGroupHS *self,size_t idx){
    6089           2 :     if (idx >= GDALGroupGetDataTypeCount(self))
    6090             :     {
    6091           1 :         CPLError(CE_Failure, CPLE_AppDefined, "GetDataType(): invalid index");
    6092           1 :         return NULL;
    6093             :     }
    6094           1 :     return GDALGroupGetDataType(self, idx);
    6095             :   }
    6096             : 
    6097             : typedef struct
    6098             : {
    6099             :   double min;
    6100             :   double max;
    6101             :   double mean;
    6102             :   double std_dev;
    6103             :   GIntBig valid_count;
    6104             : } Statistics;
    6105             : 
    6106           0 : SWIGINTERN void delete_Statistics(Statistics *self){
    6107           0 :     CPLFree(self);
    6108           0 :   }
    6109             : 
    6110             : #include <limits>
    6111             : 
    6112        2428 : static bool CheckNumericDataType(GDALExtendedDataTypeHS* dt)
    6113             : {
    6114        2428 :     GDALExtendedDataTypeClass klass = GDALExtendedDataTypeGetClass(dt);
    6115        2428 :     if( klass == GEDTC_NUMERIC )
    6116             :         return true;
    6117          32 :     if( klass == GEDTC_STRING )
    6118             :         return false;
    6119          20 :     CPLAssert( klass == GEDTC_COMPOUND );
    6120          20 :     size_t nCount = 0;
    6121          20 :     GDALEDTComponentH* comps = GDALExtendedDataTypeGetComponents(dt, &nCount);
    6122             :     bool ret = true;
    6123          56 :     for( size_t i = 0; i < nCount; i++ )
    6124             :     {
    6125          38 :         GDALExtendedDataTypeH tmpType = GDALEDTComponentGetType(comps[i]);
    6126          38 :         ret = CheckNumericDataType(tmpType);
    6127          38 :         GDALExtendedDataTypeRelease(tmpType);
    6128          38 :         if( !ret )
    6129             :             break;
    6130             :     }
    6131          20 :     GDALExtendedDataTypeFreeComponents(comps, nCount);
    6132             :     return ret;
    6133             : }
    6134             : 
    6135        4264 : static CPLErr MDArrayReadWriteCheckArguments(GDALMDArrayHS* array,
    6136             :                                              bool bCheckOnlyDims,
    6137             :                                              int nDims1, GUIntBig* array_start_idx,
    6138             :                                              int nDims2, GUIntBig* count,
    6139             :                                              int nDims3, GIntBig* array_step,
    6140             :                                              int nDims4, GIntBig* buffer_stride,
    6141             :                                              GDALExtendedDataTypeHS* buffer_datatype,
    6142             :                                              size_t* pnBufferSize)
    6143             : {
    6144        4264 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(array);
    6145        4264 :     if( nDims1 != nExpectedDims )
    6146             :     {
    6147           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6148             :             "Wrong number of values in array_start_idx");
    6149           1 :         return CE_Failure;
    6150             :     }
    6151        4263 :     if( nDims2 != nExpectedDims )
    6152             :     {
    6153           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6154             :             "Wrong number of values in count");
    6155           1 :         return CE_Failure;
    6156             :     }
    6157        4262 :     if( nDims3 != nExpectedDims )
    6158             :     {
    6159           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6160             :             "Wrong number of values in array_step");
    6161           1 :         return CE_Failure;
    6162             :     }
    6163        4261 :     if( nDims4!= nExpectedDims )
    6164             :     {
    6165           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6166             :             "Wrong number of values in buffer_stride");
    6167           1 :         return CE_Failure;
    6168             :     }
    6169        4260 :     if( bCheckOnlyDims )
    6170             :         return CE_None;
    6171        2375 :     if( !CheckNumericDataType(buffer_datatype) )
    6172             :     {
    6173           8 :         CPLError(CE_Failure, CPLE_NotSupported,
    6174             :             "non-numeric buffer data type not supported in SWIG bindings");
    6175           8 :         return CE_Failure;
    6176             :     }
    6177             :     GIntBig nBufferSize = 0;
    6178        6742 :     for( int i = 0; i < nExpectedDims; i++ )
    6179             :     {
    6180        4377 :         if( count[i] == 0 )
    6181             :         {
    6182           1 :             CPLError(CE_Failure, CPLE_AppDefined,
    6183             :                      "count[%d] = 0 is invalid", i);
    6184           1 :             return CE_Failure;
    6185             :         }
    6186        4376 :         if( buffer_stride[i] < 0 )
    6187             :         {
    6188           1 :             CPLError(CE_Failure, CPLE_NotSupported,
    6189             :                 "Negative value in buffer_stride not supported in SWIG bindings");
    6190           1 :             return CE_Failure;
    6191             :         }
    6192        4375 :         if( count[i] > 1 && buffer_stride[i] != 0 )
    6193             :         {
    6194        3677 :             if( (GUIntBig)buffer_stride[i] > std::numeric_limits<GIntBig>::max() / (count[i] - 1) )
    6195             :             {
    6196           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6197           0 :                 return CE_Failure;
    6198             :             }
    6199        3677 :             GIntBig nDelta = buffer_stride[i] * (count[i] - 1);
    6200        3677 :             if( nBufferSize > std::numeric_limits<GIntBig>::max() - nDelta )
    6201             :             {
    6202           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6203           0 :                 return CE_Failure;
    6204             :             }
    6205        3677 :             nBufferSize += nDelta;
    6206             :         }
    6207             :     }
    6208        2365 :     const size_t nDTSize = GDALExtendedDataTypeGetSize(buffer_datatype);
    6209        2365 :     if( nDTSize == 0 )
    6210             :     {
    6211           0 :         CPLError(CE_Failure, CPLE_AppDefined, "nDTSize == 0");
    6212           0 :         return CE_Failure;
    6213             :     }
    6214        2365 :     if( (GUIntBig)nBufferSize > (GUIntBig)std::numeric_limits<GIntBig>::max() / nDTSize )
    6215             :     {
    6216           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6217           0 :         return CE_Failure;
    6218             :     }
    6219        2365 :     nBufferSize *= nDTSize;
    6220        2365 :     if( (GUIntBig)nBufferSize > (GUIntBig)std::numeric_limits<GIntBig>::max() - nDTSize )
    6221             :     {
    6222           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6223           1 :         return CE_Failure;
    6224             :     }
    6225        2364 :     nBufferSize += nDTSize;
    6226             : 
    6227             : #if SIZEOF_VOIDP == 4
    6228             :     if( nBufferSize > INT_MAX )
    6229             :     {
    6230             :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    6231             :         return CE_Failure;
    6232             :     }
    6233             : #endif
    6234        2364 :     *pnBufferSize = (size_t)nBufferSize;
    6235        2364 :     return CE_None;
    6236             : }
    6237             : 
    6238        2015 : SWIGINTERN void delete_GDALMDArrayHS(GDALMDArrayHS *self){
    6239        2015 :     GDALMDArrayRelease(self);
    6240        2015 :   }
    6241          83 : SWIGINTERN char const *GDALMDArrayHS_GetName(GDALMDArrayHS *self){
    6242          83 :     return GDALMDArrayGetName(self);
    6243             :   }
    6244          50 : SWIGINTERN char const *GDALMDArrayHS_GetFullName(GDALMDArrayHS *self){
    6245          50 :     return GDALMDArrayGetFullName(self);
    6246             :   }
    6247           6 : SWIGINTERN GUIntBig GDALMDArrayHS_GetTotalElementsCount(GDALMDArrayHS *self){
    6248           6 :     return GDALMDArrayGetTotalElementsCount(self);
    6249             :   }
    6250        3505 : SWIGINTERN size_t GDALMDArrayHS_GetDimensionCount(GDALMDArrayHS *self){
    6251        3505 :     return GDALMDArrayGetDimensionCount(self);
    6252             :   }
    6253        2279 : SWIGINTERN void GDALMDArrayHS_GetDimensions(GDALMDArrayHS *self,GDALDimensionHS ***pdims,size_t *pnCount){
    6254        4558 :     *pdims = GDALMDArrayGetDimensions(self, pnCount);
    6255             :   }
    6256          13 : SWIGINTERN void GDALMDArrayHS_GetCoordinateVariables(GDALMDArrayHS *self,GDALMDArrayHS ***parrays,size_t *pnCount){
    6257          26 :     *parrays = GDALMDArrayGetCoordinateVariables(self, pnCount);
    6258             :   }
    6259          93 : SWIGINTERN void GDALMDArrayHS_GetBlockSize(GDALMDArrayHS *self,GUIntBig **psizes,size_t *pnCount){
    6260         186 :     *psizes = GDALMDArrayGetBlockSize(self, pnCount);
    6261             :   }
    6262           1 : SWIGINTERN void GDALMDArrayHS_GetProcessingChunkSize(GDALMDArrayHS *self,size_t nMaxChunkMemory,GUIntBig **psizes,size_t *pnCount){
    6263           1 :      size_t* panTmp = GDALMDArrayGetProcessingChunkSize(self, pnCount, nMaxChunkMemory);
    6264           1 :      *psizes = NULL;
    6265           1 :      if( panTmp )
    6266             :      {
    6267           1 :         *psizes = (GUIntBig*) CPLMalloc(sizeof(GUIntBig) * (*pnCount));
    6268           3 :         for( size_t i = 0; i < *pnCount; ++i )
    6269             :         {
    6270           2 :             (*psizes)[i] = panTmp[i];
    6271             :         }
    6272           1 :         CPLFree(panTmp);
    6273             :      }
    6274           1 :   }
    6275        1972 : SWIGINTERN GDALExtendedDataTypeHS *GDALMDArrayHS_GetDataType(GDALMDArrayHS *self){
    6276        1972 :     return GDALMDArrayGetDataType(self);
    6277             :   }
    6278          15 : SWIGINTERN char **GDALMDArrayHS_GetStructuralInfo(GDALMDArrayHS *self){
    6279          15 :     return GDALMDArrayGetStructuralInfo( self );
    6280             :   }
    6281          44 : SWIGINTERN CPLErr GDALMDArrayHS_Resize(GDALMDArrayHS *self,int newDimensions,GUIntBig *newSizes,char **options=NULL){
    6282          44 :     if( static_cast<size_t>(newDimensions) != GDALMDArrayGetDimensionCount(self) )
    6283             :     {
    6284           2 :         CPLError(CE_Failure, CPLE_IllegalArg,
    6285             :                  "newSizes array not of expected size");
    6286           2 :         return CE_Failure;
    6287             :     }
    6288          42 :     return GDALMDArrayResize( self, newSizes, options ) ? CE_None : CE_Failure;
    6289             :   }
    6290             : 
    6291             : static GIntBig*
    6292        4821 : CreateCGIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
    6293             :   /* check if is List */
    6294        4821 :   if ( !PySequence_Check(pySeq) ) {
    6295           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    6296           0 :     *pnSize = -1;
    6297           0 :     return NULL;
    6298             :   }
    6299        4821 :   Py_ssize_t size = PySequence_Size(pySeq);
    6300        4821 :   if( size > (Py_ssize_t)INT_MAX ) {
    6301           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6302           0 :     *pnSize = -1;
    6303           0 :     return NULL;
    6304             :   }
    6305        4821 :   if( (size_t)size > SIZE_MAX / sizeof(GIntBig) ) {
    6306           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6307           0 :     *pnSize = -1;
    6308           0 :     return NULL;
    6309             :   }
    6310        4821 :   *pnSize = (int)size;
    6311        4821 :   GIntBig* ret = (GIntBig*) malloc((*pnSize)*sizeof(GIntBig));
    6312        4821 :   if( !ret ) {
    6313           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    6314           0 :     *pnSize = -1;
    6315           0 :     return NULL;
    6316             :   }
    6317       13719 :   for( int i = 0; i<*pnSize; i++ ) {
    6318        8898 :     PyObject *o = PySequence_GetItem(pySeq,i);
    6319        8898 :     if ( !PyArg_Parse(o,"L",&ret[i]) ) {
    6320           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    6321           0 :         Py_DECREF(o);
    6322           0 :         free(ret);
    6323           0 :         *pnSize = -1;
    6324           0 :         return NULL;
    6325             :     }
    6326        8898 :     Py_DECREF(o);
    6327             :   }
    6328             :   return ret;
    6329             : }
    6330             : 
    6331        1889 : 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){
    6332        1889 :     *buf = NULL;
    6333             : 
    6334        1889 :     size_t buf_size = 0;
    6335        1889 :     if( MDArrayReadWriteCheckArguments(self, true,
    6336             :                                         nDims1, array_start_idx,
    6337             :                                         nDims2, count,
    6338             :                                         nDims3, array_step,
    6339             :                                         nDims4, buffer_stride,
    6340             :                                         buffer_datatype,
    6341             :                                         &buf_size) != CE_None )
    6342             :     {
    6343             :       return CE_Failure;
    6344             :     }
    6345             : 
    6346        1885 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6347        3774 :     std::vector<size_t> count_internal(nExpectedDims + 1);
    6348        3770 :     std::vector<GPtrDiff_t> buffer_stride_internal(nExpectedDims + 1);
    6349        1885 :     size_t nProductCount = 1;
    6350        5414 :     for( int i = 0; i < nExpectedDims; i++ )
    6351             :     {
    6352        3529 :         count_internal[i] = (size_t)count[i];
    6353        3529 :         if( count_internal[i] != count[i] )
    6354             :         {
    6355             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6356             :             return CE_Failure;
    6357             :         }
    6358        3529 :         nProductCount *= count_internal[i];
    6359        3529 :         buffer_stride_internal[i] = (GPtrDiff_t)buffer_stride[i];
    6360        3529 :         if( buffer_stride_internal[i] != buffer_stride[i] )
    6361             :         {
    6362           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6363             :             return CE_Failure;
    6364             :         }
    6365             :     }
    6366             : 
    6367        1885 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6368        1885 :     bool isSelfString = GDALExtendedDataTypeGetClass(selfType) == GEDTC_STRING;
    6369        1885 :     GDALExtendedDataTypeRelease(selfType);
    6370             : 
    6371        1885 :     if( GDALExtendedDataTypeGetClass(buffer_datatype) == GEDTC_STRING &&
    6372             :         isSelfString )
    6373             :     {
    6374             :         size_t nExpectedStride = 1;
    6375          60 :         for( int i = nExpectedDims; i > 0; )
    6376             :         {
    6377          35 :             --i;
    6378          35 :             if( (size_t)buffer_stride_internal[i] != nExpectedStride )
    6379             :             {
    6380           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Unhandled stride");
    6381             :                 return CE_Failure;
    6382             :             }
    6383          35 :             nExpectedStride *= count_internal[i];
    6384             :         }
    6385          25 :         char** ppszBuffer = (char**)VSI_CALLOC_VERBOSE(nProductCount, sizeof(char*));
    6386          25 :         if( !ppszBuffer )
    6387             :             return CE_Failure;
    6388          25 :         GByte* pabyBuffer = (GByte*)ppszBuffer;
    6389          25 :         if( !(GDALMDArrayRead( self,
    6390             :                             array_start_idx,
    6391          25 :                             &count_internal[0],
    6392             :                             array_step,
    6393             :                             NULL,
    6394             :                             buffer_datatype,
    6395             :                             pabyBuffer,
    6396             :                             pabyBuffer,
    6397             :                             nProductCount * sizeof(char*) )) )
    6398             :         {
    6399           0 :             for( size_t i = 0; i < nProductCount; i++ )
    6400           0 :                 VSIFree(ppszBuffer[i]);
    6401           0 :             VSIFree(pabyBuffer);
    6402             :             return CE_Failure;
    6403             :         }
    6404             : 
    6405          25 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6406          25 :         PyObject* obj = PyList_New( nProductCount );
    6407         176 :         for( size_t i = 0; i < nProductCount; i++ )
    6408             :         {
    6409         151 :             if( !ppszBuffer[i] )
    6410             :             {
    6411           3 :                 Py_INCREF(Py_None);
    6412           3 :                 PyList_SetItem(obj, i, Py_None);
    6413             :             }
    6414             :             else
    6415             :             {
    6416         148 :                 PyList_SetItem(obj, i, GDALPythonObjectFromCStr( ppszBuffer[i] ) );
    6417             :             }
    6418         151 :             VSIFree(ppszBuffer[i]);
    6419             :         }
    6420          25 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6421          25 :         *buf = obj;
    6422          25 :         VSIFree(pabyBuffer);
    6423          25 :         return CE_None;
    6424             :     }
    6425             : 
    6426        1860 :     if( MDArrayReadWriteCheckArguments(self, false,
    6427             :                                         nDims1, array_start_idx,
    6428             :                                         nDims2, count,
    6429             :                                         nDims3, array_step,
    6430             :                                         nDims4, buffer_stride,
    6431             :                                         buffer_datatype,
    6432             :                                         &buf_size) != CE_None )
    6433             :     {
    6434             :       return CE_Failure;
    6435             :     }
    6436        1849 :     if( buf_size == 0 )
    6437             :     {
    6438             :         return CE_None;
    6439             :     }
    6440             : 
    6441             : 
    6442        3734 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6443        1849 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    6444        1849 :     if (*buf == NULL)
    6445             :     {
    6446           0 :         *buf = Py_None;
    6447           0 :         if( !GetUseExceptions() )
    6448             :         {
    6449           0 :             PyErr_Clear();
    6450             :         }
    6451           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6452           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6453             :         return CE_Failure;
    6454             :     }
    6455        1849 :     char *data = PyByteArray_AsString( (PyObject *)*buf );
    6456        1849 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6457             : 
    6458        1849 :     memset(data, 0, buf_size);
    6459             : 
    6460        1849 :     CPLErr eErr = GDALMDArrayRead( self,
    6461             :                                    array_start_idx,
    6462        1849 :                                    &count_internal[0],
    6463             :                                    array_step,
    6464        1849 :                                    &buffer_stride_internal[0],
    6465             :                                    buffer_datatype,
    6466             :                                    data,
    6467             :                                    data,
    6468        1874 :                                    buf_size ) ? CE_None : CE_Failure;
    6469          25 :     if (eErr == CE_Failure)
    6470             :     {
    6471          25 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6472          25 :         Py_DECREF((PyObject*)*buf);
    6473          25 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6474          25 :         *buf = NULL;
    6475             :     }
    6476             : 
    6477             :     return eErr;
    6478             :   }
    6479          13 : 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){
    6480             : 
    6481          13 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6482          26 :     std::vector<size_t> count_internal(nExpectedDims + 1);
    6483          13 :     if( nExpectedDims > 1 )
    6484             :     {
    6485           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6486             :             "Unsupported number of dimensions");
    6487             :         return CE_Failure;
    6488             :     }
    6489          25 :     for( int i = 0; i < nExpectedDims; i++ )
    6490             :     {
    6491          12 :         count_internal[i] = (size_t)count[i];
    6492          12 :         if( count_internal[i] != count[i] )
    6493             :         {
    6494             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6495             :             return CE_Failure;
    6496             :         }
    6497             :     }
    6498          13 :     if( nExpectedDims == 1 )
    6499             :     {
    6500          12 :         if( nDims1 != 1 )
    6501             :         {
    6502           0 :             CPLError(CE_Failure, CPLE_AppDefined,
    6503             :                 "Wrong number of values in array_start_idx");
    6504             :             return CE_Failure;
    6505             :         }
    6506          12 :         if( nDims2 != 1 )
    6507             :         {
    6508           0 :             CPLError(CE_Failure, CPLE_AppDefined,
    6509             :                 "Wrong number of values in count");
    6510             :             return CE_Failure;
    6511             :         }
    6512          12 :         if( nDims3 != 1 )
    6513             :         {
    6514           0 :             CPLError(CE_Failure, CPLE_AppDefined,
    6515             :                 "Wrong number of values in array_step");
    6516             :             return CE_Failure;
    6517             :         }
    6518             :     }
    6519             : 
    6520          26 :     CPLErr eErr = GDALMDArrayWrite(self,
    6521             :                                    array_start_idx,
    6522          13 :                                    &count_internal[0],
    6523             :                                    array_step,
    6524             :                                    NULL,
    6525             :                                    buffer_datatype,
    6526             :                                    options,
    6527             :                                    options,
    6528          13 :                                    CSLCount(options) * sizeof(char*) ) ? CE_None : CE_Failure;
    6529             :     return eErr;
    6530             :   }
    6531         515 : 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){
    6532             : 
    6533         515 :     size_t buf_size = 0;
    6534         515 :     if( MDArrayReadWriteCheckArguments(self, false,
    6535             :                                         nDims1, array_start_idx,
    6536             :                                         nDims2, count,
    6537             :                                         nDims3, array_step,
    6538             :                                         nDims4, buffer_stride,
    6539             :                                         buffer_datatype,
    6540             :                                         &buf_size) != CE_None )
    6541             :     {
    6542             :       return CE_Failure;
    6543             :     }
    6544             : 
    6545         515 :     if ( (GUIntBig)buf_len < buf_size )
    6546             :     {
    6547           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    6548           2 :         return CE_Failure;
    6549             :     }
    6550             : 
    6551         513 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6552        1028 :     std::vector<size_t> count_internal(nExpectedDims+1);
    6553        1026 :     std::vector<GPtrDiff_t> buffer_stride_internal(nExpectedDims+1);
    6554        1410 :     for( int i = 0; i < nExpectedDims; i++ )
    6555             :     {
    6556         897 :         count_internal[i] = (size_t)count[i];
    6557         897 :         if( count_internal[i] != count[i] )
    6558             :         {
    6559             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6560             :             return CE_Failure;
    6561             :         }
    6562         897 :         buffer_stride_internal[i] = (GPtrDiff_t)buffer_stride[i];
    6563         897 :         if( buffer_stride_internal[i] != buffer_stride[i] )
    6564             :         {
    6565           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6566             :             return CE_Failure;
    6567             :         }
    6568             :     }
    6569             : 
    6570         513 :     CPLErr eErr = GDALMDArrayWrite( self,
    6571             :                                    array_start_idx,
    6572         513 :                                    &count_internal[0],
    6573             :                                    array_step,
    6574         513 :                                    &buffer_stride_internal[0],
    6575             :                                    buffer_datatype,
    6576             :                                    buf_string,
    6577             :                                    buf_string,
    6578         516 :                                    (size_t)buf_len ) ? CE_None : CE_Failure;
    6579             :     return eErr;
    6580             :   }
    6581          22 : SWIGINTERN CPLErr GDALMDArrayHS_AdviseRead(GDALMDArrayHS *self,int nDims1,GUIntBig *array_start_idx,int nDims2,GUIntBig *count,char **options=0){
    6582             : 
    6583          22 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6584          22 :     if( nDims1 != nExpectedDims )
    6585             :     {
    6586           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6587             :             "Wrong number of values in array_start_idx");
    6588           0 :         return CE_Failure;
    6589             :     }
    6590          22 :     if( nDims2 != nExpectedDims )
    6591             :     {
    6592           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6593             :             "Wrong number of values in count");
    6594           0 :         return CE_Failure;
    6595             :     }
    6596             : 
    6597          44 :     std::vector<size_t> count_internal(nExpectedDims+1);
    6598          58 :     for( int i = 0; i < nExpectedDims; i++ )
    6599             :     {
    6600          36 :         count_internal[i] = (size_t)count[i];
    6601          36 :         if( count_internal[i] != count[i] )
    6602             :         {
    6603             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6604             :             return CE_Failure;
    6605             :         }
    6606             :     }
    6607             : 
    6608          22 :     if( !(GDALMDArrayAdviseReadEx( self, array_start_idx, count_internal.data(), options )) )
    6609             :     {
    6610           5 :         return CE_Failure;
    6611             :     }
    6612             :     return CE_None;
    6613             :   }
    6614         119 : SWIGINTERN GDALAttributeHS *GDALMDArrayHS_GetAttribute(GDALMDArrayHS *self,char const *name){
    6615             : 
    6616         119 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    6617             : 
    6618         119 :     GDALAttributeH hRet = GDALMDArrayGetAttribute(self, name);
    6619             : 
    6620         137 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    6621           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Attribute %s does not exist", name);
    6622             : 
    6623         119 :     return hRet;
    6624             :   }
    6625          58 : SWIGINTERN void GDALMDArrayHS_GetAttributes(GDALMDArrayHS *self,GDALAttributeHS ***pattrs,size_t *pnCount,char **options=0){
    6626         116 :     *pattrs = GDALMDArrayGetAttributes(self, pnCount, options);
    6627             :   }
    6628         150 : SWIGINTERN GDALAttributeHS *GDALMDArrayHS_CreateAttribute(GDALMDArrayHS *self,char const *name,int dimensions,GUIntBig *sizes,GDALExtendedDataTypeHS *data_type,char **options=0){
    6629         150 :     return GDALMDArrayCreateAttribute(self, name, dimensions,
    6630             :                                     (const GUInt64*) sizes,
    6631             :                                     data_type, options);
    6632             :   }
    6633          24 : SWIGINTERN CPLErr GDALMDArrayHS_DeleteAttribute(GDALMDArrayHS *self,char const *name,char **options=0){
    6634          24 :     return GDALMDArrayDeleteAttribute(self, name, options) ? CE_None : CE_Failure;
    6635             :   }
    6636          72 : SWIGINTERN CPLErr GDALMDArrayHS_GetNoDataValueAsRaw(GDALMDArrayHS *self,void **buf){
    6637          72 :     *buf = NULL;
    6638          72 :     const void* pabyBuf = GDALMDArrayGetRawNoDataValue(self);
    6639          72 :     if( pabyBuf == NULL )
    6640             :     {
    6641             :       return CE_Failure;
    6642             :     }
    6643          36 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6644          36 :     const size_t buf_size = GDALExtendedDataTypeGetSize(selfType);
    6645          36 :     GDALExtendedDataTypeRelease(selfType);
    6646             : 
    6647         108 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6648          36 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    6649          36 :     if (*buf == NULL)
    6650             :     {
    6651           0 :         *buf = Py_None;
    6652           0 :         if( !GetUseExceptions() )
    6653             :         {
    6654           0 :             PyErr_Clear();
    6655             :         }
    6656           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6657           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6658             :         return CE_Failure;
    6659             :     }
    6660          36 :     char *data = PyByteArray_AsString( (PyObject *)*buf );
    6661          36 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6662             : 
    6663          36 :     memcpy(data, pabyBuf, buf_size);
    6664             : 
    6665          36 :     return CE_None;
    6666             :   }
    6667         120 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsDouble(GDALMDArrayHS *self,double *val,int *hasval){
    6668         240 :     *val = GDALMDArrayGetNoDataValueAsDouble( self, hasval );
    6669             :   }
    6670          11 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsInt64(GDALMDArrayHS *self,GIntBig *val,int *hasval){
    6671          22 :     *val = GDALMDArrayGetNoDataValueAsInt64( self, hasval );
    6672             :   }
    6673           7 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsUInt64(GDALMDArrayHS *self,GUIntBig *val,int *hasval){
    6674          14 :     *val = GDALMDArrayGetNoDataValueAsUInt64( self, hasval );
    6675             :   }
    6676           5 : SWIGINTERN retStringAndCPLFree *GDALMDArrayHS_GetNoDataValueAsString(GDALMDArrayHS *self){
    6677           5 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6678           5 :     const size_t typeClass = GDALExtendedDataTypeGetClass(selfType);
    6679           5 :     GDALExtendedDataTypeRelease(selfType);
    6680             : 
    6681           5 :     if( typeClass != GEDTC_STRING )
    6682             :     {
    6683           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Data type is not string");
    6684           1 :         return NULL;
    6685             :     }
    6686           4 :     const void* pabyBuf = GDALMDArrayGetRawNoDataValue(self);
    6687           4 :     if( pabyBuf == NULL )
    6688             :     {
    6689             :       return NULL;
    6690             :     }
    6691           3 :     const char* ret = *reinterpret_cast<const char* const*>(pabyBuf);
    6692           3 :     if( ret )
    6693           2 :         return CPLStrdup(ret);
    6694             :     return NULL;
    6695             :   }
    6696          51 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueDouble(GDALMDArrayHS *self,double d){
    6697          51 :     return GDALMDArraySetNoDataValueAsDouble( self, d ) ? CE_None : CE_Failure;
    6698             :   }
    6699           1 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueInt64(GDALMDArrayHS *self,GIntBig v){
    6700           1 :     return GDALMDArraySetNoDataValueAsInt64( self, v ) ? CE_None : CE_Failure;
    6701             :   }
    6702           1 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueUInt64(GDALMDArrayHS *self,GUIntBig v){
    6703           1 :     return GDALMDArraySetNoDataValueAsUInt64( self, v ) ? CE_None : CE_Failure;
    6704             :   }
    6705           3 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueString(GDALMDArrayHS *self,char const *nodata){
    6706           3 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6707           3 :     const size_t typeClass = GDALExtendedDataTypeGetClass(selfType);
    6708           3 :     GDALExtendedDataTypeRelease(selfType);
    6709             : 
    6710           3 :     if( typeClass != GEDTC_STRING )
    6711             :     {
    6712           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Data type is not string");
    6713           0 :         return CE_Failure;
    6714             :     }
    6715           3 :     return GDALMDArraySetRawNoDataValue(self, &nodata) ? CE_None : CE_Failure;
    6716             :   }
    6717           8 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueRaw(GDALMDArrayHS *self,GIntBig nLen,char *pBuf){
    6718           8 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6719           8 :     const size_t selfTypeSize = GDALExtendedDataTypeGetSize(selfType);
    6720           8 :     GDALExtendedDataTypeRelease(selfType);
    6721             : 
    6722           8 :     if( static_cast<size_t>(nLen) != selfTypeSize )
    6723             :     {
    6724           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Argument of wrong size");
    6725           1 :         return CE_Failure;
    6726             :     }
    6727           7 :     return GDALMDArraySetRawNoDataValue(self, pBuf) ? CE_None : CE_Failure;
    6728             :   }
    6729           4 : SWIGINTERN CPLErr GDALMDArrayHS_DeleteNoDataValue(GDALMDArrayHS *self){
    6730           4 :     return GDALMDArraySetRawNoDataValue( self, NULL ) ? CE_None : CE_Failure;
    6731             :   }
    6732         100 : SWIGINTERN void GDALMDArrayHS_GetOffset(GDALMDArrayHS *self,double *val,int *hasval){
    6733         200 :     *val = GDALMDArrayGetOffset( self, hasval );
    6734             :   }
    6735           5 : SWIGINTERN GDALDataType GDALMDArrayHS_GetOffsetStorageType(GDALMDArrayHS *self){
    6736           5 :     GDALDataType eDT = GDT_Unknown;
    6737           5 :     int hasval = FALSE;
    6738           5 :     GDALMDArrayGetOffsetEx( self, &hasval, &eDT );
    6739           5 :     return hasval ? eDT : GDT_Unknown;
    6740             :   }
    6741         103 : SWIGINTERN void GDALMDArrayHS_GetScale(GDALMDArrayHS *self,double *val,int *hasval){
    6742         206 :     *val = GDALMDArrayGetScale( self, hasval );
    6743             :   }
    6744           5 : SWIGINTERN GDALDataType GDALMDArrayHS_GetScaleStorageType(GDALMDArrayHS *self){
    6745           5 :     GDALDataType eDT = GDT_Unknown;
    6746           5 :     int hasval = FALSE;
    6747           5 :     GDALMDArrayGetScaleEx( self, &hasval, &eDT );
    6748           5 :     return hasval ? eDT : GDT_Unknown;
    6749             :   }
    6750          21 : SWIGINTERN CPLErr GDALMDArrayHS_SetOffset(GDALMDArrayHS *self,double val,GDALDataType storageType=GDT_Unknown){
    6751          21 :     return GDALMDArraySetOffsetEx( self, val, storageType ) ? CE_None : CE_Failure;
    6752             :   }
    6753          21 : SWIGINTERN CPLErr GDALMDArrayHS_SetScale(GDALMDArrayHS *self,double val,GDALDataType storageType=GDT_Unknown){
    6754          21 :     return GDALMDArraySetScaleEx( self, val, storageType ) ? CE_None : CE_Failure;
    6755             :   }
    6756          15 : SWIGINTERN CPLErr GDALMDArrayHS_SetUnit(GDALMDArrayHS *self,char const *unit){
    6757          15 :     return GDALMDArraySetUnit(self, unit) ? CE_None : CE_Failure;
    6758             :   }
    6759         111 : SWIGINTERN char const *GDALMDArrayHS_GetUnit(GDALMDArrayHS *self){
    6760         111 :     return GDALMDArrayGetUnit(self);
    6761             :   }
    6762          30 : SWIGINTERN OGRErr GDALMDArrayHS_SetSpatialRef(GDALMDArrayHS *self,OSRSpatialReferenceShadow *srs){
    6763          30 :      return GDALMDArraySetSpatialRef( self, (OGRSpatialReferenceH)srs ) ? CE_None : CE_Failure;
    6764             :   }
    6765          77 : SWIGINTERN OSRSpatialReferenceShadow *GDALMDArrayHS_GetSpatialRef(GDALMDArrayHS *self){
    6766          77 :     return (OSRSpatialReferenceShadow*) GDALMDArrayGetSpatialRef(self);
    6767             :   }
    6768         430 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetView(GDALMDArrayHS *self,char const *viewExpr){
    6769         430 :     return GDALMDArrayGetView(self, viewExpr);
    6770             :   }
    6771          44 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_Transpose(GDALMDArrayHS *self,int axisMap,int *mapInts){
    6772          44 :     return GDALMDArrayTranspose(self, axisMap, mapInts);
    6773             :   }
    6774          13 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetUnscaled(GDALMDArrayHS *self){
    6775          13 :     return GDALMDArrayGetUnscaled(self);
    6776             :   }
    6777          35 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetMask(GDALMDArrayHS *self,char **options=0){
    6778          35 :     return GDALMDArrayGetMask(self, options);
    6779             :   }
    6780          22 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetGridded(GDALMDArrayHS *self,char const *pszGridOptions,GDALMDArrayHS *xArray=NULL,GDALMDArrayHS *yArray=NULL,char **options=0){
    6781          22 :     return GDALMDArrayGetGridded(self, pszGridOptions, xArray, yArray, options);
    6782             :   }
    6783          71 : SWIGINTERN GDALDatasetShadow *GDALMDArrayHS_AsClassicDataset(GDALMDArrayHS *self,size_t iXDim,size_t iYDim,GDALGroupHS *hRootGroup=NULL,char **options=0){
    6784          71 :     return (GDALDatasetShadow*)GDALMDArrayAsClassicDatasetEx(self, iXDim, iYDim, hRootGroup, options);
    6785             :   }
    6786          15 : SWIGINTERN Statistics *GDALMDArrayHS_GetStatistics(GDALMDArrayHS *self,bool approx_ok=FALSE,bool force=TRUE,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    6787          15 :         GUInt64 nValidCount = 0;
    6788          15 :         Statistics* psStatisticsOut = (Statistics*)CPLMalloc(sizeof(Statistics));
    6789          15 :         CPLErr eErr = GDALMDArrayGetStatistics(self, NULL, approx_ok, force,
    6790             :                                  &(psStatisticsOut->min),
    6791             :                                  &(psStatisticsOut->max),
    6792             :                                  &(psStatisticsOut->mean),
    6793             :                                  &(psStatisticsOut->std_dev),
    6794             :                                  &nValidCount,
    6795             :                                  callback, callback_data);
    6796          15 :         psStatisticsOut->valid_count = static_cast<GIntBig>(nValidCount);
    6797          15 :         if( eErr == CE_None )
    6798             :             return psStatisticsOut;
    6799           5 :         CPLFree(psStatisticsOut);
    6800             :         return NULL;
    6801             :   }
    6802           4 : SWIGINTERN Statistics *GDALMDArrayHS_ComputeStatistics(GDALMDArrayHS *self,bool approx_ok=FALSE,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=0){
    6803           4 :         GUInt64 nValidCount = 0;
    6804           4 :         Statistics* psStatisticsOut = (Statistics*)CPLMalloc(sizeof(Statistics));
    6805           4 :         int nSuccess = GDALMDArrayComputeStatisticsEx(self, NULL, approx_ok,
    6806             :                                  &(psStatisticsOut->min),
    6807             :                                  &(psStatisticsOut->max),
    6808             :                                  &(psStatisticsOut->mean),
    6809             :                                  &(psStatisticsOut->std_dev),
    6810             :                                  &nValidCount,
    6811             :                                  callback, callback_data, options);
    6812           4 :         psStatisticsOut->valid_count = static_cast<GIntBig>(nValidCount);
    6813           4 :         if( nSuccess )
    6814             :             return psStatisticsOut;
    6815           0 :         CPLFree(psStatisticsOut);
    6816             :         return NULL;
    6817             :   }
    6818          34 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetResampled(GDALMDArrayHS *self,int nDimensions,GDALDimensionHS **dimensions,GDALRIOResampleAlg resample_alg,OSRSpatialReferenceShadow **srs,char **options=0){
    6819          34 :     return GDALMDArrayGetResampled(self, nDimensions, dimensions,
    6820             :                                   resample_alg, srs ? *srs : NULL, options);
    6821             :   }
    6822           7 : SWIGINTERN void GDALMDArrayHS_GetMeshGrid(int nInputArrays,GDALMDArrayHS **ahInputArrays,GDALMDArrayHS ***outputArrays,size_t *pnCountOutputArrays,char **options=0){
    6823          14 :     *outputArrays = GDALMDArrayGetMeshGrid(ahInputArrays, nInputArrays, pnCountOutputArrays, options);
    6824             :   }
    6825           7 : SWIGINTERN bool GDALMDArrayHS_Cache(GDALMDArrayHS *self,char **options=NULL){
    6826          14 :       return GDALMDArrayCache(self, options);
    6827             :   }
    6828          28 : SWIGINTERN CPLErr GDALMDArrayHS_Rename(GDALMDArrayHS *self,char const *newName){
    6829          28 :     return GDALMDArrayRename( self, newName ) ? CE_None : CE_Failure;
    6830             :   }
    6831         720 : SWIGINTERN void delete_GDALAttributeHS(GDALAttributeHS *self){
    6832         720 :     GDALAttributeRelease(self);
    6833         720 :   }
    6834         361 : SWIGINTERN char const *GDALAttributeHS_GetName(GDALAttributeHS *self){
    6835         361 :     return GDALAttributeGetName(self);
    6836             :   }
    6837          49 : SWIGINTERN char const *GDALAttributeHS_GetFullName(GDALAttributeHS *self){
    6838          49 :     return GDALAttributeGetFullName(self);
    6839             :   }
    6840         176 : SWIGINTERN GUIntBig GDALAttributeHS_GetTotalElementsCount(GDALAttributeHS *self){
    6841         176 :     return GDALAttributeGetTotalElementsCount(self);
    6842             :   }
    6843          12 : SWIGINTERN size_t GDALAttributeHS_GetDimensionCount(GDALAttributeHS *self){
    6844          12 :     return GDALAttributeGetDimensionCount(self);
    6845             :   }
    6846          11 : SWIGINTERN void GDALAttributeHS_GetDimensionsSize(GDALAttributeHS *self,GUIntBig **pdims,size_t *pnCount){
    6847          22 :     *pdims = GDALAttributeGetDimensionsSize(self, pnCount);
    6848             :   }
    6849         412 : SWIGINTERN GDALExtendedDataTypeHS *GDALAttributeHS_GetDataType(GDALAttributeHS *self){
    6850         412 :     return GDALAttributeGetDataType(self);
    6851             :   }
    6852          10 : SWIGINTERN CPLErr GDALAttributeHS_ReadAsRaw(GDALAttributeHS *self,void **buf){
    6853          10 :     *buf = NULL;
    6854          10 :     GDALExtendedDataTypeHS* dt = GDALAttributeGetDataType(self);
    6855          10 :     bool bIsNumeric = CheckNumericDataType(dt);
    6856          10 :     GDALExtendedDataTypeRelease(dt);
    6857          10 :     if( !bIsNumeric )
    6858             :     {
    6859           4 :         CPLError(CE_Failure, CPLE_NotSupported,
    6860             :             "non-numeric buffer data type not supported in SWIG bindings");
    6861           4 :         return CE_Failure;
    6862             :     }
    6863           6 :     size_t buf_size = 0;
    6864           6 :     GByte* pabyBuf = GDALAttributeReadAsRaw(self, &buf_size);
    6865           6 :     if( pabyBuf == NULL )
    6866             :     {
    6867             :       return CE_Failure;
    6868             :     }
    6869             : 
    6870          16 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6871           6 :     *buf = (void *)PyBytes_FromStringAndSize( NULL, buf_size );
    6872           6 :     if (*buf == NULL)
    6873             :     {
    6874           0 :         *buf = Py_None;
    6875           0 :         if( !GetUseExceptions() )
    6876             :         {
    6877           0 :             PyErr_Clear();
    6878             :         }
    6879           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6880           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6881           0 :         GDALAttributeFreeRawResult(self, pabyBuf, buf_size);
    6882             :         return CE_Failure;
    6883             :     }
    6884           6 :     char *data = PyBytes_AsString( (PyObject *)*buf );
    6885           6 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6886             : 
    6887           6 :     memcpy(data, pabyBuf, buf_size);
    6888           6 :     GDALAttributeFreeRawResult(self, pabyBuf, buf_size);
    6889             : 
    6890             :     return CE_None;
    6891             :   }
    6892         107 : SWIGINTERN char const *GDALAttributeHS_ReadAsString(GDALAttributeHS *self){
    6893         107 :     return GDALAttributeReadAsString(self);
    6894             :   }
    6895          22 : SWIGINTERN int GDALAttributeHS_ReadAsInt(GDALAttributeHS *self){
    6896          22 :     return GDALAttributeReadAsInt(self);
    6897             :   }
    6898          15 : SWIGINTERN long long GDALAttributeHS_ReadAsInt64(GDALAttributeHS *self){
    6899          15 :     return GDALAttributeReadAsInt64(self);
    6900             :   }
    6901             : 
    6902             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6903             : SWIGINTERNINLINE PyObject* 
    6904          15 : SWIG_From_long_SS_long  (long long value)
    6905             : {
    6906          15 :   return ((value < LONG_MIN) || (value > LONG_MAX)) ?
    6907             :     PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value));
    6908             : }
    6909             : #endif
    6910             : 
    6911          40 : SWIGINTERN double GDALAttributeHS_ReadAsDouble(GDALAttributeHS *self){
    6912          40 :     return GDALAttributeReadAsDouble(self);
    6913             :   }
    6914          19 : SWIGINTERN char **GDALAttributeHS_ReadAsStringArray(GDALAttributeHS *self){
    6915          19 :     return GDALAttributeReadAsStringArray(self);
    6916             :   }
    6917             : 
    6918             : static PyObject *
    6919          15 : CreateTupleFromIntArray( const int *first, size_t size ) {
    6920          15 :   PyObject *out = PyTuple_New( size );
    6921         819 :   for( unsigned int i=0; i<size; i++ ) {
    6922         804 :     PyObject *val = PyInt_FromLong( *first );
    6923         804 :     ++first;
    6924         804 :     PyTuple_SetItem( out, i, val );
    6925             :   }
    6926          15 :   return out;
    6927             : }
    6928             : 
    6929          15 : SWIGINTERN void GDALAttributeHS_ReadAsIntArray(GDALAttributeHS *self,int **pvals,size_t *pnCount){
    6930          30 :     *pvals = GDALAttributeReadAsIntArray(self, pnCount);
    6931             :   }
    6932             : 
    6933             : static PyObject *
    6934          14 : CreateTupleFromInt64Array( const long long *first, size_t size ) {
    6935          14 :   PyObject *out = PyTuple_New( size );
    6936          69 :   for( unsigned int i=0; i<size; i++ ) {
    6937          55 :     PyObject *val = PyLong_FromLongLong( *first );
    6938          55 :     ++first;
    6939          55 :     PyTuple_SetItem( out, i, val );
    6940             :   }
    6941          14 :   return out;
    6942             : }
    6943             : 
    6944          14 : SWIGINTERN void GDALAttributeHS_ReadAsInt64Array(GDALAttributeHS *self,long long **pvals,size_t *pnCount){
    6945          28 :     *pvals = (long long*)GDALAttributeReadAsInt64Array(self, pnCount);
    6946             :   }
    6947          29 : SWIGINTERN void GDALAttributeHS_ReadAsDoubleArray(GDALAttributeHS *self,double **pvals,size_t *pnCount){
    6948          58 :     *pvals = GDALAttributeReadAsDoubleArray(self, pnCount);
    6949             :   }
    6950           5 : SWIGINTERN CPLErr GDALAttributeHS_WriteRaw(GDALAttributeHS *self,GIntBig nLen,char *pBuf){
    6951           5 :     GDALExtendedDataTypeHS* dt = GDALAttributeGetDataType(self);
    6952           5 :     bool bIsNumeric = CheckNumericDataType(dt);
    6953           5 :     GDALExtendedDataTypeRelease(dt);
    6954           5 :     if( !bIsNumeric )
    6955             :     {
    6956           0 :         CPLError(CE_Failure, CPLE_NotSupported,
    6957             :             "non-numeric buffer data type not supported in SWIG bindings");
    6958           0 :         return CE_Failure;
    6959             :     }
    6960           5 :     return GDALAttributeWriteRaw(self, pBuf, nLen) ? CE_None : CE_Failure;
    6961             :   }
    6962         175 : SWIGINTERN CPLErr GDALAttributeHS_WriteString(GDALAttributeHS *self,char const *val){
    6963         175 :     return GDALAttributeWriteString(self, val) ? CE_None : CE_Failure;
    6964             :   }
    6965           8 : SWIGINTERN CPLErr GDALAttributeHS_WriteStringArray(GDALAttributeHS *self,char **vals){
    6966           8 :     return GDALAttributeWriteStringArray(self, vals) ? CE_None : CE_Failure;
    6967             :   }
    6968          22 : SWIGINTERN CPLErr GDALAttributeHS_WriteInt(GDALAttributeHS *self,int val){
    6969          22 :     return GDALAttributeWriteInt(self, val) ? CE_None : CE_Failure;
    6970             :   }
    6971             : 
    6972             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6973             : SWIGINTERN int
    6974          11 : SWIG_AsVal_long_SS_long (PyObject *obj, long long *val)
    6975             : {
    6976          11 :   int res = SWIG_TypeError;
    6977          11 :   if (PyLong_Check(obj)) {
    6978          11 :     long long v = PyLong_AsLongLong(obj);
    6979          11 :     if (!PyErr_Occurred()) {
    6980          11 :       if (val) *val = v;
    6981          11 :       return SWIG_OK;
    6982             :     } else {
    6983           0 :       PyErr_Clear();
    6984           0 :       res = SWIG_OverflowError;
    6985             :     }
    6986             :   } else {
    6987           0 :     long v;
    6988           0 :     res = SWIG_AsVal_long (obj,&v);
    6989           0 :     if (SWIG_IsOK(res)) {
    6990           0 :       if (val) *val = v;
    6991           0 :       return res;
    6992             :     }
    6993             :   }
    6994             : #ifdef SWIG_PYTHON_CAST_MODE
    6995             :   {
    6996             :     const double mant_max = 1LL << DBL_MANT_DIG;
    6997             :     const double mant_min = -mant_max;
    6998             :     double d;
    6999             :     res = SWIG_AsVal_double (obj,&d);
    7000             :     if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, mant_min, mant_max))
    7001             :       return SWIG_OverflowError;
    7002             :     if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) {
    7003             :       if (val) *val = (long long)(d);
    7004             :       return SWIG_AddCast(res);
    7005             :     }
    7006             :     res = SWIG_TypeError;
    7007             :   }
    7008             : #endif
    7009             :   return res;
    7010             : }
    7011             : #endif
    7012             : 
    7013          11 : SWIGINTERN CPLErr GDALAttributeHS_WriteInt64(GDALAttributeHS *self,long long val){
    7014          11 :     return GDALAttributeWriteInt64(self, val) ? CE_None : CE_Failure;
    7015             :   }
    7016          11 : SWIGINTERN CPLErr GDALAttributeHS_WriteDouble(GDALAttributeHS *self,double val){
    7017          11 :     return GDALAttributeWriteDouble(self, val) ? CE_None : CE_Failure;
    7018             :   }
    7019           9 : SWIGINTERN CPLErr GDALAttributeHS_WriteIntArray(GDALAttributeHS *self,int nList,int *pList){
    7020           9 :     return GDALAttributeWriteIntArray(self, pList, nList) ? CE_None : CE_Failure;
    7021             :   }
    7022             : 
    7023             : static long long*
    7024          10 : CreateCInt64ListFromSequence( PyObject* pySeq, int* pnSize ) {
    7025             :   /* check if is List */
    7026          10 :   if ( !PySequence_Check(pySeq) ) {
    7027           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    7028           0 :     *pnSize = -1;
    7029           0 :     return NULL;
    7030             :   }
    7031          10 :   Py_ssize_t size = PySequence_Size(pySeq);
    7032          10 :   if( size > (Py_ssize_t)INT_MAX ) {
    7033           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7034           0 :     *pnSize = -1;
    7035           0 :     return NULL;
    7036             :   }
    7037          10 :   if( (size_t)size > SIZE_MAX / sizeof(long long) ) {
    7038           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7039           0 :     *pnSize = -1;
    7040           0 :     return NULL;
    7041             :   }
    7042          10 :   *pnSize = (int)size;
    7043          10 :   long long* ret = (long long*) malloc((*pnSize)*sizeof(long long));
    7044          10 :   if( !ret ) {
    7045           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    7046           0 :     *pnSize = -1;
    7047           0 :     return NULL;
    7048             :   }
    7049          30 :   for( int i = 0; i<*pnSize; i++ ) {
    7050          20 :     PyObject *o = PySequence_GetItem(pySeq,i);
    7051          20 :     if ( !PyArg_Parse(o,"L",&ret[i]) ) {
    7052           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    7053           0 :         Py_DECREF(o);
    7054           0 :         free(ret);
    7055           0 :         *pnSize = -1;
    7056           0 :         return NULL;
    7057             :     }
    7058          20 :     Py_DECREF(o);
    7059             :   }
    7060             :   return ret;
    7061             : }
    7062             : 
    7063          10 : SWIGINTERN CPLErr GDALAttributeHS_WriteInt64Array(GDALAttributeHS *self,int nList,long long *pList){
    7064          10 :     return GDALAttributeWriteInt64Array(self, (int64_t*)pList, nList) ? CE_None : CE_Failure;
    7065             :   }
    7066             : 
    7067             : static double*
    7068         174 : CreateCDoubleListFromSequence( PyObject* pySeq, int* pnSize ) {
    7069             :   /* check if is List */
    7070         174 :   if ( !PySequence_Check(pySeq) ) {
    7071           1 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    7072           1 :     *pnSize = -1;
    7073           1 :     return NULL;
    7074             :   }
    7075         173 :   Py_ssize_t size = PySequence_Size(pySeq);
    7076         173 :   if( size > (Py_ssize_t)INT_MAX ) {
    7077           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7078           0 :     *pnSize = -1;
    7079           0 :     return NULL;
    7080             :   }
    7081         173 :   if( (size_t)size > SIZE_MAX / sizeof(double) ) {
    7082           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7083           0 :     *pnSize = -1;
    7084           0 :     return NULL;
    7085             :   }
    7086         173 :   *pnSize = (int)size;
    7087         173 :   double* ret = (double*) malloc((*pnSize)*sizeof(double));
    7088         173 :   if( !ret ) {
    7089           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    7090           0 :     *pnSize = -1;
    7091           0 :     return NULL;
    7092             :   }
    7093         560 :   for( int i = 0; i<*pnSize; i++ ) {
    7094         388 :     PyObject *o = PySequence_GetItem(pySeq,i);
    7095         388 :     if ( !PyArg_Parse(o,"d",&ret[i]) ) {
    7096           1 :         PyErr_SetString(PyExc_TypeError, "not an number");
    7097           1 :         Py_DECREF(o);
    7098           1 :         free(ret);
    7099           1 :         *pnSize = -1;
    7100           1 :         return NULL;
    7101             :     }
    7102         387 :     Py_DECREF(o);
    7103             :   }
    7104             :   return ret;
    7105             : }
    7106             : 
    7107           7 : SWIGINTERN CPLErr GDALAttributeHS_WriteDoubleArray(GDALAttributeHS *self,int nList,double *pList){
    7108           7 :     return GDALAttributeWriteDoubleArray(self, pList, nList) ? CE_None : CE_Failure;
    7109             :   }
    7110          27 : SWIGINTERN CPLErr GDALAttributeHS_Rename(GDALAttributeHS *self,char const *newName){
    7111          27 :     return GDALAttributeRename( self, newName ) ? CE_None : CE_Failure;
    7112             :   }
    7113        4908 : SWIGINTERN void delete_GDALDimensionHS(GDALDimensionHS *self){
    7114        4908 :     GDALDimensionRelease(self);
    7115        4908 :   }
    7116         274 : SWIGINTERN char const *GDALDimensionHS_GetName(GDALDimensionHS *self){
    7117         274 :     return GDALDimensionGetName(self);
    7118             :   }
    7119          80 : SWIGINTERN char const *GDALDimensionHS_GetFullName(GDALDimensionHS *self){
    7120          80 :     return GDALDimensionGetFullName(self);
    7121             :   }
    7122          52 : SWIGINTERN char const *GDALDimensionHS_GetType(GDALDimensionHS *self){
    7123          52 :     return GDALDimensionGetType(self);
    7124             :   }
    7125          22 : SWIGINTERN char const *GDALDimensionHS_GetDirection(GDALDimensionHS *self){
    7126          22 :     return GDALDimensionGetDirection(self);
    7127             :   }
    7128        3671 : SWIGINTERN GUIntBig GDALDimensionHS_GetSize(GDALDimensionHS *self){
    7129        3671 :     return GDALDimensionGetSize(self);
    7130             :   }
    7131         118 : SWIGINTERN GDALMDArrayHS *GDALDimensionHS_GetIndexingVariable(GDALDimensionHS *self){
    7132         118 :     return GDALDimensionGetIndexingVariable(self);
    7133             :   }
    7134          23 : SWIGINTERN bool GDALDimensionHS_SetIndexingVariable(GDALDimensionHS *self,GDALMDArrayHS *array){
    7135          46 :     return GDALDimensionSetIndexingVariable(self, array);
    7136             :   }
    7137          31 : SWIGINTERN CPLErr GDALDimensionHS_Rename(GDALDimensionHS *self,char const *newName){
    7138          31 :     return GDALDimensionRename( self, newName ) ? CE_None : CE_Failure;
    7139             :   }
    7140        4572 : SWIGINTERN void delete_GDALExtendedDataTypeHS(GDALExtendedDataTypeHS *self){
    7141        4572 :     GDALExtendedDataTypeRelease(self);
    7142        4572 :   }
    7143        1956 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_Create(GDALDataType dt){
    7144        1956 :     return GDALExtendedDataTypeCreate(dt);
    7145             :   }
    7146         188 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_CreateString(size_t nMaxStringLength=0,GDALExtendedDataTypeSubType eSubType=GEDTST_NONE){
    7147         188 :     return GDALExtendedDataTypeCreateStringEx(nMaxStringLength, eSubType);
    7148             :   }
    7149          22 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_CreateCompound(char const *name,size_t nTotalSize,int nComps,GDALEDTComponentHS **comps){
    7150          22 :     return GDALExtendedDataTypeCreateCompound(name, nTotalSize, nComps, comps);
    7151             :   }
    7152           8 : SWIGINTERN char const *GDALExtendedDataTypeHS_GetName(GDALExtendedDataTypeHS *self){
    7153           8 :     return GDALExtendedDataTypeGetName(self);
    7154             :   }
    7155        2885 : SWIGINTERN GDALExtendedDataTypeClass GDALExtendedDataTypeHS_GetClass(GDALExtendedDataTypeHS *self){
    7156        2885 :     return GDALExtendedDataTypeGetClass(self);
    7157             :   }
    7158        2069 : SWIGINTERN GDALDataType GDALExtendedDataTypeHS_GetNumericDataType(GDALExtendedDataTypeHS *self){
    7159        2069 :     return GDALExtendedDataTypeGetNumericDataType(self);
    7160             :   }
    7161          51 : SWIGINTERN size_t GDALExtendedDataTypeHS_GetSize(GDALExtendedDataTypeHS *self){
    7162          51 :     return GDALExtendedDataTypeGetSize(self);
    7163             :   }
    7164           3 : SWIGINTERN size_t GDALExtendedDataTypeHS_GetMaxStringLength(GDALExtendedDataTypeHS *self){
    7165           3 :     return GDALExtendedDataTypeGetMaxStringLength(self);
    7166             :   }
    7167         104 : SWIGINTERN GDALExtendedDataTypeSubType GDALExtendedDataTypeHS_GetSubType(GDALExtendedDataTypeHS *self){
    7168         104 :     return GDALExtendedDataTypeGetSubType(self);
    7169             :   }
    7170           1 : SWIGINTERN GDALRasterAttributeTableShadow *GDALExtendedDataTypeHS_GetRAT(GDALExtendedDataTypeHS *self){
    7171           1 :     return GDALExtendedDataTypeGetRAT(self);
    7172             :   }
    7173          21 : SWIGINTERN void GDALExtendedDataTypeHS_GetComponents(GDALExtendedDataTypeHS *self,GDALEDTComponentHS ***pcomps,size_t *pnCount){
    7174          42 :     *pcomps = GDALExtendedDataTypeGetComponents(self, pnCount);
    7175             :   }
    7176           7 : SWIGINTERN bool GDALExtendedDataTypeHS_CanConvertTo(GDALExtendedDataTypeHS *self,GDALExtendedDataTypeHS *other){
    7177          14 :     return GDALExtendedDataTypeCanConvertTo(self, other);
    7178             :   }
    7179         100 : SWIGINTERN bool GDALExtendedDataTypeHS_Equals(GDALExtendedDataTypeHS *self,GDALExtendedDataTypeHS *other){
    7180         200 :     return GDALExtendedDataTypeEquals(self, other);
    7181             :   }
    7182          61 : SWIGINTERN void delete_GDALEDTComponentHS(GDALEDTComponentHS *self){
    7183          61 :     GDALEDTComponentRelease(self);
    7184          61 :   }
    7185          20 : SWIGINTERN GDALEDTComponentHS *GDALEDTComponentHS_Create(char const *name,size_t offset,GDALExtendedDataTypeHS *type){
    7186          20 :     return GDALEDTComponentCreate(name, offset, type);
    7187             :   }
    7188          33 : SWIGINTERN char const *GDALEDTComponentHS_GetName(GDALEDTComponentHS *self){
    7189          33 :     return GDALEDTComponentGetName(self);
    7190             :   }
    7191          31 : SWIGINTERN size_t GDALEDTComponentHS_GetOffset(GDALEDTComponentHS *self){
    7192          31 :     return GDALEDTComponentGetOffset(self);
    7193             :   }
    7194          49 : SWIGINTERN GDALExtendedDataTypeHS *GDALEDTComponentHS_GetType(GDALEDTComponentHS *self){
    7195          49 :     return GDALEDTComponentGetType(self);
    7196             :   }
    7197             : 
    7198           6 : GDALRasterAttributeTableShadow* CreateRasterAttributeTableFromMDArrays(
    7199             :     GDALRATTableType eTableType, int nArrays, GDALMDArrayHS **ahArrays,
    7200             :     int nUsages = 0, GDALRATFieldUsage *paeUsages = NULL )
    7201             : {
    7202           6 :   if( nUsages != 0 && nUsages != nArrays )
    7203             :   {
    7204           1 :       CPLError(CE_Failure, CPLE_AppDefined, "nUsages != nArrays");
    7205           1 :       return NULL;
    7206             :   }
    7207           5 :   return GDALCreateRasterAttributeTableFromMDArrays( eTableType, nArrays, (const GDALMDArrayH *)ahArrays, paeUsages );
    7208             : }
    7209             : 
    7210             : 
    7211             : /* Returned size is in bytes or 0 if an error occurred. */
    7212             : static
    7213       18677 : GIntBig ComputeBandRasterIOSize (int buf_xsize, int buf_ysize, int nPixelSize,
    7214             :                                  GIntBig nPixelSpace, GIntBig nLineSpace,
    7215             :                                  int bSpacingShouldBeMultipleOfPixelSize )
    7216             : {
    7217       18677 :     if (buf_xsize <= 0 || buf_ysize <= 0)
    7218             :     {
    7219           2 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for buffer size");
    7220           2 :         return 0;
    7221             :     }
    7222             : 
    7223       18675 :     if (nPixelSpace < 0 || nLineSpace < 0)
    7224             :     {
    7225           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for space arguments");
    7226           0 :         return 0;
    7227             :     }
    7228             : 
    7229       18675 :     if (nPixelSize == 0)
    7230             :     {
    7231           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    7232           1 :         return 0;
    7233             :     }
    7234             : 
    7235       18674 :     if( nPixelSpace == 0 )
    7236       18490 :         nPixelSpace = nPixelSize;
    7237         184 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nPixelSpace % nPixelSize) != 0 )
    7238             :     {
    7239           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nPixelSpace should be a multiple of nPixelSize");
    7240           0 :         return 0;
    7241             :     }
    7242             : 
    7243       18674 :     if( nLineSpace == 0 )
    7244             :     {
    7245       18652 :         nLineSpace = nPixelSpace * buf_xsize;
    7246             :     }
    7247          22 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nLineSpace % nPixelSize) != 0 )
    7248             :     {
    7249           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    7250           0 :         return 0;
    7251             :     }
    7252             : 
    7253       18674 :     GIntBig nRet = (GIntBig)(buf_ysize - 1) * nLineSpace + (GIntBig)(buf_xsize - 1) * nPixelSpace + nPixelSize;
    7254             : #if SIZEOF_VOIDP == 4
    7255             :     if (nRet > INT_MAX)
    7256             :     {
    7257             :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    7258             :         return 0;
    7259             :     }
    7260             : #endif
    7261             : 
    7262       18674 :     return nRet;
    7263             : }
    7264             : 
    7265             : 
    7266             : static
    7267        8825 : CPLErr WriteRaster_internal( GDALRasterBandShadow *obj,
    7268             :                              int xoff, int yoff, int xsize, int ysize,
    7269             :                              int buf_xsize, int buf_ysize,
    7270             :                              GDALDataType buf_type,
    7271             :                              GIntBig buf_size, char *buffer,
    7272             :                              GIntBig pixel_space, GIntBig line_space,
    7273             :                              GDALRasterIOExtraArg* psExtraArg )
    7274             : {
    7275        8825 :     GIntBig min_buffer_size = ComputeBandRasterIOSize (buf_xsize, buf_ysize, GDALGetDataTypeSize( buf_type ) / 8,
    7276             :                                                    pixel_space, line_space, FALSE );
    7277        8825 :     if ( min_buffer_size == 0 )
    7278             :       return CE_Failure;
    7279             : 
    7280        8824 :     if ( buf_size < min_buffer_size ) {
    7281           1 :       CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    7282           1 :       return CE_Failure;
    7283             :     }
    7284             : 
    7285        8823 :     return GDALRasterIOEx( obj, GF_Write, xoff, yoff, xsize, ysize,
    7286        8823 :                            (void *) buffer, buf_xsize, buf_ysize, buf_type, pixel_space, line_space, psExtraArg );
    7287             : }
    7288             : 
    7289          66 : SWIGINTERN GDALDatasetShadow *GDALRasterBandShadow_GetDataset(GDALRasterBandShadow *self){
    7290          66 :     return (GDALDatasetShadow*) GDALGetBandDataset(self);
    7291             :   }
    7292           8 : SWIGINTERN int GDALRasterBandShadow_GetBand(GDALRasterBandShadow *self){
    7293           8 :     return GDALGetBandNumber(self);
    7294             :   }
    7295         491 : SWIGINTERN void GDALRasterBandShadow_GetBlockSize(GDALRasterBandShadow *self,int *pnBlockXSize,int *pnBlockYSize){
    7296         491 :       GDALGetBlockSize(self, pnBlockXSize, pnBlockYSize);
    7297         491 :   }
    7298           6 : SWIGINTERN void GDALRasterBandShadow_GetActualBlockSize(GDALRasterBandShadow *self,int nXBlockOff,int nYBlockOff,int *pnxvalid,int *pnyvalid,int *pisvalid){
    7299          12 :     *pisvalid = (GDALGetActualBlockSize(self, nXBlockOff, nYBlockOff, pnxvalid, pnyvalid) == CE_None);
    7300             :   }
    7301         792 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetColorInterpretation(GDALRasterBandShadow *self){
    7302         792 :     return GDALGetRasterColorInterpretation(self);
    7303             :   }
    7304         182 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetRasterColorInterpretation(GDALRasterBandShadow *self){
    7305         182 :     return GDALGetRasterColorInterpretation(self);
    7306             :   }
    7307         669 : SWIGINTERN CPLErr GDALRasterBandShadow_SetColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    7308         669 :     return GDALSetRasterColorInterpretation( self, val );
    7309             :   }
    7310         409 : SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    7311         409 :     return GDALSetRasterColorInterpretation( self, val );
    7312             :   }
    7313      410172 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValue(GDALRasterBandShadow *self,double *val,int *hasval){
    7314      820344 :     *val = GDALGetRasterNoDataValue( self, hasval );
    7315             :   }
    7316          27 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValueAsInt64(GDALRasterBandShadow *self,GIntBig *val,int *hasval){
    7317          54 :     *val = GDALGetRasterNoDataValueAsInt64( self, hasval );
    7318             :   }
    7319          18 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValueAsUInt64(GDALRasterBandShadow *self,GUIntBig *val,int *hasval){
    7320          36 :     *val = GDALGetRasterNoDataValueAsUInt64( self, hasval );
    7321             :   }
    7322         572 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValue(GDALRasterBandShadow *self,double d){
    7323         572 :     return GDALSetRasterNoDataValue( self, d );
    7324             :   }
    7325          17 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValueAsInt64(GDALRasterBandShadow *self,GIntBig v){
    7326          17 :     return GDALSetRasterNoDataValueAsInt64( self, v );
    7327             :   }
    7328          16 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValueAsUInt64(GDALRasterBandShadow *self,GUIntBig v){
    7329          16 :     return GDALSetRasterNoDataValueAsUInt64( self, v );
    7330             :   }
    7331          53 : SWIGINTERN CPLErr GDALRasterBandShadow_DeleteNoDataValue(GDALRasterBandShadow *self){
    7332          53 :     return GDALDeleteRasterNoDataValue(self);
    7333             :   }
    7334          69 : SWIGINTERN char const *GDALRasterBandShadow_GetUnitType(GDALRasterBandShadow *self){
    7335          69 :       return GDALGetRasterUnitType(self);
    7336             :   }
    7337          27 : SWIGINTERN CPLErr GDALRasterBandShadow_SetUnitType(GDALRasterBandShadow *self,char const *val){
    7338          27 :     return GDALSetRasterUnitType( self, val );
    7339             :   }
    7340          17 : SWIGINTERN char **GDALRasterBandShadow_GetRasterCategoryNames(GDALRasterBandShadow *self){
    7341          17 :     return GDALGetRasterCategoryNames(self);
    7342             :   }
    7343           0 : SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterCategoryNames(GDALRasterBandShadow *self,char **names){
    7344           0 :     return GDALSetRasterCategoryNames( self, names );
    7345             :   }
    7346          62 : SWIGINTERN void GDALRasterBandShadow_GetMinimum(GDALRasterBandShadow *self,double *val,int *hasval){
    7347         124 :     *val = GDALGetRasterMinimum( self, hasval );
    7348             :   }
    7349          52 : SWIGINTERN void GDALRasterBandShadow_GetMaximum(GDALRasterBandShadow *self,double *val,int *hasval){
    7350         104 :     *val = GDALGetRasterMaximum( self, hasval );
    7351             :   }
    7352         151 : SWIGINTERN void GDALRasterBandShadow_GetOffset(GDALRasterBandShadow *self,double *val,int *hasval){
    7353         302 :     *val = GDALGetRasterOffset( self, hasval );
    7354             :   }
    7355         149 : SWIGINTERN void GDALRasterBandShadow_GetScale(GDALRasterBandShadow *self,double *val,int *hasval){
    7356         298 :     *val = GDALGetRasterScale( self, hasval );
    7357             :   }
    7358          75 : SWIGINTERN CPLErr GDALRasterBandShadow_SetOffset(GDALRasterBandShadow *self,double val){
    7359          75 :     return GDALSetRasterOffset( self, val );
    7360             :   }
    7361          76 : SWIGINTERN CPLErr GDALRasterBandShadow_SetScale(GDALRasterBandShadow *self,double val){
    7362          76 :     return GDALSetRasterScale( self, val );
    7363             :   }
    7364         112 : SWIGINTERN CPLErr GDALRasterBandShadow_GetStatistics(GDALRasterBandShadow *self,int approx_ok,int force,double *min,double *max,double *mean,double *stddev){
    7365         112 :     if (min) *min = 0;
    7366         112 :     if (max) *max = 0;
    7367         112 :     if (mean) *mean = 0;
    7368         112 :     if (stddev) *stddev = -1; /* This is the only way to recognize from Python if GetRasterStatistics() has updated the values */
    7369         112 :     return GDALGetRasterStatistics( self, approx_ok, force,
    7370         112 :             min, max, mean, stddev );
    7371             :   }
    7372         154 : SWIGINTERN CPLErr GDALRasterBandShadow_ComputeStatistics(GDALRasterBandShadow *self,bool approx_ok,double *min,double *max,double *mean,double *stddev,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    7373         154 :     return GDALComputeRasterStatistics( self, approx_ok, min, max, mean, stddev, callback, callback_data );
    7374             :   }
    7375           2 : SWIGINTERN CPLErr GDALRasterBandShadow_SetStatistics(GDALRasterBandShadow *self,double min,double max,double mean,double stddev){
    7376           2 :     return GDALSetRasterStatistics( self, min, max, mean, stddev );
    7377             :   }
    7378         524 : SWIGINTERN int GDALRasterBandShadow_GetOverviewCount(GDALRasterBandShadow *self){
    7379         524 :     return GDALGetOverviewCount(self);
    7380             :   }
    7381        5600 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetOverview(GDALRasterBandShadow *self,int i){
    7382        5600 :     return (GDALRasterBandShadow*) GDALGetOverview( self, i );
    7383             :   }
    7384        2000 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetSampleOverview(GDALRasterBandShadow *self,GUIntBig nDesiredSamples){
    7385        2000 :     return (GDALRasterBandShadow*) GDALGetRasterSampleOverviewEx( self, nDesiredSamples );
    7386             :   }
    7387       38604 : SWIGINTERN int GDALRasterBandShadow_Checksum(GDALRasterBandShadow *self,int xoff=0,int yoff=0,int *xsize=0,int *ysize=0){
    7388       38604 :     int nxsize = (xsize!=0) ? *xsize : GDALGetRasterBandXSize( self );
    7389       38604 :     int nysize = (ysize!=0) ? *ysize : GDALGetRasterBandYSize( self );
    7390       38604 :     return GDALChecksumImage( self, xoff, yoff, nxsize, nysize );
    7391             :   }
    7392        1366 : SWIGINTERN void GDALRasterBandShadow_ComputeRasterMinMax(GDALRasterBandShadow *self,double argout[2],int *isvalid,bool approx_ok=false,bool can_return_none=false){
    7393        1366 :     *isvalid = GDALComputeRasterMinMax( self, approx_ok, argout ) == CE_None;
    7394        1366 :     if( !can_return_none && !*isvalid )
    7395             :     {
    7396           3 :         *isvalid = true;
    7397           3 :         argout[0] = CPLAtof("nan");
    7398           3 :         argout[1] = CPLAtof("nan");
    7399             :     }
    7400        1366 :   }
    7401          18 : SWIGINTERN void GDALRasterBandShadow_ComputeBandStats(GDALRasterBandShadow *self,double argout[2],int samplestep=1){
    7402          18 :     GDALComputeBandStats( self, samplestep, argout+0, argout+1,
    7403             :                           NULL, NULL );
    7404          18 :   }
    7405      169489 : SWIGINTERN CPLErr GDALRasterBandShadow_Fill(GDALRasterBandShadow *self,double real_fill,double imag_fill=0.0){
    7406      169489 :     return GDALFillRaster( self, real_fill, imag_fill );
    7407             :   }
    7408        8825 : 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){
    7409        8825 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    7410        8825 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    7411        8825 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    7412        8825 :                                         : *buf_type;
    7413        8825 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    7414        8825 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    7415        8825 :     GDALRasterIOExtraArg* psExtraArg = NULL;
    7416        8825 :     return WriteRaster_internal( self, xoff, yoff, xsize, ysize,
    7417        8825 :                                  nxsize, nysize, ntype, buf_len, buf_string, pixel_space, line_space, psExtraArg );
    7418             :   }
    7419          37 : SWIGINTERN void GDALRasterBandShadow_FlushCache(GDALRasterBandShadow *self){
    7420          37 :     GDALFlushRasterCache( self );
    7421          37 :   }
    7422         129 : SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetRasterColorTable(GDALRasterBandShadow *self){
    7423         129 :     return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
    7424             :   }
    7425          80 : SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetColorTable(GDALRasterBandShadow *self){
    7426          80 :     return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
    7427             :   }
    7428          46 : SWIGINTERN int GDALRasterBandShadow_SetRasterColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    7429          92 :     return GDALSetRasterColorTable( self, arg );
    7430             :   }
    7431          29 : SWIGINTERN int GDALRasterBandShadow_SetColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    7432          58 :     return GDALSetRasterColorTable( self, arg );
    7433             :   }
    7434          58 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterBandShadow_GetDefaultRAT(GDALRasterBandShadow *self){
    7435          58 :       return (GDALRasterAttributeTableShadow*) GDALGetDefaultRAT(self);
    7436             :   }
    7437          18 : SWIGINTERN int GDALRasterBandShadow_SetDefaultRAT(GDALRasterBandShadow *self,GDALRasterAttributeTableShadow *table){
    7438          36 :       return GDALSetDefaultRAT(self, table);
    7439             :   }
    7440       10777 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetMaskBand(GDALRasterBandShadow *self){
    7441       10777 :       return (GDALRasterBandShadow *) GDALGetMaskBand( self );
    7442             :   }
    7443         442 : SWIGINTERN int GDALRasterBandShadow_GetMaskFlags(GDALRasterBandShadow *self){
    7444         442 :       return GDALGetMaskFlags( self );
    7445             :   }
    7446          33 : SWIGINTERN CPLErr GDALRasterBandShadow_CreateMaskBand(GDALRasterBandShadow *self,int nFlags){
    7447          33 :       return GDALCreateMaskBand( self, nFlags );
    7448             :   }
    7449          37 : SWIGINTERN bool GDALRasterBandShadow_IsMaskBand(GDALRasterBandShadow *self){
    7450          37 :       return GDALIsMaskBand( self );
    7451             :   }
    7452          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){
    7453          26 :     CPLErrorReset();
    7454          26 :     CPLErr err = GDALGetRasterHistogramEx( self, min, max, buckets, panHistogram,
    7455             :                                          include_out_of_range, approx_ok,
    7456             :                                          callback, callback_data );
    7457          26 :     return err;
    7458             :   }
    7459          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){
    7460          11 :     return GDALGetDefaultHistogramEx( self, min_ret, max_ret, buckets_ret,
    7461             :                                     ppanHistogram, force,
    7462             :                                     callback, callback_data );
    7463             : }
    7464           5 : SWIGINTERN CPLErr GDALRasterBandShadow_SetDefaultHistogram(GDALRasterBandShadow *self,double min,double max,int buckets_in,GUIntBig *panHistogram_in){
    7465           5 :     return GDALSetDefaultHistogramEx( self, min, max,
    7466             :                                     buckets_in, panHistogram_in );
    7467             : }
    7468          17 : SWIGINTERN bool GDALRasterBandShadow_HasArbitraryOverviews(GDALRasterBandShadow *self){
    7469          34 :       return (GDALHasArbitraryOverviews( self ) != 0) ? true : false;
    7470             :   }
    7471          10 : SWIGINTERN char **GDALRasterBandShadow_GetCategoryNames(GDALRasterBandShadow *self){
    7472          10 :     return GDALGetRasterCategoryNames( self );
    7473             :   }
    7474           2 : SWIGINTERN CPLErr GDALRasterBandShadow_SetCategoryNames(GDALRasterBandShadow *self,char **papszCategoryNames){
    7475           2 :     return GDALSetRasterCategoryNames( self, papszCategoryNames );
    7476             :   }
    7477           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){
    7478           1 :         CPLVirtualMem* vmem = GDALRasterBandGetVirtualMem( self,
    7479             :                                          eRWFlag,
    7480             :                                          nXOff, nYOff,
    7481             :                                          nXSize, nYSize,
    7482             :                                          nBufXSize, nBufYSize,
    7483             :                                          eBufType,
    7484             :                                          0,
    7485             :                                          0,
    7486             :                                          nCacheSize,
    7487             :                                          nPageSizeHint,
    7488             :                                          FALSE,
    7489             :                                          options );
    7490           1 :         if( vmem == NULL )
    7491             :             return NULL;
    7492           1 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7493           1 :         vmemshadow->vmem = vmem;
    7494           1 :         vmemshadow->eBufType = eBufType;
    7495           1 :         vmemshadow->bIsBandSequential = TRUE;
    7496           1 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7497           1 :         vmemshadow->nBufXSize = nBufXSize;
    7498           1 :         vmemshadow->nBufYSize = nBufYSize;
    7499           1 :         vmemshadow->nBandCount = 1;
    7500           1 :         return vmemshadow;
    7501             :     }
    7502          21 : SWIGINTERN CPLVirtualMemShadow *GDALRasterBandShadow_GetVirtualMemAuto(GDALRasterBandShadow *self,GDALRWFlag eRWFlag,char **options=NULL){
    7503          21 :         int            nPixelSpace;
    7504          21 :         GIntBig        nLineSpace;
    7505          21 :         CPLVirtualMem* vmem = GDALGetVirtualMemAuto( self,
    7506             :                                          eRWFlag,
    7507             :                                          &nPixelSpace,
    7508             :                                          &nLineSpace,
    7509             :                                          options );
    7510          21 :         if( vmem == NULL )
    7511             :             return NULL;
    7512          20 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7513          20 :         vmemshadow->vmem = vmem;
    7514          20 :         vmemshadow->eBufType = GDALGetRasterDataType( self );
    7515          20 :         vmemshadow->bAuto = TRUE;
    7516          20 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7517          20 :         vmemshadow->nBandCount = 1;
    7518          20 :         vmemshadow->nPixelSpace = nPixelSpace;
    7519          20 :         vmemshadow->nLineSpace = nLineSpace;
    7520          20 :         vmemshadow->nBufXSize = GDALGetRasterBandXSize(self);
    7521          20 :         vmemshadow->nBufYSize = GDALGetRasterBandYSize(self);
    7522          20 :         return vmemshadow;
    7523             :     }
    7524           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){
    7525           1 :         CPLVirtualMem* vmem = GDALRasterBandGetTiledVirtualMem( self,
    7526             :                                          eRWFlag,
    7527             :                                          nXOff, nYOff,
    7528             :                                          nXSize, nYSize,
    7529             :                                          nTileXSize, nTileYSize,
    7530             :                                          eBufType,
    7531             :                                          nCacheSize,
    7532             :                                          FALSE,
    7533             :                                          options );
    7534           1 :         if( vmem == NULL )
    7535             :             return NULL;
    7536           1 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7537           1 :         vmemshadow->vmem = vmem;
    7538           1 :         vmemshadow->eBufType = eBufType;
    7539           1 :         vmemshadow->bIsBandSequential = -1;
    7540           1 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7541           1 :         vmemshadow->nBufXSize = nXSize;
    7542           1 :         vmemshadow->nBufYSize = nYSize;
    7543           1 :         vmemshadow->eTileOrganization = GTO_BSQ;
    7544           1 :         vmemshadow->nTileXSize = nTileXSize;
    7545           1 :         vmemshadow->nTileYSize = nTileYSize;
    7546           1 :         vmemshadow->nBandCount = 1;
    7547           1 :         return vmemshadow;
    7548             :     }
    7549          26 : SWIGINTERN int GDALRasterBandShadow_GetDataCoverageStatus(GDALRasterBandShadow *self,int nXOff,int nYOff,int nXSize,int nYSize,int nMaskFlagStop=0,double *pdfDataPct=NULL){
    7550          26 :         return GDALGetDataCoverageStatus(self, nXOff, nYOff,
    7551             :                                          nXSize, nYSize,
    7552             :                                          nMaskFlagStop,
    7553             :                                          pdfDataPct);
    7554             :     }
    7555           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){
    7556           2 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    7557           2 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    7558           2 :     GDALDataType ntype;
    7559           2 :     if ( buf_type != 0 ) {
    7560           0 :       ntype = (GDALDataType) *buf_type;
    7561             :     } else {
    7562           2 :       ntype = GDALGetRasterDataType( self );
    7563             :     }
    7564           2 :     return GDALRasterAdviseRead(self, xoff, yoff, xsize, ysize,
    7565           2 :                                 nxsize, nysize, ntype, options);
    7566             : }
    7567          69 : SWIGINTERN CPLErr GDALRasterBandShadow_InterpolateAtPoint(GDALRasterBandShadow *self,double pixel,double line,GDALRIOResampleAlg interpolation,double *pdfRealValue,double *pdfImagValue){
    7568          69 :     if (pdfRealValue) *pdfRealValue = 0;
    7569          69 :     if (pdfImagValue) *pdfImagValue = 0;
    7570          69 :     return GDALRasterInterpolateAtPoint( self, pixel, line, interpolation, pdfRealValue, pdfImagValue );
    7571             :   }
    7572          15 : SWIGINTERN CPLErr GDALRasterBandShadow_InterpolateAtGeolocation(GDALRasterBandShadow *self,double geolocX,double geolocY,OSRSpatialReferenceShadow *srs,GDALRIOResampleAlg interpolation,double *pdfRealValue,double *pdfImagValue,char **transformerOptions=NULL){
    7573          15 :     if (pdfRealValue) *pdfRealValue = 0;
    7574          15 :     if (pdfImagValue) *pdfImagValue = 0;
    7575          15 :     return GDALRasterInterpolateAtGeolocation( self, geolocX, geolocY,
    7576             :                 (OGRSpatialReferenceH)srs, interpolation,
    7577             :                 pdfRealValue, pdfImagValue, transformerOptions );
    7578             :   }
    7579           2 : SWIGINTERN CPLErr GDALRasterBandShadow_ComputeMinMaxLocation(GDALRasterBandShadow *self,double *pdfMin,double *pdfMax,int *pnMinX,int *pnMinY,int *pnMaxX,int *pnMaxY){
    7580           2 :     return GDALComputeRasterMinMaxLocation( self, pdfMin, pdfMax,
    7581             :                                             pnMinX, pnMinY,
    7582             :                                             pnMaxX, pnMaxY );
    7583             :   }
    7584          21 : SWIGINTERN GDALMDArrayHS *GDALRasterBandShadow_AsMDArray(GDALRasterBandShadow *self){
    7585          21 :     return GDALRasterBandAsMDArray(self);
    7586             :   }
    7587        4866 : SWIGINTERN void GDALRasterBandShadow__EnablePixelTypeSignedByteWarning(GDALRasterBandShadow *self,bool b){
    7588        4866 :       GDALEnablePixelTypeSignedByteWarning(self, b);
    7589        4866 :   }
    7590        9852 : 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){
    7591             : 
    7592        9852 :     *buf = NULL;
    7593             : 
    7594        9852 :     int nxsize = (buf_xsize==0) ? static_cast<int>(xsize) : *buf_xsize;
    7595        9852 :     int nysize = (buf_ysize==0) ? static_cast<int>(ysize) : *buf_ysize;
    7596        9852 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    7597        9852 :                                         : *buf_type;
    7598        9852 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    7599        9852 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    7600             : 
    7601        9852 :     size_t buf_size = static_cast<size_t>(
    7602        9852 :         ComputeBandRasterIOSize( nxsize, nysize,
    7603        9852 :                                  GDALGetDataTypeSize( ntype ) / 8,
    7604        9852 :                                  pixel_space, line_space, FALSE ) );
    7605        9852 :     if (buf_size == 0)
    7606             :     {
    7607             :         return CE_Failure;
    7608             :     }
    7609             : 
    7610        9850 :     char *data;
    7611        9850 :     Py_buffer view;
    7612       13757 :     if( !readraster_acquirebuffer(buf, inputOutputBuf, buf_size, ntype,
    7613             :                                   GetUseExceptions(), data, view) )
    7614             :     {
    7615             :         return CE_Failure;
    7616             :     }
    7617             : 
    7618             :     /* Should we clear the buffer in case there are hole in it ? */
    7619        9837 :     if( inputOutputBuf == NULL &&
    7620        9825 :         line_space != 0 && pixel_space != 0 && line_space > pixel_space * nxsize )
    7621             :     {
    7622           4 :         memset(data, 0, buf_size);
    7623             :     }
    7624             : 
    7625        9837 :     GDALRasterIOExtraArg sExtraArg;
    7626        9837 :     INIT_RASTERIO_EXTRA_ARG(sExtraArg);
    7627        9837 :     sExtraArg.eResampleAlg = resample_alg;
    7628        9837 :     sExtraArg.pfnProgress = callback;
    7629        9837 :     sExtraArg.pProgressData = callback_data;
    7630        9837 :     int nXOff = (int)(xoff + 0.5);
    7631        9837 :     int nYOff = (int)(yoff + 0.5);
    7632        9837 :     int nXSize = (int)(xsize + 0.5);
    7633        9837 :     int nYSize = (int)(ysize + 0.5);
    7634        9837 :     if( fabs(xoff-nXOff) > 1e-8 || fabs(yoff-nYOff) > 1e-8 ||
    7635        9831 :         fabs(xsize-nXSize) > 1e-8 || fabs(ysize-nYSize) > 1e-8 )
    7636             :     {
    7637           8 :         sExtraArg.bFloatingPointWindowValidity = TRUE;
    7638           8 :         sExtraArg.dfXOff = xoff;
    7639           8 :         sExtraArg.dfYOff = yoff;
    7640           8 :         sExtraArg.dfXSize = xsize;
    7641           8 :         sExtraArg.dfYSize = ysize;
    7642             :     }
    7643             : 
    7644        9837 :     CPLErr eErr = GDALRasterIOEx( self, GF_Read, nXOff, nYOff, nXSize, nYSize,
    7645             :                          data, nxsize, nysize, ntype,
    7646             :                          pixel_space, line_space, &sExtraArg );
    7647             : 
    7648        9837 :     readraster_releasebuffer(eErr, buf, inputOutputBuf, view);
    7649             : 
    7650             :     return eErr;
    7651             :   }
    7652          82 : SWIGINTERN CPLErr GDALRasterBandShadow_ReadBlock(GDALRasterBandShadow *self,int xoff,int yoff,void **buf,void *buf_obj=NULL){
    7653             : 
    7654          82 :     int nBlockXSize, nBlockYSize;
    7655          82 :     GDALGetBlockSize(self, &nBlockXSize, &nBlockYSize);
    7656          82 :     GDALDataType ntype = GDALGetRasterDataType(self);
    7657          82 :     int nDataTypeSize = (GDALGetDataTypeSize(ntype) / 8);
    7658          82 :     size_t buf_size = static_cast<size_t>(nBlockXSize) *
    7659          82 :                                                 nBlockYSize * nDataTypeSize;
    7660             : 
    7661          82 :     *buf = NULL;
    7662             : 
    7663          82 :     char *data;
    7664          82 :     Py_buffer view;
    7665             : 
    7666         108 :     if( !readraster_acquirebuffer(buf, buf_obj, buf_size, ntype,
    7667             :                                   GetUseExceptions(), data, view) )
    7668             :     {
    7669             :         return CE_Failure;
    7670             :     }
    7671             : 
    7672          69 :     CPLErr eErr = GDALReadBlock( self, xoff, yoff, data);
    7673             : 
    7674          69 :     readraster_releasebuffer(eErr, buf, buf_obj, view);
    7675             : 
    7676             :     return eErr;
    7677             :   }
    7678             : 
    7679      848856 : GDALDataType GDALRasterBandShadow_DataType_get( GDALRasterBandShadow *h ) {
    7680      848856 :   return GDALGetRasterDataType( h );
    7681             : }
    7682       17813 : int GDALRasterBandShadow_XSize_get( GDALRasterBandShadow *h ) {
    7683       17813 :   return GDALGetRasterBandXSize( h );
    7684             : }
    7685       16680 : int GDALRasterBandShadow_YSize_get( GDALRasterBandShadow *h ) {
    7686       16680 :   return GDALGetRasterBandYSize( h );
    7687             : }
    7688             : 
    7689          56 : SWIGINTERN GDALColorTableShadow *new_GDALColorTableShadow(GDALPaletteInterp palette=GPI_RGB){
    7690          56 :         return (GDALColorTableShadow*) GDALCreateColorTable(palette);
    7691             :     }
    7692          68 : SWIGINTERN void delete_GDALColorTableShadow(GDALColorTableShadow *self){
    7693          68 :         GDALDestroyColorTable(self);
    7694          68 :     }
    7695          12 : SWIGINTERN GDALColorTableShadow *GDALColorTableShadow_Clone(GDALColorTableShadow *self){
    7696          12 :         return (GDALColorTableShadow*) GDALCloneColorTable (self);
    7697             :     }
    7698           2 : SWIGINTERN GDALPaletteInterp GDALColorTableShadow_GetPaletteInterpretation(GDALColorTableShadow *self){
    7699           2 :         return GDALGetPaletteInterpretation(self);
    7700             :     }
    7701          73 : SWIGINTERN int GDALColorTableShadow_GetColorEntryCount(GDALColorTableShadow *self){
    7702          73 :         return GDALGetColorEntryCount(self);
    7703             :     }
    7704        4669 : SWIGINTERN GDALColorEntry *GDALColorTableShadow_GetColorEntry(GDALColorTableShadow *self,int entry){
    7705        4669 :         return (GDALColorEntry*) GDALGetColorEntry(self, entry);
    7706             :     }
    7707           0 : SWIGINTERN int GDALColorTableShadow_GetColorEntryAsRGB(GDALColorTableShadow *self,int entry,GDALColorEntry *centry){
    7708           0 :         return GDALGetColorEntryAsRGB(self, entry, centry);
    7709             :     }
    7710        1379 : SWIGINTERN void GDALColorTableShadow_SetColorEntry(GDALColorTableShadow *self,int entry,GDALColorEntry const *centry){
    7711        1379 :         GDALSetColorEntry(self, entry, centry);
    7712        1379 :     }
    7713           1 : SWIGINTERN void GDALColorTableShadow_CreateColorRamp(GDALColorTableShadow *self,int nStartIndex,GDALColorEntry const *startcolor,int nEndIndex,GDALColorEntry const *endcolor){
    7714           1 :         GDALCreateColorRamp(self, nStartIndex, startcolor, nEndIndex, endcolor);
    7715           1 :     }
    7716             : 
    7717             : #include "gdalsubdatasetinfo.h"
    7718             : 
    7719          60 : SWIGINTERN void delete_GDALSubdatasetInfoShadow(GDALSubdatasetInfoShadow *self){
    7720          60 :             GDALDestroySubdatasetInfo(reinterpret_cast<GDALSubdatasetInfoH>(self));
    7721          60 :         }
    7722          35 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_GetPathComponent(GDALSubdatasetInfoShadow *self){
    7723          35 :             return GDALSubdatasetInfoGetPathComponent(reinterpret_cast<GDALSubdatasetInfoH>(self) );
    7724             :         }
    7725          39 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_GetSubdatasetComponent(GDALSubdatasetInfoShadow *self){
    7726          39 :         return GDALSubdatasetInfoGetSubdatasetComponent(reinterpret_cast<GDALSubdatasetInfoH>(self) );
    7727             :         }
    7728          21 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_ModifyPathComponent(GDALSubdatasetInfoShadow *self,char const *pszNewFileName){
    7729          21 :         return GDALSubdatasetInfoModifyPathComponent(reinterpret_cast<GDALSubdatasetInfoH>(self), pszNewFileName );
    7730             :         }
    7731             : 
    7732          83 : GDALSubdatasetInfoShadow* GetSubdatasetInfo(const char *pszFileName)
    7733             : {
    7734          83 :     GDALSubdatasetInfoH info { GDALGetSubdatasetInfo(pszFileName) };
    7735             : 
    7736          83 :     if( ! info )
    7737             :     {
    7738          23 :       return nullptr;
    7739             :     }
    7740             : 
    7741             :     return (GDALSubdatasetInfoShadow*)( info );
    7742             : };
    7743             : 
    7744          29 : SWIGINTERN GDALRelationshipShadow *new_GDALRelationshipShadow(char const *name,char const *leftTableName,char const *rightTableName,GDALRelationshipCardinality cardinality){
    7745          29 :         return (GDALRelationshipShadow*)
    7746          29 :         GDALRelationshipCreate(name,
    7747             :                                leftTableName,
    7748             :                                rightTableName,
    7749             :                                cardinality);
    7750             :     }
    7751          29 : SWIGINTERN void delete_GDALRelationshipShadow(GDALRelationshipShadow *self){
    7752          29 :         GDALDestroyRelationship(self);
    7753          29 :     }
    7754          31 : SWIGINTERN char const *GDALRelationshipShadow_GetName(GDALRelationshipShadow *self){
    7755          31 :         return GDALRelationshipGetName( self );
    7756             :     }
    7757          47 : SWIGINTERN GDALRelationshipCardinality GDALRelationshipShadow_GetCardinality(GDALRelationshipShadow *self){
    7758          47 :         return GDALRelationshipGetCardinality( self );
    7759             :     }
    7760          49 : SWIGINTERN char const *GDALRelationshipShadow_GetLeftTableName(GDALRelationshipShadow *self){
    7761          49 :         return GDALRelationshipGetLeftTableName( self );
    7762             :     }
    7763          49 : SWIGINTERN char const *GDALRelationshipShadow_GetRightTableName(GDALRelationshipShadow *self){
    7764          49 :         return GDALRelationshipGetRightTableName( self );
    7765             :     }
    7766          34 : SWIGINTERN char const *GDALRelationshipShadow_GetMappingTableName(GDALRelationshipShadow *self){
    7767          34 :         return GDALRelationshipGetMappingTableName( self );
    7768             :     }
    7769          14 : SWIGINTERN void GDALRelationshipShadow_SetMappingTableName(GDALRelationshipShadow *self,char const *pszName){
    7770          14 :         GDALRelationshipSetMappingTableName( self, pszName );
    7771          14 :     }
    7772          48 : SWIGINTERN char **GDALRelationshipShadow_GetLeftTableFields(GDALRelationshipShadow *self){
    7773          48 :            return GDALRelationshipGetLeftTableFields(self);
    7774             :         }
    7775          48 : SWIGINTERN char **GDALRelationshipShadow_GetRightTableFields(GDALRelationshipShadow *self){
    7776          48 :             return GDALRelationshipGetRightTableFields(self);
    7777             :         }
    7778          37 : SWIGINTERN void GDALRelationshipShadow_SetLeftTableFields(GDALRelationshipShadow *self,char **pFields){
    7779          37 :             GDALRelationshipSetLeftTableFields(self, pFields);
    7780          37 :         }
    7781          38 : SWIGINTERN void GDALRelationshipShadow_SetRightTableFields(GDALRelationshipShadow *self,char **pFields){
    7782          38 :             GDALRelationshipSetRightTableFields(self, pFields);
    7783          38 :         }
    7784          23 : SWIGINTERN char **GDALRelationshipShadow_GetLeftMappingTableFields(GDALRelationshipShadow *self){
    7785          23 :             return GDALRelationshipGetLeftMappingTableFields(self);
    7786             :         }
    7787          23 : SWIGINTERN char **GDALRelationshipShadow_GetRightMappingTableFields(GDALRelationshipShadow *self){
    7788          23 :             return GDALRelationshipGetRightMappingTableFields(self);
    7789             :         }
    7790           9 : SWIGINTERN void GDALRelationshipShadow_SetLeftMappingTableFields(GDALRelationshipShadow *self,char **pFields){
    7791           9 :           GDALRelationshipSetLeftMappingTableFields(self, pFields);
    7792           9 :       }
    7793           9 : SWIGINTERN void GDALRelationshipShadow_SetRightMappingTableFields(GDALRelationshipShadow *self,char **pFields){
    7794           9 :           GDALRelationshipSetRightMappingTableFields(self, pFields);
    7795           9 :       }
    7796          47 : SWIGINTERN GDALRelationshipType GDALRelationshipShadow_GetType(GDALRelationshipShadow *self){
    7797          47 :         return GDALRelationshipGetType( self );
    7798             :     }
    7799          10 : SWIGINTERN void GDALRelationshipShadow_SetType(GDALRelationshipShadow *self,GDALRelationshipType type){
    7800          10 :       return GDALRelationshipSetType( self, type );
    7801             :     }
    7802          14 : SWIGINTERN char const *GDALRelationshipShadow_GetForwardPathLabel(GDALRelationshipShadow *self){
    7803          14 :         return GDALRelationshipGetForwardPathLabel( self );
    7804             :     }
    7805           9 : SWIGINTERN void GDALRelationshipShadow_SetForwardPathLabel(GDALRelationshipShadow *self,char const *pszLabel){
    7806           9 :         GDALRelationshipSetForwardPathLabel( self, pszLabel );
    7807           9 :     }
    7808          14 : SWIGINTERN char const *GDALRelationshipShadow_GetBackwardPathLabel(GDALRelationshipShadow *self){
    7809          14 :         return GDALRelationshipGetBackwardPathLabel( self );
    7810             :     }
    7811           9 : SWIGINTERN void GDALRelationshipShadow_SetBackwardPathLabel(GDALRelationshipShadow *self,char const *pszLabel){
    7812           9 :         GDALRelationshipSetBackwardPathLabel( self, pszLabel );
    7813           9 :     }
    7814          44 : SWIGINTERN char const *GDALRelationshipShadow_GetRelatedTableType(GDALRelationshipShadow *self){
    7815          44 :         return GDALRelationshipGetRelatedTableType( self );
    7816             :     }
    7817          20 : SWIGINTERN void GDALRelationshipShadow_SetRelatedTableType(GDALRelationshipShadow *self,char const *pszType){
    7818          20 :         GDALRelationshipSetRelatedTableType( self, pszType );
    7819          20 :     }
    7820             : 
    7821             : #include "gdalgrid.h"
    7822             : 
    7823             : #ifdef DEBUG
    7824             : typedef struct OGRLayerHS OGRLayerShadow;
    7825             : typedef struct OGRGeometryHS OGRGeometryShadow;
    7826             : #else
    7827             : typedef void OGRLayerShadow;
    7828             : typedef void OGRGeometryShadow;
    7829             : #endif
    7830             : 
    7831             : 
    7832             : static int
    7833        3713 : GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) {
    7834        3713 :   return GDALTermProgress( dfProgress, pszMessage, pData);
    7835             : }
    7836             : 
    7837             : 
    7838           4 : int  ComputeMedianCutPCT ( GDALRasterBandShadow *red,
    7839             :                               GDALRasterBandShadow *green,
    7840             :                               GDALRasterBandShadow *blue,
    7841             :                               int num_colors,
    7842             :                               GDALColorTableShadow* colors,
    7843             :                               GDALProgressFunc callback = NULL,
    7844             :                               void* callback_data=NULL) {
    7845             : 
    7846           4 :     CPLErrorReset();
    7847             : 
    7848           4 :     int err = GDALComputeMedianCutPCT( red,
    7849             :                                           green,
    7850             :                                           blue,
    7851             :                                           NULL,
    7852             :                                           num_colors,
    7853             :                                           colors,
    7854             :                                           callback,
    7855             :                                           callback_data);
    7856             : 
    7857           4 :     return err;
    7858             : }
    7859             : 
    7860             : 
    7861           7 : int  DitherRGB2PCT ( GDALRasterBandShadow *red,
    7862             :                      GDALRasterBandShadow *green,
    7863             :                      GDALRasterBandShadow *blue,
    7864             :                      GDALRasterBandShadow *target,
    7865             :                      GDALColorTableShadow *colors,
    7866             :                      GDALProgressFunc callback = NULL,
    7867             :                      void* callback_data=NULL) {
    7868             : 
    7869           7 :     CPLErrorReset();
    7870           7 :     int err;
    7871           7 :     err = GDALDitherRGB2PCT(  red,
    7872             :                                   green,
    7873             :                                   blue,
    7874             :                                   target,
    7875             :                                   colors,
    7876             :                                   callback,
    7877             :                                   callback_data);
    7878             : 
    7879           7 :     return err;
    7880             : }
    7881             : 
    7882             : 
    7883          62 : CPLErr  ReprojectImage ( GDALDatasetShadow *src_ds,
    7884             :                          GDALDatasetShadow *dst_ds,
    7885             :                          const char *src_wkt=NULL,
    7886             :                          const char *dst_wkt=NULL,
    7887             :                          GDALResampleAlg eResampleAlg=GRA_NearestNeighbour,
    7888             :                          double WarpMemoryLimit=0.0,
    7889             :                          double maxerror = 0.0,
    7890             :        GDALProgressFunc callback = NULL,
    7891             :                        void* callback_data=NULL,
    7892             :                          char** options = NULL ) {
    7893             : 
    7894          62 :     CPLErrorReset();
    7895             : 
    7896          62 :     GDALWarpOptions* psOptions = NULL;
    7897          62 :     if( options != NULL )
    7898             :     {
    7899           1 :         psOptions = GDALCreateWarpOptions();
    7900           1 :         psOptions->papszWarpOptions = CSLDuplicate(options);
    7901             :     }
    7902             : 
    7903          62 :     CPLErr err = GDALReprojectImage( src_ds,
    7904             :                                      src_wkt,
    7905             :                                      dst_ds,
    7906             :                                      dst_wkt,
    7907             :                                      eResampleAlg,
    7908             :                                      WarpMemoryLimit,
    7909             :                                      maxerror,
    7910             :                                      callback,
    7911             :                                      callback_data,
    7912             :                                      psOptions);
    7913             : 
    7914          62 :     if( psOptions != NULL )
    7915           1 :         GDALDestroyWarpOptions(psOptions);
    7916             : 
    7917          62 :     return err;
    7918             : }
    7919             : 
    7920             : 
    7921           6 : int  ComputeProximity( GDALRasterBandShadow *srcBand,
    7922             :                        GDALRasterBandShadow *proximityBand,
    7923             :                        char **options = NULL,
    7924             :                        GDALProgressFunc callback=NULL,
    7925             :                        void* callback_data=NULL) {
    7926             : 
    7927           6 :     CPLErrorReset();
    7928             : 
    7929           6 :     return GDALComputeProximity( srcBand, proximityBand, options,
    7930           6 :                                  callback, callback_data );
    7931             : }
    7932             : 
    7933             : 
    7934          42 : int  RasterizeLayer( GDALDatasetShadow *dataset,
    7935             :                  int bands, int *band_list,
    7936             :                  OGRLayerShadow *layer,
    7937             :                  void *pfnTransformer = NULL,
    7938             :                  void *pTransformArg = NULL,
    7939             :      int burn_values = 0, double *burn_values_list = NULL,
    7940             :                  char **options = NULL,
    7941             :                  GDALProgressFunc callback=NULL,
    7942             :                  void* callback_data=NULL) {
    7943             : 
    7944          42 :     CPLErr eErr;
    7945             : 
    7946          42 :     CPLErrorReset();
    7947             : 
    7948          42 :     if( burn_values == 0 )
    7949             :     {
    7950           1 :         burn_values_list = (double *) CPLMalloc(sizeof(double)*bands);
    7951           4 :         for( int i = 0; i < bands; i++ )
    7952           3 :             burn_values_list[i] = 255.0;
    7953             :     }
    7954          41 :     else if( burn_values != bands )
    7955             :     {
    7956           0 :         CPLError( CE_Failure, CPLE_AppDefined,
    7957             :                   "Did not get the expected number of burn values in RasterizeLayer()" );
    7958           0 :         return CE_Failure;
    7959             :     }
    7960             : 
    7961          42 :     OGRLayerH hLayer = (OGRLayerH)layer;
    7962          42 :     eErr = GDALRasterizeLayers( dataset, bands, band_list,
    7963             :                                 1, &hLayer,
    7964             :                                 (GDALTransformerFunc) pfnTransformer,
    7965             :                                 pTransformArg,
    7966             :                                 burn_values_list, options,
    7967             :                                 callback, callback_data );
    7968             : 
    7969          42 :     if( burn_values == 0 )
    7970           1 :         CPLFree( burn_values_list );
    7971             : 
    7972          42 :     return eErr;
    7973             : }
    7974             : 
    7975             : 
    7976          21 : int  Polygonize( GDALRasterBandShadow *srcBand,
    7977             :          GDALRasterBandShadow *maskBand,
    7978             :              OGRLayerShadow *outLayer,
    7979             :                  int iPixValField,
    7980             :                  char **options = NULL,
    7981             :                  GDALProgressFunc callback=NULL,
    7982             :                  void* callback_data=NULL) {
    7983             : 
    7984          21 :     CPLErrorReset();
    7985             : 
    7986          21 :     return GDALPolygonize( srcBand, maskBand, outLayer, iPixValField,
    7987          21 :                            options, callback, callback_data );
    7988             : }
    7989             : 
    7990             : 
    7991           1 : int  FPolygonize( GDALRasterBandShadow *srcBand,
    7992             :                  GDALRasterBandShadow *maskBand,
    7993             :                  OGRLayerShadow *outLayer,
    7994             :                  int iPixValField,
    7995             :                  char **options = NULL,
    7996             :                  GDALProgressFunc callback=NULL,
    7997             :                  void* callback_data=NULL) {
    7998             : 
    7999           1 :     CPLErrorReset();
    8000             : 
    8001           1 :     return GDALFPolygonize( srcBand, maskBand, outLayer, iPixValField,
    8002           1 :                            options, callback, callback_data );
    8003             : }
    8004             : 
    8005             : 
    8006          29 : int  FillNodata( GDALRasterBandShadow *targetBand,
    8007             :          GDALRasterBandShadow *maskBand,
    8008             :                  double maxSearchDist,
    8009             :                  int smoothingIterations,
    8010             :                  char **options = NULL,
    8011             :                  GDALProgressFunc callback=NULL,
    8012             :                  void* callback_data=NULL) {
    8013             : 
    8014          29 :     CPLErrorReset();
    8015             : 
    8016          29 :     return GDALFillNodata( targetBand, maskBand, maxSearchDist,
    8017             :                0, smoothingIterations, options,
    8018          29 :          callback, callback_data );
    8019             : }
    8020             : 
    8021             : 
    8022          12 : int  SieveFilter( GDALRasterBandShadow *srcBand,
    8023             :           GDALRasterBandShadow *maskBand,
    8024             :               GDALRasterBandShadow *dstBand,
    8025             :                   int threshold, int connectedness=4,
    8026             :                   char **options = NULL,
    8027             :                   GDALProgressFunc callback=NULL,
    8028             :                   void* callback_data=NULL) {
    8029             : 
    8030          12 :     CPLErrorReset();
    8031             : 
    8032          12 :     return GDALSieveFilter( srcBand, maskBand, dstBand,
    8033             :                             threshold, connectedness,
    8034          12 :                             options, callback, callback_data );
    8035             : }
    8036             : 
    8037             : 
    8038           2 : int  RegenerateOverviews( GDALRasterBandShadow *srcBand,
    8039             :             int overviewBandCount,
    8040             :                           GDALRasterBandShadow **overviewBands,
    8041             :                           const char *resampling = "average",
    8042             :                           GDALProgressFunc callback=NULL,
    8043             :                           void* callback_data=NULL) {
    8044             : 
    8045           2 :     CPLErrorReset();
    8046             : 
    8047           2 :     return GDALRegenerateOverviews( srcBand, overviewBandCount, overviewBands,
    8048           2 :                   resampling ? resampling : "average", callback, callback_data );
    8049             : }
    8050             : 
    8051             : 
    8052         248 : int  RegenerateOverview( GDALRasterBandShadow *srcBand,
    8053             :                           GDALRasterBandShadow *overviewBand,
    8054             :                           const char *resampling = "average",
    8055             :                           GDALProgressFunc callback=NULL,
    8056             :                           void* callback_data=NULL) {
    8057             : 
    8058         248 :     CPLErrorReset();
    8059             : 
    8060         248 :     return GDALRegenerateOverviews( srcBand, 1, &overviewBand,
    8061         248 :                   resampling ? resampling : "average", callback, callback_data );
    8062             : }
    8063             : 
    8064             : 
    8065           3 : int ContourGenerate( GDALRasterBandShadow *srcBand,
    8066             :                      double contourInterval,
    8067             :                      double contourBase,
    8068             :                      int fixedLevelCount,
    8069             :                      double *fixedLevels,
    8070             :                      int useNoData,
    8071             :                      double noDataValue,
    8072             :                      OGRLayerShadow* dstLayer,
    8073             :                      int idField,
    8074             :                      int elevField,
    8075             :                      GDALProgressFunc callback = NULL,
    8076             :                      void* callback_data = NULL)
    8077             : {
    8078           3 :     CPLErr eErr;
    8079             : 
    8080           3 :     CPLErrorReset();
    8081             : 
    8082           3 :     eErr =  GDALContourGenerate( srcBand,
    8083             :                                  contourInterval,
    8084             :                                  contourBase,
    8085             :                                  fixedLevelCount,
    8086             :                                  fixedLevels,
    8087             :                                  useNoData,
    8088             :                                  noDataValue,
    8089             :                                  dstLayer,
    8090             :                                  idField,
    8091             :                                  elevField,
    8092             :                                  callback,
    8093             :                                  callback_data);
    8094             : 
    8095           3 :     return eErr;
    8096             : }
    8097             : 
    8098             : 
    8099          25 : int ContourGenerateEx( GDALRasterBandShadow *srcBand,
    8100             :                        OGRLayerShadow* dstLayer,
    8101             :                        char** options = NULL,
    8102             :                        GDALProgressFunc callback = NULL,
    8103             :                        void* callback_data = NULL )
    8104             : {
    8105          25 :     CPLErr eErr;
    8106             : 
    8107          25 :     CPLErrorReset();
    8108             : 
    8109          25 :     eErr =  GDALContourGenerateEx( srcBand,
    8110             :                                    dstLayer,
    8111             :                                    options,
    8112             :                                    callback,
    8113             :                                    callback_data);
    8114             : 
    8115          25 :     return eErr;
    8116             : }
    8117             : 
    8118             : 
    8119           0 : GDALDatasetShadow *ViewshedGenerate( GDALRasterBandShadow *srcBand,
    8120             :                         const char* driverName,
    8121             :                         const char* targetRasterName,
    8122             :                         char** creationOptions,
    8123             :                         double observerX, double observerY, double observerHeight,
    8124             :                         double targetHeight, double visibleVal, double invisibleVal,
    8125             :                         double outOfRangeVal,  double noDataVal, double dfCurvCoeff,
    8126             :                         GDALViewshedMode mode, double maxDistance,
    8127             :                         GDALProgressFunc callback = NULL, void* callback_data = NULL,
    8128             :                         GDALViewshedOutputType heightMode = GVOT_NORMAL,
    8129             :                         char** options = NULL)
    8130             : {
    8131           0 :     GDALDatasetShadow* ds = GDALViewshedGenerate( srcBand,
    8132             :                                  driverName,
    8133             :                                  targetRasterName,
    8134             :                                  creationOptions,
    8135             :                                  observerX,
    8136             :                                  observerY,
    8137             :                                  observerHeight,
    8138             :                                  targetHeight,
    8139             :                                  visibleVal,
    8140             :                                  invisibleVal,
    8141             :                                  outOfRangeVal,
    8142             :                                  noDataVal,
    8143             :                                  dfCurvCoeff,
    8144             :                                  mode,
    8145             :                                  maxDistance,
    8146             :                                  callback,
    8147             :                                  callback_data,
    8148             :                                  heightMode,
    8149             :                                  options);
    8150           0 :   if (ds == 0) {
    8151             :     /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
    8152             :   }
    8153           0 :   return ds;
    8154             : }
    8155             : 
    8156             : 
    8157           5 : void IsLineOfSightVisible(GDALRasterBandShadow *band,
    8158             :                           int xA, int yA, double zA,
    8159             :                           int xB, int yB, double zB,
    8160             :                           bool *pbVisible, int *pnXIntersection, int *pnYIntersection,
    8161             :                           char** options = NULL)
    8162             : {
    8163           5 :     *pbVisible = GDALIsLineOfSightVisible(band, xA, yA, zA, xB, yB, zB, pnXIntersection, pnYIntersection, options);
    8164           5 : }
    8165             : 
    8166             : 
    8167          24 : GDALDatasetShadow *AutoCreateWarpedVRT( GDALDatasetShadow *src_ds,
    8168             :                                         const char *src_wkt = 0,
    8169             :                                         const char *dst_wkt = 0,
    8170             :                                         GDALResampleAlg eResampleAlg = GRA_NearestNeighbour,
    8171             :                                         double maxerror = 0.0 ) {
    8172          24 :   GDALDatasetShadow *ds = GDALAutoCreateWarpedVRT( src_ds, src_wkt,
    8173             :                                                    dst_wkt,
    8174             :                                                    eResampleAlg,
    8175             :                                                    maxerror,
    8176             :                                                    0 );
    8177          24 :   if (ds == 0) {
    8178             :     /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
    8179             :   }
    8180          24 :   return ds;
    8181             : 
    8182             : }
    8183             : 
    8184             : 
    8185           8 : GDALDatasetShadow*  CreatePansharpenedVRT( const char* pszXML,
    8186             :                             GDALRasterBandShadow* panchroBand,
    8187             :                             int nInputSpectralBands,
    8188             :                             GDALRasterBandShadow** ahInputSpectralBands )
    8189             : {
    8190           8 :     CPLErrorReset();
    8191             : 
    8192           8 :     return (GDALDatasetShadow*)GDALCreatePansharpenedVRT( pszXML, panchroBand,
    8193           8 :                                       nInputSpectralBands, ahInputSpectralBands );
    8194             : }
    8195             : 
    8196          71 : SWIGINTERN void delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow *self){
    8197          71 :     GDALDestroyTransformer( self );
    8198          71 :   }
    8199           0 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_0(GDALTransformerInfoShadow *self,int bDstToSrc,double inout[3]){
    8200           0 :     int nRet, nSuccess = TRUE;
    8201             : 
    8202           0 :     nRet = GDALUseTransformer( self, bDstToSrc,
    8203             :                                1, &inout[0], &inout[1], &inout[2],
    8204             :                                &nSuccess );
    8205             : 
    8206           0 :     return nRet && nSuccess;
    8207             :   }
    8208        8677 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_1(GDALTransformerInfoShadow *self,double argout[3],int bDstToSrc,double x,double y,double z=0.0){
    8209        8677 :     int nRet, nSuccess = TRUE;
    8210             : 
    8211        8677 :     argout[0] = x;
    8212        8677 :     argout[1] = y;
    8213        8677 :     argout[2] = z;
    8214        8677 :     nRet = GDALUseTransformer( self, bDstToSrc,
    8215             :                                1, &argout[0], &argout[1], &argout[2],
    8216             :                                &nSuccess );
    8217             : 
    8218        8677 :     return nRet && nSuccess;
    8219             :   }
    8220             : 
    8221             : static int
    8222           4 : DecomposeSequenceOfCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z )
    8223             : {
    8224          35 :   for( int i = 0; i<nCount; ++i )
    8225             :   {
    8226             : 
    8227          31 :     PyObject *o = PySequence_GetItem(seq, i);
    8228          31 :     if ( !PySequence_Check(o) )
    8229             :     {
    8230           0 :         Py_DECREF(o);
    8231           0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
    8232             : 
    8233           0 :         return FALSE;
    8234             :     }
    8235             : 
    8236          31 :     Py_ssize_t len = PySequence_Size(o);
    8237             : 
    8238          31 :     if (len == 2 || len == 3)
    8239             :     {
    8240          31 :         PyObject *o1 = PySequence_GetItem(o, 0);
    8241          31 :         if (!PyNumber_Check(o1))
    8242             :         {
    8243           0 :             Py_DECREF(o); Py_DECREF(o1);
    8244           0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    8245             : 
    8246           0 :             return FALSE;
    8247             :         }
    8248          31 :         x[i] = PyFloat_AsDouble(o1);
    8249          31 :         Py_DECREF(o1);
    8250             : 
    8251          31 :         o1 = PySequence_GetItem(o, 1);
    8252          31 :         if (!PyNumber_Check(o1))
    8253             :         {
    8254           0 :             Py_DECREF(o); Py_DECREF(o1);
    8255           0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    8256             : 
    8257           0 :             return FALSE;
    8258             :         }
    8259          31 :         y[i] = PyFloat_AsDouble(o1);
    8260          31 :         Py_DECREF(o1);
    8261             : 
    8262             :         /* The 3rd coordinate is optional, default 0.0 */
    8263          31 :         if (len == 3)
    8264             :         {
    8265           0 :             o1 = PySequence_GetItem(o, 2);
    8266           0 :             if (!PyNumber_Check(o1))
    8267             :             {
    8268           0 :                 Py_DECREF(o); Py_DECREF(o1);
    8269           0 :                 PyErr_SetString(PyExc_TypeError, "not a number");
    8270             : 
    8271           0 :                 return FALSE;
    8272             :             }
    8273           0 :             z[i] = PyFloat_AsDouble(o1);
    8274           0 :             Py_DECREF(o1);
    8275             :         }
    8276             :         else
    8277             :         {
    8278          31 :             z[i] = 0.0;
    8279             :         }
    8280             :     }
    8281             :     else
    8282             :     {
    8283           0 :         Py_DECREF(o);
    8284           0 :         PyErr_SetString(PyExc_TypeError, "invalid coordinate");
    8285             : 
    8286           0 :         return FALSE;
    8287             :     }
    8288             : 
    8289          31 :     Py_DECREF(o);
    8290             :   }
    8291             : 
    8292             :   return TRUE;
    8293             : }
    8294             : 
    8295           4 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow *self,int bDstToSrc,int nCount,double *x,double *y,double *z,int *panSuccess){
    8296           4 :     int nRet;
    8297             : 
    8298           8 :     nRet = GDALUseTransformer( self, bDstToSrc, nCount, x, y, z, panSuccess );
    8299             : 
    8300           4 :     return nRet;
    8301             :   }
    8302           1 : SWIGINTERN int GDALTransformerInfoShadow_TransformGeolocations(GDALTransformerInfoShadow *self,GDALRasterBandShadow *xBand,GDALRasterBandShadow *yBand,GDALRasterBandShadow *zBand,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=NULL){
    8303             : 
    8304           1 :     CPLErrorReset();
    8305             : 
    8306           1 :     return GDALTransformGeolocations( xBand, yBand, zBand,
    8307             :                                       GDALUseTransformer, self,
    8308           1 :                                     callback, callback_data, options );
    8309             :   }
    8310             : 
    8311          79 :   GDALTransformerInfoShadow* Transformer( GDALDatasetShadow *src, GDALDatasetShadow *dst,
    8312             :                              char **options ) {
    8313          79 :     GDALTransformerInfoShadow *obj = (GDALTransformerInfoShadow*)
    8314          79 :        GDALCreateGenImgProjTransformer2( (GDALDatasetH)src, (GDALDatasetH)dst,
    8315             :                                          options );
    8316          79 :     return obj;
    8317             :   }
    8318             : 
    8319             : 
    8320             : typedef struct
    8321             : {
    8322             :   int     width;
    8323             :   int     height;
    8324             :   double  xmin;
    8325             :   double  ymin;
    8326             :   double  xmax;
    8327             :   double  ymax;
    8328             :   double  geotransform[6];
    8329             : } SuggestedWarpOutputRes;
    8330             : 
    8331           3 : SWIGINTERN void delete_SuggestedWarpOutputRes(SuggestedWarpOutputRes *self){
    8332           3 :     CPLFree(self);
    8333           3 :   }
    8334           2 : SWIGINTERN void SuggestedWarpOutputRes_GetGeotransform(SuggestedWarpOutputRes *self,double geotransform[6]){
    8335           2 :       memcpy(geotransform, self->geotransform, 6 * sizeof(double));
    8336             :   }
    8337             : 
    8338             : #ifdef SWIGPYTHON
    8339           1 :   SuggestedWarpOutputRes* SuggestedWarpOutputFromTransformer(
    8340             :                                                GDALDatasetShadow *src,
    8341             :                                                GDALTransformerInfoShadow* transformer )
    8342             : #else
    8343             :   SuggestedWarpOutputRes* SuggestedWarpOutput( GDALDatasetShadow *src,
    8344             :                                                GDALTransformerInfoShadow* transformer )
    8345             : #endif
    8346             :   {
    8347           1 :     SuggestedWarpOutputRes* res = (SuggestedWarpOutputRes*)CPLMalloc(sizeof(SuggestedWarpOutputRes));
    8348           1 :     double extent[4];
    8349           1 :     if( GDALSuggestedWarpOutput2(src, GDALGenImgProjTransform, transformer,
    8350           1 :                                  res->geotransform,&(res->width), &(res->height),
    8351             :                                  extent, 0) != CE_None )
    8352             :     {
    8353           0 :         CPLFree(res);
    8354           0 :         return NULL;
    8355             :     }
    8356           1 :     res->xmin = extent[0];
    8357           1 :     res->ymin = extent[1];
    8358           1 :     res->xmax = extent[2];
    8359           1 :     res->ymax = extent[3];
    8360           1 :     return res;
    8361             :   }
    8362             : 
    8363             : 
    8364             : #ifdef SWIGPYTHON
    8365           2 :   SuggestedWarpOutputRes* SuggestedWarpOutputFromOptions( GDALDatasetShadow *src,
    8366             :                                                           char** options )
    8367             : #else
    8368             :   SuggestedWarpOutputRes* SuggestedWarpOutput( GDALDatasetShadow *src,
    8369             :                                                char** options )
    8370             : #endif
    8371             :   {
    8372           2 :     SuggestedWarpOutputRes* res = (SuggestedWarpOutputRes*)CPLMalloc(sizeof(SuggestedWarpOutputRes));
    8373           2 :     double extent[4];
    8374           2 :     void* pTransformArg = GDALCreateGenImgProjTransformer2( src, NULL, options );
    8375           2 :     if( GDALSuggestedWarpOutput2(src, GDALGenImgProjTransform, pTransformArg,
    8376           2 :                                  res->geotransform,&(res->width), &(res->height),
    8377             :                                  extent, 0) != CE_None )
    8378             :     {
    8379           0 :         GDALDestroyTransformer(pTransformArg);
    8380           0 :         CPLFree(res);
    8381           0 :         return NULL;
    8382             :     }
    8383           2 :     GDALDestroyTransformer(pTransformArg);
    8384           2 :     res->xmin = extent[0];
    8385           2 :     res->ymin = extent[1];
    8386           2 :     res->xmax = extent[2];
    8387           2 :     res->ymax = extent[3];
    8388           2 :     return res;
    8389             :   }
    8390             : 
    8391             : 
    8392          23 : GDALDatasetShadow* ApplyVerticalShiftGrid( GDALDatasetShadow *src_ds,
    8393             :                                            GDALDatasetShadow *grid_ds,
    8394             :                                            bool inverse = false,
    8395             :                                            double srcUnitToMeter = 1.0,
    8396             :                                            double dstUnitToMeter = 1.0,
    8397             :                                            char** options = NULL ) {
    8398          23 :   GDALDatasetShadow *ds = GDALApplyVerticalShiftGrid( src_ds, grid_ds,
    8399             :                                                       inverse,
    8400             :                                                       srcUnitToMeter,
    8401             :                                                       dstUnitToMeter,
    8402             :                                                       options );
    8403          23 :   return ds;
    8404             : 
    8405             : }
    8406             : 
    8407             : 
    8408             : #include "gdalalgorithm.h"
    8409             : 
    8410             : typedef GDALAlgorithmRegistryHS GDALAlgorithmRegistryHS;
    8411             : typedef GDALAlgorithmHS GDALAlgorithmHS;
    8412             : typedef GDALAlgorithmArgHS GDALAlgorithmArgHS;
    8413             : typedef GDALArgDatasetValueHS GDALArgDatasetValueHS;
    8414             : 
    8415        6299 : SWIGINTERN void delete_GDALAlgorithmArgHS(GDALAlgorithmArgHS *self){
    8416        6299 :     GDALAlgorithmArgRelease( self );
    8417        6299 :   }
    8418         211 : SWIGINTERN char const *GDALAlgorithmArgHS_GetName(GDALAlgorithmArgHS *self){
    8419         211 :     return GDALAlgorithmArgGetName(self);
    8420             :   }
    8421        4710 : SWIGINTERN GDALAlgorithmArgType GDALAlgorithmArgHS_GetType(GDALAlgorithmArgHS *self){
    8422        4710 :     return GDALAlgorithmArgGetType(self);
    8423             :   }
    8424           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetDescription(GDALAlgorithmArgHS *self){
    8425           1 :     return GDALAlgorithmArgGetDescription(self);
    8426             :   }
    8427           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetShortName(GDALAlgorithmArgHS *self){
    8428           1 :     return GDALAlgorithmArgGetShortName(self);
    8429             :   }
    8430           1 : SWIGINTERN char **GDALAlgorithmArgHS_GetAliases(GDALAlgorithmArgHS *self){
    8431           1 :     return GDALAlgorithmArgGetAliases( self );
    8432             :   }
    8433           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetMetaVar(GDALAlgorithmArgHS *self){
    8434           1 :     return GDALAlgorithmArgGetMetaVar(self);
    8435             :   }
    8436           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetCategory(GDALAlgorithmArgHS *self){
    8437           1 :     return GDALAlgorithmArgGetCategory(self);
    8438             :   }
    8439           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsPositional(GDALAlgorithmArgHS *self){
    8440           1 :     return GDALAlgorithmArgIsPositional(self);
    8441             :   }
    8442           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsRequired(GDALAlgorithmArgHS *self){
    8443           1 :     return GDALAlgorithmArgIsRequired(self);
    8444             :   }
    8445           1 : SWIGINTERN int GDALAlgorithmArgHS_GetMinCount(GDALAlgorithmArgHS *self){
    8446           1 :     return GDALAlgorithmArgGetMinCount(self);
    8447             :   }
    8448           1 : SWIGINTERN int GDALAlgorithmArgHS_GetMaxCount(GDALAlgorithmArgHS *self){
    8449           1 :     return GDALAlgorithmArgGetMaxCount(self);
    8450             :   }
    8451           1 : SWIGINTERN bool GDALAlgorithmArgHS_GetPackedValuesAllowed(GDALAlgorithmArgHS *self){
    8452           1 :     return GDALAlgorithmArgGetPackedValuesAllowed(self);
    8453             :   }
    8454           1 : SWIGINTERN bool GDALAlgorithmArgHS_GetRepeatedArgAllowed(GDALAlgorithmArgHS *self){
    8455           1 :     return GDALAlgorithmArgGetRepeatedArgAllowed(self);
    8456             :   }
    8457           1 : SWIGINTERN char **GDALAlgorithmArgHS_GetChoices(GDALAlgorithmArgHS *self){
    8458           1 :     return GDALAlgorithmArgGetChoices( self );
    8459             :   }
    8460          19 : SWIGINTERN char **GDALAlgorithmArgHS_GetMetadataItem(GDALAlgorithmArgHS *self,char const *item){
    8461          19 :     return GDALAlgorithmArgGetMetadataItem( self, item );
    8462             :   }
    8463           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsExplicitlySet(GDALAlgorithmArgHS *self){
    8464           1 :     return GDALAlgorithmArgIsExplicitlySet(self);
    8465             :   }
    8466           1 : SWIGINTERN bool GDALAlgorithmArgHS_HasDefaultValue(GDALAlgorithmArgHS *self){
    8467           1 :     return GDALAlgorithmArgHasDefaultValue(self);
    8468             :   }
    8469           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsHiddenForCLI(GDALAlgorithmArgHS *self){
    8470           1 :     return GDALAlgorithmArgIsHiddenForCLI(self);
    8471             :   }
    8472           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsOnlyForCLI(GDALAlgorithmArgHS *self){
    8473           1 :     return GDALAlgorithmArgIsOnlyForCLI(self);
    8474             :   }
    8475           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsInput(GDALAlgorithmArgHS *self){
    8476           1 :     return GDALAlgorithmArgIsInput(self);
    8477             :   }
    8478        1853 : SWIGINTERN bool GDALAlgorithmArgHS_IsOutput(GDALAlgorithmArgHS *self){
    8479        1853 :     return GDALAlgorithmArgIsOutput(self);
    8480             :   }
    8481           1 : SWIGINTERN int GDALAlgorithmArgHS_GetDatasetType(GDALAlgorithmArgHS *self){
    8482           1 :     return GDALAlgorithmArgGetDatasetType(self);
    8483             :   }
    8484           1 : SWIGINTERN int GDALAlgorithmArgHS_GetDatasetInputFlags(GDALAlgorithmArgHS *self){
    8485           1 :     return GDALAlgorithmArgGetDatasetInputFlags(self);
    8486             :   }
    8487           1 : SWIGINTERN int GDALAlgorithmArgHS_GetDatasetOutputFlags(GDALAlgorithmArgHS *self){
    8488           1 :     return GDALAlgorithmArgGetDatasetOutputFlags(self);
    8489             :   }
    8490           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetMutualExclusionGroup(GDALAlgorithmArgHS *self){
    8491           1 :     return GDALAlgorithmArgGetMutualExclusionGroup(self);
    8492             :   }
    8493           7 : SWIGINTERN bool GDALAlgorithmArgHS_GetAsBoolean(GDALAlgorithmArgHS *self){
    8494           7 :     return GDALAlgorithmArgGetAsBoolean(self);
    8495             :   }
    8496          96 : SWIGINTERN char const *GDALAlgorithmArgHS_GetAsString(GDALAlgorithmArgHS *self){
    8497          96 :     return GDALAlgorithmArgGetAsString(self);
    8498             :   }
    8499           7 : SWIGINTERN int GDALAlgorithmArgHS_GetAsInteger(GDALAlgorithmArgHS *self){
    8500           7 :     return GDALAlgorithmArgGetAsInteger(self);
    8501             :   }
    8502           7 : SWIGINTERN double GDALAlgorithmArgHS_GetAsDouble(GDALAlgorithmArgHS *self){
    8503           7 :     return GDALAlgorithmArgGetAsDouble(self);
    8504             :   }
    8505        1850 : SWIGINTERN GDALArgDatasetValueHS *GDALAlgorithmArgHS_GetAsDatasetValue(GDALAlgorithmArgHS *self){
    8506        1850 :     return GDALAlgorithmArgGetAsDatasetValue(self);
    8507             :   }
    8508           1 : SWIGINTERN char **GDALAlgorithmArgHS_GetAsStringList(GDALAlgorithmArgHS *self){
    8509           1 :     return GDALAlgorithmArgGetAsStringList( self );
    8510             :   }
    8511           7 : SWIGINTERN void GDALAlgorithmArgHS_GetAsIntegerList(GDALAlgorithmArgHS *self,int *nLen,int const **pList){
    8512           7 :      size_t nLenSizet = 0;
    8513          14 :     *pList = GDALAlgorithmArgGetAsIntegerList(self, &nLenSizet);
    8514           7 :     *nLen = (int)nLenSizet;
    8515             :   }
    8516           7 : SWIGINTERN void GDALAlgorithmArgHS_GetAsDoubleList(GDALAlgorithmArgHS *self,int *nLen,double const **pList){
    8517           7 :      size_t nLenSizet = 0;
    8518          14 :     *pList = GDALAlgorithmArgGetAsDoubleList(self, &nLenSizet);
    8519           7 :     *nLen = (int)nLenSizet;
    8520             :   }
    8521         275 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsBoolean(GDALAlgorithmArgHS *self,bool value){
    8522         275 :     return GDALAlgorithmArgSetAsBoolean(self, value);
    8523             :   }
    8524        1179 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsString(GDALAlgorithmArgHS *self,char const *value){
    8525        1179 :     return GDALAlgorithmArgSetAsString(self, value);
    8526             :   }
    8527         192 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsInteger(GDALAlgorithmArgHS *self,int value){
    8528         192 :     return GDALAlgorithmArgSetAsInteger(self, value);
    8529             :   }
    8530         210 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsDouble(GDALAlgorithmArgHS *self,double value){
    8531         210 :     return GDALAlgorithmArgSetAsDouble(self, value);
    8532             :   }
    8533           1 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsDatasetValue(GDALAlgorithmArgHS *self,GDALArgDatasetValueHS *value){
    8534           1 :     return GDALAlgorithmArgSetAsDatasetValue(self, value);
    8535             :   }
    8536         278 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsStringList(GDALAlgorithmArgHS *self,char **value){
    8537         278 :     return GDALAlgorithmArgSetAsStringList(self, value);
    8538             :   }
    8539          52 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsIntegerList(GDALAlgorithmArgHS *self,int nList,int *pList){
    8540          52 :     return GDALAlgorithmArgSetAsIntegerList(self, nList, pList);
    8541             :   }
    8542         121 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsDoubleList(GDALAlgorithmArgHS *self,int nList,double *pList){
    8543         121 :     return GDALAlgorithmArgSetAsDoubleList(self, nList, pList);
    8544             :   }
    8545           1 : SWIGINTERN bool GDALAlgorithmArgHS_SetDataset(GDALAlgorithmArgHS *self,GDALDatasetShadow *ds){
    8546           1 :     return GDALAlgorithmArgSetDataset(self, ds);
    8547             :   }
    8548         143 : SWIGINTERN bool GDALAlgorithmArgHS_SetDatasets(GDALAlgorithmArgHS *self,int object_list_count,GDALDatasetShadow **poObjects){
    8549         143 :     return GDALAlgorithmArgSetDatasets(self, object_list_count, poObjects);
    8550             :   }
    8551          84 : SWIGINTERN bool GDALAlgorithmArgHS_SetDatasetNames(GDALAlgorithmArgHS *self,char **names){
    8552          84 :     return GDALAlgorithmArgSetDatasetNames(self, names);
    8553             :   }
    8554        3329 : SWIGINTERN void delete_GDALAlgorithmHS(GDALAlgorithmHS *self){
    8555        3329 :     GDALAlgorithmRelease( self );
    8556        3329 :   }
    8557          32 : SWIGINTERN char const *GDALAlgorithmHS_GetName(GDALAlgorithmHS *self){
    8558          32 :     return GDALAlgorithmGetName(self);
    8559             :   }
    8560           1 : SWIGINTERN char const *GDALAlgorithmHS_GetDescription(GDALAlgorithmHS *self){
    8561           1 :     return GDALAlgorithmGetDescription(self);
    8562             :   }
    8563           1 : SWIGINTERN char const *GDALAlgorithmHS_GetLongDescription(GDALAlgorithmHS *self){
    8564           1 :     return GDALAlgorithmGetLongDescription(self);
    8565             :   }
    8566           1 : SWIGINTERN char const *GDALAlgorithmHS_GetHelpFullURL(GDALAlgorithmHS *self){
    8567           1 :     return GDALAlgorithmGetHelpFullURL(self);
    8568             :   }
    8569        1830 : SWIGINTERN bool GDALAlgorithmHS_HasSubAlgorithms(GDALAlgorithmHS *self){
    8570        1830 :     return GDALAlgorithmHasSubAlgorithms(self);
    8571             :   }
    8572           6 : SWIGINTERN char **GDALAlgorithmHS_GetSubAlgorithmNames(GDALAlgorithmHS *self){
    8573           6 :     return GDALAlgorithmGetSubAlgorithmNames( self );
    8574             :   }
    8575        1497 : SWIGINTERN GDALAlgorithmHS *GDALAlgorithmHS_InstantiateSubAlgorithm(GDALAlgorithmHS *self,char const *algName){
    8576        1497 :     return GDALAlgorithmInstantiateSubAlgorithm(self, algName);
    8577             :   }
    8578          47 : SWIGINTERN bool GDALAlgorithmHS_ParseCommandLineArguments(GDALAlgorithmHS *self,char **args){
    8579          47 :     return GDALAlgorithmParseCommandLineArguments(self, args);
    8580             :   }
    8581         486 : SWIGINTERN GDALAlgorithmHS *GDALAlgorithmHS_GetActualAlgorithm(GDALAlgorithmHS *self){
    8582         486 :     return GDALAlgorithmGetActualAlgorithm(self);
    8583             :   }
    8584        1081 : SWIGINTERN bool GDALAlgorithmHS_Run(GDALAlgorithmHS *self,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    8585        1081 :     return GDALAlgorithmRun(self, callback, callback_data);
    8586             :   }
    8587         190 : SWIGINTERN bool GDALAlgorithmHS_Finalize(GDALAlgorithmHS *self){
    8588         190 :     return GDALAlgorithmFinalize(self);
    8589             :   }
    8590         238 : SWIGINTERN bool GDALAlgorithmHS_ParseRunAndFinalize(GDALAlgorithmHS *self,char **args,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    8591         417 :     return GDALAlgorithmParseCommandLineArguments(self, args) &&
    8592         397 :            GDALAlgorithmRun(self, callback, callback_data) &&
    8593         159 :            GDALAlgorithmFinalize(self);
    8594             :   }
    8595           3 : SWIGINTERN retStringAndCPLFree *GDALAlgorithmHS_GetUsageAsJSON(GDALAlgorithmHS *self){
    8596           3 :     return GDALAlgorithmGetUsageAsJSON(self);
    8597             :   }
    8598          89 : SWIGINTERN char **GDALAlgorithmHS_GetArgNames(GDALAlgorithmHS *self){
    8599          89 :     return GDALAlgorithmGetArgNames( self );
    8600             :   }
    8601        6302 : SWIGINTERN GDALAlgorithmArgHS *GDALAlgorithmHS_GetArg(GDALAlgorithmHS *self,char const *argName){
    8602        6302 :     return GDALAlgorithmGetArg(self, argName);
    8603             :   }
    8604        1362 : SWIGINTERN void delete_GDALAlgorithmRegistryHS(GDALAlgorithmRegistryHS *self){
    8605        1362 :     GDALAlgorithmRegistryRelease( self );
    8606        1362 :   }
    8607           1 : SWIGINTERN char **GDALAlgorithmRegistryHS_GetAlgNames(GDALAlgorithmRegistryHS *self){
    8608           1 :     return GDALAlgorithmRegistryGetAlgNames( self );
    8609             :   }
    8610        1363 : SWIGINTERN GDALAlgorithmHS *GDALAlgorithmRegistryHS_InstantiateAlg(GDALAlgorithmRegistryHS *self,char const *algName){
    8611        1363 :     return GDALAlgorithmRegistryInstantiateAlg(self, algName);
    8612             :   }
    8613        1849 : SWIGINTERN void delete_GDALArgDatasetValueHS(GDALArgDatasetValueHS *self){
    8614        1849 :     GDALArgDatasetValueRelease( self );
    8615        1849 :   }
    8616           2 : SWIGINTERN char const *GDALArgDatasetValueHS_GetName(GDALArgDatasetValueHS *self){
    8617           2 :     return GDALArgDatasetValueGetName(self);
    8618             :   }
    8619         452 : SWIGINTERN GDALDatasetShadow *GDALArgDatasetValueHS_GetDataset(GDALArgDatasetValueHS *self){
    8620         452 :     return GDALArgDatasetValueGetDatasetIncreaseRefCount(self);
    8621             :   }
    8622         984 : SWIGINTERN void GDALArgDatasetValueHS_SetName(GDALArgDatasetValueHS *self,char const *name){
    8623         984 :     GDALArgDatasetValueSetName(self, name);
    8624         984 :   }
    8625         415 : SWIGINTERN void GDALArgDatasetValueHS_SetDataset(GDALArgDatasetValueHS *self,GDALDatasetShadow *ds){
    8626         415 :     GDALArgDatasetValueSetDataset(self, ds);
    8627         415 :   }
    8628             : 
    8629          56 : GIntBig wrapper_GDALGetCacheMax()
    8630             : {
    8631          56 :     return GDALGetCacheMax64();
    8632             : }
    8633             : 
    8634             : 
    8635           2 : GIntBig wrapper_GDALGetCacheUsed()
    8636             : {
    8637           2 :     return GDALGetCacheUsed64();
    8638             : }
    8639             : 
    8640             : 
    8641          76 : void wrapper_GDALSetCacheMax(GIntBig nBytes)
    8642             : {
    8643          76 :     return GDALSetCacheMax64(nBytes);
    8644             : }
    8645             : 
    8646             : 
    8647             : /************************************************************************/
    8648             : /*                          XMLTreeToPyList()                           */
    8649             : /************************************************************************/
    8650       26996 : static PyObject *XMLTreeToPyList( CPLXMLNode *psTree )
    8651             : {
    8652       26996 :     PyObject *pyList;
    8653       26996 :     int      nChildCount = 0, iChild;
    8654       26996 :     CPLXMLNode *psChild;
    8655             : 
    8656       26996 :     if( psTree == NULL )
    8657             :         return Py_None;
    8658             : 
    8659       26983 :     for( psChild = psTree->psChild;
    8660       53900 :          psChild != NULL;
    8661       26917 :          psChild = psChild->psNext )
    8662       26917 :         nChildCount++;
    8663             : 
    8664       26983 :     pyList = PyList_New(nChildCount+2);
    8665             : 
    8666       26983 :     PyList_SetItem( pyList, 0, Py_BuildValue( "i", (int) psTree->eType ) );
    8667       26983 :     PyList_SetItem( pyList, 1, Py_BuildValue( "s", psTree->pszValue ) );
    8668             : 
    8669       26983 :     for( psChild = psTree->psChild, iChild = 2;
    8670       53900 :          psChild != NULL;
    8671       26917 :          psChild = psChild->psNext, iChild++ )
    8672             :     {
    8673       26917 :         PyList_SetItem( pyList, iChild, XMLTreeToPyList( psChild ) );
    8674             :     }
    8675             : 
    8676             :     return pyList;
    8677             : }
    8678             : 
    8679             : 
    8680             : /************************************************************************/
    8681             : /*                          PyListToXMLTree()                           */
    8682             : /************************************************************************/
    8683         339 : static CPLXMLNode *PyListToXMLTree( PyObject *pyList )
    8684             : 
    8685             : {
    8686         339 :     int      nChildCount = 0, iChild, nType = 0;
    8687         339 :     CPLXMLNode *psThisNode;
    8688         339 :     CPLXMLNode *psChild;
    8689         339 :     char       *pszText = NULL;
    8690             : 
    8691         339 :     if( PyList_Size(pyList) > INT_MAX )
    8692             :     {
    8693           0 :         PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8694           0 :         return NULL;
    8695             :     }
    8696         339 :     nChildCount = static_cast<int>(PyList_Size(pyList)) - 2;
    8697         339 :     if( nChildCount < 0 )
    8698             :     {
    8699           0 :         PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8700           0 :         return NULL;
    8701             :     }
    8702             : 
    8703         339 :     CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyList,0), "i", &nType ));
    8704         339 :     CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyList,1), "s", &pszText ));
    8705             : 
    8706             :     /* Detect "pseudo" root */
    8707         339 :     if (nType == CXT_Element && pszText != NULL && strlen(pszText) == 0 && nChildCount == 2)
    8708             :     {
    8709           2 :         PyObject *pyFirst = PyList_GET_ITEM(pyList, 2);
    8710           2 :         if (PyList_Size(pyFirst) < 2)
    8711             :         {
    8712           0 :             PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8713           2 :             return NULL;
    8714             :         }
    8715           2 :         int nTypeFirst = 0;
    8716           2 :         char* pszTextFirst = NULL;
    8717           2 :         CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyFirst,0), "i", &nTypeFirst ));
    8718           2 :         CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyFirst,1), "s", &pszTextFirst ));
    8719           2 :         if (nTypeFirst == CXT_Element && pszTextFirst != NULL && pszTextFirst[0] == '?')
    8720             :         {
    8721           2 :             psThisNode = PyListToXMLTree( PyList_GET_ITEM(pyList,2) );
    8722           2 :             psThisNode->psNext = PyListToXMLTree( PyList_GET_ITEM(pyList,3) );
    8723           2 :             return psThisNode;
    8724             :         }
    8725             :     }
    8726             : 
    8727         337 :     psThisNode = CPLCreateXMLNode( NULL, (CPLXMLNodeType) nType, pszText );
    8728             : 
    8729         659 :     for( iChild = 0; iChild < nChildCount; iChild++ )
    8730             :     {
    8731         322 :         psChild = PyListToXMLTree( PyList_GET_ITEM(pyList,iChild+2) );
    8732         322 :         CPLAddXMLChild( psThisNode, psChild );
    8733             :     }
    8734             : 
    8735             :     return psThisNode;
    8736             : }
    8737             : 
    8738             : 
    8739           9 : retStringAndCPLFree *GetJPEG2000StructureAsString( const char* pszFilename, char** options = NULL )
    8740             : {
    8741           9 :     CPLXMLNode* psNode = GDALGetJPEG2000Structure(pszFilename, options);
    8742           9 :     if( psNode == NULL )
    8743             :         return NULL;
    8744           9 :     char* pszXML = CPLSerializeXMLTree(psNode);
    8745           9 :     CPLDestroyXMLNode(psNode);
    8746           9 :     return pszXML;
    8747             : }
    8748             : 
    8749             : 
    8750         372 : int GetDriverCount() {
    8751         372 :   return GDALGetDriverCount();
    8752             : }
    8753             : 
    8754             : 
    8755             : static
    8756       14412 : GDALDriverShadow* GetDriverByName( char const *name ) {
    8757       14412 :   return (GDALDriverShadow*) GDALGetDriverByName( name );
    8758             : }
    8759             : 
    8760             : 
    8761       80906 : GDALDriverShadow* GetDriver( int i ) {
    8762       80906 :   return (GDALDriverShadow*) GDALGetDriver( i );
    8763             : }
    8764             : 
    8765             : 
    8766       23108 : GDALDatasetShadow* Open( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    8767       23108 :   CPLErrorReset();
    8768       23108 :   GDALDatasetShadow *ds = GDALOpen( utf8_path, eAccess );
    8769             : #ifndef SWIGPYTHON
    8770             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8771             :   {
    8772             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8773             :           GDALClose(ds);
    8774             :       ds = NULL;
    8775             :   }
    8776             : #endif
    8777       23108 :   return (GDALDatasetShadow*) ds;
    8778             : }
    8779             : 
    8780             : 
    8781        6495 : GDALDatasetShadow* OpenEx( char const* utf8_path, unsigned int nOpenFlags = 0,
    8782             :                            char** allowed_drivers = NULL, char** open_options = NULL,
    8783             :                            char** sibling_files = NULL ) {
    8784        6495 :   CPLErrorReset();
    8785             : #ifdef SWIGPYTHON
    8786        8899 :   if( GetUseExceptions() )
    8787        2854 :       nOpenFlags |= GDAL_OF_VERBOSE_ERROR;
    8788             : #endif
    8789        6495 :   GDALDatasetShadow *ds = GDALOpenEx( utf8_path, nOpenFlags, allowed_drivers,
    8790             :                                       open_options, sibling_files );
    8791             : #ifndef SWIGPYTHON
    8792             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8793             :   {
    8794             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8795             :           GDALClose(ds);
    8796             :       ds = NULL;
    8797             :   }
    8798             : #endif
    8799        6495 :   return (GDALDatasetShadow*) ds;
    8800             : }
    8801             : 
    8802             : 
    8803        5053 : GDALDatasetShadow* OpenShared( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    8804        5053 :   CPLErrorReset();
    8805        5053 :   GDALDatasetShadow *ds = GDALOpenShared( utf8_path, eAccess );
    8806             : #ifndef SWIGPYTHON
    8807             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8808             :   {
    8809             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8810             :           GDALClose(ds);
    8811             :       ds = NULL;
    8812             :   }
    8813             : #endif
    8814        5053 :   return (GDALDatasetShadow*) ds;
    8815             : }
    8816             : 
    8817             : 
    8818          11 : GDALDriverShadow *IdentifyDriver( const char *utf8_path,
    8819             :                                   char **papszSiblings = NULL ) {
    8820          11 :     return (GDALDriverShadow *) GDALIdentifyDriver( utf8_path,
    8821          11 :                                                 papszSiblings );
    8822             : }
    8823             : 
    8824             : 
    8825          50 : GDALDriverShadow *IdentifyDriverEx( const char* utf8_path,
    8826             :                                     unsigned int nIdentifyFlags = 0,
    8827             :                                     char** allowed_drivers = NULL,
    8828             :                                     char** sibling_files = NULL )
    8829             : {
    8830          50 :     return  (GDALDriverShadow *) GDALIdentifyDriverEx( utf8_path,
    8831             :                                                 nIdentifyFlags,
    8832             :                                                 allowed_drivers,
    8833          50 :                                                 sibling_files );
    8834             : }
    8835             : 
    8836             : 
    8837         193 :   char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
    8838         193 :     int nResArgCount;
    8839             : 
    8840         193 :     if( papszArgv == NULL )
    8841             :         return NULL;
    8842             : 
    8843         386 :     bool bReloadDrivers = ( CSLFindString(papszArgv, "GDAL_SKIP") >= 0 ||
    8844         193 :                             CSLFindString(papszArgv, "OGR_SKIP") >= 0 );
    8845             : 
    8846         193 :     nResArgCount =
    8847         193 :       GDALGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions );
    8848             : 
    8849         193 :     if( bReloadDrivers )
    8850             :     {
    8851           0 :         GDALAllRegister();
    8852             :     }
    8853             : 
    8854         193 :     if( nResArgCount <= 0 )
    8855             :         return NULL;
    8856             :     else
    8857         178 :         return papszArgv;
    8858             :   }
    8859             : 
    8860             : 
    8861             : #include "gdal_utils.h"
    8862             : 
    8863             : 
    8864             : 
    8865             : #include <vector>
    8866             : 
    8867             : class ErrorStruct
    8868             : {
    8869             :   public:
    8870             :     CPLErr type;
    8871             :     CPLErrorNum no;
    8872             :     char* msg;
    8873             : 
    8874             :     ErrorStruct() = delete;
    8875         273 :     ErrorStruct(CPLErr eErrIn, CPLErrorNum noIn, const char* msgIn) :
    8876         273 :         type(eErrIn), no(noIn), msg(msgIn ? CPLStrdup(msgIn) : nullptr) {}
    8877          70 :     ErrorStruct(const ErrorStruct& other):
    8878          70 :         type(other.type), no(other.no),
    8879          70 :         msg(other.msg ? CPLStrdup(other.msg) : nullptr) {}
    8880         343 :     ~ErrorStruct() { CPLFree(msg); }
    8881             : };
    8882             : 
    8883         273 : static void CPL_STDCALL StackingErrorHandler( CPLErr eErr, CPLErrorNum no,
    8884             :                                            const char* msg )
    8885             : {
    8886         273 :     std::vector<ErrorStruct>* paoErrors =
    8887             :         static_cast<std::vector<ErrorStruct> *>(
    8888         273 :             CPLGetErrorHandlerUserData());
    8889         273 :     paoErrors->emplace_back(eErr, no, msg);
    8890         273 : }
    8891             : 
    8892        2476 : static void PushStackingErrorHandler(std::vector<ErrorStruct>* paoErrors)
    8893             : {
    8894        2476 :     CPLPushErrorHandlerEx(StackingErrorHandler, paoErrors);
    8895        2476 :     CPLSetCurrentErrorHandlerCatchDebug(false);
    8896        2476 : }
    8897             : 
    8898        2476 : static void PopStackingErrorHandler(std::vector<ErrorStruct>* paoErrors, bool bSuccess)
    8899             : {
    8900        2476 :     CPLPopErrorHandler();
    8901             : 
    8902             :     // If the operation was successful, do not emit regular CPLError()
    8903             :     // of CE_Failure type that would be caught by the PythonBindingErrorHandler
    8904             :     // and turned into
    8905             :     // Python exceptions. Just emit them with the previous error handler
    8906             : 
    8907        2749 :     for( size_t iError = 0; iError < paoErrors->size(); ++iError )
    8908             :     {
    8909         273 :         CPLErr eErrClass = (*paoErrors)[iError].type;
    8910         273 :         if( bSuccess && eErrClass == CE_Failure )
    8911             :         {
    8912          11 :             CPLCallPreviousHandler( eErrClass,
    8913          11 :                                 (*paoErrors)[iError].no,
    8914          11 :                                 (*paoErrors)[iError].msg );
    8915             :         }
    8916             :         else
    8917             :         {
    8918         262 :             CPLError( eErrClass,
    8919         262 :                     (*paoErrors)[iError].no,
    8920             :                     "%s",
    8921         262 :                     (*paoErrors)[iError].msg );
    8922             :         }
    8923             :     }
    8924             : 
    8925        2476 :     if( bSuccess )
    8926             :     {
    8927        2363 :         CPLErrorReset();
    8928             :     }
    8929        2476 : }
    8930             : 
    8931          52 : SWIGINTERN GDALInfoOptions *new_GDALInfoOptions(char **options){
    8932          52 :         return GDALInfoOptionsNew(options, NULL);
    8933             :     }
    8934          52 : SWIGINTERN void delete_GDALInfoOptions(GDALInfoOptions *self){
    8935          52 :         GDALInfoOptionsFree( self );
    8936          52 :     }
    8937          36 : SWIGINTERN GDALVectorInfoOptions *new_GDALVectorInfoOptions(char **options){
    8938          36 :         return GDALVectorInfoOptionsNew(options, NULL);
    8939             :     }
    8940          36 : SWIGINTERN void delete_GDALVectorInfoOptions(GDALVectorInfoOptions *self){
    8941          36 :         GDALVectorInfoOptionsFree( self );
    8942          36 :     }
    8943          27 : SWIGINTERN GDALMultiDimInfoOptions *new_GDALMultiDimInfoOptions(char **options){
    8944          27 :         return GDALMultiDimInfoOptionsNew(options, NULL);
    8945             :     }
    8946          27 : SWIGINTERN void delete_GDALMultiDimInfoOptions(GDALMultiDimInfoOptions *self){
    8947          27 :         GDALMultiDimInfoOptionsFree( self );
    8948          27 :     }
    8949        1984 : SWIGINTERN GDALTranslateOptions *new_GDALTranslateOptions(char **options){
    8950        1984 :         return GDALTranslateOptionsNew(options, NULL);
    8951             :     }
    8952        1980 : SWIGINTERN void delete_GDALTranslateOptions(GDALTranslateOptions *self){
    8953        1980 :         GDALTranslateOptionsFree( self );
    8954        1980 :     }
    8955             : 
    8956        1982 : GDALDatasetShadow* wrapper_GDALTranslate( const char* dest,
    8957             :                                       GDALDatasetShadow* dataset,
    8958             :                                       GDALTranslateOptions* translateOptions,
    8959             :                                       GDALProgressFunc callback=NULL,
    8960             :                                       void* callback_data=NULL)
    8961             : {
    8962        1982 :     int usageError; /* ignored */
    8963        1982 :     bool bFreeOptions = false;
    8964        1982 :     if( callback )
    8965             :     {
    8966           3 :         if( translateOptions == NULL )
    8967             :         {
    8968           1 :             bFreeOptions = true;
    8969           1 :             translateOptions = GDALTranslateOptionsNew(NULL, NULL);
    8970             :         }
    8971           3 :         GDALTranslateOptionsSetProgress(translateOptions, callback, callback_data);
    8972             :     }
    8973             : #ifdef SWIGPYTHON
    8974        1982 :     std::vector<ErrorStruct> aoErrors;
    8975        2818 :     if( GetUseExceptions() )
    8976             :     {
    8977         852 :         PushStackingErrorHandler(&aoErrors);
    8978             :     }
    8979             : #endif
    8980        1982 :     GDALDatasetH hDSRet = GDALTranslate(dest, dataset, translateOptions, &usageError);
    8981        1982 :     if( bFreeOptions )
    8982           1 :         GDALTranslateOptionsFree(translateOptions);
    8983             : #ifdef SWIGPYTHON
    8984        2818 :     if( GetUseExceptions() )
    8985             :     {
    8986         852 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    8987             :     }
    8988             : #endif
    8989        1982 :     return hDSRet;
    8990             : }
    8991             : 
    8992         769 : SWIGINTERN GDALWarpAppOptions *new_GDALWarpAppOptions(char **options){
    8993         769 :         return GDALWarpAppOptionsNew(options, NULL);
    8994             :     }
    8995         767 : SWIGINTERN void delete_GDALWarpAppOptions(GDALWarpAppOptions *self){
    8996         767 :         GDALWarpAppOptionsFree( self );
    8997         767 :     }
    8998             : 
    8999             : 
    9000          86 : int wrapper_GDALWarpDestDS( GDALDatasetShadow* dstDS,
    9001             :                             int object_list_count, GDALDatasetShadow** poObjects,
    9002             :                             GDALWarpAppOptions* warpAppOptions,
    9003             :                             GDALProgressFunc callback=NULL,
    9004             :                             void* callback_data=NULL)
    9005             : {
    9006          86 :     int usageError; /* ignored */
    9007          86 :     bool bFreeOptions = false;
    9008          86 :     if( callback )
    9009             :     {
    9010           1 :         if( warpAppOptions == NULL )
    9011             :         {
    9012           1 :             bFreeOptions = true;
    9013           1 :             warpAppOptions = GDALWarpAppOptionsNew(NULL, NULL);
    9014             :         }
    9015           1 :         GDALWarpAppOptionsSetProgress(warpAppOptions, callback, callback_data);
    9016             :     }
    9017             : #ifdef SWIGPYTHON
    9018          86 :     std::vector<ErrorStruct> aoErrors;
    9019         166 :     if( GetUseExceptions() )
    9020             :     {
    9021          86 :         PushStackingErrorHandler(&aoErrors);
    9022             :     }
    9023             : #endif
    9024          86 :     bool bRet = (GDALWarp(NULL, dstDS, object_list_count, poObjects, warpAppOptions, &usageError) != NULL);
    9025          86 :     if( bFreeOptions )
    9026           1 :         GDALWarpAppOptionsFree(warpAppOptions);
    9027             : #ifdef SWIGPYTHON
    9028         166 :     if( GetUseExceptions() )
    9029             :     {
    9030          86 :         PopStackingErrorHandler(&aoErrors, bRet);
    9031             :     }
    9032             : #endif
    9033          86 :     return bRet;
    9034             : }
    9035             : 
    9036             : 
    9037         684 : GDALDatasetShadow* wrapper_GDALWarpDestName( const char* dest,
    9038             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    9039             :                                              GDALWarpAppOptions* warpAppOptions,
    9040             :                                              GDALProgressFunc callback=NULL,
    9041             :                                              void* callback_data=NULL)
    9042             : {
    9043         684 :     int usageError; /* ignored */
    9044         684 :     bool bFreeOptions = false;
    9045         684 :     if( callback )
    9046             :     {
    9047           2 :         if( warpAppOptions == NULL )
    9048             :         {
    9049           1 :             bFreeOptions = true;
    9050           1 :             warpAppOptions = GDALWarpAppOptionsNew(NULL, NULL);
    9051             :         }
    9052           2 :         GDALWarpAppOptionsSetProgress(warpAppOptions, callback, callback_data);
    9053             :     }
    9054             : #ifdef SWIGPYTHON
    9055         684 :     std::vector<ErrorStruct> aoErrors;
    9056        1325 :     if( GetUseExceptions() )
    9057             :     {
    9058         660 :         PushStackingErrorHandler(&aoErrors);
    9059             :     }
    9060             : #endif
    9061         684 :     GDALDatasetH hDSRet = GDALWarp(dest, NULL, object_list_count, poObjects, warpAppOptions, &usageError);
    9062         684 :     if( bFreeOptions )
    9063           1 :         GDALWarpAppOptionsFree(warpAppOptions);
    9064             : #ifdef SWIGPYTHON
    9065        1325 :     if( GetUseExceptions() )
    9066             :     {
    9067         660 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9068             :     }
    9069             : #endif
    9070         684 :     return hDSRet;
    9071             : }
    9072             : 
    9073         639 : SWIGINTERN GDALVectorTranslateOptions *new_GDALVectorTranslateOptions(char **options){
    9074         639 :         return GDALVectorTranslateOptionsNew(options, NULL);
    9075             :     }
    9076         612 : SWIGINTERN void delete_GDALVectorTranslateOptions(GDALVectorTranslateOptions *self){
    9077         612 :         GDALVectorTranslateOptionsFree( self );
    9078         612 :     }
    9079             : 
    9080          12 : int wrapper_GDALVectorTranslateDestDS( GDALDatasetShadow* dstDS,
    9081             :                                        GDALDatasetShadow* srcDS,
    9082             :                             GDALVectorTranslateOptions* options,
    9083             :                             GDALProgressFunc callback=NULL,
    9084             :                             void* callback_data=NULL)
    9085             : {
    9086          12 :     int usageError; /* ignored */
    9087          12 :     bool bFreeOptions = false;
    9088          12 :     if( callback )
    9089             :     {
    9090           0 :         if( options == NULL )
    9091             :         {
    9092           0 :             bFreeOptions = true;
    9093           0 :             options = GDALVectorTranslateOptionsNew(NULL, NULL);
    9094             :         }
    9095           0 :         GDALVectorTranslateOptionsSetProgress(options, callback, callback_data);
    9096             :     }
    9097             : #ifdef SWIGPYTHON
    9098          12 :     std::vector<ErrorStruct> aoErrors;
    9099          19 :     if( GetUseExceptions() )
    9100             :     {
    9101          11 :         PushStackingErrorHandler(&aoErrors);
    9102             :     }
    9103             : #endif
    9104          12 :     bool bRet = (GDALVectorTranslate(NULL, dstDS, 1, &srcDS, options, &usageError) != NULL);
    9105          12 :     if( bFreeOptions )
    9106           0 :         GDALVectorTranslateOptionsFree(options);
    9107             : #ifdef SWIGPYTHON
    9108          19 :     if( GetUseExceptions() )
    9109             :     {
    9110          11 :         PopStackingErrorHandler(&aoErrors, bRet);
    9111             :     }
    9112             : #endif
    9113          12 :     return bRet;
    9114             : }
    9115             : 
    9116             : 
    9117         588 : GDALDatasetShadow* wrapper_GDALVectorTranslateDestName( const char* dest,
    9118             :                                              GDALDatasetShadow* srcDS,
    9119             :                                              GDALVectorTranslateOptions* options,
    9120             :                                              GDALProgressFunc callback=NULL,
    9121             :                                              void* callback_data=NULL)
    9122             : {
    9123         588 :     int usageError; /* ignored */
    9124         588 :     bool bFreeOptions = false;
    9125         588 :     if( callback )
    9126             :     {
    9127           3 :         if( options == NULL )
    9128             :         {
    9129           0 :             bFreeOptions = true;
    9130           0 :             options = GDALVectorTranslateOptionsNew(NULL, NULL);
    9131             :         }
    9132           3 :         GDALVectorTranslateOptionsSetProgress(options, callback, callback_data);
    9133             :     }
    9134             : #ifdef SWIGPYTHON
    9135         588 :     std::vector<ErrorStruct> aoErrors;
    9136         968 :     if( GetUseExceptions() )
    9137             :     {
    9138         437 :         PushStackingErrorHandler(&aoErrors);
    9139             :     }
    9140             : #endif
    9141         588 :     GDALDatasetH hDSRet = GDALVectorTranslate(dest, NULL, 1, &srcDS, options, &usageError);
    9142         588 :     if( bFreeOptions )
    9143           0 :         GDALVectorTranslateOptionsFree(options);
    9144             : #ifdef SWIGPYTHON
    9145         968 :     if( GetUseExceptions() )
    9146             :     {
    9147         437 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9148             :     }
    9149             : #endif
    9150         588 :     return hDSRet;
    9151             : }
    9152             : 
    9153          81 : SWIGINTERN GDALDEMProcessingOptions *new_GDALDEMProcessingOptions(char **options){
    9154          81 :         return GDALDEMProcessingOptionsNew(options, NULL);
    9155             :     }
    9156          77 : SWIGINTERN void delete_GDALDEMProcessingOptions(GDALDEMProcessingOptions *self){
    9157          77 :         GDALDEMProcessingOptionsFree( self );
    9158          77 :     }
    9159             : 
    9160          77 : GDALDatasetShadow* wrapper_GDALDEMProcessing( const char* dest,
    9161             :                                       GDALDatasetShadow* dataset,
    9162             :                                       const char* pszProcessing,
    9163             :                                       const char* pszColorFilename,
    9164             :                                       GDALDEMProcessingOptions* options,
    9165             :                                       GDALProgressFunc callback=NULL,
    9166             :                                       void* callback_data=NULL)
    9167             : {
    9168          77 :     int usageError; /* ignored */
    9169          77 :     bool bFreeOptions = false;
    9170          77 :     if( callback )
    9171             :     {
    9172           0 :         if( options == NULL )
    9173             :         {
    9174           0 :             bFreeOptions = true;
    9175           0 :             options = GDALDEMProcessingOptionsNew(NULL, NULL);
    9176             :         }
    9177           0 :         GDALDEMProcessingOptionsSetProgress(options, callback, callback_data);
    9178             :     }
    9179             : #ifdef SWIGPYTHON
    9180          77 :     std::vector<ErrorStruct> aoErrors;
    9181         154 :     if( GetUseExceptions() )
    9182             :     {
    9183          77 :         PushStackingErrorHandler(&aoErrors);
    9184             :     }
    9185             : #endif
    9186          77 :     GDALDatasetH hDSRet = GDALDEMProcessing(dest, dataset, pszProcessing, pszColorFilename, options, &usageError);
    9187          77 :     if( bFreeOptions )
    9188           0 :         GDALDEMProcessingOptionsFree(options);
    9189             : #ifdef SWIGPYTHON
    9190         154 :     if( GetUseExceptions() )
    9191             :     {
    9192          77 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9193             :     }
    9194             : #endif
    9195          77 :     return hDSRet;
    9196             : }
    9197             : 
    9198          45 : SWIGINTERN GDALNearblackOptions *new_GDALNearblackOptions(char **options){
    9199          45 :         return GDALNearblackOptionsNew(options, NULL);
    9200             :     }
    9201          45 : SWIGINTERN void delete_GDALNearblackOptions(GDALNearblackOptions *self){
    9202          45 :         GDALNearblackOptionsFree( self );
    9203          45 :     }
    9204             : 
    9205           2 : int wrapper_GDALNearblackDestDS( GDALDatasetShadow* dstDS,
    9206             :                             GDALDatasetShadow* srcDS,
    9207             :                             GDALNearblackOptions* options,
    9208             :                             GDALProgressFunc callback=NULL,
    9209             :                             void* callback_data=NULL)
    9210             : {
    9211           2 :     int usageError; /* ignored */
    9212           2 :     bool bFreeOptions = false;
    9213           2 :     if( callback )
    9214             :     {
    9215           0 :         if( options == NULL )
    9216             :         {
    9217           0 :             bFreeOptions = true;
    9218           0 :             options = GDALNearblackOptionsNew(NULL, NULL);
    9219             :         }
    9220           0 :         GDALNearblackOptionsSetProgress(options, callback, callback_data);
    9221             :     }
    9222             : #ifdef SWIGPYTHON
    9223           2 :     std::vector<ErrorStruct> aoErrors;
    9224           4 :     if( GetUseExceptions() )
    9225             :     {
    9226           2 :         PushStackingErrorHandler(&aoErrors);
    9227             :     }
    9228             : #endif
    9229           2 :     bool bRet = (GDALNearblack(NULL, dstDS, srcDS, options, &usageError) != NULL);
    9230           2 :     if( bFreeOptions )
    9231           0 :         GDALNearblackOptionsFree(options);
    9232             : #ifdef SWIGPYTHON
    9233           4 :     if( GetUseExceptions() )
    9234             :     {
    9235           2 :         PopStackingErrorHandler(&aoErrors, bRet);
    9236             :     }
    9237             : #endif
    9238           2 :     return bRet;
    9239             : }
    9240             : 
    9241             : 
    9242          43 : GDALDatasetShadow* wrapper_GDALNearblackDestName( const char* dest,
    9243             :                                              GDALDatasetShadow* srcDS,
    9244             :                                              GDALNearblackOptions* options,
    9245             :                                              GDALProgressFunc callback=NULL,
    9246             :                                              void* callback_data=NULL)
    9247             : {
    9248          43 :     int usageError; /* ignored */
    9249          43 :     bool bFreeOptions = false;
    9250          43 :     if( callback )
    9251             :     {
    9252           0 :         if( options == NULL )
    9253             :         {
    9254           0 :             bFreeOptions = true;
    9255           0 :             options = GDALNearblackOptionsNew(NULL, NULL);
    9256             :         }
    9257           0 :         GDALNearblackOptionsSetProgress(options, callback, callback_data);
    9258             :     }
    9259             : #ifdef SWIGPYTHON
    9260          43 :     std::vector<ErrorStruct> aoErrors;
    9261          86 :     if( GetUseExceptions() )
    9262             :     {
    9263          43 :         PushStackingErrorHandler(&aoErrors);
    9264             :     }
    9265             : #endif
    9266          43 :     GDALDatasetH hDSRet = GDALNearblack(dest, NULL, srcDS, options, &usageError);
    9267          43 :     if( bFreeOptions )
    9268           0 :         GDALNearblackOptionsFree(options);
    9269             : #ifdef SWIGPYTHON
    9270          86 :     if( GetUseExceptions() )
    9271             :     {
    9272          43 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9273             :     }
    9274             : #endif
    9275          43 :     return hDSRet;
    9276             : }
    9277             : 
    9278          52 : SWIGINTERN GDALGridOptions *new_GDALGridOptions(char **options){
    9279          52 :         return GDALGridOptionsNew(options, NULL);
    9280             :     }
    9281          52 : SWIGINTERN void delete_GDALGridOptions(GDALGridOptions *self){
    9282          52 :         GDALGridOptionsFree( self );
    9283          52 :     }
    9284             : 
    9285          52 : GDALDatasetShadow* wrapper_GDALGrid( const char* dest,
    9286             :                                       GDALDatasetShadow* dataset,
    9287             :                                       GDALGridOptions* options,
    9288             :                                       GDALProgressFunc callback=NULL,
    9289             :                                       void* callback_data=NULL)
    9290             : {
    9291          52 :     int usageError; /* ignored */
    9292          52 :     bool bFreeOptions = false;
    9293          52 :     if( callback )
    9294             :     {
    9295           0 :         if( options == NULL )
    9296             :         {
    9297           0 :             bFreeOptions = true;
    9298           0 :             options = GDALGridOptionsNew(NULL, NULL);
    9299             :         }
    9300           0 :         GDALGridOptionsSetProgress(options, callback, callback_data);
    9301             :     }
    9302             : #ifdef SWIGPYTHON
    9303          52 :     std::vector<ErrorStruct> aoErrors;
    9304         103 :     if( GetUseExceptions() )
    9305             :     {
    9306          51 :         PushStackingErrorHandler(&aoErrors);
    9307             :     }
    9308             : #endif
    9309          52 :     GDALDatasetH hDSRet = GDALGrid(dest, dataset, options, &usageError);
    9310          52 :     if( bFreeOptions )
    9311           0 :         GDALGridOptionsFree(options);
    9312             : #ifdef SWIGPYTHON
    9313         103 :     if( GetUseExceptions() )
    9314             :     {
    9315          51 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9316             :     }
    9317             : #endif
    9318          52 :     return hDSRet;
    9319             : }
    9320             : 
    9321          12 : SWIGINTERN GDALContourOptions *new_GDALContourOptions(char **options){
    9322          12 :             return GDALContourOptionsNew(options, NULL);
    9323             :         }
    9324          12 : SWIGINTERN void delete_GDALContourOptions(GDALContourOptions *self){
    9325          12 :             GDALContourOptionsFree( self );
    9326          12 :         }
    9327             : 
    9328             : 
    9329           6 : int wrapper_GDALContourDestDS(  GDALDatasetShadow* dstDS,
    9330             :                                 GDALDatasetShadow* srcDS,
    9331             :                                 GDALContourOptions* options,
    9332             :                                 GDALProgressFunc callback=NULL,
    9333             :                                 void* callback_data=NULL)
    9334             : {
    9335           6 :     bool bFreeOptions = false;
    9336           6 :     if( callback )
    9337             :     {
    9338           0 :         if( options == NULL )
    9339             :         {
    9340           0 :             bFreeOptions = true;
    9341           0 :             options = GDALContourOptionsNew(NULL, NULL);
    9342             :         }
    9343           0 :         GDALContourOptionsSetProgress(options, callback, callback_data);
    9344             :     }
    9345             : 
    9346             : #ifdef SWIGPYTHON
    9347           6 :     std::vector<ErrorStruct> aoErrors;
    9348          12 :     if( GetUseExceptions() )
    9349             :     {
    9350           6 :         PushStackingErrorHandler(&aoErrors);
    9351             :     }
    9352             : #endif
    9353             : 
    9354           6 :     char** papszStringOptions = NULL;
    9355           6 :     GDALRasterBandH hBand = NULL;
    9356           6 :     OGRLayerH hLayer = NULL;
    9357           6 :     const CPLErr err = GDALContourProcessOptions(options, &papszStringOptions, &srcDS, &hBand, &dstDS, &hLayer);
    9358           6 :     bool bRet = (err == CE_None && GDALContourGenerateEx(hBand, hLayer, papszStringOptions, callback, callback_data) == CE_None);
    9359           6 :     if( bFreeOptions )
    9360           0 :         GDALContourOptionsFree(options);
    9361             : #ifdef SWIGPYTHON
    9362          12 :     if( GetUseExceptions() )
    9363             :     {
    9364           6 :         PopStackingErrorHandler(&aoErrors, bRet);
    9365             :     }
    9366             : #endif
    9367           6 :     CSLDestroy(papszStringOptions);
    9368           6 :     return bRet;
    9369             : }
    9370             : 
    9371             : 
    9372           6 : GDALDatasetShadow* wrapper_GDALContourDestName( const char* dest,
    9373             :                                                   GDALDatasetShadow* srcDS,
    9374             :                                                   GDALContourOptions* options,
    9375             :                                                   GDALProgressFunc callback=NULL,
    9376             :                                                   void* callback_data=NULL)
    9377             : {
    9378           6 :     bool bFreeOptions = false;
    9379           6 :     if( callback )
    9380             :     {
    9381           0 :         if( options == NULL )
    9382             :         {
    9383           0 :             bFreeOptions = true;
    9384           0 :             options = GDALContourOptionsNew(NULL, NULL);
    9385             :         }
    9386           0 :         GDALContourOptionsSetProgress(options, callback, callback_data);
    9387             :     }
    9388             : 
    9389             : #ifdef SWIGPYTHON
    9390           6 :     std::vector<ErrorStruct> aoErrors;
    9391          12 :     if( GetUseExceptions() )
    9392             :     {
    9393           6 :         PushStackingErrorHandler(&aoErrors);
    9394             :     }
    9395             : #endif
    9396             : 
    9397           6 :     GDALContourOptionsSetDestDataSource(options, dest);
    9398           6 :     char** papszStringOptions = NULL;
    9399           6 :     GDALRasterBandH hBand = NULL;
    9400           6 :     OGRLayerH hLayer = NULL;
    9401           6 :     GDALDatasetH dstDS = NULL;
    9402           6 :     CPLErr err = GDALContourProcessOptions(options, &papszStringOptions, &srcDS, &hBand, &dstDS, &hLayer);
    9403           6 :     if (err == CE_None )
    9404             :     {
    9405           6 :         err = GDALContourGenerateEx(hBand, hLayer, papszStringOptions, callback, callback_data);
    9406             :     }
    9407             : 
    9408           6 :     if( bFreeOptions )
    9409           0 :         GDALContourOptionsFree(options);
    9410             : #ifdef SWIGPYTHON
    9411          12 :     if( GetUseExceptions() )
    9412             :     {
    9413           6 :         PopStackingErrorHandler(&aoErrors, dstDS != NULL);
    9414             :     }
    9415             : #endif
    9416           6 :     CSLDestroy(papszStringOptions);
    9417           6 :     return dstDS;
    9418             : }
    9419             : 
    9420          20 : SWIGINTERN GDALRasterizeOptions *new_GDALRasterizeOptions(char **options){
    9421          20 :         return GDALRasterizeOptionsNew(options, NULL);
    9422             :     }
    9423          20 : SWIGINTERN void delete_GDALRasterizeOptions(GDALRasterizeOptions *self){
    9424          20 :         GDALRasterizeOptionsFree( self );
    9425          20 :     }
    9426             : 
    9427          13 : int wrapper_GDALRasterizeDestDS( GDALDatasetShadow* dstDS,
    9428             :                             GDALDatasetShadow* srcDS,
    9429             :                             GDALRasterizeOptions* options,
    9430             :                             GDALProgressFunc callback=NULL,
    9431             :                             void* callback_data=NULL)
    9432             : {
    9433          13 :     int usageError; /* ignored */
    9434          13 :     bool bFreeOptions = false;
    9435          13 :     if( callback )
    9436             :     {
    9437           0 :         if( options == NULL )
    9438             :         {
    9439           0 :             bFreeOptions = true;
    9440           0 :             options = GDALRasterizeOptionsNew(NULL, NULL);
    9441             :         }
    9442           0 :         GDALRasterizeOptionsSetProgress(options, callback, callback_data);
    9443             :     }
    9444             : #ifdef SWIGPYTHON
    9445          13 :     std::vector<ErrorStruct> aoErrors;
    9446          26 :     if( GetUseExceptions() )
    9447             :     {
    9448          13 :         PushStackingErrorHandler(&aoErrors);
    9449             :     }
    9450             : #endif
    9451          13 :     bool bRet = (GDALRasterize(NULL, dstDS, srcDS, options, &usageError) != NULL);
    9452          13 :     if( bFreeOptions )
    9453           0 :         GDALRasterizeOptionsFree(options);
    9454             : #ifdef SWIGPYTHON
    9455          26 :     if( GetUseExceptions() )
    9456             :     {
    9457          13 :         PopStackingErrorHandler(&aoErrors, bRet);
    9458             :     }
    9459             : #endif
    9460          13 :     return bRet;
    9461             : }
    9462             : 
    9463             : 
    9464           7 : GDALDatasetShadow* wrapper_GDALRasterizeDestName( const char* dest,
    9465             :                                              GDALDatasetShadow* srcDS,
    9466             :                                              GDALRasterizeOptions* options,
    9467             :                                              GDALProgressFunc callback=NULL,
    9468             :                                              void* callback_data=NULL)
    9469             : {
    9470           7 :     int usageError; /* ignored */
    9471           7 :     bool bFreeOptions = false;
    9472           7 :     if( callback )
    9473             :     {
    9474           0 :         if( options == NULL )
    9475             :         {
    9476           0 :             bFreeOptions = true;
    9477           0 :             options = GDALRasterizeOptionsNew(NULL, NULL);
    9478             :         }
    9479           0 :         GDALRasterizeOptionsSetProgress(options, callback, callback_data);
    9480             :     }
    9481             : #ifdef SWIGPYTHON
    9482           7 :     std::vector<ErrorStruct> aoErrors;
    9483          14 :     if( GetUseExceptions() )
    9484             :     {
    9485           7 :         PushStackingErrorHandler(&aoErrors);
    9486             :     }
    9487             : #endif
    9488           7 :     GDALDatasetH hDSRet = GDALRasterize(dest, NULL, srcDS, options, &usageError);
    9489           7 :     if( bFreeOptions )
    9490           0 :         GDALRasterizeOptionsFree(options);
    9491             : #ifdef SWIGPYTHON
    9492          14 :     if( GetUseExceptions() )
    9493             :     {
    9494           7 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9495             :     }
    9496             : #endif
    9497           7 :     return hDSRet;
    9498             : }
    9499             : 
    9500          39 : SWIGINTERN GDALFootprintOptions *new_GDALFootprintOptions(char **options){
    9501          39 :         return GDALFootprintOptionsNew(options, NULL);
    9502             :     }
    9503          37 : SWIGINTERN void delete_GDALFootprintOptions(GDALFootprintOptions *self){
    9504          37 :         GDALFootprintOptionsFree( self );
    9505          37 :     }
    9506             : 
    9507           3 : int wrapper_GDALFootprintDestDS( GDALDatasetShadow* dstDS,
    9508             :                             GDALDatasetShadow* srcDS,
    9509             :                             GDALFootprintOptions* options,
    9510             :                             GDALProgressFunc callback=NULL,
    9511             :                             void* callback_data=NULL)
    9512             : {
    9513           3 :     int usageError; /* ignored */
    9514           3 :     bool bFreeOptions = false;
    9515           3 :     if( callback )
    9516             :     {
    9517           0 :         if( options == NULL )
    9518             :         {
    9519           0 :             bFreeOptions = true;
    9520           0 :             options = GDALFootprintOptionsNew(NULL, NULL);
    9521             :         }
    9522           0 :         GDALFootprintOptionsSetProgress(options, callback, callback_data);
    9523             :     }
    9524             : #ifdef SWIGPYTHON
    9525           3 :     std::vector<ErrorStruct> aoErrors;
    9526           6 :     if( GetUseExceptions() )
    9527             :     {
    9528           3 :         PushStackingErrorHandler(&aoErrors);
    9529             :     }
    9530             : #endif
    9531           3 :     bool bRet = (GDALFootprint(NULL, dstDS, srcDS, options, &usageError) != NULL);
    9532           3 :     if( bFreeOptions )
    9533           0 :         GDALFootprintOptionsFree(options);
    9534             : #ifdef SWIGPYTHON
    9535           6 :     if( GetUseExceptions() )
    9536             :     {
    9537           3 :         PopStackingErrorHandler(&aoErrors, bRet);
    9538             :     }
    9539             : #endif
    9540           3 :     return bRet;
    9541             : }
    9542             : 
    9543             : 
    9544          34 : GDALDatasetShadow* wrapper_GDALFootprintDestName( const char* dest,
    9545             :                                              GDALDatasetShadow* srcDS,
    9546             :                                              GDALFootprintOptions* options,
    9547             :                                              GDALProgressFunc callback=NULL,
    9548             :                                              void* callback_data=NULL)
    9549             : {
    9550          34 :     int usageError; /* ignored */
    9551          34 :     bool bFreeOptions = false;
    9552          34 :     if( callback )
    9553             :     {
    9554           0 :         if( options == NULL )
    9555             :         {
    9556           0 :             bFreeOptions = true;
    9557           0 :             options = GDALFootprintOptionsNew(NULL, NULL);
    9558             :         }
    9559           0 :         GDALFootprintOptionsSetProgress(options, callback, callback_data);
    9560             :     }
    9561             : #ifdef SWIGPYTHON
    9562          34 :     std::vector<ErrorStruct> aoErrors;
    9563          68 :     if( GetUseExceptions() )
    9564             :     {
    9565          34 :         PushStackingErrorHandler(&aoErrors);
    9566             :     }
    9567             : #endif
    9568          34 :     GDALDatasetH hDSRet = GDALFootprint(dest, NULL, srcDS, options, &usageError);
    9569          34 :     if( bFreeOptions )
    9570           0 :         GDALFootprintOptionsFree(options);
    9571             : #ifdef SWIGPYTHON
    9572          68 :     if( GetUseExceptions() )
    9573             :     {
    9574          34 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9575             :     }
    9576             : #endif
    9577          34 :     return hDSRet;
    9578             : }
    9579             : 
    9580         170 : SWIGINTERN GDALBuildVRTOptions *new_GDALBuildVRTOptions(char **options){
    9581         170 :         return GDALBuildVRTOptionsNew(options, NULL);
    9582             :     }
    9583         167 : SWIGINTERN void delete_GDALBuildVRTOptions(GDALBuildVRTOptions *self){
    9584         167 :         GDALBuildVRTOptionsFree( self );
    9585         167 :     }
    9586             : 
    9587          68 : GDALDatasetShadow* wrapper_GDALBuildVRT_objects( const char* dest,
    9588             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    9589             :                                              GDALBuildVRTOptions* options,
    9590             :                                              GDALProgressFunc callback=NULL,
    9591             :                                              void* callback_data=NULL)
    9592             : {
    9593          68 :     int usageError; /* ignored */
    9594          68 :     bool bFreeOptions = false;
    9595          68 :     if( callback )
    9596             :     {
    9597           0 :         if( options == NULL )
    9598             :         {
    9599           0 :             bFreeOptions = true;
    9600           0 :             options = GDALBuildVRTOptionsNew(NULL, NULL);
    9601             :         }
    9602           0 :         GDALBuildVRTOptionsSetProgress(options, callback, callback_data);
    9603             :     }
    9604             : #ifdef SWIGPYTHON
    9605          68 :     std::vector<ErrorStruct> aoErrors;
    9606         114 :     if( GetUseExceptions() )
    9607             :     {
    9608          55 :         PushStackingErrorHandler(&aoErrors);
    9609             :     }
    9610             : #endif
    9611          68 :     GDALDatasetH hDSRet = GDALBuildVRT(dest, object_list_count, poObjects, NULL, options, &usageError);
    9612          68 :     if( bFreeOptions )
    9613           0 :         GDALBuildVRTOptionsFree(options);
    9614             : #ifdef SWIGPYTHON
    9615         114 :     if( GetUseExceptions() )
    9616             :     {
    9617          55 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9618             :     }
    9619             : #endif
    9620          68 :     return hDSRet;
    9621             : }
    9622             : 
    9623             : 
    9624          99 : GDALDatasetShadow* wrapper_GDALBuildVRT_names( const char* dest,
    9625             :                                          char ** source_filenames,
    9626             :                                          GDALBuildVRTOptions* options,
    9627             :                                          GDALProgressFunc callback=NULL,
    9628             :                                          void* callback_data=NULL)
    9629             : {
    9630          99 :     int usageError; /* ignored */
    9631          99 :     bool bFreeOptions = false;
    9632          99 :     if( callback )
    9633             :     {
    9634           1 :         if( options == NULL )
    9635             :         {
    9636           0 :             bFreeOptions = true;
    9637           0 :             options = GDALBuildVRTOptionsNew(NULL, NULL);
    9638             :         }
    9639           1 :         GDALBuildVRTOptionsSetProgress(options, callback, callback_data);
    9640             :     }
    9641             : #ifdef SWIGPYTHON
    9642          99 :     std::vector<ErrorStruct> aoErrors;
    9643         172 :     if( GetUseExceptions() )
    9644             :     {
    9645          85 :         PushStackingErrorHandler(&aoErrors);
    9646             :     }
    9647             : #endif
    9648          99 :     GDALDatasetH hDSRet = GDALBuildVRT(dest, CSLCount(source_filenames), NULL, source_filenames, options, &usageError);
    9649          99 :     if( bFreeOptions )
    9650           0 :         GDALBuildVRTOptionsFree(options);
    9651             : #ifdef SWIGPYTHON
    9652         172 :     if( GetUseExceptions() )
    9653             :     {
    9654          85 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9655             :     }
    9656             : #endif
    9657          99 :     return hDSRet;
    9658             : }
    9659             : 
    9660          23 : SWIGINTERN GDALTileIndexOptions *new_GDALTileIndexOptions(char **options){
    9661          23 :         return GDALTileIndexOptionsNew(options, NULL);
    9662             :     }
    9663          23 : SWIGINTERN void delete_GDALTileIndexOptions(GDALTileIndexOptions *self){
    9664          23 :         GDALTileIndexOptionsFree( self );
    9665          23 :     }
    9666             : 
    9667          23 : GDALDatasetShadow* wrapper_TileIndex_names( const char* dest,
    9668             :                                             char ** source_filenames,
    9669             :                                             GDALTileIndexOptions* options,
    9670             :                                             GDALProgressFunc callback=NULL,
    9671             :                                             void* callback_data=NULL)
    9672             : {
    9673          23 :     int usageError; /* ignored */
    9674             : #if 0
    9675             :     bool bFreeOptions = false;
    9676             :     if( callback )
    9677             :     {
    9678             :         if( options == NULL )
    9679             :         {
    9680             :             bFreeOptions = true;
    9681             :             options = GDALTileIndexOptionsNew(NULL, NULL);
    9682             :         }
    9683             :         GDALTileIndexOptionsSetProgress(options, callback, callback_data);
    9684             :     }
    9685             : #endif
    9686             : 
    9687             : #ifdef SWIGPYTHON
    9688          23 :     std::vector<ErrorStruct> aoErrors;
    9689          46 :     if( GetUseExceptions() )
    9690             :     {
    9691          23 :         PushStackingErrorHandler(&aoErrors);
    9692             :     }
    9693             : #endif
    9694          23 :     GDALDatasetH hDSRet = GDALTileIndex(dest, CSLCount(source_filenames), source_filenames, options, &usageError);
    9695             : #if 0
    9696             :     if( bFreeOptions )
    9697             :         GDALTileIndexOptionsFree(options);
    9698             : #endif
    9699             : #ifdef SWIGPYTHON
    9700          46 :     if( GetUseExceptions() )
    9701             :     {
    9702          23 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9703             :     }
    9704             : #endif
    9705          23 :     return hDSRet;
    9706             : }
    9707             : 
    9708         104 : SWIGINTERN GDALMultiDimTranslateOptions *new_GDALMultiDimTranslateOptions(char **options){
    9709         104 :         return GDALMultiDimTranslateOptionsNew(options, NULL);
    9710             :     }
    9711         104 : SWIGINTERN void delete_GDALMultiDimTranslateOptions(GDALMultiDimTranslateOptions *self){
    9712         104 :         GDALMultiDimTranslateOptionsFree( self );
    9713         104 :     }
    9714             : 
    9715         104 : GDALDatasetShadow* wrapper_GDALMultiDimTranslateDestName( const char* dest,
    9716             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    9717             :                                              GDALMultiDimTranslateOptions* multiDimTranslateOptions,
    9718             :                                              GDALProgressFunc callback=NULL,
    9719             :                                              void* callback_data=NULL)
    9720             : {
    9721         104 :     int usageError; /* ignored */
    9722         104 :     bool bFreeOptions = false;
    9723         104 :     if( callback )
    9724             :     {
    9725           0 :         if( multiDimTranslateOptions == NULL )
    9726             :         {
    9727           0 :             bFreeOptions = true;
    9728           0 :             multiDimTranslateOptions = GDALMultiDimTranslateOptionsNew(NULL, NULL);
    9729             :         }
    9730           0 :         GDALMultiDimTranslateOptionsSetProgress(multiDimTranslateOptions, callback, callback_data);
    9731             :     }
    9732             : #ifdef SWIGPYTHON
    9733         104 :     std::vector<ErrorStruct> aoErrors;
    9734         129 :     if( GetUseExceptions() )
    9735             :     {
    9736          25 :         PushStackingErrorHandler(&aoErrors);
    9737             :     }
    9738             : #endif
    9739         104 :     GDALDatasetH hDSRet = GDALMultiDimTranslate(dest, NULL, object_list_count, poObjects, multiDimTranslateOptions, &usageError);
    9740         104 :     if( bFreeOptions )
    9741           0 :         GDALMultiDimTranslateOptionsFree(multiDimTranslateOptions);
    9742             : #ifdef SWIGPYTHON
    9743         129 :     if( GetUseExceptions() )
    9744             :     {
    9745          25 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9746             :     }
    9747             : #endif
    9748         104 :     return hDSRet;
    9749             : }
    9750             : 
    9751             : #ifdef __cplusplus
    9752             : extern "C" {
    9753             : #endif
    9754          17 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9755          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9756          17 :   int result;
    9757             :   
    9758          17 :   if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
    9759          17 :   {
    9760             : #ifdef SED_HACKS
    9761          17 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9762             : #endif
    9763          17 :     result = GetUseExceptions();
    9764             :   }
    9765          17 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9766          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9767             :   return resultobj;
    9768           0 : fail:
    9769           0 :   return NULL;
    9770             : }
    9771             : 
    9772             : 
    9773        9978 : SWIGINTERN PyObject *_wrap__GetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9774        9978 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9775        9978 :   int result;
    9776             :   
    9777        9978 :   if (!SWIG_Python_UnpackTuple(args, "_GetExceptionsLocal", 0, 0, 0)) SWIG_fail;
    9778        9978 :   {
    9779             : #ifdef SED_HACKS
    9780        9978 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9781             : #endif
    9782        9978 :     {
    9783        9978 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9784        9978 :       result = (int)_GetExceptionsLocal();
    9785        9978 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9786             :     }
    9787             :   }
    9788        9978 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9789        9978 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9790             :   return resultobj;
    9791           0 : fail:
    9792           0 :   return NULL;
    9793             : }
    9794             : 
    9795             : 
    9796       19956 : SWIGINTERN PyObject *_wrap__SetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9797       19956 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9798       19956 :   int arg1 ;
    9799       19956 :   int val1 ;
    9800       19956 :   int ecode1 = 0 ;
    9801       19956 :   PyObject *swig_obj[1] ;
    9802             :   
    9803       19956 :   if (!args) SWIG_fail;
    9804       19956 :   swig_obj[0] = args;
    9805       19956 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
    9806       19956 :   if (!SWIG_IsOK(ecode1)) {
    9807           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_SetExceptionsLocal" "', argument " "1"" of type '" "int""'");
    9808             :   } 
    9809       19956 :   arg1 = static_cast< int >(val1);
    9810       19956 :   {
    9811             : #ifdef SED_HACKS
    9812       19956 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9813             : #endif
    9814       19956 :     {
    9815       19956 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9816       19956 :       _SetExceptionsLocal(arg1);
    9817       19956 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9818             :     }
    9819             :   }
    9820       19956 :   resultobj = SWIG_Py_Void();
    9821       19956 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9822             :   return resultobj;
    9823             : fail:
    9824             :   return NULL;
    9825             : }
    9826             : 
    9827             : 
    9828          28 : SWIGINTERN PyObject *_wrap__UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9829          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9830             :   
    9831          28 :   if (!SWIG_Python_UnpackTuple(args, "_UseExceptions", 0, 0, 0)) SWIG_fail;
    9832          28 :   {
    9833          28 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9834          28 :     _UseExceptions();
    9835          28 :     SWIG_PYTHON_THREAD_END_ALLOW;
    9836             :   }
    9837          28 :   resultobj = SWIG_Py_Void();
    9838          28 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9839             :   return resultobj;
    9840           0 : fail:
    9841           0 :   return NULL;
    9842             : }
    9843             : 
    9844             : 
    9845           5 : SWIGINTERN PyObject *_wrap__DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9846           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9847             :   
    9848           5 :   if (!SWIG_Python_UnpackTuple(args, "_DontUseExceptions", 0, 0, 0)) SWIG_fail;
    9849           5 :   {
    9850           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9851           5 :     _DontUseExceptions();
    9852           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
    9853             :   }
    9854           5 :   resultobj = SWIG_Py_Void();
    9855           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9856             :   return resultobj;
    9857           0 : fail:
    9858           0 :   return NULL;
    9859             : }
    9860             : 
    9861             : 
    9862       56704 : SWIGINTERN PyObject *_wrap__UserHasSpecifiedIfUsingExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9863       56704 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9864       56704 :   int result;
    9865             :   
    9866       56704 :   if (!SWIG_Python_UnpackTuple(args, "_UserHasSpecifiedIfUsingExceptions", 0, 0, 0)) SWIG_fail;
    9867       56704 :   {
    9868             : #ifdef SED_HACKS
    9869       56704 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9870             : #endif
    9871       56704 :     {
    9872       56704 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9873       56704 :       result = (int)_UserHasSpecifiedIfUsingExceptions();
    9874       56704 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9875             :     }
    9876             :   }
    9877       56704 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9878       56704 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9879             :   return resultobj;
    9880           0 : fail:
    9881           0 :   return NULL;
    9882             : }
    9883             : 
    9884             : 
    9885       27498 : SWIGINTERN PyObject *_wrap_VSIFReadL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9886       27498 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9887       27498 :   void **arg1 = (void **) 0 ;
    9888       27498 :   unsigned int arg2 ;
    9889       27498 :   unsigned int arg3 ;
    9890       27498 :   VSILFILE *arg4 = (VSILFILE *) 0 ;
    9891       27498 :   void *pyObject1 = NULL ;
    9892       27498 :   unsigned int val2 ;
    9893       27498 :   int ecode2 = 0 ;
    9894       27498 :   unsigned int val3 ;
    9895       27498 :   int ecode3 = 0 ;
    9896       27498 :   void *argp4 = 0 ;
    9897       27498 :   int res4 = 0 ;
    9898       27498 :   PyObject *swig_obj[3] ;
    9899       27498 :   unsigned int result;
    9900             :   
    9901       27498 :   {
    9902             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject1 = NULL ) */
    9903       27498 :     arg1 = &pyObject1;
    9904             :   }
    9905       27498 :   if (!SWIG_Python_UnpackTuple(args, "VSIFReadL", 3, 3, swig_obj)) SWIG_fail;
    9906       27498 :   ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val2);
    9907       27498 :   if (!SWIG_IsOK(ecode2)) {
    9908           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VSIFReadL" "', argument " "2"" of type '" "unsigned int""'");
    9909             :   } 
    9910       27498 :   arg2 = static_cast< unsigned int >(val2);
    9911       27498 :   ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val3);
    9912       27498 :   if (!SWIG_IsOK(ecode3)) {
    9913           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFReadL" "', argument " "3"" of type '" "unsigned int""'");
    9914             :   } 
    9915       27498 :   arg3 = static_cast< unsigned int >(val3);
    9916       27498 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_VSILFILE, 0 |  0 );
    9917       27498 :   if (!SWIG_IsOK(res4)) {
    9918           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VSIFReadL" "', argument " "4"" of type '" "VSILFILE *""'"); 
    9919             :   }
    9920       27498 :   arg4 = reinterpret_cast< VSILFILE * >(argp4);
    9921       27498 :   {
    9922       27498 :     if (!arg4) {
    9923           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9924             :     }
    9925             :   }
    9926       27497 :   {
    9927       27497 :     const int bLocalUseExceptions = GetUseExceptions();
    9928       27497 :     if ( bLocalUseExceptions ) {
    9929        1631 :       pushErrorHandler();
    9930             :     }
    9931       27497 :     {
    9932       27497 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9933       27497 :       result = (unsigned int)wrapper_VSIFReadL(arg1,arg2,arg3,arg4);
    9934       27497 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9935             :     }
    9936       27497 :     if ( bLocalUseExceptions ) {
    9937        1631 :       popErrorHandler();
    9938             :     }
    9939             : #ifndef SED_HACKS
    9940             :     if ( bLocalUseExceptions ) {
    9941             :       CPLErr eclass = CPLGetLastErrorType();
    9942             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9943             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9944             :       }
    9945             :     }
    9946             : #endif
    9947             :   }
    9948       27497 :   resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
    9949       27497 :   {
    9950             :     /* %typemap(argout) ( void **outPythonObject ) */
    9951       27497 :     Py_XDECREF(resultobj);
    9952       27497 :     if (*arg1)
    9953             :     {
    9954             :       resultobj = (PyObject*)*arg1;
    9955             :     }
    9956             :     else
    9957             :     {
    9958          12 :       resultobj = Py_None;
    9959          12 :       Py_INCREF(resultobj);
    9960             :     }
    9961             :   }
    9962       27498 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9963             :   return resultobj;
    9964             : fail:
    9965             :   return NULL;
    9966             : }
    9967             : 
    9968             : 
    9969           2 : SWIGINTERN PyObject *_wrap_VSIGetMemFileBuffer_unsafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9970           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9971           2 :   char *arg1 = (char *) 0 ;
    9972           2 :   GByte **arg2 = (GByte **) 0 ;
    9973           2 :   vsi_l_offset *arg3 = (vsi_l_offset *) 0 ;
    9974           2 :   int bToFree1 = 0 ;
    9975           2 :   GByte *out2 = NULL ;
    9976           2 :   vsi_l_offset length2 ;
    9977           2 :   PyObject *swig_obj[1] ;
    9978             :   
    9979           2 :   {
    9980           2 :     arg2 = &out2;
    9981           2 :     arg3 = &length2;
    9982             :   }
    9983           2 :   if (!args) SWIG_fail;
    9984           2 :   swig_obj[0] = args;
    9985           2 :   {
    9986             :     /* %typemap(in) (const char *utf8_path) */
    9987           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
    9988             :     {
    9989           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
    9990             :     }
    9991             :     else
    9992             :     {
    9993           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
    9994             :       
    9995             :     }
    9996           2 :     if (arg1 == NULL)
    9997             :     {
    9998           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
    9999           0 :       SWIG_fail;
   10000             :     }
   10001             :   }
   10002           2 :   {
   10003           2 :     const int bLocalUseExceptions = GetUseExceptions();
   10004           2 :     if ( bLocalUseExceptions ) {
   10005           0 :       pushErrorHandler();
   10006             :     }
   10007           2 :     {
   10008           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10009           2 :       wrapper_VSIGetMemFileBuffer((char const *)arg1,arg2,arg3);
   10010           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10011             :     }
   10012           2 :     if ( bLocalUseExceptions ) {
   10013           0 :       popErrorHandler();
   10014             :     }
   10015             : #ifndef SED_HACKS
   10016             :     if ( bLocalUseExceptions ) {
   10017             :       CPLErr eclass = CPLGetLastErrorType();
   10018             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10019             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10020             :       }
   10021             :     }
   10022             : #endif
   10023             :   }
   10024           2 :   resultobj = SWIG_Py_Void();
   10025           2 :   {
   10026           2 :     if (*arg2 == NULL) {
   10027           1 :       if( GetUseExceptions() ) {
   10028           0 :         PyErr_SetString(PyExc_RuntimeError, "Could not find path");
   10029             :         resultobj = NULL;
   10030             :       } else {
   10031           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Could not find path");
   10032           1 :         resultobj = Py_None;
   10033           1 :         Py_INCREF(resultobj);
   10034             :       }
   10035             :     } else {
   10036           1 :       do {
   10037           1 :         resultobj = PyMemoryView_FromMemory(reinterpret_cast<char *>(*arg2), *arg3, PyBUF_READ);
   10038           1 :         if (resultobj == NULL) {
   10039           0 :           if( GetUseExceptions() ) {
   10040           0 :             PyErr_SetString(PyExc_RuntimeError, "Could not allocate result buffer");
   10041             :             resultobj = NULL;
   10042             :           } else {
   10043           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Could not allocate result buffer");
   10044           0 :             resultobj = Py_None;
   10045           0 :             Py_INCREF(resultobj);
   10046             :           }
   10047             :         }
   10048             :       } while(0);
   10049             :     }
   10050             :   }
   10051           2 :   {
   10052             :     /* %typemap(freearg) (const char *utf8_path) */
   10053           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   10054             :   }
   10055           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10056             :   return resultobj;
   10057           0 : fail:
   10058           0 :   {
   10059             :     /* %typemap(freearg) (const char *utf8_path) */
   10060           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   10061             :   }
   10062             :   return NULL;
   10063             : }
   10064             : 
   10065             : 
   10066         147 : SWIGINTERN PyObject *_wrap_Debug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10067         147 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10068         147 :   char *arg1 = (char *) 0 ;
   10069         147 :   char *arg2 = (char *) 0 ;
   10070         147 :   int res1 ;
   10071         147 :   char *buf1 = 0 ;
   10072         147 :   int alloc1 = 0 ;
   10073         147 :   int res2 ;
   10074         147 :   char *buf2 = 0 ;
   10075         147 :   int alloc2 = 0 ;
   10076         147 :   PyObject *swig_obj[2] ;
   10077             :   
   10078         147 :   if (!SWIG_Python_UnpackTuple(args, "Debug", 2, 2, swig_obj)) SWIG_fail;
   10079         147 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10080         147 :   if (!SWIG_IsOK(res1)) {
   10081           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Debug" "', argument " "1"" of type '" "char const *""'");
   10082             :   }
   10083         147 :   arg1 = reinterpret_cast< char * >(buf1);
   10084         147 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   10085         147 :   if (!SWIG_IsOK(res2)) {
   10086           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Debug" "', argument " "2"" of type '" "char const *""'");
   10087             :   }
   10088         147 :   arg2 = reinterpret_cast< char * >(buf2);
   10089         147 :   {
   10090         147 :     if (!arg2) {
   10091           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10092             :     }
   10093             :   }
   10094         147 :   {
   10095         147 :     const int bLocalUseExceptions = GetUseExceptions();
   10096         147 :     if ( bLocalUseExceptions ) {
   10097          98 :       pushErrorHandler();
   10098             :     }
   10099         147 :     {
   10100         147 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10101         147 :       Debug((char const *)arg1,(char const *)arg2);
   10102         147 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10103             :     }
   10104         147 :     if ( bLocalUseExceptions ) {
   10105          98 :       popErrorHandler();
   10106             :     }
   10107             : #ifndef SED_HACKS
   10108             :     if ( bLocalUseExceptions ) {
   10109             :       CPLErr eclass = CPLGetLastErrorType();
   10110             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10111             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10112             :       }
   10113             :     }
   10114             : #endif
   10115             :   }
   10116         147 :   resultobj = SWIG_Py_Void();
   10117         147 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10118         147 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10119         147 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10120             :   return resultobj;
   10121           0 : fail:
   10122           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10123           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10124             :   return NULL;
   10125             : }
   10126             : 
   10127             : 
   10128           6 : SWIGINTERN PyObject *_wrap_SetErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10129           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10130           6 :   CPLErrorHandler arg1 = (CPLErrorHandler) NULL ;
   10131           6 :   void *arg2 = (void *) NULL ;
   10132           6 :   PyObject *swig_obj[1] ;
   10133           6 :   CPLErr result;
   10134             :   
   10135           6 :   if (!SWIG_Python_UnpackTuple(args, "SetErrorHandler", 0, 1, swig_obj)) SWIG_fail;
   10136           6 :   if (swig_obj[0]) {
   10137           6 :     {
   10138             :       /* %typemap(in) (CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL) */
   10139           6 :       int alloc = 0;
   10140           6 :       char* pszCallbackName = NULL;
   10141           6 :       arg2 = NULL;
   10142           6 :       if( SWIG_IsOK(SWIG_AsCharPtrAndSize(swig_obj[0], &pszCallbackName, NULL, &alloc)) )
   10143             :       {
   10144           3 :         if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
   10145             :         arg1 = CPLQuietErrorHandler;
   10146           3 :         else if( EQUAL(pszCallbackName,"CPLQuietWarningsErrorHandler") )
   10147             :         arg1 = CPLQuietWarningsErrorHandler;
   10148           3 :         else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
   10149             :         arg1 = CPLDefaultErrorHandler;
   10150           0 :         else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
   10151             :         arg1 = CPLLoggingErrorHandler;
   10152             :         else
   10153             :         {
   10154           0 :           if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10155           0 :           PyErr_SetString( PyExc_RuntimeError, "Unhandled value for passed string" );
   10156           0 :           SWIG_fail;
   10157             :         }
   10158             :         
   10159           3 :         if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10160             :       }
   10161           3 :       else if (!PyCallable_Check(swig_obj[0]))
   10162             :       {
   10163           0 :         PyErr_SetString( PyExc_RuntimeError,
   10164             :           "Object given is not a String or a Python function" );
   10165           0 :         SWIG_fail;
   10166             :       }
   10167             :       else
   10168             :       {
   10169           3 :         Py_INCREF(swig_obj[0]);
   10170           3 :         arg1 = PyCPLErrorHandler;
   10171           3 :         arg2 = swig_obj[0];
   10172             :       }
   10173             :     }
   10174             :   }
   10175           6 :   {
   10176           6 :     const int bLocalUseExceptions = GetUseExceptions();
   10177           6 :     if ( bLocalUseExceptions ) {
   10178           0 :       pushErrorHandler();
   10179             :     }
   10180           6 :     {
   10181           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10182           6 :       result = (CPLErr)SetErrorHandler(arg1,arg2);
   10183           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10184             :     }
   10185           6 :     if ( bLocalUseExceptions ) {
   10186           0 :       popErrorHandler();
   10187             :     }
   10188             : #ifndef SED_HACKS
   10189             :     if ( bLocalUseExceptions ) {
   10190             :       CPLErr eclass = CPLGetLastErrorType();
   10191             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10192             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10193             :       }
   10194             :     }
   10195             : #endif
   10196             :   }
   10197           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10198           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10199             :   return resultobj;
   10200             : fail:
   10201             :   return NULL;
   10202             : }
   10203             : 
   10204             : 
   10205           1 : SWIGINTERN PyObject *_wrap_SetCurrentErrorHandlerCatchDebug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10206           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10207           1 :   int arg1 ;
   10208           1 :   int val1 ;
   10209           1 :   int ecode1 = 0 ;
   10210           1 :   PyObject *swig_obj[1] ;
   10211             :   
   10212           1 :   if (!args) SWIG_fail;
   10213           1 :   swig_obj[0] = args;
   10214           1 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   10215           1 :   if (!SWIG_IsOK(ecode1)) {
   10216           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetCurrentErrorHandlerCatchDebug" "', argument " "1"" of type '" "int""'");
   10217             :   } 
   10218           1 :   arg1 = static_cast< int >(val1);
   10219           1 :   {
   10220           1 :     const int bLocalUseExceptions = GetUseExceptions();
   10221           1 :     if ( bLocalUseExceptions ) {
   10222           0 :       pushErrorHandler();
   10223             :     }
   10224           1 :     {
   10225           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10226           1 :       CPLSetCurrentErrorHandlerCatchDebug(arg1);
   10227           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10228             :     }
   10229           1 :     if ( bLocalUseExceptions ) {
   10230           0 :       popErrorHandler();
   10231             :     }
   10232             : #ifndef SED_HACKS
   10233             :     if ( bLocalUseExceptions ) {
   10234             :       CPLErr eclass = CPLGetLastErrorType();
   10235             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10236             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10237             :       }
   10238             :     }
   10239             : #endif
   10240             :   }
   10241           1 :   resultobj = SWIG_Py_Void();
   10242           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10243             :   return resultobj;
   10244             : fail:
   10245             :   return NULL;
   10246             : }
   10247             : 
   10248             : 
   10249       28740 : SWIGINTERN PyObject *_wrap_PushErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10250       28740 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10251       28740 :   CPLErrorHandler arg1 = (CPLErrorHandler) NULL ;
   10252       28740 :   void *arg2 = (void *) NULL ;
   10253       28740 :   PyObject *swig_obj[1] ;
   10254       28740 :   CPLErr result;
   10255             :   
   10256       28740 :   if (!SWIG_Python_UnpackTuple(args, "PushErrorHandler", 0, 1, swig_obj)) SWIG_fail;
   10257       28740 :   if (swig_obj[0]) {
   10258       28664 :     {
   10259             :       /* %typemap(in) (CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL) */
   10260       28664 :       int alloc = 0;
   10261       28664 :       char* pszCallbackName = NULL;
   10262       28664 :       arg2 = NULL;
   10263       28664 :       if( SWIG_IsOK(SWIG_AsCharPtrAndSize(swig_obj[0], &pszCallbackName, NULL, &alloc)) )
   10264             :       {
   10265       28521 :         if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
   10266             :         arg1 = CPLQuietErrorHandler;
   10267           7 :         else if( EQUAL(pszCallbackName,"CPLQuietWarningsErrorHandler") )
   10268             :         arg1 = CPLQuietWarningsErrorHandler;
   10269           0 :         else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
   10270             :         arg1 = CPLDefaultErrorHandler;
   10271           0 :         else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
   10272             :         arg1 = CPLLoggingErrorHandler;
   10273             :         else
   10274             :         {
   10275           0 :           if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10276           0 :           PyErr_SetString( PyExc_RuntimeError, "Unhandled value for passed string" );
   10277           0 :           SWIG_fail;
   10278             :         }
   10279             :         
   10280       28521 :         if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10281             :       }
   10282         143 :       else if (!PyCallable_Check(swig_obj[0]))
   10283             :       {
   10284           0 :         PyErr_SetString( PyExc_RuntimeError,
   10285             :           "Object given is not a String or a Python function" );
   10286           0 :         SWIG_fail;
   10287             :       }
   10288             :       else
   10289             :       {
   10290         143 :         Py_INCREF(swig_obj[0]);
   10291         143 :         arg1 = PyCPLErrorHandler;
   10292         143 :         arg2 = swig_obj[0];
   10293             :       }
   10294             :     }
   10295             :   }
   10296       28740 :   {
   10297       29277 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10298       28740 :     result = (CPLErr)PushErrorHandler(arg1,arg2);
   10299             :   }
   10300       28740 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10301       28740 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10302             :   return resultobj;
   10303             : fail:
   10304             :   return NULL;
   10305             : }
   10306             : 
   10307             : 
   10308       28735 : SWIGINTERN PyObject *_wrap_PopErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10309       28735 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10310             :   
   10311       28735 :   if (!SWIG_Python_UnpackTuple(args, "PopErrorHandler", 0, 0, 0)) SWIG_fail;
   10312       28735 :   {
   10313       29272 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10314       28735 :     PopErrorHandler();
   10315             :   }
   10316       28735 :   resultobj = SWIG_Py_Void();
   10317       28735 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10318             :   return resultobj;
   10319           0 : fail:
   10320           0 :   return NULL;
   10321             : }
   10322             : 
   10323             : 
   10324          27 : SWIGINTERN PyObject *_wrap_Error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10325          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10326          27 :   CPLErr arg1 = (CPLErr) CE_Failure ;
   10327          27 :   int arg2 = (int) 0 ;
   10328          27 :   char *arg3 = (char *) "error" ;
   10329          27 :   int val1 ;
   10330          27 :   int ecode1 = 0 ;
   10331          27 :   int val2 ;
   10332          27 :   int ecode2 = 0 ;
   10333          27 :   int res3 ;
   10334          27 :   char *buf3 = 0 ;
   10335          27 :   int alloc3 = 0 ;
   10336          27 :   PyObject *swig_obj[3] ;
   10337             :   
   10338          27 :   if (!SWIG_Python_UnpackTuple(args, "Error", 0, 3, swig_obj)) SWIG_fail;
   10339          27 :   if (swig_obj[0]) {
   10340          27 :     ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   10341          27 :     if (!SWIG_IsOK(ecode1)) {
   10342           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Error" "', argument " "1"" of type '" "CPLErr""'");
   10343             :     } 
   10344          27 :     arg1 = static_cast< CPLErr >(val1);
   10345             :   }
   10346          27 :   if (swig_obj[1]) {
   10347          27 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   10348          27 :     if (!SWIG_IsOK(ecode2)) {
   10349           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Error" "', argument " "2"" of type '" "int""'");
   10350             :     } 
   10351             :     arg2 = static_cast< int >(val2);
   10352             :   }
   10353          27 :   if (swig_obj[2]) {
   10354          27 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   10355          27 :     if (!SWIG_IsOK(res3)) {
   10356           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Error" "', argument " "3"" of type '" "char const *""'");
   10357             :     }
   10358          27 :     arg3 = reinterpret_cast< char * >(buf3);
   10359             :   }
   10360          27 :   {
   10361          27 :     const int bLocalUseExceptions = GetUseExceptions();
   10362          27 :     if ( bLocalUseExceptions ) {
   10363           0 :       pushErrorHandler();
   10364             :     }
   10365          27 :     {
   10366          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10367          27 :       Error(arg1,arg2,(char const *)arg3);
   10368          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10369             :     }
   10370          27 :     if ( bLocalUseExceptions ) {
   10371           0 :       popErrorHandler();
   10372             :     }
   10373             : #ifndef SED_HACKS
   10374             :     if ( bLocalUseExceptions ) {
   10375             :       CPLErr eclass = CPLGetLastErrorType();
   10376             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10377             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10378             :       }
   10379             :     }
   10380             : #endif
   10381             :   }
   10382          27 :   resultobj = SWIG_Py_Void();
   10383          27 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   10384          27 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10385             :   return resultobj;
   10386           0 : fail:
   10387           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   10388             :   return NULL;
   10389             : }
   10390             : 
   10391             : 
   10392           0 : SWIGINTERN PyObject *_wrap_GOA2GetAuthorizationURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10393           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10394           0 :   char *arg1 = (char *) 0 ;
   10395           0 :   int res1 ;
   10396           0 :   char *buf1 = 0 ;
   10397           0 :   int alloc1 = 0 ;
   10398           0 :   PyObject *swig_obj[1] ;
   10399           0 :   retStringAndCPLFree *result = 0 ;
   10400             :   
   10401           0 :   if (!args) SWIG_fail;
   10402           0 :   swig_obj[0] = args;
   10403           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10404           0 :   if (!SWIG_IsOK(res1)) {
   10405           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetAuthorizationURL" "', argument " "1"" of type '" "char const *""'");
   10406             :   }
   10407           0 :   arg1 = reinterpret_cast< char * >(buf1);
   10408           0 :   {
   10409           0 :     if (!arg1) {
   10410           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10411             :     }
   10412             :   }
   10413           0 :   {
   10414           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10415           0 :     if ( bLocalUseExceptions ) {
   10416           0 :       pushErrorHandler();
   10417             :     }
   10418           0 :     {
   10419           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10420           0 :       result = (retStringAndCPLFree *)GOA2GetAuthorizationURL((char const *)arg1);
   10421           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10422             :     }
   10423           0 :     if ( bLocalUseExceptions ) {
   10424           0 :       popErrorHandler();
   10425             :     }
   10426             : #ifndef SED_HACKS
   10427             :     if ( bLocalUseExceptions ) {
   10428             :       CPLErr eclass = CPLGetLastErrorType();
   10429             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10430             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10431             :       }
   10432             :     }
   10433             : #endif
   10434             :   }
   10435           0 :   {
   10436             :     /* %typemap(out) (retStringAndCPLFree*) */
   10437           0 :     Py_XDECREF(resultobj);
   10438           0 :     if(result)
   10439             :     {
   10440           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10441           0 :       CPLFree(result);
   10442             :     }
   10443             :     else
   10444             :     {
   10445           0 :       resultobj = Py_None;
   10446           0 :       Py_INCREF(resultobj);
   10447             :     }
   10448             :   }
   10449           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10450           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10451             :   return resultobj;
   10452           0 : fail:
   10453           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10454             :   return NULL;
   10455             : }
   10456             : 
   10457             : 
   10458           0 : SWIGINTERN PyObject *_wrap_GOA2GetRefreshToken(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10459           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10460           0 :   char *arg1 = (char *) 0 ;
   10461           0 :   char *arg2 = (char *) 0 ;
   10462           0 :   int res1 ;
   10463           0 :   char *buf1 = 0 ;
   10464           0 :   int alloc1 = 0 ;
   10465           0 :   int res2 ;
   10466           0 :   char *buf2 = 0 ;
   10467           0 :   int alloc2 = 0 ;
   10468           0 :   PyObject *swig_obj[2] ;
   10469           0 :   retStringAndCPLFree *result = 0 ;
   10470             :   
   10471           0 :   if (!SWIG_Python_UnpackTuple(args, "GOA2GetRefreshToken", 2, 2, swig_obj)) SWIG_fail;
   10472           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10473           0 :   if (!SWIG_IsOK(res1)) {
   10474           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetRefreshToken" "', argument " "1"" of type '" "char const *""'");
   10475             :   }
   10476           0 :   arg1 = reinterpret_cast< char * >(buf1);
   10477           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   10478           0 :   if (!SWIG_IsOK(res2)) {
   10479           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GOA2GetRefreshToken" "', argument " "2"" of type '" "char const *""'");
   10480             :   }
   10481           0 :   arg2 = reinterpret_cast< char * >(buf2);
   10482           0 :   {
   10483           0 :     if (!arg1) {
   10484           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10485             :     }
   10486             :   }
   10487           0 :   {
   10488           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10489           0 :     if ( bLocalUseExceptions ) {
   10490           0 :       pushErrorHandler();
   10491             :     }
   10492           0 :     {
   10493           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10494           0 :       result = (retStringAndCPLFree *)GOA2GetRefreshToken((char const *)arg1,(char const *)arg2);
   10495           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10496             :     }
   10497           0 :     if ( bLocalUseExceptions ) {
   10498           0 :       popErrorHandler();
   10499             :     }
   10500             : #ifndef SED_HACKS
   10501             :     if ( bLocalUseExceptions ) {
   10502             :       CPLErr eclass = CPLGetLastErrorType();
   10503             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10504             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10505             :       }
   10506             :     }
   10507             : #endif
   10508             :   }
   10509           0 :   {
   10510             :     /* %typemap(out) (retStringAndCPLFree*) */
   10511           0 :     Py_XDECREF(resultobj);
   10512           0 :     if(result)
   10513             :     {
   10514           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10515           0 :       CPLFree(result);
   10516             :     }
   10517             :     else
   10518             :     {
   10519           0 :       resultobj = Py_None;
   10520           0 :       Py_INCREF(resultobj);
   10521             :     }
   10522             :   }
   10523           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10524           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10525           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10526             :   return resultobj;
   10527           0 : fail:
   10528           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10529           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10530             :   return NULL;
   10531             : }
   10532             : 
   10533             : 
   10534           0 : SWIGINTERN PyObject *_wrap_GOA2GetAccessToken(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10535           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10536           0 :   char *arg1 = (char *) 0 ;
   10537           0 :   char *arg2 = (char *) 0 ;
   10538           0 :   int res1 ;
   10539           0 :   char *buf1 = 0 ;
   10540           0 :   int alloc1 = 0 ;
   10541           0 :   int res2 ;
   10542           0 :   char *buf2 = 0 ;
   10543           0 :   int alloc2 = 0 ;
   10544           0 :   PyObject *swig_obj[2] ;
   10545           0 :   retStringAndCPLFree *result = 0 ;
   10546             :   
   10547           0 :   if (!SWIG_Python_UnpackTuple(args, "GOA2GetAccessToken", 2, 2, swig_obj)) SWIG_fail;
   10548           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10549           0 :   if (!SWIG_IsOK(res1)) {
   10550           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetAccessToken" "', argument " "1"" of type '" "char const *""'");
   10551             :   }
   10552           0 :   arg1 = reinterpret_cast< char * >(buf1);
   10553           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   10554           0 :   if (!SWIG_IsOK(res2)) {
   10555           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GOA2GetAccessToken" "', argument " "2"" of type '" "char const *""'");
   10556             :   }
   10557           0 :   arg2 = reinterpret_cast< char * >(buf2);
   10558           0 :   {
   10559           0 :     if (!arg1) {
   10560           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10561             :     }
   10562             :   }
   10563           0 :   {
   10564           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10565           0 :     if ( bLocalUseExceptions ) {
   10566           0 :       pushErrorHandler();
   10567             :     }
   10568           0 :     {
   10569           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10570           0 :       result = (retStringAndCPLFree *)GOA2GetAccessToken((char const *)arg1,(char const *)arg2);
   10571           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10572             :     }
   10573           0 :     if ( bLocalUseExceptions ) {
   10574           0 :       popErrorHandler();
   10575             :     }
   10576             : #ifndef SED_HACKS
   10577             :     if ( bLocalUseExceptions ) {
   10578             :       CPLErr eclass = CPLGetLastErrorType();
   10579             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10580             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10581             :       }
   10582             :     }
   10583             : #endif
   10584             :   }
   10585           0 :   {
   10586             :     /* %typemap(out) (retStringAndCPLFree*) */
   10587           0 :     Py_XDECREF(resultobj);
   10588           0 :     if(result)
   10589             :     {
   10590           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10591           0 :       CPLFree(result);
   10592             :     }
   10593             :     else
   10594             :     {
   10595           0 :       resultobj = Py_None;
   10596           0 :       Py_INCREF(resultobj);
   10597             :     }
   10598             :   }
   10599           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10600           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10601           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10602             :   return resultobj;
   10603           0 : fail:
   10604           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10605           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10606             :   return NULL;
   10607             : }
   10608             : 
   10609             : 
   10610        1792 : SWIGINTERN PyObject *_wrap_ErrorReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10611        1792 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10612             :   
   10613        1792 :   if (!SWIG_Python_UnpackTuple(args, "ErrorReset", 0, 0, 0)) SWIG_fail;
   10614        1792 :   {
   10615        1792 :     const int bLocalUseExceptions = GetUseExceptions();
   10616        1792 :     if ( bLocalUseExceptions ) {
   10617         305 :       pushErrorHandler();
   10618             :     }
   10619        1792 :     {
   10620        1792 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10621        1792 :       CPLErrorReset();
   10622        1792 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10623             :     }
   10624        1792 :     if ( bLocalUseExceptions ) {
   10625         305 :       popErrorHandler();
   10626             :     }
   10627             : #ifndef SED_HACKS
   10628             :     if ( bLocalUseExceptions ) {
   10629             :       CPLErr eclass = CPLGetLastErrorType();
   10630             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10631             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10632             :       }
   10633             :     }
   10634             : #endif
   10635             :   }
   10636        1792 :   resultobj = SWIG_Py_Void();
   10637        1792 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10638             :   return resultobj;
   10639           0 : fail:
   10640           0 :   return NULL;
   10641             : }
   10642             : 
   10643             : 
   10644         170 : SWIGINTERN PyObject *_wrap_wrapper_EscapeString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   10645         170 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10646         170 :   int arg1 ;
   10647         170 :   char *arg2 = (char *) 0 ;
   10648         170 :   int arg3 = (int) CPLES_SQL ;
   10649         170 :   int alloc1 = 0 ;
   10650         170 :   bool viewIsValid1 = false ;
   10651         170 :   Py_buffer view1 ;
   10652         170 :   int val3 ;
   10653         170 :   int ecode3 = 0 ;
   10654         170 :   PyObject * obj0 = 0 ;
   10655         170 :   PyObject * obj1 = 0 ;
   10656         170 :   char * kwnames[] = {
   10657             :     (char *)"len",  (char *)"scheme",  NULL 
   10658             :   };
   10659         170 :   retStringAndCPLFree *result = 0 ;
   10660             :   
   10661         170 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:wrapper_EscapeString", kwnames, &obj0, &obj1)) SWIG_fail;
   10662         170 :   {
   10663             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   10664         170 :     char* ptr = NULL;
   10665         170 :     if( !GetBufferAsCharPtrIntSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   10666           0 :       SWIG_fail;
   10667             :     }
   10668         170 :     arg2 = (char *)ptr;
   10669             :   }
   10670         170 :   if (obj1) {
   10671         170 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
   10672         170 :     if (!SWIG_IsOK(ecode3)) {
   10673           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "wrapper_EscapeString" "', argument " "3"" of type '" "int""'");
   10674             :     } 
   10675             :     arg3 = static_cast< int >(val3);
   10676             :   }
   10677         170 :   {
   10678         170 :     const int bLocalUseExceptions = GetUseExceptions();
   10679         170 :     if ( bLocalUseExceptions ) {
   10680         137 :       pushErrorHandler();
   10681             :     }
   10682         170 :     {
   10683         170 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10684         170 :       result = (retStringAndCPLFree *)wrapper_EscapeString(arg1,arg2,arg3);
   10685         170 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10686             :     }
   10687         170 :     if ( bLocalUseExceptions ) {
   10688         137 :       popErrorHandler();
   10689             :     }
   10690             : #ifndef SED_HACKS
   10691             :     if ( bLocalUseExceptions ) {
   10692             :       CPLErr eclass = CPLGetLastErrorType();
   10693             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10694             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10695             :       }
   10696             :     }
   10697             : #endif
   10698             :   }
   10699         170 :   {
   10700             :     /* %typemap(out) (retStringAndCPLFree*) */
   10701         170 :     Py_XDECREF(resultobj);
   10702         170 :     if(result)
   10703             :     {
   10704         170 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10705         170 :       CPLFree(result);
   10706             :     }
   10707             :     else
   10708             :     {
   10709           0 :       resultobj = Py_None;
   10710           0 :       Py_INCREF(resultobj);
   10711             :     }
   10712             :   }
   10713         170 :   {
   10714             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10715         170 :     if( viewIsValid1 ) {
   10716           0 :       PyBuffer_Release(&view1);
   10717             :     }
   10718         170 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10719         170 :       delete[] arg2;
   10720             :     }
   10721             :   }
   10722         170 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10723             :   return resultobj;
   10724           0 : fail:
   10725           0 :   {
   10726             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10727           0 :     if( viewIsValid1 ) {
   10728           0 :       PyBuffer_Release(&view1);
   10729             :     }
   10730         170 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10731           0 :       delete[] arg2;
   10732             :     }
   10733             :   }
   10734             :   return NULL;
   10735             : }
   10736             : 
   10737             : 
   10738          81 : SWIGINTERN PyObject *_wrap_EscapeBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   10739          81 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10740          81 :   int arg1 ;
   10741          81 :   char *arg2 = (char *) 0 ;
   10742          81 :   size_t *arg3 = (size_t *) 0 ;
   10743          81 :   char **arg4 = (char **) 0 ;
   10744          81 :   int arg5 = (int) CPLES_SQL ;
   10745          81 :   int alloc1 = 0 ;
   10746          81 :   bool viewIsValid1 = false ;
   10747          81 :   Py_buffer view1 ;
   10748          81 :   size_t nLen3 = 0 ;
   10749          81 :   char *pBuf3 = 0 ;
   10750          81 :   int val5 ;
   10751          81 :   int ecode5 = 0 ;
   10752          81 :   PyObject * obj0 = 0 ;
   10753          81 :   PyObject * obj1 = 0 ;
   10754          81 :   char * kwnames[] = {
   10755             :     (char *)"len",  (char *)"scheme",  NULL 
   10756             :   };
   10757             :   
   10758          81 :   {
   10759             :     /* %typemap(in,numinputs=0) (size_t *nLen3, char **pBuf3 ) */
   10760          81 :     arg3 = &nLen3;
   10761          81 :     arg4 = &pBuf3;
   10762             :   }
   10763          81 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:EscapeBinary", kwnames, &obj0, &obj1)) SWIG_fail;
   10764          81 :   {
   10765             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   10766          81 :     char* ptr = NULL;
   10767          81 :     if( !GetBufferAsCharPtrIntSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   10768           0 :       SWIG_fail;
   10769             :     }
   10770          81 :     arg2 = (char *)ptr;
   10771             :   }
   10772          81 :   if (obj1) {
   10773          81 :     ecode5 = SWIG_AsVal_int(obj1, &val5);
   10774          81 :     if (!SWIG_IsOK(ecode5)) {
   10775           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "EscapeBinary" "', argument " "5"" of type '" "int""'");
   10776             :     } 
   10777             :     arg5 = static_cast< int >(val5);
   10778             :   }
   10779          81 :   {
   10780          81 :     const int bLocalUseExceptions = GetUseExceptions();
   10781          81 :     if ( bLocalUseExceptions ) {
   10782          72 :       pushErrorHandler();
   10783             :     }
   10784          81 :     {
   10785          81 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10786          81 :       EscapeBinary(arg1,arg2,arg3,arg4,arg5);
   10787          81 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10788             :     }
   10789          81 :     if ( bLocalUseExceptions ) {
   10790          72 :       popErrorHandler();
   10791             :     }
   10792             : #ifndef SED_HACKS
   10793             :     if ( bLocalUseExceptions ) {
   10794             :       CPLErr eclass = CPLGetLastErrorType();
   10795             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10796             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10797             :       }
   10798             :     }
   10799             : #endif
   10800             :   }
   10801          81 :   resultobj = SWIG_Py_Void();
   10802          81 :   {
   10803             :     /* %typemap(argout) (size_t *nLen, char **pBuf ) */
   10804          81 :     Py_XDECREF(resultobj);
   10805          81 :     if( *arg4 ) {
   10806          81 :       resultobj = PyByteArray_FromStringAndSize( *arg4, *arg3 );
   10807             :     }
   10808             :     else {
   10809           0 :       resultobj = Py_None;
   10810           0 :       Py_INCREF(Py_None);
   10811             :     }
   10812             :   }
   10813          81 :   {
   10814             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10815          81 :     if( viewIsValid1 ) {
   10816          81 :       PyBuffer_Release(&view1);
   10817             :     }
   10818           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10819           0 :       delete[] arg2;
   10820             :     }
   10821             :   }
   10822          81 :   {
   10823             :     /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
   10824          81 :     VSIFree( *arg4 );
   10825             :   }
   10826          81 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10827             :   return resultobj;
   10828           0 : fail:
   10829           0 :   {
   10830             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10831           0 :     if( viewIsValid1 ) {
   10832           0 :       PyBuffer_Release(&view1);
   10833             :     }
   10834           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10835           0 :       delete[] arg2;
   10836             :     }
   10837             :   }
   10838           0 :   {
   10839             :     /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
   10840           0 :     VSIFree( *arg4 );
   10841             :   }
   10842             :   return NULL;
   10843             : }
   10844             : 
   10845             : 
   10846           2 : SWIGINTERN PyObject *_wrap_GetLastErrorNo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10847           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10848           2 :   int result;
   10849             :   
   10850           2 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorNo", 0, 0, 0)) SWIG_fail;
   10851           2 :   {
   10852             : #ifdef SED_HACKS
   10853           2 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10854             : #endif
   10855             :     
   10856           2 :     result = CPLGetLastErrorNo();
   10857             :   }
   10858           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10859           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10860             :   return resultobj;
   10861           0 : fail:
   10862           0 :   return NULL;
   10863             : }
   10864             : 
   10865             : 
   10866          75 : SWIGINTERN PyObject *_wrap_GetLastErrorType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10867          75 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10868          75 :   int result;
   10869             :   
   10870          75 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorType", 0, 0, 0)) SWIG_fail;
   10871          75 :   {
   10872             : #ifdef SED_HACKS
   10873          87 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10874             : #endif
   10875             :     
   10876          75 :     result = CPLGetLastErrorType();
   10877             :   }
   10878          75 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10879          75 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10880             :   return resultobj;
   10881           0 : fail:
   10882           0 :   return NULL;
   10883             : }
   10884             : 
   10885             : 
   10886        2097 : SWIGINTERN PyObject *_wrap_GetLastErrorMsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10887        2097 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10888        2097 :   char *result = 0 ;
   10889             :   
   10890        2097 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorMsg", 0, 0, 0)) SWIG_fail;
   10891        2097 :   {
   10892             : #ifdef SED_HACKS
   10893        2327 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10894             : #endif
   10895             :     
   10896        2097 :     result = (char*)CPLGetLastErrorMsg();
   10897             :   }
   10898        2097 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10899        2097 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10900             :   return resultobj;
   10901           0 : fail:
   10902           0 :   return NULL;
   10903             : }
   10904             : 
   10905             : 
   10906           0 : SWIGINTERN PyObject *_wrap_GetErrorCounter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10907           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10908           0 :   unsigned int result;
   10909             :   
   10910           0 :   if (!SWIG_Python_UnpackTuple(args, "GetErrorCounter", 0, 0, 0)) SWIG_fail;
   10911           0 :   {
   10912             : #ifdef SED_HACKS
   10913           0 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10914             : #endif
   10915             :     
   10916           0 :     result = CPLGetErrorCounter();
   10917             :   }
   10918           0 :   resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
   10919           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10920             :   return resultobj;
   10921           0 : fail:
   10922           0 :   return NULL;
   10923             : }
   10924             : 
   10925             : 
   10926           4 : SWIGINTERN PyObject *_wrap_VSIGetLastErrorNo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10927           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10928           4 :   int result;
   10929             :   
   10930           4 :   if (!SWIG_Python_UnpackTuple(args, "VSIGetLastErrorNo", 0, 0, 0)) SWIG_fail;
   10931           4 :   {
   10932           4 :     const int bLocalUseExceptions = GetUseExceptions();
   10933           4 :     if ( bLocalUseExceptions ) {
   10934           0 :       pushErrorHandler();
   10935             :     }
   10936           4 :     {
   10937           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10938           4 :       result = (int)VSIGetLastErrorNo();
   10939           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10940             :     }
   10941           4 :     if ( bLocalUseExceptions ) {
   10942           0 :       popErrorHandler();
   10943             :     }
   10944             : #ifndef SED_HACKS
   10945             :     if ( bLocalUseExceptions ) {
   10946             :       CPLErr eclass = CPLGetLastErrorType();
   10947             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10948             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10949             :       }
   10950             :     }
   10951             : #endif
   10952             :   }
   10953           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10954           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10955             :   return resultobj;
   10956           0 : fail:
   10957           0 :   return NULL;
   10958             : }
   10959             : 
   10960             : 
   10961          40 : SWIGINTERN PyObject *_wrap_VSIGetLastErrorMsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10962          40 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10963          40 :   char *result = 0 ;
   10964             :   
   10965          40 :   if (!SWIG_Python_UnpackTuple(args, "VSIGetLastErrorMsg", 0, 0, 0)) SWIG_fail;
   10966          40 :   {
   10967          40 :     const int bLocalUseExceptions = GetUseExceptions();
   10968          40 :     if ( bLocalUseExceptions ) {
   10969           9 :       pushErrorHandler();
   10970             :     }
   10971          40 :     {
   10972          40 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10973          40 :       result = (char *)VSIGetLastErrorMsg();
   10974          40 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10975             :     }
   10976          40 :     if ( bLocalUseExceptions ) {
   10977           9 :       popErrorHandler();
   10978             :     }
   10979             : #ifndef SED_HACKS
   10980             :     if ( bLocalUseExceptions ) {
   10981             :       CPLErr eclass = CPLGetLastErrorType();
   10982             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10983             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10984             :       }
   10985             :     }
   10986             : #endif
   10987             :   }
   10988          40 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10989          40 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10990             :   return resultobj;
   10991           0 : fail:
   10992           0 :   return NULL;
   10993             : }
   10994             : 
   10995             : 
   10996           2 : SWIGINTERN PyObject *_wrap_VSIErrorReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10997           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10998             :   
   10999           2 :   if (!SWIG_Python_UnpackTuple(args, "VSIErrorReset", 0, 0, 0)) SWIG_fail;
   11000           2 :   {
   11001           2 :     const int bLocalUseExceptions = GetUseExceptions();
   11002           2 :     if ( bLocalUseExceptions ) {
   11003           0 :       pushErrorHandler();
   11004             :     }
   11005           2 :     {
   11006           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11007           2 :       VSIErrorReset();
   11008           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11009             :     }
   11010           2 :     if ( bLocalUseExceptions ) {
   11011           0 :       popErrorHandler();
   11012             :     }
   11013             : #ifndef SED_HACKS
   11014             :     if ( bLocalUseExceptions ) {
   11015             :       CPLErr eclass = CPLGetLastErrorType();
   11016             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11017             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11018             :       }
   11019             :     }
   11020             : #endif
   11021             :   }
   11022           2 :   resultobj = SWIG_Py_Void();
   11023           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11024             :   return resultobj;
   11025           0 : fail:
   11026           0 :   return NULL;
   11027             : }
   11028             : 
   11029             : 
   11030           0 : SWIGINTERN PyObject *_wrap_PushFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11031           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11032           0 :   char *arg1 = (char *) 0 ;
   11033           0 :   int bToFree1 = 0 ;
   11034           0 :   PyObject *swig_obj[1] ;
   11035             :   
   11036           0 :   if (!args) SWIG_fail;
   11037           0 :   swig_obj[0] = args;
   11038           0 :   {
   11039             :     /* %typemap(in) (const char *utf8_path) */
   11040           0 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11041             :     {
   11042           0 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11043             :     }
   11044             :     else
   11045             :     {
   11046           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11047             :       
   11048             :     }
   11049           0 :     if (arg1 == NULL)
   11050             :     {
   11051           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11052           0 :       SWIG_fail;
   11053             :     }
   11054             :   }
   11055           0 :   {
   11056           0 :     if (!arg1) {
   11057           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11058             :     }
   11059             :   }
   11060           0 :   {
   11061           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11062           0 :     if ( bLocalUseExceptions ) {
   11063           0 :       pushErrorHandler();
   11064             :     }
   11065           0 :     {
   11066           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11067           0 :       CPLPushFinderLocation((char const *)arg1);
   11068           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11069             :     }
   11070           0 :     if ( bLocalUseExceptions ) {
   11071           0 :       popErrorHandler();
   11072             :     }
   11073             : #ifndef SED_HACKS
   11074             :     if ( bLocalUseExceptions ) {
   11075             :       CPLErr eclass = CPLGetLastErrorType();
   11076             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11077             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11078             :       }
   11079             :     }
   11080             : #endif
   11081             :   }
   11082           0 :   resultobj = SWIG_Py_Void();
   11083           0 :   {
   11084             :     /* %typemap(freearg) (const char *utf8_path) */
   11085           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   11086             :   }
   11087           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11088             :   return resultobj;
   11089           0 : fail:
   11090           0 :   {
   11091             :     /* %typemap(freearg) (const char *utf8_path) */
   11092           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   11093             :   }
   11094             :   return NULL;
   11095             : }
   11096             : 
   11097             : 
   11098           0 : SWIGINTERN PyObject *_wrap_PopFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11099           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11100             :   
   11101           0 :   if (!SWIG_Python_UnpackTuple(args, "PopFinderLocation", 0, 0, 0)) SWIG_fail;
   11102           0 :   {
   11103           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11104           0 :     if ( bLocalUseExceptions ) {
   11105           0 :       pushErrorHandler();
   11106             :     }
   11107           0 :     {
   11108           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11109           0 :       CPLPopFinderLocation();
   11110           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11111             :     }
   11112           0 :     if ( bLocalUseExceptions ) {
   11113           0 :       popErrorHandler();
   11114             :     }
   11115             : #ifndef SED_HACKS
   11116             :     if ( bLocalUseExceptions ) {
   11117             :       CPLErr eclass = CPLGetLastErrorType();
   11118             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11119             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11120             :       }
   11121             :     }
   11122             : #endif
   11123             :   }
   11124           0 :   resultobj = SWIG_Py_Void();
   11125           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11126             :   return resultobj;
   11127           0 : fail:
   11128           0 :   return NULL;
   11129             : }
   11130             : 
   11131             : 
   11132           0 : SWIGINTERN PyObject *_wrap_FinderClean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11133           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11134             :   
   11135           0 :   if (!SWIG_Python_UnpackTuple(args, "FinderClean", 0, 0, 0)) SWIG_fail;
   11136           0 :   {
   11137           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11138           0 :     if ( bLocalUseExceptions ) {
   11139           0 :       pushErrorHandler();
   11140             :     }
   11141           0 :     {
   11142           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11143           0 :       CPLFinderClean();
   11144           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11145             :     }
   11146           0 :     if ( bLocalUseExceptions ) {
   11147           0 :       popErrorHandler();
   11148             :     }
   11149             : #ifndef SED_HACKS
   11150             :     if ( bLocalUseExceptions ) {
   11151             :       CPLErr eclass = CPLGetLastErrorType();
   11152             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11153             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11154             :       }
   11155             :     }
   11156             : #endif
   11157             :   }
   11158           0 :   resultobj = SWIG_Py_Void();
   11159           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11160             :   return resultobj;
   11161           0 : fail:
   11162           0 :   return NULL;
   11163             : }
   11164             : 
   11165             : 
   11166          47 : SWIGINTERN PyObject *_wrap_FindFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11167          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11168          47 :   char *arg1 = (char *) 0 ;
   11169          47 :   char *arg2 = (char *) 0 ;
   11170          47 :   int res1 ;
   11171          47 :   char *buf1 = 0 ;
   11172          47 :   int alloc1 = 0 ;
   11173          47 :   int bToFree2 = 0 ;
   11174          47 :   PyObject *swig_obj[2] ;
   11175          47 :   char *result = 0 ;
   11176             :   
   11177          47 :   if (!SWIG_Python_UnpackTuple(args, "FindFile", 2, 2, swig_obj)) SWIG_fail;
   11178          47 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   11179          47 :   if (!SWIG_IsOK(res1)) {
   11180           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindFile" "', argument " "1"" of type '" "char const *""'");
   11181             :   }
   11182          47 :   arg1 = reinterpret_cast< char * >(buf1);
   11183          47 :   {
   11184             :     /* %typemap(in) (const char *utf8_path) */
   11185          47 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   11186             :     {
   11187          47 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   11188             :     }
   11189             :     else
   11190             :     {
   11191           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   11192             :       
   11193             :     }
   11194          47 :     if (arg2 == NULL)
   11195             :     {
   11196           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11197           0 :       SWIG_fail;
   11198             :     }
   11199             :   }
   11200          47 :   {
   11201          47 :     if (!arg2) {
   11202          47 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11203             :     }
   11204             :   }
   11205          47 :   {
   11206          47 :     const int bLocalUseExceptions = GetUseExceptions();
   11207          47 :     if ( bLocalUseExceptions ) {
   11208          47 :       pushErrorHandler();
   11209             :     }
   11210          47 :     {
   11211          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11212          47 :       result = (char *)CPLFindFile((char const *)arg1,(char const *)arg2);
   11213          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11214             :     }
   11215          47 :     if ( bLocalUseExceptions ) {
   11216          47 :       popErrorHandler();
   11217             :     }
   11218             : #ifndef SED_HACKS
   11219             :     if ( bLocalUseExceptions ) {
   11220             :       CPLErr eclass = CPLGetLastErrorType();
   11221             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11222             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11223             :       }
   11224             :     }
   11225             : #endif
   11226             :   }
   11227          47 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11228          47 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11229          47 :   {
   11230             :     /* %typemap(freearg) (const char *utf8_path) */
   11231          47 :     GDALPythonFreeCStr(arg2, bToFree2);
   11232             :   }
   11233          47 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11234             :   return resultobj;
   11235           0 : fail:
   11236           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11237           0 :   {
   11238             :     /* %typemap(freearg) (const char *utf8_path) */
   11239          47 :     GDALPythonFreeCStr(arg2, bToFree2);
   11240             :   }
   11241             :   return NULL;
   11242             : }
   11243             : 
   11244             : 
   11245        3212 : SWIGINTERN PyObject *_wrap_ReadDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11246        3212 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11247        3212 :   char *arg1 = (char *) 0 ;
   11248        3212 :   int arg2 = (int) 0 ;
   11249        3212 :   int bToFree1 = 0 ;
   11250        3212 :   int val2 ;
   11251        3212 :   int ecode2 = 0 ;
   11252        3212 :   PyObject *swig_obj[2] ;
   11253        3212 :   char **result = 0 ;
   11254             :   
   11255        3212 :   if (!SWIG_Python_UnpackTuple(args, "ReadDir", 1, 2, swig_obj)) SWIG_fail;
   11256        3212 :   {
   11257             :     /* %typemap(in) (const char *utf8_path) */
   11258        3212 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11259             :     {
   11260        3205 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11261             :     }
   11262             :     else
   11263             :     {
   11264           7 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11265             :       
   11266             :     }
   11267        3212 :     if (arg1 == NULL)
   11268             :     {
   11269           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11270           0 :       SWIG_fail;
   11271             :     }
   11272             :   }
   11273        3212 :   if (swig_obj[1]) {
   11274           6 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   11275           6 :     if (!SWIG_IsOK(ecode2)) {
   11276           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReadDir" "', argument " "2"" of type '" "int""'");
   11277             :     } 
   11278             :     arg2 = static_cast< int >(val2);
   11279             :   }
   11280        3212 :   {
   11281        3212 :     if (!arg1) {
   11282        3212 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11283             :     }
   11284             :   }
   11285        3212 :   {
   11286        3212 :     const int bLocalUseExceptions = GetUseExceptions();
   11287        3212 :     if ( bLocalUseExceptions ) {
   11288        2463 :       pushErrorHandler();
   11289             :     }
   11290        3212 :     {
   11291        3212 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11292        3212 :       result = (char **)wrapper_VSIReadDirEx((char const *)arg1,arg2);
   11293        3212 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11294             :     }
   11295        3212 :     if ( bLocalUseExceptions ) {
   11296        2463 :       popErrorHandler();
   11297             :     }
   11298             : #ifndef SED_HACKS
   11299             :     if ( bLocalUseExceptions ) {
   11300             :       CPLErr eclass = CPLGetLastErrorType();
   11301             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11302             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11303             :       }
   11304             :     }
   11305             : #endif
   11306             :   }
   11307        3212 :   {
   11308             :     /* %typemap(out) char **CSL -> ( string ) */
   11309        3212 :     bool bErr = false;
   11310        3212 :     resultobj = CSLToList(result, &bErr);
   11311        3212 :     CSLDestroy(result);
   11312        3212 :     if( bErr ) {
   11313           0 :       SWIG_fail;
   11314             :     }
   11315             :   }
   11316        3212 :   {
   11317             :     /* %typemap(freearg) (const char *utf8_path) */
   11318        3212 :     GDALPythonFreeCStr(arg1, bToFree1);
   11319             :   }
   11320        3244 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11321             :   return resultobj;
   11322           0 : fail:
   11323           0 :   {
   11324             :     /* %typemap(freearg) (const char *utf8_path) */
   11325        3212 :     GDALPythonFreeCStr(arg1, bToFree1);
   11326             :   }
   11327             :   return NULL;
   11328             : }
   11329             : 
   11330             : 
   11331        1092 : SWIGINTERN PyObject *_wrap_ReadDirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11332        1092 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11333        1092 :   char *arg1 = (char *) 0 ;
   11334        1092 :   int bToFree1 = 0 ;
   11335        1092 :   PyObject *swig_obj[1] ;
   11336        1092 :   char **result = 0 ;
   11337             :   
   11338        1092 :   if (!args) SWIG_fail;
   11339        1092 :   swig_obj[0] = args;
   11340        1092 :   {
   11341             :     /* %typemap(in) (const char *utf8_path) */
   11342        1092 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11343             :     {
   11344        1037 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11345             :     }
   11346             :     else
   11347             :     {
   11348          55 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11349             :       
   11350             :     }
   11351        1092 :     if (arg1 == NULL)
   11352             :     {
   11353           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11354           0 :       SWIG_fail;
   11355             :     }
   11356             :   }
   11357        1092 :   {
   11358        1092 :     if (!arg1) {
   11359        1092 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11360             :     }
   11361             :   }
   11362        1092 :   {
   11363        1092 :     const int bLocalUseExceptions = GetUseExceptions();
   11364        1092 :     if ( bLocalUseExceptions ) {
   11365         289 :       pushErrorHandler();
   11366             :     }
   11367        1092 :     {
   11368        1092 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11369        1092 :       result = (char **)VSIReadDirRecursive((char const *)arg1);
   11370        1092 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11371             :     }
   11372        1092 :     if ( bLocalUseExceptions ) {
   11373         289 :       popErrorHandler();
   11374             :     }
   11375             : #ifndef SED_HACKS
   11376             :     if ( bLocalUseExceptions ) {
   11377             :       CPLErr eclass = CPLGetLastErrorType();
   11378             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11379             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11380             :       }
   11381             :     }
   11382             : #endif
   11383             :   }
   11384        1092 :   {
   11385             :     /* %typemap(out) char **CSL -> ( string ) */
   11386        1092 :     bool bErr = false;
   11387        1092 :     resultobj = CSLToList(result, &bErr);
   11388        1092 :     CSLDestroy(result);
   11389        1092 :     if( bErr ) {
   11390           0 :       SWIG_fail;
   11391             :     }
   11392             :   }
   11393        1092 :   {
   11394             :     /* %typemap(freearg) (const char *utf8_path) */
   11395        1092 :     GDALPythonFreeCStr(arg1, bToFree1);
   11396             :   }
   11397        1092 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11398             :   return resultobj;
   11399           0 : fail:
   11400           0 :   {
   11401             :     /* %typemap(freearg) (const char *utf8_path) */
   11402        1092 :     GDALPythonFreeCStr(arg1, bToFree1);
   11403             :   }
   11404             :   return NULL;
   11405             : }
   11406             : 
   11407             : 
   11408          32 : SWIGINTERN PyObject *_wrap_OpenDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11409          32 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11410          32 :   char *arg1 = (char *) 0 ;
   11411          32 :   int arg2 = (int) -1 ;
   11412          32 :   char **arg3 = (char **) NULL ;
   11413          32 :   int bToFree1 = 0 ;
   11414          32 :   int val2 ;
   11415          32 :   int ecode2 = 0 ;
   11416          32 :   PyObject *swig_obj[3] ;
   11417          32 :   VSIDIR *result = 0 ;
   11418             :   
   11419          32 :   if (!SWIG_Python_UnpackTuple(args, "OpenDir", 1, 3, swig_obj)) SWIG_fail;
   11420          32 :   {
   11421             :     /* %typemap(in) (const char *utf8_path) */
   11422          32 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11423             :     {
   11424          32 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11425             :     }
   11426             :     else
   11427             :     {
   11428           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11429             :       
   11430             :     }
   11431          32 :     if (arg1 == NULL)
   11432             :     {
   11433           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11434           0 :       SWIG_fail;
   11435             :     }
   11436             :   }
   11437          32 :   if (swig_obj[1]) {
   11438          22 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   11439          22 :     if (!SWIG_IsOK(ecode2)) {
   11440           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenDir" "', argument " "2"" of type '" "int""'");
   11441             :     } 
   11442             :     arg2 = static_cast< int >(val2);
   11443             :   }
   11444          32 :   if (swig_obj[2]) {
   11445          18 :     {
   11446             :       /* %typemap(in) char **dict */
   11447          18 :       arg3 = NULL;
   11448          18 :       if ( PySequence_Check( swig_obj[2] ) ) {
   11449          18 :         int bErr = FALSE;
   11450          18 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   11451          18 :         if ( bErr )
   11452             :         {
   11453           0 :           SWIG_fail;
   11454             :         }
   11455             :       }
   11456           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   11457           0 :         int bErr = FALSE;
   11458           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   11459           0 :         if ( bErr )
   11460             :         {
   11461           0 :           SWIG_fail;
   11462             :         }
   11463             :       }
   11464             :       else {
   11465           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   11466           0 :         SWIG_fail;
   11467             :       }
   11468             :     }
   11469             :   }
   11470          32 :   {
   11471          32 :     if (!arg1) {
   11472          32 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11473             :     }
   11474             :   }
   11475          32 :   {
   11476          32 :     const int bLocalUseExceptions = GetUseExceptions();
   11477          32 :     if ( bLocalUseExceptions ) {
   11478           0 :       pushErrorHandler();
   11479             :     }
   11480          32 :     {
   11481          32 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11482          32 :       result = (VSIDIR *)wrapper_VSIOpenDir((char const *)arg1,arg2,arg3);
   11483          32 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11484             :     }
   11485          32 :     if ( bLocalUseExceptions ) {
   11486           0 :       popErrorHandler();
   11487             :     }
   11488             : #ifndef SED_HACKS
   11489             :     if ( bLocalUseExceptions ) {
   11490             :       CPLErr eclass = CPLGetLastErrorType();
   11491             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11492             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11493             :       }
   11494             :     }
   11495             : #endif
   11496             :   }
   11497          32 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSIDIR, 0 |  0 );
   11498          32 :   {
   11499             :     /* %typemap(freearg) (const char *utf8_path) */
   11500          32 :     GDALPythonFreeCStr(arg1, bToFree1);
   11501             :   }
   11502          32 :   {
   11503             :     /* %typemap(freearg) char **dict */
   11504          32 :     CSLDestroy( arg3 );
   11505             :   }
   11506          32 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11507             :   return resultobj;
   11508           0 : fail:
   11509           0 :   {
   11510             :     /* %typemap(freearg) (const char *utf8_path) */
   11511           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   11512             :   }
   11513           0 :   {
   11514             :     /* %typemap(freearg) char **dict */
   11515           0 :     CSLDestroy( arg3 );
   11516             :   }
   11517             :   return NULL;
   11518             : }
   11519             : 
   11520             : 
   11521          78 : SWIGINTERN PyObject *_wrap_DirEntry_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11522          78 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11523          78 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11524          78 :   void *argp1 = 0 ;
   11525          78 :   int res1 = 0 ;
   11526          78 :   PyObject *swig_obj[1] ;
   11527          78 :   char *result = 0 ;
   11528             :   
   11529          78 :   if (!args) SWIG_fail;
   11530          78 :   swig_obj[0] = args;
   11531          78 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11532          78 :   if (!SWIG_IsOK(res1)) {
   11533           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_name_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11534             :   }
   11535          78 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11536          78 :   {
   11537          78 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11538          78 :     result = (char *) ((arg1)->name);
   11539          78 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11540             :   }
   11541          78 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11542          78 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11543             :   return resultobj;
   11544             : fail:
   11545             :   return NULL;
   11546             : }
   11547             : 
   11548             : 
   11549          42 : SWIGINTERN PyObject *_wrap_DirEntry_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11550          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11551          42 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11552          42 :   void *argp1 = 0 ;
   11553          42 :   int res1 = 0 ;
   11554          42 :   PyObject *swig_obj[1] ;
   11555          42 :   int result;
   11556             :   
   11557          42 :   if (!args) SWIG_fail;
   11558          42 :   swig_obj[0] = args;
   11559          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11560          42 :   if (!SWIG_IsOK(res1)) {
   11561           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mode_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11562             :   }
   11563          42 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11564          42 :   {
   11565          42 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11566          42 :     result = (int) ((arg1)->mode);
   11567          42 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11568             :   }
   11569          42 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11570          42 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11571             :   return resultobj;
   11572             : fail:
   11573             :   return NULL;
   11574             : }
   11575             : 
   11576             : 
   11577          15 : SWIGINTERN PyObject *_wrap_DirEntry_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11578          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11579          15 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11580          15 :   void *argp1 = 0 ;
   11581          15 :   int res1 = 0 ;
   11582          15 :   PyObject *swig_obj[1] ;
   11583          15 :   GIntBig result;
   11584             :   
   11585          15 :   if (!args) SWIG_fail;
   11586          15 :   swig_obj[0] = args;
   11587          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11588          15 :   if (!SWIG_IsOK(res1)) {
   11589           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_size_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11590             :   }
   11591          15 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11592          15 :   {
   11593          15 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11594          15 :     result =  ((arg1)->size);
   11595          15 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11596             :   }
   11597          15 :   {
   11598          15 :     resultobj = PyLong_FromLongLong(result);
   11599             :   }
   11600          15 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11601             :   return resultobj;
   11602             : fail:
   11603             :   return NULL;
   11604             : }
   11605             : 
   11606             : 
   11607          12 : SWIGINTERN PyObject *_wrap_DirEntry_mtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11608          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11609          12 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11610          12 :   void *argp1 = 0 ;
   11611          12 :   int res1 = 0 ;
   11612          12 :   PyObject *swig_obj[1] ;
   11613          12 :   GIntBig result;
   11614             :   
   11615          12 :   if (!args) SWIG_fail;
   11616          12 :   swig_obj[0] = args;
   11617          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11618          12 :   if (!SWIG_IsOK(res1)) {
   11619           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mtime_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11620             :   }
   11621          12 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11622          12 :   {
   11623          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11624          12 :     result =  ((arg1)->mtime);
   11625          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11626             :   }
   11627          12 :   {
   11628          12 :     resultobj = PyLong_FromLongLong(result);
   11629             :   }
   11630          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11631             :   return resultobj;
   11632             : fail:
   11633             :   return NULL;
   11634             : }
   11635             : 
   11636             : 
   11637           2 : SWIGINTERN PyObject *_wrap_DirEntry_modeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11638           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11639           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11640           2 :   void *argp1 = 0 ;
   11641           2 :   int res1 = 0 ;
   11642           2 :   PyObject *swig_obj[1] ;
   11643           2 :   bool result;
   11644             :   
   11645           2 :   if (!args) SWIG_fail;
   11646           2 :   swig_obj[0] = args;
   11647           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11648           2 :   if (!SWIG_IsOK(res1)) {
   11649           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_modeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11650             :   }
   11651           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11652           2 :   {
   11653           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11654           2 :     result = (bool) ((arg1)->modeKnown);
   11655           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11656             :   }
   11657           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11658           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11659             :   return resultobj;
   11660             : fail:
   11661             :   return NULL;
   11662             : }
   11663             : 
   11664             : 
   11665           2 : SWIGINTERN PyObject *_wrap_DirEntry_sizeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11666           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11667           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11668           2 :   void *argp1 = 0 ;
   11669           2 :   int res1 = 0 ;
   11670           2 :   PyObject *swig_obj[1] ;
   11671           2 :   bool result;
   11672             :   
   11673           2 :   if (!args) SWIG_fail;
   11674           2 :   swig_obj[0] = args;
   11675           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11676           2 :   if (!SWIG_IsOK(res1)) {
   11677           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_sizeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11678             :   }
   11679           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11680           2 :   {
   11681           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11682           2 :     result = (bool) ((arg1)->sizeKnown);
   11683           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11684             :   }
   11685           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11686           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11687             :   return resultobj;
   11688             : fail:
   11689             :   return NULL;
   11690             : }
   11691             : 
   11692             : 
   11693           2 : SWIGINTERN PyObject *_wrap_DirEntry_mtimeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11694           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11695           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11696           2 :   void *argp1 = 0 ;
   11697           2 :   int res1 = 0 ;
   11698           2 :   PyObject *swig_obj[1] ;
   11699           2 :   bool result;
   11700             :   
   11701           2 :   if (!args) SWIG_fail;
   11702           2 :   swig_obj[0] = args;
   11703           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11704           2 :   if (!SWIG_IsOK(res1)) {
   11705           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mtimeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11706             :   }
   11707           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11708           2 :   {
   11709           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11710           2 :     result = (bool) ((arg1)->mtimeKnown);
   11711           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11712             :   }
   11713           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11714           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11715             :   return resultobj;
   11716             : fail:
   11717             :   return NULL;
   11718             : }
   11719             : 
   11720             : 
   11721           2 : SWIGINTERN PyObject *_wrap_DirEntry_extra_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11722           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11723           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11724           2 :   void *argp1 = 0 ;
   11725           2 :   int res1 = 0 ;
   11726           2 :   PyObject *swig_obj[1] ;
   11727           2 :   char **result = 0 ;
   11728             :   
   11729           2 :   if (!args) SWIG_fail;
   11730           2 :   swig_obj[0] = args;
   11731           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11732           2 :   if (!SWIG_IsOK(res1)) {
   11733           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_extra_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11734             :   }
   11735           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11736           2 :   {
   11737           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11738           2 :     result = (char **) ((arg1)->extra);
   11739           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11740             :   }
   11741           2 :   {
   11742             :     /* %typemap(out) char **dict */
   11743           2 :     resultobj = GetCSLStringAsPyDict(result, false);
   11744             :   }
   11745           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11746             :   return resultobj;
   11747             : fail:
   11748             :   return NULL;
   11749             : }
   11750             : 
   11751             : 
   11752           0 : SWIGINTERN PyObject *_wrap_new_DirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11753           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11754           0 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11755           0 :   void *argp1 = 0 ;
   11756           0 :   int res1 = 0 ;
   11757           0 :   PyObject *swig_obj[1] ;
   11758           0 :   DirEntry *result = 0 ;
   11759             :   
   11760           0 :   if (!args) SWIG_fail;
   11761           0 :   swig_obj[0] = args;
   11762           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11763           0 :   if (!SWIG_IsOK(res1)) {
   11764           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DirEntry" "', argument " "1"" of type '" "DirEntry const *""'"); 
   11765             :   }
   11766           0 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11767           0 :   {
   11768           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11769           0 :     if ( bLocalUseExceptions ) {
   11770           0 :       pushErrorHandler();
   11771             :     }
   11772           0 :     {
   11773           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11774           0 :       result = (DirEntry *)new_DirEntry((DirEntry const *)arg1);
   11775           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11776             :     }
   11777           0 :     if ( bLocalUseExceptions ) {
   11778           0 :       popErrorHandler();
   11779             :     }
   11780             : #ifndef SED_HACKS
   11781             :     if ( bLocalUseExceptions ) {
   11782             :       CPLErr eclass = CPLGetLastErrorType();
   11783             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11784             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11785             :       }
   11786             :     }
   11787             : #endif
   11788             :   }
   11789           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirEntry, SWIG_POINTER_NEW |  0 );
   11790           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11791             :   return resultobj;
   11792             : fail:
   11793             :   return NULL;
   11794             : }
   11795             : 
   11796             : 
   11797          76 : SWIGINTERN PyObject *_wrap_delete_DirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11798          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11799          76 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11800          76 :   void *argp1 = 0 ;
   11801          76 :   int res1 = 0 ;
   11802          76 :   PyObject *swig_obj[1] ;
   11803             :   
   11804          76 :   if (!args) SWIG_fail;
   11805          76 :   swig_obj[0] = args;
   11806          76 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, SWIG_POINTER_DISOWN |  0 );
   11807          76 :   if (!SWIG_IsOK(res1)) {
   11808           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DirEntry" "', argument " "1"" of type '" "DirEntry *""'"); 
   11809             :   }
   11810          76 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11811          76 :   {
   11812          76 :     const int bLocalUseExceptions = GetUseExceptions();
   11813          76 :     if ( bLocalUseExceptions ) {
   11814           0 :       pushErrorHandler();
   11815             :     }
   11816          76 :     {
   11817          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11818          76 :       delete_DirEntry(arg1);
   11819          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11820             :     }
   11821          76 :     if ( bLocalUseExceptions ) {
   11822           0 :       popErrorHandler();
   11823             :     }
   11824             : #ifndef SED_HACKS
   11825             :     if ( bLocalUseExceptions ) {
   11826             :       CPLErr eclass = CPLGetLastErrorType();
   11827             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11828             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11829             :       }
   11830             :     }
   11831             : #endif
   11832             :   }
   11833          76 :   resultobj = SWIG_Py_Void();
   11834          76 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11835             :   return resultobj;
   11836             : fail:
   11837             :   return NULL;
   11838             : }
   11839             : 
   11840             : 
   11841           0 : SWIGINTERN PyObject *_wrap_DirEntry_IsDirectory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11842           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11843           0 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11844           0 :   void *argp1 = 0 ;
   11845           0 :   int res1 = 0 ;
   11846           0 :   PyObject *swig_obj[1] ;
   11847           0 :   bool result;
   11848             :   
   11849           0 :   if (!args) SWIG_fail;
   11850           0 :   swig_obj[0] = args;
   11851           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11852           0 :   if (!SWIG_IsOK(res1)) {
   11853           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_IsDirectory" "', argument " "1"" of type '" "DirEntry *""'"); 
   11854             :   }
   11855           0 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   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 = (bool)DirEntry_IsDirectory(arg1);
   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_From_bool(static_cast< bool >(result));
   11879           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11880             :   return resultobj;
   11881             : fail:
   11882             :   return NULL;
   11883             : }
   11884             : 
   11885             : 
   11886         276 : SWIGINTERN PyObject *DirEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11887         276 :   PyObject *obj;
   11888         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   11889         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_DirEntry, SWIG_NewClientData(obj));
   11890         276 :   return SWIG_Py_Void();
   11891             : }
   11892             : 
   11893           0 : SWIGINTERN PyObject *DirEntry_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11894           0 :   return SWIG_Python_InitShadowInstance(args);
   11895             : }
   11896             : 
   11897         106 : SWIGINTERN PyObject *_wrap_GetNextDirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11898         106 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11899         106 :   VSIDIR *arg1 = (VSIDIR *) 0 ;
   11900         106 :   void *argp1 = 0 ;
   11901         106 :   int res1 = 0 ;
   11902         106 :   PyObject *swig_obj[1] ;
   11903         106 :   DirEntry *result = 0 ;
   11904             :   
   11905         106 :   if (!args) SWIG_fail;
   11906         106 :   swig_obj[0] = args;
   11907         106 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSIDIR, 0 |  0 );
   11908         106 :   if (!SWIG_IsOK(res1)) {
   11909           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetNextDirEntry" "', argument " "1"" of type '" "VSIDIR *""'"); 
   11910             :   }
   11911         106 :   arg1 = reinterpret_cast< VSIDIR * >(argp1);
   11912         106 :   {
   11913         106 :     if (!arg1) {
   11914           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11915             :     }
   11916             :   }
   11917         106 :   {
   11918         106 :     const int bLocalUseExceptions = GetUseExceptions();
   11919         106 :     if ( bLocalUseExceptions ) {
   11920           0 :       pushErrorHandler();
   11921             :     }
   11922         106 :     {
   11923         106 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11924         106 :       result = (DirEntry *)wrapper_VSIGetNextDirEntry(arg1);
   11925         106 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11926             :     }
   11927         106 :     if ( bLocalUseExceptions ) {
   11928           0 :       popErrorHandler();
   11929             :     }
   11930             : #ifndef SED_HACKS
   11931             :     if ( bLocalUseExceptions ) {
   11932             :       CPLErr eclass = CPLGetLastErrorType();
   11933             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11934             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11935             :       }
   11936             :     }
   11937             : #endif
   11938             :   }
   11939         106 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirEntry, SWIG_POINTER_OWN |  0 );
   11940         106 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11941             :   return resultobj;
   11942             : fail:
   11943             :   return NULL;
   11944             : }
   11945             : 
   11946             : 
   11947          30 : SWIGINTERN PyObject *_wrap_CloseDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11948          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11949          30 :   VSIDIR *arg1 = (VSIDIR *) 0 ;
   11950          30 :   void *argp1 = 0 ;
   11951          30 :   int res1 = 0 ;
   11952          30 :   PyObject *swig_obj[1] ;
   11953             :   
   11954          30 :   if (!args) SWIG_fail;
   11955          30 :   swig_obj[0] = args;
   11956          30 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSIDIR, 0 |  0 );
   11957          30 :   if (!SWIG_IsOK(res1)) {
   11958           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CloseDir" "', argument " "1"" of type '" "VSIDIR *""'"); 
   11959             :   }
   11960          30 :   arg1 = reinterpret_cast< VSIDIR * >(argp1);
   11961          30 :   {
   11962          30 :     if (!arg1) {
   11963           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11964             :     }
   11965             :   }
   11966          30 :   {
   11967          30 :     const int bLocalUseExceptions = GetUseExceptions();
   11968          30 :     if ( bLocalUseExceptions ) {
   11969           0 :       pushErrorHandler();
   11970             :     }
   11971          30 :     {
   11972          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11973          30 :       VSICloseDir(arg1);
   11974          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11975             :     }
   11976          30 :     if ( bLocalUseExceptions ) {
   11977           0 :       popErrorHandler();
   11978             :     }
   11979             : #ifndef SED_HACKS
   11980             :     if ( bLocalUseExceptions ) {
   11981             :       CPLErr eclass = CPLGetLastErrorType();
   11982             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11983             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11984             :       }
   11985             :     }
   11986             : #endif
   11987             :   }
   11988          30 :   resultobj = SWIG_Py_Void();
   11989          30 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11990             :   return resultobj;
   11991             : fail:
   11992             :   return NULL;
   11993             : }
   11994             : 
   11995             : 
   11996        4076 : SWIGINTERN PyObject *_wrap_SetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11997        4076 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11998        4076 :   char *arg1 = (char *) 0 ;
   11999        4076 :   char *arg2 = (char *) 0 ;
   12000        4076 :   int res1 ;
   12001        4076 :   char *buf1 = 0 ;
   12002        4076 :   int alloc1 = 0 ;
   12003        4076 :   int res2 ;
   12004        4076 :   char *buf2 = 0 ;
   12005        4076 :   int alloc2 = 0 ;
   12006        4076 :   PyObject *swig_obj[2] ;
   12007             :   
   12008        4076 :   if (!SWIG_Python_UnpackTuple(args, "SetConfigOption", 2, 2, swig_obj)) SWIG_fail;
   12009        4076 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12010        4076 :   if (!SWIG_IsOK(res1)) {
   12011           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetConfigOption" "', argument " "1"" of type '" "char const *""'");
   12012             :   }
   12013        4076 :   arg1 = reinterpret_cast< char * >(buf1);
   12014        4076 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12015        4076 :   if (!SWIG_IsOK(res2)) {
   12016           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetConfigOption" "', argument " "2"" of type '" "char const *""'");
   12017             :   }
   12018        4076 :   arg2 = reinterpret_cast< char * >(buf2);
   12019        4076 :   {
   12020        4076 :     if (!arg1) {
   12021           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12022             :     }
   12023             :   }
   12024        4076 :   {
   12025        4076 :     const int bLocalUseExceptions = GetUseExceptions();
   12026        4076 :     if ( bLocalUseExceptions ) {
   12027         227 :       pushErrorHandler();
   12028             :     }
   12029        4076 :     {
   12030        4076 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12031        4076 :       CPLSetConfigOption((char const *)arg1,(char const *)arg2);
   12032        4076 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12033             :     }
   12034        4076 :     if ( bLocalUseExceptions ) {
   12035         227 :       popErrorHandler();
   12036             :     }
   12037             : #ifndef SED_HACKS
   12038             :     if ( bLocalUseExceptions ) {
   12039             :       CPLErr eclass = CPLGetLastErrorType();
   12040             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12041             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12042             :       }
   12043             :     }
   12044             : #endif
   12045             :   }
   12046        4076 :   resultobj = SWIG_Py_Void();
   12047        4076 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12048        4076 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12049        4076 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12050             :   return resultobj;
   12051           0 : fail:
   12052           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12053           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12054             :   return NULL;
   12055             : }
   12056             : 
   12057             : 
   12058        5964 : SWIGINTERN PyObject *_wrap_SetThreadLocalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12059        5964 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12060        5964 :   char *arg1 = (char *) 0 ;
   12061        5964 :   char *arg2 = (char *) 0 ;
   12062        5964 :   int res1 ;
   12063        5964 :   char *buf1 = 0 ;
   12064        5964 :   int alloc1 = 0 ;
   12065        5964 :   int res2 ;
   12066        5964 :   char *buf2 = 0 ;
   12067        5964 :   int alloc2 = 0 ;
   12068        5964 :   PyObject *swig_obj[2] ;
   12069             :   
   12070        5964 :   if (!SWIG_Python_UnpackTuple(args, "SetThreadLocalConfigOption", 2, 2, swig_obj)) SWIG_fail;
   12071        5964 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12072        5964 :   if (!SWIG_IsOK(res1)) {
   12073           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetThreadLocalConfigOption" "', argument " "1"" of type '" "char const *""'");
   12074             :   }
   12075        5964 :   arg1 = reinterpret_cast< char * >(buf1);
   12076        5964 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12077        5964 :   if (!SWIG_IsOK(res2)) {
   12078           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetThreadLocalConfigOption" "', argument " "2"" of type '" "char const *""'");
   12079             :   }
   12080        5964 :   arg2 = reinterpret_cast< char * >(buf2);
   12081        5964 :   {
   12082        5964 :     if (!arg1) {
   12083           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12084             :     }
   12085             :   }
   12086        5964 :   {
   12087        5964 :     const int bLocalUseExceptions = GetUseExceptions();
   12088        5964 :     if ( bLocalUseExceptions ) {
   12089        2842 :       pushErrorHandler();
   12090             :     }
   12091        5964 :     {
   12092        5964 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12093        5964 :       CPLSetThreadLocalConfigOption((char const *)arg1,(char const *)arg2);
   12094        5964 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12095             :     }
   12096        5964 :     if ( bLocalUseExceptions ) {
   12097        2842 :       popErrorHandler();
   12098             :     }
   12099             : #ifndef SED_HACKS
   12100             :     if ( bLocalUseExceptions ) {
   12101             :       CPLErr eclass = CPLGetLastErrorType();
   12102             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12103             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12104             :       }
   12105             :     }
   12106             : #endif
   12107             :   }
   12108        5964 :   resultobj = SWIG_Py_Void();
   12109        5964 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12110        5964 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12111        5964 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12112             :   return resultobj;
   12113           0 : fail:
   12114           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12115           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12116             :   return NULL;
   12117             : }
   12118             : 
   12119             : 
   12120       20741 : SWIGINTERN PyObject *_wrap_GetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12121       20741 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12122       20741 :   char *arg1 = (char *) 0 ;
   12123       20741 :   char *arg2 = (char *) NULL ;
   12124       20741 :   int res1 ;
   12125       20741 :   char *buf1 = 0 ;
   12126       20741 :   int alloc1 = 0 ;
   12127       20741 :   int res2 ;
   12128       20741 :   char *buf2 = 0 ;
   12129       20741 :   int alloc2 = 0 ;
   12130       20741 :   PyObject *swig_obj[2] ;
   12131       20741 :   char *result = 0 ;
   12132             :   
   12133       20741 :   if (!SWIG_Python_UnpackTuple(args, "GetConfigOption", 1, 2, swig_obj)) SWIG_fail;
   12134       20741 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12135       20741 :   if (!SWIG_IsOK(res1)) {
   12136           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetConfigOption" "', argument " "1"" of type '" "char const *""'");
   12137             :   }
   12138       20741 :   arg1 = reinterpret_cast< char * >(buf1);
   12139       20741 :   if (swig_obj[1]) {
   12140        1018 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12141        1018 :     if (!SWIG_IsOK(res2)) {
   12142           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetConfigOption" "', argument " "2"" of type '" "char const *""'");
   12143             :     }
   12144        1018 :     arg2 = reinterpret_cast< char * >(buf2);
   12145             :   }
   12146       20741 :   {
   12147       20741 :     if (!arg1) {
   12148           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12149             :     }
   12150             :   }
   12151       20741 :   {
   12152       20741 :     const int bLocalUseExceptions = GetUseExceptions();
   12153       20741 :     if ( bLocalUseExceptions ) {
   12154       20195 :       pushErrorHandler();
   12155             :     }
   12156       20741 :     {
   12157       20741 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12158       20741 :       result = (char *)wrapper_CPLGetConfigOption((char const *)arg1,(char const *)arg2);
   12159       20741 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12160             :     }
   12161       20741 :     if ( bLocalUseExceptions ) {
   12162       20195 :       popErrorHandler();
   12163             :     }
   12164             : #ifndef SED_HACKS
   12165             :     if ( bLocalUseExceptions ) {
   12166             :       CPLErr eclass = CPLGetLastErrorType();
   12167             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12168             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12169             :       }
   12170             :     }
   12171             : #endif
   12172             :   }
   12173       20741 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12174       20741 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12175       20741 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12176       20741 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12177             :   return resultobj;
   12178           0 : fail:
   12179           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12180           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12181             :   return NULL;
   12182             : }
   12183             : 
   12184             : 
   12185        1856 : SWIGINTERN PyObject *_wrap_GetGlobalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12186        1856 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12187        1856 :   char *arg1 = (char *) 0 ;
   12188        1856 :   char *arg2 = (char *) NULL ;
   12189        1856 :   int res1 ;
   12190        1856 :   char *buf1 = 0 ;
   12191        1856 :   int alloc1 = 0 ;
   12192        1856 :   int res2 ;
   12193        1856 :   char *buf2 = 0 ;
   12194        1856 :   int alloc2 = 0 ;
   12195        1856 :   PyObject *swig_obj[2] ;
   12196        1856 :   char *result = 0 ;
   12197             :   
   12198        1856 :   if (!SWIG_Python_UnpackTuple(args, "GetGlobalConfigOption", 1, 2, swig_obj)) SWIG_fail;
   12199        1856 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12200        1856 :   if (!SWIG_IsOK(res1)) {
   12201           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetGlobalConfigOption" "', argument " "1"" of type '" "char const *""'");
   12202             :   }
   12203        1856 :   arg1 = reinterpret_cast< char * >(buf1);
   12204        1856 :   if (swig_obj[1]) {
   12205           0 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12206           0 :     if (!SWIG_IsOK(res2)) {
   12207           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetGlobalConfigOption" "', argument " "2"" of type '" "char const *""'");
   12208             :     }
   12209           0 :     arg2 = reinterpret_cast< char * >(buf2);
   12210             :   }
   12211        1856 :   {
   12212        1856 :     if (!arg1) {
   12213           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12214             :     }
   12215             :   }
   12216        1856 :   {
   12217        1856 :     const int bLocalUseExceptions = GetUseExceptions();
   12218        1856 :     if ( bLocalUseExceptions ) {
   12219          68 :       pushErrorHandler();
   12220             :     }
   12221        1856 :     {
   12222        1856 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12223        1856 :       result = (char *)wrapper_CPLGetGlobalConfigOption((char const *)arg1,(char const *)arg2);
   12224        1856 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12225             :     }
   12226        1856 :     if ( bLocalUseExceptions ) {
   12227          68 :       popErrorHandler();
   12228             :     }
   12229             : #ifndef SED_HACKS
   12230             :     if ( bLocalUseExceptions ) {
   12231             :       CPLErr eclass = CPLGetLastErrorType();
   12232             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12233             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12234             :       }
   12235             :     }
   12236             : #endif
   12237             :   }
   12238        1856 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12239        1856 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12240        1856 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12241        1856 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12242             :   return resultobj;
   12243           0 : fail:
   12244           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12245           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12246             :   return NULL;
   12247             : }
   12248             : 
   12249             : 
   12250        2987 : SWIGINTERN PyObject *_wrap_GetThreadLocalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12251        2987 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12252        2987 :   char *arg1 = (char *) 0 ;
   12253        2987 :   char *arg2 = (char *) NULL ;
   12254        2987 :   int res1 ;
   12255        2987 :   char *buf1 = 0 ;
   12256        2987 :   int alloc1 = 0 ;
   12257        2987 :   int res2 ;
   12258        2987 :   char *buf2 = 0 ;
   12259        2987 :   int alloc2 = 0 ;
   12260        2987 :   PyObject *swig_obj[2] ;
   12261        2987 :   char *result = 0 ;
   12262             :   
   12263        2987 :   if (!SWIG_Python_UnpackTuple(args, "GetThreadLocalConfigOption", 1, 2, swig_obj)) SWIG_fail;
   12264        2987 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12265        2987 :   if (!SWIG_IsOK(res1)) {
   12266           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetThreadLocalConfigOption" "', argument " "1"" of type '" "char const *""'");
   12267             :   }
   12268        2987 :   arg1 = reinterpret_cast< char * >(buf1);
   12269        2987 :   if (swig_obj[1]) {
   12270           0 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12271           0 :     if (!SWIG_IsOK(res2)) {
   12272           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetThreadLocalConfigOption" "', argument " "2"" of type '" "char const *""'");
   12273             :     }
   12274           0 :     arg2 = reinterpret_cast< char * >(buf2);
   12275             :   }
   12276        2987 :   {
   12277        2987 :     if (!arg1) {
   12278           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12279             :     }
   12280             :   }
   12281        2987 :   {
   12282        2987 :     const int bLocalUseExceptions = GetUseExceptions();
   12283        2987 :     if ( bLocalUseExceptions ) {
   12284        1421 :       pushErrorHandler();
   12285             :     }
   12286        2987 :     {
   12287        2987 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12288        2987 :       result = (char *)wrapper_CPLGetThreadLocalConfigOption((char const *)arg1,(char const *)arg2);
   12289        2987 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12290             :     }
   12291        2987 :     if ( bLocalUseExceptions ) {
   12292        1421 :       popErrorHandler();
   12293             :     }
   12294             : #ifndef SED_HACKS
   12295             :     if ( bLocalUseExceptions ) {
   12296             :       CPLErr eclass = CPLGetLastErrorType();
   12297             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12298             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12299             :       }
   12300             :     }
   12301             : #endif
   12302             :   }
   12303        2987 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12304        2987 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12305        2987 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12306        2987 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12307             :   return resultobj;
   12308           0 : fail:
   12309           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12310           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12311             :   return NULL;
   12312             : }
   12313             : 
   12314             : 
   12315           6 : SWIGINTERN PyObject *_wrap_GetConfigOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12316           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12317           6 :   char **result = 0 ;
   12318             :   
   12319           6 :   if (!SWIG_Python_UnpackTuple(args, "GetConfigOptions", 0, 0, 0)) SWIG_fail;
   12320           6 :   {
   12321           6 :     const int bLocalUseExceptions = GetUseExceptions();
   12322           6 :     if ( bLocalUseExceptions ) {
   12323           0 :       pushErrorHandler();
   12324             :     }
   12325           6 :     {
   12326           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12327           6 :       result = (char **)wrapper_GetConfigOptions();
   12328           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12329             :     }
   12330           6 :     if ( bLocalUseExceptions ) {
   12331           0 :       popErrorHandler();
   12332             :     }
   12333             : #ifndef SED_HACKS
   12334             :     if ( bLocalUseExceptions ) {
   12335             :       CPLErr eclass = CPLGetLastErrorType();
   12336             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12337             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12338             :       }
   12339             :     }
   12340             : #endif
   12341             :   }
   12342           6 :   {
   12343             :     /* %typemap(out) char **dict */
   12344           6 :     resultobj = GetCSLStringAsPyDict(result, true);
   12345             :   }
   12346           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12347             :   return resultobj;
   12348           0 : fail:
   12349           0 :   return NULL;
   12350             : }
   12351             : 
   12352             : 
   12353          30 : SWIGINTERN PyObject *_wrap_SetPathSpecificOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12354          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12355          30 :   char *arg1 = (char *) 0 ;
   12356          30 :   char *arg2 = (char *) 0 ;
   12357          30 :   char *arg3 = (char *) 0 ;
   12358          30 :   int res1 ;
   12359          30 :   char *buf1 = 0 ;
   12360          30 :   int alloc1 = 0 ;
   12361          30 :   int res2 ;
   12362          30 :   char *buf2 = 0 ;
   12363          30 :   int alloc2 = 0 ;
   12364          30 :   int res3 ;
   12365          30 :   char *buf3 = 0 ;
   12366          30 :   int alloc3 = 0 ;
   12367          30 :   PyObject *swig_obj[3] ;
   12368             :   
   12369          30 :   if (!SWIG_Python_UnpackTuple(args, "SetPathSpecificOption", 3, 3, swig_obj)) SWIG_fail;
   12370          30 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12371          30 :   if (!SWIG_IsOK(res1)) {
   12372           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetPathSpecificOption" "', argument " "1"" of type '" "char const *""'");
   12373             :   }
   12374          30 :   arg1 = reinterpret_cast< char * >(buf1);
   12375          30 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12376          30 :   if (!SWIG_IsOK(res2)) {
   12377           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetPathSpecificOption" "', argument " "2"" of type '" "char const *""'");
   12378             :   }
   12379          30 :   arg2 = reinterpret_cast< char * >(buf2);
   12380          30 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12381          30 :   if (!SWIG_IsOK(res3)) {
   12382           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetPathSpecificOption" "', argument " "3"" of type '" "char const *""'");
   12383             :   }
   12384          30 :   arg3 = reinterpret_cast< char * >(buf3);
   12385          30 :   {
   12386          30 :     if (!arg1) {
   12387           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12388             :     }
   12389             :   }
   12390          29 :   {
   12391          29 :     if (!arg2) {
   12392           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12393             :     }
   12394             :   }
   12395          28 :   {
   12396          28 :     const int bLocalUseExceptions = GetUseExceptions();
   12397          28 :     if ( bLocalUseExceptions ) {
   12398          19 :       pushErrorHandler();
   12399             :     }
   12400          28 :     {
   12401          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12402          28 :       VSISetPathSpecificOption((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12403          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12404             :     }
   12405          28 :     if ( bLocalUseExceptions ) {
   12406          19 :       popErrorHandler();
   12407             :     }
   12408             : #ifndef SED_HACKS
   12409             :     if ( bLocalUseExceptions ) {
   12410             :       CPLErr eclass = CPLGetLastErrorType();
   12411             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12412             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12413             :       }
   12414             :     }
   12415             : #endif
   12416             :   }
   12417          28 :   resultobj = SWIG_Py_Void();
   12418          28 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12419          28 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12420          28 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12421          30 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12422             :   return resultobj;
   12423           2 : fail:
   12424           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12425           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12426           2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12427             :   return NULL;
   12428             : }
   12429             : 
   12430             : 
   12431          56 : SWIGINTERN PyObject *_wrap_SetCredential(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12432          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12433          56 :   char *arg1 = (char *) 0 ;
   12434          56 :   char *arg2 = (char *) 0 ;
   12435          56 :   char *arg3 = (char *) 0 ;
   12436          56 :   int res1 ;
   12437          56 :   char *buf1 = 0 ;
   12438          56 :   int alloc1 = 0 ;
   12439          56 :   int res2 ;
   12440          56 :   char *buf2 = 0 ;
   12441          56 :   int alloc2 = 0 ;
   12442          56 :   int res3 ;
   12443          56 :   char *buf3 = 0 ;
   12444          56 :   int alloc3 = 0 ;
   12445          56 :   PyObject *swig_obj[3] ;
   12446             :   
   12447          56 :   if (!SWIG_Python_UnpackTuple(args, "SetCredential", 3, 3, swig_obj)) SWIG_fail;
   12448          56 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12449          56 :   if (!SWIG_IsOK(res1)) {
   12450           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetCredential" "', argument " "1"" of type '" "char const *""'");
   12451             :   }
   12452          56 :   arg1 = reinterpret_cast< char * >(buf1);
   12453          56 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12454          56 :   if (!SWIG_IsOK(res2)) {
   12455           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetCredential" "', argument " "2"" of type '" "char const *""'");
   12456             :   }
   12457          56 :   arg2 = reinterpret_cast< char * >(buf2);
   12458          56 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12459          56 :   if (!SWIG_IsOK(res3)) {
   12460           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetCredential" "', argument " "3"" of type '" "char const *""'");
   12461             :   }
   12462          56 :   arg3 = reinterpret_cast< char * >(buf3);
   12463          56 :   {
   12464          56 :     if (!arg1) {
   12465           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12466             :     }
   12467             :   }
   12468          56 :   {
   12469          56 :     if (!arg2) {
   12470           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12471             :     }
   12472             :   }
   12473          56 :   {
   12474          56 :     const int bLocalUseExceptions = GetUseExceptions();
   12475          56 :     if ( bLocalUseExceptions ) {
   12476           0 :       pushErrorHandler();
   12477             :     }
   12478          56 :     {
   12479          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12480          56 :       wrapper_VSISetCredential((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12481          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12482             :     }
   12483          56 :     if ( bLocalUseExceptions ) {
   12484           0 :       popErrorHandler();
   12485             :     }
   12486             : #ifndef SED_HACKS
   12487             :     if ( bLocalUseExceptions ) {
   12488             :       CPLErr eclass = CPLGetLastErrorType();
   12489             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12490             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12491             :       }
   12492             :     }
   12493             : #endif
   12494             :   }
   12495          56 :   resultobj = SWIG_Py_Void();
   12496          56 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12497          56 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12498          56 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12499          56 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12500             :   return resultobj;
   12501           0 : fail:
   12502           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12503           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12504           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12505             :   return NULL;
   12506             : }
   12507             : 
   12508             : 
   12509           0 : SWIGINTERN PyObject *_wrap_GetCredential(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12510           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12511           0 :   char *arg1 = (char *) 0 ;
   12512           0 :   char *arg2 = (char *) 0 ;
   12513           0 :   char *arg3 = (char *) NULL ;
   12514           0 :   int res1 ;
   12515           0 :   char *buf1 = 0 ;
   12516           0 :   int alloc1 = 0 ;
   12517           0 :   int res2 ;
   12518           0 :   char *buf2 = 0 ;
   12519           0 :   int alloc2 = 0 ;
   12520           0 :   int res3 ;
   12521           0 :   char *buf3 = 0 ;
   12522           0 :   int alloc3 = 0 ;
   12523           0 :   PyObject *swig_obj[3] ;
   12524           0 :   char *result = 0 ;
   12525             :   
   12526           0 :   if (!SWIG_Python_UnpackTuple(args, "GetCredential", 2, 3, swig_obj)) SWIG_fail;
   12527           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12528           0 :   if (!SWIG_IsOK(res1)) {
   12529           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCredential" "', argument " "1"" of type '" "char const *""'");
   12530             :   }
   12531           0 :   arg1 = reinterpret_cast< char * >(buf1);
   12532           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12533           0 :   if (!SWIG_IsOK(res2)) {
   12534           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetCredential" "', argument " "2"" of type '" "char const *""'");
   12535             :   }
   12536           0 :   arg2 = reinterpret_cast< char * >(buf2);
   12537           0 :   if (swig_obj[2]) {
   12538           0 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12539           0 :     if (!SWIG_IsOK(res3)) {
   12540           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GetCredential" "', argument " "3"" of type '" "char const *""'");
   12541             :     }
   12542           0 :     arg3 = reinterpret_cast< char * >(buf3);
   12543             :   }
   12544           0 :   {
   12545           0 :     if (!arg1) {
   12546           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12547             :     }
   12548             :   }
   12549           0 :   {
   12550           0 :     if (!arg2) {
   12551           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12552             :     }
   12553             :   }
   12554           0 :   {
   12555           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12556           0 :     if ( bLocalUseExceptions ) {
   12557           0 :       pushErrorHandler();
   12558             :     }
   12559           0 :     {
   12560           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12561           0 :       result = (char *)wrapper_VSIGetCredential((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12562           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12563             :     }
   12564           0 :     if ( bLocalUseExceptions ) {
   12565           0 :       popErrorHandler();
   12566             :     }
   12567             : #ifndef SED_HACKS
   12568             :     if ( bLocalUseExceptions ) {
   12569             :       CPLErr eclass = CPLGetLastErrorType();
   12570             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12571             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12572             :       }
   12573             :     }
   12574             : #endif
   12575             :   }
   12576           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12577           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12578           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12579           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12580           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12581             :   return resultobj;
   12582           0 : fail:
   12583           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12584           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12585           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12586             :   return NULL;
   12587             : }
   12588             : 
   12589             : 
   12590          12 : SWIGINTERN PyObject *_wrap_GetPathSpecificOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12591          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12592          12 :   char *arg1 = (char *) 0 ;
   12593          12 :   char *arg2 = (char *) 0 ;
   12594          12 :   char *arg3 = (char *) NULL ;
   12595          12 :   int res1 ;
   12596          12 :   char *buf1 = 0 ;
   12597          12 :   int alloc1 = 0 ;
   12598          12 :   int res2 ;
   12599          12 :   char *buf2 = 0 ;
   12600          12 :   int alloc2 = 0 ;
   12601          12 :   int res3 ;
   12602          12 :   char *buf3 = 0 ;
   12603          12 :   int alloc3 = 0 ;
   12604          12 :   PyObject *swig_obj[3] ;
   12605          12 :   char *result = 0 ;
   12606             :   
   12607          12 :   if (!SWIG_Python_UnpackTuple(args, "GetPathSpecificOption", 2, 3, swig_obj)) SWIG_fail;
   12608          12 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12609          12 :   if (!SWIG_IsOK(res1)) {
   12610           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetPathSpecificOption" "', argument " "1"" of type '" "char const *""'");
   12611             :   }
   12612          12 :   arg1 = reinterpret_cast< char * >(buf1);
   12613          12 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12614          12 :   if (!SWIG_IsOK(res2)) {
   12615           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetPathSpecificOption" "', argument " "2"" of type '" "char const *""'");
   12616             :   }
   12617          12 :   arg2 = reinterpret_cast< char * >(buf2);
   12618          12 :   if (swig_obj[2]) {
   12619           2 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12620           2 :     if (!SWIG_IsOK(res3)) {
   12621           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GetPathSpecificOption" "', argument " "3"" of type '" "char const *""'");
   12622             :     }
   12623           2 :     arg3 = reinterpret_cast< char * >(buf3);
   12624             :   }
   12625          12 :   {
   12626          12 :     if (!arg1) {
   12627           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12628             :     }
   12629             :   }
   12630          11 :   {
   12631          11 :     if (!arg2) {
   12632           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12633             :     }
   12634             :   }
   12635          10 :   {
   12636          10 :     const int bLocalUseExceptions = GetUseExceptions();
   12637          10 :     if ( bLocalUseExceptions ) {
   12638          10 :       pushErrorHandler();
   12639             :     }
   12640          10 :     {
   12641          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12642          10 :       result = (char *)wrapper_VSIGetPathSpecificOption((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12643          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12644             :     }
   12645          10 :     if ( bLocalUseExceptions ) {
   12646          10 :       popErrorHandler();
   12647             :     }
   12648             : #ifndef SED_HACKS
   12649             :     if ( bLocalUseExceptions ) {
   12650             :       CPLErr eclass = CPLGetLastErrorType();
   12651             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12652             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12653             :       }
   12654             :     }
   12655             : #endif
   12656             :   }
   12657          10 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12658          10 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12659          10 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12660          10 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12661          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12662             :   return resultobj;
   12663           2 : fail:
   12664           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12665           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12666           2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12667             :   return NULL;
   12668             : }
   12669             : 
   12670             : 
   12671           8 : SWIGINTERN PyObject *_wrap_ClearCredentials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12672           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12673           8 :   char *arg1 = (char *) NULL ;
   12674           8 :   int res1 ;
   12675           8 :   char *buf1 = 0 ;
   12676           8 :   int alloc1 = 0 ;
   12677           8 :   PyObject *swig_obj[1] ;
   12678             :   
   12679           8 :   if (!SWIG_Python_UnpackTuple(args, "ClearCredentials", 0, 1, swig_obj)) SWIG_fail;
   12680           8 :   if (swig_obj[0]) {
   12681           8 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12682           8 :     if (!SWIG_IsOK(res1)) {
   12683           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClearCredentials" "', argument " "1"" of type '" "char const *""'");
   12684             :     }
   12685           8 :     arg1 = reinterpret_cast< char * >(buf1);
   12686             :   }
   12687           8 :   {
   12688           8 :     const int bLocalUseExceptions = GetUseExceptions();
   12689           8 :     if ( bLocalUseExceptions ) {
   12690           0 :       pushErrorHandler();
   12691             :     }
   12692           8 :     {
   12693           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12694           8 :       wrapper_VSIClearCredentials((char const *)arg1);
   12695           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12696             :     }
   12697           8 :     if ( bLocalUseExceptions ) {
   12698           0 :       popErrorHandler();
   12699             :     }
   12700             : #ifndef SED_HACKS
   12701             :     if ( bLocalUseExceptions ) {
   12702             :       CPLErr eclass = CPLGetLastErrorType();
   12703             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12704             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12705             :       }
   12706             :     }
   12707             : #endif
   12708             :   }
   12709           8 :   resultobj = SWIG_Py_Void();
   12710           8 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12711           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12712             :   return resultobj;
   12713           0 : fail:
   12714           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12715             :   return NULL;
   12716             : }
   12717             : 
   12718             : 
   12719           9 : SWIGINTERN PyObject *_wrap_ClearPathSpecificOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12720           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12721           9 :   char *arg1 = (char *) NULL ;
   12722           9 :   int res1 ;
   12723           9 :   char *buf1 = 0 ;
   12724           9 :   int alloc1 = 0 ;
   12725           9 :   PyObject *swig_obj[1] ;
   12726             :   
   12727           9 :   if (!SWIG_Python_UnpackTuple(args, "ClearPathSpecificOptions", 0, 1, swig_obj)) SWIG_fail;
   12728           9 :   if (swig_obj[0]) {
   12729           7 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12730           7 :     if (!SWIG_IsOK(res1)) {
   12731           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClearPathSpecificOptions" "', argument " "1"" of type '" "char const *""'");
   12732             :     }
   12733           7 :     arg1 = reinterpret_cast< char * >(buf1);
   12734             :   }
   12735           9 :   {
   12736           9 :     const int bLocalUseExceptions = GetUseExceptions();
   12737           9 :     if ( bLocalUseExceptions ) {
   12738           5 :       pushErrorHandler();
   12739             :     }
   12740           9 :     {
   12741           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12742           9 :       wrapper_VSIClearPathSpecificOptions((char const *)arg1);
   12743           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12744             :     }
   12745           9 :     if ( bLocalUseExceptions ) {
   12746           5 :       popErrorHandler();
   12747             :     }
   12748             : #ifndef SED_HACKS
   12749             :     if ( bLocalUseExceptions ) {
   12750             :       CPLErr eclass = CPLGetLastErrorType();
   12751             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12752             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12753             :       }
   12754             :     }
   12755             : #endif
   12756             :   }
   12757           9 :   resultobj = SWIG_Py_Void();
   12758           9 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12759           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12760             :   return resultobj;
   12761           0 : fail:
   12762           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12763             :   return NULL;
   12764             : }
   12765             : 
   12766             : 
   12767           0 : SWIGINTERN PyObject *_wrap_CPLBinaryToHex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12768           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12769           0 :   int arg1 ;
   12770           0 :   GByte *arg2 = (GByte *) 0 ;
   12771           0 :   int alloc1 = 0 ;
   12772           0 :   bool viewIsValid1 = false ;
   12773           0 :   Py_buffer view1 ;
   12774           0 :   PyObject *swig_obj[1] ;
   12775           0 :   retStringAndCPLFree *result = 0 ;
   12776             :   
   12777           0 :   if (!args) SWIG_fail;
   12778           0 :   swig_obj[0] = args;
   12779           0 :   {
   12780             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   12781           0 :     char* ptr = NULL;
   12782           0 :     if( !GetBufferAsCharPtrIntSize(swig_obj[0], &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   12783           0 :       SWIG_fail;
   12784             :     }
   12785           0 :     arg2 = (GByte *)ptr;
   12786             :   }
   12787           0 :   {
   12788           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12789           0 :     if ( bLocalUseExceptions ) {
   12790           0 :       pushErrorHandler();
   12791             :     }
   12792           0 :     {
   12793           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12794           0 :       result = (retStringAndCPLFree *)CPLBinaryToHex(arg1,(GByte const *)arg2);
   12795           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12796             :     }
   12797           0 :     if ( bLocalUseExceptions ) {
   12798           0 :       popErrorHandler();
   12799             :     }
   12800             : #ifndef SED_HACKS
   12801             :     if ( bLocalUseExceptions ) {
   12802             :       CPLErr eclass = CPLGetLastErrorType();
   12803             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12804             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12805             :       }
   12806             :     }
   12807             : #endif
   12808             :   }
   12809           0 :   {
   12810             :     /* %typemap(out) (retStringAndCPLFree*) */
   12811           0 :     Py_XDECREF(resultobj);
   12812           0 :     if(result)
   12813             :     {
   12814           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   12815           0 :       CPLFree(result);
   12816             :     }
   12817             :     else
   12818             :     {
   12819           0 :       resultobj = Py_None;
   12820           0 :       Py_INCREF(resultobj);
   12821             :     }
   12822             :   }
   12823           0 :   {
   12824             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   12825           0 :     if( viewIsValid1 ) {
   12826           0 :       PyBuffer_Release(&view1);
   12827             :     }
   12828           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   12829           0 :       delete[] arg2;
   12830             :     }
   12831             :   }
   12832           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12833             :   return resultobj;
   12834           0 : fail:
   12835           0 :   {
   12836             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   12837           0 :     if( viewIsValid1 ) {
   12838           0 :       PyBuffer_Release(&view1);
   12839             :     }
   12840           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   12841             :       delete[] arg2;
   12842             :     }
   12843             :   }
   12844             :   return NULL;
   12845             : }
   12846             : 
   12847             : 
   12848           0 : SWIGINTERN PyObject *_wrap_CPLHexToBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12849           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12850           0 :   char *arg1 = (char *) 0 ;
   12851           0 :   int *arg2 = (int *) 0 ;
   12852           0 :   int res1 ;
   12853           0 :   char *buf1 = 0 ;
   12854           0 :   int alloc1 = 0 ;
   12855           0 :   void *argp2 = 0 ;
   12856           0 :   int res2 = 0 ;
   12857           0 :   PyObject *swig_obj[2] ;
   12858           0 :   GByte *result = 0 ;
   12859             :   
   12860           0 :   if (!SWIG_Python_UnpackTuple(args, "CPLHexToBinary", 2, 2, swig_obj)) SWIG_fail;
   12861           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12862           0 :   if (!SWIG_IsOK(res1)) {
   12863           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPLHexToBinary" "', argument " "1"" of type '" "char const *""'");
   12864             :   }
   12865           0 :   arg1 = reinterpret_cast< char * >(buf1);
   12866           0 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, 0 |  0 );
   12867           0 :   if (!SWIG_IsOK(res2)) {
   12868           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CPLHexToBinary" "', argument " "2"" of type '" "int *""'"); 
   12869             :   }
   12870           0 :   arg2 = reinterpret_cast< int * >(argp2);
   12871           0 :   {
   12872           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12873           0 :     if ( bLocalUseExceptions ) {
   12874           0 :       pushErrorHandler();
   12875             :     }
   12876           0 :     {
   12877           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12878           0 :       result = (GByte *)CPLHexToBinary((char const *)arg1,arg2);
   12879           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12880             :     }
   12881           0 :     if ( bLocalUseExceptions ) {
   12882           0 :       popErrorHandler();
   12883             :     }
   12884             : #ifndef SED_HACKS
   12885             :     if ( bLocalUseExceptions ) {
   12886             :       CPLErr eclass = CPLGetLastErrorType();
   12887             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12888             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12889             :       }
   12890             :     }
   12891             : #endif
   12892             :   }
   12893           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GByte, 0 |  0 );
   12894           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12895           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12896             :   return resultobj;
   12897           0 : fail:
   12898           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12899             :   return NULL;
   12900             : }
   12901             : 
   12902             : 
   12903        3562 : SWIGINTERN PyObject *_wrap_FileFromMemBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12904        3562 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12905        3562 :   char *arg1 = (char *) 0 ;
   12906        3562 :   GIntBig arg2 ;
   12907        3562 :   char *arg3 = (char *) 0 ;
   12908        3562 :   int bToFree1 = 0 ;
   12909        3562 :   int alloc2 = 0 ;
   12910        3562 :   bool viewIsValid2 = false ;
   12911        3562 :   Py_buffer view2 ;
   12912        3562 :   PyObject *swig_obj[2] ;
   12913        3562 :   VSI_RETVAL result;
   12914             :   
   12915        3562 :   if (!SWIG_Python_UnpackTuple(args, "FileFromMemBuffer", 2, 2, swig_obj)) SWIG_fail;
   12916        3562 :   {
   12917             :     /* %typemap(in) (const char *utf8_path) */
   12918        3562 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   12919             :     {
   12920        1767 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   12921             :     }
   12922             :     else
   12923             :     {
   12924        1795 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   12925             :       
   12926             :     }
   12927        3562 :     if (arg1 == NULL)
   12928             :     {
   12929           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   12930           0 :       SWIG_fail;
   12931             :     }
   12932             :   }
   12933        3562 :   {
   12934             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   12935        3562 :     char* ptr = NULL;
   12936        3562 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   12937           0 :       SWIG_fail;
   12938             :     }
   12939        3562 :     arg3 = (char *)ptr;
   12940             :   }
   12941        3562 :   {
   12942        3562 :     if (!arg1) {
   12943        3562 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12944             :     }
   12945             :   }
   12946        3562 :   {
   12947        3562 :     const int bLocalUseExceptions = GetUseExceptions();
   12948        3562 :     if ( bLocalUseExceptions ) {
   12949        1244 :       pushErrorHandler();
   12950             :     }
   12951        3562 :     {
   12952        3562 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12953        3562 :       result = wrapper_VSIFileFromMemBuffer((char const *)arg1,arg2,(char const *)arg3);
   12954        3562 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12955             :     }
   12956        3562 :     if ( bLocalUseExceptions ) {
   12957        1244 :       popErrorHandler();
   12958             :     }
   12959             : #ifndef SED_HACKS
   12960             :     if ( bLocalUseExceptions ) {
   12961             :       CPLErr eclass = CPLGetLastErrorType();
   12962             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12963             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12964             :       }
   12965             :     }
   12966             : #endif
   12967             :   }
   12968        3562 :   {
   12969             :     /* %typemap(out) VSI_RETVAL */
   12970        3563 :     if ( result != 0 && GetUseExceptions()) {
   12971           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   12972           0 :       if( pszMessage[0] != '\0' )
   12973           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   12974             :       else
   12975           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   12976           0 :       SWIG_fail;
   12977             :     }
   12978             :   }
   12979        3562 :   {
   12980             :     /* %typemap(freearg) (const char *utf8_path) */
   12981        3562 :     GDALPythonFreeCStr(arg1, bToFree1);
   12982             :   }
   12983        3562 :   {
   12984             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   12985        3562 :     if( viewIsValid2 ) {
   12986        1249 :       PyBuffer_Release(&view2);
   12987             :     }
   12988        2313 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   12989        2313 :       delete[] arg3;
   12990             :     }
   12991             :   }
   12992        3562 :   {
   12993             :     /* %typemap(ret) VSI_RETVAL */
   12994        3562 :     resultobj = PyInt_FromLong( result );
   12995             :   }
   12996        3562 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12997             :   return resultobj;
   12998           0 : fail:
   12999           0 :   {
   13000             :     /* %typemap(freearg) (const char *utf8_path) */
   13001           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   13002             :   }
   13003           0 :   {
   13004             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   13005           0 :     if( viewIsValid2 ) {
   13006           0 :       PyBuffer_Release(&view2);
   13007             :     }
   13008        3562 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   13009           0 :       delete[] arg3;
   13010             :     }
   13011             :   }
   13012             :   return NULL;
   13013             : }
   13014             : 
   13015             : 
   13016        7824 : SWIGINTERN PyObject *_wrap_Unlink(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13017        7824 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13018        7824 :   char *arg1 = (char *) 0 ;
   13019        7824 :   int bToFree1 = 0 ;
   13020        7824 :   PyObject *swig_obj[1] ;
   13021        7824 :   VSI_RETVAL result;
   13022             :   
   13023        7824 :   if (!args) SWIG_fail;
   13024        7824 :   swig_obj[0] = args;
   13025        7824 :   {
   13026             :     /* %typemap(in) (const char *utf8_path) */
   13027        7824 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13028             :     {
   13029        6994 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13030             :     }
   13031             :     else
   13032             :     {
   13033         830 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13034             :       
   13035             :     }
   13036        7824 :     if (arg1 == NULL)
   13037             :     {
   13038           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13039           0 :       SWIG_fail;
   13040             :     }
   13041             :   }
   13042        7824 :   {
   13043        7824 :     if (!arg1) {
   13044        7824 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13045             :     }
   13046             :   }
   13047        7824 :   {
   13048        7824 :     const int bLocalUseExceptions = GetUseExceptions();
   13049        7824 :     if ( bLocalUseExceptions ) {
   13050        1487 :       pushErrorHandler();
   13051             :     }
   13052        7824 :     {
   13053        7824 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13054        7824 :       result = VSIUnlink((char const *)arg1);
   13055        7824 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13056             :     }
   13057        7824 :     if ( bLocalUseExceptions ) {
   13058        1487 :       popErrorHandler();
   13059             :     }
   13060             : #ifndef SED_HACKS
   13061             :     if ( bLocalUseExceptions ) {
   13062             :       CPLErr eclass = CPLGetLastErrorType();
   13063             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13064             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13065             :       }
   13066             :     }
   13067             : #endif
   13068             :   }
   13069        7824 :   {
   13070             :     /* %typemap(out) VSI_RETVAL */
   13071        8394 :     if ( result != 0 && GetUseExceptions()) {
   13072          27 :       const char* pszMessage = CPLGetLastErrorMsg();
   13073          27 :       if( pszMessage[0] != '\0' )
   13074           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13075             :       else
   13076          27 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13077          27 :       SWIG_fail;
   13078             :     }
   13079             :   }
   13080        7797 :   {
   13081             :     /* %typemap(freearg) (const char *utf8_path) */
   13082        7797 :     GDALPythonFreeCStr(arg1, bToFree1);
   13083             :   }
   13084        7797 :   {
   13085             :     /* %typemap(ret) VSI_RETVAL */
   13086        7797 :     resultobj = PyInt_FromLong( result );
   13087             :   }
   13088        7797 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13089             :   return resultobj;
   13090          27 : fail:
   13091          27 :   {
   13092             :     /* %typemap(freearg) (const char *utf8_path) */
   13093        7851 :     GDALPythonFreeCStr(arg1, bToFree1);
   13094             :   }
   13095             :   return NULL;
   13096             : }
   13097             : 
   13098             : 
   13099          10 : SWIGINTERN PyObject *_wrap_UnlinkBatch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13100          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13101          10 :   char **arg1 = (char **) 0 ;
   13102          10 :   PyObject *swig_obj[1] ;
   13103          10 :   bool result;
   13104             :   
   13105          10 :   if (!args) SWIG_fail;
   13106          10 :   swig_obj[0] = args;
   13107          10 :   {
   13108             :     /* %typemap(in) char **dict */
   13109          10 :     arg1 = NULL;
   13110          10 :     if ( PySequence_Check( swig_obj[0] ) ) {
   13111          10 :       int bErr = FALSE;
   13112          10 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   13113          10 :       if ( bErr )
   13114             :       {
   13115           0 :         SWIG_fail;
   13116             :       }
   13117             :     }
   13118           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   13119           0 :       int bErr = FALSE;
   13120           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   13121           0 :       if ( bErr )
   13122             :       {
   13123           0 :         SWIG_fail;
   13124             :       }
   13125             :     }
   13126             :     else {
   13127           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   13128           0 :       SWIG_fail;
   13129             :     }
   13130             :   }
   13131          10 :   {
   13132          10 :     const int bLocalUseExceptions = GetUseExceptions();
   13133          10 :     if ( bLocalUseExceptions ) {
   13134           0 :       pushErrorHandler();
   13135             :     }
   13136          10 :     {
   13137          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13138          10 :       result = (bool)wrapper_VSIUnlinkBatch(arg1);
   13139          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13140             :     }
   13141          10 :     if ( bLocalUseExceptions ) {
   13142           0 :       popErrorHandler();
   13143             :     }
   13144             : #ifndef SED_HACKS
   13145             :     if ( bLocalUseExceptions ) {
   13146             :       CPLErr eclass = CPLGetLastErrorType();
   13147             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13148             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13149             :       }
   13150             :     }
   13151             : #endif
   13152             :   }
   13153          10 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   13154          10 :   {
   13155             :     /* %typemap(freearg) char **dict */
   13156          10 :     CSLDestroy( arg1 );
   13157             :   }
   13158          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13159             :   return resultobj;
   13160           0 : fail:
   13161           0 :   {
   13162             :     /* %typemap(freearg) char **dict */
   13163           0 :     CSLDestroy( arg1 );
   13164             :   }
   13165             :   return NULL;
   13166             : }
   13167             : 
   13168             : 
   13169           0 : SWIGINTERN PyObject *_wrap_HasThreadSupport(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13170           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13171           0 :   int result;
   13172             :   
   13173           0 :   if (!SWIG_Python_UnpackTuple(args, "HasThreadSupport", 0, 0, 0)) SWIG_fail;
   13174           0 :   {
   13175           0 :     const int bLocalUseExceptions = GetUseExceptions();
   13176           0 :     if ( bLocalUseExceptions ) {
   13177           0 :       pushErrorHandler();
   13178             :     }
   13179           0 :     {
   13180           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13181           0 :       result = (int)wrapper_HasThreadSupport();
   13182           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13183             :     }
   13184           0 :     if ( bLocalUseExceptions ) {
   13185           0 :       popErrorHandler();
   13186             :     }
   13187             : #ifndef SED_HACKS
   13188             :     if ( bLocalUseExceptions ) {
   13189             :       CPLErr eclass = CPLGetLastErrorType();
   13190             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13191             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13192             :       }
   13193             :     }
   13194             : #endif
   13195             :   }
   13196           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13197           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13198             :   return resultobj;
   13199           0 : fail:
   13200           0 :   return NULL;
   13201             : }
   13202             : 
   13203             : 
   13204        4669 : SWIGINTERN PyObject *_wrap_Mkdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13205        4669 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13206        4669 :   char *arg1 = (char *) 0 ;
   13207        4669 :   int arg2 ;
   13208        4669 :   int bToFree1 = 0 ;
   13209        4669 :   int val2 ;
   13210        4669 :   int ecode2 = 0 ;
   13211        4669 :   PyObject *swig_obj[2] ;
   13212        4669 :   VSI_RETVAL result;
   13213             :   
   13214        4669 :   if (!SWIG_Python_UnpackTuple(args, "Mkdir", 2, 2, swig_obj)) SWIG_fail;
   13215        4669 :   {
   13216             :     /* %typemap(in) (const char *utf8_path) */
   13217        4669 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13218             :     {
   13219        4381 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13220             :     }
   13221             :     else
   13222             :     {
   13223         288 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13224             :       
   13225             :     }
   13226        4669 :     if (arg1 == NULL)
   13227             :     {
   13228           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13229           0 :       SWIG_fail;
   13230             :     }
   13231             :   }
   13232        4669 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   13233        4669 :   if (!SWIG_IsOK(ecode2)) {
   13234           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Mkdir" "', argument " "2"" of type '" "int""'");
   13235             :   } 
   13236        4669 :   arg2 = static_cast< int >(val2);
   13237        4669 :   {
   13238        4669 :     if (!arg1) {
   13239        4669 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13240             :     }
   13241             :   }
   13242        4669 :   {
   13243        4669 :     const int bLocalUseExceptions = GetUseExceptions();
   13244        4669 :     if ( bLocalUseExceptions ) {
   13245        1577 :       pushErrorHandler();
   13246             :     }
   13247        4669 :     {
   13248        4669 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13249        4669 :       result = VSIMkdir((char const *)arg1,arg2);
   13250        4669 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13251             :     }
   13252        4669 :     if ( bLocalUseExceptions ) {
   13253        1577 :       popErrorHandler();
   13254             :     }
   13255             : #ifndef SED_HACKS
   13256             :     if ( bLocalUseExceptions ) {
   13257             :       CPLErr eclass = CPLGetLastErrorType();
   13258             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13259             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13260             :       }
   13261             :     }
   13262             : #endif
   13263             :   }
   13264        4669 :   {
   13265             :     /* %typemap(out) VSI_RETVAL */
   13266        4716 :     if ( result != 0 && GetUseExceptions()) {
   13267           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13268           0 :       if( pszMessage[0] != '\0' )
   13269           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13270             :       else
   13271           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13272           0 :       SWIG_fail;
   13273             :     }
   13274             :   }
   13275        4669 :   {
   13276             :     /* %typemap(freearg) (const char *utf8_path) */
   13277        4669 :     GDALPythonFreeCStr(arg1, bToFree1);
   13278             :   }
   13279        4669 :   {
   13280             :     /* %typemap(ret) VSI_RETVAL */
   13281        4669 :     resultobj = PyInt_FromLong( result );
   13282             :   }
   13283        4669 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13284             :   return resultobj;
   13285           0 : fail:
   13286           0 :   {
   13287             :     /* %typemap(freearg) (const char *utf8_path) */
   13288        4669 :     GDALPythonFreeCStr(arg1, bToFree1);
   13289             :   }
   13290             :   return NULL;
   13291             : }
   13292             : 
   13293             : 
   13294          33 : SWIGINTERN PyObject *_wrap_Rmdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13295          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13296          33 :   char *arg1 = (char *) 0 ;
   13297          33 :   int bToFree1 = 0 ;
   13298          33 :   PyObject *swig_obj[1] ;
   13299          33 :   VSI_RETVAL result;
   13300             :   
   13301          33 :   if (!args) SWIG_fail;
   13302          33 :   swig_obj[0] = args;
   13303          33 :   {
   13304             :     /* %typemap(in) (const char *utf8_path) */
   13305          33 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13306             :     {
   13307          30 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13308             :     }
   13309             :     else
   13310             :     {
   13311           3 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13312             :       
   13313             :     }
   13314          33 :     if (arg1 == NULL)
   13315             :     {
   13316           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13317           0 :       SWIG_fail;
   13318             :     }
   13319             :   }
   13320          33 :   {
   13321          33 :     if (!arg1) {
   13322          33 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13323             :     }
   13324             :   }
   13325          33 :   {
   13326          33 :     const int bLocalUseExceptions = GetUseExceptions();
   13327          33 :     if ( bLocalUseExceptions ) {
   13328           1 :       pushErrorHandler();
   13329             :     }
   13330          33 :     {
   13331          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13332          33 :       result = VSIRmdir((char const *)arg1);
   13333          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13334             :     }
   13335          33 :     if ( bLocalUseExceptions ) {
   13336           1 :       popErrorHandler();
   13337             :     }
   13338             : #ifndef SED_HACKS
   13339             :     if ( bLocalUseExceptions ) {
   13340             :       CPLErr eclass = CPLGetLastErrorType();
   13341             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13342             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13343             :       }
   13344             :     }
   13345             : #endif
   13346             :   }
   13347          33 :   {
   13348             :     /* %typemap(out) VSI_RETVAL */
   13349          50 :     if ( result != 0 && GetUseExceptions()) {
   13350           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13351           0 :       if( pszMessage[0] != '\0' )
   13352           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13353             :       else
   13354           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13355           0 :       SWIG_fail;
   13356             :     }
   13357             :   }
   13358          33 :   {
   13359             :     /* %typemap(freearg) (const char *utf8_path) */
   13360          33 :     GDALPythonFreeCStr(arg1, bToFree1);
   13361             :   }
   13362          33 :   {
   13363             :     /* %typemap(ret) VSI_RETVAL */
   13364          33 :     resultobj = PyInt_FromLong( result );
   13365             :   }
   13366          33 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13367             :   return resultobj;
   13368           0 : fail:
   13369           0 :   {
   13370             :     /* %typemap(freearg) (const char *utf8_path) */
   13371          33 :     GDALPythonFreeCStr(arg1, bToFree1);
   13372             :   }
   13373             :   return NULL;
   13374             : }
   13375             : 
   13376             : 
   13377          10 : SWIGINTERN PyObject *_wrap_MkdirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13378          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13379          10 :   char *arg1 = (char *) 0 ;
   13380          10 :   int arg2 ;
   13381          10 :   int bToFree1 = 0 ;
   13382          10 :   int val2 ;
   13383          10 :   int ecode2 = 0 ;
   13384          10 :   PyObject *swig_obj[2] ;
   13385          10 :   VSI_RETVAL result;
   13386             :   
   13387          10 :   if (!SWIG_Python_UnpackTuple(args, "MkdirRecursive", 2, 2, swig_obj)) SWIG_fail;
   13388          10 :   {
   13389             :     /* %typemap(in) (const char *utf8_path) */
   13390          10 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13391             :     {
   13392          10 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13393             :     }
   13394             :     else
   13395             :     {
   13396           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13397             :       
   13398             :     }
   13399          10 :     if (arg1 == NULL)
   13400             :     {
   13401           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13402           0 :       SWIG_fail;
   13403             :     }
   13404             :   }
   13405          10 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   13406          10 :   if (!SWIG_IsOK(ecode2)) {
   13407           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MkdirRecursive" "', argument " "2"" of type '" "int""'");
   13408             :   } 
   13409          10 :   arg2 = static_cast< int >(val2);
   13410          10 :   {
   13411          10 :     if (!arg1) {
   13412          10 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13413             :     }
   13414             :   }
   13415          10 :   {
   13416          10 :     const int bLocalUseExceptions = GetUseExceptions();
   13417          10 :     if ( bLocalUseExceptions ) {
   13418           8 :       pushErrorHandler();
   13419             :     }
   13420          10 :     {
   13421          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13422          10 :       result = VSIMkdirRecursive((char const *)arg1,arg2);
   13423          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13424             :     }
   13425          10 :     if ( bLocalUseExceptions ) {
   13426           8 :       popErrorHandler();
   13427             :     }
   13428             : #ifndef SED_HACKS
   13429             :     if ( bLocalUseExceptions ) {
   13430             :       CPLErr eclass = CPLGetLastErrorType();
   13431             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13432             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13433             :       }
   13434             :     }
   13435             : #endif
   13436             :   }
   13437          10 :   {
   13438             :     /* %typemap(out) VSI_RETVAL */
   13439          10 :     if ( result != 0 && GetUseExceptions()) {
   13440           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13441           0 :       if( pszMessage[0] != '\0' )
   13442           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13443             :       else
   13444           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13445           0 :       SWIG_fail;
   13446             :     }
   13447             :   }
   13448          10 :   {
   13449             :     /* %typemap(freearg) (const char *utf8_path) */
   13450          10 :     GDALPythonFreeCStr(arg1, bToFree1);
   13451             :   }
   13452          10 :   {
   13453             :     /* %typemap(ret) VSI_RETVAL */
   13454          10 :     resultobj = PyInt_FromLong( result );
   13455             :   }
   13456          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13457             :   return resultobj;
   13458           0 : fail:
   13459           0 :   {
   13460             :     /* %typemap(freearg) (const char *utf8_path) */
   13461          10 :     GDALPythonFreeCStr(arg1, bToFree1);
   13462             :   }
   13463             :   return NULL;
   13464             : }
   13465             : 
   13466             : 
   13467        4325 : SWIGINTERN PyObject *_wrap_RmdirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13468        4325 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13469        4325 :   char *arg1 = (char *) 0 ;
   13470        4325 :   int bToFree1 = 0 ;
   13471        4325 :   PyObject *swig_obj[1] ;
   13472        4325 :   VSI_RETVAL result;
   13473             :   
   13474        4325 :   if (!args) SWIG_fail;
   13475        4325 :   swig_obj[0] = args;
   13476        4325 :   {
   13477             :     /* %typemap(in) (const char *utf8_path) */
   13478        4325 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13479             :     {
   13480        4322 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13481             :     }
   13482             :     else
   13483             :     {
   13484           3 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13485             :       
   13486             :     }
   13487        4325 :     if (arg1 == NULL)
   13488             :     {
   13489           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13490           0 :       SWIG_fail;
   13491             :     }
   13492             :   }
   13493        4325 :   {
   13494        4325 :     if (!arg1) {
   13495        4325 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13496             :     }
   13497             :   }
   13498        4325 :   {
   13499        4325 :     const int bLocalUseExceptions = GetUseExceptions();
   13500        4325 :     if ( bLocalUseExceptions ) {
   13501        1531 :       pushErrorHandler();
   13502             :     }
   13503        4325 :     {
   13504        4325 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13505        4325 :       result = VSIRmdirRecursive((char const *)arg1);
   13506        4325 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13507             :     }
   13508        4325 :     if ( bLocalUseExceptions ) {
   13509        1531 :       popErrorHandler();
   13510             :     }
   13511             : #ifndef SED_HACKS
   13512             :     if ( bLocalUseExceptions ) {
   13513             :       CPLErr eclass = CPLGetLastErrorType();
   13514             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13515             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13516             :       }
   13517             :     }
   13518             : #endif
   13519             :   }
   13520        4325 :   {
   13521             :     /* %typemap(out) VSI_RETVAL */
   13522        4336 :     if ( result != 0 && GetUseExceptions()) {
   13523           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13524           0 :       if( pszMessage[0] != '\0' )
   13525           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13526             :       else
   13527           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13528           0 :       SWIG_fail;
   13529             :     }
   13530             :   }
   13531        4325 :   {
   13532             :     /* %typemap(freearg) (const char *utf8_path) */
   13533        4325 :     GDALPythonFreeCStr(arg1, bToFree1);
   13534             :   }
   13535        4325 :   {
   13536             :     /* %typemap(ret) VSI_RETVAL */
   13537        4325 :     resultobj = PyInt_FromLong( result );
   13538             :   }
   13539        4325 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13540             :   return resultobj;
   13541           0 : fail:
   13542           0 :   {
   13543             :     /* %typemap(freearg) (const char *utf8_path) */
   13544        4325 :     GDALPythonFreeCStr(arg1, bToFree1);
   13545             :   }
   13546             :   return NULL;
   13547             : }
   13548             : 
   13549             : 
   13550          12 : SWIGINTERN PyObject *_wrap_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13551          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13552          12 :   char *arg1 = (char *) 0 ;
   13553          12 :   char *arg2 = (char *) 0 ;
   13554          12 :   int bToFree1 = 0 ;
   13555          12 :   int bToFree2 = 0 ;
   13556          12 :   PyObject *swig_obj[2] ;
   13557          12 :   VSI_RETVAL result;
   13558             :   
   13559          12 :   if (!SWIG_Python_UnpackTuple(args, "Rename", 2, 2, swig_obj)) SWIG_fail;
   13560          12 :   {
   13561             :     /* %typemap(in) (const char *utf8_path) */
   13562          12 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13563             :     {
   13564          12 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13565             :     }
   13566             :     else
   13567             :     {
   13568           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13569             :       
   13570             :     }
   13571          12 :     if (arg1 == NULL)
   13572             :     {
   13573           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13574           0 :       SWIG_fail;
   13575             :     }
   13576             :   }
   13577          12 :   {
   13578             :     /* %typemap(in) (const char *utf8_path) */
   13579          12 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   13580             :     {
   13581          12 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   13582             :     }
   13583             :     else
   13584             :     {
   13585           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   13586             :       
   13587             :     }
   13588          12 :     if (arg2 == NULL)
   13589             :     {
   13590           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13591           0 :       SWIG_fail;
   13592             :     }
   13593             :   }
   13594          12 :   {
   13595          12 :     if (!arg1) {
   13596          12 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13597             :     }
   13598             :   }
   13599          12 :   {
   13600          12 :     if (!arg2) {
   13601          12 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13602             :     }
   13603             :   }
   13604          12 :   {
   13605          12 :     const int bLocalUseExceptions = GetUseExceptions();
   13606          12 :     if ( bLocalUseExceptions ) {
   13607           2 :       pushErrorHandler();
   13608             :     }
   13609          12 :     {
   13610          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13611          12 :       result = VSIRename((char const *)arg1,(char const *)arg2);
   13612          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13613             :     }
   13614          12 :     if ( bLocalUseExceptions ) {
   13615           2 :       popErrorHandler();
   13616             :     }
   13617             : #ifndef SED_HACKS
   13618             :     if ( bLocalUseExceptions ) {
   13619             :       CPLErr eclass = CPLGetLastErrorType();
   13620             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13621             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13622             :       }
   13623             :     }
   13624             : #endif
   13625             :   }
   13626          12 :   {
   13627             :     /* %typemap(out) VSI_RETVAL */
   13628          14 :     if ( result != 0 && GetUseExceptions()) {
   13629           1 :       const char* pszMessage = CPLGetLastErrorMsg();
   13630           1 :       if( pszMessage[0] != '\0' )
   13631           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13632             :       else
   13633           1 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13634           1 :       SWIG_fail;
   13635             :     }
   13636             :   }
   13637          11 :   {
   13638             :     /* %typemap(freearg) (const char *utf8_path) */
   13639          11 :     GDALPythonFreeCStr(arg1, bToFree1);
   13640             :   }
   13641          11 :   {
   13642             :     /* %typemap(freearg) (const char *utf8_path) */
   13643          11 :     GDALPythonFreeCStr(arg2, bToFree2);
   13644             :   }
   13645          11 :   {
   13646             :     /* %typemap(ret) VSI_RETVAL */
   13647          11 :     resultobj = PyInt_FromLong( result );
   13648             :   }
   13649          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13650             :   return resultobj;
   13651           1 : fail:
   13652           1 :   {
   13653             :     /* %typemap(freearg) (const char *utf8_path) */
   13654           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   13655             :   }
   13656           1 :   {
   13657             :     /* %typemap(freearg) (const char *utf8_path) */
   13658          13 :     GDALPythonFreeCStr(arg2, bToFree2);
   13659             :   }
   13660             :   return NULL;
   13661             : }
   13662             : 
   13663             : 
   13664           7 : SWIGINTERN PyObject *_wrap_Move(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13665           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13666           7 :   char *arg1 = (char *) 0 ;
   13667           7 :   char *arg2 = (char *) 0 ;
   13668           7 :   char **arg3 = (char **) NULL ;
   13669           7 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   13670           7 :   void *arg5 = (void *) NULL ;
   13671           7 :   int bToFree1 = 0 ;
   13672           7 :   int bToFree2 = 0 ;
   13673           7 :   PyObject * obj0 = 0 ;
   13674           7 :   PyObject * obj1 = 0 ;
   13675           7 :   PyObject * obj2 = 0 ;
   13676           7 :   PyObject * obj3 = 0 ;
   13677           7 :   PyObject * obj4 = 0 ;
   13678           7 :   char * kwnames[] = {
   13679             :     (char *)"old_path",  (char *)"new_path",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   13680             :   };
   13681           7 :   VSI_RETVAL result;
   13682             :   
   13683             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   13684           7 :   PyProgressData *psProgressInfo;
   13685           7 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   13686           7 :   psProgressInfo->nLastReported = -1;
   13687           7 :   psProgressInfo->psPyCallback = NULL;
   13688           7 :   psProgressInfo->psPyCallbackData = NULL;
   13689           7 :   arg5 = psProgressInfo;
   13690           7 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Move", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   13691           7 :   {
   13692             :     /* %typemap(in) (const char *utf8_path) */
   13693           7 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   13694             :     {
   13695           0 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   13696             :     }
   13697             :     else
   13698             :     {
   13699           7 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   13700             :       
   13701             :     }
   13702           7 :     if (arg1 == NULL)
   13703             :     {
   13704           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13705           0 :       SWIG_fail;
   13706             :     }
   13707             :   }
   13708           7 :   {
   13709             :     /* %typemap(in) (const char *utf8_path) */
   13710           7 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   13711             :     {
   13712           0 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   13713             :     }
   13714             :     else
   13715             :     {
   13716           7 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   13717             :       
   13718             :     }
   13719           7 :     if (arg2 == NULL)
   13720             :     {
   13721           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13722           0 :       SWIG_fail;
   13723             :     }
   13724             :   }
   13725           7 :   if (obj2) {
   13726           0 :     {
   13727             :       /* %typemap(in) char **dict */
   13728           0 :       arg3 = NULL;
   13729           0 :       if ( PySequence_Check( obj2 ) ) {
   13730           0 :         int bErr = FALSE;
   13731           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   13732           0 :         if ( bErr )
   13733             :         {
   13734           0 :           SWIG_fail;
   13735             :         }
   13736             :       }
   13737           0 :       else if ( PyMapping_Check( obj2 ) ) {
   13738           0 :         int bErr = FALSE;
   13739           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   13740           0 :         if ( bErr )
   13741             :         {
   13742           0 :           SWIG_fail;
   13743             :         }
   13744             :       }
   13745             :       else {
   13746           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   13747           0 :         SWIG_fail;
   13748             :       }
   13749             :     }
   13750             :   }
   13751           7 :   if (obj3) {
   13752           4 :     {
   13753             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   13754             :       /* callback_func typemap */
   13755             :       
   13756             :       /* In some cases 0 is passed instead of None. */
   13757             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   13758           4 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   13759             :       {
   13760           0 :         if( PyLong_AsLong(obj3) == 0 )
   13761             :         {
   13762           0 :           obj3 = Py_None;
   13763             :         }
   13764             :       }
   13765             :       
   13766           4 :       if (obj3 && obj3 != Py_None ) {
   13767           4 :         void* cbfunction = NULL;
   13768           4 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   13769             :             (void**)&cbfunction,
   13770             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   13771             :             SWIG_POINTER_EXCEPTION | 0 ));
   13772             :         
   13773           4 :         if ( cbfunction == GDALTermProgress ) {
   13774             :           arg4 = GDALTermProgress;
   13775             :         } else {
   13776           4 :           if (!PyCallable_Check(obj3)) {
   13777           0 :             PyErr_SetString( PyExc_RuntimeError,
   13778             :               "Object given is not a Python function" );
   13779           0 :             SWIG_fail;
   13780             :           }
   13781           4 :           psProgressInfo->psPyCallback = obj3;
   13782           4 :           arg4 = PyProgressProxy;
   13783             :         }
   13784             :         
   13785             :       }
   13786             :       
   13787             :     }
   13788             :   }
   13789           7 :   if (obj4) {
   13790           0 :     {
   13791             :       /* %typemap(in) ( void* callback_data=NULL)  */
   13792           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   13793             :     }
   13794             :   }
   13795           7 :   {
   13796           7 :     if (!arg1) {
   13797           7 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13798             :     }
   13799             :   }
   13800           7 :   {
   13801           7 :     if (!arg2) {
   13802           7 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13803             :     }
   13804             :   }
   13805           7 :   {
   13806           7 :     const int bLocalUseExceptions = GetUseExceptions();
   13807           7 :     if ( bLocalUseExceptions ) {
   13808           0 :       pushErrorHandler();
   13809             :     }
   13810           7 :     {
   13811           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13812           7 :       result = wrapper_VSIMove((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
   13813           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13814             :     }
   13815           7 :     if ( bLocalUseExceptions ) {
   13816           0 :       popErrorHandler();
   13817             :     }
   13818             : #ifndef SED_HACKS
   13819             :     if ( bLocalUseExceptions ) {
   13820             :       CPLErr eclass = CPLGetLastErrorType();
   13821             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13822             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13823             :       }
   13824             :     }
   13825             : #endif
   13826             :   }
   13827           7 :   {
   13828             :     /* %typemap(out) VSI_RETVAL */
   13829           8 :     if ( result != 0 && GetUseExceptions()) {
   13830           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13831           0 :       if( pszMessage[0] != '\0' )
   13832           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13833             :       else
   13834           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13835           0 :       SWIG_fail;
   13836             :     }
   13837             :   }
   13838           7 :   {
   13839             :     /* %typemap(freearg) (const char *utf8_path) */
   13840           7 :     GDALPythonFreeCStr(arg1, bToFree1);
   13841             :   }
   13842           7 :   {
   13843             :     /* %typemap(freearg) (const char *utf8_path) */
   13844           7 :     GDALPythonFreeCStr(arg2, bToFree2);
   13845             :   }
   13846           7 :   {
   13847             :     /* %typemap(freearg) char **dict */
   13848           7 :     CSLDestroy( arg3 );
   13849             :   }
   13850           7 :   {
   13851             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   13852             :     
   13853           7 :     CPLFree(psProgressInfo);
   13854             :     
   13855             :   }
   13856           7 :   {
   13857             :     /* %typemap(ret) VSI_RETVAL */
   13858           7 :     resultobj = PyInt_FromLong( result );
   13859             :   }
   13860           7 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13861             :   return resultobj;
   13862           0 : fail:
   13863           0 :   {
   13864             :     /* %typemap(freearg) (const char *utf8_path) */
   13865           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   13866             :   }
   13867           0 :   {
   13868             :     /* %typemap(freearg) (const char *utf8_path) */
   13869           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   13870             :   }
   13871           0 :   {
   13872             :     /* %typemap(freearg) char **dict */
   13873           0 :     CSLDestroy( arg3 );
   13874             :   }
   13875           0 :   {
   13876             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   13877             :     
   13878           0 :     CPLFree(psProgressInfo);
   13879             :     
   13880             :   }
   13881             :   return NULL;
   13882             : }
   13883             : 
   13884             : 
   13885          42 : SWIGINTERN PyObject *_wrap_Sync(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13886          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13887          42 :   char *arg1 = (char *) 0 ;
   13888          42 :   char *arg2 = (char *) 0 ;
   13889          42 :   char **arg3 = (char **) NULL ;
   13890          42 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   13891          42 :   void *arg5 = (void *) NULL ;
   13892          42 :   int bToFree1 = 0 ;
   13893          42 :   int bToFree2 = 0 ;
   13894          42 :   PyObject * obj0 = 0 ;
   13895          42 :   PyObject * obj1 = 0 ;
   13896          42 :   PyObject * obj2 = 0 ;
   13897          42 :   PyObject * obj3 = 0 ;
   13898          42 :   PyObject * obj4 = 0 ;
   13899          42 :   char * kwnames[] = {
   13900             :     (char *)"pszSource",  (char *)"pszTarget",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   13901             :   };
   13902          42 :   bool result;
   13903             :   
   13904             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   13905          42 :   PyProgressData *psProgressInfo;
   13906          42 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   13907          42 :   psProgressInfo->nLastReported = -1;
   13908          42 :   psProgressInfo->psPyCallback = NULL;
   13909          42 :   psProgressInfo->psPyCallbackData = NULL;
   13910          42 :   arg5 = psProgressInfo;
   13911          42 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Sync", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   13912          42 :   {
   13913             :     /* %typemap(in) (const char *utf8_path) */
   13914          42 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   13915             :     {
   13916          30 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   13917             :     }
   13918             :     else
   13919             :     {
   13920          12 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   13921             :       
   13922             :     }
   13923          42 :     if (arg1 == NULL)
   13924             :     {
   13925           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13926           0 :       SWIG_fail;
   13927             :     }
   13928             :   }
   13929          42 :   {
   13930             :     /* %typemap(in) (const char *utf8_path) */
   13931          42 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   13932             :     {
   13933          31 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   13934             :     }
   13935             :     else
   13936             :     {
   13937          11 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   13938             :       
   13939             :     }
   13940          42 :     if (arg2 == NULL)
   13941             :     {
   13942           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13943           0 :       SWIG_fail;
   13944             :     }
   13945             :   }
   13946          42 :   if (obj2) {
   13947          26 :     {
   13948             :       /* %typemap(in) char **dict */
   13949          26 :       arg3 = NULL;
   13950          26 :       if ( PySequence_Check( obj2 ) ) {
   13951          26 :         int bErr = FALSE;
   13952          26 :         arg3 = CSLFromPySequence(obj2, &bErr);
   13953          26 :         if ( bErr )
   13954             :         {
   13955           0 :           SWIG_fail;
   13956             :         }
   13957             :       }
   13958           0 :       else if ( PyMapping_Check( obj2 ) ) {
   13959           0 :         int bErr = FALSE;
   13960           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   13961           0 :         if ( bErr )
   13962             :         {
   13963           0 :           SWIG_fail;
   13964             :         }
   13965             :       }
   13966             :       else {
   13967           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   13968           0 :         SWIG_fail;
   13969             :       }
   13970             :     }
   13971             :   }
   13972          42 :   if (obj3) {
   13973           7 :     {
   13974             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   13975             :       /* callback_func typemap */
   13976             :       
   13977             :       /* In some cases 0 is passed instead of None. */
   13978             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   13979           7 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   13980             :       {
   13981           0 :         if( PyLong_AsLong(obj3) == 0 )
   13982             :         {
   13983           0 :           obj3 = Py_None;
   13984             :         }
   13985             :       }
   13986             :       
   13987           7 :       if (obj3 && obj3 != Py_None ) {
   13988           7 :         void* cbfunction = NULL;
   13989           7 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   13990             :             (void**)&cbfunction,
   13991             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   13992             :             SWIG_POINTER_EXCEPTION | 0 ));
   13993             :         
   13994           7 :         if ( cbfunction == GDALTermProgress ) {
   13995             :           arg4 = GDALTermProgress;
   13996             :         } else {
   13997           7 :           if (!PyCallable_Check(obj3)) {
   13998           0 :             PyErr_SetString( PyExc_RuntimeError,
   13999             :               "Object given is not a Python function" );
   14000           0 :             SWIG_fail;
   14001             :           }
   14002           7 :           psProgressInfo->psPyCallback = obj3;
   14003           7 :           arg4 = PyProgressProxy;
   14004             :         }
   14005             :         
   14006             :       }
   14007             :       
   14008             :     }
   14009             :   }
   14010          42 :   if (obj4) {
   14011           6 :     {
   14012             :       /* %typemap(in) ( void* callback_data=NULL)  */
   14013           6 :       psProgressInfo->psPyCallbackData = obj4 ;
   14014             :     }
   14015             :   }
   14016          42 :   {
   14017          42 :     if (!arg1) {
   14018          42 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14019             :     }
   14020             :   }
   14021          42 :   {
   14022          42 :     if (!arg2) {
   14023          42 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14024             :     }
   14025             :   }
   14026          42 :   {
   14027          42 :     const int bLocalUseExceptions = GetUseExceptions();
   14028          42 :     if ( bLocalUseExceptions ) {
   14029           1 :       pushErrorHandler();
   14030             :     }
   14031          42 :     {
   14032          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14033          42 :       result = (bool)wrapper_VSISync((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
   14034          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14035             :     }
   14036          42 :     if ( bLocalUseExceptions ) {
   14037           1 :       popErrorHandler();
   14038             :     }
   14039             : #ifndef SED_HACKS
   14040             :     if ( bLocalUseExceptions ) {
   14041             :       CPLErr eclass = CPLGetLastErrorType();
   14042             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14043             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14044             :       }
   14045             :     }
   14046             : #endif
   14047             :   }
   14048          42 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14049          42 :   {
   14050             :     /* %typemap(freearg) (const char *utf8_path) */
   14051          42 :     GDALPythonFreeCStr(arg1, bToFree1);
   14052             :   }
   14053          42 :   {
   14054             :     /* %typemap(freearg) (const char *utf8_path) */
   14055          42 :     GDALPythonFreeCStr(arg2, bToFree2);
   14056             :   }
   14057          42 :   {
   14058             :     /* %typemap(freearg) char **dict */
   14059          42 :     CSLDestroy( arg3 );
   14060             :   }
   14061          42 :   {
   14062             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14063             :     
   14064          42 :     CPLFree(psProgressInfo);
   14065             :     
   14066             :   }
   14067          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   14068             :   return resultobj;
   14069           0 : fail:
   14070           0 :   {
   14071             :     /* %typemap(freearg) (const char *utf8_path) */
   14072           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14073             :   }
   14074           0 :   {
   14075             :     /* %typemap(freearg) (const char *utf8_path) */
   14076           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14077             :   }
   14078           0 :   {
   14079             :     /* %typemap(freearg) char **dict */
   14080           0 :     CSLDestroy( arg3 );
   14081             :   }
   14082           0 :   {
   14083             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14084             :     
   14085           0 :     CPLFree(psProgressInfo);
   14086             :     
   14087             :   }
   14088             :   return NULL;
   14089             : }
   14090             : 
   14091             : 
   14092           1 : SWIGINTERN PyObject *_wrap_AbortPendingUploads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14093           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14094           1 :   char *arg1 = (char *) 0 ;
   14095           1 :   int bToFree1 = 0 ;
   14096           1 :   PyObject *swig_obj[1] ;
   14097           1 :   bool result;
   14098             :   
   14099           1 :   if (!args) SWIG_fail;
   14100           1 :   swig_obj[0] = args;
   14101           1 :   {
   14102             :     /* %typemap(in) (const char *utf8_path) */
   14103           1 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14104             :     {
   14105           1 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14106             :     }
   14107             :     else
   14108             :     {
   14109           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14110             :       
   14111             :     }
   14112           1 :     if (arg1 == NULL)
   14113             :     {
   14114           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14115           0 :       SWIG_fail;
   14116             :     }
   14117             :   }
   14118           1 :   {
   14119           1 :     if (!arg1) {
   14120           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14121             :     }
   14122             :   }
   14123           1 :   {
   14124           1 :     const int bLocalUseExceptions = GetUseExceptions();
   14125           1 :     if ( bLocalUseExceptions ) {
   14126           0 :       pushErrorHandler();
   14127             :     }
   14128           1 :     {
   14129           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14130           1 :       result = (bool)VSIAbortPendingUploads((char const *)arg1);
   14131           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14132             :     }
   14133           1 :     if ( bLocalUseExceptions ) {
   14134           0 :       popErrorHandler();
   14135             :     }
   14136             : #ifndef SED_HACKS
   14137             :     if ( bLocalUseExceptions ) {
   14138             :       CPLErr eclass = CPLGetLastErrorType();
   14139             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14140             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14141             :       }
   14142             :     }
   14143             : #endif
   14144             :   }
   14145           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14146           1 :   {
   14147             :     /* %typemap(freearg) (const char *utf8_path) */
   14148           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   14149             :   }
   14150           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   14151             :   return resultobj;
   14152           0 : fail:
   14153           0 :   {
   14154             :     /* %typemap(freearg) (const char *utf8_path) */
   14155           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   14156             :   }
   14157             :   return NULL;
   14158             : }
   14159             : 
   14160             : 
   14161          19 : SWIGINTERN PyObject *_wrap_CopyFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14162          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14163          19 :   char *arg1 = (char *) 0 ;
   14164          19 :   char *arg2 = (char *) 0 ;
   14165          19 :   VSILFILE *arg3 = (VSILFILE *) NULL ;
   14166          19 :   GIntBig arg4 = (GIntBig) -1 ;
   14167          19 :   char **arg5 = (char **) NULL ;
   14168          19 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   14169          19 :   void *arg7 = (void *) NULL ;
   14170          19 :   int bToFree1 = 0 ;
   14171          19 :   int bToFree2 = 0 ;
   14172          19 :   void *argp3 = 0 ;
   14173          19 :   int res3 = 0 ;
   14174          19 :   PyObject * obj0 = 0 ;
   14175          19 :   PyObject * obj1 = 0 ;
   14176          19 :   PyObject * obj2 = 0 ;
   14177          19 :   PyObject * obj3 = 0 ;
   14178          19 :   PyObject * obj4 = 0 ;
   14179          19 :   PyObject * obj5 = 0 ;
   14180          19 :   PyObject * obj6 = 0 ;
   14181          19 :   char * kwnames[] = {
   14182             :     (char *)"pszSource",  (char *)"pszTarget",  (char *)"fpSource",  (char *)"nSourceSize",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   14183             :   };
   14184          19 :   int result;
   14185             :   
   14186             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   14187          19 :   PyProgressData *psProgressInfo;
   14188          19 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   14189          19 :   psProgressInfo->nLastReported = -1;
   14190          19 :   psProgressInfo->psPyCallback = NULL;
   14191          19 :   psProgressInfo->psPyCallbackData = NULL;
   14192          19 :   arg7 = psProgressInfo;
   14193          19 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOOO:CopyFile", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   14194          19 :   {
   14195             :     /* %typemap(in) (const char *utf8_path_or_none) */
   14196          19 :     if( obj0 == Py_None )
   14197             :     {
   14198             :       arg1 = NULL;
   14199             :     }
   14200             :     else
   14201             :     {
   14202          15 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   14203          15 :       if (arg1 == NULL)
   14204             :       {
   14205           0 :         PyErr_SetString( PyExc_RuntimeError, "not a string" );
   14206           0 :         SWIG_fail;
   14207             :       }
   14208             :     }
   14209             :   }
   14210          19 :   {
   14211             :     /* %typemap(in) (const char *utf8_path) */
   14212          19 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   14213             :     {
   14214          18 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   14215             :     }
   14216             :     else
   14217             :     {
   14218           1 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   14219             :       
   14220             :     }
   14221          19 :     if (arg2 == NULL)
   14222             :     {
   14223           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14224           0 :       SWIG_fail;
   14225             :     }
   14226             :   }
   14227          19 :   if (obj2) {
   14228           3 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_VSILFILE, 0 |  0 );
   14229           3 :     if (!SWIG_IsOK(res3)) {
   14230           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CopyFile" "', argument " "3"" of type '" "VSILFILE *""'"); 
   14231             :     }
   14232           3 :     arg3 = reinterpret_cast< VSILFILE * >(argp3);
   14233             :   }
   14234          19 :   if (obj3) {
   14235           0 :     {
   14236           0 :       arg4 = (GIntBig)PyLong_AsLongLong(obj3);
   14237             :     }
   14238             :   }
   14239          19 :   if (obj4) {
   14240           1 :     {
   14241             :       /* %typemap(in) char **dict */
   14242           1 :       arg5 = NULL;
   14243           1 :       if ( PySequence_Check( obj4 ) ) {
   14244           1 :         int bErr = FALSE;
   14245           1 :         arg5 = CSLFromPySequence(obj4, &bErr);
   14246           1 :         if ( bErr )
   14247             :         {
   14248           0 :           SWIG_fail;
   14249             :         }
   14250             :       }
   14251           0 :       else if ( PyMapping_Check( obj4 ) ) {
   14252           0 :         int bErr = FALSE;
   14253           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   14254           0 :         if ( bErr )
   14255             :         {
   14256           0 :           SWIG_fail;
   14257             :         }
   14258             :       }
   14259             :       else {
   14260           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14261           0 :         SWIG_fail;
   14262             :       }
   14263             :     }
   14264             :   }
   14265          19 :   if (obj5) {
   14266           4 :     {
   14267             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   14268             :       /* callback_func typemap */
   14269             :       
   14270             :       /* In some cases 0 is passed instead of None. */
   14271             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   14272           4 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   14273             :       {
   14274           0 :         if( PyLong_AsLong(obj5) == 0 )
   14275             :         {
   14276           0 :           obj5 = Py_None;
   14277             :         }
   14278             :       }
   14279             :       
   14280           4 :       if (obj5 && obj5 != Py_None ) {
   14281           4 :         void* cbfunction = NULL;
   14282           4 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   14283             :             (void**)&cbfunction,
   14284             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   14285             :             SWIG_POINTER_EXCEPTION | 0 ));
   14286             :         
   14287           4 :         if ( cbfunction == GDALTermProgress ) {
   14288             :           arg6 = GDALTermProgress;
   14289             :         } else {
   14290           4 :           if (!PyCallable_Check(obj5)) {
   14291           0 :             PyErr_SetString( PyExc_RuntimeError,
   14292             :               "Object given is not a Python function" );
   14293           0 :             SWIG_fail;
   14294             :           }
   14295           4 :           psProgressInfo->psPyCallback = obj5;
   14296           4 :           arg6 = PyProgressProxy;
   14297             :         }
   14298             :         
   14299             :       }
   14300             :       
   14301             :     }
   14302             :   }
   14303          19 :   if (obj6) {
   14304           4 :     {
   14305             :       /* %typemap(in) ( void* callback_data=NULL)  */
   14306           4 :       psProgressInfo->psPyCallbackData = obj6 ;
   14307             :     }
   14308             :   }
   14309          19 :   {
   14310          19 :     if (!arg2) {
   14311          19 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14312             :     }
   14313             :   }
   14314          19 :   {
   14315          19 :     const int bLocalUseExceptions = GetUseExceptions();
   14316          19 :     if ( bLocalUseExceptions ) {
   14317           7 :       pushErrorHandler();
   14318             :     }
   14319          19 :     {
   14320          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14321          19 :       result = (int)wrapper_VSICopyFile((char const *)arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   14322          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14323             :     }
   14324          19 :     if ( bLocalUseExceptions ) {
   14325           7 :       popErrorHandler();
   14326             :     }
   14327             : #ifndef SED_HACKS
   14328             :     if ( bLocalUseExceptions ) {
   14329             :       CPLErr eclass = CPLGetLastErrorType();
   14330             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14331             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14332             :       }
   14333             :     }
   14334             : #endif
   14335             :   }
   14336          19 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14337          19 :   {
   14338             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14339          19 :     if( arg1 != NULL )
   14340          15 :     GDALPythonFreeCStr(arg1, bToFree1);
   14341             :   }
   14342          19 :   {
   14343             :     /* %typemap(freearg) (const char *utf8_path) */
   14344          19 :     GDALPythonFreeCStr(arg2, bToFree2);
   14345             :   }
   14346          19 :   {
   14347             :     /* %typemap(freearg) char **dict */
   14348          19 :     CSLDestroy( arg5 );
   14349             :   }
   14350          19 :   {
   14351             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14352             :     
   14353          19 :     CPLFree(psProgressInfo);
   14354             :     
   14355             :   }
   14356          19 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   14357             :   return resultobj;
   14358           0 : fail:
   14359           0 :   {
   14360             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14361           0 :     if( arg1 != NULL )
   14362           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14363             :   }
   14364           0 :   {
   14365             :     /* %typemap(freearg) (const char *utf8_path) */
   14366           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14367             :   }
   14368           0 :   {
   14369             :     /* %typemap(freearg) char **dict */
   14370           0 :     CSLDestroy( arg5 );
   14371             :   }
   14372           0 :   {
   14373             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14374             :     
   14375           0 :     CPLFree(psProgressInfo);
   14376             :     
   14377             :   }
   14378             :   return NULL;
   14379             : }
   14380             : 
   14381             : 
   14382          20 : SWIGINTERN PyObject *_wrap_CopyFileRestartable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14383          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14384          20 :   char *arg1 = (char *) 0 ;
   14385          20 :   char *arg2 = (char *) 0 ;
   14386          20 :   char *arg3 = (char *) 0 ;
   14387          20 :   int *arg4 = (int *) 0 ;
   14388          20 :   char **arg5 = (char **) 0 ;
   14389          20 :   char **arg6 = (char **) NULL ;
   14390          20 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   14391          20 :   void *arg8 = (void *) NULL ;
   14392          20 :   int bToFree1 = 0 ;
   14393          20 :   int bToFree2 = 0 ;
   14394          20 :   int res3 ;
   14395          20 :   char *buf3 = 0 ;
   14396          20 :   int alloc3 = 0 ;
   14397          20 :   int nRetCode4 = 0 ;
   14398          20 :   char *pszOutputPayload4 = 0 ;
   14399          20 :   PyObject *swig_obj[6] ;
   14400             :   
   14401             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   14402          20 :   PyProgressData *psProgressInfo;
   14403          20 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   14404          20 :   psProgressInfo->nLastReported = -1;
   14405          20 :   psProgressInfo->psPyCallback = NULL;
   14406          20 :   psProgressInfo->psPyCallbackData = NULL;
   14407          20 :   arg8 = psProgressInfo;
   14408          20 :   {
   14409             :     /* %typemap(in) (int* pnRetCode, char** ppszOutputPayload) */
   14410          20 :     arg4 = &nRetCode4;
   14411          20 :     arg5 = &pszOutputPayload4;
   14412             :   }
   14413          20 :   if (!SWIG_Python_UnpackTuple(args, "CopyFileRestartable", 3, 6, swig_obj)) SWIG_fail;
   14414          20 :   {
   14415             :     /* %typemap(in) (const char *utf8_path_or_none) */
   14416          20 :     if( swig_obj[0] == Py_None )
   14417             :     {
   14418             :       arg1 = NULL;
   14419             :     }
   14420             :     else
   14421             :     {
   14422          20 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14423          20 :       if (arg1 == NULL)
   14424             :       {
   14425           0 :         PyErr_SetString( PyExc_RuntimeError, "not a string" );
   14426           0 :         SWIG_fail;
   14427             :       }
   14428             :     }
   14429             :   }
   14430          20 :   {
   14431             :     /* %typemap(in) (const char *utf8_path) */
   14432          20 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   14433             :     {
   14434          20 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   14435             :     }
   14436             :     else
   14437             :     {
   14438           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   14439             :       
   14440             :     }
   14441          20 :     if (arg2 == NULL)
   14442             :     {
   14443           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14444           0 :       SWIG_fail;
   14445             :     }
   14446             :   }
   14447          20 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   14448          20 :   if (!SWIG_IsOK(res3)) {
   14449           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CopyFileRestartable" "', argument " "3"" of type '" "char const *""'");
   14450             :   }
   14451          20 :   arg3 = reinterpret_cast< char * >(buf3);
   14452          20 :   if (swig_obj[3]) {
   14453          18 :     {
   14454             :       /* %typemap(in) char **dict */
   14455          18 :       arg6 = NULL;
   14456          18 :       if ( PySequence_Check( swig_obj[3] ) ) {
   14457          18 :         int bErr = FALSE;
   14458          18 :         arg6 = CSLFromPySequence(swig_obj[3], &bErr);
   14459          18 :         if ( bErr )
   14460             :         {
   14461           0 :           SWIG_fail;
   14462             :         }
   14463             :       }
   14464           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   14465           0 :         int bErr = FALSE;
   14466           0 :         arg6 = CSLFromPyMapping(swig_obj[3], &bErr);
   14467           0 :         if ( bErr )
   14468             :         {
   14469           0 :           SWIG_fail;
   14470             :         }
   14471             :       }
   14472             :       else {
   14473           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14474           0 :         SWIG_fail;
   14475             :       }
   14476             :     }
   14477             :   }
   14478          20 :   if (swig_obj[4]) {
   14479           2 :     {
   14480             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   14481             :       /* callback_func typemap */
   14482             :       
   14483             :       /* In some cases 0 is passed instead of None. */
   14484             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   14485           2 :       if ( PyLong_Check(swig_obj[4]) || PyInt_Check(swig_obj[4]) )
   14486             :       {
   14487           0 :         if( PyLong_AsLong(swig_obj[4]) == 0 )
   14488             :         {
   14489           0 :           swig_obj[4] = Py_None;
   14490             :         }
   14491             :       }
   14492             :       
   14493           2 :       if (swig_obj[4] && swig_obj[4] != Py_None ) {
   14494           2 :         void* cbfunction = NULL;
   14495           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[4],
   14496             :             (void**)&cbfunction,
   14497             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   14498             :             SWIG_POINTER_EXCEPTION | 0 ));
   14499             :         
   14500           2 :         if ( cbfunction == GDALTermProgress ) {
   14501             :           arg7 = GDALTermProgress;
   14502             :         } else {
   14503           2 :           if (!PyCallable_Check(swig_obj[4])) {
   14504           0 :             PyErr_SetString( PyExc_RuntimeError,
   14505             :               "Object given is not a Python function" );
   14506           0 :             SWIG_fail;
   14507             :           }
   14508           2 :           psProgressInfo->psPyCallback = swig_obj[4];
   14509           2 :           arg7 = PyProgressProxy;
   14510             :         }
   14511             :         
   14512             :       }
   14513             :       
   14514             :     }
   14515             :   }
   14516          20 :   if (swig_obj[5]) {
   14517           0 :     {
   14518             :       /* %typemap(in) ( void* callback_data=NULL)  */
   14519           0 :       psProgressInfo->psPyCallbackData = swig_obj[5] ;
   14520             :     }
   14521             :   }
   14522          20 :   {
   14523          20 :     if (!arg2) {
   14524          20 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14525             :     }
   14526             :   }
   14527          20 :   {
   14528          20 :     const int bLocalUseExceptions = GetUseExceptions();
   14529          20 :     if ( bLocalUseExceptions ) {
   14530           0 :       pushErrorHandler();
   14531             :     }
   14532          20 :     {
   14533          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14534          20 :       CopyFileRestartable((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7,arg8);
   14535          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14536             :     }
   14537          20 :     if ( bLocalUseExceptions ) {
   14538           0 :       popErrorHandler();
   14539             :     }
   14540             : #ifndef SED_HACKS
   14541             :     if ( bLocalUseExceptions ) {
   14542             :       CPLErr eclass = CPLGetLastErrorType();
   14543             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14544             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14545             :       }
   14546             :     }
   14547             : #endif
   14548             :   }
   14549          20 :   resultobj = SWIG_Py_Void();
   14550          20 :   {
   14551             :     /* %typemap(argout) (int* pnRetCode, char** ppszOutputPayload)  */
   14552          20 :     PyObject *r = PyTuple_New( 2 );
   14553          20 :     PyTuple_SetItem( r, 0, PyLong_FromLong(*arg4) );
   14554          20 :     if( *arg5 )
   14555             :     {
   14556           2 :       PyTuple_SetItem( r, 1, GDALPythonObjectFromCStr(*arg5) );
   14557           2 :       VSIFree(*arg5);
   14558             :     }
   14559             :     else
   14560             :     {
   14561          18 :       Py_INCREF(Py_None);
   14562          18 :       PyTuple_SetItem( r, 1, Py_None );
   14563             :     }
   14564             : #if SWIG_VERSION >= 0x040300
   14565             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   14566             : #else
   14567          20 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   14568             : #endif
   14569             :   }
   14570          20 :   {
   14571             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14572          20 :     if( arg1 != NULL )
   14573          20 :     GDALPythonFreeCStr(arg1, bToFree1);
   14574             :   }
   14575          20 :   {
   14576             :     /* %typemap(freearg) (const char *utf8_path) */
   14577          20 :     GDALPythonFreeCStr(arg2, bToFree2);
   14578             :   }
   14579          20 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   14580          20 :   {
   14581             :     /* %typemap(freearg) char **dict */
   14582          20 :     CSLDestroy( arg6 );
   14583             :   }
   14584          20 :   {
   14585             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14586             :     
   14587          20 :     CPLFree(psProgressInfo);
   14588             :     
   14589             :   }
   14590          20 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   14591             :   return resultobj;
   14592           0 : fail:
   14593           0 :   {
   14594             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14595           0 :     if( arg1 != NULL )
   14596           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14597             :   }
   14598           0 :   {
   14599             :     /* %typemap(freearg) (const char *utf8_path) */
   14600           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14601             :   }
   14602           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   14603           0 :   {
   14604             :     /* %typemap(freearg) char **dict */
   14605           0 :     CSLDestroy( arg6 );
   14606             :   }
   14607           0 :   {
   14608             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14609             :     
   14610           0 :     CPLFree(psProgressInfo);
   14611             :     
   14612             :   }
   14613             :   return NULL;
   14614             : }
   14615             : 
   14616             : 
   14617           0 : SWIGINTERN PyObject *_wrap_MoveFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14618           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14619           0 :   char *arg1 = (char *) 0 ;
   14620           0 :   char *arg2 = (char *) 0 ;
   14621           0 :   int bToFree1 = 0 ;
   14622           0 :   int bToFree2 = 0 ;
   14623           0 :   PyObject *swig_obj[2] ;
   14624           0 :   int result;
   14625             :   
   14626           0 :   if (!SWIG_Python_UnpackTuple(args, "MoveFile", 2, 2, swig_obj)) SWIG_fail;
   14627           0 :   {
   14628             :     /* %typemap(in) (const char *utf8_path_or_none) */
   14629           0 :     if( swig_obj[0] == Py_None )
   14630             :     {
   14631             :       arg1 = NULL;
   14632             :     }
   14633             :     else
   14634             :     {
   14635           0 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14636           0 :       if (arg1 == NULL)
   14637             :       {
   14638           0 :         PyErr_SetString( PyExc_RuntimeError, "not a string" );
   14639           0 :         SWIG_fail;
   14640             :       }
   14641             :     }
   14642             :   }
   14643           0 :   {
   14644             :     /* %typemap(in) (const char *utf8_path) */
   14645           0 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   14646             :     {
   14647           0 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   14648             :     }
   14649             :     else
   14650             :     {
   14651           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   14652             :       
   14653             :     }
   14654           0 :     if (arg2 == NULL)
   14655             :     {
   14656           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14657           0 :       SWIG_fail;
   14658             :     }
   14659             :   }
   14660           0 :   {
   14661           0 :     if (!arg2) {
   14662           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14663             :     }
   14664             :   }
   14665           0 :   {
   14666           0 :     const int bLocalUseExceptions = GetUseExceptions();
   14667           0 :     if ( bLocalUseExceptions ) {
   14668           0 :       pushErrorHandler();
   14669             :     }
   14670           0 :     {
   14671           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14672           0 :       result = (int)wrapper_MoveFile((char const *)arg1,(char const *)arg2);
   14673           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14674             :     }
   14675           0 :     if ( bLocalUseExceptions ) {
   14676           0 :       popErrorHandler();
   14677             :     }
   14678             : #ifndef SED_HACKS
   14679             :     if ( bLocalUseExceptions ) {
   14680             :       CPLErr eclass = CPLGetLastErrorType();
   14681             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14682             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14683             :       }
   14684             :     }
   14685             : #endif
   14686             :   }
   14687           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14688           0 :   {
   14689             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14690           0 :     if( arg1 != NULL )
   14691           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14692             :   }
   14693           0 :   {
   14694             :     /* %typemap(freearg) (const char *utf8_path) */
   14695           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14696             :   }
   14697           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   14698             :   return resultobj;
   14699           0 : fail:
   14700           0 :   {
   14701             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14702           0 :     if( arg1 != NULL )
   14703           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14704             :   }
   14705           0 :   {
   14706             :     /* %typemap(freearg) (const char *utf8_path) */
   14707           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14708             :   }
   14709             :   return NULL;
   14710             : }
   14711             : 
   14712             : 
   14713           9 : SWIGINTERN PyObject *_wrap_GetActualURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14714           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14715           9 :   char *arg1 = (char *) 0 ;
   14716           9 :   int bToFree1 = 0 ;
   14717           9 :   PyObject *swig_obj[1] ;
   14718           9 :   char *result = 0 ;
   14719             :   
   14720           9 :   if (!args) SWIG_fail;
   14721           9 :   swig_obj[0] = args;
   14722           9 :   {
   14723             :     /* %typemap(in) (const char *utf8_path) */
   14724           9 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14725             :     {
   14726           9 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14727             :     }
   14728             :     else
   14729             :     {
   14730           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14731             :       
   14732             :     }
   14733           9 :     if (arg1 == NULL)
   14734             :     {
   14735           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14736           0 :       SWIG_fail;
   14737             :     }
   14738             :   }
   14739           9 :   {
   14740           9 :     if (!arg1) {
   14741           9 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14742             :     }
   14743             :   }
   14744           9 :   {
   14745           9 :     const int bLocalUseExceptions = GetUseExceptions();
   14746           9 :     if ( bLocalUseExceptions ) {
   14747           2 :       pushErrorHandler();
   14748             :     }
   14749           9 :     {
   14750           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14751           9 :       result = (char *)VSIGetActualURL((char const *)arg1);
   14752           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14753             :     }
   14754           9 :     if ( bLocalUseExceptions ) {
   14755           2 :       popErrorHandler();
   14756             :     }
   14757             : #ifndef SED_HACKS
   14758             :     if ( bLocalUseExceptions ) {
   14759             :       CPLErr eclass = CPLGetLastErrorType();
   14760             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14761             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14762             :       }
   14763             :     }
   14764             : #endif
   14765             :   }
   14766           9 :   resultobj = SWIG_FromCharPtr((const char *)result);
   14767           9 :   {
   14768             :     /* %typemap(freearg) (const char *utf8_path) */
   14769           9 :     GDALPythonFreeCStr(arg1, bToFree1);
   14770             :   }
   14771           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   14772             :   return resultobj;
   14773           0 : fail:
   14774           0 :   {
   14775             :     /* %typemap(freearg) (const char *utf8_path) */
   14776           9 :     GDALPythonFreeCStr(arg1, bToFree1);
   14777             :   }
   14778             :   return NULL;
   14779             : }
   14780             : 
   14781             : 
   14782          23 : SWIGINTERN PyObject *_wrap_GetSignedURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14783          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14784          23 :   char *arg1 = (char *) 0 ;
   14785          23 :   char **arg2 = (char **) NULL ;
   14786          23 :   int bToFree1 = 0 ;
   14787          23 :   PyObject *swig_obj[2] ;
   14788          23 :   retStringAndCPLFree *result = 0 ;
   14789             :   
   14790          23 :   if (!SWIG_Python_UnpackTuple(args, "GetSignedURL", 1, 2, swig_obj)) SWIG_fail;
   14791          23 :   {
   14792             :     /* %typemap(in) (const char *utf8_path) */
   14793          23 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14794             :     {
   14795          23 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14796             :     }
   14797             :     else
   14798             :     {
   14799           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14800             :       
   14801             :     }
   14802          23 :     if (arg1 == NULL)
   14803             :     {
   14804           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14805           0 :       SWIG_fail;
   14806             :     }
   14807             :   }
   14808          23 :   if (swig_obj[1]) {
   14809           7 :     {
   14810             :       /* %typemap(in) char **dict */
   14811           7 :       arg2 = NULL;
   14812           7 :       if ( PySequence_Check( swig_obj[1] ) ) {
   14813           7 :         int bErr = FALSE;
   14814           7 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   14815           7 :         if ( bErr )
   14816             :         {
   14817           0 :           SWIG_fail;
   14818             :         }
   14819             :       }
   14820           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   14821           0 :         int bErr = FALSE;
   14822           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   14823           0 :         if ( bErr )
   14824             :         {
   14825           0 :           SWIG_fail;
   14826             :         }
   14827             :       }
   14828             :       else {
   14829           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14830           0 :         SWIG_fail;
   14831             :       }
   14832             :     }
   14833             :   }
   14834          23 :   {
   14835          23 :     if (!arg1) {
   14836          23 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14837             :     }
   14838             :   }
   14839          23 :   {
   14840          23 :     const int bLocalUseExceptions = GetUseExceptions();
   14841          23 :     if ( bLocalUseExceptions ) {
   14842           4 :       pushErrorHandler();
   14843             :     }
   14844          23 :     {
   14845          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14846          23 :       result = (retStringAndCPLFree *)wrapper_VSIGetSignedURL((char const *)arg1,arg2);
   14847          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14848             :     }
   14849          23 :     if ( bLocalUseExceptions ) {
   14850           4 :       popErrorHandler();
   14851             :     }
   14852             : #ifndef SED_HACKS
   14853             :     if ( bLocalUseExceptions ) {
   14854             :       CPLErr eclass = CPLGetLastErrorType();
   14855             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14856             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14857             :       }
   14858             :     }
   14859             : #endif
   14860             :   }
   14861          23 :   {
   14862             :     /* %typemap(out) (retStringAndCPLFree*) */
   14863          23 :     Py_XDECREF(resultobj);
   14864          23 :     if(result)
   14865             :     {
   14866          14 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   14867          14 :       CPLFree(result);
   14868             :     }
   14869             :     else
   14870             :     {
   14871           9 :       resultobj = Py_None;
   14872           9 :       Py_INCREF(resultobj);
   14873             :     }
   14874             :   }
   14875          23 :   {
   14876             :     /* %typemap(freearg) (const char *utf8_path) */
   14877          23 :     GDALPythonFreeCStr(arg1, bToFree1);
   14878             :   }
   14879          23 :   {
   14880             :     /* %typemap(freearg) char **dict */
   14881          23 :     CSLDestroy( arg2 );
   14882             :   }
   14883          23 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   14884             :   return resultobj;
   14885           0 : fail:
   14886           0 :   {
   14887             :     /* %typemap(freearg) (const char *utf8_path) */
   14888           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14889             :   }
   14890           0 :   {
   14891             :     /* %typemap(freearg) char **dict */
   14892           0 :     CSLDestroy( arg2 );
   14893             :   }
   14894             :   return NULL;
   14895             : }
   14896             : 
   14897             : 
   14898           2 : SWIGINTERN PyObject *_wrap_GetFileSystemsPrefixes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14899           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14900           2 :   char **result = 0 ;
   14901             :   
   14902           2 :   if (!SWIG_Python_UnpackTuple(args, "GetFileSystemsPrefixes", 0, 0, 0)) SWIG_fail;
   14903           2 :   {
   14904           2 :     const int bLocalUseExceptions = GetUseExceptions();
   14905           2 :     if ( bLocalUseExceptions ) {
   14906           0 :       pushErrorHandler();
   14907             :     }
   14908           2 :     {
   14909           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14910           2 :       result = (char **)VSIGetFileSystemsPrefixes();
   14911           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14912             :     }
   14913           2 :     if ( bLocalUseExceptions ) {
   14914           0 :       popErrorHandler();
   14915             :     }
   14916             : #ifndef SED_HACKS
   14917             :     if ( bLocalUseExceptions ) {
   14918             :       CPLErr eclass = CPLGetLastErrorType();
   14919             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14920             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14921             :       }
   14922             :     }
   14923             : #endif
   14924             :   }
   14925           2 :   {
   14926             :     /* %typemap(out) char **CSL -> ( string ) */
   14927           2 :     bool bErr = false;
   14928           2 :     resultobj = CSLToList(result, &bErr);
   14929           2 :     CSLDestroy(result);
   14930           2 :     if( bErr ) {
   14931           0 :       SWIG_fail;
   14932             :     }
   14933             :   }
   14934           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   14935             :   return resultobj;
   14936             : fail:
   14937             :   return NULL;
   14938             : }
   14939             : 
   14940             : 
   14941          30 : SWIGINTERN PyObject *_wrap_GetFileSystemOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14942          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14943          30 :   char *arg1 = (char *) 0 ;
   14944          30 :   int bToFree1 = 0 ;
   14945          30 :   PyObject *swig_obj[1] ;
   14946          30 :   char *result = 0 ;
   14947             :   
   14948          30 :   if (!args) SWIG_fail;
   14949          30 :   swig_obj[0] = args;
   14950          30 :   {
   14951             :     /* %typemap(in) (const char *utf8_path) */
   14952          30 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14953             :     {
   14954          30 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14955             :     }
   14956             :     else
   14957             :     {
   14958           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14959             :       
   14960             :     }
   14961          30 :     if (arg1 == NULL)
   14962             :     {
   14963           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14964           0 :       SWIG_fail;
   14965             :     }
   14966             :   }
   14967          30 :   {
   14968          30 :     if (!arg1) {
   14969          30 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14970             :     }
   14971             :   }
   14972          30 :   {
   14973          30 :     const int bLocalUseExceptions = GetUseExceptions();
   14974          30 :     if ( bLocalUseExceptions ) {
   14975           0 :       pushErrorHandler();
   14976             :     }
   14977          30 :     {
   14978          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14979          30 :       result = (char *)VSIGetFileSystemOptions((char const *)arg1);
   14980          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14981             :     }
   14982          30 :     if ( bLocalUseExceptions ) {
   14983           0 :       popErrorHandler();
   14984             :     }
   14985             : #ifndef SED_HACKS
   14986             :     if ( bLocalUseExceptions ) {
   14987             :       CPLErr eclass = CPLGetLastErrorType();
   14988             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14989             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14990             :       }
   14991             :     }
   14992             : #endif
   14993             :   }
   14994          30 :   resultobj = SWIG_FromCharPtr((const char *)result);
   14995          30 :   {
   14996             :     /* %typemap(freearg) (const char *utf8_path) */
   14997          30 :     GDALPythonFreeCStr(arg1, bToFree1);
   14998             :   }
   14999          30 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15000             :   return resultobj;
   15001           0 : fail:
   15002           0 :   {
   15003             :     /* %typemap(freearg) (const char *utf8_path) */
   15004          30 :     GDALPythonFreeCStr(arg1, bToFree1);
   15005             :   }
   15006             :   return NULL;
   15007             : }
   15008             : 
   15009             : 
   15010         276 : SWIGINTERN PyObject *VSILFILE_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15011         276 :   PyObject *obj;
   15012         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   15013         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_VSILFILE, SWIG_NewClientData(obj));
   15014         276 :   return SWIG_Py_Void();
   15015             : }
   15016             : 
   15017         645 : SWIGINTERN PyObject *_wrap_StatBuf_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15018         645 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15019         645 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15020         645 :   void *argp1 = 0 ;
   15021         645 :   int res1 = 0 ;
   15022         645 :   PyObject *swig_obj[1] ;
   15023         645 :   int result;
   15024             :   
   15025         645 :   if (!args) SWIG_fail;
   15026         645 :   swig_obj[0] = args;
   15027         645 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15028         645 :   if (!SWIG_IsOK(res1)) {
   15029           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mode_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   15030             :   }
   15031         645 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15032         645 :   {
   15033         645 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15034         645 :     result = (int) ((arg1)->mode);
   15035         645 :     SWIG_PYTHON_THREAD_END_ALLOW;
   15036             :   }
   15037         645 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15038         645 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15039             :   return resultobj;
   15040             : fail:
   15041             :   return NULL;
   15042             : }
   15043             : 
   15044             : 
   15045        1541 : SWIGINTERN PyObject *_wrap_StatBuf_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15046        1541 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15047        1541 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15048        1541 :   void *argp1 = 0 ;
   15049        1541 :   int res1 = 0 ;
   15050        1541 :   PyObject *swig_obj[1] ;
   15051        1541 :   GIntBig result;
   15052             :   
   15053        1541 :   if (!args) SWIG_fail;
   15054        1541 :   swig_obj[0] = args;
   15055        1541 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15056        1541 :   if (!SWIG_IsOK(res1)) {
   15057           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_size_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   15058             :   }
   15059        1541 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15060        1541 :   {
   15061        1541 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15062        1541 :     result =  ((arg1)->size);
   15063        1541 :     SWIG_PYTHON_THREAD_END_ALLOW;
   15064             :   }
   15065        1541 :   {
   15066        1541 :     resultobj = PyLong_FromLongLong(result);
   15067             :   }
   15068        1541 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15069             :   return resultobj;
   15070             : fail:
   15071             :   return NULL;
   15072             : }
   15073             : 
   15074             : 
   15075         124 : SWIGINTERN PyObject *_wrap_StatBuf_mtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15076         124 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15077         124 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15078         124 :   void *argp1 = 0 ;
   15079         124 :   int res1 = 0 ;
   15080         124 :   PyObject *swig_obj[1] ;
   15081         124 :   GIntBig result;
   15082             :   
   15083         124 :   if (!args) SWIG_fail;
   15084         124 :   swig_obj[0] = args;
   15085         124 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15086         124 :   if (!SWIG_IsOK(res1)) {
   15087           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mtime_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   15088             :   }
   15089         124 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15090         124 :   {
   15091         124 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15092         124 :     result =  ((arg1)->mtime);
   15093         124 :     SWIG_PYTHON_THREAD_END_ALLOW;
   15094             :   }
   15095         124 :   {
   15096         124 :     resultobj = PyLong_FromLongLong(result);
   15097             :   }
   15098         124 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15099             :   return resultobj;
   15100             : fail:
   15101             :   return NULL;
   15102             : }
   15103             : 
   15104             : 
   15105           0 : SWIGINTERN PyObject *_wrap_new_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15106           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15107           0 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15108           0 :   void *argp1 = 0 ;
   15109           0 :   int res1 = 0 ;
   15110           0 :   PyObject *swig_obj[1] ;
   15111           0 :   StatBuf *result = 0 ;
   15112             :   
   15113           0 :   if (!args) SWIG_fail;
   15114           0 :   swig_obj[0] = args;
   15115           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15116           0 :   if (!SWIG_IsOK(res1)) {
   15117           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
   15118             :   }
   15119           0 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15120           0 :   {
   15121           0 :     const int bLocalUseExceptions = GetUseExceptions();
   15122           0 :     if ( bLocalUseExceptions ) {
   15123           0 :       pushErrorHandler();
   15124             :     }
   15125           0 :     {
   15126           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15127           0 :       result = (StatBuf *)new_StatBuf(arg1);
   15128           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15129             :     }
   15130           0 :     if ( bLocalUseExceptions ) {
   15131           0 :       popErrorHandler();
   15132             :     }
   15133             : #ifndef SED_HACKS
   15134             :     if ( bLocalUseExceptions ) {
   15135             :       CPLErr eclass = CPLGetLastErrorType();
   15136             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15137             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15138             :       }
   15139             :     }
   15140             : #endif
   15141             :   }
   15142           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StatBuf, SWIG_POINTER_NEW |  0 );
   15143           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15144             :   return resultobj;
   15145             : fail:
   15146             :   return NULL;
   15147             : }
   15148             : 
   15149             : 
   15150        4763 : SWIGINTERN PyObject *_wrap_delete_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15151        4763 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15152        4763 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15153        4763 :   void *argp1 = 0 ;
   15154        4763 :   int res1 = 0 ;
   15155        4763 :   PyObject *swig_obj[1] ;
   15156             :   
   15157        4763 :   if (!args) SWIG_fail;
   15158        4763 :   swig_obj[0] = args;
   15159        4763 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, SWIG_POINTER_DISOWN |  0 );
   15160        4763 :   if (!SWIG_IsOK(res1)) {
   15161           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
   15162             :   }
   15163        4763 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15164        4763 :   {
   15165        4763 :     const int bLocalUseExceptions = GetUseExceptions();
   15166        4763 :     if ( bLocalUseExceptions ) {
   15167        3230 :       pushErrorHandler();
   15168             :     }
   15169        4763 :     {
   15170        4763 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15171        4763 :       delete_StatBuf(arg1);
   15172        4763 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15173             :     }
   15174        4763 :     if ( bLocalUseExceptions ) {
   15175        3230 :       popErrorHandler();
   15176             :     }
   15177             : #ifndef SED_HACKS
   15178             :     if ( bLocalUseExceptions ) {
   15179             :       CPLErr eclass = CPLGetLastErrorType();
   15180             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15181             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15182             :       }
   15183             :     }
   15184             : #endif
   15185             :   }
   15186        4763 :   resultobj = SWIG_Py_Void();
   15187        4763 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15188             :   return resultobj;
   15189             : fail:
   15190             :   return NULL;
   15191             : }
   15192             : 
   15193             : 
   15194        2472 : SWIGINTERN PyObject *_wrap_StatBuf_IsDirectory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15195        2472 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15196        2472 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15197        2472 :   void *argp1 = 0 ;
   15198        2472 :   int res1 = 0 ;
   15199        2472 :   PyObject *swig_obj[1] ;
   15200        2472 :   int result;
   15201             :   
   15202        2472 :   if (!args) SWIG_fail;
   15203        2472 :   swig_obj[0] = args;
   15204        2472 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15205        2472 :   if (!SWIG_IsOK(res1)) {
   15206           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_IsDirectory" "', argument " "1"" of type '" "StatBuf *""'"); 
   15207             :   }
   15208        2472 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15209        2472 :   {
   15210        2472 :     const int bLocalUseExceptions = GetUseExceptions();
   15211        2472 :     if ( bLocalUseExceptions ) {
   15212        2467 :       pushErrorHandler();
   15213             :     }
   15214        2472 :     {
   15215        2472 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15216        2472 :       result = (int)StatBuf_IsDirectory(arg1);
   15217        2472 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15218             :     }
   15219        2472 :     if ( bLocalUseExceptions ) {
   15220        2467 :       popErrorHandler();
   15221             :     }
   15222             : #ifndef SED_HACKS
   15223             :     if ( bLocalUseExceptions ) {
   15224             :       CPLErr eclass = CPLGetLastErrorType();
   15225             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15226             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15227             :       }
   15228             :     }
   15229             : #endif
   15230             :   }
   15231        2472 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15232        2472 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15233             :   return resultobj;
   15234             : fail:
   15235             :   return NULL;
   15236             : }
   15237             : 
   15238             : 
   15239         276 : SWIGINTERN PyObject *StatBuf_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15240         276 :   PyObject *obj;
   15241         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   15242         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_StatBuf, SWIG_NewClientData(obj));
   15243         276 :   return SWIG_Py_Void();
   15244             : }
   15245             : 
   15246           0 : SWIGINTERN PyObject *StatBuf_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15247           0 :   return SWIG_Python_InitShadowInstance(args);
   15248             : }
   15249             : 
   15250        6127 : SWIGINTERN PyObject *_wrap_VSIStatL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15251        6127 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15252        6127 :   char *arg1 = (char *) 0 ;
   15253        6127 :   StatBuf *arg2 = (StatBuf *) 0 ;
   15254        6127 :   int arg3 = (int) 0 ;
   15255        6127 :   int bToFree1 = 0 ;
   15256        6127 :   StatBuf sStatBuf2 ;
   15257        6127 :   int val3 ;
   15258        6127 :   int ecode3 = 0 ;
   15259        6127 :   PyObject *swig_obj[2] ;
   15260        6127 :   int result;
   15261             :   
   15262        6127 :   {
   15263             :     /* %typemap(in,numinputs=0) (StatBuf *psStatBufOut) (StatBuf sStatBuf2 ) */
   15264        6127 :     arg2 = &sStatBuf2;
   15265             :   }
   15266        6127 :   if (!SWIG_Python_UnpackTuple(args, "VSIStatL", 1, 2, swig_obj)) SWIG_fail;
   15267        6127 :   {
   15268             :     /* %typemap(in) (const char *utf8_path) */
   15269        6127 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15270             :     {
   15271        5375 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15272             :     }
   15273             :     else
   15274             :     {
   15275         752 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15276             :       
   15277             :     }
   15278        6127 :     if (arg1 == NULL)
   15279             :     {
   15280           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15281           0 :       SWIG_fail;
   15282             :     }
   15283             :   }
   15284        6127 :   if (swig_obj[1]) {
   15285        2499 :     ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   15286        2499 :     if (!SWIG_IsOK(ecode3)) {
   15287           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIStatL" "', argument " "3"" of type '" "int""'");
   15288             :     } 
   15289             :     arg3 = static_cast< int >(val3);
   15290             :   }
   15291        6127 :   {
   15292        6127 :     if (!arg1) {
   15293        6127 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15294             :     }
   15295             :   }
   15296        6127 :   {
   15297        6127 :     const int bLocalUseExceptions = GetUseExceptions();
   15298        6127 :     if ( bLocalUseExceptions ) {
   15299        3613 :       pushErrorHandler();
   15300             :     }
   15301        6127 :     {
   15302        6127 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15303        6127 :       result = (int)wrapper_VSIStatL((char const *)arg1,arg2,arg3);
   15304        6127 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15305             :     }
   15306        6127 :     if ( bLocalUseExceptions ) {
   15307        3613 :       popErrorHandler();
   15308             :     }
   15309             : #ifndef SED_HACKS
   15310             :     if ( bLocalUseExceptions ) {
   15311             :       CPLErr eclass = CPLGetLastErrorType();
   15312             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15313             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15314             :       }
   15315             :     }
   15316             : #endif
   15317             :   }
   15318        6127 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15319        6127 :   {
   15320             :     /* %typemap(argout) (StatBuf *psStatBufOut)*/
   15321        6127 :     Py_DECREF(resultobj);
   15322        6127 :     if (result == 0)
   15323        4763 :     resultobj = SWIG_NewPointerObj((void*)new_StatBuf( arg2 ),SWIGTYPE_p_StatBuf,1);
   15324             :     else
   15325             :     {
   15326        1364 :       resultobj = Py_None;
   15327        1364 :       Py_INCREF(resultobj);
   15328             :     }
   15329             :   }
   15330        6127 :   {
   15331             :     /* %typemap(freearg) (const char *utf8_path) */
   15332        6127 :     GDALPythonFreeCStr(arg1, bToFree1);
   15333             :   }
   15334        6359 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15335             :   return resultobj;
   15336           0 : fail:
   15337           0 :   {
   15338             :     /* %typemap(freearg) (const char *utf8_path) */
   15339        6127 :     GDALPythonFreeCStr(arg1, bToFree1);
   15340             :   }
   15341             :   return NULL;
   15342             : }
   15343             : 
   15344             : 
   15345          34 : SWIGINTERN PyObject *_wrap_GetFileMetadata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15346          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15347          34 :   char *arg1 = (char *) 0 ;
   15348          34 :   char *arg2 = (char *) 0 ;
   15349          34 :   char **arg3 = (char **) NULL ;
   15350          34 :   int bToFree1 = 0 ;
   15351          34 :   int res2 ;
   15352          34 :   char *buf2 = 0 ;
   15353          34 :   int alloc2 = 0 ;
   15354          34 :   PyObject *swig_obj[3] ;
   15355          34 :   char **result = 0 ;
   15356             :   
   15357          34 :   if (!SWIG_Python_UnpackTuple(args, "GetFileMetadata", 2, 3, swig_obj)) SWIG_fail;
   15358          34 :   {
   15359             :     /* %typemap(in) (const char *utf8_path) */
   15360          34 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15361             :     {
   15362          34 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15363             :     }
   15364             :     else
   15365             :     {
   15366           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15367             :       
   15368             :     }
   15369          34 :     if (arg1 == NULL)
   15370             :     {
   15371           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15372           0 :       SWIG_fail;
   15373             :     }
   15374             :   }
   15375          34 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15376          34 :   if (!SWIG_IsOK(res2)) {
   15377           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetFileMetadata" "', argument " "2"" of type '" "char const *""'");
   15378             :   }
   15379          34 :   arg2 = reinterpret_cast< char * >(buf2);
   15380          34 :   if (swig_obj[2]) {
   15381           0 :     {
   15382             :       /* %typemap(in) char **dict */
   15383           0 :       arg3 = NULL;
   15384           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   15385           0 :         int bErr = FALSE;
   15386           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   15387           0 :         if ( bErr )
   15388             :         {
   15389           0 :           SWIG_fail;
   15390             :         }
   15391             :       }
   15392           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   15393           0 :         int bErr = FALSE;
   15394           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   15395           0 :         if ( bErr )
   15396             :         {
   15397           0 :           SWIG_fail;
   15398             :         }
   15399             :       }
   15400             :       else {
   15401           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15402           0 :         SWIG_fail;
   15403             :       }
   15404             :     }
   15405             :   }
   15406          34 :   {
   15407          34 :     if (!arg1) {
   15408          34 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15409             :     }
   15410             :   }
   15411          34 :   {
   15412          34 :     const int bLocalUseExceptions = GetUseExceptions();
   15413          34 :     if ( bLocalUseExceptions ) {
   15414          16 :       pushErrorHandler();
   15415             :     }
   15416          34 :     {
   15417          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15418          34 :       result = (char **)VSIGetFileMetadata((char const *)arg1,(char const *)arg2,arg3);
   15419          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15420             :     }
   15421          34 :     if ( bLocalUseExceptions ) {
   15422          16 :       popErrorHandler();
   15423             :     }
   15424             : #ifndef SED_HACKS
   15425             :     if ( bLocalUseExceptions ) {
   15426             :       CPLErr eclass = CPLGetLastErrorType();
   15427             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15428             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15429             :       }
   15430             :     }
   15431             : #endif
   15432             :   }
   15433          34 :   {
   15434             :     /* %typemap(out) char **dict */
   15435          34 :     resultobj = GetCSLStringAsPyDict(result, true);
   15436             :   }
   15437          34 :   {
   15438             :     /* %typemap(freearg) (const char *utf8_path) */
   15439          34 :     GDALPythonFreeCStr(arg1, bToFree1);
   15440             :   }
   15441          34 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15442          34 :   {
   15443             :     /* %typemap(freearg) char **dict */
   15444          34 :     CSLDestroy( arg3 );
   15445             :   }
   15446          34 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15447             :   return resultobj;
   15448           0 : fail:
   15449           0 :   {
   15450             :     /* %typemap(freearg) (const char *utf8_path) */
   15451           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15452             :   }
   15453           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15454           0 :   {
   15455             :     /* %typemap(freearg) char **dict */
   15456           0 :     CSLDestroy( arg3 );
   15457             :   }
   15458             :   return NULL;
   15459             : }
   15460             : 
   15461             : 
   15462          17 : SWIGINTERN PyObject *_wrap_SetFileMetadata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15463          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15464          17 :   char *arg1 = (char *) 0 ;
   15465          17 :   char **arg2 = (char **) 0 ;
   15466          17 :   char *arg3 = (char *) 0 ;
   15467          17 :   char **arg4 = (char **) NULL ;
   15468          17 :   int bToFree1 = 0 ;
   15469          17 :   int res3 ;
   15470          17 :   char *buf3 = 0 ;
   15471          17 :   int alloc3 = 0 ;
   15472          17 :   PyObject *swig_obj[4] ;
   15473          17 :   bool result;
   15474             :   
   15475          17 :   if (!SWIG_Python_UnpackTuple(args, "SetFileMetadata", 3, 4, swig_obj)) SWIG_fail;
   15476          17 :   {
   15477             :     /* %typemap(in) (const char *utf8_path) */
   15478          17 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15479             :     {
   15480          17 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15481             :     }
   15482             :     else
   15483             :     {
   15484           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15485             :       
   15486             :     }
   15487          17 :     if (arg1 == NULL)
   15488             :     {
   15489           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15490           0 :       SWIG_fail;
   15491             :     }
   15492             :   }
   15493          17 :   {
   15494             :     /* %typemap(in) char **dict */
   15495          17 :     arg2 = NULL;
   15496          17 :     if ( PySequence_Check( swig_obj[1] ) ) {
   15497           0 :       int bErr = FALSE;
   15498           0 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   15499           0 :       if ( bErr )
   15500             :       {
   15501           0 :         SWIG_fail;
   15502             :       }
   15503             :     }
   15504          17 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   15505          17 :       int bErr = FALSE;
   15506          17 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   15507          17 :       if ( bErr )
   15508             :       {
   15509           0 :         SWIG_fail;
   15510             :       }
   15511             :     }
   15512             :     else {
   15513           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15514           0 :       SWIG_fail;
   15515             :     }
   15516             :   }
   15517          17 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   15518          17 :   if (!SWIG_IsOK(res3)) {
   15519           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetFileMetadata" "', argument " "3"" of type '" "char const *""'");
   15520             :   }
   15521          17 :   arg3 = reinterpret_cast< char * >(buf3);
   15522          17 :   if (swig_obj[3]) {
   15523           1 :     {
   15524             :       /* %typemap(in) char **dict */
   15525           1 :       arg4 = NULL;
   15526           1 :       if ( PySequence_Check( swig_obj[3] ) ) {
   15527           1 :         int bErr = FALSE;
   15528           1 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   15529           1 :         if ( bErr )
   15530             :         {
   15531           0 :           SWIG_fail;
   15532             :         }
   15533             :       }
   15534           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   15535           0 :         int bErr = FALSE;
   15536           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   15537           0 :         if ( bErr )
   15538             :         {
   15539           0 :           SWIG_fail;
   15540             :         }
   15541             :       }
   15542             :       else {
   15543           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15544           0 :         SWIG_fail;
   15545             :       }
   15546             :     }
   15547             :   }
   15548          17 :   {
   15549          17 :     if (!arg1) {
   15550          17 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15551             :     }
   15552             :   }
   15553          17 :   {
   15554          17 :     const int bLocalUseExceptions = GetUseExceptions();
   15555          17 :     if ( bLocalUseExceptions ) {
   15556           0 :       pushErrorHandler();
   15557             :     }
   15558          17 :     {
   15559          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15560          17 :       result = (bool)VSISetFileMetadata((char const *)arg1,arg2,(char const *)arg3,arg4);
   15561          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15562             :     }
   15563          17 :     if ( bLocalUseExceptions ) {
   15564           0 :       popErrorHandler();
   15565             :     }
   15566             : #ifndef SED_HACKS
   15567             :     if ( bLocalUseExceptions ) {
   15568             :       CPLErr eclass = CPLGetLastErrorType();
   15569             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15570             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15571             :       }
   15572             :     }
   15573             : #endif
   15574             :   }
   15575          17 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   15576          17 :   {
   15577             :     /* %typemap(freearg) (const char *utf8_path) */
   15578          17 :     GDALPythonFreeCStr(arg1, bToFree1);
   15579             :   }
   15580          17 :   {
   15581             :     /* %typemap(freearg) char **dict */
   15582          17 :     CSLDestroy( arg2 );
   15583             :   }
   15584          17 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   15585          17 :   {
   15586             :     /* %typemap(freearg) char **dict */
   15587          17 :     CSLDestroy( arg4 );
   15588             :   }
   15589          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15590             :   return resultobj;
   15591           0 : fail:
   15592           0 :   {
   15593             :     /* %typemap(freearg) (const char *utf8_path) */
   15594           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15595             :   }
   15596           0 :   {
   15597             :     /* %typemap(freearg) char **dict */
   15598           0 :     CSLDestroy( arg2 );
   15599             :   }
   15600           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   15601           0 :   {
   15602             :     /* %typemap(freearg) char **dict */
   15603           0 :     CSLDestroy( arg4 );
   15604             :   }
   15605             :   return NULL;
   15606             : }
   15607             : 
   15608             : 
   15609        4592 : SWIGINTERN PyObject *_wrap_VSIFOpenL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15610        4592 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15611        4592 :   char *arg1 = (char *) 0 ;
   15612        4592 :   char *arg2 = (char *) 0 ;
   15613        4592 :   int bToFree1 = 0 ;
   15614        4592 :   int res2 ;
   15615        4592 :   char *buf2 = 0 ;
   15616        4592 :   int alloc2 = 0 ;
   15617        4592 :   PyObject *swig_obj[2] ;
   15618        4592 :   VSILFILE *result = 0 ;
   15619             :   
   15620        4592 :   if (!SWIG_Python_UnpackTuple(args, "VSIFOpenL", 2, 2, swig_obj)) SWIG_fail;
   15621        4592 :   {
   15622             :     /* %typemap(in) (const char *utf8_path) */
   15623        4592 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15624             :     {
   15625        3950 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15626             :     }
   15627             :     else
   15628             :     {
   15629         642 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15630             :       
   15631             :     }
   15632        4592 :     if (arg1 == NULL)
   15633             :     {
   15634           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15635           0 :       SWIG_fail;
   15636             :     }
   15637             :   }
   15638        4592 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15639        4592 :   if (!SWIG_IsOK(res2)) {
   15640           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenL" "', argument " "2"" of type '" "char const *""'");
   15641             :   }
   15642        4592 :   arg2 = reinterpret_cast< char * >(buf2);
   15643        4592 :   {
   15644        4592 :     if (!arg1) {
   15645        4592 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15646             :     }
   15647             :   }
   15648        4592 :   {
   15649        4592 :     const int bLocalUseExceptions = GetUseExceptions();
   15650        4592 :     if ( bLocalUseExceptions ) {
   15651         898 :       pushErrorHandler();
   15652             :     }
   15653        4592 :     {
   15654        4592 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15655        4592 :       result = (VSILFILE *)wrapper_VSIFOpenL((char const *)arg1,(char const *)arg2);
   15656        4592 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15657             :     }
   15658        4592 :     if ( bLocalUseExceptions ) {
   15659         898 :       popErrorHandler();
   15660             :     }
   15661             : #ifndef SED_HACKS
   15662             :     if ( bLocalUseExceptions ) {
   15663             :       CPLErr eclass = CPLGetLastErrorType();
   15664             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15665             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15666             :       }
   15667             :     }
   15668             : #endif
   15669             :   }
   15670        4592 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSILFILE, 0 |  0 );
   15671        4592 :   {
   15672             :     /* %typemap(freearg) (const char *utf8_path) */
   15673        4592 :     GDALPythonFreeCStr(arg1, bToFree1);
   15674             :   }
   15675        4592 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15676        4648 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15677             :   return resultobj;
   15678           0 : fail:
   15679           0 :   {
   15680             :     /* %typemap(freearg) (const char *utf8_path) */
   15681           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15682             :   }
   15683           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15684             :   return NULL;
   15685             : }
   15686             : 
   15687             : 
   15688         353 : SWIGINTERN PyObject *_wrap_VSIFOpenExL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15689         353 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15690         353 :   char *arg1 = (char *) 0 ;
   15691         353 :   char *arg2 = (char *) 0 ;
   15692         353 :   int arg3 = (int) FALSE ;
   15693         353 :   char **arg4 = (char **) NULL ;
   15694         353 :   int bToFree1 = 0 ;
   15695         353 :   int res2 ;
   15696         353 :   char *buf2 = 0 ;
   15697         353 :   int alloc2 = 0 ;
   15698         353 :   int val3 ;
   15699         353 :   int ecode3 = 0 ;
   15700         353 :   PyObject *swig_obj[4] ;
   15701         353 :   VSILFILE *result = 0 ;
   15702             :   
   15703         353 :   if (!SWIG_Python_UnpackTuple(args, "VSIFOpenExL", 2, 4, swig_obj)) SWIG_fail;
   15704         353 :   {
   15705             :     /* %typemap(in) (const char *utf8_path) */
   15706         353 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15707             :     {
   15708         247 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15709             :     }
   15710             :     else
   15711             :     {
   15712         106 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15713             :       
   15714             :     }
   15715         353 :     if (arg1 == NULL)
   15716             :     {
   15717           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15718           0 :       SWIG_fail;
   15719             :     }
   15720             :   }
   15721         353 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15722         353 :   if (!SWIG_IsOK(res2)) {
   15723           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenExL" "', argument " "2"" of type '" "char const *""'");
   15724             :   }
   15725         353 :   arg2 = reinterpret_cast< char * >(buf2);
   15726         353 :   if (swig_obj[2]) {
   15727         353 :     ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   15728         353 :     if (!SWIG_IsOK(ecode3)) {
   15729           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFOpenExL" "', argument " "3"" of type '" "int""'");
   15730             :     } 
   15731             :     arg3 = static_cast< int >(val3);
   15732             :   }
   15733         353 :   if (swig_obj[3]) {
   15734          21 :     {
   15735             :       /* %typemap(in) char **dict */
   15736          21 :       arg4 = NULL;
   15737          21 :       if ( PySequence_Check( swig_obj[3] ) ) {
   15738          21 :         int bErr = FALSE;
   15739          21 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   15740          21 :         if ( bErr )
   15741             :         {
   15742           0 :           SWIG_fail;
   15743             :         }
   15744             :       }
   15745           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   15746           0 :         int bErr = FALSE;
   15747           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   15748           0 :         if ( bErr )
   15749             :         {
   15750           0 :           SWIG_fail;
   15751             :         }
   15752             :       }
   15753             :       else {
   15754           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15755           0 :         SWIG_fail;
   15756             :       }
   15757             :     }
   15758             :   }
   15759         353 :   {
   15760         353 :     if (!arg1) {
   15761         353 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15762             :     }
   15763             :   }
   15764         353 :   {
   15765         353 :     const int bLocalUseExceptions = GetUseExceptions();
   15766         353 :     if ( bLocalUseExceptions ) {
   15767         170 :       pushErrorHandler();
   15768             :     }
   15769         353 :     {
   15770         353 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15771         353 :       result = (VSILFILE *)wrapper_VSIFOpenExL((char const *)arg1,(char const *)arg2,arg3,arg4);
   15772         353 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15773             :     }
   15774         353 :     if ( bLocalUseExceptions ) {
   15775         170 :       popErrorHandler();
   15776             :     }
   15777             : #ifndef SED_HACKS
   15778             :     if ( bLocalUseExceptions ) {
   15779             :       CPLErr eclass = CPLGetLastErrorType();
   15780             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15781             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15782             :       }
   15783             :     }
   15784             : #endif
   15785             :   }
   15786         353 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSILFILE, 0 |  0 );
   15787         353 :   {
   15788             :     /* %typemap(freearg) (const char *utf8_path) */
   15789         353 :     GDALPythonFreeCStr(arg1, bToFree1);
   15790             :   }
   15791         353 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15792         353 :   {
   15793             :     /* %typemap(freearg) char **dict */
   15794         353 :     CSLDestroy( arg4 );
   15795             :   }
   15796         353 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15797             :   return resultobj;
   15798           0 : fail:
   15799           0 :   {
   15800             :     /* %typemap(freearg) (const char *utf8_path) */
   15801           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15802             :   }
   15803           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15804           0 :   {
   15805             :     /* %typemap(freearg) char **dict */
   15806           0 :     CSLDestroy( arg4 );
   15807             :   }
   15808             :   return NULL;
   15809             : }
   15810             : 
   15811             : 
   15812          40 : SWIGINTERN PyObject *_wrap_VSIFEofL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15813          40 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15814          40 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   15815          40 :   void *argp1 = 0 ;
   15816          40 :   int res1 = 0 ;
   15817          40 :   PyObject *swig_obj[1] ;
   15818          40 :   int result;
   15819             :   
   15820          40 :   if (!args) SWIG_fail;
   15821          40 :   swig_obj[0] = args;
   15822          40 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   15823          40 :   if (!SWIG_IsOK(res1)) {
   15824           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFEofL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   15825             :   }
   15826          40 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   15827          40 :   {
   15828          40 :     if (!arg1) {
   15829           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15830             :     }
   15831             :   }
   15832          40 :   {
   15833          40 :     const int bLocalUseExceptions = GetUseExceptions();
   15834          40 :     if ( bLocalUseExceptions ) {
   15835          11 :       pushErrorHandler();
   15836             :     }
   15837          40 :     {
   15838          40 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15839          40 :       result = (int)VSIFEofL(arg1);
   15840          40 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15841             :     }
   15842          40 :     if ( bLocalUseExceptions ) {
   15843          11 :       popErrorHandler();
   15844             :     }
   15845             : #ifndef SED_HACKS
   15846             :     if ( bLocalUseExceptions ) {
   15847             :       CPLErr eclass = CPLGetLastErrorType();
   15848             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15849             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15850             :       }
   15851             :     }
   15852             : #endif
   15853             :   }
   15854          40 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15855          40 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15856             :   return resultobj;
   15857             : fail:
   15858             :   return NULL;
   15859             : }
   15860             : 
   15861             : 
   15862        1653 : SWIGINTERN PyObject *_wrap_VSIFErrorL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15863        1653 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15864        1653 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   15865        1653 :   void *argp1 = 0 ;
   15866        1653 :   int res1 = 0 ;
   15867        1653 :   PyObject *swig_obj[1] ;
   15868        1653 :   int result;
   15869             :   
   15870        1653 :   if (!args) SWIG_fail;
   15871        1653 :   swig_obj[0] = args;
   15872        1653 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   15873        1653 :   if (!SWIG_IsOK(res1)) {
   15874           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFErrorL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   15875             :   }
   15876        1653 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   15877        1653 :   {
   15878        1653 :     if (!arg1) {
   15879           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15880             :     }
   15881             :   }
   15882        1653 :   {
   15883        1653 :     const int bLocalUseExceptions = GetUseExceptions();
   15884        1653 :     if ( bLocalUseExceptions ) {
   15885          10 :       pushErrorHandler();
   15886             :     }
   15887        1653 :     {
   15888        1653 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15889        1653 :       result = (int)VSIFErrorL(arg1);
   15890        1653 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15891             :     }
   15892        1653 :     if ( bLocalUseExceptions ) {
   15893          10 :       popErrorHandler();
   15894             :     }
   15895             : #ifndef SED_HACKS
   15896             :     if ( bLocalUseExceptions ) {
   15897             :       CPLErr eclass = CPLGetLastErrorType();
   15898             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15899             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15900             :       }
   15901             :     }
   15902             : #endif
   15903             :   }
   15904        1653 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15905        1653 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15906             :   return resultobj;
   15907             : fail:
   15908             :   return NULL;
   15909             : }
   15910             : 
   15911             : 
   15912           5 : SWIGINTERN PyObject *_wrap_VSIFClearErrL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15913           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15914           5 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   15915           5 :   void *argp1 = 0 ;
   15916           5 :   int res1 = 0 ;
   15917           5 :   PyObject *swig_obj[1] ;
   15918             :   
   15919           5 :   if (!args) SWIG_fail;
   15920           5 :   swig_obj[0] = args;
   15921           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   15922           5 :   if (!SWIG_IsOK(res1)) {
   15923           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFClearErrL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   15924             :   }
   15925           5 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   15926           5 :   {
   15927           5 :     if (!arg1) {
   15928           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15929             :     }
   15930             :   }
   15931           5 :   {
   15932           5 :     const int bLocalUseExceptions = GetUseExceptions();
   15933           5 :     if ( bLocalUseExceptions ) {
   15934           1 :       pushErrorHandler();
   15935             :     }
   15936           5 :     {
   15937           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15938           5 :       VSIFClearErrL(arg1);
   15939           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15940             :     }
   15941           5 :     if ( bLocalUseExceptions ) {
   15942           1 :       popErrorHandler();
   15943             :     }
   15944             : #ifndef SED_HACKS
   15945             :     if ( bLocalUseExceptions ) {
   15946             :       CPLErr eclass = CPLGetLastErrorType();
   15947             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15948             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15949             :       }
   15950             :     }
   15951             : #endif
   15952             :   }
   15953           5 :   resultobj = SWIG_Py_Void();
   15954           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15955             :   return resultobj;
   15956             : fail:
   15957             :   return NULL;
   15958             : }
   15959             : 
   15960             : 
   15961           3 : SWIGINTERN PyObject *_wrap_VSIFFlushL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15962           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15963           3 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   15964           3 :   void *argp1 = 0 ;
   15965           3 :   int res1 = 0 ;
   15966           3 :   PyObject *swig_obj[1] ;
   15967           3 :   int result;
   15968             :   
   15969           3 :   if (!args) SWIG_fail;
   15970           3 :   swig_obj[0] = args;
   15971           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   15972           3 :   if (!SWIG_IsOK(res1)) {
   15973           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFFlushL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   15974             :   }
   15975           3 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   15976           3 :   {
   15977           3 :     if (!arg1) {
   15978           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15979             :     }
   15980             :   }
   15981           3 :   {
   15982           3 :     const int bLocalUseExceptions = GetUseExceptions();
   15983           3 :     if ( bLocalUseExceptions ) {
   15984           0 :       pushErrorHandler();
   15985             :     }
   15986           3 :     {
   15987           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15988           3 :       result = (int)VSIFFlushL(arg1);
   15989           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15990             :     }
   15991           3 :     if ( bLocalUseExceptions ) {
   15992           0 :       popErrorHandler();
   15993             :     }
   15994             : #ifndef SED_HACKS
   15995             :     if ( bLocalUseExceptions ) {
   15996             :       CPLErr eclass = CPLGetLastErrorType();
   15997             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15998             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15999             :       }
   16000             :     }
   16001             : #endif
   16002             :   }
   16003           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16004           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16005             :   return resultobj;
   16006             : fail:
   16007             :   return NULL;
   16008             : }
   16009             : 
   16010             : 
   16011        4625 : SWIGINTERN PyObject *_wrap_VSIFCloseL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16012        4625 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16013        4625 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16014        4625 :   void *argp1 = 0 ;
   16015        4625 :   int res1 = 0 ;
   16016        4625 :   PyObject *swig_obj[1] ;
   16017        4625 :   VSI_RETVAL result;
   16018             :   
   16019        4625 :   if (!args) SWIG_fail;
   16020        4625 :   swig_obj[0] = args;
   16021        4625 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16022        4625 :   if (!SWIG_IsOK(res1)) {
   16023           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFCloseL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16024             :   }
   16025        4625 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16026        4625 :   {
   16027        4625 :     if (!arg1) {
   16028           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16029             :     }
   16030             :   }
   16031        4625 :   {
   16032        4625 :     const int bLocalUseExceptions = GetUseExceptions();
   16033        4625 :     if ( bLocalUseExceptions ) {
   16034         992 :       pushErrorHandler();
   16035             :     }
   16036        4625 :     {
   16037        4625 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16038        4625 :       result = VSIFCloseL(arg1);
   16039        4625 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16040             :     }
   16041        4625 :     if ( bLocalUseExceptions ) {
   16042         992 :       popErrorHandler();
   16043             :     }
   16044             : #ifndef SED_HACKS
   16045             :     if ( bLocalUseExceptions ) {
   16046             :       CPLErr eclass = CPLGetLastErrorType();
   16047             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16048             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16049             :       }
   16050             :     }
   16051             : #endif
   16052             :   }
   16053        4625 :   {
   16054             :     /* %typemap(out) VSI_RETVAL */
   16055        4704 :     if ( result != 0 && GetUseExceptions()) {
   16056           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   16057           0 :       if( pszMessage[0] != '\0' )
   16058           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   16059             :       else
   16060           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   16061           0 :       SWIG_fail;
   16062             :     }
   16063             :   }
   16064        4625 :   {
   16065             :     /* %typemap(ret) VSI_RETVAL */
   16066        4625 :     resultobj = PyInt_FromLong( result );
   16067             :   }
   16068        4625 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16069             :   return resultobj;
   16070             : fail:
   16071             :   return NULL;
   16072             : }
   16073             : 
   16074             : 
   16075       65875 : SWIGINTERN PyObject *_wrap_VSIFSeekL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16076       65875 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16077       65875 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16078       65875 :   GIntBig arg2 ;
   16079       65875 :   int arg3 ;
   16080       65875 :   void *argp1 = 0 ;
   16081       65875 :   int res1 = 0 ;
   16082       65875 :   int val3 ;
   16083       65875 :   int ecode3 = 0 ;
   16084       65875 :   PyObject *swig_obj[3] ;
   16085       65875 :   int result;
   16086             :   
   16087       65875 :   if (!SWIG_Python_UnpackTuple(args, "VSIFSeekL", 3, 3, swig_obj)) SWIG_fail;
   16088       65875 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16089       65875 :   if (!SWIG_IsOK(res1)) {
   16090           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFSeekL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16091             :   }
   16092       65875 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16093       65875 :   {
   16094       65875 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   16095             :   }
   16096       65875 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   16097       65875 :   if (!SWIG_IsOK(ecode3)) {
   16098           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFSeekL" "', argument " "3"" of type '" "int""'");
   16099             :   } 
   16100       65875 :   arg3 = static_cast< int >(val3);
   16101       65875 :   {
   16102       65875 :     if (!arg1) {
   16103           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16104             :     }
   16105             :   }
   16106       65875 :   {
   16107       65875 :     const int bLocalUseExceptions = GetUseExceptions();
   16108       65875 :     if ( bLocalUseExceptions ) {
   16109        2659 :       pushErrorHandler();
   16110             :     }
   16111       65875 :     {
   16112       65875 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16113       65875 :       result = (int)wrapper_VSIFSeekL(arg1,arg2,arg3);
   16114       65875 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16115             :     }
   16116       65875 :     if ( bLocalUseExceptions ) {
   16117        2659 :       popErrorHandler();
   16118             :     }
   16119             : #ifndef SED_HACKS
   16120             :     if ( bLocalUseExceptions ) {
   16121             :       CPLErr eclass = CPLGetLastErrorType();
   16122             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16123             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16124             :       }
   16125             :     }
   16126             : #endif
   16127             :   }
   16128       65875 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16129       65875 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16130             :   return resultobj;
   16131             : fail:
   16132             :   return NULL;
   16133             : }
   16134             : 
   16135             : 
   16136         795 : SWIGINTERN PyObject *_wrap_VSIFTellL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16137         795 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16138         795 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16139         795 :   void *argp1 = 0 ;
   16140         795 :   int res1 = 0 ;
   16141         795 :   PyObject *swig_obj[1] ;
   16142         795 :   GIntBig result;
   16143             :   
   16144         795 :   if (!args) SWIG_fail;
   16145         795 :   swig_obj[0] = args;
   16146         795 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16147         795 :   if (!SWIG_IsOK(res1)) {
   16148           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTellL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16149             :   }
   16150         795 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16151         795 :   {
   16152         795 :     if (!arg1) {
   16153           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16154             :     }
   16155             :   }
   16156         795 :   {
   16157         795 :     const int bLocalUseExceptions = GetUseExceptions();
   16158         795 :     if ( bLocalUseExceptions ) {
   16159         590 :       pushErrorHandler();
   16160             :     }
   16161         795 :     {
   16162         795 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16163         795 :       result = VSIFTellL(arg1);
   16164         795 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16165             :     }
   16166         795 :     if ( bLocalUseExceptions ) {
   16167         590 :       popErrorHandler();
   16168             :     }
   16169             : #ifndef SED_HACKS
   16170             :     if ( bLocalUseExceptions ) {
   16171             :       CPLErr eclass = CPLGetLastErrorType();
   16172             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16173             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16174             :       }
   16175             :     }
   16176             : #endif
   16177             :   }
   16178         795 :   {
   16179         795 :     resultobj = PyLong_FromLongLong(result);
   16180             :   }
   16181         795 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16182             :   return resultobj;
   16183             : fail:
   16184             :   return NULL;
   16185             : }
   16186             : 
   16187             : 
   16188          34 : SWIGINTERN PyObject *_wrap_VSIFTruncateL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16189          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16190          34 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16191          34 :   GIntBig arg2 ;
   16192          34 :   void *argp1 = 0 ;
   16193          34 :   int res1 = 0 ;
   16194          34 :   PyObject *swig_obj[2] ;
   16195          34 :   int result;
   16196             :   
   16197          34 :   if (!SWIG_Python_UnpackTuple(args, "VSIFTruncateL", 2, 2, swig_obj)) SWIG_fail;
   16198          34 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16199          34 :   if (!SWIG_IsOK(res1)) {
   16200           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTruncateL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16201             :   }
   16202          34 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16203          34 :   {
   16204          34 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   16205             :   }
   16206          34 :   {
   16207          34 :     if (!arg1) {
   16208           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16209             :     }
   16210             :   }
   16211          34 :   {
   16212          34 :     const int bLocalUseExceptions = GetUseExceptions();
   16213          34 :     if ( bLocalUseExceptions ) {
   16214          13 :       pushErrorHandler();
   16215             :     }
   16216          34 :     {
   16217          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16218          34 :       result = (int)VSIFTruncateL(arg1,arg2);
   16219          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16220             :     }
   16221          34 :     if ( bLocalUseExceptions ) {
   16222          13 :       popErrorHandler();
   16223             :     }
   16224             : #ifndef SED_HACKS
   16225             :     if ( bLocalUseExceptions ) {
   16226             :       CPLErr eclass = CPLGetLastErrorType();
   16227             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16228             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16229             :       }
   16230             :     }
   16231             : #endif
   16232             :   }
   16233          34 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16234          34 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16235             :   return resultobj;
   16236             : fail:
   16237             :   return NULL;
   16238             : }
   16239             : 
   16240             : 
   16241           2 : SWIGINTERN PyObject *_wrap_VSISupportsSparseFiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16242           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16243           2 :   char *arg1 = (char *) 0 ;
   16244           2 :   int bToFree1 = 0 ;
   16245           2 :   PyObject *swig_obj[1] ;
   16246           2 :   int result;
   16247             :   
   16248           2 :   if (!args) SWIG_fail;
   16249           2 :   swig_obj[0] = args;
   16250           2 :   {
   16251             :     /* %typemap(in) (const char *utf8_path) */
   16252           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   16253             :     {
   16254           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   16255             :     }
   16256             :     else
   16257             :     {
   16258           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   16259             :       
   16260             :     }
   16261           2 :     if (arg1 == NULL)
   16262             :     {
   16263           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16264           0 :       SWIG_fail;
   16265             :     }
   16266             :   }
   16267           2 :   {
   16268           2 :     if (!arg1) {
   16269           2 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16270             :     }
   16271             :   }
   16272           2 :   {
   16273           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16274           2 :     if ( bLocalUseExceptions ) {
   16275           0 :       pushErrorHandler();
   16276             :     }
   16277           2 :     {
   16278           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16279           2 :       result = (int)VSISupportsSparseFiles((char const *)arg1);
   16280           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16281             :     }
   16282           2 :     if ( bLocalUseExceptions ) {
   16283           0 :       popErrorHandler();
   16284             :     }
   16285             : #ifndef SED_HACKS
   16286             :     if ( bLocalUseExceptions ) {
   16287             :       CPLErr eclass = CPLGetLastErrorType();
   16288             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16289             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16290             :       }
   16291             :     }
   16292             : #endif
   16293             :   }
   16294           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16295           2 :   {
   16296             :     /* %typemap(freearg) (const char *utf8_path) */
   16297           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16298             :   }
   16299           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16300             :   return resultobj;
   16301           0 : fail:
   16302           0 :   {
   16303             :     /* %typemap(freearg) (const char *utf8_path) */
   16304           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16305             :   }
   16306             :   return NULL;
   16307             : }
   16308             : 
   16309             : 
   16310           3 : SWIGINTERN PyObject *_wrap_VSIFGetRangeStatusL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16311           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16312           3 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16313           3 :   GIntBig arg2 ;
   16314           3 :   GIntBig arg3 ;
   16315           3 :   void *argp1 = 0 ;
   16316           3 :   int res1 = 0 ;
   16317           3 :   PyObject *swig_obj[3] ;
   16318           3 :   int result;
   16319             :   
   16320           3 :   if (!SWIG_Python_UnpackTuple(args, "VSIFGetRangeStatusL", 3, 3, swig_obj)) SWIG_fail;
   16321           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16322           3 :   if (!SWIG_IsOK(res1)) {
   16323           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFGetRangeStatusL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16324             :   }
   16325           3 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16326           3 :   {
   16327           3 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   16328             :   }
   16329           3 :   {
   16330           3 :     arg3 = (GIntBig)PyLong_AsLongLong(swig_obj[2]);
   16331             :   }
   16332           3 :   {
   16333           3 :     if (!arg1) {
   16334           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16335             :     }
   16336             :   }
   16337           3 :   {
   16338           3 :     const int bLocalUseExceptions = GetUseExceptions();
   16339           3 :     if ( bLocalUseExceptions ) {
   16340           0 :       pushErrorHandler();
   16341             :     }
   16342           3 :     {
   16343           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16344           3 :       result = (int)VSIFGetRangeStatusL(arg1,arg2,arg3);
   16345           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16346             :     }
   16347           3 :     if ( bLocalUseExceptions ) {
   16348           0 :       popErrorHandler();
   16349             :     }
   16350             : #ifndef SED_HACKS
   16351             :     if ( bLocalUseExceptions ) {
   16352             :       CPLErr eclass = CPLGetLastErrorType();
   16353             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16354             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16355             :       }
   16356             :     }
   16357             : #endif
   16358             :   }
   16359           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16360           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16361             :   return resultobj;
   16362             : fail:
   16363             :   return NULL;
   16364             : }
   16365             : 
   16366             : 
   16367      346816 : SWIGINTERN PyObject *_wrap_VSIFWriteL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16368      346816 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16369      346816 :   int arg1 ;
   16370      346816 :   char *arg2 = (char *) 0 ;
   16371      346816 :   int arg3 ;
   16372      346816 :   int arg4 ;
   16373      346816 :   VSILFILE *arg5 = (VSILFILE *) 0 ;
   16374      346816 :   int alloc1 = 0 ;
   16375      346816 :   bool viewIsValid1 = false ;
   16376      346816 :   Py_buffer view1 ;
   16377      346816 :   int val3 ;
   16378      346816 :   int ecode3 = 0 ;
   16379      346816 :   int val4 ;
   16380      346816 :   int ecode4 = 0 ;
   16381      346816 :   void *argp5 = 0 ;
   16382      346816 :   int res5 = 0 ;
   16383      346816 :   PyObject *swig_obj[4] ;
   16384      346816 :   int result;
   16385             :   
   16386      346816 :   if (!SWIG_Python_UnpackTuple(args, "VSIFWriteL", 4, 4, swig_obj)) SWIG_fail;
   16387      346816 :   {
   16388             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   16389      346816 :     char* ptr = NULL;
   16390      346816 :     if( !GetBufferAsCharPtrIntSize(swig_obj[0], &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   16391           0 :       SWIG_fail;
   16392             :     }
   16393      346816 :     arg2 = (char *)ptr;
   16394             :   }
   16395      346816 :   ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   16396      346816 :   if (!SWIG_IsOK(ecode3)) {
   16397           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFWriteL" "', argument " "3"" of type '" "int""'");
   16398             :   } 
   16399      346816 :   arg3 = static_cast< int >(val3);
   16400      346816 :   ecode4 = SWIG_AsVal_int(swig_obj[2], &val4);
   16401      346816 :   if (!SWIG_IsOK(ecode4)) {
   16402           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VSIFWriteL" "', argument " "4"" of type '" "int""'");
   16403             :   } 
   16404      346816 :   arg4 = static_cast< int >(val4);
   16405      346816 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16406      346816 :   if (!SWIG_IsOK(res5)) {
   16407           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "VSIFWriteL" "', argument " "5"" of type '" "VSILFILE *""'"); 
   16408             :   }
   16409      346816 :   arg5 = reinterpret_cast< VSILFILE * >(argp5);
   16410      346816 :   {
   16411      346816 :     if (!arg5) {
   16412           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16413             :     }
   16414             :   }
   16415      346816 :   {
   16416      346816 :     const int bLocalUseExceptions = GetUseExceptions();
   16417      346816 :     if ( bLocalUseExceptions ) {
   16418      105875 :       pushErrorHandler();
   16419             :     }
   16420      346816 :     {
   16421      346816 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16422      346816 :       result = (int)wrapper_VSIFWriteL(arg1,arg2,arg3,arg4,arg5);
   16423      346816 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16424             :     }
   16425      346816 :     if ( bLocalUseExceptions ) {
   16426      105875 :       popErrorHandler();
   16427             :     }
   16428             : #ifndef SED_HACKS
   16429             :     if ( bLocalUseExceptions ) {
   16430             :       CPLErr eclass = CPLGetLastErrorType();
   16431             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16432             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16433             :       }
   16434             :     }
   16435             : #endif
   16436             :   }
   16437      346816 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16438      346816 :   {
   16439             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   16440      346816 :     if( viewIsValid1 ) {
   16441        6530 :       PyBuffer_Release(&view1);
   16442             :     }
   16443      340286 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   16444      340286 :       delete[] arg2;
   16445             :     }
   16446             :   }
   16447      346816 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16448             :   return resultobj;
   16449           0 : fail:
   16450           0 :   {
   16451             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   16452           0 :     if( viewIsValid1 ) {
   16453           0 :       PyBuffer_Release(&view1);
   16454             :     }
   16455      346816 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   16456           0 :       delete[] arg2;
   16457             :     }
   16458             :   }
   16459             :   return NULL;
   16460             : }
   16461             : 
   16462             : 
   16463         213 : SWIGINTERN PyObject *_wrap_CPLReadLineL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16464         213 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16465         213 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16466         213 :   void *argp1 = 0 ;
   16467         213 :   int res1 = 0 ;
   16468         213 :   PyObject *swig_obj[1] ;
   16469         213 :   char *result = 0 ;
   16470             :   
   16471         213 :   if (!args) SWIG_fail;
   16472         213 :   swig_obj[0] = args;
   16473         213 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16474         213 :   if (!SWIG_IsOK(res1)) {
   16475           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPLReadLineL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16476             :   }
   16477         213 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16478         213 :   {
   16479         213 :     if (!arg1) {
   16480           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16481             :     }
   16482             :   }
   16483         213 :   {
   16484         213 :     const int bLocalUseExceptions = GetUseExceptions();
   16485         213 :     if ( bLocalUseExceptions ) {
   16486          41 :       pushErrorHandler();
   16487             :     }
   16488         213 :     {
   16489         213 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16490         213 :       result = (char *)CPLReadLineL(arg1);
   16491         213 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16492             :     }
   16493         213 :     if ( bLocalUseExceptions ) {
   16494          41 :       popErrorHandler();
   16495             :     }
   16496             : #ifndef SED_HACKS
   16497             :     if ( bLocalUseExceptions ) {
   16498             :       CPLErr eclass = CPLGetLastErrorType();
   16499             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16500             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16501             :       }
   16502             :     }
   16503             : #endif
   16504             :   }
   16505         213 :   resultobj = SWIG_FromCharPtr((const char *)result);
   16506         213 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16507             :   return resultobj;
   16508             : fail:
   16509             :   return NULL;
   16510             : }
   16511             : 
   16512             : 
   16513         325 : SWIGINTERN PyObject *_wrap_VSICurlClearCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16514         325 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16515             :   
   16516         325 :   if (!SWIG_Python_UnpackTuple(args, "VSICurlClearCache", 0, 0, 0)) SWIG_fail;
   16517         325 :   {
   16518         325 :     const int bLocalUseExceptions = GetUseExceptions();
   16519         325 :     if ( bLocalUseExceptions ) {
   16520         113 :       pushErrorHandler();
   16521             :     }
   16522         325 :     {
   16523         325 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16524         325 :       VSICurlClearCache();
   16525         325 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16526             :     }
   16527         325 :     if ( bLocalUseExceptions ) {
   16528         113 :       popErrorHandler();
   16529             :     }
   16530             : #ifndef SED_HACKS
   16531             :     if ( bLocalUseExceptions ) {
   16532             :       CPLErr eclass = CPLGetLastErrorType();
   16533             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16534             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16535             :       }
   16536             :     }
   16537             : #endif
   16538             :   }
   16539         325 :   resultobj = SWIG_Py_Void();
   16540         325 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16541             :   return resultobj;
   16542           0 : fail:
   16543           0 :   return NULL;
   16544             : }
   16545             : 
   16546             : 
   16547           2 : SWIGINTERN PyObject *_wrap_VSICurlPartialClearCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16548           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16549           2 :   char *arg1 = (char *) 0 ;
   16550           2 :   int bToFree1 = 0 ;
   16551           2 :   PyObject *swig_obj[1] ;
   16552             :   
   16553           2 :   if (!args) SWIG_fail;
   16554           2 :   swig_obj[0] = args;
   16555           2 :   {
   16556             :     /* %typemap(in) (const char *utf8_path) */
   16557           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   16558             :     {
   16559           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   16560             :     }
   16561             :     else
   16562             :     {
   16563           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   16564             :       
   16565             :     }
   16566           2 :     if (arg1 == NULL)
   16567             :     {
   16568           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16569           0 :       SWIG_fail;
   16570             :     }
   16571             :   }
   16572           2 :   {
   16573           2 :     if (!arg1) {
   16574           2 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16575             :     }
   16576             :   }
   16577           2 :   {
   16578           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16579           2 :     if ( bLocalUseExceptions ) {
   16580           0 :       pushErrorHandler();
   16581             :     }
   16582           2 :     {
   16583           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16584           2 :       VSICurlPartialClearCache((char const *)arg1);
   16585           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16586             :     }
   16587           2 :     if ( bLocalUseExceptions ) {
   16588           0 :       popErrorHandler();
   16589             :     }
   16590             : #ifndef SED_HACKS
   16591             :     if ( bLocalUseExceptions ) {
   16592             :       CPLErr eclass = CPLGetLastErrorType();
   16593             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16594             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16595             :       }
   16596             :     }
   16597             : #endif
   16598             :   }
   16599           2 :   resultobj = SWIG_Py_Void();
   16600           2 :   {
   16601             :     /* %typemap(freearg) (const char *utf8_path) */
   16602           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16603             :   }
   16604           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16605             :   return resultobj;
   16606           0 : fail:
   16607           0 :   {
   16608             :     /* %typemap(freearg) (const char *utf8_path) */
   16609           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16610             :   }
   16611             :   return NULL;
   16612             : }
   16613             : 
   16614             : 
   16615           2 : SWIGINTERN PyObject *_wrap_NetworkStatsReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16616           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16617             :   
   16618           2 :   if (!SWIG_Python_UnpackTuple(args, "NetworkStatsReset", 0, 0, 0)) SWIG_fail;
   16619           2 :   {
   16620           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16621           2 :     if ( bLocalUseExceptions ) {
   16622           0 :       pushErrorHandler();
   16623             :     }
   16624           2 :     {
   16625           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16626           2 :       VSINetworkStatsReset();
   16627           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16628             :     }
   16629           2 :     if ( bLocalUseExceptions ) {
   16630           0 :       popErrorHandler();
   16631             :     }
   16632             : #ifndef SED_HACKS
   16633             :     if ( bLocalUseExceptions ) {
   16634             :       CPLErr eclass = CPLGetLastErrorType();
   16635             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16636             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16637             :       }
   16638             :     }
   16639             : #endif
   16640             :   }
   16641           2 :   resultobj = SWIG_Py_Void();
   16642           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16643             :   return resultobj;
   16644           0 : fail:
   16645           0 :   return NULL;
   16646             : }
   16647             : 
   16648             : 
   16649           1 : SWIGINTERN PyObject *_wrap_NetworkStatsGetAsSerializedJSON(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16650           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16651           1 :   char **arg1 = (char **) NULL ;
   16652           1 :   PyObject *swig_obj[1] ;
   16653           1 :   retStringAndCPLFree *result = 0 ;
   16654             :   
   16655           1 :   if (!SWIG_Python_UnpackTuple(args, "NetworkStatsGetAsSerializedJSON", 0, 1, swig_obj)) SWIG_fail;
   16656           1 :   if (swig_obj[0]) {
   16657           0 :     {
   16658             :       /* %typemap(in) char **dict */
   16659           0 :       arg1 = NULL;
   16660           0 :       if ( PySequence_Check( swig_obj[0] ) ) {
   16661           0 :         int bErr = FALSE;
   16662           0 :         arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   16663           0 :         if ( bErr )
   16664             :         {
   16665           0 :           SWIG_fail;
   16666             :         }
   16667             :       }
   16668           0 :       else if ( PyMapping_Check( swig_obj[0] ) ) {
   16669           0 :         int bErr = FALSE;
   16670           0 :         arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   16671           0 :         if ( bErr )
   16672             :         {
   16673           0 :           SWIG_fail;
   16674             :         }
   16675             :       }
   16676             :       else {
   16677           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   16678           0 :         SWIG_fail;
   16679             :       }
   16680             :     }
   16681             :   }
   16682           1 :   {
   16683           1 :     const int bLocalUseExceptions = GetUseExceptions();
   16684           1 :     if ( bLocalUseExceptions ) {
   16685           0 :       pushErrorHandler();
   16686             :     }
   16687           1 :     {
   16688           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16689           1 :       result = (retStringAndCPLFree *)VSINetworkStatsGetAsSerializedJSON(arg1);
   16690           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16691             :     }
   16692           1 :     if ( bLocalUseExceptions ) {
   16693           0 :       popErrorHandler();
   16694             :     }
   16695             : #ifndef SED_HACKS
   16696             :     if ( bLocalUseExceptions ) {
   16697             :       CPLErr eclass = CPLGetLastErrorType();
   16698             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16699             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16700             :       }
   16701             :     }
   16702             : #endif
   16703             :   }
   16704           1 :   {
   16705             :     /* %typemap(out) (retStringAndCPLFree*) */
   16706           1 :     Py_XDECREF(resultobj);
   16707           1 :     if(result)
   16708             :     {
   16709           1 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   16710           1 :       CPLFree(result);
   16711             :     }
   16712             :     else
   16713             :     {
   16714           0 :       resultobj = Py_None;
   16715           0 :       Py_INCREF(resultobj);
   16716             :     }
   16717             :   }
   16718           1 :   {
   16719             :     /* %typemap(freearg) char **dict */
   16720           1 :     CSLDestroy( arg1 );
   16721             :   }
   16722           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16723             :   return resultobj;
   16724           0 : fail:
   16725           0 :   {
   16726             :     /* %typemap(freearg) char **dict */
   16727           0 :     CSLDestroy( arg1 );
   16728             :   }
   16729             :   return NULL;
   16730             : }
   16731             : 
   16732             : 
   16733         882 : SWIGINTERN PyObject *_wrap_ParseCommandLine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16734         882 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16735         882 :   char *arg1 = (char *) 0 ;
   16736         882 :   int bToFree1 = 0 ;
   16737         882 :   PyObject *swig_obj[1] ;
   16738         882 :   char **result = 0 ;
   16739             :   
   16740         882 :   if (!args) SWIG_fail;
   16741         882 :   swig_obj[0] = args;
   16742         882 :   {
   16743             :     /* %typemap(in) (const char *utf8_path) */
   16744         882 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   16745             :     {
   16746         882 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   16747             :     }
   16748             :     else
   16749             :     {
   16750           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   16751             :       
   16752             :     }
   16753         882 :     if (arg1 == NULL)
   16754             :     {
   16755           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16756           0 :       SWIG_fail;
   16757             :     }
   16758             :   }
   16759         882 :   {
   16760         882 :     if (!arg1) {
   16761         882 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16762             :     }
   16763             :   }
   16764         882 :   {
   16765         882 :     const int bLocalUseExceptions = GetUseExceptions();
   16766         882 :     if ( bLocalUseExceptions ) {
   16767         762 :       pushErrorHandler();
   16768             :     }
   16769         882 :     {
   16770         882 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16771         882 :       result = (char **)CSLParseCommandLine((char const *)arg1);
   16772         882 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16773             :     }
   16774         882 :     if ( bLocalUseExceptions ) {
   16775         762 :       popErrorHandler();
   16776             :     }
   16777             : #ifndef SED_HACKS
   16778             :     if ( bLocalUseExceptions ) {
   16779             :       CPLErr eclass = CPLGetLastErrorType();
   16780             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16781             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16782             :       }
   16783             :     }
   16784             : #endif
   16785             :   }
   16786         882 :   {
   16787             :     /* %typemap(out) char **CSL -> ( string ) */
   16788         882 :     bool bErr = false;
   16789         882 :     resultobj = CSLToList(result, &bErr);
   16790         882 :     CSLDestroy(result);
   16791         882 :     if( bErr ) {
   16792           0 :       SWIG_fail;
   16793             :     }
   16794             :   }
   16795         882 :   {
   16796             :     /* %typemap(freearg) (const char *utf8_path) */
   16797         882 :     GDALPythonFreeCStr(arg1, bToFree1);
   16798             :   }
   16799         882 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16800             :   return resultobj;
   16801           0 : fail:
   16802           0 :   {
   16803             :     /* %typemap(freearg) (const char *utf8_path) */
   16804         882 :     GDALPythonFreeCStr(arg1, bToFree1);
   16805             :   }
   16806             :   return NULL;
   16807             : }
   16808             : 
   16809             : 
   16810          21 : SWIGINTERN PyObject *_wrap_GetNumCPUs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16811          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16812          21 :   int result;
   16813             :   
   16814          21 :   if (!SWIG_Python_UnpackTuple(args, "GetNumCPUs", 0, 0, 0)) SWIG_fail;
   16815          21 :   {
   16816          21 :     const int bLocalUseExceptions = GetUseExceptions();
   16817          21 :     if ( bLocalUseExceptions ) {
   16818          13 :       pushErrorHandler();
   16819             :     }
   16820          21 :     {
   16821          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16822          21 :       result = (int)CPLGetNumCPUs();
   16823          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16824             :     }
   16825          21 :     if ( bLocalUseExceptions ) {
   16826          13 :       popErrorHandler();
   16827             :     }
   16828             : #ifndef SED_HACKS
   16829             :     if ( bLocalUseExceptions ) {
   16830             :       CPLErr eclass = CPLGetLastErrorType();
   16831             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16832             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16833             :       }
   16834             :     }
   16835             : #endif
   16836             :   }
   16837          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16838          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16839             :   return resultobj;
   16840           0 : fail:
   16841           0 :   return NULL;
   16842             : }
   16843             : 
   16844             : 
   16845           2 : SWIGINTERN PyObject *_wrap_GetUsablePhysicalRAM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16846           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16847           2 :   GIntBig result;
   16848             :   
   16849           2 :   if (!SWIG_Python_UnpackTuple(args, "GetUsablePhysicalRAM", 0, 0, 0)) SWIG_fail;
   16850           2 :   {
   16851           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16852           2 :     if ( bLocalUseExceptions ) {
   16853           1 :       pushErrorHandler();
   16854             :     }
   16855           2 :     {
   16856           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16857           2 :       result = CPLGetUsablePhysicalRAM();
   16858           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16859             :     }
   16860           2 :     if ( bLocalUseExceptions ) {
   16861           1 :       popErrorHandler();
   16862             :     }
   16863             : #ifndef SED_HACKS
   16864             :     if ( bLocalUseExceptions ) {
   16865             :       CPLErr eclass = CPLGetLastErrorType();
   16866             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16867             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16868             :       }
   16869             :     }
   16870             : #endif
   16871             :   }
   16872           2 :   {
   16873           2 :     resultobj = PyLong_FromLongLong(result);
   16874             :   }
   16875           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16876             :   return resultobj;
   16877           0 : fail:
   16878           0 :   return NULL;
   16879             : }
   16880             : 
   16881             : 
   16882           8 : SWIGINTERN PyObject *_wrap_MultipartUploadGetCapabilities(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16883           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16884           8 :   char *arg1 = (char *) 0 ;
   16885           8 :   int *arg2 = (int *) 0 ;
   16886           8 :   int *arg3 = (int *) 0 ;
   16887           8 :   int *arg4 = (int *) 0 ;
   16888           8 :   int *arg5 = (int *) 0 ;
   16889           8 :   size_t *arg6 = (size_t *) 0 ;
   16890           8 :   size_t *arg7 = (size_t *) 0 ;
   16891           8 :   int *arg8 = (int *) 0 ;
   16892           8 :   int res1 ;
   16893           8 :   char *buf1 = 0 ;
   16894           8 :   int alloc1 = 0 ;
   16895           8 :   int nRetCode2 = 0 ;
   16896           8 :   int bNonSequentialUploadSupported2 = 0 ;
   16897           8 :   int bParallelUploadSupported2 = 0 ;
   16898           8 :   int bSupportsAbort2 = 0 ;
   16899           8 :   size_t nMinPartSize2 = 0 ;
   16900           8 :   size_t nMaxPartSize2 = 0 ;
   16901           8 :   int nMaxPartCount2 = 0 ;
   16902           8 :   PyObject *swig_obj[1] ;
   16903             :   
   16904           8 :   {
   16905           8 :     arg2 = &nRetCode2;
   16906           8 :     arg3 = &bNonSequentialUploadSupported2;
   16907           8 :     arg4 = &bParallelUploadSupported2;
   16908           8 :     arg5 = &bSupportsAbort2;
   16909           8 :     arg6 = &nMinPartSize2;
   16910           8 :     arg7 = &nMaxPartSize2;
   16911           8 :     arg8 = &nMaxPartCount2;
   16912             :   }
   16913           8 :   if (!args) SWIG_fail;
   16914           8 :   swig_obj[0] = args;
   16915           8 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   16916           8 :   if (!SWIG_IsOK(res1)) {
   16917           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadGetCapabilities" "', argument " "1"" of type '" "char const *""'");
   16918             :   }
   16919           8 :   arg1 = reinterpret_cast< char * >(buf1);
   16920           8 :   {
   16921           8 :     if (!arg1) {
   16922           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16923             :     }
   16924             :   }
   16925           7 :   {
   16926           7 :     const int bLocalUseExceptions = GetUseExceptions();
   16927           7 :     if ( bLocalUseExceptions ) {
   16928           2 :       pushErrorHandler();
   16929             :     }
   16930           7 :     {
   16931           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16932           7 :       MultipartUploadGetCapabilities((char const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   16933           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16934             :     }
   16935           7 :     if ( bLocalUseExceptions ) {
   16936           2 :       popErrorHandler();
   16937             :     }
   16938             : #ifndef SED_HACKS
   16939             :     if ( bLocalUseExceptions ) {
   16940             :       CPLErr eclass = CPLGetLastErrorType();
   16941             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16942             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16943             :       }
   16944             :     }
   16945             : #endif
   16946             :   }
   16947           7 :   resultobj = SWIG_Py_Void();
   16948           7 :   {
   16949           7 :     if( *arg2 == 0 )
   16950             :     {
   16951           2 :       Py_DECREF(resultobj);
   16952           2 :       resultobj = Py_None;
   16953           2 :       Py_INCREF(Py_None);
   16954             :     }
   16955             :     else
   16956             :     {
   16957           5 :       PyObject *r = PyTuple_New( 6 );
   16958           5 :       PyTuple_SetItem( r, 0, PyBool_FromLong(*arg3) );
   16959           5 :       PyTuple_SetItem( r, 1, PyBool_FromLong(*arg4) );
   16960           5 :       PyTuple_SetItem( r, 2, PyBool_FromLong(*arg5) );
   16961           5 :       PyTuple_SetItem( r, 3, PyLong_FromUnsignedLongLong(*arg6) );
   16962           5 :       PyTuple_SetItem( r, 4, PyLong_FromUnsignedLongLong(*arg7) );
   16963           5 :       PyTuple_SetItem( r, 5, PyLong_FromUnsignedLongLong(*arg8) );
   16964             : #if SWIG_VERSION >= 0x040300
   16965             :       resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   16966             : #else
   16967           5 :       resultobj = SWIG_Python_AppendOutput(resultobj,r);
   16968             : #endif
   16969             :     }
   16970             :   }
   16971           7 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   16972          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16973             :   return resultobj;
   16974           1 : fail:
   16975           1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   16976             :   return NULL;
   16977             : }
   16978             : 
   16979             : 
   16980           5 : SWIGINTERN PyObject *_wrap_MultipartUploadStart(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16981           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16982           5 :   char *arg1 = (char *) 0 ;
   16983           5 :   char **arg2 = (char **) NULL ;
   16984           5 :   int res1 ;
   16985           5 :   char *buf1 = 0 ;
   16986           5 :   int alloc1 = 0 ;
   16987           5 :   PyObject *swig_obj[2] ;
   16988           5 :   retStringAndCPLFree *result = 0 ;
   16989             :   
   16990           5 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadStart", 1, 2, swig_obj)) SWIG_fail;
   16991           5 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   16992           5 :   if (!SWIG_IsOK(res1)) {
   16993           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadStart" "', argument " "1"" of type '" "char const *""'");
   16994             :   }
   16995           5 :   arg1 = reinterpret_cast< char * >(buf1);
   16996           5 :   if (swig_obj[1]) {
   16997           0 :     {
   16998             :       /* %typemap(in) char **dict */
   16999           0 :       arg2 = NULL;
   17000           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   17001           0 :         int bErr = FALSE;
   17002           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   17003           0 :         if ( bErr )
   17004             :         {
   17005           0 :           SWIG_fail;
   17006             :         }
   17007             :       }
   17008           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   17009           0 :         int bErr = FALSE;
   17010           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   17011           0 :         if ( bErr )
   17012             :         {
   17013           0 :           SWIG_fail;
   17014             :         }
   17015             :       }
   17016             :       else {
   17017           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17018           0 :         SWIG_fail;
   17019             :       }
   17020             :     }
   17021             :   }
   17022           5 :   {
   17023           5 :     if (!arg1) {
   17024           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17025             :     }
   17026             :   }
   17027           4 :   {
   17028           4 :     const int bLocalUseExceptions = GetUseExceptions();
   17029           4 :     if ( bLocalUseExceptions ) {
   17030           1 :       pushErrorHandler();
   17031             :     }
   17032           4 :     {
   17033           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17034           4 :       result = (retStringAndCPLFree *)MultipartUploadStart((char const *)arg1,arg2);
   17035           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17036             :     }
   17037           4 :     if ( bLocalUseExceptions ) {
   17038           1 :       popErrorHandler();
   17039             :     }
   17040             : #ifndef SED_HACKS
   17041             :     if ( bLocalUseExceptions ) {
   17042             :       CPLErr eclass = CPLGetLastErrorType();
   17043             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17044             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17045             :       }
   17046             :     }
   17047             : #endif
   17048             :   }
   17049           4 :   {
   17050             :     /* %typemap(out) (retStringAndCPLFree*) */
   17051           4 :     Py_XDECREF(resultobj);
   17052           4 :     if(result)
   17053             :     {
   17054           1 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   17055           1 :       CPLFree(result);
   17056             :     }
   17057             :     else
   17058             :     {
   17059           3 :       resultobj = Py_None;
   17060           3 :       Py_INCREF(resultobj);
   17061             :     }
   17062             :   }
   17063           4 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17064           4 :   {
   17065             :     /* %typemap(freearg) char **dict */
   17066           4 :     CSLDestroy( arg2 );
   17067             :   }
   17068           7 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17069             :   return resultobj;
   17070           1 : fail:
   17071           1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17072           1 :   {
   17073             :     /* %typemap(freearg) char **dict */
   17074           1 :     CSLDestroy( arg2 );
   17075             :   }
   17076             :   return NULL;
   17077             : }
   17078             : 
   17079             : 
   17080           7 : SWIGINTERN PyObject *_wrap_MultipartUploadAddPart(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17081           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17082           7 :   char *arg1 = (char *) 0 ;
   17083           7 :   char *arg2 = (char *) 0 ;
   17084           7 :   int arg3 ;
   17085           7 :   GUIntBig arg4 ;
   17086           7 :   size_t arg5 ;
   17087           7 :   char *arg6 = (char *) 0 ;
   17088           7 :   char **arg7 = (char **) NULL ;
   17089           7 :   int res1 ;
   17090           7 :   char *buf1 = 0 ;
   17091           7 :   int alloc1 = 0 ;
   17092           7 :   int res2 ;
   17093           7 :   char *buf2 = 0 ;
   17094           7 :   int alloc2 = 0 ;
   17095           7 :   int val3 ;
   17096           7 :   int ecode3 = 0 ;
   17097           7 :   int alloc5 = 0 ;
   17098           7 :   bool viewIsValid5 = false ;
   17099           7 :   Py_buffer view5 ;
   17100           7 :   PyObject *swig_obj[6] ;
   17101           7 :   retStringAndCPLFree *result = 0 ;
   17102             :   
   17103           7 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadAddPart", 5, 6, swig_obj)) SWIG_fail;
   17104           7 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17105           7 :   if (!SWIG_IsOK(res1)) {
   17106           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadAddPart" "', argument " "1"" of type '" "char const *""'");
   17107             :   }
   17108           7 :   arg1 = reinterpret_cast< char * >(buf1);
   17109           7 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17110           7 :   if (!SWIG_IsOK(res2)) {
   17111           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadAddPart" "', argument " "2"" of type '" "char const *""'");
   17112             :   }
   17113           7 :   arg2 = reinterpret_cast< char * >(buf2);
   17114           7 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   17115           7 :   if (!SWIG_IsOK(ecode3)) {
   17116           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultipartUploadAddPart" "', argument " "3"" of type '" "int""'");
   17117             :   } 
   17118           7 :   arg3 = static_cast< int >(val3);
   17119           7 :   {
   17120           7 :     arg4 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[3]);
   17121             :   }
   17122           7 :   {
   17123             :     /* %typemap(in,numinputs=1) (size_t nLen, char *pBuf ) */
   17124           7 :     char* ptr = NULL;
   17125           7 :     if( !GetBufferAsCharPtrSizetSize(swig_obj[4], &arg5, &ptr, &alloc5, &viewIsValid5, &view5) ) {
   17126           0 :       SWIG_fail;
   17127             :     }
   17128           7 :     arg6 = (char *)ptr;
   17129             :   }
   17130           7 :   if (swig_obj[5]) {
   17131           0 :     {
   17132             :       /* %typemap(in) char **dict */
   17133           0 :       arg7 = NULL;
   17134           0 :       if ( PySequence_Check( swig_obj[5] ) ) {
   17135           0 :         int bErr = FALSE;
   17136           0 :         arg7 = CSLFromPySequence(swig_obj[5], &bErr);
   17137           0 :         if ( bErr )
   17138             :         {
   17139           0 :           SWIG_fail;
   17140             :         }
   17141             :       }
   17142           0 :       else if ( PyMapping_Check( swig_obj[5] ) ) {
   17143           0 :         int bErr = FALSE;
   17144           0 :         arg7 = CSLFromPyMapping(swig_obj[5], &bErr);
   17145           0 :         if ( bErr )
   17146             :         {
   17147           0 :           SWIG_fail;
   17148             :         }
   17149             :       }
   17150             :       else {
   17151           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17152           0 :         SWIG_fail;
   17153             :       }
   17154             :     }
   17155             :   }
   17156           7 :   {
   17157           7 :     if (!arg1) {
   17158           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17159             :     }
   17160             :   }
   17161           6 :   {
   17162           6 :     if (!arg2) {
   17163           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17164             :     }
   17165             :   }
   17166           5 :   {
   17167           5 :     const int bLocalUseExceptions = GetUseExceptions();
   17168           5 :     if ( bLocalUseExceptions ) {
   17169           1 :       pushErrorHandler();
   17170             :     }
   17171           5 :     {
   17172           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17173           5 :       result = (retStringAndCPLFree *)MultipartUploadAddPart((char const *)arg1,(char const *)arg2,arg3,arg4,arg5,(char const *)arg6,arg7);
   17174           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17175             :     }
   17176           5 :     if ( bLocalUseExceptions ) {
   17177           1 :       popErrorHandler();
   17178             :     }
   17179             : #ifndef SED_HACKS
   17180             :     if ( bLocalUseExceptions ) {
   17181             :       CPLErr eclass = CPLGetLastErrorType();
   17182             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17183             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17184             :       }
   17185             :     }
   17186             : #endif
   17187             :   }
   17188           5 :   {
   17189             :     /* %typemap(out) (retStringAndCPLFree*) */
   17190           5 :     Py_XDECREF(resultobj);
   17191           5 :     if(result)
   17192             :     {
   17193           2 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   17194           2 :       CPLFree(result);
   17195             :     }
   17196             :     else
   17197             :     {
   17198           3 :       resultobj = Py_None;
   17199           3 :       Py_INCREF(resultobj);
   17200             :     }
   17201             :   }
   17202           5 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17203           5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17204           5 :   {
   17205             :     /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
   17206           5 :     if( viewIsValid5 ) {
   17207           5 :       PyBuffer_Release(&view5);
   17208             :     }
   17209           0 :     else if (ReturnSame(alloc5) == SWIG_NEWOBJ ) {
   17210           0 :       delete[] arg6;
   17211             :     }
   17212             :   }
   17213           5 :   {
   17214             :     /* %typemap(freearg) char **dict */
   17215           5 :     CSLDestroy( arg7 );
   17216             :   }
   17217           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17218             :   return resultobj;
   17219           2 : fail:
   17220           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17221           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17222           2 :   {
   17223             :     /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
   17224           2 :     if( viewIsValid5 ) {
   17225           2 :       PyBuffer_Release(&view5);
   17226             :     }
   17227           0 :     else if (ReturnSame(alloc5) == SWIG_NEWOBJ ) {
   17228           0 :       delete[] arg6;
   17229             :     }
   17230             :   }
   17231           2 :   {
   17232             :     /* %typemap(freearg) char **dict */
   17233           2 :     CSLDestroy( arg7 );
   17234             :   }
   17235             :   return NULL;
   17236             : }
   17237             : 
   17238             : 
   17239           7 : SWIGINTERN PyObject *_wrap_MultipartUploadEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17240           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17241           7 :   char *arg1 = (char *) 0 ;
   17242           7 :   char *arg2 = (char *) 0 ;
   17243           7 :   char **arg3 = (char **) 0 ;
   17244           7 :   GUIntBig arg4 ;
   17245           7 :   char **arg5 = (char **) NULL ;
   17246           7 :   int res1 ;
   17247           7 :   char *buf1 = 0 ;
   17248           7 :   int alloc1 = 0 ;
   17249           7 :   int res2 ;
   17250           7 :   char *buf2 = 0 ;
   17251           7 :   int alloc2 = 0 ;
   17252           7 :   PyObject *swig_obj[5] ;
   17253           7 :   bool result;
   17254             :   
   17255           7 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadEnd", 4, 5, swig_obj)) SWIG_fail;
   17256           7 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17257           7 :   if (!SWIG_IsOK(res1)) {
   17258           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadEnd" "', argument " "1"" of type '" "char const *""'");
   17259             :   }
   17260           7 :   arg1 = reinterpret_cast< char * >(buf1);
   17261           7 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17262           7 :   if (!SWIG_IsOK(res2)) {
   17263           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadEnd" "', argument " "2"" of type '" "char const *""'");
   17264             :   }
   17265           7 :   arg2 = reinterpret_cast< char * >(buf2);
   17266           7 :   {
   17267             :     /* %typemap(in) char **dict */
   17268           7 :     arg3 = NULL;
   17269           7 :     if ( PySequence_Check( swig_obj[2] ) ) {
   17270           7 :       int bErr = FALSE;
   17271           7 :       arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   17272           7 :       if ( bErr )
   17273             :       {
   17274           0 :         SWIG_fail;
   17275             :       }
   17276             :     }
   17277           0 :     else if ( PyMapping_Check( swig_obj[2] ) ) {
   17278           0 :       int bErr = FALSE;
   17279           0 :       arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   17280           0 :       if ( bErr )
   17281             :       {
   17282           0 :         SWIG_fail;
   17283             :       }
   17284             :     }
   17285             :     else {
   17286           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17287           0 :       SWIG_fail;
   17288             :     }
   17289             :   }
   17290           7 :   {
   17291           7 :     arg4 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[3]);
   17292             :   }
   17293           7 :   if (swig_obj[4]) {
   17294           0 :     {
   17295             :       /* %typemap(in) char **dict */
   17296           0 :       arg5 = NULL;
   17297           0 :       if ( PySequence_Check( swig_obj[4] ) ) {
   17298           0 :         int bErr = FALSE;
   17299           0 :         arg5 = CSLFromPySequence(swig_obj[4], &bErr);
   17300           0 :         if ( bErr )
   17301             :         {
   17302           0 :           SWIG_fail;
   17303             :         }
   17304             :       }
   17305           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   17306           0 :         int bErr = FALSE;
   17307           0 :         arg5 = CSLFromPyMapping(swig_obj[4], &bErr);
   17308           0 :         if ( bErr )
   17309             :         {
   17310           0 :           SWIG_fail;
   17311             :         }
   17312             :       }
   17313             :       else {
   17314           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17315           0 :         SWIG_fail;
   17316             :       }
   17317             :     }
   17318             :   }
   17319           7 :   {
   17320           7 :     if (!arg1) {
   17321           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17322             :     }
   17323             :   }
   17324           6 :   {
   17325           6 :     if (!arg2) {
   17326           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17327             :     }
   17328             :   }
   17329           5 :   {
   17330           5 :     const int bLocalUseExceptions = GetUseExceptions();
   17331           5 :     if ( bLocalUseExceptions ) {
   17332           1 :       pushErrorHandler();
   17333             :     }
   17334           5 :     {
   17335           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17336           5 :       result = (bool)MultipartUploadEnd((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
   17337           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17338             :     }
   17339           5 :     if ( bLocalUseExceptions ) {
   17340           1 :       popErrorHandler();
   17341             :     }
   17342             : #ifndef SED_HACKS
   17343             :     if ( bLocalUseExceptions ) {
   17344             :       CPLErr eclass = CPLGetLastErrorType();
   17345             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17346             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17347             :       }
   17348             :     }
   17349             : #endif
   17350             :   }
   17351           5 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   17352           5 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17353           5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17354           5 :   {
   17355             :     /* %typemap(freearg) char **dict */
   17356           5 :     CSLDestroy( arg3 );
   17357             :   }
   17358           5 :   {
   17359             :     /* %typemap(freearg) char **dict */
   17360           5 :     CSLDestroy( arg5 );
   17361             :   }
   17362           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17363             :   return resultobj;
   17364           2 : fail:
   17365           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17366           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17367           2 :   {
   17368             :     /* %typemap(freearg) char **dict */
   17369           2 :     CSLDestroy( arg3 );
   17370             :   }
   17371           2 :   {
   17372             :     /* %typemap(freearg) char **dict */
   17373           2 :     CSLDestroy( arg5 );
   17374             :   }
   17375             :   return NULL;
   17376             : }
   17377             : 
   17378             : 
   17379           8 : SWIGINTERN PyObject *_wrap_MultipartUploadAbort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17380           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17381           8 :   char *arg1 = (char *) 0 ;
   17382           8 :   char *arg2 = (char *) 0 ;
   17383           8 :   char **arg3 = (char **) NULL ;
   17384           8 :   int res1 ;
   17385           8 :   char *buf1 = 0 ;
   17386           8 :   int alloc1 = 0 ;
   17387           8 :   int res2 ;
   17388           8 :   char *buf2 = 0 ;
   17389           8 :   int alloc2 = 0 ;
   17390           8 :   PyObject *swig_obj[3] ;
   17391           8 :   bool result;
   17392             :   
   17393           8 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadAbort", 2, 3, swig_obj)) SWIG_fail;
   17394           8 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17395           8 :   if (!SWIG_IsOK(res1)) {
   17396           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadAbort" "', argument " "1"" of type '" "char const *""'");
   17397             :   }
   17398           8 :   arg1 = reinterpret_cast< char * >(buf1);
   17399           8 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17400           8 :   if (!SWIG_IsOK(res2)) {
   17401           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadAbort" "', argument " "2"" of type '" "char const *""'");
   17402             :   }
   17403           8 :   arg2 = reinterpret_cast< char * >(buf2);
   17404           8 :   if (swig_obj[2]) {
   17405           0 :     {
   17406             :       /* %typemap(in) char **dict */
   17407           0 :       arg3 = NULL;
   17408           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   17409           0 :         int bErr = FALSE;
   17410           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   17411           0 :         if ( bErr )
   17412             :         {
   17413           0 :           SWIG_fail;
   17414             :         }
   17415             :       }
   17416           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   17417           0 :         int bErr = FALSE;
   17418           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   17419           0 :         if ( bErr )
   17420             :         {
   17421           0 :           SWIG_fail;
   17422             :         }
   17423             :       }
   17424             :       else {
   17425           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17426           0 :         SWIG_fail;
   17427             :       }
   17428             :     }
   17429             :   }
   17430           8 :   {
   17431           8 :     if (!arg1) {
   17432           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17433             :     }
   17434             :   }
   17435           7 :   {
   17436           7 :     if (!arg2) {
   17437           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17438             :     }
   17439             :   }
   17440           6 :   {
   17441           6 :     const int bLocalUseExceptions = GetUseExceptions();
   17442           6 :     if ( bLocalUseExceptions ) {
   17443           3 :       pushErrorHandler();
   17444             :     }
   17445           6 :     {
   17446           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17447           6 :       result = (bool)MultipartUploadAbort((char const *)arg1,(char const *)arg2,arg3);
   17448           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17449             :     }
   17450           6 :     if ( bLocalUseExceptions ) {
   17451           3 :       popErrorHandler();
   17452             :     }
   17453             : #ifndef SED_HACKS
   17454             :     if ( bLocalUseExceptions ) {
   17455             :       CPLErr eclass = CPLGetLastErrorType();
   17456             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17457             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17458             :       }
   17459             :     }
   17460             : #endif
   17461             :   }
   17462           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   17463           6 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17464           6 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17465           6 :   {
   17466             :     /* %typemap(freearg) char **dict */
   17467           6 :     CSLDestroy( arg3 );
   17468             :   }
   17469          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17470             :   return resultobj;
   17471           2 : fail:
   17472           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17473           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17474           2 :   {
   17475             :     /* %typemap(freearg) char **dict */
   17476           2 :     CSLDestroy( arg3 );
   17477             :   }
   17478             :   return NULL;
   17479             : }
   17480             : 
   17481             : 
   17482        2479 : SWIGINTERN PyObject *_wrap_MajorObject_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17483        2479 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17484        2479 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17485        2479 :   void *argp1 = 0 ;
   17486        2479 :   int res1 = 0 ;
   17487        2479 :   PyObject *swig_obj[1] ;
   17488        2479 :   char *result = 0 ;
   17489             :   
   17490        2479 :   if (!args) SWIG_fail;
   17491        2479 :   swig_obj[0] = args;
   17492        2479 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17493        2479 :   if (!SWIG_IsOK(res1)) {
   17494           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17495             :   }
   17496        2479 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17497        2479 :   {
   17498        2479 :     const int bLocalUseExceptions = GetUseExceptions();
   17499        2479 :     if ( bLocalUseExceptions ) {
   17500        1244 :       pushErrorHandler();
   17501             :     }
   17502        2479 :     {
   17503        2479 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17504        2479 :       result = (char *)GDALMajorObjectShadow_GetDescription(arg1);
   17505        2479 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17506             :     }
   17507        2479 :     if ( bLocalUseExceptions ) {
   17508        1244 :       popErrorHandler();
   17509             :     }
   17510             : #ifndef SED_HACKS
   17511             :     if ( bLocalUseExceptions ) {
   17512             :       CPLErr eclass = CPLGetLastErrorType();
   17513             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17514             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17515             :       }
   17516             :     }
   17517             : #endif
   17518             :   }
   17519        2479 :   resultobj = SWIG_FromCharPtr((const char *)result);
   17520        2479 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17521             :   return resultobj;
   17522             : fail:
   17523             :   return NULL;
   17524             : }
   17525             : 
   17526             : 
   17527          41 : SWIGINTERN PyObject *_wrap_MajorObject_SetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17528          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17529          41 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17530          41 :   char *arg2 = (char *) 0 ;
   17531          41 :   void *argp1 = 0 ;
   17532          41 :   int res1 = 0 ;
   17533          41 :   int res2 ;
   17534          41 :   char *buf2 = 0 ;
   17535          41 :   int alloc2 = 0 ;
   17536          41 :   PyObject *swig_obj[2] ;
   17537             :   
   17538          41 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetDescription", 2, 2, swig_obj)) SWIG_fail;
   17539          41 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17540          41 :   if (!SWIG_IsOK(res1)) {
   17541           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17542             :   }
   17543          41 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17544          41 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17545          41 :   if (!SWIG_IsOK(res2)) {
   17546           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetDescription" "', argument " "2"" of type '" "char const *""'");
   17547             :   }
   17548          41 :   arg2 = reinterpret_cast< char * >(buf2);
   17549          41 :   {
   17550          41 :     if (!arg2) {
   17551           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17552             :     }
   17553             :   }
   17554          41 :   {
   17555          41 :     const int bLocalUseExceptions = GetUseExceptions();
   17556          41 :     if ( bLocalUseExceptions ) {
   17557          36 :       pushErrorHandler();
   17558             :     }
   17559          41 :     {
   17560          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17561          41 :       GDALMajorObjectShadow_SetDescription(arg1,(char const *)arg2);
   17562          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17563             :     }
   17564          41 :     if ( bLocalUseExceptions ) {
   17565          36 :       popErrorHandler();
   17566             :     }
   17567             : #ifndef SED_HACKS
   17568             :     if ( bLocalUseExceptions ) {
   17569             :       CPLErr eclass = CPLGetLastErrorType();
   17570             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17571             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17572             :       }
   17573             :     }
   17574             : #endif
   17575             :   }
   17576          41 :   resultobj = SWIG_Py_Void();
   17577          41 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17578          41 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17579             :   return resultobj;
   17580           0 : fail:
   17581           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17582             :   return NULL;
   17583             : }
   17584             : 
   17585             : 
   17586          72 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataDomainList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17587          72 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17588          72 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17589          72 :   void *argp1 = 0 ;
   17590          72 :   int res1 = 0 ;
   17591          72 :   PyObject *swig_obj[1] ;
   17592          72 :   char **result = 0 ;
   17593             :   
   17594          72 :   if (!args) SWIG_fail;
   17595          72 :   swig_obj[0] = args;
   17596          72 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17597          72 :   if (!SWIG_IsOK(res1)) {
   17598           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataDomainList" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17599             :   }
   17600          72 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17601          72 :   {
   17602          72 :     const int bLocalUseExceptions = GetUseExceptions();
   17603          72 :     if ( bLocalUseExceptions ) {
   17604          39 :       pushErrorHandler();
   17605             :     }
   17606          72 :     {
   17607          72 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17608          72 :       result = (char **)GDALMajorObjectShadow_GetMetadataDomainList(arg1);
   17609          72 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17610             :     }
   17611          72 :     if ( bLocalUseExceptions ) {
   17612          39 :       popErrorHandler();
   17613             :     }
   17614             : #ifndef SED_HACKS
   17615             :     if ( bLocalUseExceptions ) {
   17616             :       CPLErr eclass = CPLGetLastErrorType();
   17617             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17618             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17619             :       }
   17620             :     }
   17621             : #endif
   17622             :   }
   17623          72 :   {
   17624             :     /* %typemap(out) char **CSL -> ( string ) */
   17625          72 :     bool bErr = false;
   17626          72 :     resultobj = CSLToList(result, &bErr);
   17627          72 :     CSLDestroy(result);
   17628          72 :     if( bErr ) {
   17629           0 :       SWIG_fail;
   17630             :     }
   17631             :   }
   17632          72 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17633             :   return resultobj;
   17634             : fail:
   17635             :   return NULL;
   17636             : }
   17637             : 
   17638             : 
   17639        6882 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_Dict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17640        6882 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17641        6882 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17642        6882 :   char *arg2 = (char *) "" ;
   17643        6882 :   void *argp1 = 0 ;
   17644        6882 :   int res1 = 0 ;
   17645        6882 :   int res2 ;
   17646        6882 :   char *buf2 = 0 ;
   17647        6882 :   int alloc2 = 0 ;
   17648        6882 :   PyObject *swig_obj[2] ;
   17649        6882 :   char **result = 0 ;
   17650             :   
   17651        6882 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_Dict", 1, 2, swig_obj)) SWIG_fail;
   17652        6882 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17653        6882 :   if (!SWIG_IsOK(res1)) {
   17654           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17655             :   }
   17656        6882 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17657        6882 :   if (swig_obj[1]) {
   17658        6793 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17659        6793 :     if (!SWIG_IsOK(res2)) {
   17660           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "2"" of type '" "char const *""'");
   17661             :     }
   17662        6793 :     arg2 = reinterpret_cast< char * >(buf2);
   17663             :   }
   17664        6882 :   {
   17665        6882 :     const int bLocalUseExceptions = GetUseExceptions();
   17666        6882 :     if ( bLocalUseExceptions ) {
   17667        1628 :       pushErrorHandler();
   17668             :     }
   17669        6882 :     {
   17670        6882 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17671        6882 :       result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
   17672        6882 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17673             :     }
   17674        6882 :     if ( bLocalUseExceptions ) {
   17675        1628 :       popErrorHandler();
   17676             :     }
   17677             : #ifndef SED_HACKS
   17678             :     if ( bLocalUseExceptions ) {
   17679             :       CPLErr eclass = CPLGetLastErrorType();
   17680             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17681             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17682             :       }
   17683             :     }
   17684             : #endif
   17685             :   }
   17686        6882 :   {
   17687             :     /* %typemap(out) char **dict */
   17688        6882 :     resultobj = GetCSLStringAsPyDict(result, false);
   17689             :   }
   17690        6882 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17691        6882 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17692             :   return resultobj;
   17693           0 : fail:
   17694           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17695             :   return NULL;
   17696             : }
   17697             : 
   17698             : 
   17699         408 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17700         408 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17701         408 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17702         408 :   char *arg2 = (char *) "" ;
   17703         408 :   void *argp1 = 0 ;
   17704         408 :   int res1 = 0 ;
   17705         408 :   int res2 ;
   17706         408 :   char *buf2 = 0 ;
   17707         408 :   int alloc2 = 0 ;
   17708         408 :   PyObject *swig_obj[2] ;
   17709         408 :   char **result = 0 ;
   17710             :   
   17711         408 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_List", 1, 2, swig_obj)) SWIG_fail;
   17712         408 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17713         408 :   if (!SWIG_IsOK(res1)) {
   17714           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_List" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17715             :   }
   17716         408 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17717         408 :   if (swig_obj[1]) {
   17718         365 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17719         365 :     if (!SWIG_IsOK(res2)) {
   17720           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_List" "', argument " "2"" of type '" "char const *""'");
   17721             :     }
   17722         365 :     arg2 = reinterpret_cast< char * >(buf2);
   17723             :   }
   17724         408 :   {
   17725         408 :     const int bLocalUseExceptions = GetUseExceptions();
   17726         408 :     if ( bLocalUseExceptions ) {
   17727         109 :       pushErrorHandler();
   17728             :     }
   17729         408 :     {
   17730         408 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17731         408 :       result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
   17732         408 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17733             :     }
   17734         408 :     if ( bLocalUseExceptions ) {
   17735         109 :       popErrorHandler();
   17736             :     }
   17737             : #ifndef SED_HACKS
   17738             :     if ( bLocalUseExceptions ) {
   17739             :       CPLErr eclass = CPLGetLastErrorType();
   17740             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17741             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17742             :       }
   17743             :     }
   17744             : #endif
   17745             :   }
   17746         408 :   {
   17747             :     /* %typemap(out) char **options -> ( string ) */
   17748         408 :     bool bErr = false;
   17749         408 :     resultobj = CSLToList(result, &bErr);
   17750         408 :     if( bErr ) {
   17751           0 :       SWIG_fail;
   17752             :     }
   17753             :   }
   17754         408 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17755         408 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17756             :   return resultobj;
   17757           0 : fail:
   17758           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17759             :   return NULL;
   17760             : }
   17761             : 
   17762             : 
   17763             : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   17764             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17765             :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17766             :   char **arg2 = (char **) 0 ;
   17767             :   char *arg3 = (char *) "" ;
   17768             :   void *argp1 = 0 ;
   17769             :   int res1 = 0 ;
   17770             :   int res3 ;
   17771             :   char *buf3 = 0 ;
   17772             :   int alloc3 = 0 ;
   17773             :   CPLErr result;
   17774             :   
   17775             :   if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
   17776             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17777             :   if (!SWIG_IsOK(res1)) {
   17778             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17779             :   }
   17780             :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17781             :   {
   17782             :     /* %typemap(in) char **dict */
   17783             :     arg2 = NULL;
   17784             :     if ( PySequence_Check( swig_obj[1] ) ) {
   17785             :       int bErr = FALSE;
   17786             :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   17787             :       if ( bErr )
   17788             :       {
   17789             :         SWIG_fail;
   17790             :       }
   17791             :     }
   17792             :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   17793             :       int bErr = FALSE;
   17794             :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   17795             :       if ( bErr )
   17796             :       {
   17797             :         SWIG_fail;
   17798             :       }
   17799             :     }
   17800             :     else {
   17801             :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17802             :       SWIG_fail;
   17803             :     }
   17804             :   }
   17805             :   if (swig_obj[2]) {
   17806             :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   17807             :     if (!SWIG_IsOK(res3)) {
   17808             :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
   17809             :     }
   17810             :     arg3 = reinterpret_cast< char * >(buf3);
   17811             :   }
   17812             :   {
   17813             :     const int bLocalUseExceptions = GetUseExceptions();
   17814             :     if ( bLocalUseExceptions ) {
   17815             :       pushErrorHandler();
   17816             :     }
   17817             :     {
   17818             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17819             :       result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3);
   17820             :       SWIG_PYTHON_THREAD_END_ALLOW;
   17821             :     }
   17822             :     if ( bLocalUseExceptions ) {
   17823             :       popErrorHandler();
   17824             :     }
   17825             : #ifndef SED_HACKS
   17826             :     if ( bLocalUseExceptions ) {
   17827             :       CPLErr eclass = CPLGetLastErrorType();
   17828             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17829             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17830             :       }
   17831             :     }
   17832             : #endif
   17833             :   }
   17834             :   resultobj = SWIG_From_int(static_cast< int >(result));
   17835             :   {
   17836             :     /* %typemap(freearg) char **dict */
   17837             :     CSLDestroy( arg2 );
   17838             :   }
   17839             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17840             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17841             :   return resultobj;
   17842             : fail:
   17843             :   {
   17844             :     /* %typemap(freearg) char **dict */
   17845             :     CSLDestroy( arg2 );
   17846             :   }
   17847             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17848             :   return NULL;
   17849             : }
   17850             : 
   17851             : 
   17852             : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   17853             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17854             :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17855             :   char *arg2 = (char *) 0 ;
   17856             :   char *arg3 = (char *) "" ;
   17857             :   void *argp1 = 0 ;
   17858             :   int res1 = 0 ;
   17859             :   int res2 ;
   17860             :   char *buf2 = 0 ;
   17861             :   int alloc2 = 0 ;
   17862             :   int res3 ;
   17863             :   char *buf3 = 0 ;
   17864             :   int alloc3 = 0 ;
   17865             :   CPLErr result;
   17866             :   
   17867             :   if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
   17868             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17869             :   if (!SWIG_IsOK(res1)) {
   17870             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17871             :   }
   17872             :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17873             :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17874             :   if (!SWIG_IsOK(res2)) {
   17875             :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadata" "', argument " "2"" of type '" "char *""'");
   17876             :   }
   17877             :   arg2 = reinterpret_cast< char * >(buf2);
   17878             :   if (swig_obj[2]) {
   17879             :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   17880             :     if (!SWIG_IsOK(res3)) {
   17881             :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
   17882             :     }
   17883             :     arg3 = reinterpret_cast< char * >(buf3);
   17884             :   }
   17885             :   {
   17886             :     const int bLocalUseExceptions = GetUseExceptions();
   17887             :     if ( bLocalUseExceptions ) {
   17888             :       pushErrorHandler();
   17889             :     }
   17890             :     {
   17891             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17892             :       result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_1(arg1,arg2,(char const *)arg3);
   17893             :       SWIG_PYTHON_THREAD_END_ALLOW;
   17894             :     }
   17895             :     if ( bLocalUseExceptions ) {
   17896             :       popErrorHandler();
   17897             :     }
   17898             : #ifndef SED_HACKS
   17899             :     if ( bLocalUseExceptions ) {
   17900             :       CPLErr eclass = CPLGetLastErrorType();
   17901             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17902             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17903             :       }
   17904             :     }
   17905             : #endif
   17906             :   }
   17907             :   resultobj = SWIG_From_int(static_cast< int >(result));
   17908             :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17909             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17910             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17911             :   return resultobj;
   17912             : fail:
   17913             :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17914             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17915             :   return NULL;
   17916             : }
   17917             : 
   17918             : 
   17919         276 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata(PyObject *self, PyObject *args) {
   17920         276 :   Py_ssize_t argc;
   17921         276 :   PyObject *argv[4] = {
   17922             :     0
   17923             :   };
   17924             :   
   17925         276 :   if (!(argc = SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadata", 0, 3, argv))) SWIG_fail;
   17926         276 :   --argc;
   17927         276 :   if ((argc >= 2) && (argc <= 3)) {
   17928         276 :     int _v;
   17929         276 :     void *vptr = 0;
   17930         276 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
   17931         297 :     _v = SWIG_CheckState(res);
   17932         276 :     if (_v) {
   17933         276 :       {
   17934             :         /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
   17935             :         /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
   17936             :         /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
   17937             :         /* (see #4816) */
   17938         276 :         _v = ((PyMapping_Check(argv[1]) || PySequence_Check(argv[1]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0)) ) ? 1 : 0;
   17939             :       }
   17940         255 :       if (_v) {
   17941         255 :         if (argc <= 2) {
   17942         255 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
   17943             :         }
   17944         107 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
   17945         107 :         _v = SWIG_CheckState(res);
   17946         107 :         if (_v) {
   17947         107 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
   17948             :         }
   17949             :       }
   17950             :     }
   17951             :   }
   17952          21 :   if ((argc >= 2) && (argc <= 3)) {
   17953          21 :     int _v;
   17954          21 :     void *vptr = 0;
   17955          21 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
   17956          22 :     _v = SWIG_CheckState(res);
   17957          21 :     if (_v) {
   17958          21 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
   17959          21 :       _v = SWIG_CheckState(res);
   17960          20 :       if (_v) {
   17961          20 :         if (argc <= 2) {
   17962          20 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
   17963             :         }
   17964          16 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
   17965          16 :         _v = SWIG_CheckState(res);
   17966          16 :         if (_v) {
   17967          16 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
   17968             :         }
   17969             :       }
   17970             :     }
   17971             :   }
   17972             :   
   17973           0 : fail:
   17974           1 :   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'MajorObject_SetMetadata'.\n"
   17975             :     "  Possible C/C++ prototypes are:\n"
   17976             :     "    GDALMajorObjectShadow::SetMetadata(char **,char const *)\n"
   17977             :     "    GDALMajorObjectShadow::SetMetadata(char *,char const *)\n");
   17978             :   return 0;
   17979             : }
   17980             : 
   17981             : 
   17982       55946 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17983       55946 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17984       55946 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17985       55946 :   char *arg2 = (char *) 0 ;
   17986       55946 :   char *arg3 = (char *) "" ;
   17987       55946 :   void *argp1 = 0 ;
   17988       55946 :   int res1 = 0 ;
   17989       55946 :   int res2 ;
   17990       55946 :   char *buf2 = 0 ;
   17991       55946 :   int alloc2 = 0 ;
   17992       55946 :   int res3 ;
   17993       55946 :   char *buf3 = 0 ;
   17994       55946 :   int alloc3 = 0 ;
   17995       55946 :   PyObject *swig_obj[3] ;
   17996       55946 :   char *result = 0 ;
   17997             :   
   17998       55946 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadataItem", 2, 3, swig_obj)) SWIG_fail;
   17999       55946 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   18000       55946 :   if (!SWIG_IsOK(res1)) {
   18001           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   18002             :   }
   18003       55946 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   18004       55946 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   18005       55946 :   if (!SWIG_IsOK(res2)) {
   18006           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
   18007             :   }
   18008       55946 :   arg2 = reinterpret_cast< char * >(buf2);
   18009       55946 :   if (swig_obj[2]) {
   18010        6941 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   18011        6941 :     if (!SWIG_IsOK(res3)) {
   18012           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_GetMetadataItem" "', argument " "3"" of type '" "char const *""'");
   18013             :     }
   18014        6941 :     arg3 = reinterpret_cast< char * >(buf3);
   18015             :   }
   18016       55946 :   {
   18017       55946 :     if (!arg2) {
   18018           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18019             :     }
   18020             :   }
   18021       55946 :   {
   18022       55946 :     const int bLocalUseExceptions = GetUseExceptions();
   18023       55946 :     if ( bLocalUseExceptions ) {
   18024       51541 :       pushErrorHandler();
   18025             :     }
   18026       55946 :     {
   18027       55946 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18028       55946 :       result = (char *)GDALMajorObjectShadow_GetMetadataItem(arg1,(char const *)arg2,(char const *)arg3);
   18029       55946 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18030             :     }
   18031       55946 :     if ( bLocalUseExceptions ) {
   18032       51541 :       popErrorHandler();
   18033             :     }
   18034             : #ifndef SED_HACKS
   18035             :     if ( bLocalUseExceptions ) {
   18036             :       CPLErr eclass = CPLGetLastErrorType();
   18037             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18038             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18039             :       }
   18040             :     }
   18041             : #endif
   18042             :   }
   18043       55946 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18044       55946 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18045       55946 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18046       55948 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18047             :   return resultobj;
   18048           0 : fail:
   18049           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18050           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18051             :   return NULL;
   18052             : }
   18053             : 
   18054             : 
   18055         474 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18056         474 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18057         474 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   18058         474 :   char *arg2 = (char *) 0 ;
   18059         474 :   char *arg3 = (char *) 0 ;
   18060         474 :   char *arg4 = (char *) "" ;
   18061         474 :   void *argp1 = 0 ;
   18062         474 :   int res1 = 0 ;
   18063         474 :   int res2 ;
   18064         474 :   char *buf2 = 0 ;
   18065         474 :   int alloc2 = 0 ;
   18066         474 :   int res3 ;
   18067         474 :   char *buf3 = 0 ;
   18068         474 :   int alloc3 = 0 ;
   18069         474 :   int res4 ;
   18070         474 :   char *buf4 = 0 ;
   18071         474 :   int alloc4 = 0 ;
   18072         474 :   PyObject *swig_obj[4] ;
   18073         474 :   CPLErr result;
   18074             :   
   18075         474 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadataItem", 3, 4, swig_obj)) SWIG_fail;
   18076         474 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   18077         474 :   if (!SWIG_IsOK(res1)) {
   18078           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   18079             :   }
   18080         474 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   18081         474 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   18082         474 :   if (!SWIG_IsOK(res2)) {
   18083           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadataItem" "', argument " "2"" of type '" "char const *""'");
   18084             :   }
   18085         474 :   arg2 = reinterpret_cast< char * >(buf2);
   18086         474 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   18087         474 :   if (!SWIG_IsOK(res3)) {
   18088           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadataItem" "', argument " "3"" of type '" "char const *""'");
   18089             :   }
   18090         474 :   arg3 = reinterpret_cast< char * >(buf3);
   18091         474 :   if (swig_obj[3]) {
   18092          69 :     res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
   18093          69 :     if (!SWIG_IsOK(res4)) {
   18094           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MajorObject_SetMetadataItem" "', argument " "4"" of type '" "char const *""'");
   18095             :     }
   18096          69 :     arg4 = reinterpret_cast< char * >(buf4);
   18097             :   }
   18098         474 :   {
   18099         474 :     if (!arg2) {
   18100           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18101             :     }
   18102             :   }
   18103         474 :   {
   18104         474 :     const int bLocalUseExceptions = GetUseExceptions();
   18105         474 :     if ( bLocalUseExceptions ) {
   18106         118 :       pushErrorHandler();
   18107             :     }
   18108         474 :     {
   18109         474 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18110         474 :       result = (CPLErr)GDALMajorObjectShadow_SetMetadataItem(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
   18111         474 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18112             :     }
   18113         474 :     if ( bLocalUseExceptions ) {
   18114         118 :       popErrorHandler();
   18115             :     }
   18116             : #ifndef SED_HACKS
   18117             :     if ( bLocalUseExceptions ) {
   18118             :       CPLErr eclass = CPLGetLastErrorType();
   18119             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18120             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18121             :       }
   18122             :     }
   18123             : #endif
   18124             :   }
   18125         474 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18126         474 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18127         474 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18128         474 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   18129         474 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18130             :   return resultobj;
   18131           0 : fail:
   18132           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18133           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18134           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   18135             :   return NULL;
   18136             : }
   18137             : 
   18138             : 
   18139         276 : SWIGINTERN PyObject *MajorObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18140         276 :   PyObject *obj;
   18141         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   18142         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMajorObjectShadow, SWIG_NewClientData(obj));
   18143         276 :   return SWIG_Py_Void();
   18144             : }
   18145             : 
   18146       96564 : SWIGINTERN PyObject *_wrap_Driver_ShortName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18147       96564 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18148       96564 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18149       96564 :   void *argp1 = 0 ;
   18150       96564 :   int res1 = 0 ;
   18151       96564 :   PyObject *swig_obj[1] ;
   18152       96564 :   char *result = 0 ;
   18153             :   
   18154       96564 :   if (!args) SWIG_fail;
   18155       96564 :   swig_obj[0] = args;
   18156       96564 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18157       96564 :   if (!SWIG_IsOK(res1)) {
   18158           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_ShortName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18159             :   }
   18160       96564 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18161       96564 :   {
   18162       96564 :     const int bLocalUseExceptions = GetUseExceptions();
   18163       96564 :     if ( bLocalUseExceptions ) {
   18164       50566 :       pushErrorHandler();
   18165             :     }
   18166       96564 :     {
   18167       96564 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18168       96564 :       result = (char *)GDALDriverShadow_ShortName_get(arg1);
   18169       96564 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18170             :     }
   18171       96564 :     if ( bLocalUseExceptions ) {
   18172       50566 :       popErrorHandler();
   18173             :     }
   18174             : #ifndef SED_HACKS
   18175             :     if ( bLocalUseExceptions ) {
   18176             :       CPLErr eclass = CPLGetLastErrorType();
   18177             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18178             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18179             :       }
   18180             :     }
   18181             : #endif
   18182             :   }
   18183       96564 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18184       96564 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18185             :   return resultobj;
   18186             : fail:
   18187             :   return NULL;
   18188             : }
   18189             : 
   18190             : 
   18191          17 : SWIGINTERN PyObject *_wrap_Driver_LongName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18192          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18193          17 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18194          17 :   void *argp1 = 0 ;
   18195          17 :   int res1 = 0 ;
   18196          17 :   PyObject *swig_obj[1] ;
   18197          17 :   char *result = 0 ;
   18198             :   
   18199          17 :   if (!args) SWIG_fail;
   18200          17 :   swig_obj[0] = args;
   18201          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18202          17 :   if (!SWIG_IsOK(res1)) {
   18203           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_LongName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18204             :   }
   18205          17 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18206          17 :   {
   18207          17 :     const int bLocalUseExceptions = GetUseExceptions();
   18208          17 :     if ( bLocalUseExceptions ) {
   18209           0 :       pushErrorHandler();
   18210             :     }
   18211          17 :     {
   18212          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18213          17 :       result = (char *)GDALDriverShadow_LongName_get(arg1);
   18214          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18215             :     }
   18216          17 :     if ( bLocalUseExceptions ) {
   18217           0 :       popErrorHandler();
   18218             :     }
   18219             : #ifndef SED_HACKS
   18220             :     if ( bLocalUseExceptions ) {
   18221             :       CPLErr eclass = CPLGetLastErrorType();
   18222             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18223             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18224             :       }
   18225             :     }
   18226             : #endif
   18227             :   }
   18228          17 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18229          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18230             :   return resultobj;
   18231             : fail:
   18232             :   return NULL;
   18233             : }
   18234             : 
   18235             : 
   18236           0 : SWIGINTERN PyObject *_wrap_Driver_HelpTopic_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18237           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18238           0 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18239           0 :   void *argp1 = 0 ;
   18240           0 :   int res1 = 0 ;
   18241           0 :   PyObject *swig_obj[1] ;
   18242           0 :   char *result = 0 ;
   18243             :   
   18244           0 :   if (!args) SWIG_fail;
   18245           0 :   swig_obj[0] = args;
   18246           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18247           0 :   if (!SWIG_IsOK(res1)) {
   18248           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_HelpTopic_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18249             :   }
   18250           0 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18251           0 :   {
   18252           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18253           0 :     if ( bLocalUseExceptions ) {
   18254           0 :       pushErrorHandler();
   18255             :     }
   18256           0 :     {
   18257           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18258           0 :       result = (char *)GDALDriverShadow_HelpTopic_get(arg1);
   18259           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18260             :     }
   18261           0 :     if ( bLocalUseExceptions ) {
   18262           0 :       popErrorHandler();
   18263             :     }
   18264             : #ifndef SED_HACKS
   18265             :     if ( bLocalUseExceptions ) {
   18266             :       CPLErr eclass = CPLGetLastErrorType();
   18267             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18268             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18269             :       }
   18270             :     }
   18271             : #endif
   18272             :   }
   18273           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18274           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18275             :   return resultobj;
   18276             : fail:
   18277             :   return NULL;
   18278             : }
   18279             : 
   18280             : 
   18281       16348 : SWIGINTERN PyObject *_wrap_Driver_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18282       16348 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18283       16348 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18284       16348 :   char *arg2 = (char *) 0 ;
   18285       16348 :   int arg3 ;
   18286       16348 :   int arg4 ;
   18287       16348 :   int arg5 = (int) 1 ;
   18288       16348 :   GDALDataType arg6 = (GDALDataType) GDT_Byte ;
   18289       16348 :   char **arg7 = (char **) 0 ;
   18290       16348 :   void *argp1 = 0 ;
   18291       16348 :   int res1 = 0 ;
   18292       16348 :   int bToFree2 = 0 ;
   18293       16348 :   int val3 ;
   18294       16348 :   int ecode3 = 0 ;
   18295       16348 :   int val4 ;
   18296       16348 :   int ecode4 = 0 ;
   18297       16348 :   int val5 ;
   18298       16348 :   int ecode5 = 0 ;
   18299       16348 :   PyObject * obj0 = 0 ;
   18300       16348 :   PyObject * obj1 = 0 ;
   18301       16348 :   PyObject * obj2 = 0 ;
   18302       16348 :   PyObject * obj3 = 0 ;
   18303       16348 :   PyObject * obj4 = 0 ;
   18304       16348 :   PyObject * obj5 = 0 ;
   18305       16348 :   PyObject * obj6 = 0 ;
   18306       16348 :   char * kwnames[] = {
   18307             :     (char *)"self",  (char *)"utf8_path",  (char *)"xsize",  (char *)"ysize",  (char *)"bands",  (char *)"eType",  (char *)"options",  NULL 
   18308             :   };
   18309       16348 :   GDALDatasetShadow *result = 0 ;
   18310             :   
   18311       16348 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:Driver_Create", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   18312       16348 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18313       16348 :   if (!SWIG_IsOK(res1)) {
   18314           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Create" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18315             :   }
   18316       16348 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18317       16348 :   {
   18318             :     /* %typemap(in) (const char *utf8_path) */
   18319       16348 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18320             :     {
   18321       12933 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18322             :     }
   18323             :     else
   18324             :     {
   18325        3415 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18326             :       
   18327             :     }
   18328       16348 :     if (arg2 == NULL)
   18329             :     {
   18330           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18331           0 :       SWIG_fail;
   18332             :     }
   18333             :   }
   18334       16348 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   18335       16348 :   if (!SWIG_IsOK(ecode3)) {
   18336           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Driver_Create" "', argument " "3"" of type '" "int""'");
   18337             :   } 
   18338       16348 :   arg3 = static_cast< int >(val3);
   18339       16348 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   18340       16348 :   if (!SWIG_IsOK(ecode4)) {
   18341           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_Create" "', argument " "4"" of type '" "int""'");
   18342             :   } 
   18343       16348 :   arg4 = static_cast< int >(val4);
   18344       16348 :   if (obj4) {
   18345       14877 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   18346       14877 :     if (!SWIG_IsOK(ecode5)) {
   18347           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Driver_Create" "', argument " "5"" of type '" "int""'");
   18348             :     } 
   18349             :     arg5 = static_cast< int >(val5);
   18350             :   }
   18351       16348 :   if (obj5) {
   18352        8594 :     {
   18353        8594 :       if (PyInt_Check(obj5))
   18354             :       {
   18355        8590 :         arg6 = static_cast<GDALDataType>(PyInt_AsLong(obj5));
   18356             :       }
   18357             :       else
   18358             :       {
   18359           4 :         PyObject* gdal_array = PyImport_ImportModule("osgeo.gdal_array");
   18360           4 :         if (gdal_array) 
   18361             :         {
   18362           4 :           PyObject* dict = PyModule_GetDict(gdal_array);
   18363           4 :           PyObject* fn = PyDict_GetItemString(dict, "NumericTypeCodeToGDALTypeCode");
   18364           4 :           PyObject* type_code = PyObject_CallFunctionObjArgs(fn, obj5, NULL);
   18365             :           
   18366           4 :           Py_DECREF(gdal_array);
   18367           4 :           if (type_code && PyInt_Check(type_code))
   18368             :           {
   18369           2 :             arg6 = static_cast<GDALDataType>(PyInt_AsLong(type_code));
   18370           2 :             Py_DECREF(type_code);
   18371             :           }
   18372             :           else
   18373             :           {
   18374           2 :             Py_XDECREF(type_code);
   18375           2 :             PyErr_SetString(PyExc_RuntimeError, "type must be a GDAL data type code or NumPy type");
   18376           2 :             SWIG_fail;
   18377             :           }
   18378             :         }
   18379             :         else
   18380             :         {
   18381           0 :           PyErr_SetString(PyExc_RuntimeError, "gdal_array module is not available; type must be a specified as a GDAL data type code");
   18382           0 :           SWIG_fail;
   18383             :         }
   18384             :       }
   18385             :     }
   18386             :   }
   18387       16346 :   if (obj6) {
   18388        4101 :     {
   18389             :       /* %typemap(in) char **dict */
   18390        4101 :       arg7 = NULL;
   18391        4101 :       if ( PySequence_Check( obj6 ) ) {
   18392        4079 :         int bErr = FALSE;
   18393        4079 :         arg7 = CSLFromPySequence(obj6, &bErr);
   18394        4079 :         if ( bErr )
   18395             :         {
   18396           0 :           SWIG_fail;
   18397             :         }
   18398             :       }
   18399          22 :       else if ( PyMapping_Check( obj6 ) ) {
   18400          22 :         int bErr = FALSE;
   18401          22 :         arg7 = CSLFromPyMapping(obj6, &bErr);
   18402          22 :         if ( bErr )
   18403             :         {
   18404           0 :           SWIG_fail;
   18405             :         }
   18406             :       }
   18407             :       else {
   18408           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18409           0 :         SWIG_fail;
   18410             :       }
   18411             :     }
   18412             :   }
   18413       16346 :   {
   18414       16346 :     if (!arg2) {
   18415       16346 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18416             :     }
   18417             :   }
   18418       16346 :   {
   18419       16346 :     const int bLocalUseExceptions = GetUseExceptions();
   18420       16346 :     if ( bLocalUseExceptions ) {
   18421        4752 :       pushErrorHandler();
   18422             :     }
   18423       16346 :     {
   18424       16346 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18425       16346 :       result = (GDALDatasetShadow *)GDALDriverShadow_Create(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   18426       16346 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18427             :     }
   18428       16346 :     if ( bLocalUseExceptions ) {
   18429        4752 :       popErrorHandler();
   18430             :     }
   18431             : #ifndef SED_HACKS
   18432             :     if ( bLocalUseExceptions ) {
   18433             :       CPLErr eclass = CPLGetLastErrorType();
   18434             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18435             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18436             :       }
   18437             :     }
   18438             : #endif
   18439             :   }
   18440       16346 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   18441       16346 :   {
   18442             :     /* %typemap(freearg) (const char *utf8_path) */
   18443       16346 :     GDALPythonFreeCStr(arg2, bToFree2);
   18444             :   }
   18445       16346 :   {
   18446             :     /* %typemap(freearg) char **dict */
   18447       16346 :     CSLDestroy( arg7 );
   18448             :   }
   18449       16378 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18450             :   return resultobj;
   18451           2 : fail:
   18452           2 :   {
   18453             :     /* %typemap(freearg) (const char *utf8_path) */
   18454           2 :     GDALPythonFreeCStr(arg2, bToFree2);
   18455             :   }
   18456           2 :   {
   18457             :     /* %typemap(freearg) char **dict */
   18458           2 :     CSLDestroy( arg7 );
   18459             :   }
   18460             :   return NULL;
   18461             : }
   18462             : 
   18463             : 
   18464          53 : SWIGINTERN PyObject *_wrap_Driver_CreateVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18465          53 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18466          53 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18467          53 :   char *arg2 = (char *) 0 ;
   18468          53 :   char **arg3 = (char **) 0 ;
   18469          53 :   void *argp1 = 0 ;
   18470          53 :   int res1 = 0 ;
   18471          53 :   int bToFree2 = 0 ;
   18472          53 :   PyObject * obj0 = 0 ;
   18473          53 :   PyObject * obj1 = 0 ;
   18474          53 :   PyObject * obj2 = 0 ;
   18475          53 :   char * kwnames[] = {
   18476             :     (char *)"self",  (char *)"utf8_path",  (char *)"options",  NULL 
   18477             :   };
   18478          53 :   GDALDatasetShadow *result = 0 ;
   18479             :   
   18480          53 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Driver_CreateVector", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   18481          53 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18482          53 :   if (!SWIG_IsOK(res1)) {
   18483           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateVector" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18484             :   }
   18485          53 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18486          53 :   {
   18487             :     /* %typemap(in) (const char *utf8_path) */
   18488          53 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18489             :     {
   18490          34 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18491             :     }
   18492             :     else
   18493             :     {
   18494          19 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18495             :       
   18496             :     }
   18497          53 :     if (arg2 == NULL)
   18498             :     {
   18499           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18500           0 :       SWIG_fail;
   18501             :     }
   18502             :   }
   18503          53 :   if (obj2) {
   18504           0 :     {
   18505             :       /* %typemap(in) char **dict */
   18506           0 :       arg3 = NULL;
   18507           0 :       if ( PySequence_Check( obj2 ) ) {
   18508           0 :         int bErr = FALSE;
   18509           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   18510           0 :         if ( bErr )
   18511             :         {
   18512           0 :           SWIG_fail;
   18513             :         }
   18514             :       }
   18515           0 :       else if ( PyMapping_Check( obj2 ) ) {
   18516           0 :         int bErr = FALSE;
   18517           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   18518           0 :         if ( bErr )
   18519             :         {
   18520           0 :           SWIG_fail;
   18521             :         }
   18522             :       }
   18523             :       else {
   18524           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18525           0 :         SWIG_fail;
   18526             :       }
   18527             :     }
   18528             :   }
   18529          53 :   {
   18530          53 :     if (!arg2) {
   18531          53 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18532             :     }
   18533             :   }
   18534          53 :   {
   18535          53 :     const int bLocalUseExceptions = GetUseExceptions();
   18536          53 :     if ( bLocalUseExceptions ) {
   18537          53 :       pushErrorHandler();
   18538             :     }
   18539          53 :     {
   18540          53 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18541          53 :       result = (GDALDatasetShadow *)GDALDriverShadow_CreateVector(arg1,(char const *)arg2,arg3);
   18542          53 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18543             :     }
   18544          53 :     if ( bLocalUseExceptions ) {
   18545          53 :       popErrorHandler();
   18546             :     }
   18547             : #ifndef SED_HACKS
   18548             :     if ( bLocalUseExceptions ) {
   18549             :       CPLErr eclass = CPLGetLastErrorType();
   18550             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18551             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18552             :       }
   18553             :     }
   18554             : #endif
   18555             :   }
   18556          53 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   18557          53 :   {
   18558             :     /* %typemap(freearg) (const char *utf8_path) */
   18559          53 :     GDALPythonFreeCStr(arg2, bToFree2);
   18560             :   }
   18561          53 :   {
   18562             :     /* %typemap(freearg) char **dict */
   18563          53 :     CSLDestroy( arg3 );
   18564             :   }
   18565          53 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18566             :   return resultobj;
   18567           0 : fail:
   18568           0 :   {
   18569             :     /* %typemap(freearg) (const char *utf8_path) */
   18570           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   18571             :   }
   18572           0 :   {
   18573             :     /* %typemap(freearg) char **dict */
   18574           0 :     CSLDestroy( arg3 );
   18575             :   }
   18576             :   return NULL;
   18577             : }
   18578             : 
   18579             : 
   18580         419 : SWIGINTERN PyObject *_wrap_Driver_CreateMultiDimensional(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18581         419 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18582         419 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18583         419 :   char *arg2 = (char *) 0 ;
   18584         419 :   char **arg3 = (char **) 0 ;
   18585         419 :   char **arg4 = (char **) 0 ;
   18586         419 :   void *argp1 = 0 ;
   18587         419 :   int res1 = 0 ;
   18588         419 :   int bToFree2 = 0 ;
   18589         419 :   PyObject * obj0 = 0 ;
   18590         419 :   PyObject * obj1 = 0 ;
   18591         419 :   PyObject * obj2 = 0 ;
   18592         419 :   PyObject * obj3 = 0 ;
   18593         419 :   char * kwnames[] = {
   18594             :     (char *)"self",  (char *)"utf8_path",  (char *)"root_group_options",  (char *)"options",  NULL 
   18595             :   };
   18596         419 :   GDALDatasetShadow *result = 0 ;
   18597             :   
   18598         419 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Driver_CreateMultiDimensional", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   18599         419 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18600         419 :   if (!SWIG_IsOK(res1)) {
   18601           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateMultiDimensional" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18602             :   }
   18603         419 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18604         419 :   {
   18605             :     /* %typemap(in) (const char *utf8_path) */
   18606         419 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18607             :     {
   18608         238 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18609             :     }
   18610             :     else
   18611             :     {
   18612         181 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18613             :       
   18614             :     }
   18615         419 :     if (arg2 == NULL)
   18616             :     {
   18617           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18618           0 :       SWIG_fail;
   18619             :     }
   18620             :   }
   18621         419 :   if (obj2) {
   18622           1 :     {
   18623             :       /* %typemap(in) char **dict */
   18624           1 :       arg3 = NULL;
   18625           1 :       if ( PySequence_Check( obj2 ) ) {
   18626           1 :         int bErr = FALSE;
   18627           1 :         arg3 = CSLFromPySequence(obj2, &bErr);
   18628           1 :         if ( bErr )
   18629             :         {
   18630           0 :           SWIG_fail;
   18631             :         }
   18632             :       }
   18633           0 :       else if ( PyMapping_Check( obj2 ) ) {
   18634           0 :         int bErr = FALSE;
   18635           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   18636           0 :         if ( bErr )
   18637             :         {
   18638           0 :           SWIG_fail;
   18639             :         }
   18640             :       }
   18641             :       else {
   18642           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18643           0 :         SWIG_fail;
   18644             :       }
   18645             :     }
   18646             :   }
   18647         419 :   if (obj3) {
   18648         213 :     {
   18649             :       /* %typemap(in) char **dict */
   18650         213 :       arg4 = NULL;
   18651         213 :       if ( PySequence_Check( obj3 ) ) {
   18652         213 :         int bErr = FALSE;
   18653         213 :         arg4 = CSLFromPySequence(obj3, &bErr);
   18654         213 :         if ( bErr )
   18655             :         {
   18656           0 :           SWIG_fail;
   18657             :         }
   18658             :       }
   18659           0 :       else if ( PyMapping_Check( obj3 ) ) {
   18660           0 :         int bErr = FALSE;
   18661           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   18662           0 :         if ( bErr )
   18663             :         {
   18664           0 :           SWIG_fail;
   18665             :         }
   18666             :       }
   18667             :       else {
   18668           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18669           0 :         SWIG_fail;
   18670             :       }
   18671             :     }
   18672             :   }
   18673         419 :   {
   18674         419 :     if (!arg2) {
   18675         419 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18676             :     }
   18677             :   }
   18678         419 :   {
   18679         419 :     const int bLocalUseExceptions = GetUseExceptions();
   18680         419 :     if ( bLocalUseExceptions ) {
   18681         104 :       pushErrorHandler();
   18682             :     }
   18683         419 :     {
   18684         419 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18685         419 :       result = (GDALDatasetShadow *)GDALDriverShadow_CreateMultiDimensional(arg1,(char const *)arg2,arg3,arg4);
   18686         419 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18687             :     }
   18688         419 :     if ( bLocalUseExceptions ) {
   18689         104 :       popErrorHandler();
   18690             :     }
   18691             : #ifndef SED_HACKS
   18692             :     if ( bLocalUseExceptions ) {
   18693             :       CPLErr eclass = CPLGetLastErrorType();
   18694             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18695             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18696             :       }
   18697             :     }
   18698             : #endif
   18699             :   }
   18700         419 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   18701         419 :   {
   18702             :     /* %typemap(freearg) (const char *utf8_path) */
   18703         419 :     GDALPythonFreeCStr(arg2, bToFree2);
   18704             :   }
   18705         419 :   {
   18706             :     /* %typemap(freearg) char **dict */
   18707         419 :     CSLDestroy( arg3 );
   18708             :   }
   18709         419 :   {
   18710             :     /* %typemap(freearg) char **dict */
   18711         419 :     CSLDestroy( arg4 );
   18712             :   }
   18713         419 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18714             :   return resultobj;
   18715           0 : fail:
   18716           0 :   {
   18717             :     /* %typemap(freearg) (const char *utf8_path) */
   18718           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   18719             :   }
   18720           0 :   {
   18721             :     /* %typemap(freearg) char **dict */
   18722           0 :     CSLDestroy( arg3 );
   18723             :   }
   18724           0 :   {
   18725             :     /* %typemap(freearg) char **dict */
   18726           0 :     CSLDestroy( arg4 );
   18727             :   }
   18728             :   return NULL;
   18729             : }
   18730             : 
   18731             : 
   18732        3828 : SWIGINTERN PyObject *_wrap_Driver_CreateCopy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18733        3828 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18734        3828 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18735        3828 :   char *arg2 = (char *) 0 ;
   18736        3828 :   GDALDatasetShadow *arg3 = (GDALDatasetShadow *) 0 ;
   18737        3828 :   int arg4 = (int) 1 ;
   18738        3828 :   char **arg5 = (char **) 0 ;
   18739        3828 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   18740        3828 :   void *arg7 = (void *) NULL ;
   18741        3828 :   void *argp1 = 0 ;
   18742        3828 :   int res1 = 0 ;
   18743        3828 :   int bToFree2 = 0 ;
   18744        3828 :   void *argp3 = 0 ;
   18745        3828 :   int res3 = 0 ;
   18746        3828 :   int val4 ;
   18747        3828 :   int ecode4 = 0 ;
   18748        3828 :   PyObject * obj0 = 0 ;
   18749        3828 :   PyObject * obj1 = 0 ;
   18750        3828 :   PyObject * obj2 = 0 ;
   18751        3828 :   PyObject * obj3 = 0 ;
   18752        3828 :   PyObject * obj4 = 0 ;
   18753        3828 :   PyObject * obj5 = 0 ;
   18754        3828 :   PyObject * obj6 = 0 ;
   18755        3828 :   char * kwnames[] = {
   18756             :     (char *)"self",  (char *)"utf8_path",  (char *)"src",  (char *)"strict",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   18757             :   };
   18758        3828 :   GDALDatasetShadow *result = 0 ;
   18759             :   
   18760             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18761        3828 :   PyProgressData *psProgressInfo;
   18762        3828 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18763        3828 :   psProgressInfo->nLastReported = -1;
   18764        3828 :   psProgressInfo->psPyCallback = NULL;
   18765        3828 :   psProgressInfo->psPyCallbackData = NULL;
   18766        3828 :   arg7 = psProgressInfo;
   18767        3828 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOOO:Driver_CreateCopy", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   18768        3828 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18769        3828 :   if (!SWIG_IsOK(res1)) {
   18770           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateCopy" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18771             :   }
   18772        3828 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18773        3828 :   {
   18774             :     /* %typemap(in) (const char *utf8_path) */
   18775        3828 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18776             :     {
   18777        3715 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18778             :     }
   18779             :     else
   18780             :     {
   18781         113 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18782             :       
   18783             :     }
   18784        3828 :     if (arg2 == NULL)
   18785             :     {
   18786           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18787           0 :       SWIG_fail;
   18788             :     }
   18789             :   }
   18790        3828 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   18791        3828 :   if (!SWIG_IsOK(res3)) {
   18792           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_CreateCopy" "', argument " "3"" of type '" "GDALDatasetShadow *""'"); 
   18793             :   }
   18794        3828 :   arg3 = reinterpret_cast< GDALDatasetShadow * >(argp3);
   18795        3828 :   if (obj3) {
   18796         483 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
   18797         483 :     if (!SWIG_IsOK(ecode4)) {
   18798           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_CreateCopy" "', argument " "4"" of type '" "int""'");
   18799             :     } 
   18800             :     arg4 = static_cast< int >(val4);
   18801             :   }
   18802        3828 :   if (obj4) {
   18803        1448 :     {
   18804             :       /* %typemap(in) char **dict */
   18805        1448 :       arg5 = NULL;
   18806        1448 :       if ( PySequence_Check( obj4 ) ) {
   18807        1444 :         int bErr = FALSE;
   18808        1444 :         arg5 = CSLFromPySequence(obj4, &bErr);
   18809        1444 :         if ( bErr )
   18810             :         {
   18811           0 :           SWIG_fail;
   18812             :         }
   18813             :       }
   18814           4 :       else if ( PyMapping_Check( obj4 ) ) {
   18815           4 :         int bErr = FALSE;
   18816           4 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   18817           4 :         if ( bErr )
   18818             :         {
   18819           0 :           SWIG_fail;
   18820             :         }
   18821             :       }
   18822             :       else {
   18823           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18824           0 :         SWIG_fail;
   18825             :       }
   18826             :     }
   18827             :   }
   18828        3828 :   if (obj5) {
   18829          72 :     {
   18830             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18831             :       /* callback_func typemap */
   18832             :       
   18833             :       /* In some cases 0 is passed instead of None. */
   18834             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   18835          72 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   18836             :       {
   18837           0 :         if( PyLong_AsLong(obj5) == 0 )
   18838             :         {
   18839           0 :           obj5 = Py_None;
   18840             :         }
   18841             :       }
   18842             :       
   18843          72 :       if (obj5 && obj5 != Py_None ) {
   18844          72 :         void* cbfunction = NULL;
   18845          72 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   18846             :             (void**)&cbfunction,
   18847             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   18848             :             SWIG_POINTER_EXCEPTION | 0 ));
   18849             :         
   18850          72 :         if ( cbfunction == GDALTermProgress ) {
   18851             :           arg6 = GDALTermProgress;
   18852             :         } else {
   18853          72 :           if (!PyCallable_Check(obj5)) {
   18854           1 :             PyErr_SetString( PyExc_RuntimeError,
   18855             :               "Object given is not a Python function" );
   18856           1 :             SWIG_fail;
   18857             :           }
   18858          71 :           psProgressInfo->psPyCallback = obj5;
   18859          71 :           arg6 = PyProgressProxy;
   18860             :         }
   18861             :         
   18862             :       }
   18863             :       
   18864             :     }
   18865             :   }
   18866        3827 :   if (obj6) {
   18867          14 :     {
   18868             :       /* %typemap(in) ( void* callback_data=NULL)  */
   18869          14 :       psProgressInfo->psPyCallbackData = obj6 ;
   18870             :     }
   18871             :   }
   18872        3827 :   {
   18873        3827 :     if (!arg2) {
   18874        3827 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18875             :     }
   18876             :   }
   18877        3827 :   {
   18878        3827 :     if (!arg3) {
   18879           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18880             :     }
   18881             :   }
   18882        3827 :   {
   18883        3827 :     const int bLocalUseExceptions = GetUseExceptions();
   18884        3827 :     if ( bLocalUseExceptions ) {
   18885         630 :       pushErrorHandler();
   18886             :     }
   18887        3827 :     {
   18888        3827 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18889        3827 :       result = (GDALDatasetShadow *)GDALDriverShadow_CreateCopy(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   18890        3827 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18891             :     }
   18892        3827 :     if ( bLocalUseExceptions ) {
   18893         630 :       popErrorHandler();
   18894             :     }
   18895             : #ifndef SED_HACKS
   18896             :     if ( bLocalUseExceptions ) {
   18897             :       CPLErr eclass = CPLGetLastErrorType();
   18898             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18899             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18900             :       }
   18901             :     }
   18902             : #endif
   18903             :   }
   18904        3827 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   18905        3827 :   {
   18906             :     /* %typemap(freearg) (const char *utf8_path) */
   18907        3827 :     GDALPythonFreeCStr(arg2, bToFree2);
   18908             :   }
   18909        3827 :   {
   18910             :     /* %typemap(freearg) char **dict */
   18911        3827 :     CSLDestroy( arg5 );
   18912             :   }
   18913        3827 :   {
   18914             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18915             :     
   18916        3827 :     CPLFree(psProgressInfo);
   18917             :     
   18918             :   }
   18919        3846 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18920             :   return resultobj;
   18921           1 : fail:
   18922           1 :   {
   18923             :     /* %typemap(freearg) (const char *utf8_path) */
   18924           1 :     GDALPythonFreeCStr(arg2, bToFree2);
   18925             :   }
   18926           1 :   {
   18927             :     /* %typemap(freearg) char **dict */
   18928           1 :     CSLDestroy( arg5 );
   18929             :   }
   18930           1 :   {
   18931             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18932             :     
   18933           1 :     CPLFree(psProgressInfo);
   18934             :     
   18935             :   }
   18936             :   return NULL;
   18937             : }
   18938             : 
   18939             : 
   18940        2465 : SWIGINTERN PyObject *_wrap_Driver_Delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18941        2465 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18942        2465 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18943        2465 :   char *arg2 = (char *) 0 ;
   18944        2465 :   void *argp1 = 0 ;
   18945        2465 :   int res1 = 0 ;
   18946        2465 :   int bToFree2 = 0 ;
   18947        2465 :   PyObject *swig_obj[2] ;
   18948        2465 :   CPLErr result;
   18949             :   
   18950        2465 :   if (!SWIG_Python_UnpackTuple(args, "Driver_Delete", 2, 2, swig_obj)) SWIG_fail;
   18951        2465 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18952        2465 :   if (!SWIG_IsOK(res1)) {
   18953           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Delete" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18954             :   }
   18955        2465 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18956        2465 :   {
   18957             :     /* %typemap(in) (const char *utf8_path) */
   18958        2465 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   18959             :     {
   18960        2333 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   18961             :     }
   18962             :     else
   18963             :     {
   18964         132 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   18965             :       
   18966             :     }
   18967        2465 :     if (arg2 == NULL)
   18968             :     {
   18969           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18970           0 :       SWIG_fail;
   18971             :     }
   18972             :   }
   18973        2465 :   {
   18974        2465 :     if (!arg2) {
   18975        2465 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18976             :     }
   18977             :   }
   18978        2465 :   {
   18979        2465 :     const int bLocalUseExceptions = GetUseExceptions();
   18980        2465 :     if ( bLocalUseExceptions ) {
   18981        1321 :       pushErrorHandler();
   18982             :     }
   18983        2465 :     {
   18984        2465 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18985        2465 :       result = (CPLErr)GDALDriverShadow_Delete(arg1,(char const *)arg2);
   18986        2465 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18987             :     }
   18988        2465 :     if ( bLocalUseExceptions ) {
   18989        1321 :       popErrorHandler();
   18990             :     }
   18991             : #ifndef SED_HACKS
   18992             :     if ( bLocalUseExceptions ) {
   18993             :       CPLErr eclass = CPLGetLastErrorType();
   18994             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18995             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18996             :       }
   18997             :     }
   18998             : #endif
   18999             :   }
   19000        2465 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19001        2465 :   {
   19002             :     /* %typemap(freearg) (const char *utf8_path) */
   19003        2465 :     GDALPythonFreeCStr(arg2, bToFree2);
   19004             :   }
   19005        2465 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19006             :   return resultobj;
   19007           0 : fail:
   19008           0 :   {
   19009             :     /* %typemap(freearg) (const char *utf8_path) */
   19010        2465 :     GDALPythonFreeCStr(arg2, bToFree2);
   19011             :   }
   19012             :   return NULL;
   19013             : }
   19014             : 
   19015             : 
   19016         173 : SWIGINTERN PyObject *_wrap_Driver_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19017         173 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19018         173 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19019         173 :   char *arg2 = (char *) 0 ;
   19020         173 :   char *arg3 = (char *) 0 ;
   19021         173 :   void *argp1 = 0 ;
   19022         173 :   int res1 = 0 ;
   19023         173 :   int bToFree2 = 0 ;
   19024         173 :   int bToFree3 = 0 ;
   19025         173 :   PyObject *swig_obj[3] ;
   19026         173 :   CPLErr result;
   19027             :   
   19028         173 :   if (!SWIG_Python_UnpackTuple(args, "Driver_Rename", 3, 3, swig_obj)) SWIG_fail;
   19029         173 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19030         173 :   if (!SWIG_IsOK(res1)) {
   19031           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Rename" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19032             :   }
   19033         173 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19034         173 :   {
   19035             :     /* %typemap(in) (const char *utf8_path) */
   19036         173 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   19037             :     {
   19038         171 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   19039             :     }
   19040             :     else
   19041             :     {
   19042           2 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   19043             :       
   19044             :     }
   19045         173 :     if (arg2 == NULL)
   19046             :     {
   19047           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19048           0 :       SWIG_fail;
   19049             :     }
   19050             :   }
   19051         173 :   {
   19052             :     /* %typemap(in) (const char *utf8_path) */
   19053         173 :     if (PyUnicode_Check(swig_obj[2]) || PyBytes_Check(swig_obj[2]))
   19054             :     {
   19055         171 :       arg3 = GDALPythonObjectToCStr( swig_obj[2], &bToFree3 );
   19056             :     }
   19057             :     else
   19058             :     {
   19059           2 :       arg3 = GDALPythonPathToCStr(swig_obj[2], &bToFree3);
   19060             :       
   19061             :     }
   19062         173 :     if (arg3 == NULL)
   19063             :     {
   19064           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19065           0 :       SWIG_fail;
   19066             :     }
   19067             :   }
   19068         173 :   {
   19069         173 :     if (!arg2) {
   19070         173 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19071             :     }
   19072             :   }
   19073         173 :   {
   19074         173 :     if (!arg3) {
   19075         173 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19076             :     }
   19077             :   }
   19078         173 :   {
   19079         173 :     const int bLocalUseExceptions = GetUseExceptions();
   19080         173 :     if ( bLocalUseExceptions ) {
   19081         173 :       pushErrorHandler();
   19082             :     }
   19083         173 :     {
   19084         173 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19085         173 :       result = (CPLErr)GDALDriverShadow_Rename(arg1,(char const *)arg2,(char const *)arg3);
   19086         173 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19087             :     }
   19088         173 :     if ( bLocalUseExceptions ) {
   19089         173 :       popErrorHandler();
   19090             :     }
   19091             : #ifndef SED_HACKS
   19092             :     if ( bLocalUseExceptions ) {
   19093             :       CPLErr eclass = CPLGetLastErrorType();
   19094             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19095             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19096             :       }
   19097             :     }
   19098             : #endif
   19099             :   }
   19100         173 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19101         173 :   {
   19102             :     /* %typemap(freearg) (const char *utf8_path) */
   19103         173 :     GDALPythonFreeCStr(arg2, bToFree2);
   19104             :   }
   19105         173 :   {
   19106             :     /* %typemap(freearg) (const char *utf8_path) */
   19107         173 :     GDALPythonFreeCStr(arg3, bToFree3);
   19108             :   }
   19109         173 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19110             :   return resultobj;
   19111           0 : fail:
   19112           0 :   {
   19113             :     /* %typemap(freearg) (const char *utf8_path) */
   19114           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   19115             :   }
   19116           0 :   {
   19117             :     /* %typemap(freearg) (const char *utf8_path) */
   19118         173 :     GDALPythonFreeCStr(arg3, bToFree3);
   19119             :   }
   19120             :   return NULL;
   19121             : }
   19122             : 
   19123             : 
   19124           3 : SWIGINTERN PyObject *_wrap_Driver_CopyFiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19125           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19126           3 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19127           3 :   char *arg2 = (char *) 0 ;
   19128           3 :   char *arg3 = (char *) 0 ;
   19129           3 :   void *argp1 = 0 ;
   19130           3 :   int res1 = 0 ;
   19131           3 :   int bToFree2 = 0 ;
   19132           3 :   int bToFree3 = 0 ;
   19133           3 :   PyObject *swig_obj[3] ;
   19134           3 :   CPLErr result;
   19135             :   
   19136           3 :   if (!SWIG_Python_UnpackTuple(args, "Driver_CopyFiles", 3, 3, swig_obj)) SWIG_fail;
   19137           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19138           3 :   if (!SWIG_IsOK(res1)) {
   19139           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CopyFiles" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19140             :   }
   19141           3 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19142           3 :   {
   19143             :     /* %typemap(in) (const char *utf8_path) */
   19144           3 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   19145             :     {
   19146           1 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   19147             :     }
   19148             :     else
   19149             :     {
   19150           2 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   19151             :       
   19152             :     }
   19153           3 :     if (arg2 == NULL)
   19154             :     {
   19155           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19156           0 :       SWIG_fail;
   19157             :     }
   19158             :   }
   19159           3 :   {
   19160             :     /* %typemap(in) (const char *utf8_path) */
   19161           3 :     if (PyUnicode_Check(swig_obj[2]) || PyBytes_Check(swig_obj[2]))
   19162             :     {
   19163           1 :       arg3 = GDALPythonObjectToCStr( swig_obj[2], &bToFree3 );
   19164             :     }
   19165             :     else
   19166             :     {
   19167           2 :       arg3 = GDALPythonPathToCStr(swig_obj[2], &bToFree3);
   19168             :       
   19169             :     }
   19170           3 :     if (arg3 == NULL)
   19171             :     {
   19172           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19173           0 :       SWIG_fail;
   19174             :     }
   19175             :   }
   19176           3 :   {
   19177           3 :     if (!arg2) {
   19178           3 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19179             :     }
   19180             :   }
   19181           3 :   {
   19182           3 :     if (!arg3) {
   19183           3 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19184             :     }
   19185             :   }
   19186           3 :   {
   19187           3 :     const int bLocalUseExceptions = GetUseExceptions();
   19188           3 :     if ( bLocalUseExceptions ) {
   19189           3 :       pushErrorHandler();
   19190             :     }
   19191           3 :     {
   19192           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19193           3 :       result = (CPLErr)GDALDriverShadow_CopyFiles(arg1,(char const *)arg2,(char const *)arg3);
   19194           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19195             :     }
   19196           3 :     if ( bLocalUseExceptions ) {
   19197           3 :       popErrorHandler();
   19198             :     }
   19199             : #ifndef SED_HACKS
   19200             :     if ( bLocalUseExceptions ) {
   19201             :       CPLErr eclass = CPLGetLastErrorType();
   19202             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19203             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19204             :       }
   19205             :     }
   19206             : #endif
   19207             :   }
   19208           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19209           3 :   {
   19210             :     /* %typemap(freearg) (const char *utf8_path) */
   19211           3 :     GDALPythonFreeCStr(arg2, bToFree2);
   19212             :   }
   19213           3 :   {
   19214             :     /* %typemap(freearg) (const char *utf8_path) */
   19215           3 :     GDALPythonFreeCStr(arg3, bToFree3);
   19216             :   }
   19217           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19218             :   return resultobj;
   19219           0 : fail:
   19220           0 :   {
   19221             :     /* %typemap(freearg) (const char *utf8_path) */
   19222           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   19223             :   }
   19224           0 :   {
   19225             :     /* %typemap(freearg) (const char *utf8_path) */
   19226           3 :     GDALPythonFreeCStr(arg3, bToFree3);
   19227             :   }
   19228             :   return NULL;
   19229             : }
   19230             : 
   19231             : 
   19232           2 : SWIGINTERN PyObject *_wrap_Driver_HasOpenOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19233           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19234           2 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19235           2 :   char *arg2 = (char *) 0 ;
   19236           2 :   void *argp1 = 0 ;
   19237           2 :   int res1 = 0 ;
   19238           2 :   int res2 ;
   19239           2 :   char *buf2 = 0 ;
   19240           2 :   int alloc2 = 0 ;
   19241           2 :   PyObject *swig_obj[2] ;
   19242           2 :   bool result;
   19243             :   
   19244           2 :   if (!SWIG_Python_UnpackTuple(args, "Driver_HasOpenOption", 2, 2, swig_obj)) SWIG_fail;
   19245           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19246           2 :   if (!SWIG_IsOK(res1)) {
   19247           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_HasOpenOption" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19248             :   }
   19249           2 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19250           2 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   19251           2 :   if (!SWIG_IsOK(res2)) {
   19252           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_HasOpenOption" "', argument " "2"" of type '" "char const *""'");
   19253             :   }
   19254           2 :   arg2 = reinterpret_cast< char * >(buf2);
   19255           2 :   {
   19256           2 :     const int bLocalUseExceptions = GetUseExceptions();
   19257           2 :     if ( bLocalUseExceptions ) {
   19258           0 :       pushErrorHandler();
   19259             :     }
   19260           2 :     {
   19261           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19262           2 :       result = (bool)GDALDriverShadow_HasOpenOption(arg1,(char const *)arg2);
   19263           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19264             :     }
   19265           2 :     if ( bLocalUseExceptions ) {
   19266           0 :       popErrorHandler();
   19267             :     }
   19268             : #ifndef SED_HACKS
   19269             :     if ( bLocalUseExceptions ) {
   19270             :       CPLErr eclass = CPLGetLastErrorType();
   19271             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19272             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19273             :       }
   19274             :     }
   19275             : #endif
   19276             :   }
   19277           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   19278           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19279           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19280             :   return resultobj;
   19281           0 : fail:
   19282           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19283             :   return NULL;
   19284             : }
   19285             : 
   19286             : 
   19287           6 : SWIGINTERN PyObject *_wrap_Driver_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19288           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19289           6 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19290           6 :   char *arg2 = (char *) 0 ;
   19291           6 :   void *argp1 = 0 ;
   19292           6 :   int res1 = 0 ;
   19293           6 :   int res2 ;
   19294           6 :   char *buf2 = 0 ;
   19295           6 :   int alloc2 = 0 ;
   19296           6 :   PyObject *swig_obj[2] ;
   19297           6 :   bool result;
   19298             :   
   19299           6 :   if (!SWIG_Python_UnpackTuple(args, "Driver_TestCapability", 2, 2, swig_obj)) SWIG_fail;
   19300           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19301           6 :   if (!SWIG_IsOK(res1)) {
   19302           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_TestCapability" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19303             :   }
   19304           6 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19305           6 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   19306           6 :   if (!SWIG_IsOK(res2)) {
   19307           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_TestCapability" "', argument " "2"" of type '" "char const *""'");
   19308             :   }
   19309           6 :   arg2 = reinterpret_cast< char * >(buf2);
   19310           6 :   {
   19311           6 :     const int bLocalUseExceptions = GetUseExceptions();
   19312           6 :     if ( bLocalUseExceptions ) {
   19313           4 :       pushErrorHandler();
   19314             :     }
   19315           6 :     {
   19316           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19317           6 :       result = (bool)GDALDriverShadow_TestCapability(arg1,(char const *)arg2);
   19318           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19319             :     }
   19320           6 :     if ( bLocalUseExceptions ) {
   19321           4 :       popErrorHandler();
   19322             :     }
   19323             : #ifndef SED_HACKS
   19324             :     if ( bLocalUseExceptions ) {
   19325             :       CPLErr eclass = CPLGetLastErrorType();
   19326             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19327             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19328             :       }
   19329             :     }
   19330             : #endif
   19331             :   }
   19332           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   19333           6 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19334           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19335             :   return resultobj;
   19336           0 : fail:
   19337           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19338             :   return NULL;
   19339             : }
   19340             : 
   19341             : 
   19342          92 : SWIGINTERN PyObject *_wrap_Driver_Register(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19343          92 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19344          92 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19345          92 :   void *argp1 = 0 ;
   19346          92 :   int res1 = 0 ;
   19347          92 :   PyObject *swig_obj[1] ;
   19348          92 :   int result;
   19349             :   
   19350          92 :   if (!args) SWIG_fail;
   19351          92 :   swig_obj[0] = args;
   19352          92 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19353          92 :   if (!SWIG_IsOK(res1)) {
   19354           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Register" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19355             :   }
   19356          92 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19357          92 :   {
   19358          92 :     const int bLocalUseExceptions = GetUseExceptions();
   19359          92 :     if ( bLocalUseExceptions ) {
   19360          16 :       pushErrorHandler();
   19361             :     }
   19362          92 :     {
   19363          92 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19364          92 :       result = (int)GDALDriverShadow_Register(arg1);
   19365          92 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19366             :     }
   19367          92 :     if ( bLocalUseExceptions ) {
   19368          16 :       popErrorHandler();
   19369             :     }
   19370             : #ifndef SED_HACKS
   19371             :     if ( bLocalUseExceptions ) {
   19372             :       CPLErr eclass = CPLGetLastErrorType();
   19373             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19374             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19375             :       }
   19376             :     }
   19377             : #endif
   19378             :   }
   19379          92 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19380          92 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19381             :   return resultobj;
   19382             : fail:
   19383             :   return NULL;
   19384             : }
   19385             : 
   19386             : 
   19387          92 : SWIGINTERN PyObject *_wrap_Driver_Deregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19388          92 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19389          92 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19390          92 :   void *argp1 = 0 ;
   19391          92 :   int res1 = 0 ;
   19392          92 :   PyObject *swig_obj[1] ;
   19393             :   
   19394          92 :   if (!args) SWIG_fail;
   19395          92 :   swig_obj[0] = args;
   19396          92 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19397          92 :   if (!SWIG_IsOK(res1)) {
   19398           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Deregister" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19399             :   }
   19400          92 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19401          92 :   {
   19402          92 :     const int bLocalUseExceptions = GetUseExceptions();
   19403          92 :     if ( bLocalUseExceptions ) {
   19404          16 :       pushErrorHandler();
   19405             :     }
   19406          92 :     {
   19407          92 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19408          92 :       GDALDriverShadow_Deregister(arg1);
   19409          92 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19410             :     }
   19411          92 :     if ( bLocalUseExceptions ) {
   19412          16 :       popErrorHandler();
   19413             :     }
   19414             : #ifndef SED_HACKS
   19415             :     if ( bLocalUseExceptions ) {
   19416             :       CPLErr eclass = CPLGetLastErrorType();
   19417             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19418             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19419             :       }
   19420             :     }
   19421             : #endif
   19422             :   }
   19423          92 :   resultobj = SWIG_Py_Void();
   19424          92 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19425             :   return resultobj;
   19426             : fail:
   19427             :   return NULL;
   19428             : }
   19429             : 
   19430             : 
   19431         276 : SWIGINTERN PyObject *Driver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19432         276 :   PyObject *obj;
   19433         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   19434         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDriverShadow, SWIG_NewClientData(obj));
   19435         276 :   return SWIG_Py_Void();
   19436             : }
   19437             : 
   19438           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19439           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19440           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19441           0 :   short arg2 ;
   19442           0 :   GDALColorEntry ce1 ;
   19443           0 :   short val2 ;
   19444           0 :   int ecode2 = 0 ;
   19445           0 :   PyObject *swig_obj[2] ;
   19446             :   
   19447           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c1_set", 2, 2, swig_obj)) SWIG_fail;
   19448           0 :   {
   19449             :     /* %typemap(in) GDALColorEntry* */
   19450           0 :     ce1.c4 = 255;
   19451           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19452           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19453           0 :       SWIG_fail;
   19454             :     }
   19455           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19456           0 :     if ( size > 4 ) {
   19457           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19458           0 :       SWIG_fail;
   19459             :     }
   19460           0 :     if ( size < 3 ) {
   19461           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19462           0 :       SWIG_fail;
   19463             :     }
   19464           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19465           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19466           0 :       SWIG_fail;
   19467             :     }
   19468           0 :     arg1 = &ce1;
   19469             :   }
   19470           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19471           0 :   if (!SWIG_IsOK(ecode2)) {
   19472           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c1_set" "', argument " "2"" of type '" "short""'");
   19473             :   } 
   19474           0 :   arg2 = static_cast< short >(val2);
   19475           0 :   {
   19476           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19477           0 :     if (arg1) (arg1)->c1 = arg2;
   19478           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19479             :   }
   19480           0 :   resultobj = SWIG_Py_Void();
   19481           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19482             :   return resultobj;
   19483             : fail:
   19484             :   return NULL;
   19485             : }
   19486             : 
   19487             : 
   19488           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19489           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19490           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19491           0 :   GDALColorEntry ce1 ;
   19492           0 :   PyObject *swig_obj[1] ;
   19493           0 :   short result;
   19494             :   
   19495           0 :   if (!args) SWIG_fail;
   19496           0 :   swig_obj[0] = args;
   19497           0 :   {
   19498             :     /* %typemap(in) GDALColorEntry* */
   19499           0 :     ce1.c4 = 255;
   19500           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19501           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19502           0 :       SWIG_fail;
   19503             :     }
   19504           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19505           0 :     if ( size > 4 ) {
   19506           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19507           0 :       SWIG_fail;
   19508             :     }
   19509           0 :     if ( size < 3 ) {
   19510           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19511           0 :       SWIG_fail;
   19512             :     }
   19513           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19514           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19515           0 :       SWIG_fail;
   19516             :     }
   19517           0 :     arg1 = &ce1;
   19518             :   }
   19519           0 :   {
   19520           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19521           0 :     result = (short) ((arg1)->c1);
   19522           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19523             :   }
   19524           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19525           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19526             :   return resultobj;
   19527             : fail:
   19528             :   return NULL;
   19529             : }
   19530             : 
   19531             : 
   19532           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19533           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19534           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19535           0 :   short arg2 ;
   19536           0 :   GDALColorEntry ce1 ;
   19537           0 :   short val2 ;
   19538           0 :   int ecode2 = 0 ;
   19539           0 :   PyObject *swig_obj[2] ;
   19540             :   
   19541           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c2_set", 2, 2, swig_obj)) SWIG_fail;
   19542           0 :   {
   19543             :     /* %typemap(in) GDALColorEntry* */
   19544           0 :     ce1.c4 = 255;
   19545           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19546           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19547           0 :       SWIG_fail;
   19548             :     }
   19549           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19550           0 :     if ( size > 4 ) {
   19551           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19552           0 :       SWIG_fail;
   19553             :     }
   19554           0 :     if ( size < 3 ) {
   19555           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19556           0 :       SWIG_fail;
   19557             :     }
   19558           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19559           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19560           0 :       SWIG_fail;
   19561             :     }
   19562           0 :     arg1 = &ce1;
   19563             :   }
   19564           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19565           0 :   if (!SWIG_IsOK(ecode2)) {
   19566           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c2_set" "', argument " "2"" of type '" "short""'");
   19567             :   } 
   19568           0 :   arg2 = static_cast< short >(val2);
   19569           0 :   {
   19570           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19571           0 :     if (arg1) (arg1)->c2 = arg2;
   19572           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19573             :   }
   19574           0 :   resultobj = SWIG_Py_Void();
   19575           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19576             :   return resultobj;
   19577             : fail:
   19578             :   return NULL;
   19579             : }
   19580             : 
   19581             : 
   19582           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19583           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19584           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19585           0 :   GDALColorEntry ce1 ;
   19586           0 :   PyObject *swig_obj[1] ;
   19587           0 :   short result;
   19588             :   
   19589           0 :   if (!args) SWIG_fail;
   19590           0 :   swig_obj[0] = args;
   19591           0 :   {
   19592             :     /* %typemap(in) GDALColorEntry* */
   19593           0 :     ce1.c4 = 255;
   19594           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19595           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19596           0 :       SWIG_fail;
   19597             :     }
   19598           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19599           0 :     if ( size > 4 ) {
   19600           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19601           0 :       SWIG_fail;
   19602             :     }
   19603           0 :     if ( size < 3 ) {
   19604           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19605           0 :       SWIG_fail;
   19606             :     }
   19607           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19608           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19609           0 :       SWIG_fail;
   19610             :     }
   19611           0 :     arg1 = &ce1;
   19612             :   }
   19613           0 :   {
   19614           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19615           0 :     result = (short) ((arg1)->c2);
   19616           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19617             :   }
   19618           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19619           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19620             :   return resultobj;
   19621             : fail:
   19622             :   return NULL;
   19623             : }
   19624             : 
   19625             : 
   19626           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19627           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19628           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19629           0 :   short arg2 ;
   19630           0 :   GDALColorEntry ce1 ;
   19631           0 :   short val2 ;
   19632           0 :   int ecode2 = 0 ;
   19633           0 :   PyObject *swig_obj[2] ;
   19634             :   
   19635           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c3_set", 2, 2, swig_obj)) SWIG_fail;
   19636           0 :   {
   19637             :     /* %typemap(in) GDALColorEntry* */
   19638           0 :     ce1.c4 = 255;
   19639           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19640           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19641           0 :       SWIG_fail;
   19642             :     }
   19643           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19644           0 :     if ( size > 4 ) {
   19645           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19646           0 :       SWIG_fail;
   19647             :     }
   19648           0 :     if ( size < 3 ) {
   19649           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19650           0 :       SWIG_fail;
   19651             :     }
   19652           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19653           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19654           0 :       SWIG_fail;
   19655             :     }
   19656           0 :     arg1 = &ce1;
   19657             :   }
   19658           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19659           0 :   if (!SWIG_IsOK(ecode2)) {
   19660           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c3_set" "', argument " "2"" of type '" "short""'");
   19661             :   } 
   19662           0 :   arg2 = static_cast< short >(val2);
   19663           0 :   {
   19664           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19665           0 :     if (arg1) (arg1)->c3 = arg2;
   19666           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19667             :   }
   19668           0 :   resultobj = SWIG_Py_Void();
   19669           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19670             :   return resultobj;
   19671             : fail:
   19672             :   return NULL;
   19673             : }
   19674             : 
   19675             : 
   19676           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19677           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19678           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19679           0 :   GDALColorEntry ce1 ;
   19680           0 :   PyObject *swig_obj[1] ;
   19681           0 :   short result;
   19682             :   
   19683           0 :   if (!args) SWIG_fail;
   19684           0 :   swig_obj[0] = args;
   19685           0 :   {
   19686             :     /* %typemap(in) GDALColorEntry* */
   19687           0 :     ce1.c4 = 255;
   19688           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19689           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19690           0 :       SWIG_fail;
   19691             :     }
   19692           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19693           0 :     if ( size > 4 ) {
   19694           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19695           0 :       SWIG_fail;
   19696             :     }
   19697           0 :     if ( size < 3 ) {
   19698           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19699           0 :       SWIG_fail;
   19700             :     }
   19701           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19702           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19703           0 :       SWIG_fail;
   19704             :     }
   19705           0 :     arg1 = &ce1;
   19706             :   }
   19707           0 :   {
   19708           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19709           0 :     result = (short) ((arg1)->c3);
   19710           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19711             :   }
   19712           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19713           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19714             :   return resultobj;
   19715             : fail:
   19716             :   return NULL;
   19717             : }
   19718             : 
   19719             : 
   19720           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19721           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19722           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19723           0 :   short arg2 ;
   19724           0 :   GDALColorEntry ce1 ;
   19725           0 :   short val2 ;
   19726           0 :   int ecode2 = 0 ;
   19727           0 :   PyObject *swig_obj[2] ;
   19728             :   
   19729           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c4_set", 2, 2, swig_obj)) SWIG_fail;
   19730           0 :   {
   19731             :     /* %typemap(in) GDALColorEntry* */
   19732           0 :     ce1.c4 = 255;
   19733           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19734           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19735           0 :       SWIG_fail;
   19736             :     }
   19737           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19738           0 :     if ( size > 4 ) {
   19739           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19740           0 :       SWIG_fail;
   19741             :     }
   19742           0 :     if ( size < 3 ) {
   19743           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19744           0 :       SWIG_fail;
   19745             :     }
   19746           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19747           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19748           0 :       SWIG_fail;
   19749             :     }
   19750           0 :     arg1 = &ce1;
   19751             :   }
   19752           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19753           0 :   if (!SWIG_IsOK(ecode2)) {
   19754           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c4_set" "', argument " "2"" of type '" "short""'");
   19755             :   } 
   19756           0 :   arg2 = static_cast< short >(val2);
   19757           0 :   {
   19758           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19759           0 :     if (arg1) (arg1)->c4 = arg2;
   19760           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19761             :   }
   19762           0 :   resultobj = SWIG_Py_Void();
   19763           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19764             :   return resultobj;
   19765             : fail:
   19766             :   return NULL;
   19767             : }
   19768             : 
   19769             : 
   19770           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19771           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19772           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19773           0 :   GDALColorEntry ce1 ;
   19774           0 :   PyObject *swig_obj[1] ;
   19775           0 :   short result;
   19776             :   
   19777           0 :   if (!args) SWIG_fail;
   19778           0 :   swig_obj[0] = args;
   19779           0 :   {
   19780             :     /* %typemap(in) GDALColorEntry* */
   19781           0 :     ce1.c4 = 255;
   19782           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19783           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19784           0 :       SWIG_fail;
   19785             :     }
   19786           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19787           0 :     if ( size > 4 ) {
   19788           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19789           0 :       SWIG_fail;
   19790             :     }
   19791           0 :     if ( size < 3 ) {
   19792           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19793           0 :       SWIG_fail;
   19794             :     }
   19795           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19796           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19797           0 :       SWIG_fail;
   19798             :     }
   19799           0 :     arg1 = &ce1;
   19800             :   }
   19801           0 :   {
   19802           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19803           0 :     result = (short) ((arg1)->c4);
   19804           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19805             :   }
   19806           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19807           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19808             :   return resultobj;
   19809             : fail:
   19810             :   return NULL;
   19811             : }
   19812             : 
   19813             : 
   19814         276 : SWIGINTERN PyObject *ColorEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19815         276 :   PyObject *obj;
   19816         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   19817         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorEntry, SWIG_NewClientData(obj));
   19818         276 :   return SWIG_Py_Void();
   19819             : }
   19820             : 
   19821          92 : SWIGINTERN PyObject *_wrap_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19822          92 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19823          92 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   19824          92 :   double arg2 ;
   19825          92 :   void *argp1 = 0 ;
   19826          92 :   int res1 = 0 ;
   19827          92 :   double val2 ;
   19828          92 :   int ecode2 = 0 ;
   19829          92 :   PyObject *swig_obj[2] ;
   19830             :   
   19831          92 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPX_set", 2, 2, swig_obj)) SWIG_fail;
   19832          92 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   19833          92 :   if (!SWIG_IsOK(res1)) {
   19834           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   19835             :   }
   19836          92 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   19837          92 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   19838          92 :   if (!SWIG_IsOK(ecode2)) {
   19839           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
   19840             :   } 
   19841          92 :   arg2 = static_cast< double >(val2);
   19842          92 :   {
   19843          92 :     const int bLocalUseExceptions = GetUseExceptions();
   19844          92 :     if ( bLocalUseExceptions ) {
   19845          91 :       pushErrorHandler();
   19846             :     }
   19847          92 :     {
   19848          92 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19849          92 :       GDAL_GCP_GCPX_set(arg1,arg2);
   19850          92 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19851             :     }
   19852          92 :     if ( bLocalUseExceptions ) {
   19853          91 :       popErrorHandler();
   19854             :     }
   19855             : #ifndef SED_HACKS
   19856             :     if ( bLocalUseExceptions ) {
   19857             :       CPLErr eclass = CPLGetLastErrorType();
   19858             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19859             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19860             :       }
   19861             :     }
   19862             : #endif
   19863             :   }
   19864          92 :   resultobj = SWIG_Py_Void();
   19865          92 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19866             :   return resultobj;
   19867             : fail:
   19868             :   return NULL;
   19869             : }
   19870             : 
   19871             : 
   19872        2205 : SWIGINTERN PyObject *_wrap_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19873        2205 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19874        2205 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   19875        2205 :   void *argp1 = 0 ;
   19876        2205 :   int res1 = 0 ;
   19877        2205 :   PyObject *swig_obj[1] ;
   19878        2205 :   double result;
   19879             :   
   19880        2205 :   if (!args) SWIG_fail;
   19881        2205 :   swig_obj[0] = args;
   19882        2205 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   19883        2205 :   if (!SWIG_IsOK(res1)) {
   19884           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   19885             :   }
   19886        2205 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   19887        2205 :   {
   19888        2205 :     const int bLocalUseExceptions = GetUseExceptions();
   19889        2205 :     if ( bLocalUseExceptions ) {
   19890        2182 :       pushErrorHandler();
   19891             :     }
   19892        2205 :     {
   19893        2205 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19894        2205 :       result = (double)GDAL_GCP_GCPX_get(arg1);
   19895        2205 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19896             :     }
   19897        2205 :     if ( bLocalUseExceptions ) {
   19898        2182 :       popErrorHandler();
   19899             :     }
   19900             : #ifndef SED_HACKS
   19901             :     if ( bLocalUseExceptions ) {
   19902             :       CPLErr eclass = CPLGetLastErrorType();
   19903             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19904             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19905             :       }
   19906             :     }
   19907             : #endif
   19908             :   }
   19909        2205 :   resultobj = SWIG_From_double(static_cast< double >(result));
   19910        2205 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19911             :   return resultobj;
   19912             : fail:
   19913             :   return NULL;
   19914             : }
   19915             : 
   19916             : 
   19917          92 : SWIGINTERN PyObject *_wrap_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19918          92 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19919          92 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   19920          92 :   double arg2 ;
   19921          92 :   void *argp1 = 0 ;
   19922          92 :   int res1 = 0 ;
   19923          92 :   double val2 ;
   19924          92 :   int ecode2 = 0 ;
   19925          92 :   PyObject *swig_obj[2] ;
   19926             :   
   19927          92 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPY_set", 2, 2, swig_obj)) SWIG_fail;
   19928          92 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   19929          92 :   if (!SWIG_IsOK(res1)) {
   19930           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   19931             :   }
   19932          92 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   19933          92 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   19934          92 :   if (!SWIG_IsOK(ecode2)) {
   19935           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
   19936             :   } 
   19937          92 :   arg2 = static_cast< double >(val2);
   19938          92 :   {
   19939          92 :     const int bLocalUseExceptions = GetUseExceptions();
   19940          92 :     if ( bLocalUseExceptions ) {
   19941          91 :       pushErrorHandler();
   19942             :     }
   19943          92 :     {
   19944          92 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19945          92 :       GDAL_GCP_GCPY_set(arg1,arg2);
   19946          92 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19947             :     }
   19948          92 :     if ( bLocalUseExceptions ) {
   19949          91 :       popErrorHandler();
   19950             :     }
   19951             : #ifndef SED_HACKS
   19952             :     if ( bLocalUseExceptions ) {
   19953             :       CPLErr eclass = CPLGetLastErrorType();
   19954             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19955             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19956             :       }
   19957             :     }
   19958             : #endif
   19959             :   }
   19960          92 :   resultobj = SWIG_Py_Void();
   19961          92 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19962             :   return resultobj;
   19963             : fail:
   19964             :   return NULL;
   19965             : }
   19966             : 
   19967             : 
   19968        2205 : SWIGINTERN PyObject *_wrap_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19969        2205 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19970        2205 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   19971        2205 :   void *argp1 = 0 ;
   19972        2205 :   int res1 = 0 ;
   19973        2205 :   PyObject *swig_obj[1] ;
   19974        2205 :   double result;
   19975             :   
   19976        2205 :   if (!args) SWIG_fail;
   19977        2205 :   swig_obj[0] = args;
   19978        2205 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   19979        2205 :   if (!SWIG_IsOK(res1)) {
   19980           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   19981             :   }
   19982        2205 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   19983        2205 :   {
   19984        2205 :     const int bLocalUseExceptions = GetUseExceptions();
   19985        2205 :     if ( bLocalUseExceptions ) {
   19986        2182 :       pushErrorHandler();
   19987             :     }
   19988        2205 :     {
   19989        2205 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19990        2205 :       result = (double)GDAL_GCP_GCPY_get(arg1);
   19991        2205 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19992             :     }
   19993        2205 :     if ( bLocalUseExceptions ) {
   19994        2182 :       popErrorHandler();
   19995             :     }
   19996             : #ifndef SED_HACKS
   19997             :     if ( bLocalUseExceptions ) {
   19998             :       CPLErr eclass = CPLGetLastErrorType();
   19999             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20000             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20001             :       }
   20002             :     }
   20003             : #endif
   20004             :   }
   20005        2205 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20006        2205 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20007             :   return resultobj;
   20008             : fail:
   20009             :   return NULL;
   20010             : }
   20011             : 
   20012             : 
   20013           0 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20014           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20015           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20016           0 :   double arg2 ;
   20017           0 :   void *argp1 = 0 ;
   20018           0 :   int res1 = 0 ;
   20019           0 :   double val2 ;
   20020           0 :   int ecode2 = 0 ;
   20021           0 :   PyObject *swig_obj[2] ;
   20022             :   
   20023           0 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPZ_set", 2, 2, swig_obj)) SWIG_fail;
   20024           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20025           0 :   if (!SWIG_IsOK(res1)) {
   20026           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20027             :   }
   20028           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20029           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20030           0 :   if (!SWIG_IsOK(ecode2)) {
   20031           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
   20032             :   } 
   20033           0 :   arg2 = static_cast< double >(val2);
   20034           0 :   {
   20035           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20036           0 :     if ( bLocalUseExceptions ) {
   20037           0 :       pushErrorHandler();
   20038             :     }
   20039           0 :     {
   20040           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20041           0 :       GDAL_GCP_GCPZ_set(arg1,arg2);
   20042           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20043             :     }
   20044           0 :     if ( bLocalUseExceptions ) {
   20045           0 :       popErrorHandler();
   20046             :     }
   20047             : #ifndef SED_HACKS
   20048             :     if ( bLocalUseExceptions ) {
   20049             :       CPLErr eclass = CPLGetLastErrorType();
   20050             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20051             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20052             :       }
   20053             :     }
   20054             : #endif
   20055             :   }
   20056           0 :   resultobj = SWIG_Py_Void();
   20057           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20058             :   return resultobj;
   20059             : fail:
   20060             :   return NULL;
   20061             : }
   20062             : 
   20063             : 
   20064          42 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20065          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20066          42 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20067          42 :   void *argp1 = 0 ;
   20068          42 :   int res1 = 0 ;
   20069          42 :   PyObject *swig_obj[1] ;
   20070          42 :   double result;
   20071             :   
   20072          42 :   if (!args) SWIG_fail;
   20073          42 :   swig_obj[0] = args;
   20074          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20075          42 :   if (!SWIG_IsOK(res1)) {
   20076           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20077             :   }
   20078          42 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20079          42 :   {
   20080          42 :     const int bLocalUseExceptions = GetUseExceptions();
   20081          42 :     if ( bLocalUseExceptions ) {
   20082          29 :       pushErrorHandler();
   20083             :     }
   20084          42 :     {
   20085          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20086          42 :       result = (double)GDAL_GCP_GCPZ_get(arg1);
   20087          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20088             :     }
   20089          42 :     if ( bLocalUseExceptions ) {
   20090          29 :       popErrorHandler();
   20091             :     }
   20092             : #ifndef SED_HACKS
   20093             :     if ( bLocalUseExceptions ) {
   20094             :       CPLErr eclass = CPLGetLastErrorType();
   20095             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20096             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20097             :       }
   20098             :     }
   20099             : #endif
   20100             :   }
   20101          42 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20102          42 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20103             :   return resultobj;
   20104             : fail:
   20105             :   return NULL;
   20106             : }
   20107             : 
   20108             : 
   20109         100 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20110         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20111         100 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20112         100 :   double arg2 ;
   20113         100 :   void *argp1 = 0 ;
   20114         100 :   int res1 = 0 ;
   20115         100 :   double val2 ;
   20116         100 :   int ecode2 = 0 ;
   20117         100 :   PyObject *swig_obj[2] ;
   20118             :   
   20119         100 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPPixel_set", 2, 2, swig_obj)) SWIG_fail;
   20120         100 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20121         100 :   if (!SWIG_IsOK(res1)) {
   20122           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20123             :   }
   20124         100 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20125         100 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20126         100 :   if (!SWIG_IsOK(ecode2)) {
   20127           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
   20128             :   } 
   20129         100 :   arg2 = static_cast< double >(val2);
   20130         100 :   {
   20131         100 :     const int bLocalUseExceptions = GetUseExceptions();
   20132         100 :     if ( bLocalUseExceptions ) {
   20133          99 :       pushErrorHandler();
   20134             :     }
   20135         100 :     {
   20136         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20137         100 :       GDAL_GCP_GCPPixel_set(arg1,arg2);
   20138         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20139             :     }
   20140         100 :     if ( bLocalUseExceptions ) {
   20141          99 :       popErrorHandler();
   20142             :     }
   20143             : #ifndef SED_HACKS
   20144             :     if ( bLocalUseExceptions ) {
   20145             :       CPLErr eclass = CPLGetLastErrorType();
   20146             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20147             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20148             :       }
   20149             :     }
   20150             : #endif
   20151             :   }
   20152         100 :   resultobj = SWIG_Py_Void();
   20153         100 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20154             :   return resultobj;
   20155             : fail:
   20156             :   return NULL;
   20157             : }
   20158             : 
   20159             : 
   20160        8554 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20161        8554 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20162        8554 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20163        8554 :   void *argp1 = 0 ;
   20164        8554 :   int res1 = 0 ;
   20165        8554 :   PyObject *swig_obj[1] ;
   20166        8554 :   double result;
   20167             :   
   20168        8554 :   if (!args) SWIG_fail;
   20169        8554 :   swig_obj[0] = args;
   20170        8554 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20171        8554 :   if (!SWIG_IsOK(res1)) {
   20172           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20173             :   }
   20174        8554 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20175        8554 :   {
   20176        8554 :     const int bLocalUseExceptions = GetUseExceptions();
   20177        8554 :     if ( bLocalUseExceptions ) {
   20178        8531 :       pushErrorHandler();
   20179             :     }
   20180        8554 :     {
   20181        8554 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20182        8554 :       result = (double)GDAL_GCP_GCPPixel_get(arg1);
   20183        8554 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20184             :     }
   20185        8554 :     if ( bLocalUseExceptions ) {
   20186        8531 :       popErrorHandler();
   20187             :     }
   20188             : #ifndef SED_HACKS
   20189             :     if ( bLocalUseExceptions ) {
   20190             :       CPLErr eclass = CPLGetLastErrorType();
   20191             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20192             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20193             :       }
   20194             :     }
   20195             : #endif
   20196             :   }
   20197        8554 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20198        8554 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20199             :   return resultobj;
   20200             : fail:
   20201             :   return NULL;
   20202             : }
   20203             : 
   20204             : 
   20205         100 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20206         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20207         100 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20208         100 :   double arg2 ;
   20209         100 :   void *argp1 = 0 ;
   20210         100 :   int res1 = 0 ;
   20211         100 :   double val2 ;
   20212         100 :   int ecode2 = 0 ;
   20213         100 :   PyObject *swig_obj[2] ;
   20214             :   
   20215         100 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPLine_set", 2, 2, swig_obj)) SWIG_fail;
   20216         100 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20217         100 :   if (!SWIG_IsOK(res1)) {
   20218           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20219             :   }
   20220         100 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20221         100 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20222         100 :   if (!SWIG_IsOK(ecode2)) {
   20223           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
   20224             :   } 
   20225         100 :   arg2 = static_cast< double >(val2);
   20226         100 :   {
   20227         100 :     const int bLocalUseExceptions = GetUseExceptions();
   20228         100 :     if ( bLocalUseExceptions ) {
   20229          99 :       pushErrorHandler();
   20230             :     }
   20231         100 :     {
   20232         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20233         100 :       GDAL_GCP_GCPLine_set(arg1,arg2);
   20234         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20235             :     }
   20236         100 :     if ( bLocalUseExceptions ) {
   20237          99 :       popErrorHandler();
   20238             :     }
   20239             : #ifndef SED_HACKS
   20240             :     if ( bLocalUseExceptions ) {
   20241             :       CPLErr eclass = CPLGetLastErrorType();
   20242             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20243             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20244             :       }
   20245             :     }
   20246             : #endif
   20247             :   }
   20248         100 :   resultobj = SWIG_Py_Void();
   20249         100 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20250             :   return resultobj;
   20251             : fail:
   20252             :   return NULL;
   20253             : }
   20254             : 
   20255             : 
   20256        8554 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20257        8554 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20258        8554 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20259        8554 :   void *argp1 = 0 ;
   20260        8554 :   int res1 = 0 ;
   20261        8554 :   PyObject *swig_obj[1] ;
   20262        8554 :   double result;
   20263             :   
   20264        8554 :   if (!args) SWIG_fail;
   20265        8554 :   swig_obj[0] = args;
   20266        8554 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20267        8554 :   if (!SWIG_IsOK(res1)) {
   20268           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20269             :   }
   20270        8554 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20271        8554 :   {
   20272        8554 :     const int bLocalUseExceptions = GetUseExceptions();
   20273        8554 :     if ( bLocalUseExceptions ) {
   20274        8531 :       pushErrorHandler();
   20275             :     }
   20276        8554 :     {
   20277        8554 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20278        8554 :       result = (double)GDAL_GCP_GCPLine_get(arg1);
   20279        8554 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20280             :     }
   20281        8554 :     if ( bLocalUseExceptions ) {
   20282        8531 :       popErrorHandler();
   20283             :     }
   20284             : #ifndef SED_HACKS
   20285             :     if ( bLocalUseExceptions ) {
   20286             :       CPLErr eclass = CPLGetLastErrorType();
   20287             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20288             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20289             :       }
   20290             :     }
   20291             : #endif
   20292             :   }
   20293        8554 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20294        8554 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20295             :   return resultobj;
   20296             : fail:
   20297             :   return NULL;
   20298             : }
   20299             : 
   20300             : 
   20301           1 : SWIGINTERN PyObject *_wrap_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20302           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20303           1 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20304           1 :   char *arg2 = (char *) 0 ;
   20305           1 :   void *argp1 = 0 ;
   20306           1 :   int res1 = 0 ;
   20307           1 :   int res2 ;
   20308           1 :   char *buf2 = 0 ;
   20309           1 :   int alloc2 = 0 ;
   20310           1 :   PyObject *swig_obj[2] ;
   20311             :   
   20312           1 :   if (!SWIG_Python_UnpackTuple(args, "GCP_Info_set", 2, 2, swig_obj)) SWIG_fail;
   20313           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20314           1 :   if (!SWIG_IsOK(res1)) {
   20315           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20316             :   }
   20317           1 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20318           1 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   20319           1 :   if (!SWIG_IsOK(res2)) {
   20320           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Info_set" "', argument " "2"" of type '" "char *""'");
   20321             :   }
   20322           1 :   arg2 = reinterpret_cast< char * >(buf2);
   20323           1 :   {
   20324           1 :     const int bLocalUseExceptions = GetUseExceptions();
   20325           1 :     if ( bLocalUseExceptions ) {
   20326           1 :       pushErrorHandler();
   20327             :     }
   20328           1 :     {
   20329           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20330           1 :       GDAL_GCP_Info_set(arg1,arg2);
   20331           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20332             :     }
   20333           1 :     if ( bLocalUseExceptions ) {
   20334           1 :       popErrorHandler();
   20335             :     }
   20336             : #ifndef SED_HACKS
   20337             :     if ( bLocalUseExceptions ) {
   20338             :       CPLErr eclass = CPLGetLastErrorType();
   20339             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20340             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20341             :       }
   20342             :     }
   20343             : #endif
   20344             :   }
   20345           1 :   resultobj = SWIG_Py_Void();
   20346           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20347           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20348             :   return resultobj;
   20349           0 : fail:
   20350           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20351             :   return NULL;
   20352             : }
   20353             : 
   20354             : 
   20355           9 : SWIGINTERN PyObject *_wrap_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20356           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20357           9 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20358           9 :   void *argp1 = 0 ;
   20359           9 :   int res1 = 0 ;
   20360           9 :   PyObject *swig_obj[1] ;
   20361           9 :   char *result = 0 ;
   20362             :   
   20363           9 :   if (!args) SWIG_fail;
   20364           9 :   swig_obj[0] = args;
   20365           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20366           9 :   if (!SWIG_IsOK(res1)) {
   20367           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20368             :   }
   20369           9 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20370           9 :   {
   20371           9 :     const int bLocalUseExceptions = GetUseExceptions();
   20372           9 :     if ( bLocalUseExceptions ) {
   20373           5 :       pushErrorHandler();
   20374             :     }
   20375           9 :     {
   20376           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20377           9 :       result = (char *)GDAL_GCP_Info_get(arg1);
   20378           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20379             :     }
   20380           9 :     if ( bLocalUseExceptions ) {
   20381           5 :       popErrorHandler();
   20382             :     }
   20383             : #ifndef SED_HACKS
   20384             :     if ( bLocalUseExceptions ) {
   20385             :       CPLErr eclass = CPLGetLastErrorType();
   20386             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20387             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20388             :       }
   20389             :     }
   20390             : #endif
   20391             :   }
   20392           9 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20393           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20394             :   return resultobj;
   20395             : fail:
   20396             :   return NULL;
   20397             : }
   20398             : 
   20399             : 
   20400           1 : SWIGINTERN PyObject *_wrap_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20401           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20402           1 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20403           1 :   char *arg2 = (char *) 0 ;
   20404           1 :   void *argp1 = 0 ;
   20405           1 :   int res1 = 0 ;
   20406           1 :   int res2 ;
   20407           1 :   char *buf2 = 0 ;
   20408           1 :   int alloc2 = 0 ;
   20409           1 :   PyObject *swig_obj[2] ;
   20410             :   
   20411           1 :   if (!SWIG_Python_UnpackTuple(args, "GCP_Id_set", 2, 2, swig_obj)) SWIG_fail;
   20412           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20413           1 :   if (!SWIG_IsOK(res1)) {
   20414           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20415             :   }
   20416           1 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20417           1 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   20418           1 :   if (!SWIG_IsOK(res2)) {
   20419           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Id_set" "', argument " "2"" of type '" "char *""'");
   20420             :   }
   20421           1 :   arg2 = reinterpret_cast< char * >(buf2);
   20422           1 :   {
   20423           1 :     const int bLocalUseExceptions = GetUseExceptions();
   20424           1 :     if ( bLocalUseExceptions ) {
   20425           1 :       pushErrorHandler();
   20426             :     }
   20427           1 :     {
   20428           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20429           1 :       GDAL_GCP_Id_set(arg1,arg2);
   20430           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20431             :     }
   20432           1 :     if ( bLocalUseExceptions ) {
   20433           1 :       popErrorHandler();
   20434             :     }
   20435             : #ifndef SED_HACKS
   20436             :     if ( bLocalUseExceptions ) {
   20437             :       CPLErr eclass = CPLGetLastErrorType();
   20438             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20439             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20440             :       }
   20441             :     }
   20442             : #endif
   20443             :   }
   20444           1 :   resultobj = SWIG_Py_Void();
   20445           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20446           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20447             :   return resultobj;
   20448           0 : fail:
   20449           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20450             :   return NULL;
   20451             : }
   20452             : 
   20453             : 
   20454           9 : SWIGINTERN PyObject *_wrap_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20455           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20456           9 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20457           9 :   void *argp1 = 0 ;
   20458           9 :   int res1 = 0 ;
   20459           9 :   PyObject *swig_obj[1] ;
   20460           9 :   char *result = 0 ;
   20461             :   
   20462           9 :   if (!args) SWIG_fail;
   20463           9 :   swig_obj[0] = args;
   20464           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20465           9 :   if (!SWIG_IsOK(res1)) {
   20466           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20467             :   }
   20468           9 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20469           9 :   {
   20470           9 :     const int bLocalUseExceptions = GetUseExceptions();
   20471           9 :     if ( bLocalUseExceptions ) {
   20472           5 :       pushErrorHandler();
   20473             :     }
   20474           9 :     {
   20475           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20476           9 :       result = (char *)GDAL_GCP_Id_get(arg1);
   20477           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20478             :     }
   20479           9 :     if ( bLocalUseExceptions ) {
   20480           5 :       popErrorHandler();
   20481             :     }
   20482             : #ifndef SED_HACKS
   20483             :     if ( bLocalUseExceptions ) {
   20484             :       CPLErr eclass = CPLGetLastErrorType();
   20485             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20486             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20487             :       }
   20488             :     }
   20489             : #endif
   20490             :   }
   20491           9 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20492           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20493             :   return resultobj;
   20494             : fail:
   20495             :   return NULL;
   20496             : }
   20497             : 
   20498             : 
   20499         130 : SWIGINTERN PyObject *_wrap_new_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20500         130 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20501         130 :   double arg1 = (double) 0.0 ;
   20502         130 :   double arg2 = (double) 0.0 ;
   20503         130 :   double arg3 = (double) 0.0 ;
   20504         130 :   double arg4 = (double) 0.0 ;
   20505         130 :   double arg5 = (double) 0.0 ;
   20506         130 :   char *arg6 = (char *) "" ;
   20507         130 :   char *arg7 = (char *) "" ;
   20508         130 :   double val1 ;
   20509         130 :   int ecode1 = 0 ;
   20510         130 :   double val2 ;
   20511         130 :   int ecode2 = 0 ;
   20512         130 :   double val3 ;
   20513         130 :   int ecode3 = 0 ;
   20514         130 :   double val4 ;
   20515         130 :   int ecode4 = 0 ;
   20516         130 :   double val5 ;
   20517         130 :   int ecode5 = 0 ;
   20518         130 :   int res6 ;
   20519         130 :   char *buf6 = 0 ;
   20520         130 :   int alloc6 = 0 ;
   20521         130 :   int res7 ;
   20522         130 :   char *buf7 = 0 ;
   20523         130 :   int alloc7 = 0 ;
   20524         130 :   PyObject *swig_obj[7] ;
   20525         130 :   GDAL_GCP *result = 0 ;
   20526             :   
   20527         130 :   if (!SWIG_Python_UnpackTuple(args, "new_GCP", 0, 7, swig_obj)) SWIG_fail;
   20528         130 :   if (swig_obj[0]) {
   20529          38 :     ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   20530          38 :     if (!SWIG_IsOK(ecode1)) {
   20531           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GCP" "', argument " "1"" of type '" "double""'");
   20532             :     } 
   20533          38 :     arg1 = static_cast< double >(val1);
   20534             :   }
   20535         130 :   if (swig_obj[1]) {
   20536          38 :     ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20537          38 :     if (!SWIG_IsOK(ecode2)) {
   20538           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GCP" "', argument " "2"" of type '" "double""'");
   20539             :     } 
   20540          38 :     arg2 = static_cast< double >(val2);
   20541             :   }
   20542         130 :   if (swig_obj[2]) {
   20543          38 :     ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   20544          38 :     if (!SWIG_IsOK(ecode3)) {
   20545           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GCP" "', argument " "3"" of type '" "double""'");
   20546             :     } 
   20547          38 :     arg3 = static_cast< double >(val3);
   20548             :   }
   20549         130 :   if (swig_obj[3]) {
   20550          38 :     ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   20551          38 :     if (!SWIG_IsOK(ecode4)) {
   20552           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GCP" "', argument " "4"" of type '" "double""'");
   20553             :     } 
   20554          38 :     arg4 = static_cast< double >(val4);
   20555             :   }
   20556         130 :   if (swig_obj[4]) {
   20557          38 :     ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   20558          38 :     if (!SWIG_IsOK(ecode5)) {
   20559           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GCP" "', argument " "5"" of type '" "double""'");
   20560             :     } 
   20561          38 :     arg5 = static_cast< double >(val5);
   20562             :   }
   20563         130 :   if (swig_obj[5]) {
   20564           0 :     res6 = SWIG_AsCharPtrAndSize(swig_obj[5], &buf6, NULL, &alloc6);
   20565           0 :     if (!SWIG_IsOK(res6)) {
   20566           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_GCP" "', argument " "6"" of type '" "char const *""'");
   20567             :     }
   20568           0 :     arg6 = reinterpret_cast< char * >(buf6);
   20569             :   }
   20570         130 :   if (swig_obj[6]) {
   20571           0 :     res7 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf7, NULL, &alloc7);
   20572           0 :     if (!SWIG_IsOK(res7)) {
   20573           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_GCP" "', argument " "7"" of type '" "char const *""'");
   20574             :     }
   20575           0 :     arg7 = reinterpret_cast< char * >(buf7);
   20576             :   }
   20577         130 :   {
   20578         130 :     const int bLocalUseExceptions = GetUseExceptions();
   20579         130 :     if ( bLocalUseExceptions ) {
   20580         119 :       pushErrorHandler();
   20581             :     }
   20582         130 :     {
   20583         130 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20584         130 :       result = (GDAL_GCP *)new_GDAL_GCP(arg1,arg2,arg3,arg4,arg5,(char const *)arg6,(char const *)arg7);
   20585         130 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20586             :     }
   20587         130 :     if ( bLocalUseExceptions ) {
   20588         119 :       popErrorHandler();
   20589             :     }
   20590             : #ifndef SED_HACKS
   20591             :     if ( bLocalUseExceptions ) {
   20592             :       CPLErr eclass = CPLGetLastErrorType();
   20593             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20594             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20595             :       }
   20596             :     }
   20597             : #endif
   20598             :   }
   20599         130 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_NEW |  0 );
   20600         130 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
   20601         130 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
   20602         130 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20603             :   return resultobj;
   20604           0 : fail:
   20605           0 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
   20606           0 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
   20607             :   return NULL;
   20608             : }
   20609             : 
   20610             : 
   20611        3432 : SWIGINTERN PyObject *_wrap_delete_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20612        3432 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20613        3432 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20614        3432 :   void *argp1 = 0 ;
   20615        3432 :   int res1 = 0 ;
   20616        3432 :   PyObject *swig_obj[1] ;
   20617             :   
   20618        3432 :   if (!args) SWIG_fail;
   20619        3432 :   swig_obj[0] = args;
   20620        3432 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_DISOWN |  0 );
   20621        3432 :   if (!SWIG_IsOK(res1)) {
   20622           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GCP" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20623             :   }
   20624        3432 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20625        3432 :   {
   20626        3432 :     const int bLocalUseExceptions = GetUseExceptions();
   20627        3432 :     if ( bLocalUseExceptions ) {
   20628        3337 :       pushErrorHandler();
   20629             :     }
   20630        3432 :     {
   20631        3432 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20632        3432 :       delete_GDAL_GCP(arg1);
   20633        3432 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20634             :     }
   20635        3432 :     if ( bLocalUseExceptions ) {
   20636        3337 :       popErrorHandler();
   20637             :     }
   20638             : #ifndef SED_HACKS
   20639             :     if ( bLocalUseExceptions ) {
   20640             :       CPLErr eclass = CPLGetLastErrorType();
   20641             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20642             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20643             :       }
   20644             :     }
   20645             : #endif
   20646             :   }
   20647        3432 :   resultobj = SWIG_Py_Void();
   20648        3432 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20649             :   return resultobj;
   20650             : fail:
   20651             :   return NULL;
   20652             : }
   20653             : 
   20654             : 
   20655         276 : SWIGINTERN PyObject *GCP_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20656         276 :   PyObject *obj;
   20657         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   20658         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDAL_GCP, SWIG_NewClientData(obj));
   20659         276 :   return SWIG_Py_Void();
   20660             : }
   20661             : 
   20662         130 : SWIGINTERN PyObject *GCP_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20663         130 :   return SWIG_Python_InitShadowInstance(args);
   20664             : }
   20665             : 
   20666           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20667           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20668           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20669           0 :   void *argp1 = 0 ;
   20670           0 :   int res1 = 0 ;
   20671           0 :   PyObject *swig_obj[1] ;
   20672           0 :   double result;
   20673             :   
   20674           0 :   if (!args) SWIG_fail;
   20675           0 :   swig_obj[0] = args;
   20676           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20677           0 :   if (!SWIG_IsOK(res1)) {
   20678           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20679             :   }
   20680           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20681           0 :   {
   20682           0 :     if (!arg1) {
   20683           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20684             :     }
   20685             :   }
   20686           0 :   {
   20687           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20688           0 :     if ( bLocalUseExceptions ) {
   20689           0 :       pushErrorHandler();
   20690             :     }
   20691           0 :     {
   20692           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20693           0 :       result = (double)GDAL_GCP_GCPX_get(arg1);
   20694           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20695             :     }
   20696           0 :     if ( bLocalUseExceptions ) {
   20697           0 :       popErrorHandler();
   20698             :     }
   20699             : #ifndef SED_HACKS
   20700             :     if ( bLocalUseExceptions ) {
   20701             :       CPLErr eclass = CPLGetLastErrorType();
   20702             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20703             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20704             :       }
   20705             :     }
   20706             : #endif
   20707             :   }
   20708           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20709           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20710             :   return resultobj;
   20711             : fail:
   20712             :   return NULL;
   20713             : }
   20714             : 
   20715             : 
   20716           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20717           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20718           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20719           0 :   double arg2 ;
   20720           0 :   void *argp1 = 0 ;
   20721           0 :   int res1 = 0 ;
   20722           0 :   double val2 ;
   20723           0 :   int ecode2 = 0 ;
   20724           0 :   PyObject *swig_obj[2] ;
   20725             :   
   20726           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPX_set", 2, 2, swig_obj)) SWIG_fail;
   20727           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20728           0 :   if (!SWIG_IsOK(res1)) {
   20729           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20730             :   }
   20731           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20732           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20733           0 :   if (!SWIG_IsOK(ecode2)) {
   20734           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
   20735             :   } 
   20736           0 :   arg2 = static_cast< double >(val2);
   20737           0 :   {
   20738           0 :     if (!arg1) {
   20739           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20740             :     }
   20741             :   }
   20742           0 :   {
   20743           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20744           0 :     if ( bLocalUseExceptions ) {
   20745           0 :       pushErrorHandler();
   20746             :     }
   20747           0 :     {
   20748           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20749           0 :       GDAL_GCP_GCPX_set(arg1,arg2);
   20750           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20751             :     }
   20752           0 :     if ( bLocalUseExceptions ) {
   20753           0 :       popErrorHandler();
   20754             :     }
   20755             : #ifndef SED_HACKS
   20756             :     if ( bLocalUseExceptions ) {
   20757             :       CPLErr eclass = CPLGetLastErrorType();
   20758             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20759             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20760             :       }
   20761             :     }
   20762             : #endif
   20763             :   }
   20764           0 :   resultobj = SWIG_Py_Void();
   20765           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20766             :   return resultobj;
   20767             : fail:
   20768             :   return NULL;
   20769             : }
   20770             : 
   20771             : 
   20772           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20773           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20774           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20775           0 :   void *argp1 = 0 ;
   20776           0 :   int res1 = 0 ;
   20777           0 :   PyObject *swig_obj[1] ;
   20778           0 :   double result;
   20779             :   
   20780           0 :   if (!args) SWIG_fail;
   20781           0 :   swig_obj[0] = args;
   20782           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20783           0 :   if (!SWIG_IsOK(res1)) {
   20784           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20785             :   }
   20786           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20787           0 :   {
   20788           0 :     if (!arg1) {
   20789           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20790             :     }
   20791             :   }
   20792           0 :   {
   20793           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20794           0 :     if ( bLocalUseExceptions ) {
   20795           0 :       pushErrorHandler();
   20796             :     }
   20797           0 :     {
   20798           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20799           0 :       result = (double)GDAL_GCP_GCPY_get(arg1);
   20800           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20801             :     }
   20802           0 :     if ( bLocalUseExceptions ) {
   20803           0 :       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           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20815           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20816             :   return resultobj;
   20817             : fail:
   20818             :   return NULL;
   20819             : }
   20820             : 
   20821             : 
   20822           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20823           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20824           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20825           0 :   double arg2 ;
   20826           0 :   void *argp1 = 0 ;
   20827           0 :   int res1 = 0 ;
   20828           0 :   double val2 ;
   20829           0 :   int ecode2 = 0 ;
   20830           0 :   PyObject *swig_obj[2] ;
   20831             :   
   20832           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPY_set", 2, 2, swig_obj)) SWIG_fail;
   20833           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20834           0 :   if (!SWIG_IsOK(res1)) {
   20835           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20836             :   }
   20837           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20838           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20839           0 :   if (!SWIG_IsOK(ecode2)) {
   20840           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
   20841             :   } 
   20842           0 :   arg2 = static_cast< double >(val2);
   20843           0 :   {
   20844           0 :     if (!arg1) {
   20845           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20846             :     }
   20847             :   }
   20848           0 :   {
   20849           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20850           0 :     if ( bLocalUseExceptions ) {
   20851           0 :       pushErrorHandler();
   20852             :     }
   20853           0 :     {
   20854           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20855           0 :       GDAL_GCP_GCPY_set(arg1,arg2);
   20856           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20857             :     }
   20858           0 :     if ( bLocalUseExceptions ) {
   20859           0 :       popErrorHandler();
   20860             :     }
   20861             : #ifndef SED_HACKS
   20862             :     if ( bLocalUseExceptions ) {
   20863             :       CPLErr eclass = CPLGetLastErrorType();
   20864             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20865             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20866             :       }
   20867             :     }
   20868             : #endif
   20869             :   }
   20870           0 :   resultobj = SWIG_Py_Void();
   20871           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20872             :   return resultobj;
   20873             : fail:
   20874             :   return NULL;
   20875             : }
   20876             : 
   20877             : 
   20878           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20879           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20880           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20881           0 :   void *argp1 = 0 ;
   20882           0 :   int res1 = 0 ;
   20883           0 :   PyObject *swig_obj[1] ;
   20884           0 :   double result;
   20885             :   
   20886           0 :   if (!args) SWIG_fail;
   20887           0 :   swig_obj[0] = args;
   20888           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20889           0 :   if (!SWIG_IsOK(res1)) {
   20890           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20891             :   }
   20892           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20893           0 :   {
   20894           0 :     if (!arg1) {
   20895           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20896             :     }
   20897             :   }
   20898           0 :   {
   20899           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20900           0 :     if ( bLocalUseExceptions ) {
   20901           0 :       pushErrorHandler();
   20902             :     }
   20903           0 :     {
   20904           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20905           0 :       result = (double)GDAL_GCP_GCPZ_get(arg1);
   20906           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20907             :     }
   20908           0 :     if ( bLocalUseExceptions ) {
   20909           0 :       popErrorHandler();
   20910             :     }
   20911             : #ifndef SED_HACKS
   20912             :     if ( bLocalUseExceptions ) {
   20913             :       CPLErr eclass = CPLGetLastErrorType();
   20914             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20915             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20916             :       }
   20917             :     }
   20918             : #endif
   20919             :   }
   20920           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20921           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20922             :   return resultobj;
   20923             : fail:
   20924             :   return NULL;
   20925             : }
   20926             : 
   20927             : 
   20928           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20929           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20930           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20931           0 :   double arg2 ;
   20932           0 :   void *argp1 = 0 ;
   20933           0 :   int res1 = 0 ;
   20934           0 :   double val2 ;
   20935           0 :   int ecode2 = 0 ;
   20936           0 :   PyObject *swig_obj[2] ;
   20937             :   
   20938           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPZ_set", 2, 2, swig_obj)) SWIG_fail;
   20939           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20940           0 :   if (!SWIG_IsOK(res1)) {
   20941           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20942             :   }
   20943           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20944           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20945           0 :   if (!SWIG_IsOK(ecode2)) {
   20946           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
   20947             :   } 
   20948           0 :   arg2 = static_cast< double >(val2);
   20949           0 :   {
   20950           0 :     if (!arg1) {
   20951           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20952             :     }
   20953             :   }
   20954           0 :   {
   20955           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20956           0 :     if ( bLocalUseExceptions ) {
   20957           0 :       pushErrorHandler();
   20958             :     }
   20959           0 :     {
   20960           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20961           0 :       GDAL_GCP_GCPZ_set(arg1,arg2);
   20962           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20963             :     }
   20964           0 :     if ( bLocalUseExceptions ) {
   20965           0 :       popErrorHandler();
   20966             :     }
   20967             : #ifndef SED_HACKS
   20968             :     if ( bLocalUseExceptions ) {
   20969             :       CPLErr eclass = CPLGetLastErrorType();
   20970             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20971             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20972             :       }
   20973             :     }
   20974             : #endif
   20975             :   }
   20976           0 :   resultobj = SWIG_Py_Void();
   20977           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20978             :   return resultobj;
   20979             : fail:
   20980             :   return NULL;
   20981             : }
   20982             : 
   20983             : 
   20984           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20985           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20986           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20987           0 :   void *argp1 = 0 ;
   20988           0 :   int res1 = 0 ;
   20989           0 :   PyObject *swig_obj[1] ;
   20990           0 :   double result;
   20991             :   
   20992           0 :   if (!args) SWIG_fail;
   20993           0 :   swig_obj[0] = args;
   20994           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20995           0 :   if (!SWIG_IsOK(res1)) {
   20996           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20997             :   }
   20998           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20999           0 :   {
   21000           0 :     if (!arg1) {
   21001           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21002             :     }
   21003             :   }
   21004           0 :   {
   21005           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21006           0 :     if ( bLocalUseExceptions ) {
   21007           0 :       pushErrorHandler();
   21008             :     }
   21009           0 :     {
   21010           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21011           0 :       result = (double)GDAL_GCP_GCPPixel_get(arg1);
   21012           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21013             :     }
   21014           0 :     if ( bLocalUseExceptions ) {
   21015           0 :       popErrorHandler();
   21016             :     }
   21017             : #ifndef SED_HACKS
   21018             :     if ( bLocalUseExceptions ) {
   21019             :       CPLErr eclass = CPLGetLastErrorType();
   21020             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21021             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21022             :       }
   21023             :     }
   21024             : #endif
   21025             :   }
   21026           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   21027           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   21028             :   return resultobj;
   21029             : fail:
   21030             :   return NULL;
   21031             : }
   21032             : 
   21033             : 
   21034           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21035           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21036           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21037           0 :   double arg2 ;
   21038           0 :   void *argp1 = 0 ;
   21039           0 :   int res1 = 0 ;
   21040           0 :   double val2 ;
   21041           0 :   int ecode2 = 0 ;
   21042           0 :   PyObject *swig_obj[2] ;
   21043             :   
   21044           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPPixel_set", 2, 2, swig_obj)) SWIG_fail;
   21045           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21046           0 :   if (!SWIG_IsOK(res1)) {
   21047           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21048             :   }
   21049           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21050           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   21051           0 :   if (!SWIG_IsOK(ecode2)) {
   21052           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
   21053             :   } 
   21054           0 :   arg2 = static_cast< double >(val2);
   21055           0 :   {
   21056           0 :     if (!arg1) {
   21057           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21058             :     }
   21059             :   }
   21060           0 :   {
   21061           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21062           0 :     if ( bLocalUseExceptions ) {
   21063           0 :       pushErrorHandler();
   21064             :     }
   21065           0 :     {
   21066           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21067           0 :       GDAL_GCP_GCPPixel_set(arg1,arg2);
   21068           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21069             :     }
   21070           0 :     if ( bLocalUseExceptions ) {
   21071           0 :       popErrorHandler();
   21072             :     }
   21073             : #ifndef SED_HACKS
   21074             :     if ( bLocalUseExceptions ) {
   21075             :       CPLErr eclass = CPLGetLastErrorType();
   21076             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21077             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21078             :       }
   21079             :     }
   21080             : #endif
   21081             :   }
   21082           0 :   resultobj = SWIG_Py_Void();
   21083           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   21084             :   return resultobj;
   21085             : fail:
   21086             :   return NULL;
   21087             : }
   21088             : 
   21089             : 
   21090           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21091           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21092           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21093           0 :   void *argp1 = 0 ;
   21094           0 :   int res1 = 0 ;
   21095           0 :   PyObject *swig_obj[1] ;
   21096           0 :   double result;
   21097             :   
   21098           0 :   if (!args) SWIG_fail;
   21099           0 :   swig_obj[0] = args;
   21100           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21101           0 :   if (!SWIG_IsOK(res1)) {
   21102           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21103             :   }
   21104           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21105           0 :   {
   21106           0 :     if (!arg1) {
   21107           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21108             :     }
   21109             :   }
   21110           0 :   {
   21111           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21112           0 :     if ( bLocalUseExceptions ) {
   21113           0 :       pushErrorHandler();
   21114             :     }
   21115           0 :     {
   21116           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21117           0 :       result = (double)GDAL_GCP_GCPLine_get(arg1);
   21118           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21119             :     }
   21120           0 :     if ( bLocalUseExceptions ) {
   21121           0 :       popErrorHandler();
   21122             :     }
   21123             : #ifndef SED_HACKS
   21124             :     if ( bLocalUseExceptions ) {
   21125             :       CPLErr eclass = CPLGetLastErrorType();
   21126             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21127             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21128             :       }
   21129             :     }
   21130             : #endif
   21131             :   }
   21132           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   21133           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   21134             :   return resultobj;
   21135             : fail:
   21136             :   return NULL;
   21137             : }
   21138             : 
   21139             : 
   21140           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21141           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21142           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21143           0 :   double arg2 ;
   21144           0 :   void *argp1 = 0 ;
   21145           0 :   int res1 = 0 ;
   21146           0 :   double val2 ;
   21147           0 :   int ecode2 = 0 ;
   21148           0 :   PyObject *swig_obj[2] ;
   21149             :   
   21150           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPLine_set", 2, 2, swig_obj)) SWIG_fail;
   21151           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21152           0 :   if (!SWIG_IsOK(res1)) {
   21153           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21154             :   }
   21155           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21156           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   21157           0 :   if (!SWIG_IsOK(ecode2)) {
   21158           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
   21159             :   } 
   21160           0 :   arg2 = static_cast< double >(val2);
   21161           0 :   {
   21162           0 :     if (!arg1) {
   21163           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21164             :     }
   21165             :   }
   21166           0 :   {
   21167           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21168           0 :     if ( bLocalUseExceptions ) {
   21169           0 :       pushErrorHandler();
   21170             :     }
   21171           0 :     {
   21172           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21173           0 :       GDAL_GCP_GCPLine_set(arg1,arg2);
   21174           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21175             :     }
   21176           0 :     if ( bLocalUseExceptions ) {
   21177           0 :       popErrorHandler();
   21178             :     }
   21179             : #ifndef SED_HACKS
   21180             :     if ( bLocalUseExceptions ) {
   21181             :       CPLErr eclass = CPLGetLastErrorType();
   21182             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21183             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21184             :       }
   21185             :     }
   21186             : #endif
   21187             :   }
   21188           0 :   resultobj = SWIG_Py_Void();
   21189           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   21190             :   return resultobj;
   21191             : fail:
   21192             :   return NULL;
   21193             : }
   21194             : 
   21195             : 
   21196           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21197           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21198           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21199           0 :   void *argp1 = 0 ;
   21200           0 :   int res1 = 0 ;
   21201           0 :   PyObject *swig_obj[1] ;
   21202           0 :   char *result = 0 ;
   21203             :   
   21204           0 :   if (!args) SWIG_fail;
   21205           0 :   swig_obj[0] = args;
   21206           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21207           0 :   if (!SWIG_IsOK(res1)) {
   21208           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21209             :   }
   21210           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21211           0 :   {
   21212           0 :     if (!arg1) {
   21213           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21214             :     }
   21215             :   }
   21216           0 :   {
   21217           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21218           0 :     if ( bLocalUseExceptions ) {
   21219           0 :       pushErrorHandler();
   21220             :     }
   21221           0 :     {
   21222           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21223           0 :       result = (char *)GDAL_GCP_Info_get(arg1);
   21224           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21225             :     }
   21226           0 :     if ( bLocalUseExceptions ) {
   21227           0 :       popErrorHandler();
   21228             :     }
   21229             : #ifndef SED_HACKS
   21230             :     if ( bLocalUseExceptions ) {
   21231             :       CPLErr eclass = CPLGetLastErrorType();
   21232             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21233             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21234             :       }
   21235             :     }
   21236             : #endif
   21237             :   }
   21238           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   21239           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   21240             :   return resultobj;
   21241             : fail:
   21242             :   return NULL;
   21243             : }
   21244             : 
   21245             : 
   21246           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21247           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21248           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21249           0 :   char *arg2 = (char *) 0 ;
   21250           0 :   void *argp1 = 0 ;
   21251           0 :   int res1 = 0 ;
   21252           0 :   int res2 ;
   21253           0 :   char *buf2 = 0 ;
   21254           0 :   int alloc2 = 0 ;
   21255           0 :   PyObject *swig_obj[2] ;
   21256             :   
   21257           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_Info_set", 2, 2, swig_obj)) SWIG_fail;
   21258           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21259           0 :   if (!SWIG_IsOK(res1)) {
   21260           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21261             :   }
   21262           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21263           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   21264           0 :   if (!SWIG_IsOK(res2)) {
   21265           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Info_set" "', argument " "2"" of type '" "char const *""'");
   21266             :   }
   21267           0 :   arg2 = reinterpret_cast< char * >(buf2);
   21268           0 :   {
   21269           0 :     if (!arg1) {
   21270           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21271             :     }
   21272             :   }
   21273           0 :   {
   21274           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21275           0 :     if ( bLocalUseExceptions ) {
   21276           0 :       pushErrorHandler();
   21277             :     }
   21278           0 :     {
   21279           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21280           0 :       GDAL_GCP_Info_set(arg1,(char const *)arg2);
   21281           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21282             :     }
   21283           0 :     if ( bLocalUseExceptions ) {
   21284           0 :       popErrorHandler();
   21285             :     }
   21286             : #ifndef SED_HACKS
   21287             :     if ( bLocalUseExceptions ) {
   21288             :       CPLErr eclass = CPLGetLastErrorType();
   21289             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21290             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21291             :       }
   21292             :     }
   21293             : #endif
   21294             :   }
   21295           0 :   resultobj = SWIG_Py_Void();
   21296           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21297           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   21298             :   return resultobj;
   21299           0 : fail:
   21300           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21301             :   return NULL;
   21302             : }
   21303             : 
   21304             : 
   21305           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21306           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21307           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21308           0 :   void *argp1 = 0 ;
   21309           0 :   int res1 = 0 ;
   21310           0 :   PyObject *swig_obj[1] ;
   21311           0 :   char *result = 0 ;
   21312             :   
   21313           0 :   if (!args) SWIG_fail;
   21314           0 :   swig_obj[0] = args;
   21315           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21316           0 :   if (!SWIG_IsOK(res1)) {
   21317           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21318             :   }
   21319           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21320           0 :   {
   21321           0 :     if (!arg1) {
   21322           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21323             :     }
   21324             :   }
   21325           0 :   {
   21326           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21327           0 :     if ( bLocalUseExceptions ) {
   21328           0 :       pushErrorHandler();
   21329             :     }
   21330           0 :     {
   21331           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21332           0 :       result = (char *)GDAL_GCP_Id_get(arg1);
   21333           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21334             :     }
   21335           0 :     if ( bLocalUseExceptions ) {
   21336           0 :       popErrorHandler();
   21337             :     }
   21338             : #ifndef SED_HACKS
   21339             :     if ( bLocalUseExceptions ) {
   21340             :       CPLErr eclass = CPLGetLastErrorType();
   21341             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21342             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21343             :       }
   21344             :     }
   21345             : #endif
   21346             :   }
   21347           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   21348           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   21349             :   return resultobj;
   21350             : fail:
   21351             :   return NULL;
   21352             : }
   21353             : 
   21354             : 
   21355           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21356           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21357           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21358           0 :   char *arg2 = (char *) 0 ;
   21359           0 :   void *argp1 = 0 ;
   21360           0 :   int res1 = 0 ;
   21361           0 :   int res2 ;
   21362           0 :   char *buf2 = 0 ;
   21363           0 :   int alloc2 = 0 ;
   21364           0 :   PyObject *swig_obj[2] ;
   21365             :   
   21366           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_Id_set", 2, 2, swig_obj)) SWIG_fail;
   21367           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21368           0 :   if (!SWIG_IsOK(res1)) {
   21369           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21370             :   }
   21371           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21372           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   21373           0 :   if (!SWIG_IsOK(res2)) {
   21374           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Id_set" "', argument " "2"" of type '" "char const *""'");
   21375             :   }
   21376           0 :   arg2 = reinterpret_cast< char * >(buf2);
   21377           0 :   {
   21378           0 :     if (!arg1) {
   21379           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21380             :     }
   21381             :   }
   21382           0 :   {
   21383           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21384           0 :     if ( bLocalUseExceptions ) {
   21385           0 :       pushErrorHandler();
   21386             :     }
   21387           0 :     {
   21388           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21389           0 :       GDAL_GCP_Id_set(arg1,(char const *)arg2);
   21390           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21391             :     }
   21392           0 :     if ( bLocalUseExceptions ) {
   21393           0 :       popErrorHandler();
   21394             :     }
   21395             : #ifndef SED_HACKS
   21396             :     if ( bLocalUseExceptions ) {
   21397             :       CPLErr eclass = CPLGetLastErrorType();
   21398             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21399             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21400             :       }
   21401             :     }
   21402             : #endif
   21403             :   }
   21404           0 :   resultobj = SWIG_Py_Void();
   21405           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21406           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   21407             :   return resultobj;
   21408           0 : fail:
   21409           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21410             :   return NULL;
   21411             : }
   21412             : 
   21413             : 
   21414          10 : SWIGINTERN PyObject *_wrap_GCPsToGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21415          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21416          10 :   int arg1 ;
   21417          10 :   GDAL_GCP *arg2 = (GDAL_GCP *) 0 ;
   21418          10 :   double *arg3 ;
   21419          10 :   int arg4 = (int) 1 ;
   21420          10 :   GDAL_GCP *tmpGCPList1 ;
   21421          10 :   double argout3[6] ;
   21422          10 :   int val4 ;
   21423          10 :   int ecode4 = 0 ;
   21424          10 :   PyObject *swig_obj[2] ;
   21425          10 :   RETURN_NONE result;
   21426             :   
   21427          10 :   {
   21428             :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   21429          10 :     memset(argout3, 0, sizeof(argout3));
   21430          10 :     arg3 = argout3;
   21431             :   }
   21432          10 :   if (!SWIG_Python_UnpackTuple(args, "GCPsToGeoTransform", 1, 2, swig_obj)) SWIG_fail;
   21433          10 :   {
   21434             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21435             :     /* check if is List */
   21436          10 :     if ( !PySequence_Check(swig_obj[0]) ) {
   21437           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   21438           0 :       SWIG_fail;
   21439             :     }
   21440          10 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   21441          10 :     if( size > (Py_ssize_t)INT_MAX ) {
   21442           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   21443           0 :       SWIG_fail;
   21444             :     }
   21445          10 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   21446           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   21447           0 :       SWIG_fail;
   21448             :     }
   21449          10 :     arg1 = (int)size;
   21450          10 :     tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
   21451          10 :     if( !tmpGCPList1 ) {
   21452           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   21453           0 :       SWIG_fail;
   21454             :     }
   21455          46 :     arg2 = tmpGCPList1;
   21456          46 :     for( int i = 0; i<arg1; i++ ) {
   21457          36 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   21458          36 :       GDAL_GCP *item = 0;
   21459          36 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   21460          36 :       if ( ! item ) {
   21461           0 :         Py_DECREF(o);
   21462           0 :         SWIG_fail;
   21463             :       }
   21464          36 :       memcpy( tmpGCPList1 + i, item, sizeof( GDAL_GCP ) );
   21465          36 :       Py_DECREF(o);
   21466             :     }
   21467             :   }
   21468          10 :   if (swig_obj[1]) {
   21469           1 :     ecode4 = SWIG_AsVal_int(swig_obj[1], &val4);
   21470           1 :     if (!SWIG_IsOK(ecode4)) {
   21471           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GCPsToGeoTransform" "', argument " "4"" of type '" "int""'");
   21472             :     } 
   21473             :     arg4 = static_cast< int >(val4);
   21474             :   }
   21475          10 :   {
   21476          10 :     const int bLocalUseExceptions = GetUseExceptions();
   21477          10 :     if ( bLocalUseExceptions ) {
   21478          10 :       pushErrorHandler();
   21479             :     }
   21480          10 :     {
   21481          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21482          10 :       result = (RETURN_NONE)GDALGCPsToGeoTransform(arg1,(GDAL_GCP const *)arg2,arg3,arg4);
   21483          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21484             :     }
   21485          10 :     if ( bLocalUseExceptions ) {
   21486          10 :       popErrorHandler();
   21487             :     }
   21488             : #ifndef SED_HACKS
   21489             :     if ( bLocalUseExceptions ) {
   21490             :       CPLErr eclass = CPLGetLastErrorType();
   21491             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21492             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21493             :       }
   21494             :     }
   21495             : #endif
   21496             :   }
   21497             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   21498          10 :   {
   21499             :     /* %typemap(argout) (double argout[ANY]) */
   21500          10 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 6 );
   21501             : #if SWIG_VERSION >= 0x040300
   21502             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   21503             : #else
   21504          10 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   21505             : #endif
   21506             :   }
   21507          10 :   {
   21508             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21509          10 :     free( arg2 );
   21510             :   }
   21511          10 :   {
   21512             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   21513          10 :     if (result == 0 ) {
   21514           4 :       Py_XDECREF( resultobj );
   21515           4 :       resultobj = Py_None;
   21516           4 :       Py_INCREF(resultobj);
   21517             :     }
   21518          10 :     if (resultobj == 0) {
   21519           0 :       resultobj = Py_None;
   21520           0 :       Py_INCREF(resultobj);
   21521             :     }
   21522             :   }
   21523          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   21524             :   return resultobj;
   21525           0 : fail:
   21526           0 :   {
   21527             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21528           0 :     free( arg2 );
   21529             :   }
   21530           0 :   return NULL;
   21531             : }
   21532             : 
   21533             : 
   21534          10 : SWIGINTERN PyObject *_wrap_GCPsToHomography(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21535          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21536          10 :   int arg1 ;
   21537          10 :   GDAL_GCP *arg2 = (GDAL_GCP *) 0 ;
   21538          10 :   double *arg3 ;
   21539          10 :   GDAL_GCP *tmpGCPList1 ;
   21540          10 :   double argout3[9] ;
   21541          10 :   PyObject *swig_obj[1] ;
   21542          10 :   RETURN_NONE result;
   21543             :   
   21544          10 :   {
   21545             :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   21546          10 :     memset(argout3, 0, sizeof(argout3));
   21547          10 :     arg3 = argout3;
   21548             :   }
   21549          10 :   if (!args) SWIG_fail;
   21550          10 :   swig_obj[0] = args;
   21551          10 :   {
   21552             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21553             :     /* check if is List */
   21554          10 :     if ( !PySequence_Check(swig_obj[0]) ) {
   21555           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   21556           0 :       SWIG_fail;
   21557             :     }
   21558          10 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   21559          10 :     if( size > (Py_ssize_t)INT_MAX ) {
   21560           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   21561           0 :       SWIG_fail;
   21562             :     }
   21563          10 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   21564           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   21565           0 :       SWIG_fail;
   21566             :     }
   21567          10 :     arg1 = (int)size;
   21568          10 :     tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
   21569          10 :     if( !tmpGCPList1 ) {
   21570           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   21571           0 :       SWIG_fail;
   21572             :     }
   21573          46 :     arg2 = tmpGCPList1;
   21574          46 :     for( int i = 0; i<arg1; i++ ) {
   21575          36 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   21576          36 :       GDAL_GCP *item = 0;
   21577          36 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   21578          36 :       if ( ! item ) {
   21579           0 :         Py_DECREF(o);
   21580           0 :         SWIG_fail;
   21581             :       }
   21582          36 :       memcpy( tmpGCPList1 + i, item, sizeof( GDAL_GCP ) );
   21583          36 :       Py_DECREF(o);
   21584             :     }
   21585             :   }
   21586          10 :   {
   21587          10 :     const int bLocalUseExceptions = GetUseExceptions();
   21588          10 :     if ( bLocalUseExceptions ) {
   21589          10 :       pushErrorHandler();
   21590             :     }
   21591          10 :     {
   21592          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21593          10 :       result = (RETURN_NONE)GDALGCPsToHomography(arg1,(GDAL_GCP const *)arg2,arg3);
   21594          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21595             :     }
   21596          10 :     if ( bLocalUseExceptions ) {
   21597          10 :       popErrorHandler();
   21598             :     }
   21599             : #ifndef SED_HACKS
   21600             :     if ( bLocalUseExceptions ) {
   21601             :       CPLErr eclass = CPLGetLastErrorType();
   21602             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21603             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21604             :       }
   21605             :     }
   21606             : #endif
   21607             :   }
   21608             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   21609          10 :   {
   21610             :     /* %typemap(argout) (double argout[ANY]) */
   21611          10 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 9 );
   21612             : #if SWIG_VERSION >= 0x040300
   21613             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   21614             : #else
   21615          10 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   21616             : #endif
   21617             :   }
   21618          10 :   {
   21619             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21620          10 :     free( arg2 );
   21621             :   }
   21622          10 :   {
   21623             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   21624          10 :     if (result == 0 ) {
   21625           3 :       Py_XDECREF( resultobj );
   21626           3 :       resultobj = Py_None;
   21627           3 :       Py_INCREF(resultobj);
   21628             :     }
   21629          10 :     if (resultobj == 0) {
   21630           0 :       resultobj = Py_None;
   21631           0 :       Py_INCREF(resultobj);
   21632             :     }
   21633             :   }
   21634          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   21635             :   return resultobj;
   21636           0 : fail:
   21637           0 :   {
   21638             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21639           0 :     free( arg2 );
   21640             :   }
   21641           0 :   return NULL;
   21642             : }
   21643             : 
   21644             : 
   21645           0 : SWIGINTERN PyObject *_wrap_delete_VirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21646           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21647           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   21648           0 :   void *argp1 = 0 ;
   21649           0 :   int res1 = 0 ;
   21650           0 :   PyObject *swig_obj[1] ;
   21651             :   
   21652           0 :   if (!args) SWIG_fail;
   21653           0 :   swig_obj[0] = args;
   21654           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_DISOWN |  0 );
   21655           0 :   if (!SWIG_IsOK(res1)) {
   21656           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VirtualMem" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   21657             :   }
   21658           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   21659           0 :   {
   21660           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21661           0 :     if ( bLocalUseExceptions ) {
   21662           0 :       pushErrorHandler();
   21663             :     }
   21664           0 :     {
   21665           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21666           0 :       delete_CPLVirtualMemShadow(arg1);
   21667           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21668             :     }
   21669           0 :     if ( bLocalUseExceptions ) {
   21670           0 :       popErrorHandler();
   21671             :     }
   21672             : #ifndef SED_HACKS
   21673             :     if ( bLocalUseExceptions ) {
   21674             :       CPLErr eclass = CPLGetLastErrorType();
   21675             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21676             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21677             :       }
   21678             :     }
   21679             : #endif
   21680             :   }
   21681           0 :   resultobj = SWIG_Py_Void();
   21682           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   21683             :   return resultobj;
   21684             : fail:
   21685             :   return NULL;
   21686             : }
   21687             : 
   21688             : 
   21689           0 : SWIGINTERN PyObject *_wrap_VirtualMem_GetAddr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21690           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21691           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   21692           0 :   void **arg2 = (void **) 0 ;
   21693           0 :   size_t *arg3 = (size_t *) 0 ;
   21694           0 :   GDALDataType *arg4 = (GDALDataType *) 0 ;
   21695           0 :   int *arg5 = (int *) 0 ;
   21696           0 :   void *argp1 = 0 ;
   21697           0 :   int res1 = 0 ;
   21698           0 :   void *ptr2 ;
   21699           0 :   size_t nsize2 ;
   21700           0 :   GDALDataType datatype2 ;
   21701           0 :   int readonly2 ;
   21702           0 :   PyObject *swig_obj[1] ;
   21703             :   
   21704           0 :   {
   21705             :     /* %typemap(in,numinputs=0) (void** pptr, size_t* pnsize, GDALDataType* pdatatype, int* preadonly) */
   21706           0 :     arg2 = &ptr2;
   21707           0 :     arg3 = &nsize2;
   21708           0 :     arg4 = &datatype2;
   21709           0 :     arg5 = &readonly2;
   21710             :   }
   21711           0 :   if (!args) SWIG_fail;
   21712           0 :   swig_obj[0] = args;
   21713           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, 0 |  0 );
   21714           0 :   if (!SWIG_IsOK(res1)) {
   21715           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VirtualMem_GetAddr" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   21716             :   }
   21717           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   21718           0 :   {
   21719           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21720           0 :     if ( bLocalUseExceptions ) {
   21721           0 :       pushErrorHandler();
   21722             :     }
   21723           0 :     {
   21724           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21725           0 :       CPLVirtualMemShadow_GetAddr(arg1,arg2,arg3,arg4,arg5);
   21726           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21727             :     }
   21728           0 :     if ( bLocalUseExceptions ) {
   21729           0 :       popErrorHandler();
   21730             :     }
   21731             : #ifndef SED_HACKS
   21732             :     if ( bLocalUseExceptions ) {
   21733             :       CPLErr eclass = CPLGetLastErrorType();
   21734             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21735             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21736             :       }
   21737             :     }
   21738             : #endif
   21739             :   }
   21740           0 :   resultobj = SWIG_Py_Void();
   21741           0 :   {
   21742             :     /* %typemap(argout) (void** pptr, size_t* pnsize, GDALDataType* pdatatype, int* preadonly)*/
   21743           0 :     Py_buffer *buf=(Py_buffer*)malloc(sizeof(Py_buffer));
   21744             :     
   21745           0 :     if (PyBuffer_FillInfo(buf, swig_obj[0], *(arg2), *(arg3), *(arg5), PyBUF_ND)) {
   21746             :       // error, handle
   21747             :     }
   21748           0 :     if( *(arg4) == GDT_Byte )
   21749             :     {
   21750           0 :       buf->format = (char*) "B";
   21751           0 :       buf->itemsize = 1;
   21752             :     }
   21753           0 :     else if( *(arg4) == GDT_Int16 )
   21754             :     {
   21755           0 :       buf->format = (char*) "h";
   21756           0 :       buf->itemsize = 2;
   21757             :     }
   21758           0 :     else if( *(arg4) == GDT_UInt16 )
   21759             :     {
   21760           0 :       buf->format = (char*) "H";
   21761           0 :       buf->itemsize = 2;
   21762             :     }
   21763           0 :     else if( *(arg4) == GDT_Int32 )
   21764             :     {
   21765           0 :       buf->format = (char*) "i";
   21766           0 :       buf->itemsize = 4;
   21767             :     }
   21768           0 :     else if( *(arg4) == GDT_UInt32 )
   21769             :     {
   21770           0 :       buf->format = (char*) "I";
   21771           0 :       buf->itemsize = 4;
   21772             :     }
   21773           0 :     else if( *(arg4) == GDT_Float16 )
   21774             :     {
   21775           0 :       buf->format = (char*) "f";
   21776           0 :       buf->itemsize = 2;
   21777             :     }
   21778           0 :     else if( *(arg4) == GDT_Float32 )
   21779             :     {
   21780           0 :       buf->format = (char*) "f";
   21781           0 :       buf->itemsize = 4;
   21782             :     }
   21783           0 :     else if( *(arg4) == GDT_Float64 )
   21784             :     {
   21785           0 :       buf->format = (char*) "F";
   21786           0 :       buf->itemsize = 8;
   21787             :     }
   21788             :     else
   21789             :     {
   21790           0 :       buf->format = (char*) "B";
   21791           0 :       buf->itemsize = 1;
   21792             :     }
   21793           0 :     Py_DECREF(resultobj);
   21794           0 :     resultobj = PyMemoryView_FromBuffer(buf);
   21795             :   }
   21796           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   21797             :   return resultobj;
   21798             : fail:
   21799             :   return NULL;
   21800             : }
   21801             : 
   21802             : 
   21803           0 : SWIGINTERN PyObject *_wrap_VirtualMem_Pin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21804           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21805           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   21806           0 :   size_t arg2 = (size_t) 0 ;
   21807           0 :   size_t arg3 = (size_t) 0 ;
   21808           0 :   int arg4 = (int) 0 ;
   21809           0 :   void *argp1 = 0 ;
   21810           0 :   int res1 = 0 ;
   21811           0 :   size_t val2 ;
   21812           0 :   int ecode2 = 0 ;
   21813           0 :   size_t val3 ;
   21814           0 :   int ecode3 = 0 ;
   21815           0 :   int val4 ;
   21816           0 :   int ecode4 = 0 ;
   21817           0 :   PyObject *swig_obj[4] ;
   21818             :   
   21819           0 :   if (!SWIG_Python_UnpackTuple(args, "VirtualMem_Pin", 1, 4, swig_obj)) SWIG_fail;
   21820           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, 0 |  0 );
   21821           0 :   if (!SWIG_IsOK(res1)) {
   21822           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VirtualMem_Pin" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   21823             :   }
   21824           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   21825           0 :   if (swig_obj[1]) {
   21826           0 :     ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   21827           0 :     if (!SWIG_IsOK(ecode2)) {
   21828           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VirtualMem_Pin" "', argument " "2"" of type '" "size_t""'");
   21829             :     } 
   21830             :     arg2 = static_cast< size_t >(val2);
   21831             :   }
   21832           0 :   if (swig_obj[2]) {
   21833           0 :     ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
   21834           0 :     if (!SWIG_IsOK(ecode3)) {
   21835           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VirtualMem_Pin" "', argument " "3"" of type '" "size_t""'");
   21836             :     } 
   21837             :     arg3 = static_cast< size_t >(val3);
   21838             :   }
   21839           0 :   if (swig_obj[3]) {
   21840           0 :     ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   21841           0 :     if (!SWIG_IsOK(ecode4)) {
   21842           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VirtualMem_Pin" "', argument " "4"" of type '" "int""'");
   21843             :     } 
   21844             :     arg4 = static_cast< int >(val4);
   21845             :   }
   21846           0 :   {
   21847           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21848           0 :     if ( bLocalUseExceptions ) {
   21849           0 :       pushErrorHandler();
   21850             :     }
   21851           0 :     {
   21852           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21853           0 :       CPLVirtualMemShadow_Pin(arg1,arg2,arg3,arg4);
   21854           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21855             :     }
   21856           0 :     if ( bLocalUseExceptions ) {
   21857           0 :       popErrorHandler();
   21858             :     }
   21859             : #ifndef SED_HACKS
   21860             :     if ( bLocalUseExceptions ) {
   21861             :       CPLErr eclass = CPLGetLastErrorType();
   21862             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21863             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21864             :       }
   21865             :     }
   21866             : #endif
   21867             :   }
   21868           0 :   resultobj = SWIG_Py_Void();
   21869           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   21870             :   return resultobj;
   21871             : fail:
   21872             :   return NULL;
   21873             : }
   21874             : 
   21875             : 
   21876         276 : SWIGINTERN PyObject *VirtualMem_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21877         276 :   PyObject *obj;
   21878         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   21879         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_CPLVirtualMemShadow, SWIG_NewClientData(obj));
   21880         276 :   return SWIG_Py_Void();
   21881             : }
   21882             : 
   21883           1 : SWIGINTERN PyObject *_wrap_delete_AsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21884           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21885           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   21886           1 :   void *argp1 = 0 ;
   21887           1 :   int res1 = 0 ;
   21888           1 :   PyObject *swig_obj[1] ;
   21889             :   
   21890           1 :   if (!args) SWIG_fail;
   21891           1 :   swig_obj[0] = args;
   21892           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_DISOWN |  0 );
   21893           1 :   if (!SWIG_IsOK(res1)) {
   21894           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AsyncReader" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   21895             :   }
   21896           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   21897           1 :   {
   21898           1 :     const int bLocalUseExceptions = GetUseExceptions();
   21899           1 :     if ( bLocalUseExceptions ) {
   21900           1 :       pushErrorHandler();
   21901             :     }
   21902           1 :     {
   21903           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21904           1 :       delete_GDALAsyncReaderShadow(arg1);
   21905           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21906             :     }
   21907           1 :     if ( bLocalUseExceptions ) {
   21908           1 :       popErrorHandler();
   21909             :     }
   21910             : #ifndef SED_HACKS
   21911             :     if ( bLocalUseExceptions ) {
   21912             :       CPLErr eclass = CPLGetLastErrorType();
   21913             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21914             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21915             :       }
   21916             :     }
   21917             : #endif
   21918             :   }
   21919           1 :   resultobj = SWIG_Py_Void();
   21920           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   21921             :   return resultobj;
   21922             : fail:
   21923             :   return NULL;
   21924             : }
   21925             : 
   21926             : 
   21927           1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetNextUpdatedRegion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21928           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21929           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   21930           1 :   double arg2 ;
   21931           1 :   int *arg3 = (int *) 0 ;
   21932           1 :   int *arg4 = (int *) 0 ;
   21933           1 :   int *arg5 = (int *) 0 ;
   21934           1 :   int *arg6 = (int *) 0 ;
   21935           1 :   void *argp1 = 0 ;
   21936           1 :   int res1 = 0 ;
   21937           1 :   double val2 ;
   21938           1 :   int ecode2 = 0 ;
   21939           1 :   int temp3 ;
   21940           1 :   int res3 = SWIG_TMPOBJ ;
   21941           1 :   int temp4 ;
   21942           1 :   int res4 = SWIG_TMPOBJ ;
   21943           1 :   int temp5 ;
   21944           1 :   int res5 = SWIG_TMPOBJ ;
   21945           1 :   int temp6 ;
   21946           1 :   int res6 = SWIG_TMPOBJ ;
   21947           1 :   PyObject *swig_obj[2] ;
   21948           1 :   GDALAsyncStatusType result;
   21949             :   
   21950           1 :   arg3 = &temp3;
   21951           1 :   arg4 = &temp4;
   21952           1 :   arg5 = &temp5;
   21953           1 :   arg6 = &temp6;
   21954           1 :   if (!SWIG_Python_UnpackTuple(args, "AsyncReader_GetNextUpdatedRegion", 2, 2, swig_obj)) SWIG_fail;
   21955           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   21956           1 :   if (!SWIG_IsOK(res1)) {
   21957           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   21958             :   }
   21959           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   21960           1 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   21961           1 :   if (!SWIG_IsOK(ecode2)) {
   21962           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "2"" of type '" "double""'");
   21963             :   } 
   21964           1 :   arg2 = static_cast< double >(val2);
   21965           1 :   {
   21966           1 :     const int bLocalUseExceptions = GetUseExceptions();
   21967           1 :     if ( bLocalUseExceptions ) {
   21968           1 :       pushErrorHandler();
   21969             :     }
   21970           1 :     {
   21971           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21972           1 :       result = (GDALAsyncStatusType)GDALAsyncReaderShadow_GetNextUpdatedRegion(arg1,arg2,arg3,arg4,arg5,arg6);
   21973           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21974             :     }
   21975           1 :     if ( bLocalUseExceptions ) {
   21976           1 :       popErrorHandler();
   21977             :     }
   21978             : #ifndef SED_HACKS
   21979             :     if ( bLocalUseExceptions ) {
   21980             :       CPLErr eclass = CPLGetLastErrorType();
   21981             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21982             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21983             :       }
   21984             :     }
   21985             : #endif
   21986             :   }
   21987           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   21988           1 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   21989           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   21990             :   } else {
   21991           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   21992           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   21993             :   }
   21994           1 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   21995           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
   21996             :   } else {
   21997           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   21998           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
   21999             :   }
   22000           1 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   22001           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
   22002             :   } else {
   22003           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   22004           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
   22005             :   }
   22006           1 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   22007           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
   22008             :   } else {
   22009           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   22010           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
   22011             :   }
   22012           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22013             :   return resultobj;
   22014             : fail:
   22015             :   return NULL;
   22016             : }
   22017             : 
   22018             : 
   22019           1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22020           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22021           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22022           1 :   void **arg2 = (void **) 0 ;
   22023           1 :   void *argp1 = 0 ;
   22024           1 :   int res1 = 0 ;
   22025           1 :   void *pyObject2 = NULL ;
   22026           1 :   PyObject *swig_obj[1] ;
   22027             :   
   22028           1 :   {
   22029             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   22030           1 :     arg2 = &pyObject2;
   22031             :   }
   22032           1 :   if (!args) SWIG_fail;
   22033           1 :   swig_obj[0] = args;
   22034           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22035           1 :   if (!SWIG_IsOK(res1)) {
   22036           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22037             :   }
   22038           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22039           1 :   {
   22040           1 :     const int bLocalUseExceptions = GetUseExceptions();
   22041           1 :     if ( bLocalUseExceptions ) {
   22042           1 :       pushErrorHandler();
   22043             :     }
   22044           1 :     {
   22045           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22046           1 :       GDALAsyncReaderShadow_GetBuffer(arg1,arg2);
   22047           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22048             :     }
   22049           1 :     if ( bLocalUseExceptions ) {
   22050           1 :       popErrorHandler();
   22051             :     }
   22052             : #ifndef SED_HACKS
   22053             :     if ( bLocalUseExceptions ) {
   22054             :       CPLErr eclass = CPLGetLastErrorType();
   22055             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22056             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22057             :       }
   22058             :     }
   22059             : #endif
   22060             :   }
   22061           1 :   resultobj = SWIG_Py_Void();
   22062           1 :   {
   22063             :     /* %typemap(argout) ( void **outPythonObject ) */
   22064           1 :     Py_XDECREF(resultobj);
   22065           1 :     if (*arg2)
   22066             :     {
   22067             :       resultobj = (PyObject*)*arg2;
   22068             :     }
   22069             :     else
   22070             :     {
   22071           0 :       resultobj = Py_None;
   22072           0 :       Py_INCREF(resultobj);
   22073             :     }
   22074             :   }
   22075           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22076             :   return resultobj;
   22077             : fail:
   22078             :   return NULL;
   22079             : }
   22080             : 
   22081             : 
   22082           0 : SWIGINTERN PyObject *_wrap_AsyncReader_LockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22083           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22084           0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22085           0 :   double arg2 ;
   22086           0 :   void *argp1 = 0 ;
   22087           0 :   int res1 = 0 ;
   22088           0 :   double val2 ;
   22089           0 :   int ecode2 = 0 ;
   22090           0 :   PyObject *swig_obj[2] ;
   22091           0 :   int result;
   22092             :   
   22093           0 :   if (!SWIG_Python_UnpackTuple(args, "AsyncReader_LockBuffer", 2, 2, swig_obj)) SWIG_fail;
   22094           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22095           0 :   if (!SWIG_IsOK(res1)) {
   22096           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_LockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22097             :   }
   22098           0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22099           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   22100           0 :   if (!SWIG_IsOK(ecode2)) {
   22101           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_LockBuffer" "', argument " "2"" of type '" "double""'");
   22102             :   } 
   22103           0 :   arg2 = static_cast< double >(val2);
   22104           0 :   {
   22105           0 :     const int bLocalUseExceptions = GetUseExceptions();
   22106           0 :     if ( bLocalUseExceptions ) {
   22107           0 :       pushErrorHandler();
   22108             :     }
   22109           0 :     {
   22110           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22111           0 :       result = (int)GDALAsyncReaderShadow_LockBuffer(arg1,arg2);
   22112           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22113             :     }
   22114           0 :     if ( bLocalUseExceptions ) {
   22115           0 :       popErrorHandler();
   22116             :     }
   22117             : #ifndef SED_HACKS
   22118             :     if ( bLocalUseExceptions ) {
   22119             :       CPLErr eclass = CPLGetLastErrorType();
   22120             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22121             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22122             :       }
   22123             :     }
   22124             : #endif
   22125             :   }
   22126           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22127           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22128             :   return resultobj;
   22129             : fail:
   22130             :   return NULL;
   22131             : }
   22132             : 
   22133             : 
   22134           0 : SWIGINTERN PyObject *_wrap_AsyncReader_UnlockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22135           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22136           0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22137           0 :   void *argp1 = 0 ;
   22138           0 :   int res1 = 0 ;
   22139           0 :   PyObject *swig_obj[1] ;
   22140             :   
   22141           0 :   if (!args) SWIG_fail;
   22142           0 :   swig_obj[0] = args;
   22143           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22144           0 :   if (!SWIG_IsOK(res1)) {
   22145           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_UnlockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22146             :   }
   22147           0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22148           0 :   {
   22149           0 :     const int bLocalUseExceptions = GetUseExceptions();
   22150           0 :     if ( bLocalUseExceptions ) {
   22151           0 :       pushErrorHandler();
   22152             :     }
   22153           0 :     {
   22154           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22155           0 :       GDALAsyncReaderShadow_UnlockBuffer(arg1);
   22156           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22157             :     }
   22158           0 :     if ( bLocalUseExceptions ) {
   22159           0 :       popErrorHandler();
   22160             :     }
   22161             : #ifndef SED_HACKS
   22162             :     if ( bLocalUseExceptions ) {
   22163             :       CPLErr eclass = CPLGetLastErrorType();
   22164             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22165             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22166             :       }
   22167             :     }
   22168             : #endif
   22169             :   }
   22170           0 :   resultobj = SWIG_Py_Void();
   22171           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22172             :   return resultobj;
   22173             : fail:
   22174             :   return NULL;
   22175             : }
   22176             : 
   22177             : 
   22178         276 : SWIGINTERN PyObject *AsyncReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22179         276 :   PyObject *obj;
   22180         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   22181         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_NewClientData(obj));
   22182         276 :   return SWIG_Py_Void();
   22183             : }
   22184             : 
   22185       19702 : SWIGINTERN PyObject *_wrap_Dataset_RasterXSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22186       19702 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22187       19702 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22188       19702 :   void *argp1 = 0 ;
   22189       19702 :   int res1 = 0 ;
   22190       19702 :   PyObject *swig_obj[1] ;
   22191       19702 :   int result;
   22192             :   
   22193       19702 :   if (!args) SWIG_fail;
   22194       19702 :   swig_obj[0] = args;
   22195       19702 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22196       19702 :   if (!SWIG_IsOK(res1)) {
   22197           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterXSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22198             :   }
   22199       19702 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22200       19702 :   {
   22201       19702 :     const int bLocalUseExceptions = GetUseExceptions();
   22202       19702 :     if ( bLocalUseExceptions ) {
   22203       16815 :       pushErrorHandler();
   22204             :     }
   22205       19702 :     {
   22206       19702 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22207       19702 :       result = (int)GDALDatasetShadow_RasterXSize_get(arg1);
   22208       19702 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22209             :     }
   22210       19702 :     if ( bLocalUseExceptions ) {
   22211       16815 :       popErrorHandler();
   22212             :     }
   22213             : #ifndef SED_HACKS
   22214             :     if ( bLocalUseExceptions ) {
   22215             :       CPLErr eclass = CPLGetLastErrorType();
   22216             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22217             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22218             :       }
   22219             :     }
   22220             : #endif
   22221             :   }
   22222       19702 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22223       19702 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22224             :   return resultobj;
   22225             : fail:
   22226             :   return NULL;
   22227             : }
   22228             : 
   22229             : 
   22230       19961 : SWIGINTERN PyObject *_wrap_Dataset_RasterYSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22231       19961 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22232       19961 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22233       19961 :   void *argp1 = 0 ;
   22234       19961 :   int res1 = 0 ;
   22235       19961 :   PyObject *swig_obj[1] ;
   22236       19961 :   int result;
   22237             :   
   22238       19961 :   if (!args) SWIG_fail;
   22239       19961 :   swig_obj[0] = args;
   22240       19961 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22241       19961 :   if (!SWIG_IsOK(res1)) {
   22242           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterYSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22243             :   }
   22244       19961 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22245       19961 :   {
   22246       19961 :     const int bLocalUseExceptions = GetUseExceptions();
   22247       19961 :     if ( bLocalUseExceptions ) {
   22248       17257 :       pushErrorHandler();
   22249             :     }
   22250       19961 :     {
   22251       19961 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22252       19961 :       result = (int)GDALDatasetShadow_RasterYSize_get(arg1);
   22253       19961 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22254             :     }
   22255       19961 :     if ( bLocalUseExceptions ) {
   22256       17257 :       popErrorHandler();
   22257             :     }
   22258             : #ifndef SED_HACKS
   22259             :     if ( bLocalUseExceptions ) {
   22260             :       CPLErr eclass = CPLGetLastErrorType();
   22261             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22262             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22263             :       }
   22264             :     }
   22265             : #endif
   22266             :   }
   22267       19961 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22268       19961 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22269             :   return resultobj;
   22270             : fail:
   22271             :   return NULL;
   22272             : }
   22273             : 
   22274             : 
   22275      354705 : SWIGINTERN PyObject *_wrap_Dataset_RasterCount_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22276      354705 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22277      354705 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22278      354705 :   void *argp1 = 0 ;
   22279      354705 :   int res1 = 0 ;
   22280      354705 :   PyObject *swig_obj[1] ;
   22281      354705 :   int result;
   22282             :   
   22283      354705 :   if (!args) SWIG_fail;
   22284      354705 :   swig_obj[0] = args;
   22285      354705 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22286      354705 :   if (!SWIG_IsOK(res1)) {
   22287           2 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterCount_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22288             :   }
   22289      354704 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22290      354704 :   {
   22291      354704 :     const int bLocalUseExceptions = GetUseExceptions();
   22292      354704 :     if ( bLocalUseExceptions ) {
   22293      339400 :       pushErrorHandler();
   22294             :     }
   22295      354704 :     {
   22296      354704 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22297      354704 :       result = (int)GDALDatasetShadow_RasterCount_get(arg1);
   22298      354704 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22299             :     }
   22300      354704 :     if ( bLocalUseExceptions ) {
   22301      339400 :       popErrorHandler();
   22302             :     }
   22303             : #ifndef SED_HACKS
   22304             :     if ( bLocalUseExceptions ) {
   22305             :       CPLErr eclass = CPLGetLastErrorType();
   22306             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22307             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22308             :       }
   22309             :     }
   22310             : #endif
   22311             :   }
   22312      354704 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22313      354705 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22314             :   return resultobj;
   22315             : fail:
   22316             :   return NULL;
   22317             : }
   22318             : 
   22319             : 
   22320       54424 : SWIGINTERN PyObject *_wrap_delete_Dataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22321       54424 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22322       54424 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22323       54424 :   void *argp1 = 0 ;
   22324       54424 :   int res1 = 0 ;
   22325       54424 :   PyObject *swig_obj[1] ;
   22326             :   
   22327       54424 :   if (!args) SWIG_fail;
   22328       54424 :   swig_obj[0] = args;
   22329       54424 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_DISOWN |  0 );
   22330       54424 :   if (!SWIG_IsOK(res1)) {
   22331           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dataset" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22332             :   }
   22333       54424 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22334       54424 :   {
   22335       54424 :     const int bLocalUseExceptions = GetUseExceptions();
   22336       54424 :     if ( bLocalUseExceptions ) {
   22337       23482 :       pushErrorHandler();
   22338             :     }
   22339       54424 :     {
   22340       54424 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22341       54424 :       delete_GDALDatasetShadow(arg1);
   22342       54424 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22343             :     }
   22344       54424 :     if ( bLocalUseExceptions ) {
   22345       23482 :       popErrorHandler();
   22346             :     }
   22347             : #ifndef SED_HACKS
   22348             :     if ( bLocalUseExceptions ) {
   22349             :       CPLErr eclass = CPLGetLastErrorType();
   22350             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22351             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22352             :       }
   22353             :     }
   22354             : #endif
   22355             :   }
   22356       54424 :   resultobj = SWIG_Py_Void();
   22357       54424 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22358             :   return resultobj;
   22359             : fail:
   22360             :   return NULL;
   22361             : }
   22362             : 
   22363             : 
   22364        3515 : SWIGINTERN PyObject *_wrap_Dataset_Close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22365        3515 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22366        3515 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22367        3515 :   void *argp1 = 0 ;
   22368        3515 :   int res1 = 0 ;
   22369        3515 :   PyObject *swig_obj[1] ;
   22370        3515 :   CPLErr result;
   22371             :   
   22372        3515 :   if (!args) SWIG_fail;
   22373        3515 :   swig_obj[0] = args;
   22374        3515 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22375        3515 :   if (!SWIG_IsOK(res1)) {
   22376           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_Close" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22377             :   }
   22378        3515 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22379        3515 :   {
   22380        3515 :     const int bLocalUseExceptions = GetUseExceptions();
   22381        3515 :     if ( bLocalUseExceptions ) {
   22382        1071 :       pushErrorHandler();
   22383             :     }
   22384        3515 :     {
   22385        3515 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22386        3515 :       result = (CPLErr)GDALDatasetShadow_Close(arg1);
   22387        3515 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22388             :     }
   22389        3515 :     if ( bLocalUseExceptions ) {
   22390        1071 :       popErrorHandler();
   22391             :     }
   22392             : #ifndef SED_HACKS
   22393             :     if ( bLocalUseExceptions ) {
   22394             :       CPLErr eclass = CPLGetLastErrorType();
   22395             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22396             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22397             :       }
   22398             :     }
   22399             : #endif
   22400             :   }
   22401        3515 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22402        3519 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22403             :   return resultobj;
   22404             : fail:
   22405             :   return NULL;
   22406             : }
   22407             : 
   22408             : 
   22409        1321 : SWIGINTERN PyObject *_wrap_Dataset_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22410        1321 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22411        1321 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22412        1321 :   void *argp1 = 0 ;
   22413        1321 :   int res1 = 0 ;
   22414        1321 :   PyObject *swig_obj[1] ;
   22415        1321 :   GDALDriverShadow *result = 0 ;
   22416             :   
   22417        1321 :   if (!args) SWIG_fail;
   22418        1321 :   swig_obj[0] = args;
   22419        1321 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22420        1321 :   if (!SWIG_IsOK(res1)) {
   22421           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetDriver" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22422             :   }
   22423        1321 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22424        1321 :   {
   22425        1321 :     const int bLocalUseExceptions = GetUseExceptions();
   22426        1321 :     if ( bLocalUseExceptions ) {
   22427         814 :       pushErrorHandler();
   22428             :     }
   22429        1321 :     {
   22430        1321 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22431        1321 :       result = (GDALDriverShadow *)GDALDatasetShadow_GetDriver(arg1);
   22432        1321 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22433             :     }
   22434        1321 :     if ( bLocalUseExceptions ) {
   22435         814 :       popErrorHandler();
   22436             :     }
   22437             : #ifndef SED_HACKS
   22438             :     if ( bLocalUseExceptions ) {
   22439             :       CPLErr eclass = CPLGetLastErrorType();
   22440             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22441             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22442             :       }
   22443             :     }
   22444             : #endif
   22445             :   }
   22446        1321 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   22447        1321 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22448             :   return resultobj;
   22449             : fail:
   22450             :   return NULL;
   22451             : }
   22452             : 
   22453             : 
   22454      259426 : SWIGINTERN PyObject *_wrap_Dataset_GetRasterBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22455      259426 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22456      259426 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22457      259426 :   int arg2 ;
   22458      259426 :   void *argp1 = 0 ;
   22459      259426 :   int res1 = 0 ;
   22460      259426 :   int val2 ;
   22461      259426 :   int ecode2 = 0 ;
   22462      259426 :   PyObject *swig_obj[2] ;
   22463      259426 :   GDALRasterBandShadow *result = 0 ;
   22464             :   
   22465      259426 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRasterBand", 2, 2, swig_obj)) SWIG_fail;
   22466      259426 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22467      259426 :   if (!SWIG_IsOK(res1)) {
   22468           8 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRasterBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22469             :   }
   22470      259422 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22471      259422 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   22472      259422 :   if (!SWIG_IsOK(ecode2)) {
   22473           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetRasterBand" "', argument " "2"" of type '" "int""'");
   22474             :   } 
   22475      259422 :   arg2 = static_cast< int >(val2);
   22476      259422 :   {
   22477      259422 :     const int bLocalUseExceptions = GetUseExceptions();
   22478      259422 :     if ( bLocalUseExceptions ) {
   22479      232721 :       pushErrorHandler();
   22480             :     }
   22481      259422 :     {
   22482      259422 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22483      259422 :       result = (GDALRasterBandShadow *)GDALDatasetShadow_GetRasterBand(arg1,arg2);
   22484      259422 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22485             :     }
   22486      259422 :     if ( bLocalUseExceptions ) {
   22487      232721 :       popErrorHandler();
   22488             :     }
   22489             : #ifndef SED_HACKS
   22490             :     if ( bLocalUseExceptions ) {
   22491             :       CPLErr eclass = CPLGetLastErrorType();
   22492             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22493             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22494             :       }
   22495             :     }
   22496             : #endif
   22497             :   }
   22498      259422 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   22499      259426 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22500             :   return resultobj;
   22501             : fail:
   22502             :   return NULL;
   22503             : }
   22504             : 
   22505             : 
   22506           5 : SWIGINTERN PyObject *_wrap_Dataset_IsThreadSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22507           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22508           5 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22509           5 :   int arg2 ;
   22510           5 :   void *argp1 = 0 ;
   22511           5 :   int res1 = 0 ;
   22512           5 :   int val2 ;
   22513           5 :   int ecode2 = 0 ;
   22514           5 :   PyObject *swig_obj[2] ;
   22515           5 :   bool result;
   22516             :   
   22517           5 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_IsThreadSafe", 2, 2, swig_obj)) SWIG_fail;
   22518           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22519           5 :   if (!SWIG_IsOK(res1)) {
   22520           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_IsThreadSafe" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22521             :   }
   22522           5 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22523           5 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   22524           5 :   if (!SWIG_IsOK(ecode2)) {
   22525           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_IsThreadSafe" "', argument " "2"" of type '" "int""'");
   22526             :   } 
   22527           5 :   arg2 = static_cast< int >(val2);
   22528           5 :   {
   22529           5 :     const int bLocalUseExceptions = GetUseExceptions();
   22530           5 :     if ( bLocalUseExceptions ) {
   22531           5 :       pushErrorHandler();
   22532             :     }
   22533           5 :     {
   22534           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22535           5 :       result = (bool)GDALDatasetShadow_IsThreadSafe(arg1,arg2);
   22536           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22537             :     }
   22538           5 :     if ( bLocalUseExceptions ) {
   22539           5 :       popErrorHandler();
   22540             :     }
   22541             : #ifndef SED_HACKS
   22542             :     if ( bLocalUseExceptions ) {
   22543             :       CPLErr eclass = CPLGetLastErrorType();
   22544             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22545             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22546             :       }
   22547             :     }
   22548             : #endif
   22549             :   }
   22550           5 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   22551           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22552             :   return resultobj;
   22553             : fail:
   22554             :   return NULL;
   22555             : }
   22556             : 
   22557             : 
   22558           8 : SWIGINTERN PyObject *_wrap_Dataset_GetThreadSafeDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22559           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22560           8 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22561           8 :   int arg2 ;
   22562           8 :   void *argp1 = 0 ;
   22563           8 :   int res1 = 0 ;
   22564           8 :   int val2 ;
   22565           8 :   int ecode2 = 0 ;
   22566           8 :   PyObject *swig_obj[2] ;
   22567           8 :   GDALDatasetShadow *result = 0 ;
   22568             :   
   22569           8 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetThreadSafeDataset", 2, 2, swig_obj)) SWIG_fail;
   22570           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22571           8 :   if (!SWIG_IsOK(res1)) {
   22572           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetThreadSafeDataset" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22573             :   }
   22574           8 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22575           8 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   22576           8 :   if (!SWIG_IsOK(ecode2)) {
   22577           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetThreadSafeDataset" "', argument " "2"" of type '" "int""'");
   22578             :   } 
   22579           8 :   arg2 = static_cast< int >(val2);
   22580           8 :   {
   22581           8 :     const int bLocalUseExceptions = GetUseExceptions();
   22582           8 :     if ( bLocalUseExceptions ) {
   22583           8 :       pushErrorHandler();
   22584             :     }
   22585           8 :     {
   22586           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22587           8 :       result = (GDALDatasetShadow *)GDALDatasetShadow_GetThreadSafeDataset(arg1,arg2);
   22588           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22589             :     }
   22590           8 :     if ( bLocalUseExceptions ) {
   22591           8 :       popErrorHandler();
   22592             :     }
   22593             : #ifndef SED_HACKS
   22594             :     if ( bLocalUseExceptions ) {
   22595             :       CPLErr eclass = CPLGetLastErrorType();
   22596             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22597             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22598             :       }
   22599             :     }
   22600             : #endif
   22601             :   }
   22602           8 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   22603           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22604             :   return resultobj;
   22605             : fail:
   22606             :   return NULL;
   22607             : }
   22608             : 
   22609             : 
   22610        1172 : SWIGINTERN PyObject *_wrap_Dataset_GetRootGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22611        1172 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22612        1172 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22613        1172 :   void *argp1 = 0 ;
   22614        1172 :   int res1 = 0 ;
   22615        1172 :   PyObject *swig_obj[1] ;
   22616        1172 :   GDALGroupHS *result = 0 ;
   22617             :   
   22618        1172 :   if (!args) SWIG_fail;
   22619        1172 :   swig_obj[0] = args;
   22620        1172 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22621        1172 :   if (!SWIG_IsOK(res1)) {
   22622           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRootGroup" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22623             :   }
   22624        1172 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22625        1172 :   {
   22626        1172 :     const int bLocalUseExceptions = GetUseExceptions();
   22627        1172 :     if ( bLocalUseExceptions ) {
   22628         331 :       pushErrorHandler();
   22629             :     }
   22630        1172 :     {
   22631        1172 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22632        1172 :       result = (GDALGroupHS *)GDALDatasetShadow_GetRootGroup(arg1);
   22633        1172 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22634             :     }
   22635        1172 :     if ( bLocalUseExceptions ) {
   22636         331 :       popErrorHandler();
   22637             :     }
   22638             : #ifndef SED_HACKS
   22639             :     if ( bLocalUseExceptions ) {
   22640             :       CPLErr eclass = CPLGetLastErrorType();
   22641             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22642             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22643             :       }
   22644             :     }
   22645             : #endif
   22646             :   }
   22647        1172 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   22648        1172 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22649             :   return resultobj;
   22650             : fail:
   22651             :   return NULL;
   22652             : }
   22653             : 
   22654             : 
   22655         447 : SWIGINTERN PyObject *_wrap_Dataset_GetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22656         447 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22657         447 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22658         447 :   void *argp1 = 0 ;
   22659         447 :   int res1 = 0 ;
   22660         447 :   PyObject *swig_obj[1] ;
   22661         447 :   char *result = 0 ;
   22662             :   
   22663         447 :   if (!args) SWIG_fail;
   22664         447 :   swig_obj[0] = args;
   22665         447 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22666         447 :   if (!SWIG_IsOK(res1)) {
   22667           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22668             :   }
   22669         447 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22670         447 :   {
   22671         447 :     const int bLocalUseExceptions = GetUseExceptions();
   22672         447 :     if ( bLocalUseExceptions ) {
   22673         398 :       pushErrorHandler();
   22674             :     }
   22675         447 :     {
   22676         447 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22677         447 :       result = (char *)GDALDatasetShadow_GetProjection(arg1);
   22678         447 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22679             :     }
   22680         447 :     if ( bLocalUseExceptions ) {
   22681         398 :       popErrorHandler();
   22682             :     }
   22683             : #ifndef SED_HACKS
   22684             :     if ( bLocalUseExceptions ) {
   22685             :       CPLErr eclass = CPLGetLastErrorType();
   22686             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22687             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22688             :       }
   22689             :     }
   22690             : #endif
   22691             :   }
   22692         447 :   resultobj = SWIG_FromCharPtr((const char *)result);
   22693         447 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22694             :   return resultobj;
   22695             : fail:
   22696             :   return NULL;
   22697             : }
   22698             : 
   22699             : 
   22700         863 : SWIGINTERN PyObject *_wrap_Dataset_GetProjectionRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22701         863 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22702         863 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22703         863 :   void *argp1 = 0 ;
   22704         863 :   int res1 = 0 ;
   22705         863 :   PyObject *swig_obj[1] ;
   22706         863 :   char *result = 0 ;
   22707             :   
   22708         863 :   if (!args) SWIG_fail;
   22709         863 :   swig_obj[0] = args;
   22710         863 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22711         863 :   if (!SWIG_IsOK(res1)) {
   22712           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjectionRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22713             :   }
   22714         863 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22715         863 :   {
   22716         863 :     const int bLocalUseExceptions = GetUseExceptions();
   22717         863 :     if ( bLocalUseExceptions ) {
   22718         625 :       pushErrorHandler();
   22719             :     }
   22720         863 :     {
   22721         863 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22722         863 :       result = (char *)GDALDatasetShadow_GetProjectionRef(arg1);
   22723         863 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22724             :     }
   22725         863 :     if ( bLocalUseExceptions ) {
   22726         625 :       popErrorHandler();
   22727             :     }
   22728             : #ifndef SED_HACKS
   22729             :     if ( bLocalUseExceptions ) {
   22730             :       CPLErr eclass = CPLGetLastErrorType();
   22731             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22732             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22733             :       }
   22734             :     }
   22735             : #endif
   22736             :   }
   22737         863 :   resultobj = SWIG_FromCharPtr((const char *)result);
   22738         863 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22739             :   return resultobj;
   22740             : fail:
   22741             :   return NULL;
   22742             : }
   22743             : 
   22744             : 
   22745          14 : SWIGINTERN PyObject *_wrap_Dataset_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22746          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22747          14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22748          14 :   void *argp1 = 0 ;
   22749          14 :   int res1 = 0 ;
   22750          14 :   PyObject *swig_obj[1] ;
   22751          14 :   int result;
   22752             :   
   22753          14 :   if (!args) SWIG_fail;
   22754          14 :   swig_obj[0] = args;
   22755          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22756          14 :   if (!SWIG_IsOK(res1)) {
   22757           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRefCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22758             :   }
   22759          14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22760          14 :   {
   22761          14 :     const int bLocalUseExceptions = GetUseExceptions();
   22762          14 :     if ( bLocalUseExceptions ) {
   22763           6 :       pushErrorHandler();
   22764             :     }
   22765          14 :     {
   22766          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22767          14 :       result = (int)GDALDatasetShadow_GetRefCount(arg1);
   22768          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22769             :     }
   22770          14 :     if ( bLocalUseExceptions ) {
   22771           6 :       popErrorHandler();
   22772             :     }
   22773             : #ifndef SED_HACKS
   22774             :     if ( bLocalUseExceptions ) {
   22775             :       CPLErr eclass = CPLGetLastErrorType();
   22776             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22777             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22778             :       }
   22779             :     }
   22780             : #endif
   22781             :   }
   22782          14 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22783          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22784             :   return resultobj;
   22785             : fail:
   22786             :   return NULL;
   22787             : }
   22788             : 
   22789             : 
   22790           0 : SWIGINTERN PyObject *_wrap_Dataset_GetSummaryRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22791           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22792           0 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22793           0 :   void *argp1 = 0 ;
   22794           0 :   int res1 = 0 ;
   22795           0 :   PyObject *swig_obj[1] ;
   22796           0 :   int result;
   22797             :   
   22798           0 :   if (!args) SWIG_fail;
   22799           0 :   swig_obj[0] = args;
   22800           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22801           0 :   if (!SWIG_IsOK(res1)) {
   22802           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetSummaryRefCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22803             :   }
   22804           0 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22805           0 :   {
   22806           0 :     const int bLocalUseExceptions = GetUseExceptions();
   22807           0 :     if ( bLocalUseExceptions ) {
   22808           0 :       pushErrorHandler();
   22809             :     }
   22810           0 :     {
   22811           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22812           0 :       result = (int)GDALDatasetShadow_GetSummaryRefCount(arg1);
   22813           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22814             :     }
   22815           0 :     if ( bLocalUseExceptions ) {
   22816           0 :       popErrorHandler();
   22817             :     }
   22818             : #ifndef SED_HACKS
   22819             :     if ( bLocalUseExceptions ) {
   22820             :       CPLErr eclass = CPLGetLastErrorType();
   22821             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22822             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22823             :       }
   22824             :     }
   22825             : #endif
   22826             :   }
   22827           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22828           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22829             :   return resultobj;
   22830             : fail:
   22831             :   return NULL;
   22832             : }
   22833             : 
   22834             : 
   22835        1206 : SWIGINTERN PyObject *_wrap_Dataset_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22836        1206 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22837        1206 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22838        1206 :   void *argp1 = 0 ;
   22839        1206 :   int res1 = 0 ;
   22840        1206 :   PyObject *swig_obj[1] ;
   22841        1206 :   OSRSpatialReferenceShadow *result = 0 ;
   22842             :   
   22843        1206 :   if (!args) SWIG_fail;
   22844        1206 :   swig_obj[0] = args;
   22845        1206 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22846        1206 :   if (!SWIG_IsOK(res1)) {
   22847           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22848             :   }
   22849        1206 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22850        1206 :   {
   22851        1206 :     const int bLocalUseExceptions = GetUseExceptions();
   22852        1206 :     if ( bLocalUseExceptions ) {
   22853         946 :       pushErrorHandler();
   22854             :     }
   22855        1206 :     {
   22856        1206 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22857        1206 :       result = (OSRSpatialReferenceShadow *)GDALDatasetShadow_GetSpatialRef(arg1);
   22858        1206 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22859             :     }
   22860        1206 :     if ( bLocalUseExceptions ) {
   22861         946 :       popErrorHandler();
   22862             :     }
   22863             : #ifndef SED_HACKS
   22864             :     if ( bLocalUseExceptions ) {
   22865             :       CPLErr eclass = CPLGetLastErrorType();
   22866             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22867             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22868             :       }
   22869             :     }
   22870             : #endif
   22871             :   }
   22872        1206 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   22873        1206 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22874             :   return resultobj;
   22875             : fail:
   22876             :   return NULL;
   22877             : }
   22878             : 
   22879             : 
   22880        1623 : SWIGINTERN PyObject *_wrap_Dataset_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22881        1623 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22882        1623 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22883        1623 :   char *arg2 = (char *) 0 ;
   22884        1623 :   void *argp1 = 0 ;
   22885        1623 :   int res1 = 0 ;
   22886        1623 :   int res2 ;
   22887        1623 :   char *buf2 = 0 ;
   22888        1623 :   int alloc2 = 0 ;
   22889        1623 :   PyObject *swig_obj[2] ;
   22890        1623 :   CPLErr result;
   22891             :   
   22892        1623 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetProjection", 2, 2, swig_obj)) SWIG_fail;
   22893        1623 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22894        1623 :   if (!SWIG_IsOK(res1)) {
   22895           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22896             :   }
   22897        1623 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22898        1623 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   22899        1623 :   if (!SWIG_IsOK(res2)) {
   22900           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetProjection" "', argument " "2"" of type '" "char const *""'");
   22901             :   }
   22902        1623 :   arg2 = reinterpret_cast< char * >(buf2);
   22903        1623 :   {
   22904        1623 :     if (!arg2) {
   22905           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   22906             :     }
   22907             :   }
   22908        1623 :   {
   22909        1623 :     const int bLocalUseExceptions = GetUseExceptions();
   22910        1623 :     if ( bLocalUseExceptions ) {
   22911         742 :       pushErrorHandler();
   22912             :     }
   22913        1623 :     {
   22914        1623 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22915        1623 :       result = (CPLErr)GDALDatasetShadow_SetProjection(arg1,(char const *)arg2);
   22916        1623 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22917             :     }
   22918        1623 :     if ( bLocalUseExceptions ) {
   22919         742 :       popErrorHandler();
   22920             :     }
   22921             : #ifndef SED_HACKS
   22922             :     if ( bLocalUseExceptions ) {
   22923             :       CPLErr eclass = CPLGetLastErrorType();
   22924             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22925             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22926             :       }
   22927             :     }
   22928             : #endif
   22929             :   }
   22930        1623 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22931        1623 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   22932        1623 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22933             :   return resultobj;
   22934           0 : fail:
   22935           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   22936             :   return NULL;
   22937             : }
   22938             : 
   22939             : 
   22940         270 : SWIGINTERN PyObject *_wrap_Dataset_SetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22941         270 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22942         270 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22943         270 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
   22944         270 :   void *argp1 = 0 ;
   22945         270 :   int res1 = 0 ;
   22946         270 :   void *argp2 = 0 ;
   22947         270 :   int res2 = 0 ;
   22948         270 :   PyObject *swig_obj[2] ;
   22949         270 :   CPLErr result;
   22950             :   
   22951         270 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
   22952         270 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22953         270 :   if (!SWIG_IsOK(res1)) {
   22954           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22955             :   }
   22956         270 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22957         270 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   22958         270 :   if (!SWIG_IsOK(res2)) {
   22959           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   22960             :   }
   22961         270 :   arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   22962         270 :   {
   22963         270 :     const int bLocalUseExceptions = GetUseExceptions();
   22964         270 :     if ( bLocalUseExceptions ) {
   22965         132 :       pushErrorHandler();
   22966             :     }
   22967         270 :     {
   22968         270 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22969         270 :       result = (CPLErr)GDALDatasetShadow_SetSpatialRef(arg1,arg2);
   22970         270 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22971             :     }
   22972         270 :     if ( bLocalUseExceptions ) {
   22973         132 :       popErrorHandler();
   22974             :     }
   22975             : #ifndef SED_HACKS
   22976             :     if ( bLocalUseExceptions ) {
   22977             :       CPLErr eclass = CPLGetLastErrorType();
   22978             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22979             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22980             :       }
   22981             :     }
   22982             : #endif
   22983             :   }
   22984         270 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22985         270 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22986             :   return resultobj;
   22987             : fail:
   22988             :   return NULL;
   22989             : }
   22990             : 
   22991             : 
   22992        3910 : SWIGINTERN PyObject *_wrap_Dataset_GetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   22993        3910 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22994        3910 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22995        3910 :   double *arg2 ;
   22996        3910 :   int *arg3 = (int *) 0 ;
   22997        3910 :   int *arg4 = (int *) 0 ;
   22998        3910 :   void *argp1 = 0 ;
   22999        3910 :   int res1 = 0 ;
   23000        3910 :   double argout2[6] ;
   23001        3910 :   int isvalid2 ;
   23002        3910 :   int val4 ;
   23003        3910 :   PyObject * obj0 = 0 ;
   23004        3910 :   PyObject * obj1 = 0 ;
   23005        3910 :   char * kwnames[] = {
   23006             :     (char *)"self",  (char *)"can_return_null",  NULL 
   23007             :   };
   23008             :   
   23009        3910 :   {
   23010             :     /* %typemap(in,numinputs=0) (double argout2[6], int* isvalid2) */
   23011        3910 :     arg2 = argout2;
   23012        3910 :     arg3 = &isvalid2;
   23013             :   }
   23014        3910 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_GetGeoTransform", kwnames, &obj0, &obj1)) SWIG_fail;
   23015        3910 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23016        3910 :   if (!SWIG_IsOK(res1)) {
   23017           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23018             :   }
   23019        3910 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23020        3910 :   if (obj1) {
   23021         403 :     {
   23022             :       /* %typemap(in) (int *optional_##int) */
   23023         403 :       if ( obj1 == Py_None ) {
   23024             :         arg4 = 0;
   23025             :       }
   23026         403 :       else if ( PyArg_Parse( obj1,"i" ,&val4 ) ) {
   23027             :         arg4 = (int *) &val4;
   23028             :       }
   23029             :       else {
   23030           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   23031           0 :         SWIG_fail;
   23032             :       }
   23033             :     }
   23034             :   }
   23035        3910 :   {
   23036        3910 :     const int bLocalUseExceptions = GetUseExceptions();
   23037        3910 :     if ( bLocalUseExceptions ) {
   23038        2612 :       pushErrorHandler();
   23039             :     }
   23040        3910 :     {
   23041        3910 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23042        3910 :       GDALDatasetShadow_GetGeoTransform(arg1,arg2,arg3,arg4);
   23043        3910 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23044             :     }
   23045        3910 :     if ( bLocalUseExceptions ) {
   23046        2612 :       popErrorHandler();
   23047             :     }
   23048             : #ifndef SED_HACKS
   23049             :     if ( bLocalUseExceptions ) {
   23050             :       CPLErr eclass = CPLGetLastErrorType();
   23051             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23052             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23053             :       }
   23054             :     }
   23055             : #endif
   23056             :   }
   23057        3910 :   resultobj = SWIG_Py_Void();
   23058        3910 :   {
   23059             :     /* %typemap(argout) (double argout[6], int* isvalid)  */
   23060        3910 :     PyObject *r;
   23061        3910 :     if ( !*arg3 ) {
   23062         125 :       Py_INCREF(Py_None);
   23063         125 :       r = Py_None;
   23064             :     }
   23065             :     else {
   23066        3785 :       r = CreateTupleFromDoubleArray(arg2, 6);
   23067             :     }
   23068             : #if 0x040001 >= 0x040300
   23069             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   23070             : #else
   23071        3910 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   23072             : #endif
   23073             :   }
   23074        3910 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23075             :   return resultobj;
   23076             : fail:
   23077             :   return NULL;
   23078             : }
   23079             : 
   23080             : 
   23081        2839 : SWIGINTERN PyObject *_wrap_Dataset_SetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23082        2839 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23083        2839 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23084        2839 :   double *arg2 ;
   23085        2839 :   void *argp1 = 0 ;
   23086        2839 :   int res1 = 0 ;
   23087        2839 :   double argin2[6] ;
   23088        2839 :   PyObject *swig_obj[2] ;
   23089        2839 :   CPLErr result;
   23090             :   
   23091        2839 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetGeoTransform", 2, 2, swig_obj)) SWIG_fail;
   23092        2839 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23093        2839 :   if (!SWIG_IsOK(res1)) {
   23094           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23095             :   }
   23096        2839 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23097        2839 :   {
   23098             :     /* %typemap(in) (double argin2[ANY]) */
   23099        2839 :     arg2 = argin2;
   23100        2839 :     if (! PySequence_Check(swig_obj[1]) ) {
   23101           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   23102           0 :       SWIG_fail;
   23103             :     }
   23104        2839 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
   23105        2839 :     if ( seq_size != 6 ) {
   23106           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   23107           0 :       SWIG_fail;
   23108             :     }
   23109       19873 :     for (unsigned int i=0; i<6; i++) {
   23110       17034 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   23111       17034 :       double val;
   23112       17034 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   23113           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   23114           0 :         Py_DECREF(o);
   23115           0 :         SWIG_fail;
   23116             :       }
   23117       17034 :       arg2[i] =  val;
   23118       17034 :       Py_DECREF(o);
   23119             :     }
   23120             :   }
   23121        2839 :   {
   23122        2839 :     const int bLocalUseExceptions = GetUseExceptions();
   23123        2839 :     if ( bLocalUseExceptions ) {
   23124        1692 :       pushErrorHandler();
   23125             :     }
   23126        2839 :     {
   23127        2839 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23128        2839 :       result = (CPLErr)GDALDatasetShadow_SetGeoTransform(arg1,arg2);
   23129        2839 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23130             :     }
   23131        2839 :     if ( bLocalUseExceptions ) {
   23132        1692 :       popErrorHandler();
   23133             :     }
   23134             : #ifndef SED_HACKS
   23135             :     if ( bLocalUseExceptions ) {
   23136             :       CPLErr eclass = CPLGetLastErrorType();
   23137             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23138             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23139             :       }
   23140             :     }
   23141             : #endif
   23142             :   }
   23143        2839 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23144        2839 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23145             :   return resultobj;
   23146             : fail:
   23147             :   return NULL;
   23148             : }
   23149             : 
   23150             : 
   23151         670 : SWIGINTERN PyObject *_wrap_Dataset_BuildOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23152         670 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23153         670 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23154         670 :   char *arg2 = (char *) "NEAREST" ;
   23155         670 :   int arg3 = (int) 0 ;
   23156         670 :   int *arg4 = (int *) 0 ;
   23157         670 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   23158         670 :   void *arg6 = (void *) NULL ;
   23159         670 :   char **arg7 = (char **) NULL ;
   23160         670 :   void *argp1 = 0 ;
   23161         670 :   int res1 = 0 ;
   23162         670 :   int res2 ;
   23163         670 :   char *buf2 = 0 ;
   23164         670 :   int alloc2 = 0 ;
   23165         670 :   PyObject * obj0 = 0 ;
   23166         670 :   PyObject * obj1 = 0 ;
   23167         670 :   PyObject * obj2 = 0 ;
   23168         670 :   PyObject * obj3 = 0 ;
   23169         670 :   PyObject * obj4 = 0 ;
   23170         670 :   PyObject * obj5 = 0 ;
   23171         670 :   char * kwnames[] = {
   23172             :     (char *)"self",  (char *)"resampling",  (char *)"overviewlist",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   23173             :   };
   23174         670 :   int result;
   23175             :   
   23176             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   23177         670 :   PyProgressData *psProgressInfo;
   23178         670 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   23179         670 :   psProgressInfo->nLastReported = -1;
   23180         670 :   psProgressInfo->psPyCallback = NULL;
   23181         670 :   psProgressInfo->psPyCallbackData = NULL;
   23182         670 :   arg6 = psProgressInfo;
   23183         670 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOO:Dataset_BuildOverviews", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
   23184         670 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23185         670 :   if (!SWIG_IsOK(res1)) {
   23186           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BuildOverviews" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23187             :   }
   23188         670 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23189         670 :   if (obj1) {
   23190         619 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   23191         619 :     if (!SWIG_IsOK(res2)) {
   23192           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_BuildOverviews" "', argument " "2"" of type '" "char const *""'");
   23193             :     }
   23194         619 :     arg2 = reinterpret_cast< char * >(buf2);
   23195             :   }
   23196         670 :   if (obj2) {
   23197         670 :     {
   23198             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   23199         670 :       arg4 = CreateCIntListFromSequence(obj2, &arg3);
   23200         670 :       if( arg3 < 0 ) {
   23201           0 :         SWIG_fail;
   23202             :       }
   23203             :     }
   23204             :   }
   23205         670 :   if (obj3) {
   23206           2 :     {
   23207             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   23208             :       /* callback_func typemap */
   23209             :       
   23210             :       /* In some cases 0 is passed instead of None. */
   23211             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   23212           2 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   23213             :       {
   23214           0 :         if( PyLong_AsLong(obj3) == 0 )
   23215             :         {
   23216           0 :           obj3 = Py_None;
   23217             :         }
   23218             :       }
   23219             :       
   23220           2 :       if (obj3 && obj3 != Py_None ) {
   23221           2 :         void* cbfunction = NULL;
   23222           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   23223             :             (void**)&cbfunction,
   23224             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   23225             :             SWIG_POINTER_EXCEPTION | 0 ));
   23226             :         
   23227           2 :         if ( cbfunction == GDALTermProgress ) {
   23228             :           arg5 = GDALTermProgress;
   23229             :         } else {
   23230           2 :           if (!PyCallable_Check(obj3)) {
   23231           0 :             PyErr_SetString( PyExc_RuntimeError,
   23232             :               "Object given is not a Python function" );
   23233           0 :             SWIG_fail;
   23234             :           }
   23235           2 :           psProgressInfo->psPyCallback = obj3;
   23236           2 :           arg5 = PyProgressProxy;
   23237             :         }
   23238             :         
   23239             :       }
   23240             :       
   23241             :     }
   23242             :   }
   23243         670 :   if (obj4) {
   23244           2 :     {
   23245             :       /* %typemap(in) ( void* callback_data=NULL)  */
   23246           2 :       psProgressInfo->psPyCallbackData = obj4 ;
   23247             :     }
   23248             :   }
   23249         670 :   if (obj5) {
   23250          14 :     {
   23251             :       /* %typemap(in) char **dict */
   23252          14 :       arg7 = NULL;
   23253          14 :       if ( PySequence_Check( obj5 ) ) {
   23254          14 :         int bErr = FALSE;
   23255          14 :         arg7 = CSLFromPySequence(obj5, &bErr);
   23256          14 :         if ( bErr )
   23257             :         {
   23258           0 :           SWIG_fail;
   23259             :         }
   23260             :       }
   23261           0 :       else if ( PyMapping_Check( obj5 ) ) {
   23262           0 :         int bErr = FALSE;
   23263           0 :         arg7 = CSLFromPyMapping(obj5, &bErr);
   23264           0 :         if ( bErr )
   23265             :         {
   23266           0 :           SWIG_fail;
   23267             :         }
   23268             :       }
   23269             :       else {
   23270           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   23271           0 :         SWIG_fail;
   23272             :       }
   23273             :     }
   23274             :   }
   23275         670 :   {
   23276         670 :     const int bLocalUseExceptions = GetUseExceptions();
   23277         670 :     if ( bLocalUseExceptions ) {
   23278         255 :       pushErrorHandler();
   23279             :     }
   23280         670 :     {
   23281         670 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23282         670 :       result = (int)GDALDatasetShadow_BuildOverviews(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   23283         670 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23284             :     }
   23285         670 :     if ( bLocalUseExceptions ) {
   23286         255 :       popErrorHandler();
   23287             :     }
   23288             : #ifndef SED_HACKS
   23289             :     if ( bLocalUseExceptions ) {
   23290             :       CPLErr eclass = CPLGetLastErrorType();
   23291             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23292             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23293             :       }
   23294             :     }
   23295             : #endif
   23296             :   }
   23297         670 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23298         670 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23299         670 :   {
   23300             :     /* %typemap(freearg) (int nList, int* pList) */
   23301         670 :     free(arg4);
   23302             :   }
   23303         670 :   {
   23304             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   23305             :     
   23306         670 :     CPLFree(psProgressInfo);
   23307             :     
   23308             :   }
   23309         670 :   {
   23310             :     /* %typemap(freearg) char **dict */
   23311         670 :     CSLDestroy( arg7 );
   23312             :   }
   23313         684 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23314             :   return resultobj;
   23315           0 : fail:
   23316           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23317           0 :   {
   23318             :     /* %typemap(freearg) (int nList, int* pList) */
   23319           0 :     free(arg4);
   23320             :   }
   23321           0 :   {
   23322             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   23323             :     
   23324           0 :     CPLFree(psProgressInfo);
   23325             :     
   23326             :   }
   23327           0 :   {
   23328             :     /* %typemap(freearg) char **dict */
   23329           0 :     CSLDestroy( arg7 );
   23330             :   }
   23331             :   return NULL;
   23332             : }
   23333             : 
   23334             : 
   23335         118 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23336         118 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23337         118 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23338         118 :   void *argp1 = 0 ;
   23339         118 :   int res1 = 0 ;
   23340         118 :   PyObject *swig_obj[1] ;
   23341         118 :   int result;
   23342             :   
   23343         118 :   if (!args) SWIG_fail;
   23344         118 :   swig_obj[0] = args;
   23345         118 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23346         118 :   if (!SWIG_IsOK(res1)) {
   23347           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23348             :   }
   23349         118 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23350         118 :   {
   23351         118 :     const int bLocalUseExceptions = GetUseExceptions();
   23352         118 :     if ( bLocalUseExceptions ) {
   23353          68 :       pushErrorHandler();
   23354             :     }
   23355         118 :     {
   23356         118 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23357         118 :       result = (int)GDALDatasetShadow_GetGCPCount(arg1);
   23358         118 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23359             :     }
   23360         118 :     if ( bLocalUseExceptions ) {
   23361          68 :       popErrorHandler();
   23362             :     }
   23363             : #ifndef SED_HACKS
   23364             :     if ( bLocalUseExceptions ) {
   23365             :       CPLErr eclass = CPLGetLastErrorType();
   23366             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23367             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23368             :       }
   23369             :     }
   23370             : #endif
   23371             :   }
   23372         118 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23373         118 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23374             :   return resultobj;
   23375             : fail:
   23376             :   return NULL;
   23377             : }
   23378             : 
   23379             : 
   23380         455 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23381         455 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23382         455 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23383         455 :   void *argp1 = 0 ;
   23384         455 :   int res1 = 0 ;
   23385         455 :   PyObject *swig_obj[1] ;
   23386         455 :   char *result = 0 ;
   23387             :   
   23388         455 :   if (!args) SWIG_fail;
   23389         455 :   swig_obj[0] = args;
   23390         455 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23391         455 :   if (!SWIG_IsOK(res1)) {
   23392           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23393             :   }
   23394         455 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23395         455 :   {
   23396         455 :     const int bLocalUseExceptions = GetUseExceptions();
   23397         455 :     if ( bLocalUseExceptions ) {
   23398         436 :       pushErrorHandler();
   23399             :     }
   23400         455 :     {
   23401         455 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23402         455 :       result = (char *)GDALDatasetShadow_GetGCPProjection(arg1);
   23403         455 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23404             :     }
   23405         455 :     if ( bLocalUseExceptions ) {
   23406         436 :       popErrorHandler();
   23407             :     }
   23408             : #ifndef SED_HACKS
   23409             :     if ( bLocalUseExceptions ) {
   23410             :       CPLErr eclass = CPLGetLastErrorType();
   23411             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23412             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23413             :       }
   23414             :     }
   23415             : #endif
   23416             :   }
   23417         455 :   resultobj = SWIG_FromCharPtr((const char *)result);
   23418         455 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23419             :   return resultobj;
   23420             : fail:
   23421             :   return NULL;
   23422             : }
   23423             : 
   23424             : 
   23425         426 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23426         426 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23427         426 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23428         426 :   void *argp1 = 0 ;
   23429         426 :   int res1 = 0 ;
   23430         426 :   PyObject *swig_obj[1] ;
   23431         426 :   OSRSpatialReferenceShadow *result = 0 ;
   23432             :   
   23433         426 :   if (!args) SWIG_fail;
   23434         426 :   swig_obj[0] = args;
   23435         426 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23436         426 :   if (!SWIG_IsOK(res1)) {
   23437           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23438             :   }
   23439         426 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23440         426 :   {
   23441         426 :     const int bLocalUseExceptions = GetUseExceptions();
   23442         426 :     if ( bLocalUseExceptions ) {
   23443         412 :       pushErrorHandler();
   23444             :     }
   23445         426 :     {
   23446         426 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23447         426 :       result = (OSRSpatialReferenceShadow *)GDALDatasetShadow_GetGCPSpatialRef(arg1);
   23448         426 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23449             :     }
   23450         426 :     if ( bLocalUseExceptions ) {
   23451         412 :       popErrorHandler();
   23452             :     }
   23453             : #ifndef SED_HACKS
   23454             :     if ( bLocalUseExceptions ) {
   23455             :       CPLErr eclass = CPLGetLastErrorType();
   23456             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23457             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23458             :       }
   23459             :     }
   23460             : #endif
   23461             :   }
   23462         426 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   23463         426 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23464             :   return resultobj;
   23465             : fail:
   23466             :   return NULL;
   23467             : }
   23468             : 
   23469             : 
   23470         530 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23471         530 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23472         530 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23473         530 :   int *arg2 = (int *) 0 ;
   23474         530 :   GDAL_GCP **arg3 = (GDAL_GCP **) 0 ;
   23475         530 :   void *argp1 = 0 ;
   23476         530 :   int res1 = 0 ;
   23477         530 :   int nGCPs2 = 0 ;
   23478         530 :   GDAL_GCP *pGCPs2 = 0 ;
   23479         530 :   PyObject *swig_obj[1] ;
   23480             :   
   23481         530 :   {
   23482             :     /* %typemap(in,numinputs=0) (int *nGCPs2, GDAL_GCP const **pGCPs2 ) */
   23483         530 :     arg2 = &nGCPs2;
   23484         530 :     arg3 = &pGCPs2;
   23485             :   }
   23486         530 :   if (!args) SWIG_fail;
   23487         530 :   swig_obj[0] = args;
   23488         530 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23489         530 :   if (!SWIG_IsOK(res1)) {
   23490           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23491             :   }
   23492         530 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23493         530 :   {
   23494         530 :     const int bLocalUseExceptions = GetUseExceptions();
   23495         530 :     if ( bLocalUseExceptions ) {
   23496         495 :       pushErrorHandler();
   23497             :     }
   23498         530 :     {
   23499         530 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23500         530 :       GDALDatasetShadow_GetGCPs(arg1,arg2,(GDAL_GCP const **)arg3);
   23501         530 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23502             :     }
   23503         530 :     if ( bLocalUseExceptions ) {
   23504         495 :       popErrorHandler();
   23505             :     }
   23506             : #ifndef SED_HACKS
   23507             :     if ( bLocalUseExceptions ) {
   23508             :       CPLErr eclass = CPLGetLastErrorType();
   23509             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23510             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23511             :       }
   23512             :     }
   23513             : #endif
   23514             :   }
   23515         530 :   resultobj = SWIG_Py_Void();
   23516         530 :   {
   23517             :     /* %typemap(argout) (int *nGCPs, GDAL_GCP const **pGCPs ) */
   23518         530 :     PyObject *dict = PyTuple_New( *arg2 );
   23519        3832 :     for( int i = 0; i < *arg2; i++ ) {
   23520        6604 :       GDAL_GCP *o = new_GDAL_GCP( (*arg3)[i].dfGCPX,
   23521             :         (*arg3)[i].dfGCPY,
   23522             :         (*arg3)[i].dfGCPZ,
   23523             :         (*arg3)[i].dfGCPPixel,
   23524             :         (*arg3)[i].dfGCPLine,
   23525        3302 :         (*arg3)[i].pszInfo,
   23526        3302 :         (*arg3)[i].pszId );
   23527             :       
   23528        3302 :       PyTuple_SetItem(dict, i,
   23529             :         SWIG_NewPointerObj((void*)o,SWIGTYPE_p_GDAL_GCP,1) );
   23530             :     }
   23531         530 :     Py_DECREF(resultobj);
   23532         530 :     resultobj = dict;
   23533             :   }
   23534         530 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23535             :   return resultobj;
   23536             : fail:
   23537             :   return NULL;
   23538             : }
   23539             : 
   23540             : 
   23541          29 : SWIGINTERN PyObject *_wrap_Dataset__SetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23542          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23543          29 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23544          29 :   int arg2 ;
   23545          29 :   GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
   23546          29 :   char *arg4 = (char *) 0 ;
   23547          29 :   void *argp1 = 0 ;
   23548          29 :   int res1 = 0 ;
   23549          29 :   GDAL_GCP *tmpGCPList2 ;
   23550          29 :   int res4 ;
   23551          29 :   char *buf4 = 0 ;
   23552          29 :   int alloc4 = 0 ;
   23553          29 :   PyObject *swig_obj[3] ;
   23554          29 :   CPLErr result;
   23555             :   
   23556          29 :   if (!SWIG_Python_UnpackTuple(args, "Dataset__SetGCPs", 3, 3, swig_obj)) SWIG_fail;
   23557          29 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23558          29 :   if (!SWIG_IsOK(res1)) {
   23559           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__SetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23560             :   }
   23561          29 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23562          29 :   {
   23563             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   23564             :     /* check if is List */
   23565          29 :     if ( !PySequence_Check(swig_obj[1]) ) {
   23566           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   23567           0 :       SWIG_fail;
   23568             :     }
   23569          29 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   23570          29 :     if( size > (Py_ssize_t)INT_MAX ) {
   23571           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   23572           0 :       SWIG_fail;
   23573             :     }
   23574          29 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   23575           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   23576           0 :       SWIG_fail;
   23577             :     }
   23578          29 :     arg2 = (int)size;
   23579          29 :     tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
   23580          29 :     if( !tmpGCPList2 ) {
   23581           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   23582           0 :       SWIG_fail;
   23583             :     }
   23584          96 :     arg3 = tmpGCPList2;
   23585          96 :     for( int i = 0; i<arg2; i++ ) {
   23586          67 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   23587          67 :       GDAL_GCP *item = 0;
   23588          67 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   23589          67 :       if ( ! item ) {
   23590           0 :         Py_DECREF(o);
   23591           0 :         SWIG_fail;
   23592             :       }
   23593          67 :       memcpy( tmpGCPList2 + i, item, sizeof( GDAL_GCP ) );
   23594          67 :       Py_DECREF(o);
   23595             :     }
   23596             :   }
   23597          29 :   res4 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf4, NULL, &alloc4);
   23598          29 :   if (!SWIG_IsOK(res4)) {
   23599           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset__SetGCPs" "', argument " "4"" of type '" "char const *""'");
   23600             :   }
   23601          29 :   arg4 = reinterpret_cast< char * >(buf4);
   23602          29 :   {
   23603          29 :     const int bLocalUseExceptions = GetUseExceptions();
   23604          29 :     if ( bLocalUseExceptions ) {
   23605          14 :       pushErrorHandler();
   23606             :     }
   23607          29 :     {
   23608          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23609          29 :       result = (CPLErr)GDALDatasetShadow_SetGCPs(arg1,arg2,(GDAL_GCP const *)arg3,(char const *)arg4);
   23610          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23611             :     }
   23612          29 :     if ( bLocalUseExceptions ) {
   23613          14 :       popErrorHandler();
   23614             :     }
   23615             : #ifndef SED_HACKS
   23616             :     if ( bLocalUseExceptions ) {
   23617             :       CPLErr eclass = CPLGetLastErrorType();
   23618             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23619             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23620             :       }
   23621             :     }
   23622             : #endif
   23623             :   }
   23624          29 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23625          29 :   {
   23626             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   23627          29 :     free( arg3 );
   23628             :   }
   23629          29 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   23630          29 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23631             :   return resultobj;
   23632           0 : fail:
   23633           0 :   {
   23634             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   23635           0 :     free( arg3 );
   23636             :   }
   23637           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   23638             :   return NULL;
   23639             : }
   23640             : 
   23641             : 
   23642           9 : SWIGINTERN PyObject *_wrap_Dataset__SetGCPs2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23643           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23644           9 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23645           9 :   int arg2 ;
   23646           9 :   GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
   23647           9 :   OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
   23648           9 :   void *argp1 = 0 ;
   23649           9 :   int res1 = 0 ;
   23650           9 :   GDAL_GCP *tmpGCPList2 ;
   23651           9 :   void *argp4 = 0 ;
   23652           9 :   int res4 = 0 ;
   23653           9 :   PyObject *swig_obj[3] ;
   23654           9 :   CPLErr result;
   23655             :   
   23656           9 :   if (!SWIG_Python_UnpackTuple(args, "Dataset__SetGCPs2", 3, 3, swig_obj)) SWIG_fail;
   23657           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23658           9 :   if (!SWIG_IsOK(res1)) {
   23659           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__SetGCPs2" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23660             :   }
   23661           9 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23662           9 :   {
   23663             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   23664             :     /* check if is List */
   23665           9 :     if ( !PySequence_Check(swig_obj[1]) ) {
   23666           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   23667           0 :       SWIG_fail;
   23668             :     }
   23669           9 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   23670           9 :     if( size > (Py_ssize_t)INT_MAX ) {
   23671           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   23672           0 :       SWIG_fail;
   23673             :     }
   23674           9 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   23675           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   23676           0 :       SWIG_fail;
   23677             :     }
   23678           9 :     arg2 = (int)size;
   23679           9 :     tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
   23680           9 :     if( !tmpGCPList2 ) {
   23681           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   23682           0 :       SWIG_fail;
   23683             :     }
   23684       21871 :     arg3 = tmpGCPList2;
   23685       21871 :     for( int i = 0; i<arg2; i++ ) {
   23686       21862 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   23687       21862 :       GDAL_GCP *item = 0;
   23688       21862 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   23689       21862 :       if ( ! item ) {
   23690           0 :         Py_DECREF(o);
   23691           0 :         SWIG_fail;
   23692             :       }
   23693       21862 :       memcpy( tmpGCPList2 + i, item, sizeof( GDAL_GCP ) );
   23694       21862 :       Py_DECREF(o);
   23695             :     }
   23696             :   }
   23697           9 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   23698           9 :   if (!SWIG_IsOK(res4)) {
   23699           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset__SetGCPs2" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
   23700             :   }
   23701           9 :   arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
   23702           9 :   {
   23703           9 :     const int bLocalUseExceptions = GetUseExceptions();
   23704           9 :     if ( bLocalUseExceptions ) {
   23705           1 :       pushErrorHandler();
   23706             :     }
   23707           9 :     {
   23708           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23709           9 :       result = (CPLErr)GDALDatasetShadow_SetGCPs2(arg1,arg2,(GDAL_GCP const *)arg3,arg4);
   23710           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23711             :     }
   23712           9 :     if ( bLocalUseExceptions ) {
   23713           1 :       popErrorHandler();
   23714             :     }
   23715             : #ifndef SED_HACKS
   23716             :     if ( bLocalUseExceptions ) {
   23717             :       CPLErr eclass = CPLGetLastErrorType();
   23718             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23719             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23720             :       }
   23721             :     }
   23722             : #endif
   23723             :   }
   23724           9 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23725           9 :   {
   23726             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   23727           9 :     free( arg3 );
   23728             :   }
   23729           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23730             :   return resultobj;
   23731           0 : fail:
   23732           0 :   {
   23733             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   23734           0 :     free( arg3 );
   23735             :   }
   23736           0 :   return NULL;
   23737             : }
   23738             : 
   23739             : 
   23740        1622 : SWIGINTERN PyObject *_wrap_Dataset_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23741        1622 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23742        1622 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23743        1622 :   void *argp1 = 0 ;
   23744        1622 :   int res1 = 0 ;
   23745        1622 :   PyObject *swig_obj[1] ;
   23746        1622 :   CPLErr result;
   23747             :   
   23748        1622 :   if (!args) SWIG_fail;
   23749        1622 :   swig_obj[0] = args;
   23750        1622 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23751        1622 :   if (!SWIG_IsOK(res1)) {
   23752           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_FlushCache" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23753             :   }
   23754        1622 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23755        1622 :   {
   23756        1622 :     const int bLocalUseExceptions = GetUseExceptions();
   23757        1622 :     if ( bLocalUseExceptions ) {
   23758         398 :       pushErrorHandler();
   23759             :     }
   23760        1622 :     {
   23761        1622 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23762        1622 :       result = (CPLErr)GDALDatasetShadow_FlushCache(arg1);
   23763        1622 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23764             :     }
   23765        1622 :     if ( bLocalUseExceptions ) {
   23766         398 :       popErrorHandler();
   23767             :     }
   23768             : #ifndef SED_HACKS
   23769             :     if ( bLocalUseExceptions ) {
   23770             :       CPLErr eclass = CPLGetLastErrorType();
   23771             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23772             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23773             :       }
   23774             :     }
   23775             : #endif
   23776             :   }
   23777        1622 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23778        1624 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23779             :   return resultobj;
   23780             : fail:
   23781             :   return NULL;
   23782             : }
   23783             : 
   23784             : 
   23785          29 : SWIGINTERN PyObject *_wrap_Dataset_AddBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23786          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23787          29 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23788          29 :   GDALDataType arg2 = (GDALDataType) GDT_Byte ;
   23789          29 :   char **arg3 = (char **) 0 ;
   23790          29 :   void *argp1 = 0 ;
   23791          29 :   int res1 = 0 ;
   23792          29 :   PyObject * obj0 = 0 ;
   23793          29 :   PyObject * obj1 = 0 ;
   23794          29 :   PyObject * obj2 = 0 ;
   23795          29 :   char * kwnames[] = {
   23796             :     (char *)"self",  (char *)"datatype",  (char *)"options",  NULL 
   23797             :   };
   23798          29 :   CPLErr result;
   23799             :   
   23800          29 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Dataset_AddBand", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   23801          29 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23802          29 :   if (!SWIG_IsOK(res1)) {
   23803           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23804             :   }
   23805          29 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23806          29 :   if (obj1) {
   23807          23 :     {
   23808             :       // %typemap(in) GDALDataType
   23809          23 :       int val = 0;
   23810          23 :       int ecode = SWIG_AsVal_int(obj1, &val);
   23811          23 :       if (!SWIG_IsOK(ecode)) {
   23812           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   23813             :       }
   23814          23 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   23815             :       {
   23816           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   23817             :       }
   23818             :       arg2 = static_cast<GDALDataType>(val);
   23819             :     }
   23820             :   }
   23821          29 :   if (obj2) {
   23822          14 :     {
   23823             :       /* %typemap(in) char **dict */
   23824          14 :       arg3 = NULL;
   23825          14 :       if ( PySequence_Check( obj2 ) ) {
   23826          14 :         int bErr = FALSE;
   23827          14 :         arg3 = CSLFromPySequence(obj2, &bErr);
   23828          14 :         if ( bErr )
   23829             :         {
   23830           0 :           SWIG_fail;
   23831             :         }
   23832             :       }
   23833           0 :       else if ( PyMapping_Check( obj2 ) ) {
   23834           0 :         int bErr = FALSE;
   23835           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   23836           0 :         if ( bErr )
   23837             :         {
   23838           0 :           SWIG_fail;
   23839             :         }
   23840             :       }
   23841             :       else {
   23842           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   23843           0 :         SWIG_fail;
   23844             :       }
   23845             :     }
   23846             :   }
   23847          29 :   {
   23848          29 :     const int bLocalUseExceptions = GetUseExceptions();
   23849          29 :     if ( bLocalUseExceptions ) {
   23850          19 :       pushErrorHandler();
   23851             :     }
   23852          29 :     {
   23853          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23854          29 :       result = (CPLErr)GDALDatasetShadow_AddBand(arg1,arg2,arg3);
   23855          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23856             :     }
   23857          29 :     if ( bLocalUseExceptions ) {
   23858          19 :       popErrorHandler();
   23859             :     }
   23860             : #ifndef SED_HACKS
   23861             :     if ( bLocalUseExceptions ) {
   23862             :       CPLErr eclass = CPLGetLastErrorType();
   23863             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23864             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23865             :       }
   23866             :     }
   23867             : #endif
   23868             :   }
   23869          29 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23870          29 :   {
   23871             :     /* %typemap(freearg) char **dict */
   23872          29 :     CSLDestroy( arg3 );
   23873             :   }
   23874          35 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23875             :   return resultobj;
   23876           0 : fail:
   23877           0 :   {
   23878             :     /* %typemap(freearg) char **dict */
   23879           0 :     CSLDestroy( arg3 );
   23880             :   }
   23881             :   return NULL;
   23882             : }
   23883             : 
   23884             : 
   23885          54 : SWIGINTERN PyObject *_wrap_Dataset_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23886          54 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23887          54 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23888          54 :   int arg2 ;
   23889          54 :   void *argp1 = 0 ;
   23890          54 :   int res1 = 0 ;
   23891          54 :   int val2 ;
   23892          54 :   int ecode2 = 0 ;
   23893          54 :   PyObject *swig_obj[2] ;
   23894          54 :   CPLErr result;
   23895             :   
   23896          54 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_CreateMaskBand", 2, 2, swig_obj)) SWIG_fail;
   23897          54 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23898          54 :   if (!SWIG_IsOK(res1)) {
   23899           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateMaskBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23900             :   }
   23901          54 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23902          54 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   23903          54 :   if (!SWIG_IsOK(ecode2)) {
   23904           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   23905             :   } 
   23906          54 :   arg2 = static_cast< int >(val2);
   23907          54 :   {
   23908          54 :     const int bLocalUseExceptions = GetUseExceptions();
   23909          54 :     if ( bLocalUseExceptions ) {
   23910          16 :       pushErrorHandler();
   23911             :     }
   23912          54 :     {
   23913          54 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23914          54 :       result = (CPLErr)GDALDatasetShadow_CreateMaskBand(arg1,arg2);
   23915          54 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23916             :     }
   23917          54 :     if ( bLocalUseExceptions ) {
   23918          16 :       popErrorHandler();
   23919             :     }
   23920             : #ifndef SED_HACKS
   23921             :     if ( bLocalUseExceptions ) {
   23922             :       CPLErr eclass = CPLGetLastErrorType();
   23923             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23924             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23925             :       }
   23926             :     }
   23927             : #endif
   23928             :   }
   23929          54 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23930          56 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23931             :   return resultobj;
   23932             : fail:
   23933             :   return NULL;
   23934             : }
   23935             : 
   23936             : 
   23937         455 : SWIGINTERN PyObject *_wrap_Dataset_GetFileList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23938         455 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23939         455 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23940         455 :   void *argp1 = 0 ;
   23941         455 :   int res1 = 0 ;
   23942         455 :   PyObject *swig_obj[1] ;
   23943         455 :   char **result = 0 ;
   23944             :   
   23945         455 :   if (!args) SWIG_fail;
   23946         455 :   swig_obj[0] = args;
   23947         455 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23948         455 :   if (!SWIG_IsOK(res1)) {
   23949           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFileList" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23950             :   }
   23951         455 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23952         455 :   {
   23953         455 :     const int bLocalUseExceptions = GetUseExceptions();
   23954         455 :     if ( bLocalUseExceptions ) {
   23955         310 :       pushErrorHandler();
   23956             :     }
   23957         455 :     {
   23958         455 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23959         455 :       result = (char **)GDALDatasetShadow_GetFileList(arg1);
   23960         455 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23961             :     }
   23962         455 :     if ( bLocalUseExceptions ) {
   23963         310 :       popErrorHandler();
   23964             :     }
   23965             : #ifndef SED_HACKS
   23966             :     if ( bLocalUseExceptions ) {
   23967             :       CPLErr eclass = CPLGetLastErrorType();
   23968             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23969             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23970             :       }
   23971             :     }
   23972             : #endif
   23973             :   }
   23974         455 :   {
   23975             :     /* %typemap(out) char **CSL -> ( string ) */
   23976         455 :     bool bErr = false;
   23977         455 :     resultobj = CSLToList(result, &bErr);
   23978         455 :     CSLDestroy(result);
   23979         455 :     if( bErr ) {
   23980           0 :       SWIG_fail;
   23981             :     }
   23982             :   }
   23983         457 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23984             :   return resultobj;
   23985             : fail:
   23986             :   return NULL;
   23987             : }
   23988             : 
   23989             : 
   23990      176157 : SWIGINTERN PyObject *_wrap_Dataset_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23991      176157 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23992      176157 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23993      176157 :   int arg2 ;
   23994      176157 :   int arg3 ;
   23995      176157 :   int arg4 ;
   23996      176157 :   int arg5 ;
   23997      176157 :   GIntBig arg6 ;
   23998      176157 :   char *arg7 = (char *) 0 ;
   23999      176157 :   int *arg8 = (int *) 0 ;
   24000      176157 :   int *arg9 = (int *) 0 ;
   24001      176157 :   GDALDataType *arg10 = (GDALDataType *) 0 ;
   24002      176157 :   int arg11 = (int) 0 ;
   24003      176157 :   int *arg12 = (int *) 0 ;
   24004      176157 :   GIntBig *arg13 = (GIntBig *) 0 ;
   24005      176157 :   GIntBig *arg14 = (GIntBig *) 0 ;
   24006      176157 :   GIntBig *arg15 = (GIntBig *) 0 ;
   24007      176157 :   void *argp1 = 0 ;
   24008      176157 :   int res1 = 0 ;
   24009      176157 :   int val2 ;
   24010      176157 :   int ecode2 = 0 ;
   24011      176157 :   int val3 ;
   24012      176157 :   int ecode3 = 0 ;
   24013      176157 :   int val4 ;
   24014      176157 :   int ecode4 = 0 ;
   24015      176157 :   int val5 ;
   24016      176157 :   int ecode5 = 0 ;
   24017      176157 :   int alloc6 = 0 ;
   24018      176157 :   bool viewIsValid6 = false ;
   24019      176157 :   Py_buffer view6 ;
   24020      176157 :   int val8 ;
   24021      176157 :   int val9 ;
   24022      176157 :   GDALDataType val10 ;
   24023      176157 :   GIntBig val13 ;
   24024      176157 :   GIntBig val14 ;
   24025      176157 :   GIntBig val15 ;
   24026      176157 :   PyObject * obj0 = 0 ;
   24027      176157 :   PyObject * obj1 = 0 ;
   24028      176157 :   PyObject * obj2 = 0 ;
   24029      176157 :   PyObject * obj3 = 0 ;
   24030      176157 :   PyObject * obj4 = 0 ;
   24031      176157 :   PyObject * obj5 = 0 ;
   24032      176157 :   PyObject * obj6 = 0 ;
   24033      176157 :   PyObject * obj7 = 0 ;
   24034      176157 :   PyObject * obj8 = 0 ;
   24035      176157 :   PyObject * obj9 = 0 ;
   24036      176157 :   PyObject * obj10 = 0 ;
   24037      176157 :   PyObject * obj11 = 0 ;
   24038      176157 :   PyObject * obj12 = 0 ;
   24039      176157 :   char * kwnames[] = {
   24040             :     (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 
   24041             :   };
   24042      176157 :   CPLErr result;
   24043             :   
   24044      176157 :   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;
   24045      176157 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24046      176157 :   if (!SWIG_IsOK(res1)) {
   24047           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_WriteRaster" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24048             :   }
   24049      176157 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24050      176157 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   24051      176157 :   if (!SWIG_IsOK(ecode2)) {
   24052           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_WriteRaster" "', argument " "2"" of type '" "int""'");
   24053             :   } 
   24054      176157 :   arg2 = static_cast< int >(val2);
   24055      176157 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   24056      176157 :   if (!SWIG_IsOK(ecode3)) {
   24057           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_WriteRaster" "', argument " "3"" of type '" "int""'");
   24058             :   } 
   24059      176157 :   arg3 = static_cast< int >(val3);
   24060      176157 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   24061      176157 :   if (!SWIG_IsOK(ecode4)) {
   24062           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_WriteRaster" "', argument " "4"" of type '" "int""'");
   24063             :   } 
   24064      176157 :   arg4 = static_cast< int >(val4);
   24065      176157 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   24066      176157 :   if (!SWIG_IsOK(ecode5)) {
   24067           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_WriteRaster" "', argument " "5"" of type '" "int""'");
   24068             :   } 
   24069      176157 :   arg5 = static_cast< int >(val5);
   24070      176157 :   {
   24071             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   24072      176157 :     char* ptr = NULL;
   24073      176157 :     if( !GetBufferAsCharPtrGIntBigSize(obj5, &arg6, &ptr, &alloc6, &viewIsValid6, &view6) ) {
   24074           1 :       SWIG_fail;
   24075             :     }
   24076      176156 :     arg7 = (char *)ptr;
   24077             :   }
   24078      176156 :   if (obj6) {
   24079      176156 :     {
   24080             :       /* %typemap(in) (int *optional_##int) */
   24081      176156 :       if ( obj6 == Py_None ) {
   24082             :         arg8 = 0;
   24083             :       }
   24084      176156 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   24085             :         arg8 = (int *) &val8;
   24086             :       }
   24087             :       else {
   24088           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24089           0 :         SWIG_fail;
   24090             :       }
   24091             :     }
   24092             :   }
   24093      176156 :   if (obj7) {
   24094      176156 :     {
   24095             :       /* %typemap(in) (int *optional_##int) */
   24096      176156 :       if ( obj7 == Py_None ) {
   24097             :         arg9 = 0;
   24098             :       }
   24099      176156 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   24100             :         arg9 = (int *) &val9;
   24101             :       }
   24102             :       else {
   24103           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24104           0 :         SWIG_fail;
   24105             :       }
   24106             :     }
   24107             :   }
   24108      176156 :   if (obj8) {
   24109      176156 :     {
   24110             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   24111      176156 :       int intval = 0;
   24112      176156 :       if ( obj8 == Py_None ) {
   24113             :         arg10 = NULL;
   24114             :       }
   24115      352312 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj8, &intval)) ) {
   24116      176156 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   24117             :         {
   24118           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   24119             :         }
   24120      176156 :         val10 = static_cast<GDALDataType>(intval);
   24121      176156 :         arg10 = &val10;
   24122             :       }
   24123             :       else {
   24124           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24125           0 :         SWIG_fail;
   24126             :       }
   24127             :     }
   24128             :   }
   24129      176156 :   if (obj9) {
   24130      176156 :     {
   24131             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24132      176156 :       arg12 = CreateCIntListFromSequence(obj9, &arg11);
   24133      176156 :       if( arg11 < 0 ) {
   24134           0 :         SWIG_fail;
   24135             :       }
   24136             :     }
   24137             :   }
   24138      176156 :   if (obj10) {
   24139      176156 :     {
   24140             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24141      176156 :       if ( obj10 == Py_None ) {
   24142             :         arg13 = 0;
   24143             :       }
   24144          24 :       else if ( PyArg_Parse( obj10,"L" ,&val13 ) ) {
   24145             :         arg13 = (GIntBig *) &val13;
   24146             :       }
   24147             :       else {
   24148           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24149           0 :         SWIG_fail;
   24150             :       }
   24151             :     }
   24152             :   }
   24153      176156 :   if (obj11) {
   24154      176156 :     {
   24155             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24156      176156 :       if ( obj11 == Py_None ) {
   24157             :         arg14 = 0;
   24158             :       }
   24159          12 :       else if ( PyArg_Parse( obj11,"L" ,&val14 ) ) {
   24160             :         arg14 = (GIntBig *) &val14;
   24161             :       }
   24162             :       else {
   24163           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24164           0 :         SWIG_fail;
   24165             :       }
   24166             :     }
   24167             :   }
   24168      176156 :   if (obj12) {
   24169      176156 :     {
   24170             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24171      176156 :       if ( obj12 == Py_None ) {
   24172             :         arg15 = 0;
   24173             :       }
   24174          24 :       else if ( PyArg_Parse( obj12,"L" ,&val15 ) ) {
   24175             :         arg15 = (GIntBig *) &val15;
   24176             :       }
   24177             :       else {
   24178           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24179           0 :         SWIG_fail;
   24180             :       }
   24181             :     }
   24182             :   }
   24183      176156 :   {
   24184      176156 :     const int bLocalUseExceptions = GetUseExceptions();
   24185      176156 :     if ( bLocalUseExceptions ) {
   24186      172107 :       pushErrorHandler();
   24187             :     }
   24188      176156 :     {
   24189      176156 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24190      176156 :       result = (CPLErr)GDALDatasetShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   24191      176156 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24192             :     }
   24193      176156 :     if ( bLocalUseExceptions ) {
   24194      172107 :       popErrorHandler();
   24195             :     }
   24196             : #ifndef SED_HACKS
   24197             :     if ( bLocalUseExceptions ) {
   24198             :       CPLErr eclass = CPLGetLastErrorType();
   24199             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24200             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24201             :       }
   24202             :     }
   24203             : #endif
   24204             :   }
   24205      176156 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24206      176156 :   {
   24207             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   24208      176156 :     if( viewIsValid6 ) {
   24209      175146 :       PyBuffer_Release(&view6);
   24210             :     }
   24211        1010 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   24212        1010 :       delete[] arg7;
   24213             :     }
   24214             :   }
   24215      176156 :   {
   24216             :     /* %typemap(freearg) (int nList, int* pList) */
   24217      176156 :     free(arg12);
   24218             :   }
   24219      176159 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   24220             :   return resultobj;
   24221           1 : fail:
   24222           1 :   {
   24223             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   24224           1 :     if( viewIsValid6 ) {
   24225           0 :       PyBuffer_Release(&view6);
   24226             :     }
   24227           1 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   24228           0 :       delete[] arg7;
   24229             :     }
   24230             :   }
   24231           1 :   {
   24232             :     /* %typemap(freearg) (int nList, int* pList) */
   24233           1 :     free(arg12);
   24234             :   }
   24235           1 :   return NULL;
   24236             : }
   24237             : 
   24238             : 
   24239           1 : SWIGINTERN PyObject *_wrap_Dataset_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24240           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24241           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24242           1 :   int arg2 ;
   24243           1 :   int arg3 ;
   24244           1 :   int arg4 ;
   24245           1 :   int arg5 ;
   24246           1 :   int *arg6 = (int *) 0 ;
   24247           1 :   int *arg7 = (int *) 0 ;
   24248           1 :   GDALDataType *arg8 = (GDALDataType *) 0 ;
   24249           1 :   int arg9 = (int) 0 ;
   24250           1 :   int *arg10 = (int *) 0 ;
   24251           1 :   char **arg11 = (char **) NULL ;
   24252           1 :   void *argp1 = 0 ;
   24253           1 :   int res1 = 0 ;
   24254           1 :   int val2 ;
   24255           1 :   int ecode2 = 0 ;
   24256           1 :   int val3 ;
   24257           1 :   int ecode3 = 0 ;
   24258           1 :   int val4 ;
   24259           1 :   int ecode4 = 0 ;
   24260           1 :   int val5 ;
   24261           1 :   int ecode5 = 0 ;
   24262           1 :   void *argp6 = 0 ;
   24263           1 :   int res6 = 0 ;
   24264           1 :   void *argp7 = 0 ;
   24265           1 :   int res7 = 0 ;
   24266           1 :   int val8 ;
   24267           1 :   PyObject *swig_obj[10] ;
   24268           1 :   CPLErr result;
   24269             :   
   24270           1 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AdviseRead", 5, 10, swig_obj)) SWIG_fail;
   24271           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24272           1 :   if (!SWIG_IsOK(res1)) {
   24273           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AdviseRead" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24274             :   }
   24275           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24276           1 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   24277           1 :   if (!SWIG_IsOK(ecode2)) {
   24278           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_AdviseRead" "', argument " "2"" of type '" "int""'");
   24279             :   } 
   24280           1 :   arg2 = static_cast< int >(val2);
   24281           1 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   24282           1 :   if (!SWIG_IsOK(ecode3)) {
   24283           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_AdviseRead" "', argument " "3"" of type '" "int""'");
   24284             :   } 
   24285           1 :   arg3 = static_cast< int >(val3);
   24286           1 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   24287           1 :   if (!SWIG_IsOK(ecode4)) {
   24288           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_AdviseRead" "', argument " "4"" of type '" "int""'");
   24289             :   } 
   24290           1 :   arg4 = static_cast< int >(val4);
   24291           1 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   24292           1 :   if (!SWIG_IsOK(ecode5)) {
   24293           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_AdviseRead" "', argument " "5"" of type '" "int""'");
   24294             :   } 
   24295           1 :   arg5 = static_cast< int >(val5);
   24296           1 :   if (swig_obj[5]) {
   24297           0 :     res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
   24298           0 :     if (!SWIG_IsOK(res6)) {
   24299           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Dataset_AdviseRead" "', argument " "6"" of type '" "int *""'"); 
   24300             :     }
   24301           0 :     arg6 = reinterpret_cast< int * >(argp6);
   24302             :   }
   24303           1 :   if (swig_obj[6]) {
   24304           0 :     res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
   24305           0 :     if (!SWIG_IsOK(res7)) {
   24306           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Dataset_AdviseRead" "', argument " "7"" of type '" "int *""'"); 
   24307             :     }
   24308           0 :     arg7 = reinterpret_cast< int * >(argp7);
   24309             :   }
   24310           1 :   if (swig_obj[7]) {
   24311           0 :     {
   24312             :       /* %typemap(in) (int *optional_##int) */
   24313           0 :       if ( swig_obj[7] == Py_None ) {
   24314             :         arg8 = 0;
   24315             :       }
   24316           0 :       else if ( PyArg_Parse( swig_obj[7],"i" ,&val8 ) ) {
   24317             :         arg8 = (GDALDataType *) &val8;
   24318             :       }
   24319             :       else {
   24320           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24321           0 :         SWIG_fail;
   24322             :       }
   24323             :     }
   24324             :   }
   24325           1 :   if (swig_obj[8]) {
   24326           0 :     {
   24327             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24328           0 :       arg10 = CreateCIntListFromSequence(swig_obj[8], &arg9);
   24329           0 :       if( arg9 < 0 ) {
   24330           0 :         SWIG_fail;
   24331             :       }
   24332             :     }
   24333             :   }
   24334           1 :   if (swig_obj[9]) {
   24335           0 :     {
   24336             :       /* %typemap(in) char **dict */
   24337           0 :       arg11 = NULL;
   24338           0 :       if ( PySequence_Check( swig_obj[9] ) ) {
   24339           0 :         int bErr = FALSE;
   24340           0 :         arg11 = CSLFromPySequence(swig_obj[9], &bErr);
   24341           0 :         if ( bErr )
   24342             :         {
   24343           0 :           SWIG_fail;
   24344             :         }
   24345             :       }
   24346           0 :       else if ( PyMapping_Check( swig_obj[9] ) ) {
   24347           0 :         int bErr = FALSE;
   24348           0 :         arg11 = CSLFromPyMapping(swig_obj[9], &bErr);
   24349           0 :         if ( bErr )
   24350             :         {
   24351           0 :           SWIG_fail;
   24352             :         }
   24353             :       }
   24354             :       else {
   24355           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   24356           0 :         SWIG_fail;
   24357             :       }
   24358             :     }
   24359             :   }
   24360           1 :   {
   24361           1 :     const int bLocalUseExceptions = GetUseExceptions();
   24362           1 :     if ( bLocalUseExceptions ) {
   24363           0 :       pushErrorHandler();
   24364             :     }
   24365           1 :     {
   24366           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24367           1 :       result = (CPLErr)GDALDatasetShadow_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   24368           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24369             :     }
   24370           1 :     if ( bLocalUseExceptions ) {
   24371           0 :       popErrorHandler();
   24372             :     }
   24373             : #ifndef SED_HACKS
   24374             :     if ( bLocalUseExceptions ) {
   24375             :       CPLErr eclass = CPLGetLastErrorType();
   24376             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24377             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24378             :       }
   24379             :     }
   24380             : #endif
   24381             :   }
   24382           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24383           1 :   {
   24384             :     /* %typemap(freearg) (int nList, int* pList) */
   24385           1 :     free(arg10);
   24386             :   }
   24387           1 :   {
   24388             :     /* %typemap(freearg) char **dict */
   24389           1 :     CSLDestroy( arg11 );
   24390             :   }
   24391           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   24392             :   return resultobj;
   24393           0 : fail:
   24394           0 :   {
   24395             :     /* %typemap(freearg) (int nList, int* pList) */
   24396           0 :     free(arg10);
   24397             :   }
   24398           0 :   {
   24399             :     /* %typemap(freearg) char **dict */
   24400           0 :     CSLDestroy( arg11 );
   24401             :   }
   24402             :   return NULL;
   24403             : }
   24404             : 
   24405             : 
   24406           2 : SWIGINTERN PyObject *_wrap_Dataset_BeginAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   24407           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24408           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24409           2 :   int arg2 ;
   24410           2 :   int arg3 ;
   24411           2 :   int arg4 ;
   24412           2 :   int arg5 ;
   24413           2 :   size_t arg6 ;
   24414           2 :   char *arg7 = (char *) 0 ;
   24415           2 :   void *arg8 = (void *) 0 ;
   24416           2 :   int arg9 ;
   24417           2 :   int arg10 ;
   24418           2 :   GDALDataType arg11 = (GDALDataType) (GDALDataType) 0 ;
   24419           2 :   int arg12 = (int) 0 ;
   24420           2 :   int *arg13 = (int *) 0 ;
   24421           2 :   int arg14 = (int) 0 ;
   24422           2 :   int arg15 = (int) 0 ;
   24423           2 :   int arg16 = (int) 0 ;
   24424           2 :   char **arg17 = (char **) 0 ;
   24425           2 :   void *argp1 = 0 ;
   24426           2 :   int res1 = 0 ;
   24427           2 :   int val2 ;
   24428           2 :   int ecode2 = 0 ;
   24429           2 :   int val3 ;
   24430           2 :   int ecode3 = 0 ;
   24431           2 :   int val4 ;
   24432           2 :   int ecode4 = 0 ;
   24433           2 :   int val5 ;
   24434           2 :   int ecode5 = 0 ;
   24435           2 :   int val9 ;
   24436           2 :   int ecode9 = 0 ;
   24437           2 :   int val10 ;
   24438           2 :   int ecode10 = 0 ;
   24439           2 :   int val14 ;
   24440           2 :   int ecode14 = 0 ;
   24441           2 :   int val15 ;
   24442           2 :   int ecode15 = 0 ;
   24443           2 :   int val16 ;
   24444           2 :   int ecode16 = 0 ;
   24445           2 :   PyObject * obj0 = 0 ;
   24446           2 :   PyObject * obj1 = 0 ;
   24447           2 :   PyObject * obj2 = 0 ;
   24448           2 :   PyObject * obj3 = 0 ;
   24449           2 :   PyObject * obj4 = 0 ;
   24450           2 :   PyObject * obj5 = 0 ;
   24451           2 :   PyObject * obj6 = 0 ;
   24452           2 :   PyObject * obj7 = 0 ;
   24453           2 :   PyObject * obj8 = 0 ;
   24454           2 :   PyObject * obj9 = 0 ;
   24455           2 :   PyObject * obj10 = 0 ;
   24456           2 :   PyObject * obj11 = 0 ;
   24457           2 :   PyObject * obj12 = 0 ;
   24458           2 :   PyObject * obj13 = 0 ;
   24459           2 :   char * kwnames[] = {
   24460             :     (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 
   24461             :   };
   24462           2 :   GDALAsyncReaderShadow *result = 0 ;
   24463             :   
   24464           2 :   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;
   24465           2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24466           2 :   if (!SWIG_IsOK(res1)) {
   24467           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BeginAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24468             :   }
   24469           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24470           2 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   24471           2 :   if (!SWIG_IsOK(ecode2)) {
   24472           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_BeginAsyncReader" "', argument " "2"" of type '" "int""'");
   24473             :   } 
   24474           2 :   arg2 = static_cast< int >(val2);
   24475           2 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   24476           2 :   if (!SWIG_IsOK(ecode3)) {
   24477           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_BeginAsyncReader" "', argument " "3"" of type '" "int""'");
   24478             :   } 
   24479           2 :   arg3 = static_cast< int >(val3);
   24480           2 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   24481           2 :   if (!SWIG_IsOK(ecode4)) {
   24482           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_BeginAsyncReader" "', argument " "4"" of type '" "int""'");
   24483             :   } 
   24484           2 :   arg4 = static_cast< int >(val4);
   24485           2 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   24486           2 :   if (!SWIG_IsOK(ecode5)) {
   24487           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_BeginAsyncReader" "', argument " "5"" of type '" "int""'");
   24488             :   } 
   24489           2 :   arg5 = static_cast< int >(val5);
   24490           2 :   {
   24491             :     /* %typemap(in,numinputs=1) (size_t nLenKeepObject, char *pBufKeepObject, void* pyObject) */
   24492           2 :     if (PyBytes_Check(obj5))
   24493             :     {
   24494           2 :       Py_ssize_t safeLen = 0;
   24495           2 :       PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   24496           2 :       arg6 = safeLen;
   24497           2 :       arg8 = obj5;
   24498             :     }
   24499             :     else
   24500             :     {
   24501           0 :       PyErr_SetString(PyExc_TypeError, "not a bytes");
   24502           0 :       SWIG_fail;
   24503             :     }
   24504             :   }
   24505           2 :   ecode9 = SWIG_AsVal_int(obj6, &val9);
   24506           2 :   if (!SWIG_IsOK(ecode9)) {
   24507           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Dataset_BeginAsyncReader" "', argument " "9"" of type '" "int""'");
   24508             :   } 
   24509           2 :   arg9 = static_cast< int >(val9);
   24510           2 :   ecode10 = SWIG_AsVal_int(obj7, &val10);
   24511           2 :   if (!SWIG_IsOK(ecode10)) {
   24512           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Dataset_BeginAsyncReader" "', argument " "10"" of type '" "int""'");
   24513             :   } 
   24514           2 :   arg10 = static_cast< int >(val10);
   24515           2 :   if (obj8) {
   24516           2 :     {
   24517             :       // %typemap(in) GDALDataType
   24518           2 :       int val = 0;
   24519           2 :       int ecode = SWIG_AsVal_int(obj8, &val);
   24520           2 :       if (!SWIG_IsOK(ecode)) {
   24521           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   24522             :       }
   24523           2 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   24524             :       {
   24525           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   24526             :       }
   24527             :       arg11 = static_cast<GDALDataType>(val);
   24528             :     }
   24529             :   }
   24530           2 :   if (obj9) {
   24531           2 :     {
   24532             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24533           2 :       arg13 = CreateCIntListFromSequence(obj9, &arg12);
   24534           2 :       if( arg12 < 0 ) {
   24535           0 :         SWIG_fail;
   24536             :       }
   24537             :     }
   24538             :   }
   24539           2 :   if (obj10) {
   24540           2 :     ecode14 = SWIG_AsVal_int(obj10, &val14);
   24541           2 :     if (!SWIG_IsOK(ecode14)) {
   24542           0 :       SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_BeginAsyncReader" "', argument " "14"" of type '" "int""'");
   24543             :     } 
   24544             :     arg14 = static_cast< int >(val14);
   24545             :   }
   24546           2 :   if (obj11) {
   24547           2 :     ecode15 = SWIG_AsVal_int(obj11, &val15);
   24548           2 :     if (!SWIG_IsOK(ecode15)) {
   24549           0 :       SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "Dataset_BeginAsyncReader" "', argument " "15"" of type '" "int""'");
   24550             :     } 
   24551             :     arg15 = static_cast< int >(val15);
   24552             :   }
   24553           2 :   if (obj12) {
   24554           2 :     ecode16 = SWIG_AsVal_int(obj12, &val16);
   24555           2 :     if (!SWIG_IsOK(ecode16)) {
   24556           0 :       SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "Dataset_BeginAsyncReader" "', argument " "16"" of type '" "int""'");
   24557             :     } 
   24558             :     arg16 = static_cast< int >(val16);
   24559             :   }
   24560           2 :   if (obj13) {
   24561           2 :     {
   24562             :       /* %typemap(in) char **dict */
   24563           2 :       arg17 = NULL;
   24564           2 :       if ( PySequence_Check( obj13 ) ) {
   24565           2 :         int bErr = FALSE;
   24566           2 :         arg17 = CSLFromPySequence(obj13, &bErr);
   24567           2 :         if ( bErr )
   24568             :         {
   24569           0 :           SWIG_fail;
   24570             :         }
   24571             :       }
   24572           0 :       else if ( PyMapping_Check( obj13 ) ) {
   24573           0 :         int bErr = FALSE;
   24574           0 :         arg17 = CSLFromPyMapping(obj13, &bErr);
   24575           0 :         if ( bErr )
   24576             :         {
   24577           0 :           SWIG_fail;
   24578             :         }
   24579             :       }
   24580             :       else {
   24581           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   24582           0 :         SWIG_fail;
   24583             :       }
   24584             :     }
   24585             :   }
   24586           2 :   {
   24587           2 :     const int bLocalUseExceptions = GetUseExceptions();
   24588           2 :     if ( bLocalUseExceptions ) {
   24589           2 :       pushErrorHandler();
   24590             :     }
   24591           2 :     {
   24592           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24593           2 :       result = (GDALAsyncReaderShadow *)GDALDatasetShadow_BeginAsyncReader(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
   24594           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24595             :     }
   24596           2 :     if ( bLocalUseExceptions ) {
   24597           2 :       popErrorHandler();
   24598             :     }
   24599             : #ifndef SED_HACKS
   24600             :     if ( bLocalUseExceptions ) {
   24601             :       CPLErr eclass = CPLGetLastErrorType();
   24602             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24603             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24604             :       }
   24605             :     }
   24606             : #endif
   24607             :   }
   24608           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_OWN |  0 );
   24609           2 :   {
   24610             :     /* %typemap(freearg) (int nList, int* pList) */
   24611           2 :     free(arg13);
   24612             :   }
   24613           2 :   {
   24614             :     /* %typemap(freearg) char **dict */
   24615           2 :     CSLDestroy( arg17 );
   24616             :   }
   24617           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   24618             :   return resultobj;
   24619           0 : fail:
   24620           0 :   {
   24621             :     /* %typemap(freearg) (int nList, int* pList) */
   24622           0 :     free(arg13);
   24623             :   }
   24624           0 :   {
   24625             :     /* %typemap(freearg) char **dict */
   24626           0 :     CSLDestroy( arg17 );
   24627             :   }
   24628             :   return NULL;
   24629             : }
   24630             : 
   24631             : 
   24632           1 : SWIGINTERN PyObject *_wrap_Dataset_EndAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24633           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24634           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24635           1 :   GDALAsyncReaderShadow *arg2 = (GDALAsyncReaderShadow *) 0 ;
   24636           1 :   void *argp1 = 0 ;
   24637           1 :   int res1 = 0 ;
   24638           1 :   void *argp2 = 0 ;
   24639           1 :   int res2 = 0 ;
   24640           1 :   PyObject *swig_obj[2] ;
   24641             :   
   24642           1 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_EndAsyncReader", 2, 2, swig_obj)) SWIG_fail;
   24643           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24644           1 :   if (!SWIG_IsOK(res1)) {
   24645           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_EndAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24646             :   }
   24647           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24648           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   24649           1 :   if (!SWIG_IsOK(res2)) {
   24650           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_EndAsyncReader" "', argument " "2"" of type '" "GDALAsyncReaderShadow *""'"); 
   24651             :   }
   24652           1 :   arg2 = reinterpret_cast< GDALAsyncReaderShadow * >(argp2);
   24653           1 :   {
   24654           1 :     const int bLocalUseExceptions = GetUseExceptions();
   24655           1 :     if ( bLocalUseExceptions ) {
   24656           1 :       pushErrorHandler();
   24657             :     }
   24658           1 :     {
   24659           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24660           1 :       GDALDatasetShadow_EndAsyncReader(arg1,arg2);
   24661           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24662             :     }
   24663           1 :     if ( bLocalUseExceptions ) {
   24664           1 :       popErrorHandler();
   24665             :     }
   24666             : #ifndef SED_HACKS
   24667             :     if ( bLocalUseExceptions ) {
   24668             :       CPLErr eclass = CPLGetLastErrorType();
   24669             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24670             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24671             :       }
   24672             :     }
   24673             : #endif
   24674             :   }
   24675           1 :   resultobj = SWIG_Py_Void();
   24676           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   24677             :   return resultobj;
   24678             : fail:
   24679             :   return NULL;
   24680             : }
   24681             : 
   24682             : 
   24683           3 : SWIGINTERN PyObject *_wrap_Dataset_GetVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   24684           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24685           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24686           3 :   GDALRWFlag arg2 ;
   24687           3 :   int arg3 ;
   24688           3 :   int arg4 ;
   24689           3 :   int arg5 ;
   24690           3 :   int arg6 ;
   24691           3 :   int arg7 ;
   24692           3 :   int arg8 ;
   24693           3 :   GDALDataType arg9 ;
   24694           3 :   int arg10 ;
   24695           3 :   int *arg11 = (int *) 0 ;
   24696           3 :   int arg12 ;
   24697           3 :   size_t arg13 ;
   24698           3 :   size_t arg14 ;
   24699           3 :   char **arg15 = (char **) NULL ;
   24700           3 :   void *argp1 = 0 ;
   24701           3 :   int res1 = 0 ;
   24702           3 :   int val2 ;
   24703           3 :   int ecode2 = 0 ;
   24704           3 :   int val3 ;
   24705           3 :   int ecode3 = 0 ;
   24706           3 :   int val4 ;
   24707           3 :   int ecode4 = 0 ;
   24708           3 :   int val5 ;
   24709           3 :   int ecode5 = 0 ;
   24710           3 :   int val6 ;
   24711           3 :   int ecode6 = 0 ;
   24712           3 :   int val7 ;
   24713           3 :   int ecode7 = 0 ;
   24714           3 :   int val8 ;
   24715           3 :   int ecode8 = 0 ;
   24716           3 :   int val12 ;
   24717           3 :   int ecode12 = 0 ;
   24718           3 :   size_t val13 ;
   24719           3 :   int ecode13 = 0 ;
   24720           3 :   size_t val14 ;
   24721           3 :   int ecode14 = 0 ;
   24722           3 :   PyObject * obj0 = 0 ;
   24723           3 :   PyObject * obj1 = 0 ;
   24724           3 :   PyObject * obj2 = 0 ;
   24725           3 :   PyObject * obj3 = 0 ;
   24726           3 :   PyObject * obj4 = 0 ;
   24727           3 :   PyObject * obj5 = 0 ;
   24728           3 :   PyObject * obj6 = 0 ;
   24729           3 :   PyObject * obj7 = 0 ;
   24730           3 :   PyObject * obj8 = 0 ;
   24731           3 :   PyObject * obj9 = 0 ;
   24732           3 :   PyObject * obj10 = 0 ;
   24733           3 :   PyObject * obj11 = 0 ;
   24734           3 :   PyObject * obj12 = 0 ;
   24735           3 :   PyObject * obj13 = 0 ;
   24736           3 :   char * kwnames[] = {
   24737             :     (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 
   24738             :   };
   24739           3 :   CPLVirtualMemShadow *result = 0 ;
   24740             :   
   24741           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;
   24742           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24743           3 :   if (!SWIG_IsOK(res1)) {
   24744           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetVirtualMem" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24745             :   }
   24746           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24747           3 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   24748           3 :   if (!SWIG_IsOK(ecode2)) {
   24749           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   24750             :   } 
   24751           3 :   arg2 = static_cast< GDALRWFlag >(val2);
   24752           3 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   24753           3 :   if (!SWIG_IsOK(ecode3)) {
   24754           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetVirtualMem" "', argument " "3"" of type '" "int""'");
   24755             :   } 
   24756           3 :   arg3 = static_cast< int >(val3);
   24757           3 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   24758           3 :   if (!SWIG_IsOK(ecode4)) {
   24759           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_GetVirtualMem" "', argument " "4"" of type '" "int""'");
   24760             :   } 
   24761           3 :   arg4 = static_cast< int >(val4);
   24762           3 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   24763           3 :   if (!SWIG_IsOK(ecode5)) {
   24764           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_GetVirtualMem" "', argument " "5"" of type '" "int""'");
   24765             :   } 
   24766           3 :   arg5 = static_cast< int >(val5);
   24767           3 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   24768           3 :   if (!SWIG_IsOK(ecode6)) {
   24769           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Dataset_GetVirtualMem" "', argument " "6"" of type '" "int""'");
   24770             :   } 
   24771           3 :   arg6 = static_cast< int >(val6);
   24772           3 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   24773           3 :   if (!SWIG_IsOK(ecode7)) {
   24774           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Dataset_GetVirtualMem" "', argument " "7"" of type '" "int""'");
   24775             :   } 
   24776           3 :   arg7 = static_cast< int >(val7);
   24777           3 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   24778           3 :   if (!SWIG_IsOK(ecode8)) {
   24779           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Dataset_GetVirtualMem" "', argument " "8"" of type '" "int""'");
   24780             :   } 
   24781           3 :   arg8 = static_cast< int >(val8);
   24782           3 :   {
   24783             :     // %typemap(in) GDALDataType
   24784           3 :     int val = 0;
   24785           3 :     int ecode = SWIG_AsVal_int(obj8, &val);
   24786           3 :     if (!SWIG_IsOK(ecode)) {
   24787           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   24788             :     }
   24789           3 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   24790             :     {
   24791           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   24792             :     }
   24793           3 :     arg9 = static_cast<GDALDataType>(val);
   24794             :   }
   24795           3 :   {
   24796             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24797           3 :     arg11 = CreateCIntListFromSequence(obj9, &arg10);
   24798           3 :     if( arg10 < 0 ) {
   24799           0 :       SWIG_fail;
   24800             :     }
   24801             :   }
   24802           3 :   ecode12 = SWIG_AsVal_int(obj10, &val12);
   24803           3 :   if (!SWIG_IsOK(ecode12)) {
   24804           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "Dataset_GetVirtualMem" "', argument " "12"" of type '" "int""'");
   24805             :   } 
   24806           3 :   arg12 = static_cast< int >(val12);
   24807           3 :   ecode13 = SWIG_AsVal_size_t(obj11, &val13);
   24808           3 :   if (!SWIG_IsOK(ecode13)) {
   24809           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "Dataset_GetVirtualMem" "', argument " "13"" of type '" "size_t""'");
   24810             :   } 
   24811           3 :   arg13 = static_cast< size_t >(val13);
   24812           3 :   ecode14 = SWIG_AsVal_size_t(obj12, &val14);
   24813           3 :   if (!SWIG_IsOK(ecode14)) {
   24814           0 :     SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_GetVirtualMem" "', argument " "14"" of type '" "size_t""'");
   24815             :   } 
   24816           3 :   arg14 = static_cast< size_t >(val14);
   24817           3 :   if (obj13) {
   24818           0 :     {
   24819             :       /* %typemap(in) char **dict */
   24820           0 :       arg15 = NULL;
   24821           0 :       if ( PySequence_Check( obj13 ) ) {
   24822           0 :         int bErr = FALSE;
   24823           0 :         arg15 = CSLFromPySequence(obj13, &bErr);
   24824           0 :         if ( bErr )
   24825             :         {
   24826           0 :           SWIG_fail;
   24827             :         }
   24828             :       }
   24829           0 :       else if ( PyMapping_Check( obj13 ) ) {
   24830           0 :         int bErr = FALSE;
   24831           0 :         arg15 = CSLFromPyMapping(obj13, &bErr);
   24832           0 :         if ( bErr )
   24833             :         {
   24834           0 :           SWIG_fail;
   24835             :         }
   24836             :       }
   24837             :       else {
   24838           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   24839           0 :         SWIG_fail;
   24840             :       }
   24841             :     }
   24842             :   }
   24843           3 :   {
   24844           3 :     const int bLocalUseExceptions = GetUseExceptions();
   24845           3 :     if ( bLocalUseExceptions ) {
   24846           3 :       pushErrorHandler();
   24847             :     }
   24848           3 :     {
   24849           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24850           3 :       result = (CPLVirtualMemShadow *)GDALDatasetShadow_GetVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   24851           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24852             :     }
   24853           3 :     if ( bLocalUseExceptions ) {
   24854           3 :       popErrorHandler();
   24855             :     }
   24856             : #ifndef SED_HACKS
   24857             :     if ( bLocalUseExceptions ) {
   24858             :       CPLErr eclass = CPLGetLastErrorType();
   24859             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24860             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24861             :       }
   24862             :     }
   24863             : #endif
   24864             :   }
   24865           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   24866           3 :   {
   24867             :     /* %typemap(freearg) (int nList, int* pList) */
   24868           3 :     free(arg11);
   24869             :   }
   24870           3 :   {
   24871             :     /* %typemap(freearg) char **dict */
   24872           3 :     CSLDestroy( arg15 );
   24873             :   }
   24874           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   24875             :   return resultobj;
   24876           0 : fail:
   24877           0 :   {
   24878             :     /* %typemap(freearg) (int nList, int* pList) */
   24879           0 :     free(arg11);
   24880             :   }
   24881           0 :   {
   24882             :     /* %typemap(freearg) char **dict */
   24883           0 :     CSLDestroy( arg15 );
   24884             :   }
   24885             :   return NULL;
   24886             : }
   24887             : 
   24888             : 
   24889           3 : SWIGINTERN PyObject *_wrap_Dataset_GetTiledVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   24890           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24891           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24892           3 :   GDALRWFlag arg2 ;
   24893           3 :   int arg3 ;
   24894           3 :   int arg4 ;
   24895           3 :   int arg5 ;
   24896           3 :   int arg6 ;
   24897           3 :   int arg7 ;
   24898           3 :   int arg8 ;
   24899           3 :   GDALDataType arg9 ;
   24900           3 :   int arg10 ;
   24901           3 :   int *arg11 = (int *) 0 ;
   24902           3 :   GDALTileOrganization arg12 ;
   24903           3 :   size_t arg13 ;
   24904           3 :   char **arg14 = (char **) NULL ;
   24905           3 :   void *argp1 = 0 ;
   24906           3 :   int res1 = 0 ;
   24907           3 :   int val2 ;
   24908           3 :   int ecode2 = 0 ;
   24909           3 :   int val3 ;
   24910           3 :   int ecode3 = 0 ;
   24911           3 :   int val4 ;
   24912           3 :   int ecode4 = 0 ;
   24913           3 :   int val5 ;
   24914           3 :   int ecode5 = 0 ;
   24915           3 :   int val6 ;
   24916           3 :   int ecode6 = 0 ;
   24917           3 :   int val7 ;
   24918           3 :   int ecode7 = 0 ;
   24919           3 :   int val8 ;
   24920           3 :   int ecode8 = 0 ;
   24921           3 :   int val12 ;
   24922           3 :   int ecode12 = 0 ;
   24923           3 :   size_t val13 ;
   24924           3 :   int ecode13 = 0 ;
   24925           3 :   PyObject * obj0 = 0 ;
   24926           3 :   PyObject * obj1 = 0 ;
   24927           3 :   PyObject * obj2 = 0 ;
   24928           3 :   PyObject * obj3 = 0 ;
   24929           3 :   PyObject * obj4 = 0 ;
   24930           3 :   PyObject * obj5 = 0 ;
   24931           3 :   PyObject * obj6 = 0 ;
   24932           3 :   PyObject * obj7 = 0 ;
   24933           3 :   PyObject * obj8 = 0 ;
   24934           3 :   PyObject * obj9 = 0 ;
   24935           3 :   PyObject * obj10 = 0 ;
   24936           3 :   PyObject * obj11 = 0 ;
   24937           3 :   PyObject * obj12 = 0 ;
   24938           3 :   char * kwnames[] = {
   24939             :     (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 
   24940             :   };
   24941           3 :   CPLVirtualMemShadow *result = 0 ;
   24942             :   
   24943           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;
   24944           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24945           3 :   if (!SWIG_IsOK(res1)) {
   24946           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24947             :   }
   24948           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24949           3 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   24950           3 :   if (!SWIG_IsOK(ecode2)) {
   24951           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   24952             :   } 
   24953           3 :   arg2 = static_cast< GDALRWFlag >(val2);
   24954           3 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   24955           3 :   if (!SWIG_IsOK(ecode3)) {
   24956           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "3"" of type '" "int""'");
   24957             :   } 
   24958           3 :   arg3 = static_cast< int >(val3);
   24959           3 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   24960           3 :   if (!SWIG_IsOK(ecode4)) {
   24961           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "4"" of type '" "int""'");
   24962             :   } 
   24963           3 :   arg4 = static_cast< int >(val4);
   24964           3 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   24965           3 :   if (!SWIG_IsOK(ecode5)) {
   24966           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "5"" of type '" "int""'");
   24967             :   } 
   24968           3 :   arg5 = static_cast< int >(val5);
   24969           3 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   24970           3 :   if (!SWIG_IsOK(ecode6)) {
   24971           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "6"" of type '" "int""'");
   24972             :   } 
   24973           3 :   arg6 = static_cast< int >(val6);
   24974           3 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   24975           3 :   if (!SWIG_IsOK(ecode7)) {
   24976           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "7"" of type '" "int""'");
   24977             :   } 
   24978           3 :   arg7 = static_cast< int >(val7);
   24979           3 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   24980           3 :   if (!SWIG_IsOK(ecode8)) {
   24981           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "8"" of type '" "int""'");
   24982             :   } 
   24983           3 :   arg8 = static_cast< int >(val8);
   24984           3 :   {
   24985             :     // %typemap(in) GDALDataType
   24986           3 :     int val = 0;
   24987           3 :     int ecode = SWIG_AsVal_int(obj8, &val);
   24988           3 :     if (!SWIG_IsOK(ecode)) {
   24989           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   24990             :     }
   24991           3 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   24992             :     {
   24993           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   24994             :     }
   24995           3 :     arg9 = static_cast<GDALDataType>(val);
   24996             :   }
   24997           3 :   {
   24998             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24999           3 :     arg11 = CreateCIntListFromSequence(obj9, &arg10);
   25000           3 :     if( arg10 < 0 ) {
   25001           0 :       SWIG_fail;
   25002             :     }
   25003             :   }
   25004           3 :   ecode12 = SWIG_AsVal_int(obj10, &val12);
   25005           3 :   if (!SWIG_IsOK(ecode12)) {
   25006           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "12"" of type '" "GDALTileOrganization""'");
   25007             :   } 
   25008           3 :   arg12 = static_cast< GDALTileOrganization >(val12);
   25009           3 :   ecode13 = SWIG_AsVal_size_t(obj11, &val13);
   25010           3 :   if (!SWIG_IsOK(ecode13)) {
   25011           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "13"" of type '" "size_t""'");
   25012             :   } 
   25013           3 :   arg13 = static_cast< size_t >(val13);
   25014           3 :   if (obj12) {
   25015           0 :     {
   25016             :       /* %typemap(in) char **dict */
   25017           0 :       arg14 = NULL;
   25018           0 :       if ( PySequence_Check( obj12 ) ) {
   25019           0 :         int bErr = FALSE;
   25020           0 :         arg14 = CSLFromPySequence(obj12, &bErr);
   25021           0 :         if ( bErr )
   25022             :         {
   25023           0 :           SWIG_fail;
   25024             :         }
   25025             :       }
   25026           0 :       else if ( PyMapping_Check( obj12 ) ) {
   25027           0 :         int bErr = FALSE;
   25028           0 :         arg14 = CSLFromPyMapping(obj12, &bErr);
   25029           0 :         if ( bErr )
   25030             :         {
   25031           0 :           SWIG_fail;
   25032             :         }
   25033             :       }
   25034             :       else {
   25035           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25036           0 :         SWIG_fail;
   25037             :       }
   25038             :     }
   25039             :   }
   25040           3 :   {
   25041           3 :     const int bLocalUseExceptions = GetUseExceptions();
   25042           3 :     if ( bLocalUseExceptions ) {
   25043           3 :       pushErrorHandler();
   25044             :     }
   25045           3 :     {
   25046           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25047           3 :       result = (CPLVirtualMemShadow *)GDALDatasetShadow_GetTiledVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
   25048           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25049             :     }
   25050           3 :     if ( bLocalUseExceptions ) {
   25051           3 :       popErrorHandler();
   25052             :     }
   25053             : #ifndef SED_HACKS
   25054             :     if ( bLocalUseExceptions ) {
   25055             :       CPLErr eclass = CPLGetLastErrorType();
   25056             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25057             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25058             :       }
   25059             :     }
   25060             : #endif
   25061             :   }
   25062           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   25063           3 :   {
   25064             :     /* %typemap(freearg) (int nList, int* pList) */
   25065           3 :     free(arg11);
   25066             :   }
   25067           3 :   {
   25068             :     /* %typemap(freearg) char **dict */
   25069           3 :     CSLDestroy( arg14 );
   25070             :   }
   25071           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   25072             :   return resultobj;
   25073           0 : fail:
   25074           0 :   {
   25075             :     /* %typemap(freearg) (int nList, int* pList) */
   25076           0 :     free(arg11);
   25077             :   }
   25078           0 :   {
   25079             :     /* %typemap(freearg) char **dict */
   25080           0 :     CSLDestroy( arg14 );
   25081             :   }
   25082             :   return NULL;
   25083             : }
   25084             : 
   25085             : 
   25086        5865 : SWIGINTERN PyObject *_wrap_Dataset_CreateLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25087        5865 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25088        5865 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25089        5865 :   char *arg2 = (char *) 0 ;
   25090        5865 :   OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
   25091        5865 :   OGRwkbGeometryType arg4 = (OGRwkbGeometryType) wkbUnknown ;
   25092        5865 :   char **arg5 = (char **) 0 ;
   25093        5865 :   void *argp1 = 0 ;
   25094        5865 :   int res1 = 0 ;
   25095        5865 :   int res2 ;
   25096        5865 :   char *buf2 = 0 ;
   25097        5865 :   int alloc2 = 0 ;
   25098        5865 :   void *argp3 = 0 ;
   25099        5865 :   int res3 = 0 ;
   25100        5865 :   int val4 ;
   25101        5865 :   int ecode4 = 0 ;
   25102        5865 :   PyObject * obj0 = 0 ;
   25103        5865 :   PyObject * obj1 = 0 ;
   25104        5865 :   PyObject * obj2 = 0 ;
   25105        5865 :   PyObject * obj3 = 0 ;
   25106        5865 :   PyObject * obj4 = 0 ;
   25107        5865 :   char * kwnames[] = {
   25108             :     (char *)"self",  (char *)"name",  (char *)"srs",  (char *)"geom_type",  (char *)"options",  NULL 
   25109             :   };
   25110        5865 :   OGRLayerShadow *result = 0 ;
   25111             :   
   25112        5865 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Dataset_CreateLayer", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   25113        5865 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25114        5865 :   if (!SWIG_IsOK(res1)) {
   25115           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25116             :   }
   25117        5865 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25118        5865 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   25119        5865 :   if (!SWIG_IsOK(res2)) {
   25120           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CreateLayer" "', argument " "2"" of type '" "char const *""'");
   25121             :   }
   25122        5865 :   arg2 = reinterpret_cast< char * >(buf2);
   25123        5865 :   if (obj2) {
   25124        1156 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   25125        1156 :     if (!SWIG_IsOK(res3)) {
   25126           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CreateLayer" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'"); 
   25127             :     }
   25128        1156 :     arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
   25129             :   }
   25130        5865 :   if (obj3) {
   25131        1658 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
   25132        1658 :     if (!SWIG_IsOK(ecode4)) {
   25133           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_CreateLayer" "', argument " "4"" of type '" "OGRwkbGeometryType""'");
   25134             :     } 
   25135        1658 :     arg4 = static_cast< OGRwkbGeometryType >(val4);
   25136             :   }
   25137        5865 :   if (obj4) {
   25138        1177 :     {
   25139             :       /* %typemap(in) char **dict */
   25140        1177 :       arg5 = NULL;
   25141        1177 :       if ( PySequence_Check( obj4 ) ) {
   25142        1145 :         int bErr = FALSE;
   25143        1145 :         arg5 = CSLFromPySequence(obj4, &bErr);
   25144        1145 :         if ( bErr )
   25145             :         {
   25146           0 :           SWIG_fail;
   25147             :         }
   25148             :       }
   25149          32 :       else if ( PyMapping_Check( obj4 ) ) {
   25150          32 :         int bErr = FALSE;
   25151          32 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   25152          32 :         if ( bErr )
   25153             :         {
   25154           0 :           SWIG_fail;
   25155             :         }
   25156             :       }
   25157             :       else {
   25158           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25159           0 :         SWIG_fail;
   25160             :       }
   25161             :     }
   25162             :   }
   25163        5865 :   {
   25164        5865 :     const int bLocalUseExceptions = GetUseExceptions();
   25165        5865 :     if ( bLocalUseExceptions ) {
   25166        1807 :       pushErrorHandler();
   25167             :     }
   25168        5865 :     {
   25169        5865 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25170        5865 :       result = (OGRLayerShadow *)GDALDatasetShadow_CreateLayer(arg1,(char const *)arg2,arg3,arg4,arg5);
   25171        5865 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25172             :     }
   25173        5865 :     if ( bLocalUseExceptions ) {
   25174        1807 :       popErrorHandler();
   25175             :     }
   25176             : #ifndef SED_HACKS
   25177             :     if ( bLocalUseExceptions ) {
   25178             :       CPLErr eclass = CPLGetLastErrorType();
   25179             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25180             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25181             :       }
   25182             :     }
   25183             : #endif
   25184             :   }
   25185        5865 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25186        5865 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25187        5865 :   {
   25188             :     /* %typemap(freearg) char **dict */
   25189        5865 :     CSLDestroy( arg5 );
   25190             :   }
   25191        5917 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   25192             :   return resultobj;
   25193           0 : fail:
   25194           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25195           0 :   {
   25196             :     /* %typemap(freearg) char **dict */
   25197           0 :     CSLDestroy( arg5 );
   25198             :   }
   25199             :   return NULL;
   25200             : }
   25201             : 
   25202             : 
   25203          14 : SWIGINTERN PyObject *_wrap_Dataset_CreateLayerFromGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25204          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25205          14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25206          14 :   char *arg2 = (char *) 0 ;
   25207          14 :   OGRGeomFieldDefnShadow *arg3 = (OGRGeomFieldDefnShadow *) 0 ;
   25208          14 :   char **arg4 = (char **) 0 ;
   25209          14 :   void *argp1 = 0 ;
   25210          14 :   int res1 = 0 ;
   25211          14 :   int res2 ;
   25212          14 :   char *buf2 = 0 ;
   25213          14 :   int alloc2 = 0 ;
   25214          14 :   void *argp3 = 0 ;
   25215          14 :   int res3 = 0 ;
   25216          14 :   PyObject *swig_obj[4] ;
   25217          14 :   OGRLayerShadow *result = 0 ;
   25218             :   
   25219          14 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_CreateLayerFromGeomFieldDefn", 3, 4, swig_obj)) SWIG_fail;
   25220          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25221          14 :   if (!SWIG_IsOK(res1)) {
   25222           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25223             :   }
   25224          14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25225          14 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   25226          14 :   if (!SWIG_IsOK(res2)) {
   25227           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "2"" of type '" "char const *""'");
   25228             :   }
   25229          14 :   arg2 = reinterpret_cast< char * >(buf2);
   25230          14 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
   25231          14 :   if (!SWIG_IsOK(res3)) {
   25232           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "3"" of type '" "OGRGeomFieldDefnShadow *""'"); 
   25233             :   }
   25234          14 :   arg3 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp3);
   25235          14 :   if (swig_obj[3]) {
   25236           7 :     {
   25237             :       /* %typemap(in) char **dict */
   25238           7 :       arg4 = NULL;
   25239           7 :       if ( PySequence_Check( swig_obj[3] ) ) {
   25240           7 :         int bErr = FALSE;
   25241           7 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   25242           7 :         if ( bErr )
   25243             :         {
   25244           0 :           SWIG_fail;
   25245             :         }
   25246             :       }
   25247           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   25248           0 :         int bErr = FALSE;
   25249           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   25250           0 :         if ( bErr )
   25251             :         {
   25252           0 :           SWIG_fail;
   25253             :         }
   25254             :       }
   25255             :       else {
   25256           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25257           0 :         SWIG_fail;
   25258             :       }
   25259             :     }
   25260             :   }
   25261          14 :   {
   25262          14 :     const int bLocalUseExceptions = GetUseExceptions();
   25263          14 :     if ( bLocalUseExceptions ) {
   25264           9 :       pushErrorHandler();
   25265             :     }
   25266          14 :     {
   25267          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25268          14 :       result = (OGRLayerShadow *)GDALDatasetShadow_CreateLayerFromGeomFieldDefn(arg1,(char const *)arg2,arg3,arg4);
   25269          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25270             :     }
   25271          14 :     if ( bLocalUseExceptions ) {
   25272           9 :       popErrorHandler();
   25273             :     }
   25274             : #ifndef SED_HACKS
   25275             :     if ( bLocalUseExceptions ) {
   25276             :       CPLErr eclass = CPLGetLastErrorType();
   25277             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25278             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25279             :       }
   25280             :     }
   25281             : #endif
   25282             :   }
   25283          14 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25284          14 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25285          14 :   {
   25286             :     /* %typemap(freearg) char **dict */
   25287          14 :     CSLDestroy( arg4 );
   25288             :   }
   25289          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   25290             :   return resultobj;
   25291           0 : fail:
   25292           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25293           0 :   {
   25294             :     /* %typemap(freearg) char **dict */
   25295           0 :     CSLDestroy( arg4 );
   25296             :   }
   25297             :   return NULL;
   25298             : }
   25299             : 
   25300             : 
   25301          12 : SWIGINTERN PyObject *_wrap_Dataset_CopyLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25302          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25303          12 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25304          12 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   25305          12 :   char *arg3 = (char *) 0 ;
   25306          12 :   char **arg4 = (char **) 0 ;
   25307          12 :   void *argp1 = 0 ;
   25308          12 :   int res1 = 0 ;
   25309          12 :   void *argp2 = 0 ;
   25310          12 :   int res2 = 0 ;
   25311          12 :   int res3 ;
   25312          12 :   char *buf3 = 0 ;
   25313          12 :   int alloc3 = 0 ;
   25314          12 :   PyObject * obj0 = 0 ;
   25315          12 :   PyObject * obj1 = 0 ;
   25316          12 :   PyObject * obj2 = 0 ;
   25317          12 :   PyObject * obj3 = 0 ;
   25318          12 :   char * kwnames[] = {
   25319             :     (char *)"self",  (char *)"src_layer",  (char *)"new_name",  (char *)"options",  NULL 
   25320             :   };
   25321          12 :   OGRLayerShadow *result = 0 ;
   25322             :   
   25323          12 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:Dataset_CopyLayer", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   25324          12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25325          12 :   if (!SWIG_IsOK(res1)) {
   25326           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CopyLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25327             :   }
   25328          12 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25329          12 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25330          12 :   if (!SWIG_IsOK(res2)) {
   25331           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CopyLayer" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
   25332             :   }
   25333          12 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
   25334          12 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   25335          12 :   if (!SWIG_IsOK(res3)) {
   25336           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CopyLayer" "', argument " "3"" of type '" "char const *""'");
   25337             :   }
   25338          12 :   arg3 = reinterpret_cast< char * >(buf3);
   25339          12 :   if (obj3) {
   25340           4 :     {
   25341             :       /* %typemap(in) char **dict */
   25342           4 :       arg4 = NULL;
   25343           4 :       if ( PySequence_Check( obj3 ) ) {
   25344           4 :         int bErr = FALSE;
   25345           4 :         arg4 = CSLFromPySequence(obj3, &bErr);
   25346           4 :         if ( bErr )
   25347             :         {
   25348           0 :           SWIG_fail;
   25349             :         }
   25350             :       }
   25351           0 :       else if ( PyMapping_Check( obj3 ) ) {
   25352           0 :         int bErr = FALSE;
   25353           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   25354           0 :         if ( bErr )
   25355             :         {
   25356           0 :           SWIG_fail;
   25357             :         }
   25358             :       }
   25359             :       else {
   25360           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25361           0 :         SWIG_fail;
   25362             :       }
   25363             :     }
   25364             :   }
   25365          12 :   {
   25366          12 :     if (!arg2) {
   25367           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   25368             :     }
   25369             :   }
   25370          12 :   {
   25371          12 :     const int bLocalUseExceptions = GetUseExceptions();
   25372          12 :     if ( bLocalUseExceptions ) {
   25373           8 :       pushErrorHandler();
   25374             :     }
   25375          12 :     {
   25376          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25377          12 :       result = (OGRLayerShadow *)GDALDatasetShadow_CopyLayer(arg1,arg2,(char const *)arg3,arg4);
   25378          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25379             :     }
   25380          12 :     if ( bLocalUseExceptions ) {
   25381           8 :       popErrorHandler();
   25382             :     }
   25383             : #ifndef SED_HACKS
   25384             :     if ( bLocalUseExceptions ) {
   25385             :       CPLErr eclass = CPLGetLastErrorType();
   25386             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25387             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25388             :       }
   25389             :     }
   25390             : #endif
   25391             :   }
   25392          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25393          12 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   25394          12 :   {
   25395             :     /* %typemap(freearg) char **dict */
   25396          12 :     CSLDestroy( arg4 );
   25397             :   }
   25398          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   25399             :   return resultobj;
   25400           0 : fail:
   25401           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   25402           0 :   {
   25403             :     /* %typemap(freearg) char **dict */
   25404           0 :     CSLDestroy( arg4 );
   25405             :   }
   25406             :   return NULL;
   25407             : }
   25408             : 
   25409             : 
   25410          40 : SWIGINTERN PyObject *_wrap_Dataset_DeleteLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25411          40 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25412          40 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25413          40 :   int arg2 ;
   25414          40 :   void *argp1 = 0 ;
   25415          40 :   int res1 = 0 ;
   25416          40 :   int val2 ;
   25417          40 :   int ecode2 = 0 ;
   25418          40 :   PyObject *swig_obj[2] ;
   25419          40 :   OGRErr result;
   25420             :   
   25421          40 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteLayer", 2, 2, swig_obj)) SWIG_fail;
   25422          40 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25423          40 :   if (!SWIG_IsOK(res1)) {
   25424           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25425             :   }
   25426          40 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25427          40 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25428          40 :   if (!SWIG_IsOK(ecode2)) {
   25429           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_DeleteLayer" "', argument " "2"" of type '" "int""'");
   25430             :   } 
   25431          40 :   arg2 = static_cast< int >(val2);
   25432          40 :   {
   25433          40 :     const int bLocalUseExceptions = GetUseExceptions();
   25434          40 :     if ( bLocalUseExceptions ) {
   25435           6 :       pushErrorHandler();
   25436             :     }
   25437          40 :     {
   25438          40 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25439          40 :       result = (OGRErr)GDALDatasetShadow_DeleteLayer(arg1,arg2);
   25440          40 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25441             :     }
   25442          40 :     if ( bLocalUseExceptions ) {
   25443           6 :       popErrorHandler();
   25444             :     }
   25445             : #ifndef SED_HACKS
   25446             :     if ( bLocalUseExceptions ) {
   25447             :       CPLErr eclass = CPLGetLastErrorType();
   25448             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25449             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25450             :       }
   25451             :     }
   25452             : #endif
   25453             :   }
   25454          40 :   {
   25455             :     /* %typemap(out) OGRErr */
   25456          58 :     if ( result != 0 && GetUseExceptions()) {
   25457           2 :       const char* pszMessage = CPLGetLastErrorMsg();
   25458           2 :       if( pszMessage[0] != '\0' )
   25459           2 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   25460             :       else
   25461           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   25462           2 :       SWIG_fail;
   25463             :     }
   25464             :   }
   25465          38 :   {
   25466             :     /* %typemap(ret) OGRErr */
   25467          38 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   25468          38 :       resultobj = PyInt_FromLong( result );
   25469             :     }
   25470             :   }
   25471          40 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   25472             :   return resultobj;
   25473             : fail:
   25474             :   return NULL;
   25475             : }
   25476             : 
   25477             : 
   25478          91 : SWIGINTERN PyObject *_wrap_Dataset_IsLayerPrivate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25479          91 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25480          91 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25481          91 :   int arg2 ;
   25482          91 :   void *argp1 = 0 ;
   25483          91 :   int res1 = 0 ;
   25484          91 :   int val2 ;
   25485          91 :   int ecode2 = 0 ;
   25486          91 :   PyObject *swig_obj[2] ;
   25487          91 :   bool result;
   25488             :   
   25489          91 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_IsLayerPrivate", 2, 2, swig_obj)) SWIG_fail;
   25490          91 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25491          91 :   if (!SWIG_IsOK(res1)) {
   25492           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_IsLayerPrivate" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25493             :   }
   25494          91 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25495          91 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25496          91 :   if (!SWIG_IsOK(ecode2)) {
   25497           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_IsLayerPrivate" "', argument " "2"" of type '" "int""'");
   25498             :   } 
   25499          91 :   arg2 = static_cast< int >(val2);
   25500          91 :   {
   25501          91 :     const int bLocalUseExceptions = GetUseExceptions();
   25502          91 :     if ( bLocalUseExceptions ) {
   25503          85 :       pushErrorHandler();
   25504             :     }
   25505          91 :     {
   25506          91 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25507          91 :       result = (bool)GDALDatasetShadow_IsLayerPrivate(arg1,arg2);
   25508          91 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25509             :     }
   25510          91 :     if ( bLocalUseExceptions ) {
   25511          85 :       popErrorHandler();
   25512             :     }
   25513             : #ifndef SED_HACKS
   25514             :     if ( bLocalUseExceptions ) {
   25515             :       CPLErr eclass = CPLGetLastErrorType();
   25516             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25517             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25518             :       }
   25519             :     }
   25520             : #endif
   25521             :   }
   25522          91 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   25523          91 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   25524             :   return resultobj;
   25525             : fail:
   25526             :   return NULL;
   25527             : }
   25528             : 
   25529             : 
   25530        1917 : SWIGINTERN PyObject *_wrap_Dataset_GetNextFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25531        1917 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25532        1917 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25533        1917 :   bool arg2 = (bool) true ;
   25534        1917 :   bool arg3 = (bool) false ;
   25535        1917 :   OGRLayerShadow **arg4 = (OGRLayerShadow **) NULL ;
   25536        1917 :   double *arg5 = (double *) NULL ;
   25537        1917 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   25538        1917 :   void *arg7 = (void *) NULL ;
   25539        1917 :   void *argp1 = 0 ;
   25540        1917 :   int res1 = 0 ;
   25541        1917 :   bool val2 ;
   25542        1917 :   int ecode2 = 0 ;
   25543        1917 :   bool val3 ;
   25544        1917 :   int ecode3 = 0 ;
   25545        1917 :   OGRLayerShadow *poBelongingLayer4 = NULL ;
   25546        1917 :   double dfProgressPct4 = 0 ;
   25547        1917 :   PyObject * obj0 = 0 ;
   25548        1917 :   PyObject * obj1 = 0 ;
   25549        1917 :   PyObject * obj2 = 0 ;
   25550        1917 :   PyObject * obj3 = 0 ;
   25551        1917 :   PyObject * obj4 = 0 ;
   25552        1917 :   char * kwnames[] = {
   25553             :     (char *)"self",  (char *)"include_layer",  (char *)"include_pct",  (char *)"callback",  (char *)"callback_data",  NULL 
   25554             :   };
   25555        1917 :   OGRFeatureShadow *result = 0 ;
   25556             :   
   25557             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   25558        1917 :   PyProgressData *psProgressInfo;
   25559        1917 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   25560        1917 :   psProgressInfo->nLastReported = -1;
   25561        1917 :   psProgressInfo->psPyCallback = NULL;
   25562        1917 :   psProgressInfo->psPyCallbackData = NULL;
   25563        1917 :   arg7 = psProgressInfo;
   25564        1917 :   {
   25565             :     /* %typemap(in) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   25566        1917 :     arg4 = &poBelongingLayer4;
   25567        1917 :     arg5 = &dfProgressPct4;
   25568             :   }
   25569        1917 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Dataset_GetNextFeature", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   25570        1917 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25571        1917 :   if (!SWIG_IsOK(res1)) {
   25572           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetNextFeature" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25573             :   }
   25574        1917 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25575        1917 :   if (obj1) {
   25576           6 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   25577           6 :     if (!SWIG_IsOK(ecode2)) {
   25578           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetNextFeature" "', argument " "2"" of type '" "bool""'");
   25579             :     } 
   25580             :     arg2 = static_cast< bool >(val2);
   25581             :   }
   25582        1917 :   if (obj2) {
   25583          76 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   25584          76 :     if (!SWIG_IsOK(ecode3)) {
   25585           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetNextFeature" "', argument " "3"" of type '" "bool""'");
   25586             :     } 
   25587             :     arg3 = static_cast< bool >(val3);
   25588             :   }
   25589        1917 :   if (obj3) {
   25590           2 :     {
   25591             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   25592             :       /* callback_func typemap */
   25593             :       
   25594             :       /* In some cases 0 is passed instead of None. */
   25595             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   25596           2 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   25597             :       {
   25598           0 :         if( PyLong_AsLong(obj3) == 0 )
   25599             :         {
   25600           0 :           obj3 = Py_None;
   25601             :         }
   25602             :       }
   25603             :       
   25604           2 :       if (obj3 && obj3 != Py_None ) {
   25605           2 :         void* cbfunction = NULL;
   25606           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   25607             :             (void**)&cbfunction,
   25608             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   25609             :             SWIG_POINTER_EXCEPTION | 0 ));
   25610             :         
   25611           2 :         if ( cbfunction == GDALTermProgress ) {
   25612             :           arg6 = GDALTermProgress;
   25613             :         } else {
   25614           2 :           if (!PyCallable_Check(obj3)) {
   25615           0 :             PyErr_SetString( PyExc_RuntimeError,
   25616             :               "Object given is not a Python function" );
   25617           0 :             SWIG_fail;
   25618             :           }
   25619           2 :           psProgressInfo->psPyCallback = obj3;
   25620           2 :           arg6 = PyProgressProxy;
   25621             :         }
   25622             :         
   25623             :       }
   25624             :       
   25625             :     }
   25626             :   }
   25627        1917 :   if (obj4) {
   25628           1 :     {
   25629             :       /* %typemap(in) ( void* callback_data=NULL)  */
   25630           1 :       psProgressInfo->psPyCallbackData = obj4 ;
   25631             :     }
   25632             :   }
   25633        1917 :   {
   25634             :     /* %typemap(check) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   25635        1917 :     if( !arg3 )
   25636        1841 :     arg5 = NULL;
   25637             :   }
   25638        1917 :   {
   25639        1917 :     const int bLocalUseExceptions = GetUseExceptions();
   25640        1917 :     if ( bLocalUseExceptions ) {
   25641         104 :       pushErrorHandler();
   25642             :     }
   25643        1917 :     {
   25644        1917 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25645        1917 :       result = (OGRFeatureShadow *)GDALDatasetShadow_GetNextFeature(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   25646        1917 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25647             :     }
   25648        1917 :     if ( bLocalUseExceptions ) {
   25649         104 :       popErrorHandler();
   25650             :     }
   25651             : #ifndef SED_HACKS
   25652             :     if ( bLocalUseExceptions ) {
   25653             :       CPLErr eclass = CPLGetLastErrorType();
   25654             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25655             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25656             :       }
   25657             :     }
   25658             : #endif
   25659             :   }
   25660        1917 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
   25661        1917 :   {
   25662             :     /* %typemap(argout) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   25663             :     
   25664        1917 :     if( arg2 )
   25665             :     {
   25666        1911 :       if( resultobj == Py_None )
   25667             :       {
   25668          35 :         resultobj = PyList_New(1);
   25669          35 :         PyList_SetItem(resultobj, 0, Py_None);
   25670             :       }
   25671             :       
   25672        1911 :       PyObject* r;
   25673        1911 :       if ( !*arg4 ) {
   25674          35 :         r = Py_None;
   25675          35 :         Py_INCREF(Py_None);
   25676             :       }
   25677             :       else {
   25678        1876 :         r = SWIG_NewPointerObj(SWIG_as_voidptr( *arg4), SWIGTYPE_p_OGRLayerShadow, 0 );
   25679             :       }
   25680             : #if SWIG_VERSION >= 0x040300
   25681             :       resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   25682             : #else
   25683        1911 :       resultobj = SWIG_Python_AppendOutput(resultobj,r);
   25684             : #endif
   25685             :     }
   25686             :     
   25687        1917 :     if( arg3 )
   25688             :     {
   25689          76 :       if( resultobj == Py_None )
   25690             :       {
   25691           2 :         resultobj = PyList_New(1);
   25692           2 :         PyList_SetItem(resultobj, 0, Py_None);
   25693             :       }
   25694          76 :       PyObject* r = PyFloat_FromDouble( *arg5);
   25695             : #if SWIG_VERSION >= 0x040300
   25696             :       resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   25697             : #else
   25698          76 :       resultobj = SWIG_Python_AppendOutput(resultobj,r);
   25699             : #endif
   25700             :     }
   25701             :     
   25702             :   }
   25703        1917 :   {
   25704             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   25705             :     
   25706        1917 :     CPLFree(psProgressInfo);
   25707             :     
   25708             :   }
   25709        1917 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   25710             :   return resultobj;
   25711           0 : fail:
   25712           0 :   {
   25713             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   25714             :     
   25715           0 :     CPLFree(psProgressInfo);
   25716             :     
   25717             :   }
   25718             :   return NULL;
   25719             : }
   25720             : 
   25721             : 
   25722         118 : SWIGINTERN PyObject *_wrap_Dataset_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25723         118 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25724         118 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25725         118 :   char *arg2 = (char *) 0 ;
   25726         118 :   void *argp1 = 0 ;
   25727         118 :   int res1 = 0 ;
   25728         118 :   int res2 ;
   25729         118 :   char *buf2 = 0 ;
   25730         118 :   int alloc2 = 0 ;
   25731         118 :   PyObject *swig_obj[2] ;
   25732         118 :   bool result;
   25733             :   
   25734         118 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_TestCapability", 2, 2, swig_obj)) SWIG_fail;
   25735         118 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25736         118 :   if (!SWIG_IsOK(res1)) {
   25737           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_TestCapability" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25738             :   }
   25739         118 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25740         118 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   25741         118 :   if (!SWIG_IsOK(res2)) {
   25742           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_TestCapability" "', argument " "2"" of type '" "char const *""'");
   25743             :   }
   25744         118 :   arg2 = reinterpret_cast< char * >(buf2);
   25745         118 :   {
   25746         118 :     const int bLocalUseExceptions = GetUseExceptions();
   25747         118 :     if ( bLocalUseExceptions ) {
   25748          48 :       pushErrorHandler();
   25749             :     }
   25750         118 :     {
   25751         118 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25752         118 :       result = (bool)GDALDatasetShadow_TestCapability(arg1,(char const *)arg2);
   25753         118 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25754             :     }
   25755         118 :     if ( bLocalUseExceptions ) {
   25756          48 :       popErrorHandler();
   25757             :     }
   25758             : #ifndef SED_HACKS
   25759             :     if ( bLocalUseExceptions ) {
   25760             :       CPLErr eclass = CPLGetLastErrorType();
   25761             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25762             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25763             :       }
   25764             :     }
   25765             : #endif
   25766             :   }
   25767         118 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   25768         118 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25769         118 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   25770             :   return resultobj;
   25771           0 : fail:
   25772           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25773             :   return NULL;
   25774             : }
   25775             : 
   25776             : 
   25777        9987 : SWIGINTERN PyObject *_wrap_Dataset_ExecuteSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25778        9987 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25779        9987 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25780        9987 :   char *arg2 = (char *) 0 ;
   25781        9987 :   OGRGeometryShadow *arg3 = (OGRGeometryShadow *) NULL ;
   25782        9987 :   char *arg4 = (char *) "" ;
   25783        9987 :   void *argp1 = 0 ;
   25784        9987 :   int res1 = 0 ;
   25785        9987 :   int res2 ;
   25786        9987 :   char *buf2 = 0 ;
   25787        9987 :   int alloc2 = 0 ;
   25788        9987 :   void *argp3 = 0 ;
   25789        9987 :   int res3 = 0 ;
   25790        9987 :   int res4 ;
   25791        9987 :   char *buf4 = 0 ;
   25792        9987 :   int alloc4 = 0 ;
   25793        9987 :   PyObject * obj0 = 0 ;
   25794        9987 :   PyObject * obj1 = 0 ;
   25795        9987 :   PyObject * obj2 = 0 ;
   25796        9987 :   PyObject * obj3 = 0 ;
   25797        9987 :   char * kwnames[] = {
   25798             :     (char *)"self",  (char *)"statement",  (char *)"spatialFilter",  (char *)"dialect",  NULL 
   25799             :   };
   25800        9987 :   OGRLayerShadow *result = 0 ;
   25801             :   
   25802        9987 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Dataset_ExecuteSQL", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   25803        9987 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25804        9987 :   if (!SWIG_IsOK(res1)) {
   25805           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ExecuteSQL" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25806             :   }
   25807        9987 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25808        9987 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   25809        9987 :   if (!SWIG_IsOK(res2)) {
   25810           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_ExecuteSQL" "', argument " "2"" of type '" "char const *""'");
   25811             :   }
   25812        9987 :   arg2 = reinterpret_cast< char * >(buf2);
   25813        9987 :   if (obj2) {
   25814        9987 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   25815        9987 :     if (!SWIG_IsOK(res3)) {
   25816           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_ExecuteSQL" "', argument " "3"" of type '" "OGRGeometryShadow *""'"); 
   25817             :     }
   25818        9987 :     arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
   25819             :   }
   25820        9987 :   if (obj3) {
   25821        9987 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   25822        9987 :     if (!SWIG_IsOK(res4)) {
   25823           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset_ExecuteSQL" "', argument " "4"" of type '" "char const *""'");
   25824             :     }
   25825        9987 :     arg4 = reinterpret_cast< char * >(buf4);
   25826             :   }
   25827        9987 :   {
   25828        9987 :     if (!arg2) {
   25829         131 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   25830             :     }
   25831             :   }
   25832        9856 :   {
   25833        9856 :     const int bLocalUseExceptions = GetUseExceptions();
   25834        9856 :     if ( bLocalUseExceptions ) {
   25835        1236 :       pushErrorHandler();
   25836             :     }
   25837        9856 :     {
   25838        9856 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25839        9856 :       result = (OGRLayerShadow *)GDALDatasetShadow_ExecuteSQL(arg1,(char const *)arg2,arg3,(char const *)arg4);
   25840        9856 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25841             :     }
   25842        9856 :     if ( bLocalUseExceptions ) {
   25843        1236 :       popErrorHandler();
   25844             :     }
   25845             : #ifndef SED_HACKS
   25846             :     if ( bLocalUseExceptions ) {
   25847             :       CPLErr eclass = CPLGetLastErrorType();
   25848             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25849             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25850             :       }
   25851             :     }
   25852             : #endif
   25853             :   }
   25854        9856 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25855        9856 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25856        9856 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   25857       10133 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   25858             :   return resultobj;
   25859         131 : fail:
   25860         131 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25861         131 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   25862             :   return NULL;
   25863             : }
   25864             : 
   25865             : 
   25866        2815 : SWIGINTERN PyObject *_wrap_Dataset_ReleaseResultSet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25867        2815 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25868        2815 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25869        2815 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   25870        2815 :   void *argp1 = 0 ;
   25871        2815 :   int res1 = 0 ;
   25872        2815 :   int res2 = 0 ;
   25873        2815 :   PyObject *swig_obj[2] ;
   25874             :   
   25875        2815 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_ReleaseResultSet", 2, 2, swig_obj)) SWIG_fail;
   25876        2815 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25877        2815 :   if (!SWIG_IsOK(res1)) {
   25878           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReleaseResultSet" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25879             :   }
   25880        2815 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25881        2815 :   res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRLayerShadow, SWIG_POINTER_DISOWN |  0 );
   25882        2815 :   if (!SWIG_IsOK(res2)) {
   25883           4 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_ReleaseResultSet" "', argument " "2"" of type '" "OGRLayerShadow *""'");
   25884             :   }
   25885        2813 :   {
   25886        2813 :     const int bLocalUseExceptions = GetUseExceptions();
   25887        2813 :     if ( bLocalUseExceptions ) {
   25888         780 :       pushErrorHandler();
   25889             :     }
   25890        2813 :     {
   25891        2813 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25892        2813 :       GDALDatasetShadow_ReleaseResultSet(arg1,arg2);
   25893        2813 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25894             :     }
   25895        2813 :     if ( bLocalUseExceptions ) {
   25896         780 :       popErrorHandler();
   25897             :     }
   25898             : #ifndef SED_HACKS
   25899             :     if ( bLocalUseExceptions ) {
   25900             :       CPLErr eclass = CPLGetLastErrorType();
   25901             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25902             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25903             :       }
   25904             :     }
   25905             : #endif
   25906             :   }
   25907        2813 :   resultobj = SWIG_Py_Void();
   25908        2815 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   25909             :   return resultobj;
   25910             : fail:
   25911             :   return NULL;
   25912             : }
   25913             : 
   25914             : 
   25915           6 : SWIGINTERN PyObject *_wrap_Dataset_GetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25916           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25917           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25918           6 :   void *argp1 = 0 ;
   25919           6 :   int res1 = 0 ;
   25920           6 :   PyObject *swig_obj[1] ;
   25921           6 :   OGRStyleTableShadow *result = 0 ;
   25922             :   
   25923           6 :   if (!args) SWIG_fail;
   25924           6 :   swig_obj[0] = args;
   25925           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25926           6 :   if (!SWIG_IsOK(res1)) {
   25927           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetStyleTable" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25928             :   }
   25929           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25930           6 :   {
   25931           6 :     const int bLocalUseExceptions = GetUseExceptions();
   25932           6 :     if ( bLocalUseExceptions ) {
   25933           5 :       pushErrorHandler();
   25934             :     }
   25935           6 :     {
   25936           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25937           6 :       result = (OGRStyleTableShadow *)GDALDatasetShadow_GetStyleTable(arg1);
   25938           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25939             :     }
   25940           6 :     if ( bLocalUseExceptions ) {
   25941           5 :       popErrorHandler();
   25942             :     }
   25943             : #ifndef SED_HACKS
   25944             :     if ( bLocalUseExceptions ) {
   25945             :       CPLErr eclass = CPLGetLastErrorType();
   25946             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25947             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25948             :       }
   25949             :     }
   25950             : #endif
   25951             :   }
   25952           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
   25953           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   25954             :   return resultobj;
   25955             : fail:
   25956             :   return NULL;
   25957             : }
   25958             : 
   25959             : 
   25960           7 : SWIGINTERN PyObject *_wrap_Dataset_SetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25961           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25962           7 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25963           7 :   OGRStyleTableShadow *arg2 = (OGRStyleTableShadow *) 0 ;
   25964           7 :   void *argp1 = 0 ;
   25965           7 :   int res1 = 0 ;
   25966           7 :   void *argp2 = 0 ;
   25967           7 :   int res2 = 0 ;
   25968           7 :   PyObject *swig_obj[2] ;
   25969             :   
   25970           7 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetStyleTable", 2, 2, swig_obj)) SWIG_fail;
   25971           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25972           7 :   if (!SWIG_IsOK(res1)) {
   25973           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetStyleTable" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25974             :   }
   25975           7 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25976           7 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
   25977           7 :   if (!SWIG_IsOK(res2)) {
   25978           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetStyleTable" "', argument " "2"" of type '" "OGRStyleTableShadow *""'"); 
   25979             :   }
   25980           7 :   arg2 = reinterpret_cast< OGRStyleTableShadow * >(argp2);
   25981           7 :   {
   25982           7 :     const int bLocalUseExceptions = GetUseExceptions();
   25983           7 :     if ( bLocalUseExceptions ) {
   25984           6 :       pushErrorHandler();
   25985             :     }
   25986           7 :     {
   25987           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25988           7 :       GDALDatasetShadow_SetStyleTable(arg1,arg2);
   25989           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25990             :     }
   25991           7 :     if ( bLocalUseExceptions ) {
   25992           6 :       popErrorHandler();
   25993             :     }
   25994             : #ifndef SED_HACKS
   25995             :     if ( bLocalUseExceptions ) {
   25996             :       CPLErr eclass = CPLGetLastErrorType();
   25997             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25998             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25999             :       }
   26000             :     }
   26001             : #endif
   26002             :   }
   26003           7 :   resultobj = SWIG_Py_Void();
   26004           7 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26005             :   return resultobj;
   26006             : fail:
   26007             :   return NULL;
   26008             : }
   26009             : 
   26010             : 
   26011        9109 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26012        9109 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26013        9109 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26014        9109 :   int arg2 = (int) 0 ;
   26015        9109 :   void *argp1 = 0 ;
   26016        9109 :   int res1 = 0 ;
   26017        9109 :   int val2 ;
   26018        9109 :   int ecode2 = 0 ;
   26019        9109 :   PyObject *swig_obj[2] ;
   26020        9109 :   OGRLayerShadow *result = 0 ;
   26021             :   
   26022        9109 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetLayerByIndex", 1, 2, swig_obj)) SWIG_fail;
   26023        9109 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26024        9109 :   if (!SWIG_IsOK(res1)) {
   26025          14 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerByIndex" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26026             :   }
   26027        9102 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26028        9102 :   if (swig_obj[1]) {
   26029        9102 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   26030        9102 :     if (!SWIG_IsOK(ecode2)) {
   26031           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetLayerByIndex" "', argument " "2"" of type '" "int""'");
   26032             :     } 
   26033             :     arg2 = static_cast< int >(val2);
   26034             :   }
   26035        9102 :   {
   26036        9102 :     const int bLocalUseExceptions = GetUseExceptions();
   26037        9102 :     if ( bLocalUseExceptions ) {
   26038        5098 :       pushErrorHandler();
   26039             :     }
   26040        9102 :     {
   26041        9102 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26042        9102 :       result = (OGRLayerShadow *)GDALDatasetShadow_GetLayerByIndex(arg1,arg2);
   26043        9102 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26044             :     }
   26045        9102 :     if ( bLocalUseExceptions ) {
   26046        5098 :       popErrorHandler();
   26047             :     }
   26048             : #ifndef SED_HACKS
   26049             :     if ( bLocalUseExceptions ) {
   26050             :       CPLErr eclass = CPLGetLastErrorType();
   26051             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26052             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26053             :       }
   26054             :     }
   26055             : #endif
   26056             :   }
   26057        9102 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   26058        9109 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26059             :   return resultobj;
   26060             : fail:
   26061             :   return NULL;
   26062             : }
   26063             : 
   26064             : 
   26065        2722 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26066        2722 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26067        2722 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26068        2722 :   char *arg2 = (char *) 0 ;
   26069        2722 :   void *argp1 = 0 ;
   26070        2722 :   int res1 = 0 ;
   26071        2722 :   int res2 ;
   26072        2722 :   char *buf2 = 0 ;
   26073        2722 :   int alloc2 = 0 ;
   26074        2722 :   PyObject *swig_obj[2] ;
   26075        2722 :   OGRLayerShadow *result = 0 ;
   26076             :   
   26077        2722 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetLayerByName", 2, 2, swig_obj)) SWIG_fail;
   26078        2722 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26079        2722 :   if (!SWIG_IsOK(res1)) {
   26080           2 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerByName" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26081             :   }
   26082        2721 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26083        2721 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26084        2721 :   if (!SWIG_IsOK(res2)) {
   26085           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetLayerByName" "', argument " "2"" of type '" "char const *""'");
   26086             :   }
   26087        2721 :   arg2 = reinterpret_cast< char * >(buf2);
   26088        2721 :   {
   26089        2721 :     const int bLocalUseExceptions = GetUseExceptions();
   26090        2721 :     if ( bLocalUseExceptions ) {
   26091         419 :       pushErrorHandler();
   26092             :     }
   26093        2721 :     {
   26094        2721 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26095        2721 :       result = (OGRLayerShadow *)GDALDatasetShadow_GetLayerByName(arg1,(char const *)arg2);
   26096        2721 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26097             :     }
   26098        2721 :     if ( bLocalUseExceptions ) {
   26099         419 :       popErrorHandler();
   26100             :     }
   26101             : #ifndef SED_HACKS
   26102             :     if ( bLocalUseExceptions ) {
   26103             :       CPLErr eclass = CPLGetLastErrorType();
   26104             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26105             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26106             :       }
   26107             :     }
   26108             : #endif
   26109             :   }
   26110        2721 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   26111        2721 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26112        2722 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26113             :   return resultobj;
   26114           1 : fail:
   26115           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26116             :   return NULL;
   26117             : }
   26118             : 
   26119             : 
   26120          14 : SWIGINTERN PyObject *_wrap_Dataset_ResetReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26121          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26122          14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26123          14 :   void *argp1 = 0 ;
   26124          14 :   int res1 = 0 ;
   26125          14 :   PyObject *swig_obj[1] ;
   26126             :   
   26127          14 :   if (!args) SWIG_fail;
   26128          14 :   swig_obj[0] = args;
   26129          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26130          14 :   if (!SWIG_IsOK(res1)) {
   26131           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ResetReading" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26132             :   }
   26133          14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26134          14 :   {
   26135          14 :     const int bLocalUseExceptions = GetUseExceptions();
   26136          14 :     if ( bLocalUseExceptions ) {
   26137           9 :       pushErrorHandler();
   26138             :     }
   26139          14 :     {
   26140          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26141          14 :       GDALDatasetShadow_ResetReading(arg1);
   26142          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26143             :     }
   26144          14 :     if ( bLocalUseExceptions ) {
   26145           9 :       popErrorHandler();
   26146             :     }
   26147             : #ifndef SED_HACKS
   26148             :     if ( bLocalUseExceptions ) {
   26149             :       CPLErr eclass = CPLGetLastErrorType();
   26150             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26151             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26152             :       }
   26153             :     }
   26154             : #endif
   26155             :   }
   26156          14 :   resultobj = SWIG_Py_Void();
   26157          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26158             :   return resultobj;
   26159             : fail:
   26160             :   return NULL;
   26161             : }
   26162             : 
   26163             : 
   26164        1424 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26165        1424 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26166        1424 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26167        1424 :   void *argp1 = 0 ;
   26168        1424 :   int res1 = 0 ;
   26169        1424 :   PyObject *swig_obj[1] ;
   26170        1424 :   int result;
   26171             :   
   26172        1424 :   if (!args) SWIG_fail;
   26173        1424 :   swig_obj[0] = args;
   26174        1424 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26175        1424 :   if (!SWIG_IsOK(res1)) {
   26176           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26177             :   }
   26178        1424 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26179        1424 :   {
   26180        1424 :     const int bLocalUseExceptions = GetUseExceptions();
   26181        1424 :     if ( bLocalUseExceptions ) {
   26182         452 :       pushErrorHandler();
   26183             :     }
   26184        1424 :     {
   26185        1424 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26186        1424 :       result = (int)GDALDatasetShadow_GetLayerCount(arg1);
   26187        1424 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26188             :     }
   26189        1424 :     if ( bLocalUseExceptions ) {
   26190         452 :       popErrorHandler();
   26191             :     }
   26192             : #ifndef SED_HACKS
   26193             :     if ( bLocalUseExceptions ) {
   26194             :       CPLErr eclass = CPLGetLastErrorType();
   26195             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26196             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26197             :       }
   26198             :     }
   26199             : #endif
   26200             :   }
   26201        1424 :   resultobj = SWIG_From_int(static_cast< int >(result));
   26202        1424 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26203             :   return resultobj;
   26204             : fail:
   26205             :   return NULL;
   26206             : }
   26207             : 
   26208             : 
   26209           6 : SWIGINTERN PyObject *_wrap_Dataset_AbortSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26210           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26211           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26212           6 :   void *argp1 = 0 ;
   26213           6 :   int res1 = 0 ;
   26214           6 :   PyObject *swig_obj[1] ;
   26215           6 :   OGRErr result;
   26216             :   
   26217           6 :   if (!args) SWIG_fail;
   26218           6 :   swig_obj[0] = args;
   26219           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26220           6 :   if (!SWIG_IsOK(res1)) {
   26221           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AbortSQL" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26222             :   }
   26223           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26224           6 :   {
   26225           6 :     const int bLocalUseExceptions = GetUseExceptions();
   26226           6 :     if ( bLocalUseExceptions ) {
   26227           6 :       pushErrorHandler();
   26228             :     }
   26229           6 :     {
   26230           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26231           6 :       result = (OGRErr)GDALDatasetShadow_AbortSQL(arg1);
   26232           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26233             :     }
   26234           6 :     if ( bLocalUseExceptions ) {
   26235           6 :       popErrorHandler();
   26236             :     }
   26237             : #ifndef SED_HACKS
   26238             :     if ( bLocalUseExceptions ) {
   26239             :       CPLErr eclass = CPLGetLastErrorType();
   26240             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26241             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26242             :       }
   26243             :     }
   26244             : #endif
   26245             :   }
   26246           6 :   {
   26247             :     /* %typemap(out) OGRErr */
   26248           6 :     if ( result != 0 && GetUseExceptions()) {
   26249           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26250           0 :       if( pszMessage[0] != '\0' )
   26251           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26252             :       else
   26253           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26254           0 :       SWIG_fail;
   26255             :     }
   26256             :   }
   26257           6 :   {
   26258             :     /* %typemap(ret) OGRErr */
   26259           6 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26260           6 :       resultobj = PyInt_FromLong( result );
   26261             :     }
   26262             :   }
   26263           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26264             :   return resultobj;
   26265             : fail:
   26266             :   return NULL;
   26267             : }
   26268             : 
   26269             : 
   26270         105 : SWIGINTERN PyObject *_wrap_Dataset_StartTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   26271         105 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26272         105 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26273         105 :   int arg2 = (int) FALSE ;
   26274         105 :   void *argp1 = 0 ;
   26275         105 :   int res1 = 0 ;
   26276         105 :   int val2 ;
   26277         105 :   int ecode2 = 0 ;
   26278         105 :   PyObject * obj0 = 0 ;
   26279         105 :   PyObject * obj1 = 0 ;
   26280         105 :   char * kwnames[] = {
   26281             :     (char *)"self",  (char *)"force",  NULL 
   26282             :   };
   26283         105 :   OGRErr result;
   26284             :   
   26285         105 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_StartTransaction", kwnames, &obj0, &obj1)) SWIG_fail;
   26286         105 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26287         105 :   if (!SWIG_IsOK(res1)) {
   26288           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_StartTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26289             :   }
   26290         105 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26291         105 :   if (obj1) {
   26292          17 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   26293          17 :     if (!SWIG_IsOK(ecode2)) {
   26294           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_StartTransaction" "', argument " "2"" of type '" "int""'");
   26295             :     } 
   26296             :     arg2 = static_cast< int >(val2);
   26297             :   }
   26298         105 :   {
   26299         105 :     const int bLocalUseExceptions = GetUseExceptions();
   26300         105 :     if ( bLocalUseExceptions ) {
   26301           0 :       pushErrorHandler();
   26302             :     }
   26303         105 :     {
   26304         105 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26305         105 :       result = (OGRErr)GDALDatasetShadow_StartTransaction(arg1,arg2);
   26306         105 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26307             :     }
   26308         105 :     if ( bLocalUseExceptions ) {
   26309           0 :       popErrorHandler();
   26310             :     }
   26311             : #ifndef SED_HACKS
   26312             :     if ( bLocalUseExceptions ) {
   26313             :       CPLErr eclass = CPLGetLastErrorType();
   26314             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26315             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26316             :       }
   26317             :     }
   26318             : #endif
   26319             :   }
   26320         105 :   {
   26321             :     /* %typemap(out) OGRErr */
   26322         119 :     if ( result != 0 && GetUseExceptions()) {
   26323           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26324           0 :       if( pszMessage[0] != '\0' )
   26325           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26326             :       else
   26327           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26328           0 :       SWIG_fail;
   26329             :     }
   26330             :   }
   26331         105 :   {
   26332             :     /* %typemap(ret) OGRErr */
   26333         105 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26334         105 :       resultobj = PyInt_FromLong( result );
   26335             :     }
   26336             :   }
   26337         105 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26338             :   return resultobj;
   26339             : fail:
   26340             :   return NULL;
   26341             : }
   26342             : 
   26343             : 
   26344          76 : SWIGINTERN PyObject *_wrap_Dataset_CommitTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26345          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26346          76 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26347          76 :   void *argp1 = 0 ;
   26348          76 :   int res1 = 0 ;
   26349          76 :   PyObject *swig_obj[1] ;
   26350          76 :   OGRErr result;
   26351             :   
   26352          76 :   if (!args) SWIG_fail;
   26353          76 :   swig_obj[0] = args;
   26354          76 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26355          76 :   if (!SWIG_IsOK(res1)) {
   26356           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CommitTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26357             :   }
   26358          76 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26359          76 :   {
   26360          76 :     const int bLocalUseExceptions = GetUseExceptions();
   26361          76 :     if ( bLocalUseExceptions ) {
   26362           0 :       pushErrorHandler();
   26363             :     }
   26364          76 :     {
   26365          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26366          76 :       result = (OGRErr)GDALDatasetShadow_CommitTransaction(arg1);
   26367          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26368             :     }
   26369          76 :     if ( bLocalUseExceptions ) {
   26370           0 :       popErrorHandler();
   26371             :     }
   26372             : #ifndef SED_HACKS
   26373             :     if ( bLocalUseExceptions ) {
   26374             :       CPLErr eclass = CPLGetLastErrorType();
   26375             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26376             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26377             :       }
   26378             :     }
   26379             : #endif
   26380             :   }
   26381          76 :   {
   26382             :     /* %typemap(out) OGRErr */
   26383          85 :     if ( result != 0 && GetUseExceptions()) {
   26384           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26385           0 :       if( pszMessage[0] != '\0' )
   26386           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26387             :       else
   26388           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26389           0 :       SWIG_fail;
   26390             :     }
   26391             :   }
   26392          76 :   {
   26393             :     /* %typemap(ret) OGRErr */
   26394          76 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26395          76 :       resultobj = PyInt_FromLong( result );
   26396             :     }
   26397             :   }
   26398          76 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26399             :   return resultobj;
   26400             : fail:
   26401             :   return NULL;
   26402             : }
   26403             : 
   26404             : 
   26405          44 : SWIGINTERN PyObject *_wrap_Dataset_RollbackTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26406          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26407          44 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26408          44 :   void *argp1 = 0 ;
   26409          44 :   int res1 = 0 ;
   26410          44 :   PyObject *swig_obj[1] ;
   26411          44 :   OGRErr result;
   26412             :   
   26413          44 :   if (!args) SWIG_fail;
   26414          44 :   swig_obj[0] = args;
   26415          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26416          44 :   if (!SWIG_IsOK(res1)) {
   26417           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RollbackTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26418             :   }
   26419          44 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26420          44 :   {
   26421          44 :     const int bLocalUseExceptions = GetUseExceptions();
   26422          44 :     if ( bLocalUseExceptions ) {
   26423           0 :       pushErrorHandler();
   26424             :     }
   26425          44 :     {
   26426          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26427          44 :       result = (OGRErr)GDALDatasetShadow_RollbackTransaction(arg1);
   26428          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26429             :     }
   26430          44 :     if ( bLocalUseExceptions ) {
   26431           0 :       popErrorHandler();
   26432             :     }
   26433             : #ifndef SED_HACKS
   26434             :     if ( bLocalUseExceptions ) {
   26435             :       CPLErr eclass = CPLGetLastErrorType();
   26436             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26437             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26438             :       }
   26439             :     }
   26440             : #endif
   26441             :   }
   26442          44 :   {
   26443             :     /* %typemap(out) OGRErr */
   26444          54 :     if ( result != 0 && GetUseExceptions()) {
   26445           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26446           0 :       if( pszMessage[0] != '\0' )
   26447           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26448             :       else
   26449           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26450           0 :       SWIG_fail;
   26451             :     }
   26452             :   }
   26453          44 :   {
   26454             :     /* %typemap(ret) OGRErr */
   26455          44 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26456          44 :       resultobj = PyInt_FromLong( result );
   26457             :     }
   26458             :   }
   26459          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26460             :   return resultobj;
   26461             : fail:
   26462             :   return NULL;
   26463             : }
   26464             : 
   26465             : 
   26466           2 : SWIGINTERN PyObject *_wrap_Dataset_ClearStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26467           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26468           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26469           2 :   void *argp1 = 0 ;
   26470           2 :   int res1 = 0 ;
   26471           2 :   PyObject *swig_obj[1] ;
   26472             :   
   26473           2 :   if (!args) SWIG_fail;
   26474           2 :   swig_obj[0] = args;
   26475           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26476           2 :   if (!SWIG_IsOK(res1)) {
   26477           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ClearStatistics" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26478             :   }
   26479           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26480           2 :   {
   26481           2 :     const int bLocalUseExceptions = GetUseExceptions();
   26482           2 :     if ( bLocalUseExceptions ) {
   26483           1 :       pushErrorHandler();
   26484             :     }
   26485           2 :     {
   26486           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26487           2 :       GDALDatasetShadow_ClearStatistics(arg1);
   26488           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26489             :     }
   26490           2 :     if ( bLocalUseExceptions ) {
   26491           1 :       popErrorHandler();
   26492             :     }
   26493             : #ifndef SED_HACKS
   26494             :     if ( bLocalUseExceptions ) {
   26495             :       CPLErr eclass = CPLGetLastErrorType();
   26496             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26497             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26498             :       }
   26499             :     }
   26500             : #endif
   26501             :   }
   26502           2 :   resultobj = SWIG_Py_Void();
   26503           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26504             :   return resultobj;
   26505             : fail:
   26506             :   return NULL;
   26507             : }
   26508             : 
   26509             : 
   26510          32 : SWIGINTERN PyObject *_wrap_Dataset_GetFieldDomainNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26511          32 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26512          32 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26513          32 :   char **arg2 = (char **) 0 ;
   26514          32 :   void *argp1 = 0 ;
   26515          32 :   int res1 = 0 ;
   26516          32 :   PyObject *swig_obj[2] ;
   26517          32 :   char **result = 0 ;
   26518             :   
   26519          32 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetFieldDomainNames", 1, 2, swig_obj)) SWIG_fail;
   26520          32 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26521          32 :   if (!SWIG_IsOK(res1)) {
   26522           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFieldDomainNames" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26523             :   }
   26524          32 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26525          32 :   if (swig_obj[1]) {
   26526           0 :     {
   26527             :       /* %typemap(in) char **dict */
   26528           0 :       arg2 = NULL;
   26529           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   26530           0 :         int bErr = FALSE;
   26531           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   26532           0 :         if ( bErr )
   26533             :         {
   26534           0 :           SWIG_fail;
   26535             :         }
   26536             :       }
   26537           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   26538           0 :         int bErr = FALSE;
   26539           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   26540           0 :         if ( bErr )
   26541             :         {
   26542           0 :           SWIG_fail;
   26543             :         }
   26544             :       }
   26545             :       else {
   26546           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   26547           0 :         SWIG_fail;
   26548             :       }
   26549             :     }
   26550             :   }
   26551          32 :   {
   26552          32 :     const int bLocalUseExceptions = GetUseExceptions();
   26553          32 :     if ( bLocalUseExceptions ) {
   26554          24 :       pushErrorHandler();
   26555             :     }
   26556          32 :     {
   26557          32 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26558          32 :       result = (char **)GDALDatasetShadow_GetFieldDomainNames(arg1,arg2);
   26559          32 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26560             :     }
   26561          32 :     if ( bLocalUseExceptions ) {
   26562          24 :       popErrorHandler();
   26563             :     }
   26564             : #ifndef SED_HACKS
   26565             :     if ( bLocalUseExceptions ) {
   26566             :       CPLErr eclass = CPLGetLastErrorType();
   26567             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26568             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26569             :       }
   26570             :     }
   26571             : #endif
   26572             :   }
   26573          32 :   {
   26574             :     /* %typemap(out) char **CSL -> ( string ) */
   26575          32 :     bool bErr = false;
   26576          32 :     resultobj = CSLToList(result, &bErr);
   26577          32 :     CSLDestroy(result);
   26578          32 :     if( bErr ) {
   26579           0 :       SWIG_fail;
   26580             :     }
   26581             :   }
   26582          32 :   {
   26583             :     /* %typemap(freearg) char **dict */
   26584          32 :     CSLDestroy( arg2 );
   26585             :   }
   26586          32 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26587             :   return resultobj;
   26588           0 : fail:
   26589           0 :   {
   26590             :     /* %typemap(freearg) char **dict */
   26591           0 :     CSLDestroy( arg2 );
   26592             :   }
   26593             :   return NULL;
   26594             : }
   26595             : 
   26596             : 
   26597         113 : SWIGINTERN PyObject *_wrap_Dataset_GetFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26598         113 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26599         113 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26600         113 :   char *arg2 = (char *) 0 ;
   26601         113 :   void *argp1 = 0 ;
   26602         113 :   int res1 = 0 ;
   26603         113 :   int res2 ;
   26604         113 :   char *buf2 = 0 ;
   26605         113 :   int alloc2 = 0 ;
   26606         113 :   PyObject *swig_obj[2] ;
   26607         113 :   OGRFieldDomainShadow *result = 0 ;
   26608             :   
   26609         113 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   26610         113 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26611         113 :   if (!SWIG_IsOK(res1)) {
   26612           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26613             :   }
   26614         113 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26615         113 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26616         113 :   if (!SWIG_IsOK(res2)) {
   26617           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetFieldDomain" "', argument " "2"" of type '" "char const *""'");
   26618             :   }
   26619         113 :   arg2 = reinterpret_cast< char * >(buf2);
   26620         113 :   {
   26621         113 :     if (!arg2) {
   26622           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   26623             :     }
   26624             :   }
   26625         112 :   {
   26626         112 :     const int bLocalUseExceptions = GetUseExceptions();
   26627         112 :     if ( bLocalUseExceptions ) {
   26628          79 :       pushErrorHandler();
   26629             :     }
   26630         112 :     {
   26631         112 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26632         112 :       result = (OGRFieldDomainShadow *)GDALDatasetShadow_GetFieldDomain(arg1,(char const *)arg2);
   26633         112 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26634             :     }
   26635         112 :     if ( bLocalUseExceptions ) {
   26636          79 :       popErrorHandler();
   26637             :     }
   26638             : #ifndef SED_HACKS
   26639             :     if ( bLocalUseExceptions ) {
   26640             :       CPLErr eclass = CPLGetLastErrorType();
   26641             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26642             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26643             :       }
   26644             :     }
   26645             : #endif
   26646             :   }
   26647         112 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   26648         112 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26649         113 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26650             :   return resultobj;
   26651           1 : fail:
   26652           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26653             :   return NULL;
   26654             : }
   26655             : 
   26656             : 
   26657          35 : SWIGINTERN PyObject *_wrap_Dataset_AddFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26658          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26659          35 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26660          35 :   OGRFieldDomainShadow *arg2 = (OGRFieldDomainShadow *) 0 ;
   26661          35 :   void *argp1 = 0 ;
   26662          35 :   int res1 = 0 ;
   26663          35 :   void *argp2 = 0 ;
   26664          35 :   int res2 = 0 ;
   26665          35 :   PyObject *swig_obj[2] ;
   26666          35 :   bool result;
   26667             :   
   26668          35 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AddFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   26669          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26670          35 :   if (!SWIG_IsOK(res1)) {
   26671           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26672             :   }
   26673          35 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26674          35 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   26675          35 :   if (!SWIG_IsOK(res2)) {
   26676           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_AddFieldDomain" "', argument " "2"" of type '" "OGRFieldDomainShadow *""'"); 
   26677             :   }
   26678          35 :   arg2 = reinterpret_cast< OGRFieldDomainShadow * >(argp2);
   26679          35 :   {
   26680          35 :     if (!arg2) {
   26681           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   26682             :     }
   26683             :   }
   26684          34 :   {
   26685          34 :     const int bLocalUseExceptions = GetUseExceptions();
   26686          34 :     if ( bLocalUseExceptions ) {
   26687          14 :       pushErrorHandler();
   26688             :     }
   26689          34 :     {
   26690          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26691          34 :       result = (bool)GDALDatasetShadow_AddFieldDomain(arg1,arg2);
   26692          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26693             :     }
   26694          34 :     if ( bLocalUseExceptions ) {
   26695          14 :       popErrorHandler();
   26696             :     }
   26697             : #ifndef SED_HACKS
   26698             :     if ( bLocalUseExceptions ) {
   26699             :       CPLErr eclass = CPLGetLastErrorType();
   26700             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26701             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26702             :       }
   26703             :     }
   26704             : #endif
   26705             :   }
   26706          34 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   26707          35 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26708             :   return resultobj;
   26709             : fail:
   26710             :   return NULL;
   26711             : }
   26712             : 
   26713             : 
   26714           8 : SWIGINTERN PyObject *_wrap_Dataset_DeleteFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26715           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26716           8 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26717           8 :   char *arg2 = (char *) 0 ;
   26718           8 :   void *argp1 = 0 ;
   26719           8 :   int res1 = 0 ;
   26720           8 :   int res2 ;
   26721           8 :   char *buf2 = 0 ;
   26722           8 :   int alloc2 = 0 ;
   26723           8 :   PyObject *swig_obj[2] ;
   26724           8 :   bool result;
   26725             :   
   26726           8 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   26727           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26728           8 :   if (!SWIG_IsOK(res1)) {
   26729           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26730             :   }
   26731           8 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26732           8 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26733           8 :   if (!SWIG_IsOK(res2)) {
   26734           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_DeleteFieldDomain" "', argument " "2"" of type '" "char const *""'");
   26735             :   }
   26736           8 :   arg2 = reinterpret_cast< char * >(buf2);
   26737           8 :   {
   26738           8 :     if (!arg2) {
   26739           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   26740             :     }
   26741             :   }
   26742           8 :   {
   26743           8 :     const int bLocalUseExceptions = GetUseExceptions();
   26744           8 :     if ( bLocalUseExceptions ) {
   26745           8 :       pushErrorHandler();
   26746             :     }
   26747           8 :     {
   26748           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26749           8 :       result = (bool)GDALDatasetShadow_DeleteFieldDomain(arg1,(char const *)arg2);
   26750           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26751             :     }
   26752           8 :     if ( bLocalUseExceptions ) {
   26753           8 :       popErrorHandler();
   26754             :     }
   26755             : #ifndef SED_HACKS
   26756             :     if ( bLocalUseExceptions ) {
   26757             :       CPLErr eclass = CPLGetLastErrorType();
   26758             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26759             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26760             :       }
   26761             :     }
   26762             : #endif
   26763             :   }
   26764           8 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   26765           8 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26766           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26767             :   return resultobj;
   26768           0 : fail:
   26769           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26770             :   return NULL;
   26771             : }
   26772             : 
   26773             : 
   26774           4 : SWIGINTERN PyObject *_wrap_Dataset_UpdateFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26775           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26776           4 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26777           4 :   OGRFieldDomainShadow *arg2 = (OGRFieldDomainShadow *) 0 ;
   26778           4 :   void *argp1 = 0 ;
   26779           4 :   int res1 = 0 ;
   26780           4 :   void *argp2 = 0 ;
   26781           4 :   int res2 = 0 ;
   26782           4 :   PyObject *swig_obj[2] ;
   26783           4 :   bool result;
   26784             :   
   26785           4 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_UpdateFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   26786           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26787           4 :   if (!SWIG_IsOK(res1)) {
   26788           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_UpdateFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26789             :   }
   26790           4 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26791           4 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   26792           4 :   if (!SWIG_IsOK(res2)) {
   26793           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_UpdateFieldDomain" "', argument " "2"" of type '" "OGRFieldDomainShadow *""'"); 
   26794             :   }
   26795           4 :   arg2 = reinterpret_cast< OGRFieldDomainShadow * >(argp2);
   26796           4 :   {
   26797           4 :     if (!arg2) {
   26798           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   26799             :     }
   26800             :   }
   26801           4 :   {
   26802           4 :     const int bLocalUseExceptions = GetUseExceptions();
   26803           4 :     if ( bLocalUseExceptions ) {
   26804           4 :       pushErrorHandler();
   26805             :     }
   26806           4 :     {
   26807           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26808           4 :       result = (bool)GDALDatasetShadow_UpdateFieldDomain(arg1,arg2);
   26809           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26810             :     }
   26811           4 :     if ( bLocalUseExceptions ) {
   26812           4 :       popErrorHandler();
   26813             :     }
   26814             : #ifndef SED_HACKS
   26815             :     if ( bLocalUseExceptions ) {
   26816             :       CPLErr eclass = CPLGetLastErrorType();
   26817             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26818             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26819             :       }
   26820             :     }
   26821             : #endif
   26822             :   }
   26823           4 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   26824           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26825             :   return resultobj;
   26826             : fail:
   26827             :   return NULL;
   26828             : }
   26829             : 
   26830             : 
   26831          46 : SWIGINTERN PyObject *_wrap_Dataset_GetRelationshipNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26832          46 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26833          46 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26834          46 :   char **arg2 = (char **) 0 ;
   26835          46 :   void *argp1 = 0 ;
   26836          46 :   int res1 = 0 ;
   26837          46 :   PyObject *swig_obj[2] ;
   26838          46 :   char **result = 0 ;
   26839             :   
   26840          46 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRelationshipNames", 1, 2, swig_obj)) SWIG_fail;
   26841          46 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26842          46 :   if (!SWIG_IsOK(res1)) {
   26843           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRelationshipNames" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26844             :   }
   26845          46 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26846          46 :   if (swig_obj[1]) {
   26847           0 :     {
   26848             :       /* %typemap(in) char **dict */
   26849           0 :       arg2 = NULL;
   26850           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   26851           0 :         int bErr = FALSE;
   26852           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   26853           0 :         if ( bErr )
   26854             :         {
   26855           0 :           SWIG_fail;
   26856             :         }
   26857             :       }
   26858           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   26859           0 :         int bErr = FALSE;
   26860           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   26861           0 :         if ( bErr )
   26862             :         {
   26863           0 :           SWIG_fail;
   26864             :         }
   26865             :       }
   26866             :       else {
   26867           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   26868           0 :         SWIG_fail;
   26869             :       }
   26870             :     }
   26871             :   }
   26872          46 :   {
   26873          46 :     const int bLocalUseExceptions = GetUseExceptions();
   26874          46 :     if ( bLocalUseExceptions ) {
   26875           7 :       pushErrorHandler();
   26876             :     }
   26877          46 :     {
   26878          46 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26879          46 :       result = (char **)GDALDatasetShadow_GetRelationshipNames(arg1,arg2);
   26880          46 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26881             :     }
   26882          46 :     if ( bLocalUseExceptions ) {
   26883           7 :       popErrorHandler();
   26884             :     }
   26885             : #ifndef SED_HACKS
   26886             :     if ( bLocalUseExceptions ) {
   26887             :       CPLErr eclass = CPLGetLastErrorType();
   26888             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26889             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26890             :       }
   26891             :     }
   26892             : #endif
   26893             :   }
   26894          46 :   {
   26895             :     /* %typemap(out) char **CSL -> ( string ) */
   26896          46 :     bool bErr = false;
   26897          46 :     resultobj = CSLToList(result, &bErr);
   26898          46 :     CSLDestroy(result);
   26899          46 :     if( bErr ) {
   26900           0 :       SWIG_fail;
   26901             :     }
   26902             :   }
   26903          46 :   {
   26904             :     /* %typemap(freearg) char **dict */
   26905          46 :     CSLDestroy( arg2 );
   26906             :   }
   26907          46 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26908             :   return resultobj;
   26909           0 : fail:
   26910           0 :   {
   26911             :     /* %typemap(freearg) char **dict */
   26912           0 :     CSLDestroy( arg2 );
   26913             :   }
   26914             :   return NULL;
   26915             : }
   26916             : 
   26917             : 
   26918          52 : SWIGINTERN PyObject *_wrap_Dataset_GetRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26919          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26920          52 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26921          52 :   char *arg2 = (char *) 0 ;
   26922          52 :   void *argp1 = 0 ;
   26923          52 :   int res1 = 0 ;
   26924          52 :   int res2 ;
   26925          52 :   char *buf2 = 0 ;
   26926          52 :   int alloc2 = 0 ;
   26927          52 :   PyObject *swig_obj[2] ;
   26928          52 :   GDALRelationshipShadow *result = 0 ;
   26929             :   
   26930          52 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRelationship", 2, 2, swig_obj)) SWIG_fail;
   26931          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26932          52 :   if (!SWIG_IsOK(res1)) {
   26933           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26934             :   }
   26935          52 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26936          52 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26937          52 :   if (!SWIG_IsOK(res2)) {
   26938           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetRelationship" "', argument " "2"" of type '" "char const *""'");
   26939             :   }
   26940          52 :   arg2 = reinterpret_cast< char * >(buf2);
   26941          52 :   {
   26942          52 :     if (!arg2) {
   26943           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   26944             :     }
   26945             :   }
   26946          52 :   {
   26947          52 :     const int bLocalUseExceptions = GetUseExceptions();
   26948          52 :     if ( bLocalUseExceptions ) {
   26949          10 :       pushErrorHandler();
   26950             :     }
   26951          52 :     {
   26952          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26953          52 :       result = (GDALRelationshipShadow *)GDALDatasetShadow_GetRelationship(arg1,(char const *)arg2);
   26954          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26955             :     }
   26956          52 :     if ( bLocalUseExceptions ) {
   26957          10 :       popErrorHandler();
   26958             :     }
   26959             : #ifndef SED_HACKS
   26960             :     if ( bLocalUseExceptions ) {
   26961             :       CPLErr eclass = CPLGetLastErrorType();
   26962             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26963             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26964             :       }
   26965             :     }
   26966             : #endif
   26967             :   }
   26968          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   26969          52 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26970          52 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26971             :   return resultobj;
   26972           0 : fail:
   26973           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26974             :   return NULL;
   26975             : }
   26976             : 
   26977             : 
   26978          42 : SWIGINTERN PyObject *_wrap_Dataset_AddRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26979          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26980          42 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26981          42 :   GDALRelationshipShadow *arg2 = (GDALRelationshipShadow *) 0 ;
   26982          42 :   void *argp1 = 0 ;
   26983          42 :   int res1 = 0 ;
   26984          42 :   void *argp2 = 0 ;
   26985          42 :   int res2 = 0 ;
   26986          42 :   PyObject *swig_obj[2] ;
   26987          42 :   bool result;
   26988             :   
   26989          42 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AddRelationship", 2, 2, swig_obj)) SWIG_fail;
   26990          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26991          42 :   if (!SWIG_IsOK(res1)) {
   26992           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26993             :   }
   26994          42 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26995          42 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   26996          42 :   if (!SWIG_IsOK(res2)) {
   26997           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_AddRelationship" "', argument " "2"" of type '" "GDALRelationshipShadow *""'"); 
   26998             :   }
   26999          42 :   arg2 = reinterpret_cast< GDALRelationshipShadow * >(argp2);
   27000          42 :   {
   27001          42 :     if (!arg2) {
   27002           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27003             :     }
   27004             :   }
   27005          42 :   {
   27006          42 :     const int bLocalUseExceptions = GetUseExceptions();
   27007          42 :     if ( bLocalUseExceptions ) {
   27008           0 :       pushErrorHandler();
   27009             :     }
   27010          42 :     {
   27011          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27012          42 :       result = (bool)GDALDatasetShadow_AddRelationship(arg1,arg2);
   27013          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27014             :     }
   27015          42 :     if ( bLocalUseExceptions ) {
   27016           0 :       popErrorHandler();
   27017             :     }
   27018             : #ifndef SED_HACKS
   27019             :     if ( bLocalUseExceptions ) {
   27020             :       CPLErr eclass = CPLGetLastErrorType();
   27021             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27022             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27023             :       }
   27024             :     }
   27025             : #endif
   27026             :   }
   27027          42 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27028          42 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27029             :   return resultobj;
   27030             : fail:
   27031             :   return NULL;
   27032             : }
   27033             : 
   27034             : 
   27035           6 : SWIGINTERN PyObject *_wrap_Dataset_DeleteRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27036           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27037           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27038           6 :   char *arg2 = (char *) 0 ;
   27039           6 :   void *argp1 = 0 ;
   27040           6 :   int res1 = 0 ;
   27041           6 :   int res2 ;
   27042           6 :   char *buf2 = 0 ;
   27043           6 :   int alloc2 = 0 ;
   27044           6 :   PyObject *swig_obj[2] ;
   27045           6 :   bool result;
   27046             :   
   27047           6 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteRelationship", 2, 2, swig_obj)) SWIG_fail;
   27048           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27049           6 :   if (!SWIG_IsOK(res1)) {
   27050           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27051             :   }
   27052           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27053           6 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27054           6 :   if (!SWIG_IsOK(res2)) {
   27055           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_DeleteRelationship" "', argument " "2"" of type '" "char const *""'");
   27056             :   }
   27057           6 :   arg2 = reinterpret_cast< char * >(buf2);
   27058           6 :   {
   27059           6 :     if (!arg2) {
   27060           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27061             :     }
   27062             :   }
   27063           6 :   {
   27064           6 :     const int bLocalUseExceptions = GetUseExceptions();
   27065           6 :     if ( bLocalUseExceptions ) {
   27066           0 :       pushErrorHandler();
   27067             :     }
   27068           6 :     {
   27069           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27070           6 :       result = (bool)GDALDatasetShadow_DeleteRelationship(arg1,(char const *)arg2);
   27071           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27072             :     }
   27073           6 :     if ( bLocalUseExceptions ) {
   27074           0 :       popErrorHandler();
   27075             :     }
   27076             : #ifndef SED_HACKS
   27077             :     if ( bLocalUseExceptions ) {
   27078             :       CPLErr eclass = CPLGetLastErrorType();
   27079             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27080             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27081             :       }
   27082             :     }
   27083             : #endif
   27084             :   }
   27085           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27086           6 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27087           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27088             :   return resultobj;
   27089           0 : fail:
   27090           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27091             :   return NULL;
   27092             : }
   27093             : 
   27094             : 
   27095           9 : SWIGINTERN PyObject *_wrap_Dataset_UpdateRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27096           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27097           9 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27098           9 :   GDALRelationshipShadow *arg2 = (GDALRelationshipShadow *) 0 ;
   27099           9 :   void *argp1 = 0 ;
   27100           9 :   int res1 = 0 ;
   27101           9 :   void *argp2 = 0 ;
   27102           9 :   int res2 = 0 ;
   27103           9 :   PyObject *swig_obj[2] ;
   27104           9 :   bool result;
   27105             :   
   27106           9 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_UpdateRelationship", 2, 2, swig_obj)) SWIG_fail;
   27107           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27108           9 :   if (!SWIG_IsOK(res1)) {
   27109           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_UpdateRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27110             :   }
   27111           9 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27112           9 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   27113           9 :   if (!SWIG_IsOK(res2)) {
   27114           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_UpdateRelationship" "', argument " "2"" of type '" "GDALRelationshipShadow *""'"); 
   27115             :   }
   27116           9 :   arg2 = reinterpret_cast< GDALRelationshipShadow * >(argp2);
   27117           9 :   {
   27118           9 :     if (!arg2) {
   27119           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27120             :     }
   27121             :   }
   27122           9 :   {
   27123           9 :     const int bLocalUseExceptions = GetUseExceptions();
   27124           9 :     if ( bLocalUseExceptions ) {
   27125           0 :       pushErrorHandler();
   27126             :     }
   27127           9 :     {
   27128           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27129           9 :       result = (bool)GDALDatasetShadow_UpdateRelationship(arg1,arg2);
   27130           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27131             :     }
   27132           9 :     if ( bLocalUseExceptions ) {
   27133           0 :       popErrorHandler();
   27134             :     }
   27135             : #ifndef SED_HACKS
   27136             :     if ( bLocalUseExceptions ) {
   27137             :       CPLErr eclass = CPLGetLastErrorType();
   27138             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27139             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27140             :       }
   27141             :     }
   27142             : #endif
   27143             :   }
   27144           9 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27145           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27146             :   return resultobj;
   27147             : fail:
   27148             :   return NULL;
   27149             : }
   27150             : 
   27151             : 
   27152      176462 : SWIGINTERN PyObject *_wrap_Dataset_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   27153      176462 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27154      176462 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27155      176462 :   double arg2 ;
   27156      176462 :   double arg3 ;
   27157      176462 :   double arg4 ;
   27158      176462 :   double arg5 ;
   27159      176462 :   void **arg6 = (void **) 0 ;
   27160      176462 :   int *arg7 = (int *) 0 ;
   27161      176462 :   int *arg8 = (int *) 0 ;
   27162      176462 :   GDALDataType *arg9 = (GDALDataType *) 0 ;
   27163      176462 :   int arg10 = (int) 0 ;
   27164      176462 :   int *arg11 = (int *) 0 ;
   27165      176462 :   GIntBig *arg12 = (GIntBig *) 0 ;
   27166      176462 :   GIntBig *arg13 = (GIntBig *) 0 ;
   27167      176462 :   GIntBig *arg14 = (GIntBig *) 0 ;
   27168      176462 :   GDALRIOResampleAlg arg15 = (GDALRIOResampleAlg) GRIORA_NearestNeighbour ;
   27169      176462 :   GDALProgressFunc arg16 = (GDALProgressFunc) NULL ;
   27170      176462 :   void *arg17 = (void *) NULL ;
   27171      176462 :   void *arg18 = (void *) NULL ;
   27172      176462 :   void *argp1 = 0 ;
   27173      176462 :   int res1 = 0 ;
   27174      176462 :   double val2 ;
   27175      176462 :   int ecode2 = 0 ;
   27176      176462 :   double val3 ;
   27177      176462 :   int ecode3 = 0 ;
   27178      176462 :   double val4 ;
   27179      176462 :   int ecode4 = 0 ;
   27180      176462 :   double val5 ;
   27181      176462 :   int ecode5 = 0 ;
   27182      176462 :   void *pyObject6 = NULL ;
   27183      176462 :   int val7 ;
   27184      176462 :   int val8 ;
   27185      176462 :   GDALDataType val9 ;
   27186      176462 :   GIntBig val12 ;
   27187      176462 :   GIntBig val13 ;
   27188      176462 :   GIntBig val14 ;
   27189      176462 :   PyObject * obj0 = 0 ;
   27190      176462 :   PyObject * obj1 = 0 ;
   27191      176462 :   PyObject * obj2 = 0 ;
   27192      176462 :   PyObject * obj3 = 0 ;
   27193      176462 :   PyObject * obj4 = 0 ;
   27194      176462 :   PyObject * obj5 = 0 ;
   27195      176462 :   PyObject * obj6 = 0 ;
   27196      176462 :   PyObject * obj7 = 0 ;
   27197      176462 :   PyObject * obj8 = 0 ;
   27198      176462 :   PyObject * obj9 = 0 ;
   27199      176462 :   PyObject * obj10 = 0 ;
   27200      176462 :   PyObject * obj11 = 0 ;
   27201      176462 :   PyObject * obj12 = 0 ;
   27202      176462 :   PyObject * obj13 = 0 ;
   27203      176462 :   PyObject * obj14 = 0 ;
   27204      176462 :   PyObject * obj15 = 0 ;
   27205      176462 :   char * kwnames[] = {
   27206             :     (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 
   27207             :   };
   27208      176462 :   CPLErr result;
   27209             :   
   27210             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   27211      176462 :   PyProgressData *psProgressInfo;
   27212      176462 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   27213      176462 :   psProgressInfo->nLastReported = -1;
   27214      176462 :   psProgressInfo->psPyCallback = NULL;
   27215      176462 :   psProgressInfo->psPyCallbackData = NULL;
   27216      176462 :   arg17 = psProgressInfo;
   27217      176462 :   {
   27218             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   27219      176462 :     arg6 = &pyObject6;
   27220             :   }
   27221      176462 :   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;
   27222      176462 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27223      176462 :   if (!SWIG_IsOK(res1)) {
   27224           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReadRaster1" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27225             :   }
   27226      176462 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27227      176462 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   27228      176462 :   if (!SWIG_IsOK(ecode2)) {
   27229           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_ReadRaster1" "', argument " "2"" of type '" "double""'");
   27230             :   } 
   27231      176462 :   arg2 = static_cast< double >(val2);
   27232      176462 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   27233      176462 :   if (!SWIG_IsOK(ecode3)) {
   27234           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_ReadRaster1" "', argument " "3"" of type '" "double""'");
   27235             :   } 
   27236      176462 :   arg3 = static_cast< double >(val3);
   27237      176462 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   27238      176462 :   if (!SWIG_IsOK(ecode4)) {
   27239           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_ReadRaster1" "', argument " "4"" of type '" "double""'");
   27240             :   } 
   27241      176462 :   arg4 = static_cast< double >(val4);
   27242      176462 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   27243      176462 :   if (!SWIG_IsOK(ecode5)) {
   27244           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_ReadRaster1" "', argument " "5"" of type '" "double""'");
   27245             :   } 
   27246      176462 :   arg5 = static_cast< double >(val5);
   27247      176462 :   if (obj5) {
   27248      176462 :     {
   27249             :       /* %typemap(in) (int *optional_##int) */
   27250      176462 :       if ( obj5 == Py_None ) {
   27251             :         arg7 = 0;
   27252             :       }
   27253      176462 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   27254             :         arg7 = (int *) &val7;
   27255             :       }
   27256             :       else {
   27257           2 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27258           2 :         SWIG_fail;
   27259             :       }
   27260             :     }
   27261             :   }
   27262      176460 :   if (obj6) {
   27263      176460 :     {
   27264             :       /* %typemap(in) (int *optional_##int) */
   27265      176460 :       if ( obj6 == Py_None ) {
   27266             :         arg8 = 0;
   27267             :       }
   27268      176460 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   27269             :         arg8 = (int *) &val8;
   27270             :       }
   27271             :       else {
   27272           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27273           0 :         SWIG_fail;
   27274             :       }
   27275             :     }
   27276             :   }
   27277      176460 :   if (obj7) {
   27278      176460 :     {
   27279             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   27280      176460 :       int intval = 0;
   27281      176460 :       if ( obj7 == Py_None ) {
   27282             :         arg9 = NULL;
   27283             :       }
   27284      352920 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj7, &intval)) ) {
   27285      176460 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   27286             :         {
   27287           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   27288             :         }
   27289      176460 :         val9 = static_cast<GDALDataType>(intval);
   27290      176460 :         arg9 = &val9;
   27291             :       }
   27292             :       else {
   27293           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27294           0 :         SWIG_fail;
   27295             :       }
   27296             :     }
   27297             :   }
   27298      176460 :   if (obj8) {
   27299      176460 :     {
   27300             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   27301      176460 :       arg11 = CreateCIntListFromSequence(obj8, &arg10);
   27302      176460 :       if( arg10 < 0 ) {
   27303           0 :         SWIG_fail;
   27304             :       }
   27305             :     }
   27306             :   }
   27307      176460 :   if (obj9) {
   27308      176460 :     {
   27309             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   27310      176460 :       if ( obj9 == Py_None ) {
   27311             :         arg12 = 0;
   27312             :       }
   27313        1081 :       else if ( PyArg_Parse( obj9,"L" ,&val12 ) ) {
   27314             :         arg12 = (GIntBig *) &val12;
   27315             :       }
   27316             :       else {
   27317           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27318           0 :         SWIG_fail;
   27319             :       }
   27320             :     }
   27321             :   }
   27322      176460 :   if (obj10) {
   27323      176460 :     {
   27324             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   27325      176460 :       if ( obj10 == Py_None ) {
   27326             :         arg13 = 0;
   27327             :       }
   27328          27 :       else if ( PyArg_Parse( obj10,"L" ,&val13 ) ) {
   27329             :         arg13 = (GIntBig *) &val13;
   27330             :       }
   27331             :       else {
   27332           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27333           0 :         SWIG_fail;
   27334             :       }
   27335             :     }
   27336             :   }
   27337      176460 :   if (obj11) {
   27338      176460 :     {
   27339             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   27340      176460 :       if ( obj11 == Py_None ) {
   27341             :         arg14 = 0;
   27342             :       }
   27343        1077 :       else if ( PyArg_Parse( obj11,"L" ,&val14 ) ) {
   27344             :         arg14 = (GIntBig *) &val14;
   27345             :       }
   27346             :       else {
   27347           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27348           0 :         SWIG_fail;
   27349             :       }
   27350             :     }
   27351             :   }
   27352      176460 :   if (obj12) {
   27353      176460 :     {
   27354             :       // %typemap(in) GDALRIOResampleAlg
   27355      176460 :       int val = 0;
   27356      176460 :       int ecode = SWIG_AsVal_int(obj12, &val);
   27357      176460 :       if (!SWIG_IsOK(ecode)) {
   27358           1 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   27359             :       }
   27360      176459 :       if( val < 0 ||
   27361      176458 :         ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   27362      176457 :           val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   27363             :         val > static_cast<int>(GRIORA_LAST) )
   27364             :       {
   27365           2 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   27366             :       }
   27367             :       arg15 = static_cast< GDALRIOResampleAlg >(val);
   27368             :     }
   27369             :   }
   27370      176457 :   if (obj13) {
   27371      176457 :     {
   27372             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   27373             :       /* callback_func typemap */
   27374             :       
   27375             :       /* In some cases 0 is passed instead of None. */
   27376             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   27377      176457 :       if ( PyLong_Check(obj13) || PyInt_Check(obj13) )
   27378             :       {
   27379           0 :         if( PyLong_AsLong(obj13) == 0 )
   27380             :         {
   27381           0 :           obj13 = Py_None;
   27382             :         }
   27383             :       }
   27384             :       
   27385      176457 :       if (obj13 && obj13 != Py_None ) {
   27386          19 :         void* cbfunction = NULL;
   27387          19 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj13,
   27388             :             (void**)&cbfunction,
   27389             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   27390             :             SWIG_POINTER_EXCEPTION | 0 ));
   27391             :         
   27392          19 :         if ( cbfunction == GDALTermProgress ) {
   27393             :           arg16 = GDALTermProgress;
   27394             :         } else {
   27395          19 :           if (!PyCallable_Check(obj13)) {
   27396           0 :             PyErr_SetString( PyExc_RuntimeError,
   27397             :               "Object given is not a Python function" );
   27398           0 :             SWIG_fail;
   27399             :           }
   27400          19 :           psProgressInfo->psPyCallback = obj13;
   27401          19 :           arg16 = PyProgressProxy;
   27402             :         }
   27403             :         
   27404             :       }
   27405             :       
   27406             :     }
   27407             :   }
   27408      176457 :   if (obj14) {
   27409      176457 :     {
   27410             :       /* %typemap(in) ( void* callback_data=NULL)  */
   27411      176457 :       psProgressInfo->psPyCallbackData = obj14 ;
   27412             :     }
   27413             :   }
   27414      176457 :   if (obj15) {
   27415      176457 :     {
   27416             :       /* %typemap(in) ( void *inPythonObject ) */
   27417      176457 :       arg18 = obj15;
   27418             :     }
   27419             :   }
   27420      176457 :   {
   27421      176457 :     const int bLocalUseExceptions = GetUseExceptions();
   27422      176457 :     if ( bLocalUseExceptions ) {
   27423      169562 :       pushErrorHandler();
   27424             :     }
   27425      176457 :     {
   27426      176457 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27427      176457 :       result = (CPLErr)GDALDatasetShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
   27428      176457 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27429             :     }
   27430      176457 :     if ( bLocalUseExceptions ) {
   27431      169562 :       popErrorHandler();
   27432             :     }
   27433             : #ifndef SED_HACKS
   27434             :     if ( bLocalUseExceptions ) {
   27435             :       CPLErr eclass = CPLGetLastErrorType();
   27436             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27437             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27438             :       }
   27439             :     }
   27440             : #endif
   27441             :   }
   27442      176457 :   resultobj = SWIG_From_int(static_cast< int >(result));
   27443      176457 :   {
   27444             :     /* %typemap(argout) ( void **outPythonObject ) */
   27445      176457 :     Py_XDECREF(resultobj);
   27446      176457 :     if (*arg6)
   27447             :     {
   27448             :       resultobj = (PyObject*)*arg6;
   27449             :     }
   27450             :     else
   27451             :     {
   27452        1309 :       resultobj = Py_None;
   27453        1309 :       Py_INCREF(resultobj);
   27454             :     }
   27455             :   }
   27456      176457 :   {
   27457             :     /* %typemap(freearg) (int nList, int* pList) */
   27458      176457 :     free(arg11);
   27459             :   }
   27460      176457 :   {
   27461             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   27462             :     
   27463      176457 :     CPLFree(psProgressInfo);
   27464             :     
   27465             :   }
   27466      176722 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27467             :   return resultobj;
   27468           5 : fail:
   27469           5 :   {
   27470             :     /* %typemap(freearg) (int nList, int* pList) */
   27471           5 :     free(arg11);
   27472             :   }
   27473           5 :   {
   27474             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   27475             :     
   27476           5 :     CPLFree(psProgressInfo);
   27477             :     
   27478             :   }
   27479             :   return NULL;
   27480             : }
   27481             : 
   27482             : 
   27483         276 : SWIGINTERN PyObject *Dataset_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27484         276 :   PyObject *obj;
   27485         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   27486         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDatasetShadow, SWIG_NewClientData(obj));
   27487         276 :   return SWIG_Py_Void();
   27488             : }
   27489             : 
   27490          10 : SWIGINTERN PyObject *_wrap_new_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27491          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27492          10 :   GDALRasterAttributeTableShadow *result = 0 ;
   27493             :   
   27494          10 :   if (!SWIG_Python_UnpackTuple(args, "new_RasterAttributeTable", 0, 0, 0)) SWIG_fail;
   27495          10 :   {
   27496          10 :     const int bLocalUseExceptions = GetUseExceptions();
   27497          10 :     if ( bLocalUseExceptions ) {
   27498          10 :       pushErrorHandler();
   27499             :     }
   27500          10 :     {
   27501          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27502          10 :       result = (GDALRasterAttributeTableShadow *)new_GDALRasterAttributeTableShadow();
   27503          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27504             :     }
   27505          10 :     if ( bLocalUseExceptions ) {
   27506          10 :       popErrorHandler();
   27507             :     }
   27508             : #ifndef SED_HACKS
   27509             :     if ( bLocalUseExceptions ) {
   27510             :       CPLErr eclass = CPLGetLastErrorType();
   27511             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27512             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27513             :       }
   27514             :     }
   27515             : #endif
   27516             :   }
   27517          10 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_NEW |  0 );
   27518          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27519             :   return resultobj;
   27520           0 : fail:
   27521           0 :   return NULL;
   27522             : }
   27523             : 
   27524             : 
   27525          17 : SWIGINTERN PyObject *_wrap_delete_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27526          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27527          17 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27528          17 :   void *argp1 = 0 ;
   27529          17 :   int res1 = 0 ;
   27530          17 :   PyObject *swig_obj[1] ;
   27531             :   
   27532          17 :   if (!args) SWIG_fail;
   27533          17 :   swig_obj[0] = args;
   27534          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_DISOWN |  0 );
   27535          17 :   if (!SWIG_IsOK(res1)) {
   27536           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RasterAttributeTable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27537             :   }
   27538          17 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27539          17 :   {
   27540          17 :     const int bLocalUseExceptions = GetUseExceptions();
   27541          17 :     if ( bLocalUseExceptions ) {
   27542          17 :       pushErrorHandler();
   27543             :     }
   27544          17 :     {
   27545          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27546          17 :       delete_GDALRasterAttributeTableShadow(arg1);
   27547          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27548             :     }
   27549          17 :     if ( bLocalUseExceptions ) {
   27550          17 :       popErrorHandler();
   27551             :     }
   27552             : #ifndef SED_HACKS
   27553             :     if ( bLocalUseExceptions ) {
   27554             :       CPLErr eclass = CPLGetLastErrorType();
   27555             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27556             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27557             :       }
   27558             :     }
   27559             : #endif
   27560             :   }
   27561          17 :   resultobj = SWIG_Py_Void();
   27562          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27563             :   return resultobj;
   27564             : fail:
   27565             :   return NULL;
   27566             : }
   27567             : 
   27568             : 
   27569           5 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27570           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27571           5 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27572           5 :   void *argp1 = 0 ;
   27573           5 :   int res1 = 0 ;
   27574           5 :   PyObject *swig_obj[1] ;
   27575           5 :   GDALRasterAttributeTableShadow *result = 0 ;
   27576             :   
   27577           5 :   if (!args) SWIG_fail;
   27578           5 :   swig_obj[0] = args;
   27579           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   27580           5 :   if (!SWIG_IsOK(res1)) {
   27581           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_Clone" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27582             :   }
   27583           5 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27584           5 :   {
   27585           5 :     const int bLocalUseExceptions = GetUseExceptions();
   27586           5 :     if ( bLocalUseExceptions ) {
   27587           5 :       pushErrorHandler();
   27588             :     }
   27589           5 :     {
   27590           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27591           5 :       result = (GDALRasterAttributeTableShadow *)GDALRasterAttributeTableShadow_Clone(arg1);
   27592           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27593             :     }
   27594           5 :     if ( bLocalUseExceptions ) {
   27595           5 :       popErrorHandler();
   27596             :     }
   27597             : #ifndef SED_HACKS
   27598             :     if ( bLocalUseExceptions ) {
   27599             :       CPLErr eclass = CPLGetLastErrorType();
   27600             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27601             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27602             :       }
   27603             :     }
   27604             : #endif
   27605             :   }
   27606           5 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
   27607           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27608             :   return resultobj;
   27609             : fail:
   27610             :   return NULL;
   27611             : }
   27612             : 
   27613             : 
   27614          37 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColumnCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27615          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27616          37 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27617          37 :   void *argp1 = 0 ;
   27618          37 :   int res1 = 0 ;
   27619          37 :   PyObject *swig_obj[1] ;
   27620          37 :   int result;
   27621             :   
   27622          37 :   if (!args) SWIG_fail;
   27623          37 :   swig_obj[0] = args;
   27624          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   27625          37 :   if (!SWIG_IsOK(res1)) {
   27626           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColumnCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27627             :   }
   27628          37 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27629          37 :   {
   27630          37 :     const int bLocalUseExceptions = GetUseExceptions();
   27631          37 :     if ( bLocalUseExceptions ) {
   27632          36 :       pushErrorHandler();
   27633             :     }
   27634          37 :     {
   27635          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27636          37 :       result = (int)GDALRasterAttributeTableShadow_GetColumnCount(arg1);
   27637          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27638             :     }
   27639          37 :     if ( bLocalUseExceptions ) {
   27640          36 :       popErrorHandler();
   27641             :     }
   27642             : #ifndef SED_HACKS
   27643             :     if ( bLocalUseExceptions ) {
   27644             :       CPLErr eclass = CPLGetLastErrorType();
   27645             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27646             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27647             :       }
   27648             :     }
   27649             : #endif
   27650             :   }
   27651          37 :   resultobj = SWIG_From_int(static_cast< int >(result));
   27652          37 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27653             :   return resultobj;
   27654             : fail:
   27655             :   return NULL;
   27656             : }
   27657             : 
   27658             : 
   27659          60 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetNameOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27660          60 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27661          60 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27662          60 :   int arg2 ;
   27663          60 :   void *argp1 = 0 ;
   27664          60 :   int res1 = 0 ;
   27665          60 :   int val2 ;
   27666          60 :   int ecode2 = 0 ;
   27667          60 :   PyObject *swig_obj[2] ;
   27668          60 :   char *result = 0 ;
   27669             :   
   27670          60 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetNameOfCol", 2, 2, swig_obj)) SWIG_fail;
   27671          60 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   27672          60 :   if (!SWIG_IsOK(res1)) {
   27673           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27674             :   }
   27675          60 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27676          60 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   27677          60 :   if (!SWIG_IsOK(ecode2)) {
   27678           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "2"" of type '" "int""'");
   27679             :   } 
   27680          60 :   arg2 = static_cast< int >(val2);
   27681          60 :   {
   27682          60 :     const int bLocalUseExceptions = GetUseExceptions();
   27683          60 :     if ( bLocalUseExceptions ) {
   27684          57 :       pushErrorHandler();
   27685             :     }
   27686          60 :     {
   27687          60 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27688          60 :       result = (char *)GDALRasterAttributeTableShadow_GetNameOfCol(arg1,arg2);
   27689          60 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27690             :     }
   27691          60 :     if ( bLocalUseExceptions ) {
   27692          57 :       popErrorHandler();
   27693             :     }
   27694             : #ifndef SED_HACKS
   27695             :     if ( bLocalUseExceptions ) {
   27696             :       CPLErr eclass = CPLGetLastErrorType();
   27697             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27698             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27699             :       }
   27700             :     }
   27701             : #endif
   27702             :   }
   27703          60 :   resultobj = SWIG_FromCharPtr((const char *)result);
   27704          60 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27705             :   return resultobj;
   27706             : fail:
   27707             :   return NULL;
   27708             : }
   27709             : 
   27710             : 
   27711          61 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetUsageOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27712          61 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27713          61 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27714          61 :   int arg2 ;
   27715          61 :   void *argp1 = 0 ;
   27716          61 :   int res1 = 0 ;
   27717          61 :   int val2 ;
   27718          61 :   int ecode2 = 0 ;
   27719          61 :   PyObject *swig_obj[2] ;
   27720          61 :   GDALRATFieldUsage result;
   27721             :   
   27722          61 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetUsageOfCol", 2, 2, swig_obj)) SWIG_fail;
   27723          61 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   27724          61 :   if (!SWIG_IsOK(res1)) {
   27725           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27726             :   }
   27727          61 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27728          61 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   27729          61 :   if (!SWIG_IsOK(ecode2)) {
   27730           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "2"" of type '" "int""'");
   27731             :   } 
   27732          61 :   arg2 = static_cast< int >(val2);
   27733          61 :   {
   27734          61 :     const int bLocalUseExceptions = GetUseExceptions();
   27735          61 :     if ( bLocalUseExceptions ) {
   27736          61 :       pushErrorHandler();
   27737             :     }
   27738          61 :     {
   27739          61 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27740          61 :       result = (GDALRATFieldUsage)GDALRasterAttributeTableShadow_GetUsageOfCol(arg1,arg2);
   27741          61 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27742             :     }
   27743          61 :     if ( bLocalUseExceptions ) {
   27744          61 :       popErrorHandler();
   27745             :     }
   27746             : #ifndef SED_HACKS
   27747             :     if ( bLocalUseExceptions ) {
   27748             :       CPLErr eclass = CPLGetLastErrorType();
   27749             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27750             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27751             :       }
   27752             :     }
   27753             : #endif
   27754             :   }
   27755          61 :   resultobj = SWIG_From_int(static_cast< int >(result));
   27756          61 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27757             :   return resultobj;
   27758             : fail:
   27759             :   return NULL;
   27760             : }
   27761             : 
   27762             : 
   27763          66 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTypeOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27764          66 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27765          66 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27766          66 :   int arg2 ;
   27767          66 :   void *argp1 = 0 ;
   27768          66 :   int res1 = 0 ;
   27769          66 :   int val2 ;
   27770          66 :   int ecode2 = 0 ;
   27771          66 :   PyObject *swig_obj[2] ;
   27772          66 :   GDALRATFieldType result;
   27773             :   
   27774          66 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetTypeOfCol", 2, 2, swig_obj)) SWIG_fail;
   27775          66 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   27776          66 :   if (!SWIG_IsOK(res1)) {
   27777           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27778             :   }
   27779          66 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27780          66 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   27781          66 :   if (!SWIG_IsOK(ecode2)) {
   27782           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "2"" of type '" "int""'");
   27783             :   } 
   27784          66 :   arg2 = static_cast< int >(val2);
   27785          66 :   {
   27786          66 :     const int bLocalUseExceptions = GetUseExceptions();
   27787          66 :     if ( bLocalUseExceptions ) {
   27788          63 :       pushErrorHandler();
   27789             :     }
   27790          66 :     {
   27791          66 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27792          66 :       result = (GDALRATFieldType)GDALRasterAttributeTableShadow_GetTypeOfCol(arg1,arg2);
   27793          66 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27794             :     }
   27795          66 :     if ( bLocalUseExceptions ) {
   27796          63 :       popErrorHandler();
   27797             :     }
   27798             : #ifndef SED_HACKS
   27799             :     if ( bLocalUseExceptions ) {
   27800             :       CPLErr eclass = CPLGetLastErrorType();
   27801             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27802             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27803             :       }
   27804             :     }
   27805             : #endif
   27806             :   }
   27807          66 :   resultobj = SWIG_From_int(static_cast< int >(result));
   27808          66 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27809             :   return resultobj;
   27810             : fail:
   27811             :   return NULL;
   27812             : }
   27813             : 
   27814             : 
   27815          13 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColOfUsage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27816          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27817          13 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27818          13 :   GDALRATFieldUsage arg2 ;
   27819          13 :   void *argp1 = 0 ;
   27820          13 :   int res1 = 0 ;
   27821          13 :   int val2 ;
   27822          13 :   int ecode2 = 0 ;
   27823          13 :   PyObject *swig_obj[2] ;
   27824          13 :   int result;
   27825             :   
   27826          13 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetColOfUsage", 2, 2, swig_obj)) SWIG_fail;
   27827          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   27828          13 :   if (!SWIG_IsOK(res1)) {
   27829           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27830             :   }
   27831          13 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27832          13 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   27833          13 :   if (!SWIG_IsOK(ecode2)) {
   27834           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "2"" of type '" "GDALRATFieldUsage""'");
   27835             :   } 
   27836          13 :   arg2 = static_cast< GDALRATFieldUsage >(val2);
   27837          13 :   {
   27838          13 :     const int bLocalUseExceptions = GetUseExceptions();
   27839          13 :     if ( bLocalUseExceptions ) {
   27840          13 :       pushErrorHandler();
   27841             :     }
   27842          13 :     {
   27843          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27844          13 :       result = (int)GDALRasterAttributeTableShadow_GetColOfUsage(arg1,arg2);
   27845          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27846             :     }
   27847          13 :     if ( bLocalUseExceptions ) {
   27848          13 :       popErrorHandler();
   27849             :     }
   27850             : #ifndef SED_HACKS
   27851             :     if ( bLocalUseExceptions ) {
   27852             :       CPLErr eclass = CPLGetLastErrorType();
   27853             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27854             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27855             :       }
   27856             :     }
   27857             : #endif
   27858             :   }
   27859          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   27860          13 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27861             :   return resultobj;
   27862             : fail:
   27863             :   return NULL;
   27864             : }
   27865             : 
   27866             : 
   27867          45 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27868          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27869          45 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27870          45 :   void *argp1 = 0 ;
   27871          45 :   int res1 = 0 ;
   27872          45 :   PyObject *swig_obj[1] ;
   27873          45 :   int result;
   27874             :   
   27875          45 :   if (!args) SWIG_fail;
   27876          45 :   swig_obj[0] = args;
   27877          45 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   27878          45 :   if (!SWIG_IsOK(res1)) {
   27879           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27880             :   }
   27881          45 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27882          45 :   {
   27883          45 :     const int bLocalUseExceptions = GetUseExceptions();
   27884          45 :     if ( bLocalUseExceptions ) {
   27885          44 :       pushErrorHandler();
   27886             :     }
   27887          45 :     {
   27888          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27889          45 :       result = (int)GDALRasterAttributeTableShadow_GetRowCount(arg1);
   27890          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27891             :     }
   27892          45 :     if ( bLocalUseExceptions ) {
   27893          44 :       popErrorHandler();
   27894             :     }
   27895             : #ifndef SED_HACKS
   27896             :     if ( bLocalUseExceptions ) {
   27897             :       CPLErr eclass = CPLGetLastErrorType();
   27898             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27899             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27900             :       }
   27901             :     }
   27902             : #endif
   27903             :   }
   27904          45 :   resultobj = SWIG_From_int(static_cast< int >(result));
   27905          45 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27906             :   return resultobj;
   27907             : fail:
   27908             :   return NULL;
   27909             : }
   27910             : 
   27911             : 
   27912          50 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27913          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27914          50 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27915          50 :   int arg2 ;
   27916          50 :   int arg3 ;
   27917          50 :   void *argp1 = 0 ;
   27918          50 :   int res1 = 0 ;
   27919          50 :   int val2 ;
   27920          50 :   int ecode2 = 0 ;
   27921          50 :   int val3 ;
   27922          50 :   int ecode3 = 0 ;
   27923          50 :   PyObject *swig_obj[3] ;
   27924          50 :   char *result = 0 ;
   27925             :   
   27926          50 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsString", 3, 3, swig_obj)) SWIG_fail;
   27927          50 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   27928          50 :   if (!SWIG_IsOK(res1)) {
   27929           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27930             :   }
   27931          50 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27932          50 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   27933          50 :   if (!SWIG_IsOK(ecode2)) {
   27934           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "2"" of type '" "int""'");
   27935             :   } 
   27936          50 :   arg2 = static_cast< int >(val2);
   27937          50 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   27938          50 :   if (!SWIG_IsOK(ecode3)) {
   27939           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "3"" of type '" "int""'");
   27940             :   } 
   27941          50 :   arg3 = static_cast< int >(val3);
   27942          50 :   {
   27943          50 :     const int bLocalUseExceptions = GetUseExceptions();
   27944          50 :     if ( bLocalUseExceptions ) {
   27945          49 :       pushErrorHandler();
   27946             :     }
   27947          50 :     {
   27948          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27949          50 :       result = (char *)GDALRasterAttributeTableShadow_GetValueAsString(arg1,arg2,arg3);
   27950          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27951             :     }
   27952          50 :     if ( bLocalUseExceptions ) {
   27953          49 :       popErrorHandler();
   27954             :     }
   27955             : #ifndef SED_HACKS
   27956             :     if ( bLocalUseExceptions ) {
   27957             :       CPLErr eclass = CPLGetLastErrorType();
   27958             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27959             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27960             :       }
   27961             :     }
   27962             : #endif
   27963             :   }
   27964          50 :   resultobj = SWIG_FromCharPtr((const char *)result);
   27965          58 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27966             :   return resultobj;
   27967             : fail:
   27968             :   return NULL;
   27969             : }
   27970             : 
   27971             : 
   27972          72 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27973          72 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27974          72 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27975          72 :   int arg2 ;
   27976          72 :   int arg3 ;
   27977          72 :   void *argp1 = 0 ;
   27978          72 :   int res1 = 0 ;
   27979          72 :   int val2 ;
   27980          72 :   int ecode2 = 0 ;
   27981          72 :   int val3 ;
   27982          72 :   int ecode3 = 0 ;
   27983          72 :   PyObject *swig_obj[3] ;
   27984          72 :   int result;
   27985             :   
   27986          72 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsInt", 3, 3, swig_obj)) SWIG_fail;
   27987          72 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   27988          72 :   if (!SWIG_IsOK(res1)) {
   27989           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27990             :   }
   27991          72 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27992          72 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   27993          72 :   if (!SWIG_IsOK(ecode2)) {
   27994           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "2"" of type '" "int""'");
   27995             :   } 
   27996          72 :   arg2 = static_cast< int >(val2);
   27997          72 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   27998          72 :   if (!SWIG_IsOK(ecode3)) {
   27999           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "3"" of type '" "int""'");
   28000             :   } 
   28001          72 :   arg3 = static_cast< int >(val3);
   28002          72 :   {
   28003          72 :     const int bLocalUseExceptions = GetUseExceptions();
   28004          72 :     if ( bLocalUseExceptions ) {
   28005          70 :       pushErrorHandler();
   28006             :     }
   28007          72 :     {
   28008          72 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28009          72 :       result = (int)GDALRasterAttributeTableShadow_GetValueAsInt(arg1,arg2,arg3);
   28010          72 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28011             :     }
   28012          72 :     if ( bLocalUseExceptions ) {
   28013          70 :       popErrorHandler();
   28014             :     }
   28015             : #ifndef SED_HACKS
   28016             :     if ( bLocalUseExceptions ) {
   28017             :       CPLErr eclass = CPLGetLastErrorType();
   28018             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28019             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28020             :       }
   28021             :     }
   28022             : #endif
   28023             :   }
   28024          72 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28025          80 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28026             :   return resultobj;
   28027             : fail:
   28028             :   return NULL;
   28029             : }
   28030             : 
   28031             : 
   28032          38 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28033          38 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28034          38 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28035          38 :   int arg2 ;
   28036          38 :   int arg3 ;
   28037          38 :   void *argp1 = 0 ;
   28038          38 :   int res1 = 0 ;
   28039          38 :   int val2 ;
   28040          38 :   int ecode2 = 0 ;
   28041          38 :   int val3 ;
   28042          38 :   int ecode3 = 0 ;
   28043          38 :   PyObject *swig_obj[3] ;
   28044          38 :   double result;
   28045             :   
   28046          38 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsDouble", 3, 3, swig_obj)) SWIG_fail;
   28047          38 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28048          38 :   if (!SWIG_IsOK(res1)) {
   28049           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28050             :   }
   28051          38 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28052          38 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28053          38 :   if (!SWIG_IsOK(ecode2)) {
   28054           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "2"" of type '" "int""'");
   28055             :   } 
   28056          38 :   arg2 = static_cast< int >(val2);
   28057          38 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28058          38 :   if (!SWIG_IsOK(ecode3)) {
   28059           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "3"" of type '" "int""'");
   28060             :   } 
   28061          38 :   arg3 = static_cast< int >(val3);
   28062          38 :   {
   28063          38 :     const int bLocalUseExceptions = GetUseExceptions();
   28064          38 :     if ( bLocalUseExceptions ) {
   28065          37 :       pushErrorHandler();
   28066             :     }
   28067          38 :     {
   28068          38 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28069          38 :       result = (double)GDALRasterAttributeTableShadow_GetValueAsDouble(arg1,arg2,arg3);
   28070          38 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28071             :     }
   28072          38 :     if ( bLocalUseExceptions ) {
   28073          37 :       popErrorHandler();
   28074             :     }
   28075             : #ifndef SED_HACKS
   28076             :     if ( bLocalUseExceptions ) {
   28077             :       CPLErr eclass = CPLGetLastErrorType();
   28078             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28079             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28080             :       }
   28081             :     }
   28082             : #endif
   28083             :   }
   28084          38 :   resultobj = SWIG_From_double(static_cast< double >(result));
   28085          46 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28086             :   return resultobj;
   28087             : fail:
   28088             :   return NULL;
   28089             : }
   28090             : 
   28091             : 
   28092           6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28093           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28094           6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28095           6 :   int arg2 ;
   28096           6 :   int arg3 ;
   28097           6 :   int arg4 ;
   28098           6 :   char **arg5 = (char **) 0 ;
   28099           6 :   void *argp1 = 0 ;
   28100           6 :   int res1 = 0 ;
   28101           6 :   int val2 ;
   28102           6 :   int ecode2 = 0 ;
   28103           6 :   int val3 ;
   28104           6 :   int ecode3 = 0 ;
   28105           6 :   int iLength4 ;
   28106           6 :   PyObject *swig_obj[4] ;
   28107           6 :   CPLErr result;
   28108             :   
   28109           6 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsString", 4, 4, swig_obj)) SWIG_fail;
   28110           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28111           6 :   if (!SWIG_IsOK(res1)) {
   28112           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28113             :   }
   28114           6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28115           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28116           6 :   if (!SWIG_IsOK(ecode2)) {
   28117           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "2"" of type '" "int""'");
   28118             :   } 
   28119           6 :   arg2 = static_cast< int >(val2);
   28120           6 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28121           6 :   if (!SWIG_IsOK(ecode3)) {
   28122           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "3"" of type '" "int""'");
   28123             :   } 
   28124           6 :   arg3 = static_cast< int >(val3);
   28125           6 :   {
   28126             :     /* %typemap(in,numinputs=1) (int iLength4, char **ppszData) (int iLength4) */
   28127           6 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) )
   28128             :     {
   28129           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   28130           0 :       SWIG_fail;
   28131             :     }
   28132           6 :     if( iLength4 <= 0 || iLength4 > INT_MAX - 1 )
   28133             :     {
   28134           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   28135           1 :       SWIG_fail;
   28136             :     }
   28137           5 :     arg4 = iLength4;
   28138           5 :     arg5 = (char**)VSICalloc(iLength4 + 1, sizeof(char*));
   28139           5 :     if( !arg5 )
   28140             :     {
   28141           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   28142           0 :       SWIG_fail;
   28143             :     }
   28144             :   }
   28145           5 :   {
   28146           5 :     const int bLocalUseExceptions = GetUseExceptions();
   28147           5 :     if ( bLocalUseExceptions ) {
   28148           5 :       pushErrorHandler();
   28149             :     }
   28150           5 :     {
   28151           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28152           5 :       result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsString(arg1,arg2,arg3,arg4,arg5);
   28153           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28154             :     }
   28155           5 :     if ( bLocalUseExceptions ) {
   28156           5 :       popErrorHandler();
   28157             :     }
   28158             : #ifndef SED_HACKS
   28159             :     if ( bLocalUseExceptions ) {
   28160             :       CPLErr eclass = CPLGetLastErrorType();
   28161             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28162             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28163             :       }
   28164             :     }
   28165             : #endif
   28166             :   }
   28167           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28168           5 :   {
   28169             :     /* %typemap(argout) (int iLength, char **ppszData) */
   28170           5 :     Py_DECREF(resultobj);
   28171           5 :     PyObject *out = PyList_New( arg4 );
   28172           5 :     if( !out ) {
   28173           0 :       SWIG_fail;
   28174             :     }
   28175          13 :     for( int i=0; i<arg4; i++ ) {
   28176           8 :       if( arg5[i] )
   28177             :       {
   28178           2 :         PyObject *val = GDALPythonObjectFromCStr( arg5[i] );
   28179           2 :         PyList_SetItem( out, i, val );
   28180             :       }
   28181             :       else
   28182             :       {
   28183           6 :         Py_INCREF(Py_None);
   28184           6 :         PyList_SetItem( out, i, Py_None );
   28185             :       }
   28186             :     }
   28187           5 :     resultobj = out;
   28188             :   }
   28189           5 :   {
   28190             :     /* %typemap(freearg) (int iLength, char **ppszData) */
   28191           5 :     CSLDestroy(arg5);
   28192             :   }
   28193          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28194             :   return resultobj;
   28195           1 : fail:
   28196           1 :   {
   28197             :     /* %typemap(freearg) (int iLength, char **ppszData) */
   28198           1 :     CSLDestroy(arg5);
   28199             :   }
   28200             :   return NULL;
   28201             : }
   28202             : 
   28203             : 
   28204           6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28205           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28206           6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28207           6 :   int arg2 ;
   28208           6 :   int arg3 ;
   28209           6 :   int arg4 ;
   28210           6 :   int *arg5 = (int *) 0 ;
   28211           6 :   void *argp1 = 0 ;
   28212           6 :   int res1 = 0 ;
   28213           6 :   int val2 ;
   28214           6 :   int ecode2 = 0 ;
   28215           6 :   int val3 ;
   28216           6 :   int ecode3 = 0 ;
   28217           6 :   int iLength4 ;
   28218           6 :   PyObject *swig_obj[4] ;
   28219           6 :   CPLErr result;
   28220             :   
   28221           6 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsInteger", 4, 4, swig_obj)) SWIG_fail;
   28222           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28223           6 :   if (!SWIG_IsOK(res1)) {
   28224           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28225             :   }
   28226           6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28227           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28228           6 :   if (!SWIG_IsOK(ecode2)) {
   28229           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "2"" of type '" "int""'");
   28230             :   } 
   28231           6 :   arg2 = static_cast< int >(val2);
   28232           6 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28233           6 :   if (!SWIG_IsOK(ecode3)) {
   28234           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "3"" of type '" "int""'");
   28235             :   } 
   28236           6 :   arg3 = static_cast< int >(val3);
   28237           6 :   {
   28238             :     /* %typemap(in,numinputs=1) (int iLength4, int *pnData) (int iLength4) */
   28239           6 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) ) {
   28240           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   28241           0 :       SWIG_fail;
   28242             :     }
   28243           6 :     if( iLength4 <= 0 )
   28244             :     {
   28245           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   28246           1 :       SWIG_fail;
   28247             :     }
   28248           5 :     arg4 = iLength4;
   28249           5 :     arg5 = (int*)VSICalloc(iLength4, sizeof(int));
   28250           5 :     if( !arg5 )
   28251             :     {
   28252           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   28253           0 :       SWIG_fail;
   28254             :     }
   28255             :   }
   28256           5 :   {
   28257           5 :     const int bLocalUseExceptions = GetUseExceptions();
   28258           5 :     if ( bLocalUseExceptions ) {
   28259           5 :       pushErrorHandler();
   28260             :     }
   28261           5 :     {
   28262           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28263           5 :       result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsInteger(arg1,arg2,arg3,arg4,arg5);
   28264           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28265             :     }
   28266           5 :     if ( bLocalUseExceptions ) {
   28267           5 :       popErrorHandler();
   28268             :     }
   28269             : #ifndef SED_HACKS
   28270             :     if ( bLocalUseExceptions ) {
   28271             :       CPLErr eclass = CPLGetLastErrorType();
   28272             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28273             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28274             :       }
   28275             :     }
   28276             : #endif
   28277             :   }
   28278           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28279           5 :   {
   28280             :     /* %typemap(argout) (int iLength, int *pnData) */
   28281           5 :     Py_DECREF(resultobj);
   28282           5 :     PyObject *out = PyList_New( arg4 );
   28283           5 :     if( !out ) {
   28284           0 :       SWIG_fail;
   28285             :     }
   28286          13 :     for( int i=0; i<arg4; i++ ) {
   28287           8 :       PyObject *val = PyLong_FromLong( (arg5)[i] );
   28288           8 :       PyList_SetItem( out, i, val );
   28289             :     }
   28290           5 :     resultobj = out;
   28291             :   }
   28292           5 :   {
   28293             :     /* %typemap(freearg) (int iLength, int *pnData) */
   28294           5 :     CPLFree(arg5);
   28295             :   }
   28296          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28297             :   return resultobj;
   28298           1 : fail:
   28299           1 :   {
   28300             :     /* %typemap(freearg) (int iLength, int *pnData) */
   28301           1 :     CPLFree(arg5);
   28302             :   }
   28303             :   return NULL;
   28304             : }
   28305             : 
   28306             : 
   28307           6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28308           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28309           6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28310           6 :   int arg2 ;
   28311           6 :   int arg3 ;
   28312           6 :   int arg4 ;
   28313           6 :   double *arg5 = (double *) 0 ;
   28314           6 :   void *argp1 = 0 ;
   28315           6 :   int res1 = 0 ;
   28316           6 :   int val2 ;
   28317           6 :   int ecode2 = 0 ;
   28318           6 :   int val3 ;
   28319           6 :   int ecode3 = 0 ;
   28320           6 :   int iLength4 ;
   28321           6 :   PyObject *swig_obj[4] ;
   28322           6 :   CPLErr result;
   28323             :   
   28324           6 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsDouble", 4, 4, swig_obj)) SWIG_fail;
   28325           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28326           6 :   if (!SWIG_IsOK(res1)) {
   28327           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28328             :   }
   28329           6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28330           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28331           6 :   if (!SWIG_IsOK(ecode2)) {
   28332           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "2"" of type '" "int""'");
   28333             :   } 
   28334           6 :   arg2 = static_cast< int >(val2);
   28335           6 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28336           6 :   if (!SWIG_IsOK(ecode3)) {
   28337           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "3"" of type '" "int""'");
   28338             :   } 
   28339           6 :   arg3 = static_cast< int >(val3);
   28340           6 :   {
   28341             :     /* %typemap(in,numinputs=1) (int iLength4, double *pdfData) (int iLength4) */
   28342           6 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) ) {
   28343           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   28344           0 :       SWIG_fail;
   28345             :     }
   28346           6 :     if( iLength4 <= 0 )
   28347             :     {
   28348           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   28349           1 :       SWIG_fail;
   28350             :     }
   28351           5 :     arg4 = iLength4;
   28352           5 :     arg5 = (double*)CPLCalloc(iLength4, sizeof(double));
   28353           5 :     if( !arg5 )
   28354             :     {
   28355           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   28356           0 :       SWIG_fail;
   28357             :     }
   28358             :   }
   28359           5 :   {
   28360           5 :     const int bLocalUseExceptions = GetUseExceptions();
   28361           5 :     if ( bLocalUseExceptions ) {
   28362           5 :       pushErrorHandler();
   28363             :     }
   28364           5 :     {
   28365           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28366           5 :       result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsDouble(arg1,arg2,arg3,arg4,arg5);
   28367           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28368             :     }
   28369           5 :     if ( bLocalUseExceptions ) {
   28370           5 :       popErrorHandler();
   28371             :     }
   28372             : #ifndef SED_HACKS
   28373             :     if ( bLocalUseExceptions ) {
   28374             :       CPLErr eclass = CPLGetLastErrorType();
   28375             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28376             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28377             :       }
   28378             :     }
   28379             : #endif
   28380             :   }
   28381           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28382           5 :   {
   28383             :     /* %typemap(argout) (int iLength, double *pdfData)  */
   28384           5 :     Py_DECREF(resultobj);
   28385           5 :     PyObject *out = PyList_New( arg4 );
   28386           5 :     if( !out ) {
   28387           0 :       SWIG_fail;
   28388             :     }
   28389          13 :     for( int i=0; i<arg4; i++ ) {
   28390           8 :       PyObject *val = PyFloat_FromDouble( (arg5)[i] );
   28391           8 :       PyList_SetItem( out, i, val );
   28392             :     }
   28393           5 :     resultobj = out;
   28394             :   }
   28395           5 :   {
   28396             :     /* %typemap(freearg) (int iLength, double *pdfData) */
   28397           5 :     CPLFree(arg5);
   28398             :   }
   28399          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28400             :   return resultobj;
   28401           1 : fail:
   28402           1 :   {
   28403             :     /* %typemap(freearg) (int iLength, double *pdfData) */
   28404           1 :     CPLFree(arg5);
   28405             :   }
   28406             :   return NULL;
   28407             : }
   28408             : 
   28409             : 
   28410          27 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28411          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28412          27 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28413          27 :   int arg2 ;
   28414          27 :   int arg3 ;
   28415          27 :   char *arg4 = (char *) 0 ;
   28416          27 :   void *argp1 = 0 ;
   28417          27 :   int res1 = 0 ;
   28418          27 :   int val2 ;
   28419          27 :   int ecode2 = 0 ;
   28420          27 :   int val3 ;
   28421          27 :   int ecode3 = 0 ;
   28422          27 :   PyObject *str4 = 0 ;
   28423          27 :   int bToFree4 = 0 ;
   28424          27 :   PyObject *swig_obj[4] ;
   28425             :   
   28426          27 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsString", 4, 4, swig_obj)) SWIG_fail;
   28427          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28428          27 :   if (!SWIG_IsOK(res1)) {
   28429           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28430             :   }
   28431          27 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28432          27 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28433          27 :   if (!SWIG_IsOK(ecode2)) {
   28434           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "2"" of type '" "int""'");
   28435             :   } 
   28436          27 :   arg2 = static_cast< int >(val2);
   28437          27 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28438          27 :   if (!SWIG_IsOK(ecode3)) {
   28439           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "3"" of type '" "int""'");
   28440             :   } 
   28441          27 :   arg3 = static_cast< int >(val3);
   28442          27 :   {
   28443             :     /* %typemap(in) (tostring argin) */
   28444          27 :     str4 = PyObject_Str( swig_obj[3] );
   28445          27 :     if ( str4 == 0 ) {
   28446           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   28447           0 :       SWIG_fail;
   28448             :     }
   28449             :     
   28450          27 :     arg4 = GDALPythonObjectToCStr(str4, &bToFree4);
   28451             :   }
   28452          27 :   {
   28453          27 :     const int bLocalUseExceptions = GetUseExceptions();
   28454          27 :     if ( bLocalUseExceptions ) {
   28455          27 :       pushErrorHandler();
   28456             :     }
   28457          27 :     {
   28458          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28459          27 :       GDALRasterAttributeTableShadow_SetValueAsString(arg1,arg2,arg3,(char const *)arg4);
   28460          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28461             :     }
   28462          27 :     if ( bLocalUseExceptions ) {
   28463          27 :       popErrorHandler();
   28464             :     }
   28465             : #ifndef SED_HACKS
   28466             :     if ( bLocalUseExceptions ) {
   28467             :       CPLErr eclass = CPLGetLastErrorType();
   28468             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28469             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28470             :       }
   28471             :     }
   28472             : #endif
   28473             :   }
   28474          27 :   resultobj = SWIG_Py_Void();
   28475          27 :   {
   28476             :     /* %typemap(freearg) (tostring argin) */
   28477          27 :     if ( str4 != NULL)
   28478             :     {
   28479          27 :       Py_DECREF(str4);
   28480             :     }
   28481          27 :     GDALPythonFreeCStr(arg4, bToFree4);
   28482             :   }
   28483          29 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28484             :   return resultobj;
   28485           0 : fail:
   28486           0 :   {
   28487             :     /* %typemap(freearg) (tostring argin) */
   28488           0 :     if ( str4 != NULL)
   28489             :     {
   28490           0 :       Py_DECREF(str4);
   28491             :     }
   28492          27 :     GDALPythonFreeCStr(arg4, bToFree4);
   28493             :   }
   28494             :   return NULL;
   28495             : }
   28496             : 
   28497             : 
   28498          39 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28499          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28500          39 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28501          39 :   int arg2 ;
   28502          39 :   int arg3 ;
   28503          39 :   int arg4 ;
   28504          39 :   void *argp1 = 0 ;
   28505          39 :   int res1 = 0 ;
   28506          39 :   int val2 ;
   28507          39 :   int ecode2 = 0 ;
   28508          39 :   int val3 ;
   28509          39 :   int ecode3 = 0 ;
   28510          39 :   int val4 ;
   28511          39 :   int ecode4 = 0 ;
   28512          39 :   PyObject *swig_obj[4] ;
   28513             :   
   28514          39 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsInt", 4, 4, swig_obj)) SWIG_fail;
   28515          39 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28516          39 :   if (!SWIG_IsOK(res1)) {
   28517           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28518             :   }
   28519          39 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28520          39 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28521          39 :   if (!SWIG_IsOK(ecode2)) {
   28522           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "2"" of type '" "int""'");
   28523             :   } 
   28524          39 :   arg2 = static_cast< int >(val2);
   28525          39 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28526          39 :   if (!SWIG_IsOK(ecode3)) {
   28527           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "3"" of type '" "int""'");
   28528             :   } 
   28529          39 :   arg3 = static_cast< int >(val3);
   28530          39 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   28531          39 :   if (!SWIG_IsOK(ecode4)) {
   28532           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "4"" of type '" "int""'");
   28533             :   } 
   28534          39 :   arg4 = static_cast< int >(val4);
   28535          39 :   {
   28536          39 :     const int bLocalUseExceptions = GetUseExceptions();
   28537          39 :     if ( bLocalUseExceptions ) {
   28538          39 :       pushErrorHandler();
   28539             :     }
   28540          39 :     {
   28541          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28542          39 :       GDALRasterAttributeTableShadow_SetValueAsInt(arg1,arg2,arg3,arg4);
   28543          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28544             :     }
   28545          39 :     if ( bLocalUseExceptions ) {
   28546          39 :       popErrorHandler();
   28547             :     }
   28548             : #ifndef SED_HACKS
   28549             :     if ( bLocalUseExceptions ) {
   28550             :       CPLErr eclass = CPLGetLastErrorType();
   28551             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28552             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28553             :       }
   28554             :     }
   28555             : #endif
   28556             :   }
   28557          39 :   resultobj = SWIG_Py_Void();
   28558          41 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28559             :   return resultobj;
   28560             : fail:
   28561             :   return NULL;
   28562             : }
   28563             : 
   28564             : 
   28565          25 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28566          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28567          25 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28568          25 :   int arg2 ;
   28569          25 :   int arg3 ;
   28570          25 :   double arg4 ;
   28571          25 :   void *argp1 = 0 ;
   28572          25 :   int res1 = 0 ;
   28573          25 :   int val2 ;
   28574          25 :   int ecode2 = 0 ;
   28575          25 :   int val3 ;
   28576          25 :   int ecode3 = 0 ;
   28577          25 :   double val4 ;
   28578          25 :   int ecode4 = 0 ;
   28579          25 :   PyObject *swig_obj[4] ;
   28580             :   
   28581          25 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsDouble", 4, 4, swig_obj)) SWIG_fail;
   28582          25 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28583          25 :   if (!SWIG_IsOK(res1)) {
   28584           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28585             :   }
   28586          25 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28587          25 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28588          25 :   if (!SWIG_IsOK(ecode2)) {
   28589           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "2"" of type '" "int""'");
   28590             :   } 
   28591          25 :   arg2 = static_cast< int >(val2);
   28592          25 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28593          25 :   if (!SWIG_IsOK(ecode3)) {
   28594           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "3"" of type '" "int""'");
   28595             :   } 
   28596          25 :   arg3 = static_cast< int >(val3);
   28597          25 :   ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   28598          25 :   if (!SWIG_IsOK(ecode4)) {
   28599           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "4"" of type '" "double""'");
   28600             :   } 
   28601          25 :   arg4 = static_cast< double >(val4);
   28602          25 :   {
   28603          25 :     const int bLocalUseExceptions = GetUseExceptions();
   28604          25 :     if ( bLocalUseExceptions ) {
   28605          25 :       pushErrorHandler();
   28606             :     }
   28607          25 :     {
   28608          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28609          25 :       GDALRasterAttributeTableShadow_SetValueAsDouble(arg1,arg2,arg3,arg4);
   28610          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28611             :     }
   28612          25 :     if ( bLocalUseExceptions ) {
   28613          25 :       popErrorHandler();
   28614             :     }
   28615             : #ifndef SED_HACKS
   28616             :     if ( bLocalUseExceptions ) {
   28617             :       CPLErr eclass = CPLGetLastErrorType();
   28618             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28619             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28620             :       }
   28621             :     }
   28622             : #endif
   28623             :   }
   28624          25 :   resultobj = SWIG_Py_Void();
   28625          27 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28626             :   return resultobj;
   28627             : fail:
   28628             :   return NULL;
   28629             : }
   28630             : 
   28631             : 
   28632           5 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28633           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28634           5 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28635           5 :   int arg2 ;
   28636           5 :   void *argp1 = 0 ;
   28637           5 :   int res1 = 0 ;
   28638           5 :   int val2 ;
   28639           5 :   int ecode2 = 0 ;
   28640           5 :   PyObject *swig_obj[2] ;
   28641             :   
   28642           5 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetRowCount", 2, 2, swig_obj)) SWIG_fail;
   28643           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28644           5 :   if (!SWIG_IsOK(res1)) {
   28645           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28646             :   }
   28647           5 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28648           5 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28649           5 :   if (!SWIG_IsOK(ecode2)) {
   28650           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "2"" of type '" "int""'");
   28651             :   } 
   28652           5 :   arg2 = static_cast< int >(val2);
   28653           5 :   {
   28654           5 :     const int bLocalUseExceptions = GetUseExceptions();
   28655           5 :     if ( bLocalUseExceptions ) {
   28656           5 :       pushErrorHandler();
   28657             :     }
   28658           5 :     {
   28659           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28660           5 :       GDALRasterAttributeTableShadow_SetRowCount(arg1,arg2);
   28661           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28662             :     }
   28663           5 :     if ( bLocalUseExceptions ) {
   28664           5 :       popErrorHandler();
   28665             :     }
   28666             : #ifndef SED_HACKS
   28667             :     if ( bLocalUseExceptions ) {
   28668             :       CPLErr eclass = CPLGetLastErrorType();
   28669             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28670             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28671             :       }
   28672             :     }
   28673             : #endif
   28674             :   }
   28675           5 :   resultobj = SWIG_Py_Void();
   28676           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28677             :   return resultobj;
   28678             : fail:
   28679             :   return NULL;
   28680             : }
   28681             : 
   28682             : 
   28683          25 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_CreateColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28684          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28685          25 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28686          25 :   char *arg2 = (char *) 0 ;
   28687          25 :   GDALRATFieldType arg3 ;
   28688          25 :   GDALRATFieldUsage arg4 ;
   28689          25 :   void *argp1 = 0 ;
   28690          25 :   int res1 = 0 ;
   28691          25 :   int res2 ;
   28692          25 :   char *buf2 = 0 ;
   28693          25 :   int alloc2 = 0 ;
   28694          25 :   int val3 ;
   28695          25 :   int ecode3 = 0 ;
   28696          25 :   int val4 ;
   28697          25 :   int ecode4 = 0 ;
   28698          25 :   PyObject *swig_obj[4] ;
   28699          25 :   int result;
   28700             :   
   28701          25 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_CreateColumn", 4, 4, swig_obj)) SWIG_fail;
   28702          25 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28703          25 :   if (!SWIG_IsOK(res1)) {
   28704           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28705             :   }
   28706          25 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28707          25 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   28708          25 :   if (!SWIG_IsOK(res2)) {
   28709           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "2"" of type '" "char const *""'");
   28710             :   }
   28711          25 :   arg2 = reinterpret_cast< char * >(buf2);
   28712          25 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28713          25 :   if (!SWIG_IsOK(ecode3)) {
   28714           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "3"" of type '" "GDALRATFieldType""'");
   28715             :   } 
   28716          25 :   arg3 = static_cast< GDALRATFieldType >(val3);
   28717          25 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   28718          25 :   if (!SWIG_IsOK(ecode4)) {
   28719           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "4"" of type '" "GDALRATFieldUsage""'");
   28720             :   } 
   28721          25 :   arg4 = static_cast< GDALRATFieldUsage >(val4);
   28722          25 :   {
   28723          25 :     const int bLocalUseExceptions = GetUseExceptions();
   28724          25 :     if ( bLocalUseExceptions ) {
   28725          25 :       pushErrorHandler();
   28726             :     }
   28727          25 :     {
   28728          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28729          25 :       result = (int)GDALRasterAttributeTableShadow_CreateColumn(arg1,(char const *)arg2,arg3,arg4);
   28730          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28731             :     }
   28732          25 :     if ( bLocalUseExceptions ) {
   28733          25 :       popErrorHandler();
   28734             :     }
   28735             : #ifndef SED_HACKS
   28736             :     if ( bLocalUseExceptions ) {
   28737             :       CPLErr eclass = CPLGetLastErrorType();
   28738             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28739             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28740             :       }
   28741             :     }
   28742             : #endif
   28743             :   }
   28744          25 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28745          25 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28746          25 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28747             :   return resultobj;
   28748           0 : fail:
   28749           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   28750             :   return NULL;
   28751             : }
   28752             : 
   28753             : 
   28754           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28755           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28756           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28757           1 :   double *arg2 = (double *) 0 ;
   28758           1 :   double *arg3 = (double *) 0 ;
   28759           1 :   void *argp1 = 0 ;
   28760           1 :   int res1 = 0 ;
   28761           1 :   double temp2 ;
   28762           1 :   int res2 = SWIG_TMPOBJ ;
   28763           1 :   double temp3 ;
   28764           1 :   int res3 = SWIG_TMPOBJ ;
   28765           1 :   PyObject *swig_obj[1] ;
   28766           1 :   bool result;
   28767             :   
   28768           1 :   arg2 = &temp2;
   28769           1 :   arg3 = &temp3;
   28770           1 :   if (!args) SWIG_fail;
   28771           1 :   swig_obj[0] = args;
   28772           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28773           1 :   if (!SWIG_IsOK(res1)) {
   28774           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28775             :   }
   28776           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28777           1 :   {
   28778           1 :     const int bLocalUseExceptions = GetUseExceptions();
   28779           1 :     if ( bLocalUseExceptions ) {
   28780           1 :       pushErrorHandler();
   28781             :     }
   28782           1 :     {
   28783           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28784           1 :       result = (bool)GDALRasterAttributeTableShadow_GetLinearBinning(arg1,arg2,arg3);
   28785           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28786             :     }
   28787           1 :     if ( bLocalUseExceptions ) {
   28788           1 :       popErrorHandler();
   28789             :     }
   28790             : #ifndef SED_HACKS
   28791             :     if ( bLocalUseExceptions ) {
   28792             :       CPLErr eclass = CPLGetLastErrorType();
   28793             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28794             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28795             :       }
   28796             :     }
   28797             : #endif
   28798             :   }
   28799           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   28800           1 :   if (ReturnSame(SWIG_IsTmpObj(res2))) {
   28801           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
   28802             :   } else {
   28803           0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   28804           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
   28805             :   }
   28806           1 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   28807           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   28808             :   } else {
   28809           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   28810           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   28811             :   }
   28812           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28813             :   return resultobj;
   28814             : fail:
   28815             :   return NULL;
   28816             : }
   28817             : 
   28818             : 
   28819           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28820           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28821           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28822           1 :   double arg2 ;
   28823           1 :   double arg3 ;
   28824           1 :   void *argp1 = 0 ;
   28825           1 :   int res1 = 0 ;
   28826           1 :   double val2 ;
   28827           1 :   int ecode2 = 0 ;
   28828           1 :   double val3 ;
   28829           1 :   int ecode3 = 0 ;
   28830           1 :   PyObject *swig_obj[3] ;
   28831           1 :   int result;
   28832             :   
   28833           1 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetLinearBinning", 3, 3, swig_obj)) SWIG_fail;
   28834           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28835           1 :   if (!SWIG_IsOK(res1)) {
   28836           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28837             :   }
   28838           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28839           1 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   28840           1 :   if (!SWIG_IsOK(ecode2)) {
   28841           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "2"" of type '" "double""'");
   28842             :   } 
   28843           1 :   arg2 = static_cast< double >(val2);
   28844           1 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   28845           1 :   if (!SWIG_IsOK(ecode3)) {
   28846           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "3"" of type '" "double""'");
   28847             :   } 
   28848           1 :   arg3 = static_cast< double >(val3);
   28849           1 :   {
   28850           1 :     const int bLocalUseExceptions = GetUseExceptions();
   28851           1 :     if ( bLocalUseExceptions ) {
   28852           1 :       pushErrorHandler();
   28853             :     }
   28854           1 :     {
   28855           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28856           1 :       result = (int)GDALRasterAttributeTableShadow_SetLinearBinning(arg1,arg2,arg3);
   28857           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28858             :     }
   28859           1 :     if ( bLocalUseExceptions ) {
   28860           1 :       popErrorHandler();
   28861             :     }
   28862             : #ifndef SED_HACKS
   28863             :     if ( bLocalUseExceptions ) {
   28864             :       CPLErr eclass = CPLGetLastErrorType();
   28865             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28866             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28867             :       }
   28868             :     }
   28869             : #endif
   28870             :   }
   28871           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28872           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28873             :   return resultobj;
   28874             : fail:
   28875             :   return NULL;
   28876             : }
   28877             : 
   28878             : 
   28879           3 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowOfValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28880           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28881           3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28882           3 :   double arg2 ;
   28883           3 :   void *argp1 = 0 ;
   28884           3 :   int res1 = 0 ;
   28885           3 :   double val2 ;
   28886           3 :   int ecode2 = 0 ;
   28887           3 :   PyObject *swig_obj[2] ;
   28888           3 :   int result;
   28889             :   
   28890           3 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetRowOfValue", 2, 2, swig_obj)) SWIG_fail;
   28891           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28892           3 :   if (!SWIG_IsOK(res1)) {
   28893           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28894             :   }
   28895           3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28896           3 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   28897           3 :   if (!SWIG_IsOK(ecode2)) {
   28898           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "2"" of type '" "double""'");
   28899             :   } 
   28900           3 :   arg2 = static_cast< double >(val2);
   28901           3 :   {
   28902           3 :     const int bLocalUseExceptions = GetUseExceptions();
   28903           3 :     if ( bLocalUseExceptions ) {
   28904           3 :       pushErrorHandler();
   28905             :     }
   28906           3 :     {
   28907           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28908           3 :       result = (int)GDALRasterAttributeTableShadow_GetRowOfValue(arg1,arg2);
   28909           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28910             :     }
   28911           3 :     if ( bLocalUseExceptions ) {
   28912           3 :       popErrorHandler();
   28913             :     }
   28914             : #ifndef SED_HACKS
   28915             :     if ( bLocalUseExceptions ) {
   28916             :       CPLErr eclass = CPLGetLastErrorType();
   28917             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28918             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28919             :       }
   28920             :     }
   28921             : #endif
   28922             :   }
   28923           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28924           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28925             :   return resultobj;
   28926             : fail:
   28927             :   return NULL;
   28928             : }
   28929             : 
   28930             : 
   28931           2 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ChangesAreWrittenToFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28932           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28933           2 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28934           2 :   void *argp1 = 0 ;
   28935           2 :   int res1 = 0 ;
   28936           2 :   PyObject *swig_obj[1] ;
   28937           2 :   int result;
   28938             :   
   28939           2 :   if (!args) SWIG_fail;
   28940           2 :   swig_obj[0] = args;
   28941           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28942           2 :   if (!SWIG_IsOK(res1)) {
   28943           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ChangesAreWrittenToFile" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28944             :   }
   28945           2 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28946           2 :   {
   28947           2 :     const int bLocalUseExceptions = GetUseExceptions();
   28948           2 :     if ( bLocalUseExceptions ) {
   28949           2 :       pushErrorHandler();
   28950             :     }
   28951           2 :     {
   28952           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28953           2 :       result = (int)GDALRasterAttributeTableShadow_ChangesAreWrittenToFile(arg1);
   28954           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28955             :     }
   28956           2 :     if ( bLocalUseExceptions ) {
   28957           2 :       popErrorHandler();
   28958             :     }
   28959             : #ifndef SED_HACKS
   28960             :     if ( bLocalUseExceptions ) {
   28961             :       CPLErr eclass = CPLGetLastErrorType();
   28962             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28963             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28964             :       }
   28965             :     }
   28966             : #endif
   28967             :   }
   28968           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28969           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28970             :   return resultobj;
   28971             : fail:
   28972             :   return NULL;
   28973             : }
   28974             : 
   28975             : 
   28976           0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_DumpReadable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28977           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28978           0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28979           0 :   void *argp1 = 0 ;
   28980           0 :   int res1 = 0 ;
   28981           0 :   PyObject *swig_obj[1] ;
   28982             :   
   28983           0 :   if (!args) SWIG_fail;
   28984           0 :   swig_obj[0] = args;
   28985           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28986           0 :   if (!SWIG_IsOK(res1)) {
   28987           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_DumpReadable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28988             :   }
   28989           0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28990           0 :   {
   28991           0 :     const int bLocalUseExceptions = GetUseExceptions();
   28992           0 :     if ( bLocalUseExceptions ) {
   28993           0 :       pushErrorHandler();
   28994             :     }
   28995           0 :     {
   28996           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28997           0 :       GDALRasterAttributeTableShadow_DumpReadable(arg1);
   28998           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28999             :     }
   29000           0 :     if ( bLocalUseExceptions ) {
   29001           0 :       popErrorHandler();
   29002             :     }
   29003             : #ifndef SED_HACKS
   29004             :     if ( bLocalUseExceptions ) {
   29005             :       CPLErr eclass = CPLGetLastErrorType();
   29006             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29007             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29008             :       }
   29009             :     }
   29010             : #endif
   29011             :   }
   29012           0 :   resultobj = SWIG_Py_Void();
   29013           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29014             :   return resultobj;
   29015             : fail:
   29016             :   return NULL;
   29017             : }
   29018             : 
   29019             : 
   29020           3 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29021           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29022           3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29023           3 :   GDALRATTableType arg2 ;
   29024           3 :   void *argp1 = 0 ;
   29025           3 :   int res1 = 0 ;
   29026           3 :   int val2 ;
   29027           3 :   int ecode2 = 0 ;
   29028           3 :   PyObject *swig_obj[2] ;
   29029             :   
   29030           3 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetTableType", 2, 2, swig_obj)) SWIG_fail;
   29031           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29032           3 :   if (!SWIG_IsOK(res1)) {
   29033           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetTableType" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29034             :   }
   29035           3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29036           3 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   29037           3 :   if (!SWIG_IsOK(ecode2)) {
   29038           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetTableType" "', argument " "2"" of type '" "GDALRATTableType""'");
   29039             :   } 
   29040           3 :   arg2 = static_cast< GDALRATTableType >(val2);
   29041           3 :   {
   29042           3 :     const int bLocalUseExceptions = GetUseExceptions();
   29043           3 :     if ( bLocalUseExceptions ) {
   29044           3 :       pushErrorHandler();
   29045             :     }
   29046           3 :     {
   29047           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29048           3 :       GDALRasterAttributeTableShadow_SetTableType(arg1,arg2);
   29049           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29050             :     }
   29051           3 :     if ( bLocalUseExceptions ) {
   29052           3 :       popErrorHandler();
   29053             :     }
   29054             : #ifndef SED_HACKS
   29055             :     if ( bLocalUseExceptions ) {
   29056             :       CPLErr eclass = CPLGetLastErrorType();
   29057             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29058             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29059             :       }
   29060             :     }
   29061             : #endif
   29062             :   }
   29063           3 :   resultobj = SWIG_Py_Void();
   29064           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29065             :   return resultobj;
   29066             : fail:
   29067             :   return NULL;
   29068             : }
   29069             : 
   29070             : 
   29071          10 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29072          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29073          10 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29074          10 :   void *argp1 = 0 ;
   29075          10 :   int res1 = 0 ;
   29076          10 :   PyObject *swig_obj[1] ;
   29077          10 :   GDALRATTableType result;
   29078             :   
   29079          10 :   if (!args) SWIG_fail;
   29080          10 :   swig_obj[0] = args;
   29081          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29082          10 :   if (!SWIG_IsOK(res1)) {
   29083           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTableType" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29084             :   }
   29085          10 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29086          10 :   {
   29087          10 :     const int bLocalUseExceptions = GetUseExceptions();
   29088          10 :     if ( bLocalUseExceptions ) {
   29089          10 :       pushErrorHandler();
   29090             :     }
   29091          10 :     {
   29092          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29093          10 :       result = (GDALRATTableType)GDALRasterAttributeTableShadow_GetTableType(arg1);
   29094          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29095             :     }
   29096          10 :     if ( bLocalUseExceptions ) {
   29097          10 :       popErrorHandler();
   29098             :     }
   29099             : #ifndef SED_HACKS
   29100             :     if ( bLocalUseExceptions ) {
   29101             :       CPLErr eclass = CPLGetLastErrorType();
   29102             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29103             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29104             :       }
   29105             :     }
   29106             : #endif
   29107             :   }
   29108          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29109          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29110             :   return resultobj;
   29111             : fail:
   29112             :   return NULL;
   29113             : }
   29114             : 
   29115             : 
   29116           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_RemoveStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29117           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29118           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29119           1 :   void *argp1 = 0 ;
   29120           1 :   int res1 = 0 ;
   29121           1 :   PyObject *swig_obj[1] ;
   29122             :   
   29123           1 :   if (!args) SWIG_fail;
   29124           1 :   swig_obj[0] = args;
   29125           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29126           1 :   if (!SWIG_IsOK(res1)) {
   29127           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_RemoveStatistics" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29128             :   }
   29129           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29130           1 :   {
   29131           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29132           1 :     if ( bLocalUseExceptions ) {
   29133           1 :       pushErrorHandler();
   29134             :     }
   29135           1 :     {
   29136           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29137           1 :       GDALRasterAttributeTableShadow_RemoveStatistics(arg1);
   29138           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29139             :     }
   29140           1 :     if ( bLocalUseExceptions ) {
   29141           1 :       popErrorHandler();
   29142             :     }
   29143             : #ifndef SED_HACKS
   29144             :     if ( bLocalUseExceptions ) {
   29145             :       CPLErr eclass = CPLGetLastErrorType();
   29146             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29147             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29148             :       }
   29149             :     }
   29150             : #endif
   29151             :   }
   29152           1 :   resultobj = SWIG_Py_Void();
   29153           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29154             :   return resultobj;
   29155             : fail:
   29156             :   return NULL;
   29157             : }
   29158             : 
   29159             : 
   29160         276 : SWIGINTERN PyObject *RasterAttributeTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29161         276 :   PyObject *obj;
   29162         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   29163         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_NewClientData(obj));
   29164         276 :   return SWIG_Py_Void();
   29165             : }
   29166             : 
   29167          10 : SWIGINTERN PyObject *RasterAttributeTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29168          10 :   return SWIG_Python_InitShadowInstance(args);
   29169             : }
   29170             : 
   29171        1439 : SWIGINTERN PyObject *_wrap_delete_Group(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29172        1439 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29173        1439 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29174        1439 :   void *argp1 = 0 ;
   29175        1439 :   int res1 = 0 ;
   29176        1439 :   PyObject *swig_obj[1] ;
   29177             :   
   29178        1439 :   if (!args) SWIG_fail;
   29179        1439 :   swig_obj[0] = args;
   29180        1439 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_DISOWN |  0 );
   29181        1439 :   if (!SWIG_IsOK(res1)) {
   29182           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Group" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29183             :   }
   29184        1439 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29185        1439 :   {
   29186        1439 :     const int bLocalUseExceptions = GetUseExceptions();
   29187        1439 :     if ( bLocalUseExceptions ) {
   29188         507 :       pushErrorHandler();
   29189             :     }
   29190        1439 :     {
   29191        1439 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29192        1439 :       delete_GDALGroupHS(arg1);
   29193        1439 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29194             :     }
   29195        1439 :     if ( bLocalUseExceptions ) {
   29196         507 :       popErrorHandler();
   29197             :     }
   29198             : #ifndef SED_HACKS
   29199             :     if ( bLocalUseExceptions ) {
   29200             :       CPLErr eclass = CPLGetLastErrorType();
   29201             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29202             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29203             :       }
   29204             :     }
   29205             : #endif
   29206             :   }
   29207        1439 :   resultobj = SWIG_Py_Void();
   29208        1439 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29209             :   return resultobj;
   29210             : fail:
   29211             :   return NULL;
   29212             : }
   29213             : 
   29214             : 
   29215          95 : SWIGINTERN PyObject *_wrap_Group_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29216          95 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29217          95 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29218          95 :   void *argp1 = 0 ;
   29219          95 :   int res1 = 0 ;
   29220          95 :   PyObject *swig_obj[1] ;
   29221          95 :   char *result = 0 ;
   29222             :   
   29223          95 :   if (!args) SWIG_fail;
   29224          95 :   swig_obj[0] = args;
   29225          95 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29226          95 :   if (!SWIG_IsOK(res1)) {
   29227           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetName" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29228             :   }
   29229          95 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29230          95 :   {
   29231          95 :     const int bLocalUseExceptions = GetUseExceptions();
   29232          95 :     if ( bLocalUseExceptions ) {
   29233          17 :       pushErrorHandler();
   29234             :     }
   29235          95 :     {
   29236          95 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29237          95 :       result = (char *)GDALGroupHS_GetName(arg1);
   29238          95 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29239             :     }
   29240          95 :     if ( bLocalUseExceptions ) {
   29241          17 :       popErrorHandler();
   29242             :     }
   29243             : #ifndef SED_HACKS
   29244             :     if ( bLocalUseExceptions ) {
   29245             :       CPLErr eclass = CPLGetLastErrorType();
   29246             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29247             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29248             :       }
   29249             :     }
   29250             : #endif
   29251             :   }
   29252          95 :   resultobj = SWIG_FromCharPtr((const char *)result);
   29253          95 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29254             :   return resultobj;
   29255             : fail:
   29256             :   return NULL;
   29257             : }
   29258             : 
   29259             : 
   29260          47 : SWIGINTERN PyObject *_wrap_Group_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29261          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29262          47 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29263          47 :   void *argp1 = 0 ;
   29264          47 :   int res1 = 0 ;
   29265          47 :   PyObject *swig_obj[1] ;
   29266          47 :   char *result = 0 ;
   29267             :   
   29268          47 :   if (!args) SWIG_fail;
   29269          47 :   swig_obj[0] = args;
   29270          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29271          47 :   if (!SWIG_IsOK(res1)) {
   29272           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetFullName" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29273             :   }
   29274          47 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29275          47 :   {
   29276          47 :     const int bLocalUseExceptions = GetUseExceptions();
   29277          47 :     if ( bLocalUseExceptions ) {
   29278          17 :       pushErrorHandler();
   29279             :     }
   29280          47 :     {
   29281          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29282          47 :       result = (char *)GDALGroupHS_GetFullName(arg1);
   29283          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29284             :     }
   29285          47 :     if ( bLocalUseExceptions ) {
   29286          17 :       popErrorHandler();
   29287             :     }
   29288             : #ifndef SED_HACKS
   29289             :     if ( bLocalUseExceptions ) {
   29290             :       CPLErr eclass = CPLGetLastErrorType();
   29291             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29292             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29293             :       }
   29294             :     }
   29295             : #endif
   29296             :   }
   29297          47 :   resultobj = SWIG_FromCharPtr((const char *)result);
   29298          47 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29299             :   return resultobj;
   29300             : fail:
   29301             :   return NULL;
   29302             : }
   29303             : 
   29304             : 
   29305         329 : SWIGINTERN PyObject *_wrap_Group_GetMDArrayNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29306         329 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29307         329 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29308         329 :   char **arg2 = (char **) 0 ;
   29309         329 :   void *argp1 = 0 ;
   29310         329 :   int res1 = 0 ;
   29311         329 :   PyObject *swig_obj[2] ;
   29312         329 :   char **result = 0 ;
   29313             :   
   29314         329 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetMDArrayNames", 1, 2, swig_obj)) SWIG_fail;
   29315         329 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29316         329 :   if (!SWIG_IsOK(res1)) {
   29317           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetMDArrayNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29318             :   }
   29319         329 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29320         329 :   if (swig_obj[1]) {
   29321         329 :     {
   29322             :       /* %typemap(in) char **dict */
   29323         329 :       arg2 = NULL;
   29324         329 :       if ( PySequence_Check( swig_obj[1] ) ) {
   29325         329 :         int bErr = FALSE;
   29326         329 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   29327         329 :         if ( bErr )
   29328             :         {
   29329           0 :           SWIG_fail;
   29330             :         }
   29331             :       }
   29332           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   29333           0 :         int bErr = FALSE;
   29334           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   29335           0 :         if ( bErr )
   29336             :         {
   29337           0 :           SWIG_fail;
   29338             :         }
   29339             :       }
   29340             :       else {
   29341           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29342           0 :         SWIG_fail;
   29343             :       }
   29344             :     }
   29345             :   }
   29346         329 :   {
   29347         329 :     const int bLocalUseExceptions = GetUseExceptions();
   29348         329 :     if ( bLocalUseExceptions ) {
   29349          74 :       pushErrorHandler();
   29350             :     }
   29351         329 :     {
   29352         329 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29353         329 :       result = (char **)GDALGroupHS_GetMDArrayNames(arg1,arg2);
   29354         329 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29355             :     }
   29356         329 :     if ( bLocalUseExceptions ) {
   29357          74 :       popErrorHandler();
   29358             :     }
   29359             : #ifndef SED_HACKS
   29360             :     if ( bLocalUseExceptions ) {
   29361             :       CPLErr eclass = CPLGetLastErrorType();
   29362             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29363             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29364             :       }
   29365             :     }
   29366             : #endif
   29367             :   }
   29368         329 :   {
   29369             :     /* %typemap(out) char **CSL -> ( string ) */
   29370         329 :     bool bErr = false;
   29371         329 :     resultobj = CSLToList(result, &bErr);
   29372         329 :     CSLDestroy(result);
   29373         329 :     if( bErr ) {
   29374           0 :       SWIG_fail;
   29375             :     }
   29376             :   }
   29377         329 :   {
   29378             :     /* %typemap(freearg) char **dict */
   29379         329 :     CSLDestroy( arg2 );
   29380             :   }
   29381         333 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29382             :   return resultobj;
   29383           0 : fail:
   29384           0 :   {
   29385             :     /* %typemap(freearg) char **dict */
   29386           0 :     CSLDestroy( arg2 );
   29387             :   }
   29388             :   return NULL;
   29389             : }
   29390             : 
   29391             : 
   29392           1 : SWIGINTERN PyObject *_wrap_Group_GetMDArrayFullNamesRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29393           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29394           1 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29395           1 :   char **arg2 = (char **) 0 ;
   29396           1 :   char **arg3 = (char **) 0 ;
   29397           1 :   void *argp1 = 0 ;
   29398           1 :   int res1 = 0 ;
   29399           1 :   void *argp2 = 0 ;
   29400           1 :   int res2 = 0 ;
   29401           1 :   void *argp3 = 0 ;
   29402           1 :   int res3 = 0 ;
   29403           1 :   PyObject *swig_obj[3] ;
   29404           1 :   char **result = 0 ;
   29405             :   
   29406           1 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetMDArrayFullNamesRecursive", 1, 3, swig_obj)) SWIG_fail;
   29407           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29408           1 :   if (!SWIG_IsOK(res1)) {
   29409           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29410             :   }
   29411           1 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29412           1 :   if (swig_obj[1]) {
   29413           0 :     res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_p_char, 0 |  0 );
   29414           0 :     if (!SWIG_IsOK(res2)) {
   29415           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "2"" of type '" "char **""'"); 
   29416             :     }
   29417           0 :     arg2 = reinterpret_cast< char ** >(argp2);
   29418             :   }
   29419           1 :   if (swig_obj[2]) {
   29420           0 :     res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_p_char, 0 |  0 );
   29421           0 :     if (!SWIG_IsOK(res3)) {
   29422           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "3"" of type '" "char **""'"); 
   29423             :     }
   29424           0 :     arg3 = reinterpret_cast< char ** >(argp3);
   29425             :   }
   29426           1 :   {
   29427           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29428           1 :     if ( bLocalUseExceptions ) {
   29429           1 :       pushErrorHandler();
   29430             :     }
   29431           1 :     {
   29432           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29433           1 :       result = (char **)GDALGroupHS_GetMDArrayFullNamesRecursive(arg1,arg2,arg3);
   29434           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29435             :     }
   29436           1 :     if ( bLocalUseExceptions ) {
   29437           1 :       popErrorHandler();
   29438             :     }
   29439             : #ifndef SED_HACKS
   29440             :     if ( bLocalUseExceptions ) {
   29441             :       CPLErr eclass = CPLGetLastErrorType();
   29442             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29443             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29444             :       }
   29445             :     }
   29446             : #endif
   29447             :   }
   29448           1 :   {
   29449             :     /* %typemap(out) char **CSL -> ( string ) */
   29450           1 :     bool bErr = false;
   29451           1 :     resultobj = CSLToList(result, &bErr);
   29452           1 :     CSLDestroy(result);
   29453           1 :     if( bErr ) {
   29454           0 :       SWIG_fail;
   29455             :     }
   29456             :   }
   29457           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29458             :   return resultobj;
   29459             : fail:
   29460             :   return NULL;
   29461             : }
   29462             : 
   29463             : 
   29464         806 : SWIGINTERN PyObject *_wrap_Group_OpenMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29465         806 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29466         806 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29467         806 :   char *arg2 = (char *) 0 ;
   29468         806 :   char **arg3 = (char **) 0 ;
   29469         806 :   void *argp1 = 0 ;
   29470         806 :   int res1 = 0 ;
   29471         806 :   int res2 ;
   29472         806 :   char *buf2 = 0 ;
   29473         806 :   int alloc2 = 0 ;
   29474         806 :   PyObject *swig_obj[3] ;
   29475         806 :   GDALMDArrayHS *result = 0 ;
   29476             :   
   29477         806 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenMDArray", 2, 3, swig_obj)) SWIG_fail;
   29478         806 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29479         806 :   if (!SWIG_IsOK(res1)) {
   29480           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29481             :   }
   29482         806 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29483         806 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   29484         806 :   if (!SWIG_IsOK(res2)) {
   29485           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenMDArray" "', argument " "2"" of type '" "char const *""'");
   29486             :   }
   29487         806 :   arg2 = reinterpret_cast< char * >(buf2);
   29488         806 :   if (swig_obj[2]) {
   29489          10 :     {
   29490             :       /* %typemap(in) char **dict */
   29491          10 :       arg3 = NULL;
   29492          10 :       if ( PySequence_Check( swig_obj[2] ) ) {
   29493          10 :         int bErr = FALSE;
   29494          10 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   29495          10 :         if ( bErr )
   29496             :         {
   29497           0 :           SWIG_fail;
   29498             :         }
   29499             :       }
   29500           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   29501           0 :         int bErr = FALSE;
   29502           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   29503           0 :         if ( bErr )
   29504             :         {
   29505           0 :           SWIG_fail;
   29506             :         }
   29507             :       }
   29508             :       else {
   29509           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29510           0 :         SWIG_fail;
   29511             :       }
   29512             :     }
   29513             :   }
   29514         806 :   {
   29515         806 :     if (!arg2) {
   29516           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   29517             :     }
   29518             :   }
   29519         806 :   {
   29520         806 :     const int bLocalUseExceptions = GetUseExceptions();
   29521         806 :     if ( bLocalUseExceptions ) {
   29522         227 :       pushErrorHandler();
   29523             :     }
   29524         806 :     {
   29525         806 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29526         806 :       result = (GDALMDArrayHS *)GDALGroupHS_OpenMDArray(arg1,(char const *)arg2,arg3);
   29527         806 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29528             :     }
   29529         806 :     if ( bLocalUseExceptions ) {
   29530         227 :       popErrorHandler();
   29531             :     }
   29532             : #ifndef SED_HACKS
   29533             :     if ( bLocalUseExceptions ) {
   29534             :       CPLErr eclass = CPLGetLastErrorType();
   29535             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29536             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29537             :       }
   29538             :     }
   29539             : #endif
   29540             :   }
   29541         806 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   29542         806 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29543         806 :   {
   29544             :     /* %typemap(freearg) char **dict */
   29545         806 :     CSLDestroy( arg3 );
   29546             :   }
   29547         840 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29548             :   return resultobj;
   29549           0 : fail:
   29550           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29551           0 :   {
   29552             :     /* %typemap(freearg) char **dict */
   29553           0 :     CSLDestroy( arg3 );
   29554             :   }
   29555             :   return NULL;
   29556             : }
   29557             : 
   29558             : 
   29559          16 : SWIGINTERN PyObject *_wrap_Group_OpenMDArrayFromFullname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29560          16 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29561          16 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29562          16 :   char *arg2 = (char *) 0 ;
   29563          16 :   char **arg3 = (char **) 0 ;
   29564          16 :   void *argp1 = 0 ;
   29565          16 :   int res1 = 0 ;
   29566          16 :   int res2 ;
   29567          16 :   char *buf2 = 0 ;
   29568          16 :   int alloc2 = 0 ;
   29569          16 :   PyObject *swig_obj[3] ;
   29570          16 :   GDALMDArrayHS *result = 0 ;
   29571             :   
   29572          16 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenMDArrayFromFullname", 2, 3, swig_obj)) SWIG_fail;
   29573          16 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29574          16 :   if (!SWIG_IsOK(res1)) {
   29575           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenMDArrayFromFullname" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29576             :   }
   29577          16 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29578          16 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   29579          16 :   if (!SWIG_IsOK(res2)) {
   29580           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenMDArrayFromFullname" "', argument " "2"" of type '" "char const *""'");
   29581             :   }
   29582          16 :   arg2 = reinterpret_cast< char * >(buf2);
   29583          16 :   if (swig_obj[2]) {
   29584           0 :     {
   29585             :       /* %typemap(in) char **dict */
   29586           0 :       arg3 = NULL;
   29587           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   29588           0 :         int bErr = FALSE;
   29589           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   29590           0 :         if ( bErr )
   29591             :         {
   29592           0 :           SWIG_fail;
   29593             :         }
   29594             :       }
   29595           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   29596           0 :         int bErr = FALSE;
   29597           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   29598           0 :         if ( bErr )
   29599             :         {
   29600           0 :           SWIG_fail;
   29601             :         }
   29602             :       }
   29603             :       else {
   29604           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29605           0 :         SWIG_fail;
   29606             :       }
   29607             :     }
   29608             :   }
   29609          16 :   {
   29610          16 :     if (!arg2) {
   29611           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   29612             :     }
   29613             :   }
   29614          16 :   {
   29615          16 :     const int bLocalUseExceptions = GetUseExceptions();
   29616          16 :     if ( bLocalUseExceptions ) {
   29617           8 :       pushErrorHandler();
   29618             :     }
   29619          16 :     {
   29620          16 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29621          16 :       result = (GDALMDArrayHS *)GDALGroupHS_OpenMDArrayFromFullname(arg1,(char const *)arg2,arg3);
   29622          16 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29623             :     }
   29624          16 :     if ( bLocalUseExceptions ) {
   29625           8 :       popErrorHandler();
   29626             :     }
   29627             : #ifndef SED_HACKS
   29628             :     if ( bLocalUseExceptions ) {
   29629             :       CPLErr eclass = CPLGetLastErrorType();
   29630             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29631             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29632             :       }
   29633             :     }
   29634             : #endif
   29635             :   }
   29636          16 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   29637          16 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29638          16 :   {
   29639             :     /* %typemap(freearg) char **dict */
   29640          16 :     CSLDestroy( arg3 );
   29641             :   }
   29642          18 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29643             :   return resultobj;
   29644           0 : fail:
   29645           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29646           0 :   {
   29647             :     /* %typemap(freearg) char **dict */
   29648           0 :     CSLDestroy( arg3 );
   29649             :   }
   29650             :   return NULL;
   29651             : }
   29652             : 
   29653             : 
   29654          19 : SWIGINTERN PyObject *_wrap_Group_ResolveMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29655          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29656          19 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29657          19 :   char *arg2 = (char *) 0 ;
   29658          19 :   char *arg3 = (char *) 0 ;
   29659          19 :   char **arg4 = (char **) 0 ;
   29660          19 :   void *argp1 = 0 ;
   29661          19 :   int res1 = 0 ;
   29662          19 :   int res2 ;
   29663          19 :   char *buf2 = 0 ;
   29664          19 :   int alloc2 = 0 ;
   29665          19 :   int res3 ;
   29666          19 :   char *buf3 = 0 ;
   29667          19 :   int alloc3 = 0 ;
   29668          19 :   PyObject *swig_obj[4] ;
   29669          19 :   GDALMDArrayHS *result = 0 ;
   29670             :   
   29671          19 :   if (!SWIG_Python_UnpackTuple(args, "Group_ResolveMDArray", 3, 4, swig_obj)) SWIG_fail;
   29672          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29673          19 :   if (!SWIG_IsOK(res1)) {
   29674           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_ResolveMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29675             :   }
   29676          19 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29677          19 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   29678          19 :   if (!SWIG_IsOK(res2)) {
   29679           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_ResolveMDArray" "', argument " "2"" of type '" "char const *""'");
   29680             :   }
   29681          19 :   arg2 = reinterpret_cast< char * >(buf2);
   29682          19 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   29683          19 :   if (!SWIG_IsOK(res3)) {
   29684           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_ResolveMDArray" "', argument " "3"" of type '" "char const *""'");
   29685             :   }
   29686          19 :   arg3 = reinterpret_cast< char * >(buf3);
   29687          19 :   if (swig_obj[3]) {
   29688           0 :     {
   29689             :       /* %typemap(in) char **dict */
   29690           0 :       arg4 = NULL;
   29691           0 :       if ( PySequence_Check( swig_obj[3] ) ) {
   29692           0 :         int bErr = FALSE;
   29693           0 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   29694           0 :         if ( bErr )
   29695             :         {
   29696           0 :           SWIG_fail;
   29697             :         }
   29698             :       }
   29699           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   29700           0 :         int bErr = FALSE;
   29701           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   29702           0 :         if ( bErr )
   29703             :         {
   29704           0 :           SWIG_fail;
   29705             :         }
   29706             :       }
   29707             :       else {
   29708           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29709           0 :         SWIG_fail;
   29710             :       }
   29711             :     }
   29712             :   }
   29713          19 :   {
   29714          19 :     if (!arg2) {
   29715           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   29716             :     }
   29717             :   }
   29718          19 :   {
   29719          19 :     const int bLocalUseExceptions = GetUseExceptions();
   29720          19 :     if ( bLocalUseExceptions ) {
   29721           1 :       pushErrorHandler();
   29722             :     }
   29723          19 :     {
   29724          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29725          19 :       result = (GDALMDArrayHS *)GDALGroupHS_ResolveMDArray(arg1,(char const *)arg2,(char const *)arg3,arg4);
   29726          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29727             :     }
   29728          19 :     if ( bLocalUseExceptions ) {
   29729           1 :       popErrorHandler();
   29730             :     }
   29731             : #ifndef SED_HACKS
   29732             :     if ( bLocalUseExceptions ) {
   29733             :       CPLErr eclass = CPLGetLastErrorType();
   29734             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29735             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29736             :       }
   29737             :     }
   29738             : #endif
   29739             :   }
   29740          19 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   29741          19 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29742          19 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   29743          19 :   {
   29744             :     /* %typemap(freearg) char **dict */
   29745          19 :     CSLDestroy( arg4 );
   29746             :   }
   29747          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29748             :   return resultobj;
   29749           0 : fail:
   29750           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29751           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   29752           0 :   {
   29753             :     /* %typemap(freearg) char **dict */
   29754           0 :     CSLDestroy( arg4 );
   29755             :   }
   29756             :   return NULL;
   29757             : }
   29758             : 
   29759             : 
   29760          97 : SWIGINTERN PyObject *_wrap_Group_GetGroupNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29761          97 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29762          97 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29763          97 :   char **arg2 = (char **) 0 ;
   29764          97 :   void *argp1 = 0 ;
   29765          97 :   int res1 = 0 ;
   29766          97 :   PyObject *swig_obj[2] ;
   29767          97 :   char **result = 0 ;
   29768             :   
   29769          97 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetGroupNames", 1, 2, swig_obj)) SWIG_fail;
   29770          97 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29771          97 :   if (!SWIG_IsOK(res1)) {
   29772           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetGroupNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29773             :   }
   29774          97 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29775          97 :   if (swig_obj[1]) {
   29776          97 :     {
   29777             :       /* %typemap(in) char **dict */
   29778          97 :       arg2 = NULL;
   29779          97 :       if ( PySequence_Check( swig_obj[1] ) ) {
   29780          97 :         int bErr = FALSE;
   29781          97 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   29782          97 :         if ( bErr )
   29783             :         {
   29784           0 :           SWIG_fail;
   29785             :         }
   29786             :       }
   29787           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   29788           0 :         int bErr = FALSE;
   29789           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   29790           0 :         if ( bErr )
   29791             :         {
   29792           0 :           SWIG_fail;
   29793             :         }
   29794             :       }
   29795             :       else {
   29796           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29797           0 :         SWIG_fail;
   29798             :       }
   29799             :     }
   29800             :   }
   29801          97 :   {
   29802          97 :     const int bLocalUseExceptions = GetUseExceptions();
   29803          97 :     if ( bLocalUseExceptions ) {
   29804          51 :       pushErrorHandler();
   29805             :     }
   29806          97 :     {
   29807          97 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29808          97 :       result = (char **)GDALGroupHS_GetGroupNames(arg1,arg2);
   29809          97 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29810             :     }
   29811          97 :     if ( bLocalUseExceptions ) {
   29812          51 :       popErrorHandler();
   29813             :     }
   29814             : #ifndef SED_HACKS
   29815             :     if ( bLocalUseExceptions ) {
   29816             :       CPLErr eclass = CPLGetLastErrorType();
   29817             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29818             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29819             :       }
   29820             :     }
   29821             : #endif
   29822             :   }
   29823          97 :   {
   29824             :     /* %typemap(out) char **CSL -> ( string ) */
   29825          97 :     bool bErr = false;
   29826          97 :     resultobj = CSLToList(result, &bErr);
   29827          97 :     CSLDestroy(result);
   29828          97 :     if( bErr ) {
   29829           0 :       SWIG_fail;
   29830             :     }
   29831             :   }
   29832          97 :   {
   29833             :     /* %typemap(freearg) char **dict */
   29834          97 :     CSLDestroy( arg2 );
   29835             :   }
   29836          97 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29837             :   return resultobj;
   29838           0 : fail:
   29839           0 :   {
   29840             :     /* %typemap(freearg) char **dict */
   29841           0 :     CSLDestroy( arg2 );
   29842             :   }
   29843             :   return NULL;
   29844             : }
   29845             : 
   29846             : 
   29847         163 : SWIGINTERN PyObject *_wrap_Group_OpenGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29848         163 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29849         163 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29850         163 :   char *arg2 = (char *) 0 ;
   29851         163 :   char **arg3 = (char **) 0 ;
   29852         163 :   void *argp1 = 0 ;
   29853         163 :   int res1 = 0 ;
   29854         163 :   int res2 ;
   29855         163 :   char *buf2 = 0 ;
   29856         163 :   int alloc2 = 0 ;
   29857         163 :   PyObject *swig_obj[3] ;
   29858         163 :   GDALGroupHS *result = 0 ;
   29859             :   
   29860         163 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenGroup", 2, 3, swig_obj)) SWIG_fail;
   29861         163 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29862         163 :   if (!SWIG_IsOK(res1)) {
   29863           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29864             :   }
   29865         163 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29866         163 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   29867         163 :   if (!SWIG_IsOK(res2)) {
   29868           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenGroup" "', argument " "2"" of type '" "char const *""'");
   29869             :   }
   29870         163 :   arg2 = reinterpret_cast< char * >(buf2);
   29871         163 :   if (swig_obj[2]) {
   29872           1 :     {
   29873             :       /* %typemap(in) char **dict */
   29874           1 :       arg3 = NULL;
   29875           1 :       if ( PySequence_Check( swig_obj[2] ) ) {
   29876           1 :         int bErr = FALSE;
   29877           1 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   29878           1 :         if ( bErr )
   29879             :         {
   29880           0 :           SWIG_fail;
   29881             :         }
   29882             :       }
   29883           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   29884           0 :         int bErr = FALSE;
   29885           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   29886           0 :         if ( bErr )
   29887             :         {
   29888           0 :           SWIG_fail;
   29889             :         }
   29890             :       }
   29891             :       else {
   29892           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29893           0 :         SWIG_fail;
   29894             :       }
   29895             :     }
   29896             :   }
   29897         163 :   {
   29898         163 :     if (!arg2) {
   29899           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   29900             :     }
   29901             :   }
   29902         163 :   {
   29903         163 :     const int bLocalUseExceptions = GetUseExceptions();
   29904         163 :     if ( bLocalUseExceptions ) {
   29905          97 :       pushErrorHandler();
   29906             :     }
   29907         163 :     {
   29908         163 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29909         163 :       result = (GDALGroupHS *)GDALGroupHS_OpenGroup(arg1,(char const *)arg2,arg3);
   29910         163 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29911             :     }
   29912         163 :     if ( bLocalUseExceptions ) {
   29913          97 :       popErrorHandler();
   29914             :     }
   29915             : #ifndef SED_HACKS
   29916             :     if ( bLocalUseExceptions ) {
   29917             :       CPLErr eclass = CPLGetLastErrorType();
   29918             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29919             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29920             :       }
   29921             :     }
   29922             : #endif
   29923             :   }
   29924         163 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   29925         163 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29926         163 :   {
   29927             :     /* %typemap(freearg) char **dict */
   29928         163 :     CSLDestroy( arg3 );
   29929             :   }
   29930         187 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29931             :   return resultobj;
   29932           0 : fail:
   29933           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29934           0 :   {
   29935             :     /* %typemap(freearg) char **dict */
   29936           0 :     CSLDestroy( arg3 );
   29937             :   }
   29938             :   return NULL;
   29939             : }
   29940             : 
   29941             : 
   29942           3 : SWIGINTERN PyObject *_wrap_Group_OpenGroupFromFullname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29943           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29944           3 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29945           3 :   char *arg2 = (char *) 0 ;
   29946           3 :   char **arg3 = (char **) 0 ;
   29947           3 :   void *argp1 = 0 ;
   29948           3 :   int res1 = 0 ;
   29949           3 :   int res2 ;
   29950           3 :   char *buf2 = 0 ;
   29951           3 :   int alloc2 = 0 ;
   29952           3 :   PyObject *swig_obj[3] ;
   29953           3 :   GDALGroupHS *result = 0 ;
   29954             :   
   29955           3 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenGroupFromFullname", 2, 3, swig_obj)) SWIG_fail;
   29956           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29957           3 :   if (!SWIG_IsOK(res1)) {
   29958           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenGroupFromFullname" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29959             :   }
   29960           3 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29961           3 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   29962           3 :   if (!SWIG_IsOK(res2)) {
   29963           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenGroupFromFullname" "', argument " "2"" of type '" "char const *""'");
   29964             :   }
   29965           3 :   arg2 = reinterpret_cast< char * >(buf2);
   29966           3 :   if (swig_obj[2]) {
   29967           0 :     {
   29968             :       /* %typemap(in) char **dict */
   29969           0 :       arg3 = NULL;
   29970           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   29971           0 :         int bErr = FALSE;
   29972           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   29973           0 :         if ( bErr )
   29974             :         {
   29975           0 :           SWIG_fail;
   29976             :         }
   29977             :       }
   29978           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   29979           0 :         int bErr = FALSE;
   29980           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   29981           0 :         if ( bErr )
   29982             :         {
   29983           0 :           SWIG_fail;
   29984             :         }
   29985             :       }
   29986             :       else {
   29987           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29988           0 :         SWIG_fail;
   29989             :       }
   29990             :     }
   29991             :   }
   29992           3 :   {
   29993           3 :     if (!arg2) {
   29994           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   29995             :     }
   29996             :   }
   29997           3 :   {
   29998           3 :     const int bLocalUseExceptions = GetUseExceptions();
   29999           3 :     if ( bLocalUseExceptions ) {
   30000           1 :       pushErrorHandler();
   30001             :     }
   30002           3 :     {
   30003           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30004           3 :       result = (GDALGroupHS *)GDALGroupHS_OpenGroupFromFullname(arg1,(char const *)arg2,arg3);
   30005           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30006             :     }
   30007           3 :     if ( bLocalUseExceptions ) {
   30008           1 :       popErrorHandler();
   30009             :     }
   30010             : #ifndef SED_HACKS
   30011             :     if ( bLocalUseExceptions ) {
   30012             :       CPLErr eclass = CPLGetLastErrorType();
   30013             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30014             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30015             :       }
   30016             :     }
   30017             : #endif
   30018             :   }
   30019           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   30020           3 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30021           3 :   {
   30022             :     /* %typemap(freearg) char **dict */
   30023           3 :     CSLDestroy( arg3 );
   30024             :   }
   30025           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   30026             :   return resultobj;
   30027           0 : fail:
   30028           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30029           0 :   {
   30030             :     /* %typemap(freearg) char **dict */
   30031           0 :     CSLDestroy( arg3 );
   30032             :   }
   30033             :   return NULL;
   30034             : }
   30035             : 
   30036             : 
   30037           8 : SWIGINTERN PyObject *_wrap_Group_GetVectorLayerNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30038           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30039           8 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30040           8 :   char **arg2 = (char **) 0 ;
   30041           8 :   void *argp1 = 0 ;
   30042           8 :   int res1 = 0 ;
   30043           8 :   PyObject *swig_obj[2] ;
   30044           8 :   char **result = 0 ;
   30045             :   
   30046           8 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetVectorLayerNames", 1, 2, swig_obj)) SWIG_fail;
   30047           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30048           8 :   if (!SWIG_IsOK(res1)) {
   30049           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetVectorLayerNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30050             :   }
   30051           8 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30052           8 :   if (swig_obj[1]) {
   30053           0 :     {
   30054             :       /* %typemap(in) char **dict */
   30055           0 :       arg2 = NULL;
   30056           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30057           0 :         int bErr = FALSE;
   30058           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   30059           0 :         if ( bErr )
   30060             :         {
   30061           0 :           SWIG_fail;
   30062             :         }
   30063             :       }
   30064           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30065           0 :         int bErr = FALSE;
   30066           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   30067           0 :         if ( bErr )
   30068             :         {
   30069           0 :           SWIG_fail;
   30070             :         }
   30071             :       }
   30072             :       else {
   30073           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30074           0 :         SWIG_fail;
   30075             :       }
   30076             :     }
   30077             :   }
   30078           8 :   {
   30079           8 :     const int bLocalUseExceptions = GetUseExceptions();
   30080           8 :     if ( bLocalUseExceptions ) {
   30081           0 :       pushErrorHandler();
   30082             :     }
   30083           8 :     {
   30084           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30085           8 :       result = (char **)GDALGroupHS_GetVectorLayerNames(arg1,arg2);
   30086           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30087             :     }
   30088           8 :     if ( bLocalUseExceptions ) {
   30089           0 :       popErrorHandler();
   30090             :     }
   30091             : #ifndef SED_HACKS
   30092             :     if ( bLocalUseExceptions ) {
   30093             :       CPLErr eclass = CPLGetLastErrorType();
   30094             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30095             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30096             :       }
   30097             :     }
   30098             : #endif
   30099             :   }
   30100           8 :   {
   30101             :     /* %typemap(out) char **CSL -> ( string ) */
   30102           8 :     bool bErr = false;
   30103           8 :     resultobj = CSLToList(result, &bErr);
   30104           8 :     CSLDestroy(result);
   30105           8 :     if( bErr ) {
   30106           0 :       SWIG_fail;
   30107             :     }
   30108             :   }
   30109           8 :   {
   30110             :     /* %typemap(freearg) char **dict */
   30111           8 :     CSLDestroy( arg2 );
   30112             :   }
   30113           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   30114             :   return resultobj;
   30115           0 : fail:
   30116           0 :   {
   30117             :     /* %typemap(freearg) char **dict */
   30118           0 :     CSLDestroy( arg2 );
   30119             :   }
   30120             :   return NULL;
   30121             : }
   30122             : 
   30123             : 
   30124          12 : SWIGINTERN PyObject *_wrap_Group_OpenVectorLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30125          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30126          12 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30127          12 :   char *arg2 = (char *) 0 ;
   30128          12 :   char **arg3 = (char **) 0 ;
   30129          12 :   void *argp1 = 0 ;
   30130          12 :   int res1 = 0 ;
   30131          12 :   int res2 ;
   30132          12 :   char *buf2 = 0 ;
   30133          12 :   int alloc2 = 0 ;
   30134          12 :   PyObject *swig_obj[3] ;
   30135          12 :   OGRLayerShadow *result = 0 ;
   30136             :   
   30137          12 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenVectorLayer", 2, 3, swig_obj)) SWIG_fail;
   30138          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30139          12 :   if (!SWIG_IsOK(res1)) {
   30140           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenVectorLayer" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30141             :   }
   30142          12 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30143          12 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30144          12 :   if (!SWIG_IsOK(res2)) {
   30145           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenVectorLayer" "', argument " "2"" of type '" "char const *""'");
   30146             :   }
   30147          12 :   arg2 = reinterpret_cast< char * >(buf2);
   30148          12 :   if (swig_obj[2]) {
   30149           0 :     {
   30150             :       /* %typemap(in) char **dict */
   30151           0 :       arg3 = NULL;
   30152           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   30153           0 :         int bErr = FALSE;
   30154           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   30155           0 :         if ( bErr )
   30156             :         {
   30157           0 :           SWIG_fail;
   30158             :         }
   30159             :       }
   30160           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   30161           0 :         int bErr = FALSE;
   30162           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   30163           0 :         if ( bErr )
   30164             :         {
   30165           0 :           SWIG_fail;
   30166             :         }
   30167             :       }
   30168             :       else {
   30169           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30170           0 :         SWIG_fail;
   30171             :       }
   30172             :     }
   30173             :   }
   30174          12 :   {
   30175          12 :     if (!arg2) {
   30176           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30177             :     }
   30178             :   }
   30179          12 :   {
   30180          12 :     const int bLocalUseExceptions = GetUseExceptions();
   30181          12 :     if ( bLocalUseExceptions ) {
   30182           1 :       pushErrorHandler();
   30183             :     }
   30184          12 :     {
   30185          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30186          12 :       result = (OGRLayerShadow *)GDALGroupHS_OpenVectorLayer(arg1,(char const *)arg2,arg3);
   30187          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30188             :     }
   30189          12 :     if ( bLocalUseExceptions ) {
   30190           1 :       popErrorHandler();
   30191             :     }
   30192             : #ifndef SED_HACKS
   30193             :     if ( bLocalUseExceptions ) {
   30194             :       CPLErr eclass = CPLGetLastErrorType();
   30195             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30196             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30197             :       }
   30198             :     }
   30199             : #endif
   30200             :   }
   30201          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   30202          12 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30203          12 :   {
   30204             :     /* %typemap(freearg) char **dict */
   30205          12 :     CSLDestroy( arg3 );
   30206             :   }
   30207          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   30208             :   return resultobj;
   30209           0 : fail:
   30210           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30211           0 :   {
   30212             :     /* %typemap(freearg) char **dict */
   30213           0 :     CSLDestroy( arg3 );
   30214             :   }
   30215             :   return NULL;
   30216             : }
   30217             : 
   30218             : 
   30219          73 : SWIGINTERN PyObject *_wrap_Group_GetDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30220          73 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30221          73 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30222          73 :   GDALDimensionHS ***arg2 = (GDALDimensionHS ***) 0 ;
   30223          73 :   size_t *arg3 = (size_t *) 0 ;
   30224          73 :   char **arg4 = (char **) 0 ;
   30225          73 :   void *argp1 = 0 ;
   30226          73 :   int res1 = 0 ;
   30227          73 :   GDALDimensionHS **dims2 = 0 ;
   30228          73 :   size_t nCount2 = 0 ;
   30229          73 :   PyObject *swig_obj[2] ;
   30230             :   
   30231          73 :   {
   30232             :     /* %typemap(in,numinputs=0) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30233          73 :     arg2 = &dims2;
   30234          73 :     arg3 = &nCount2;
   30235             :   }
   30236          73 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetDimensions", 1, 2, swig_obj)) SWIG_fail;
   30237          73 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30238          73 :   if (!SWIG_IsOK(res1)) {
   30239           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDimensions" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30240             :   }
   30241          73 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30242          73 :   if (swig_obj[1]) {
   30243           0 :     {
   30244             :       /* %typemap(in) char **dict */
   30245           0 :       arg4 = NULL;
   30246           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30247           0 :         int bErr = FALSE;
   30248           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   30249           0 :         if ( bErr )
   30250             :         {
   30251           0 :           SWIG_fail;
   30252             :         }
   30253             :       }
   30254           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30255           0 :         int bErr = FALSE;
   30256           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   30257           0 :         if ( bErr )
   30258             :         {
   30259           0 :           SWIG_fail;
   30260             :         }
   30261             :       }
   30262             :       else {
   30263           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30264           0 :         SWIG_fail;
   30265             :       }
   30266             :     }
   30267             :   }
   30268          73 :   {
   30269          73 :     const int bLocalUseExceptions = GetUseExceptions();
   30270          73 :     if ( bLocalUseExceptions ) {
   30271          40 :       pushErrorHandler();
   30272             :     }
   30273          73 :     {
   30274          73 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30275          73 :       GDALGroupHS_GetDimensions(arg1,arg2,arg3,arg4);
   30276          73 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30277             :     }
   30278          73 :     if ( bLocalUseExceptions ) {
   30279          40 :       popErrorHandler();
   30280             :     }
   30281             : #ifndef SED_HACKS
   30282             :     if ( bLocalUseExceptions ) {
   30283             :       CPLErr eclass = CPLGetLastErrorType();
   30284             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30285             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30286             :       }
   30287             :     }
   30288             : #endif
   30289             :   }
   30290          73 :   resultobj = SWIG_Py_Void();
   30291          73 :   {
   30292             :     /* %typemap(argout) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30293          73 :     Py_DECREF(resultobj);
   30294          73 :     resultobj = PyList_New( *arg3 );
   30295          73 :     if( !resultobj ) {
   30296           0 :       SWIG_fail;
   30297             :     }
   30298         230 :     for( size_t i = 0; i < *arg3; i++ ) {
   30299         157 :       PyList_SetItem(resultobj, i,
   30300         157 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALDimensionHS,SWIG_POINTER_OWN) );
   30301             :       /* We have borrowed the GDALDimensionHS */
   30302         157 :       (*arg2)[i] = NULL;
   30303             :     }
   30304             :   }
   30305          73 :   {
   30306             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30307          73 :     GDALReleaseDimensions(*arg2, *arg3);
   30308             :   }
   30309          73 :   {
   30310             :     /* %typemap(freearg) char **dict */
   30311          73 :     CSLDestroy( arg4 );
   30312             :   }
   30313          73 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   30314             :   return resultobj;
   30315           0 : fail:
   30316           0 :   {
   30317             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30318           0 :     GDALReleaseDimensions(*arg2, *arg3);
   30319             :   }
   30320           0 :   {
   30321             :     /* %typemap(freearg) char **dict */
   30322           0 :     CSLDestroy( arg4 );
   30323             :   }
   30324             :   return NULL;
   30325             : }
   30326             : 
   30327             : 
   30328          80 : SWIGINTERN PyObject *_wrap_Group_GetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30329          80 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30330          80 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30331          80 :   char *arg2 = (char *) 0 ;
   30332          80 :   void *argp1 = 0 ;
   30333          80 :   int res1 = 0 ;
   30334          80 :   int res2 ;
   30335          80 :   char *buf2 = 0 ;
   30336          80 :   int alloc2 = 0 ;
   30337          80 :   PyObject *swig_obj[2] ;
   30338          80 :   GDALAttributeHS *result = 0 ;
   30339             :   
   30340          80 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetAttribute", 2, 2, swig_obj)) SWIG_fail;
   30341          80 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30342          80 :   if (!SWIG_IsOK(res1)) {
   30343           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30344             :   }
   30345          80 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30346          80 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30347          80 :   if (!SWIG_IsOK(res2)) {
   30348           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_GetAttribute" "', argument " "2"" of type '" "char const *""'");
   30349             :   }
   30350          80 :   arg2 = reinterpret_cast< char * >(buf2);
   30351          80 :   {
   30352          80 :     if (!arg2) {
   30353           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30354             :     }
   30355             :   }
   30356          80 :   {
   30357          80 :     const int bLocalUseExceptions = GetUseExceptions();
   30358          80 :     if ( bLocalUseExceptions ) {
   30359          22 :       pushErrorHandler();
   30360             :     }
   30361          80 :     {
   30362          80 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30363          80 :       result = (GDALAttributeHS *)GDALGroupHS_GetAttribute(arg1,(char const *)arg2);
   30364          80 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30365             :     }
   30366          80 :     if ( bLocalUseExceptions ) {
   30367          22 :       popErrorHandler();
   30368             :     }
   30369             : #ifndef SED_HACKS
   30370             :     if ( bLocalUseExceptions ) {
   30371             :       CPLErr eclass = CPLGetLastErrorType();
   30372             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30373             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30374             :       }
   30375             :     }
   30376             : #endif
   30377             :   }
   30378          80 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   30379          80 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30380          84 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   30381             :   return resultobj;
   30382           0 : fail:
   30383           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30384             :   return NULL;
   30385             : }
   30386             : 
   30387             : 
   30388          71 : SWIGINTERN PyObject *_wrap_Group_GetAttributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30389          71 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30390          71 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30391          71 :   GDALAttributeHS ***arg2 = (GDALAttributeHS ***) 0 ;
   30392          71 :   size_t *arg3 = (size_t *) 0 ;
   30393          71 :   char **arg4 = (char **) 0 ;
   30394          71 :   void *argp1 = 0 ;
   30395          71 :   int res1 = 0 ;
   30396          71 :   GDALAttributeHS **attrs2 = 0 ;
   30397          71 :   size_t nCount2 = 0 ;
   30398          71 :   PyObject *swig_obj[2] ;
   30399             :   
   30400          71 :   {
   30401             :     /* %typemap(in,numinputs=0) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30402          71 :     arg2 = &attrs2;
   30403          71 :     arg3 = &nCount2;
   30404             :   }
   30405          71 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetAttributes", 1, 2, swig_obj)) SWIG_fail;
   30406          71 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30407          71 :   if (!SWIG_IsOK(res1)) {
   30408           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetAttributes" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30409             :   }
   30410          71 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30411          71 :   if (swig_obj[1]) {
   30412           0 :     {
   30413             :       /* %typemap(in) char **dict */
   30414           0 :       arg4 = NULL;
   30415           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30416           0 :         int bErr = FALSE;
   30417           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   30418           0 :         if ( bErr )
   30419             :         {
   30420           0 :           SWIG_fail;
   30421             :         }
   30422             :       }
   30423           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30424           0 :         int bErr = FALSE;
   30425           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   30426           0 :         if ( bErr )
   30427             :         {
   30428           0 :           SWIG_fail;
   30429             :         }
   30430             :       }
   30431             :       else {
   30432           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30433           0 :         SWIG_fail;
   30434             :       }
   30435             :     }
   30436             :   }
   30437          71 :   {
   30438          71 :     const int bLocalUseExceptions = GetUseExceptions();
   30439          71 :     if ( bLocalUseExceptions ) {
   30440          35 :       pushErrorHandler();
   30441             :     }
   30442          71 :     {
   30443          71 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30444          71 :       GDALGroupHS_GetAttributes(arg1,arg2,arg3,arg4);
   30445          71 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30446             :     }
   30447          71 :     if ( bLocalUseExceptions ) {
   30448          35 :       popErrorHandler();
   30449             :     }
   30450             : #ifndef SED_HACKS
   30451             :     if ( bLocalUseExceptions ) {
   30452             :       CPLErr eclass = CPLGetLastErrorType();
   30453             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30454             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30455             :       }
   30456             :     }
   30457             : #endif
   30458             :   }
   30459          71 :   resultobj = SWIG_Py_Void();
   30460          71 :   {
   30461             :     /* %typemap(argout) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30462          71 :     Py_DECREF(resultobj);
   30463          71 :     resultobj = PyList_New( *arg3 );
   30464          71 :     if( !resultobj ) {
   30465           0 :       SWIG_fail;
   30466             :     }
   30467         229 :     for( size_t i = 0; i < *arg3; i++ ) {
   30468         158 :       PyList_SetItem(resultobj, i,
   30469         158 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALAttributeHS,SWIG_POINTER_OWN) );
   30470             :       /* We have borrowed the GDALAttributeHS */
   30471         158 :       (*arg2)[i] = NULL;
   30472             :     }
   30473             :   }
   30474          71 :   {
   30475             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30476          71 :     GDALReleaseAttributes(*arg2, *arg3);
   30477             :   }
   30478          71 :   {
   30479             :     /* %typemap(freearg) char **dict */
   30480          71 :     CSLDestroy( arg4 );
   30481             :   }
   30482          71 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   30483             :   return resultobj;
   30484           0 : fail:
   30485           0 :   {
   30486             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30487           0 :     GDALReleaseAttributes(*arg2, *arg3);
   30488             :   }
   30489           0 :   {
   30490             :     /* %typemap(freearg) char **dict */
   30491           0 :     CSLDestroy( arg4 );
   30492             :   }
   30493             :   return NULL;
   30494             : }
   30495             : 
   30496             : 
   30497           4 : SWIGINTERN PyObject *_wrap_Group_GetStructuralInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30498           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30499           4 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30500           4 :   void *argp1 = 0 ;
   30501           4 :   int res1 = 0 ;
   30502           4 :   PyObject *swig_obj[1] ;
   30503           4 :   char **result = 0 ;
   30504             :   
   30505           4 :   if (!args) SWIG_fail;
   30506           4 :   swig_obj[0] = args;
   30507           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30508           4 :   if (!SWIG_IsOK(res1)) {
   30509           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetStructuralInfo" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30510             :   }
   30511           4 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30512           4 :   {
   30513           4 :     const int bLocalUseExceptions = GetUseExceptions();
   30514           4 :     if ( bLocalUseExceptions ) {
   30515           0 :       pushErrorHandler();
   30516             :     }
   30517           4 :     {
   30518           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30519           4 :       result = (char **)GDALGroupHS_GetStructuralInfo(arg1);
   30520           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30521             :     }
   30522           4 :     if ( bLocalUseExceptions ) {
   30523           0 :       popErrorHandler();
   30524             :     }
   30525             : #ifndef SED_HACKS
   30526             :     if ( bLocalUseExceptions ) {
   30527             :       CPLErr eclass = CPLGetLastErrorType();
   30528             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30529             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30530             :       }
   30531             :     }
   30532             : #endif
   30533             :   }
   30534           4 :   {
   30535             :     /* %typemap(out) char **dict */
   30536           4 :     resultobj = GetCSLStringAsPyDict(result, false);
   30537             :   }
   30538           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   30539             :   return resultobj;
   30540             : fail:
   30541             :   return NULL;
   30542             : }
   30543             : 
   30544             : 
   30545         177 : SWIGINTERN PyObject *_wrap_Group_CreateGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   30546         177 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30547         177 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30548         177 :   char *arg2 = (char *) 0 ;
   30549         177 :   char **arg3 = (char **) 0 ;
   30550         177 :   void *argp1 = 0 ;
   30551         177 :   int res1 = 0 ;
   30552         177 :   int res2 ;
   30553         177 :   char *buf2 = 0 ;
   30554         177 :   int alloc2 = 0 ;
   30555         177 :   PyObject * obj0 = 0 ;
   30556         177 :   PyObject * obj1 = 0 ;
   30557         177 :   PyObject * obj2 = 0 ;
   30558         177 :   char * kwnames[] = {
   30559             :     (char *)"self",  (char *)"name",  (char *)"options",  NULL 
   30560             :   };
   30561         177 :   GDALGroupHS *result = 0 ;
   30562             :   
   30563         177 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Group_CreateGroup", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   30564         177 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30565         177 :   if (!SWIG_IsOK(res1)) {
   30566           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30567             :   }
   30568         177 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30569         177 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   30570         177 :   if (!SWIG_IsOK(res2)) {
   30571           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateGroup" "', argument " "2"" of type '" "char const *""'");
   30572             :   }
   30573         177 :   arg2 = reinterpret_cast< char * >(buf2);
   30574         177 :   if (obj2) {
   30575           0 :     {
   30576             :       /* %typemap(in) char **dict */
   30577           0 :       arg3 = NULL;
   30578           0 :       if ( PySequence_Check( obj2 ) ) {
   30579           0 :         int bErr = FALSE;
   30580           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   30581           0 :         if ( bErr )
   30582             :         {
   30583           0 :           SWIG_fail;
   30584             :         }
   30585             :       }
   30586           0 :       else if ( PyMapping_Check( obj2 ) ) {
   30587           0 :         int bErr = FALSE;
   30588           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   30589           0 :         if ( bErr )
   30590             :         {
   30591           0 :           SWIG_fail;
   30592             :         }
   30593             :       }
   30594             :       else {
   30595           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30596           0 :         SWIG_fail;
   30597             :       }
   30598             :     }
   30599             :   }
   30600         177 :   {
   30601         177 :     if (!arg2) {
   30602           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30603             :     }
   30604             :   }
   30605         176 :   {
   30606         176 :     const int bLocalUseExceptions = GetUseExceptions();
   30607         176 :     if ( bLocalUseExceptions ) {
   30608          89 :       pushErrorHandler();
   30609             :     }
   30610         176 :     {
   30611         176 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30612         176 :       result = (GDALGroupHS *)GDALGroupHS_CreateGroup(arg1,(char const *)arg2,arg3);
   30613         176 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30614             :     }
   30615         176 :     if ( bLocalUseExceptions ) {
   30616          89 :       popErrorHandler();
   30617             :     }
   30618             : #ifndef SED_HACKS
   30619             :     if ( bLocalUseExceptions ) {
   30620             :       CPLErr eclass = CPLGetLastErrorType();
   30621             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30622             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30623             :       }
   30624             :     }
   30625             : #endif
   30626             :   }
   30627         176 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   30628         176 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30629         176 :   {
   30630             :     /* %typemap(freearg) char **dict */
   30631         176 :     CSLDestroy( arg3 );
   30632             :   }
   30633         183 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   30634             :   return resultobj;
   30635           1 : fail:
   30636           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30637           1 :   {
   30638             :     /* %typemap(freearg) char **dict */
   30639           1 :     CSLDestroy( arg3 );
   30640             :   }
   30641             :   return NULL;
   30642             : }
   30643             : 
   30644             : 
   30645          20 : SWIGINTERN PyObject *_wrap_Group_DeleteGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30646          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30647          20 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30648          20 :   char *arg2 = (char *) 0 ;
   30649          20 :   char **arg3 = (char **) 0 ;
   30650          20 :   void *argp1 = 0 ;
   30651          20 :   int res1 = 0 ;
   30652          20 :   int res2 ;
   30653          20 :   char *buf2 = 0 ;
   30654          20 :   int alloc2 = 0 ;
   30655          20 :   PyObject *swig_obj[3] ;
   30656          20 :   CPLErr result;
   30657             :   
   30658          20 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteGroup", 2, 3, swig_obj)) SWIG_fail;
   30659          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30660          20 :   if (!SWIG_IsOK(res1)) {
   30661           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30662             :   }
   30663          20 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30664          20 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30665          20 :   if (!SWIG_IsOK(res2)) {
   30666           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteGroup" "', argument " "2"" of type '" "char const *""'");
   30667             :   }
   30668          20 :   arg2 = reinterpret_cast< char * >(buf2);
   30669          20 :   if (swig_obj[2]) {
   30670           0 :     {
   30671             :       /* %typemap(in) char **dict */
   30672           0 :       arg3 = NULL;
   30673           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   30674           0 :         int bErr = FALSE;
   30675           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   30676           0 :         if ( bErr )
   30677             :         {
   30678           0 :           SWIG_fail;
   30679             :         }
   30680             :       }
   30681           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   30682           0 :         int bErr = FALSE;
   30683           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   30684           0 :         if ( bErr )
   30685             :         {
   30686           0 :           SWIG_fail;
   30687             :         }
   30688             :       }
   30689             :       else {
   30690           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30691           0 :         SWIG_fail;
   30692             :       }
   30693             :     }
   30694             :   }
   30695          20 :   {
   30696          20 :     if (!arg2) {
   30697           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30698             :     }
   30699             :   }
   30700          20 :   {
   30701          20 :     const int bLocalUseExceptions = GetUseExceptions();
   30702          20 :     if ( bLocalUseExceptions ) {
   30703          20 :       pushErrorHandler();
   30704             :     }
   30705          20 :     {
   30706          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30707          20 :       result = (CPLErr)GDALGroupHS_DeleteGroup(arg1,(char const *)arg2,arg3);
   30708          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30709             :     }
   30710          20 :     if ( bLocalUseExceptions ) {
   30711          20 :       popErrorHandler();
   30712             :     }
   30713             : #ifndef SED_HACKS
   30714             :     if ( bLocalUseExceptions ) {
   30715             :       CPLErr eclass = CPLGetLastErrorType();
   30716             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30717             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30718             :       }
   30719             :     }
   30720             : #endif
   30721             :   }
   30722          20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   30723          20 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30724          20 :   {
   30725             :     /* %typemap(freearg) char **dict */
   30726          20 :     CSLDestroy( arg3 );
   30727             :   }
   30728          46 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   30729             :   return resultobj;
   30730           0 : fail:
   30731           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30732           0 :   {
   30733             :     /* %typemap(freearg) char **dict */
   30734           0 :     CSLDestroy( arg3 );
   30735             :   }
   30736             :   return NULL;
   30737             : }
   30738             : 
   30739             : 
   30740         654 : SWIGINTERN PyObject *_wrap_Group_CreateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   30741         654 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30742         654 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30743         654 :   char *arg2 = (char *) 0 ;
   30744         654 :   char *arg3 = (char *) 0 ;
   30745         654 :   char *arg4 = (char *) 0 ;
   30746         654 :   GUIntBig arg5 ;
   30747         654 :   char **arg6 = (char **) 0 ;
   30748         654 :   void *argp1 = 0 ;
   30749         654 :   int res1 = 0 ;
   30750         654 :   int res2 ;
   30751         654 :   char *buf2 = 0 ;
   30752         654 :   int alloc2 = 0 ;
   30753         654 :   int res3 ;
   30754         654 :   char *buf3 = 0 ;
   30755         654 :   int alloc3 = 0 ;
   30756         654 :   int res4 ;
   30757         654 :   char *buf4 = 0 ;
   30758         654 :   int alloc4 = 0 ;
   30759         654 :   PyObject * obj0 = 0 ;
   30760         654 :   PyObject * obj1 = 0 ;
   30761         654 :   PyObject * obj2 = 0 ;
   30762         654 :   PyObject * obj3 = 0 ;
   30763         654 :   PyObject * obj4 = 0 ;
   30764         654 :   PyObject * obj5 = 0 ;
   30765         654 :   char * kwnames[] = {
   30766             :     (char *)"self",  (char *)"name",  (char *)"dim_type",  (char *)"direction",  (char *)"size",  (char *)"options",  NULL 
   30767             :   };
   30768         654 :   GDALDimensionHS *result = 0 ;
   30769             :   
   30770         654 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|O:Group_CreateDimension", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
   30771         654 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30772         654 :   if (!SWIG_IsOK(res1)) {
   30773           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateDimension" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30774             :   }
   30775         654 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30776         654 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   30777         654 :   if (!SWIG_IsOK(res2)) {
   30778           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateDimension" "', argument " "2"" of type '" "char const *""'");
   30779             :   }
   30780         654 :   arg2 = reinterpret_cast< char * >(buf2);
   30781         654 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   30782         654 :   if (!SWIG_IsOK(res3)) {
   30783           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_CreateDimension" "', argument " "3"" of type '" "char const *""'");
   30784             :   }
   30785         654 :   arg3 = reinterpret_cast< char * >(buf3);
   30786         654 :   res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   30787         654 :   if (!SWIG_IsOK(res4)) {
   30788           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Group_CreateDimension" "', argument " "4"" of type '" "char const *""'");
   30789             :   }
   30790         654 :   arg4 = reinterpret_cast< char * >(buf4);
   30791         654 :   {
   30792         654 :     arg5 = (GIntBig)PyLong_AsUnsignedLongLong(obj4);
   30793             :   }
   30794         654 :   if (obj5) {
   30795           7 :     {
   30796             :       /* %typemap(in) char **dict */
   30797           7 :       arg6 = NULL;
   30798           7 :       if ( PySequence_Check( obj5 ) ) {
   30799           7 :         int bErr = FALSE;
   30800           7 :         arg6 = CSLFromPySequence(obj5, &bErr);
   30801           7 :         if ( bErr )
   30802             :         {
   30803           0 :           SWIG_fail;
   30804             :         }
   30805             :       }
   30806           0 :       else if ( PyMapping_Check( obj5 ) ) {
   30807           0 :         int bErr = FALSE;
   30808           0 :         arg6 = CSLFromPyMapping(obj5, &bErr);
   30809           0 :         if ( bErr )
   30810             :         {
   30811           0 :           SWIG_fail;
   30812             :         }
   30813             :       }
   30814             :       else {
   30815           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30816           0 :         SWIG_fail;
   30817             :       }
   30818             :     }
   30819             :   }
   30820         654 :   {
   30821         654 :     if (!arg2) {
   30822           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30823             :     }
   30824             :   }
   30825         654 :   {
   30826         654 :     const int bLocalUseExceptions = GetUseExceptions();
   30827         654 :     if ( bLocalUseExceptions ) {
   30828         114 :       pushErrorHandler();
   30829             :     }
   30830         654 :     {
   30831         654 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30832         654 :       result = (GDALDimensionHS *)GDALGroupHS_CreateDimension(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6);
   30833         654 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30834             :     }
   30835         654 :     if ( bLocalUseExceptions ) {
   30836         114 :       popErrorHandler();
   30837             :     }
   30838             : #ifndef SED_HACKS
   30839             :     if ( bLocalUseExceptions ) {
   30840             :       CPLErr eclass = CPLGetLastErrorType();
   30841             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30842             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30843             :       }
   30844             :     }
   30845             : #endif
   30846             :   }
   30847         654 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_OWN |  0 );
   30848         654 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30849         654 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   30850         654 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   30851         654 :   {
   30852             :     /* %typemap(freearg) char **dict */
   30853         654 :     CSLDestroy( arg6 );
   30854             :   }
   30855         654 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   30856             :   return resultobj;
   30857           0 : fail:
   30858           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30859           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   30860           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   30861           0 :   {
   30862             :     /* %typemap(freearg) char **dict */
   30863           0 :     CSLDestroy( arg6 );
   30864             :   }
   30865             :   return NULL;
   30866             : }
   30867             : 
   30868             : 
   30869         608 : SWIGINTERN PyObject *_wrap_Group_CreateMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30870         608 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30871         608 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30872         608 :   char *arg2 = (char *) 0 ;
   30873         608 :   int arg3 ;
   30874         608 :   GDALDimensionHS **arg4 = (GDALDimensionHS **) 0 ;
   30875         608 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   30876         608 :   char **arg6 = (char **) 0 ;
   30877         608 :   void *argp1 = 0 ;
   30878         608 :   int res1 = 0 ;
   30879         608 :   int res2 ;
   30880         608 :   char *buf2 = 0 ;
   30881         608 :   int alloc2 = 0 ;
   30882         608 :   void *argp5 = 0 ;
   30883         608 :   int res5 = 0 ;
   30884         608 :   PyObject *swig_obj[5] ;
   30885         608 :   GDALMDArrayHS *result = 0 ;
   30886             :   
   30887         608 :   if (!SWIG_Python_UnpackTuple(args, "Group_CreateMDArray", 4, 5, swig_obj)) SWIG_fail;
   30888         608 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30889         608 :   if (!SWIG_IsOK(res1)) {
   30890           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30891             :   }
   30892         608 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30893         608 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30894         608 :   if (!SWIG_IsOK(res2)) {
   30895           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateMDArray" "', argument " "2"" of type '" "char const *""'");
   30896             :   }
   30897         608 :   arg2 = reinterpret_cast< char * >(buf2);
   30898         608 :   {
   30899             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDimensionHS *optional_##GDALDimensionHS)*/
   30900         608 :     if ( !PySequence_Check(swig_obj[2]) ) {
   30901           1 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   30902           1 :       SWIG_fail;
   30903             :     }
   30904         607 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   30905         607 :     if( size > (Py_ssize_t)INT_MAX ) {
   30906           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   30907           0 :       SWIG_fail;
   30908             :     }
   30909         607 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDimensionHS*) ) {
   30910           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   30911           0 :       SWIG_fail;
   30912             :     }
   30913         607 :     arg3 = (int)size;
   30914         607 :     arg4 = (GDALDimensionHS**) VSIMalloc(arg3*sizeof(GDALDimensionHS*));
   30915         607 :     if( !arg4) {
   30916           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   30917           0 :       SWIG_fail;
   30918             :     }
   30919             :     
   30920        1419 :     for( int i = 0; i<arg3; i++ ) {
   30921         814 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   30922         814 :       GDALDimensionHS* rawobjectpointer = NULL;
   30923         814 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_EXCEPTION | 0 ));
   30924         814 :       if (!rawobjectpointer) {
   30925           2 :         Py_DECREF(o);
   30926           2 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDimensionHS");
   30927           2 :         SWIG_fail;
   30928             :       }
   30929         812 :       arg4[i] = rawobjectpointer;
   30930         812 :       Py_DECREF(o);
   30931             :       
   30932             :     }
   30933             :   }
   30934         605 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   30935         605 :   if (!SWIG_IsOK(res5)) {
   30936           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Group_CreateMDArray" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   30937             :   }
   30938         605 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   30939         605 :   if (swig_obj[4]) {
   30940         134 :     {
   30941             :       /* %typemap(in) char **dict */
   30942         134 :       arg6 = NULL;
   30943         134 :       if ( PySequence_Check( swig_obj[4] ) ) {
   30944         134 :         int bErr = FALSE;
   30945         134 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   30946         134 :         if ( bErr )
   30947             :         {
   30948           0 :           SWIG_fail;
   30949             :         }
   30950             :       }
   30951           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   30952           0 :         int bErr = FALSE;
   30953           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   30954           0 :         if ( bErr )
   30955             :         {
   30956           0 :           SWIG_fail;
   30957             :         }
   30958             :       }
   30959             :       else {
   30960           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30961           0 :         SWIG_fail;
   30962             :       }
   30963             :     }
   30964             :   }
   30965         605 :   {
   30966         605 :     if (!arg2) {
   30967           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30968             :     }
   30969             :   }
   30970         604 :   {
   30971         604 :     if (!arg5) {
   30972           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30973             :     }
   30974             :   }
   30975         603 :   {
   30976         603 :     const int bLocalUseExceptions = GetUseExceptions();
   30977         603 :     if ( bLocalUseExceptions ) {
   30978         158 :       pushErrorHandler();
   30979             :     }
   30980         603 :     {
   30981         603 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30982         603 :       result = (GDALMDArrayHS *)GDALGroupHS_CreateMDArray(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   30983         603 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30984             :     }
   30985         603 :     if ( bLocalUseExceptions ) {
   30986         158 :       popErrorHandler();
   30987             :     }
   30988             : #ifndef SED_HACKS
   30989             :     if ( bLocalUseExceptions ) {
   30990             :       CPLErr eclass = CPLGetLastErrorType();
   30991             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30992             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30993             :       }
   30994             :     }
   30995             : #endif
   30996             :   }
   30997         603 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   30998         603 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30999         603 :   {
   31000             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjects)*/
   31001         603 :     CPLFree( arg4 );
   31002             :   }
   31003         603 :   {
   31004             :     /* %typemap(freearg) char **dict */
   31005         603 :     CSLDestroy( arg6 );
   31006             :   }
   31007         620 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31008             :   return resultobj;
   31009           5 : fail:
   31010           5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31011           5 :   {
   31012             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjects)*/
   31013           5 :     CPLFree( arg4 );
   31014             :   }
   31015           5 :   {
   31016             :     /* %typemap(freearg) char **dict */
   31017           5 :     CSLDestroy( arg6 );
   31018             :   }
   31019             :   return NULL;
   31020             : }
   31021             : 
   31022             : 
   31023          20 : SWIGINTERN PyObject *_wrap_Group_DeleteMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31024          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31025          20 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31026          20 :   char *arg2 = (char *) 0 ;
   31027          20 :   char **arg3 = (char **) 0 ;
   31028          20 :   void *argp1 = 0 ;
   31029          20 :   int res1 = 0 ;
   31030          20 :   int res2 ;
   31031          20 :   char *buf2 = 0 ;
   31032          20 :   int alloc2 = 0 ;
   31033          20 :   PyObject *swig_obj[3] ;
   31034          20 :   CPLErr result;
   31035             :   
   31036          20 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteMDArray", 2, 3, swig_obj)) SWIG_fail;
   31037          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31038          20 :   if (!SWIG_IsOK(res1)) {
   31039           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31040             :   }
   31041          20 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31042          20 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31043          20 :   if (!SWIG_IsOK(res2)) {
   31044           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteMDArray" "', argument " "2"" of type '" "char const *""'");
   31045             :   }
   31046          20 :   arg2 = reinterpret_cast< char * >(buf2);
   31047          20 :   if (swig_obj[2]) {
   31048           0 :     {
   31049             :       /* %typemap(in) char **dict */
   31050           0 :       arg3 = NULL;
   31051           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   31052           0 :         int bErr = FALSE;
   31053           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   31054           0 :         if ( bErr )
   31055             :         {
   31056           0 :           SWIG_fail;
   31057             :         }
   31058             :       }
   31059           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   31060           0 :         int bErr = FALSE;
   31061           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   31062           0 :         if ( bErr )
   31063             :         {
   31064           0 :           SWIG_fail;
   31065             :         }
   31066             :       }
   31067             :       else {
   31068           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31069           0 :         SWIG_fail;
   31070             :       }
   31071             :     }
   31072             :   }
   31073          20 :   {
   31074          20 :     if (!arg2) {
   31075           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31076             :     }
   31077             :   }
   31078          20 :   {
   31079          20 :     const int bLocalUseExceptions = GetUseExceptions();
   31080          20 :     if ( bLocalUseExceptions ) {
   31081          20 :       pushErrorHandler();
   31082             :     }
   31083          20 :     {
   31084          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31085          20 :       result = (CPLErr)GDALGroupHS_DeleteMDArray(arg1,(char const *)arg2,arg3);
   31086          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31087             :     }
   31088          20 :     if ( bLocalUseExceptions ) {
   31089          20 :       popErrorHandler();
   31090             :     }
   31091             : #ifndef SED_HACKS
   31092             :     if ( bLocalUseExceptions ) {
   31093             :       CPLErr eclass = CPLGetLastErrorType();
   31094             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31095             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31096             :       }
   31097             :     }
   31098             : #endif
   31099             :   }
   31100          20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31101          20 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31102          20 :   {
   31103             :     /* %typemap(freearg) char **dict */
   31104          20 :     CSLDestroy( arg3 );
   31105             :   }
   31106          46 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31107             :   return resultobj;
   31108           0 : fail:
   31109           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31110           0 :   {
   31111             :     /* %typemap(freearg) char **dict */
   31112           0 :     CSLDestroy( arg3 );
   31113             :   }
   31114             :   return NULL;
   31115             : }
   31116             : 
   31117             : 
   31118         121 : SWIGINTERN PyObject *_wrap_Group_CreateAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31119         121 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31120         121 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31121         121 :   char *arg2 = (char *) 0 ;
   31122         121 :   int arg3 ;
   31123         121 :   GUIntBig *arg4 = (GUIntBig *) 0 ;
   31124         121 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   31125         121 :   char **arg6 = (char **) 0 ;
   31126         121 :   void *argp1 = 0 ;
   31127         121 :   int res1 = 0 ;
   31128         121 :   int res2 ;
   31129         121 :   char *buf2 = 0 ;
   31130         121 :   int alloc2 = 0 ;
   31131         121 :   void *argp5 = 0 ;
   31132         121 :   int res5 = 0 ;
   31133         121 :   PyObject *swig_obj[5] ;
   31134         121 :   GDALAttributeHS *result = 0 ;
   31135             :   
   31136         121 :   if (!SWIG_Python_UnpackTuple(args, "Group_CreateAttribute", 4, 5, swig_obj)) SWIG_fail;
   31137         121 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31138         121 :   if (!SWIG_IsOK(res1)) {
   31139           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31140             :   }
   31141         121 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31142         121 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31143         121 :   if (!SWIG_IsOK(res2)) {
   31144           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateAttribute" "', argument " "2"" of type '" "char const *""'");
   31145             :   }
   31146         121 :   arg2 = reinterpret_cast< char * >(buf2);
   31147         121 :   {
   31148             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   31149         121 :     arg4 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg3);
   31150         121 :     if( arg3 < 0 ) {
   31151           0 :       SWIG_fail;
   31152             :     }
   31153             :   }
   31154         121 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   31155         121 :   if (!SWIG_IsOK(res5)) {
   31156           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Group_CreateAttribute" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   31157             :   }
   31158         121 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   31159         121 :   if (swig_obj[4]) {
   31160           6 :     {
   31161             :       /* %typemap(in) char **dict */
   31162           6 :       arg6 = NULL;
   31163           6 :       if ( PySequence_Check( swig_obj[4] ) ) {
   31164           6 :         int bErr = FALSE;
   31165           6 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   31166           6 :         if ( bErr )
   31167             :         {
   31168           0 :           SWIG_fail;
   31169             :         }
   31170             :       }
   31171           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   31172           0 :         int bErr = FALSE;
   31173           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   31174           0 :         if ( bErr )
   31175             :         {
   31176           0 :           SWIG_fail;
   31177             :         }
   31178             :       }
   31179             :       else {
   31180           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31181           0 :         SWIG_fail;
   31182             :       }
   31183             :     }
   31184             :   }
   31185         121 :   {
   31186         121 :     if (!arg2) {
   31187           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31188             :     }
   31189             :   }
   31190         120 :   {
   31191         120 :     if (!arg5) {
   31192           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31193             :     }
   31194             :   }
   31195         120 :   {
   31196         120 :     const int bLocalUseExceptions = GetUseExceptions();
   31197         120 :     if ( bLocalUseExceptions ) {
   31198          48 :       pushErrorHandler();
   31199             :     }
   31200         120 :     {
   31201         120 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31202         120 :       result = (GDALAttributeHS *)GDALGroupHS_CreateAttribute(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   31203         120 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31204             :     }
   31205         120 :     if ( bLocalUseExceptions ) {
   31206          48 :       popErrorHandler();
   31207             :     }
   31208             : #ifndef SED_HACKS
   31209             :     if ( bLocalUseExceptions ) {
   31210             :       CPLErr eclass = CPLGetLastErrorType();
   31211             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31212             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31213             :       }
   31214             :     }
   31215             : #endif
   31216             :   }
   31217         120 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   31218         120 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31219         120 :   {
   31220             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   31221         120 :     free(arg4);
   31222             :   }
   31223         120 :   {
   31224             :     /* %typemap(freearg) char **dict */
   31225         120 :     CSLDestroy( arg6 );
   31226             :   }
   31227         123 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31228             :   return resultobj;
   31229           1 : fail:
   31230           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31231           1 :   {
   31232             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   31233           1 :     free(arg4);
   31234             :   }
   31235           1 :   {
   31236             :     /* %typemap(freearg) char **dict */
   31237           1 :     CSLDestroy( arg6 );
   31238             :   }
   31239             :   return NULL;
   31240             : }
   31241             : 
   31242             : 
   31243          25 : SWIGINTERN PyObject *_wrap_Group_DeleteAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31244          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31245          25 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31246          25 :   char *arg2 = (char *) 0 ;
   31247          25 :   char **arg3 = (char **) 0 ;
   31248          25 :   void *argp1 = 0 ;
   31249          25 :   int res1 = 0 ;
   31250          25 :   int res2 ;
   31251          25 :   char *buf2 = 0 ;
   31252          25 :   int alloc2 = 0 ;
   31253          25 :   PyObject *swig_obj[3] ;
   31254          25 :   CPLErr result;
   31255             :   
   31256          25 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteAttribute", 2, 3, swig_obj)) SWIG_fail;
   31257          25 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31258          25 :   if (!SWIG_IsOK(res1)) {
   31259           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31260             :   }
   31261          25 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31262          25 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31263          25 :   if (!SWIG_IsOK(res2)) {
   31264           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteAttribute" "', argument " "2"" of type '" "char const *""'");
   31265             :   }
   31266          25 :   arg2 = reinterpret_cast< char * >(buf2);
   31267          25 :   if (swig_obj[2]) {
   31268           0 :     {
   31269             :       /* %typemap(in) char **dict */
   31270           0 :       arg3 = NULL;
   31271           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   31272           0 :         int bErr = FALSE;
   31273           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   31274           0 :         if ( bErr )
   31275             :         {
   31276           0 :           SWIG_fail;
   31277             :         }
   31278             :       }
   31279           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   31280           0 :         int bErr = FALSE;
   31281           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   31282           0 :         if ( bErr )
   31283             :         {
   31284           0 :           SWIG_fail;
   31285             :         }
   31286             :       }
   31287             :       else {
   31288           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31289           0 :         SWIG_fail;
   31290             :       }
   31291             :     }
   31292             :   }
   31293          25 :   {
   31294          25 :     if (!arg2) {
   31295           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31296             :     }
   31297             :   }
   31298          25 :   {
   31299          25 :     const int bLocalUseExceptions = GetUseExceptions();
   31300          25 :     if ( bLocalUseExceptions ) {
   31301          25 :       pushErrorHandler();
   31302             :     }
   31303          25 :     {
   31304          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31305          25 :       result = (CPLErr)GDALGroupHS_DeleteAttribute(arg1,(char const *)arg2,arg3);
   31306          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31307             :     }
   31308          25 :     if ( bLocalUseExceptions ) {
   31309          25 :       popErrorHandler();
   31310             :     }
   31311             : #ifndef SED_HACKS
   31312             :     if ( bLocalUseExceptions ) {
   31313             :       CPLErr eclass = CPLGetLastErrorType();
   31314             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31315             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31316             :       }
   31317             :     }
   31318             : #endif
   31319             :   }
   31320          25 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31321          25 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31322          25 :   {
   31323             :     /* %typemap(freearg) char **dict */
   31324          25 :     CSLDestroy( arg3 );
   31325             :   }
   31326          55 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31327             :   return resultobj;
   31328           0 : fail:
   31329           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31330           0 :   {
   31331             :     /* %typemap(freearg) char **dict */
   31332           0 :     CSLDestroy( arg3 );
   31333             :   }
   31334             :   return NULL;
   31335             : }
   31336             : 
   31337             : 
   31338          45 : SWIGINTERN PyObject *_wrap_Group_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31339          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31340          45 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31341          45 :   char *arg2 = (char *) 0 ;
   31342          45 :   void *argp1 = 0 ;
   31343          45 :   int res1 = 0 ;
   31344          45 :   int res2 ;
   31345          45 :   char *buf2 = 0 ;
   31346          45 :   int alloc2 = 0 ;
   31347          45 :   PyObject *swig_obj[2] ;
   31348          45 :   CPLErr result;
   31349             :   
   31350          45 :   if (!SWIG_Python_UnpackTuple(args, "Group_Rename", 2, 2, swig_obj)) SWIG_fail;
   31351          45 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31352          45 :   if (!SWIG_IsOK(res1)) {
   31353           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_Rename" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31354             :   }
   31355          45 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31356          45 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31357          45 :   if (!SWIG_IsOK(res2)) {
   31358           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_Rename" "', argument " "2"" of type '" "char const *""'");
   31359             :   }
   31360          45 :   arg2 = reinterpret_cast< char * >(buf2);
   31361          45 :   {
   31362          45 :     const int bLocalUseExceptions = GetUseExceptions();
   31363          45 :     if ( bLocalUseExceptions ) {
   31364          45 :       pushErrorHandler();
   31365             :     }
   31366          45 :     {
   31367          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31368          45 :       result = (CPLErr)GDALGroupHS_Rename(arg1,(char const *)arg2);
   31369          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31370             :     }
   31371          45 :     if ( bLocalUseExceptions ) {
   31372          45 :       popErrorHandler();
   31373             :     }
   31374             : #ifndef SED_HACKS
   31375             :     if ( bLocalUseExceptions ) {
   31376             :       CPLErr eclass = CPLGetLastErrorType();
   31377             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31378             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31379             :       }
   31380             :     }
   31381             : #endif
   31382             :   }
   31383          45 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31384          45 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31385         119 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31386             :   return resultobj;
   31387           0 : fail:
   31388           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31389             :   return NULL;
   31390             : }
   31391             : 
   31392             : 
   31393          14 : SWIGINTERN PyObject *_wrap_Group_SubsetDimensionFromSelection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31394          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31395          14 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31396          14 :   char *arg2 = (char *) 0 ;
   31397          14 :   char **arg3 = (char **) 0 ;
   31398          14 :   void *argp1 = 0 ;
   31399          14 :   int res1 = 0 ;
   31400          14 :   int res2 ;
   31401          14 :   char *buf2 = 0 ;
   31402          14 :   int alloc2 = 0 ;
   31403          14 :   PyObject *swig_obj[3] ;
   31404          14 :   GDALGroupHS *result = 0 ;
   31405             :   
   31406          14 :   if (!SWIG_Python_UnpackTuple(args, "Group_SubsetDimensionFromSelection", 2, 3, swig_obj)) SWIG_fail;
   31407          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31408          14 :   if (!SWIG_IsOK(res1)) {
   31409           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_SubsetDimensionFromSelection" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31410             :   }
   31411          14 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31412          14 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31413          14 :   if (!SWIG_IsOK(res2)) {
   31414           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_SubsetDimensionFromSelection" "', argument " "2"" of type '" "char const *""'");
   31415             :   }
   31416          14 :   arg2 = reinterpret_cast< char * >(buf2);
   31417          14 :   if (swig_obj[2]) {
   31418           0 :     {
   31419             :       /* %typemap(in) char **dict */
   31420           0 :       arg3 = NULL;
   31421           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   31422           0 :         int bErr = FALSE;
   31423           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   31424           0 :         if ( bErr )
   31425             :         {
   31426           0 :           SWIG_fail;
   31427             :         }
   31428             :       }
   31429           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   31430           0 :         int bErr = FALSE;
   31431           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   31432           0 :         if ( bErr )
   31433             :         {
   31434           0 :           SWIG_fail;
   31435             :         }
   31436             :       }
   31437             :       else {
   31438           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31439           0 :         SWIG_fail;
   31440             :       }
   31441             :     }
   31442             :   }
   31443          14 :   {
   31444          14 :     const int bLocalUseExceptions = GetUseExceptions();
   31445          14 :     if ( bLocalUseExceptions ) {
   31446          13 :       pushErrorHandler();
   31447             :     }
   31448          14 :     {
   31449          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31450          14 :       result = (GDALGroupHS *)GDALGroupHS_SubsetDimensionFromSelection(arg1,(char const *)arg2,arg3);
   31451          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31452             :     }
   31453          14 :     if ( bLocalUseExceptions ) {
   31454          13 :       popErrorHandler();
   31455             :     }
   31456             : #ifndef SED_HACKS
   31457             :     if ( bLocalUseExceptions ) {
   31458             :       CPLErr eclass = CPLGetLastErrorType();
   31459             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31460             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31461             :       }
   31462             :     }
   31463             : #endif
   31464             :   }
   31465          14 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   31466          14 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31467          14 :   {
   31468             :     /* %typemap(freearg) char **dict */
   31469          14 :     CSLDestroy( arg3 );
   31470             :   }
   31471          30 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31472             :   return resultobj;
   31473           0 : fail:
   31474           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31475           0 :   {
   31476             :     /* %typemap(freearg) char **dict */
   31477           0 :     CSLDestroy( arg3 );
   31478             :   }
   31479             :   return NULL;
   31480             : }
   31481             : 
   31482             : 
   31483           2 : SWIGINTERN PyObject *_wrap_Group_GetDataTypeCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31484           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31485           2 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31486           2 :   void *argp1 = 0 ;
   31487           2 :   int res1 = 0 ;
   31488           2 :   PyObject *swig_obj[1] ;
   31489           2 :   size_t result;
   31490             :   
   31491           2 :   if (!args) SWIG_fail;
   31492           2 :   swig_obj[0] = args;
   31493           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31494           2 :   if (!SWIG_IsOK(res1)) {
   31495           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDataTypeCount" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31496             :   }
   31497           2 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31498           2 :   {
   31499           2 :     const int bLocalUseExceptions = GetUseExceptions();
   31500           2 :     if ( bLocalUseExceptions ) {
   31501           2 :       pushErrorHandler();
   31502             :     }
   31503           2 :     {
   31504           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31505           2 :       result = GDALGroupHS_GetDataTypeCount(arg1);
   31506           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31507             :     }
   31508           2 :     if ( bLocalUseExceptions ) {
   31509           2 :       popErrorHandler();
   31510             :     }
   31511             : #ifndef SED_HACKS
   31512             :     if ( bLocalUseExceptions ) {
   31513             :       CPLErr eclass = CPLGetLastErrorType();
   31514             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31515             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31516             :       }
   31517             :     }
   31518             : #endif
   31519             :   }
   31520           2 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   31521           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31522             :   return resultobj;
   31523             : fail:
   31524             :   return NULL;
   31525             : }
   31526             : 
   31527             : 
   31528           2 : SWIGINTERN PyObject *_wrap_Group_GetDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31529           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31530           2 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31531           2 :   size_t arg2 ;
   31532           2 :   void *argp1 = 0 ;
   31533           2 :   int res1 = 0 ;
   31534           2 :   size_t val2 ;
   31535           2 :   int ecode2 = 0 ;
   31536           2 :   PyObject *swig_obj[2] ;
   31537           2 :   GDALExtendedDataTypeHS *result = 0 ;
   31538             :   
   31539           2 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetDataType", 2, 2, swig_obj)) SWIG_fail;
   31540           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31541           2 :   if (!SWIG_IsOK(res1)) {
   31542           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDataType" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31543             :   }
   31544           2 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31545           2 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   31546           2 :   if (!SWIG_IsOK(ecode2)) {
   31547           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Group_GetDataType" "', argument " "2"" of type '" "size_t""'");
   31548             :   } 
   31549           2 :   arg2 = static_cast< size_t >(val2);
   31550           2 :   {
   31551           2 :     const int bLocalUseExceptions = GetUseExceptions();
   31552           2 :     if ( bLocalUseExceptions ) {
   31553           2 :       pushErrorHandler();
   31554             :     }
   31555           2 :     {
   31556           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31557           2 :       result = (GDALExtendedDataTypeHS *)GDALGroupHS_GetDataType(arg1,arg2);
   31558           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31559             :     }
   31560           2 :     if ( bLocalUseExceptions ) {
   31561           2 :       popErrorHandler();
   31562             :     }
   31563             : #ifndef SED_HACKS
   31564             :     if ( bLocalUseExceptions ) {
   31565             :       CPLErr eclass = CPLGetLastErrorType();
   31566             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31567             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31568             :       }
   31569             :     }
   31570             : #endif
   31571             :   }
   31572           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   31573           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31574             :   return resultobj;
   31575             : fail:
   31576             :   return NULL;
   31577             : }
   31578             : 
   31579             : 
   31580         276 : SWIGINTERN PyObject *Group_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31581         276 :   PyObject *obj;
   31582         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   31583         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALGroupHS, SWIG_NewClientData(obj));
   31584         276 :   return SWIG_Py_Void();
   31585             : }
   31586             : 
   31587          12 : SWIGINTERN PyObject *_wrap_Statistics_min_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31588          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31589          12 :   Statistics *arg1 = (Statistics *) 0 ;
   31590          12 :   void *argp1 = 0 ;
   31591          12 :   int res1 = 0 ;
   31592          12 :   PyObject *swig_obj[1] ;
   31593          12 :   double result;
   31594             :   
   31595          12 :   if (!args) SWIG_fail;
   31596          12 :   swig_obj[0] = args;
   31597          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   31598          12 :   if (!SWIG_IsOK(res1)) {
   31599           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_min_get" "', argument " "1"" of type '" "Statistics *""'"); 
   31600             :   }
   31601          12 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   31602          12 :   {
   31603          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31604          12 :     result = (double) ((arg1)->min);
   31605          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   31606             :   }
   31607          12 :   resultobj = SWIG_From_double(static_cast< double >(result));
   31608          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31609             :   return resultobj;
   31610             : fail:
   31611             :   return NULL;
   31612             : }
   31613             : 
   31614             : 
   31615          12 : SWIGINTERN PyObject *_wrap_Statistics_max_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31616          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31617          12 :   Statistics *arg1 = (Statistics *) 0 ;
   31618          12 :   void *argp1 = 0 ;
   31619          12 :   int res1 = 0 ;
   31620          12 :   PyObject *swig_obj[1] ;
   31621          12 :   double result;
   31622             :   
   31623          12 :   if (!args) SWIG_fail;
   31624          12 :   swig_obj[0] = args;
   31625          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   31626          12 :   if (!SWIG_IsOK(res1)) {
   31627           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_max_get" "', argument " "1"" of type '" "Statistics *""'"); 
   31628             :   }
   31629          12 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   31630          12 :   {
   31631          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31632          12 :     result = (double) ((arg1)->max);
   31633          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   31634             :   }
   31635          12 :   resultobj = SWIG_From_double(static_cast< double >(result));
   31636          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31637             :   return resultobj;
   31638             : fail:
   31639             :   return NULL;
   31640             : }
   31641             : 
   31642             : 
   31643           5 : SWIGINTERN PyObject *_wrap_Statistics_mean_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31644           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31645           5 :   Statistics *arg1 = (Statistics *) 0 ;
   31646           5 :   void *argp1 = 0 ;
   31647           5 :   int res1 = 0 ;
   31648           5 :   PyObject *swig_obj[1] ;
   31649           5 :   double result;
   31650             :   
   31651           5 :   if (!args) SWIG_fail;
   31652           5 :   swig_obj[0] = args;
   31653           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   31654           5 :   if (!SWIG_IsOK(res1)) {
   31655           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_mean_get" "', argument " "1"" of type '" "Statistics *""'"); 
   31656             :   }
   31657           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   31658           5 :   {
   31659           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31660           5 :     result = (double) ((arg1)->mean);
   31661           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   31662             :   }
   31663           5 :   resultobj = SWIG_From_double(static_cast< double >(result));
   31664           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31665             :   return resultobj;
   31666             : fail:
   31667             :   return NULL;
   31668             : }
   31669             : 
   31670             : 
   31671           5 : SWIGINTERN PyObject *_wrap_Statistics_std_dev_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31672           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31673           5 :   Statistics *arg1 = (Statistics *) 0 ;
   31674           5 :   void *argp1 = 0 ;
   31675           5 :   int res1 = 0 ;
   31676           5 :   PyObject *swig_obj[1] ;
   31677           5 :   double result;
   31678             :   
   31679           5 :   if (!args) SWIG_fail;
   31680           5 :   swig_obj[0] = args;
   31681           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   31682           5 :   if (!SWIG_IsOK(res1)) {
   31683           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_std_dev_get" "', argument " "1"" of type '" "Statistics *""'"); 
   31684             :   }
   31685           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   31686           5 :   {
   31687           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31688           5 :     result = (double) ((arg1)->std_dev);
   31689           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   31690             :   }
   31691           5 :   resultobj = SWIG_From_double(static_cast< double >(result));
   31692           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31693             :   return resultobj;
   31694             : fail:
   31695             :   return NULL;
   31696             : }
   31697             : 
   31698             : 
   31699           5 : SWIGINTERN PyObject *_wrap_Statistics_valid_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31700           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31701           5 :   Statistics *arg1 = (Statistics *) 0 ;
   31702           5 :   void *argp1 = 0 ;
   31703           5 :   int res1 = 0 ;
   31704           5 :   PyObject *swig_obj[1] ;
   31705           5 :   GIntBig result;
   31706             :   
   31707           5 :   if (!args) SWIG_fail;
   31708           5 :   swig_obj[0] = args;
   31709           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   31710           5 :   if (!SWIG_IsOK(res1)) {
   31711           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_valid_count_get" "', argument " "1"" of type '" "Statistics *""'"); 
   31712             :   }
   31713           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   31714           5 :   {
   31715           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31716           5 :     result =  ((arg1)->valid_count);
   31717           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   31718             :   }
   31719           5 :   {
   31720           5 :     resultobj = PyLong_FromLongLong(result);
   31721             :   }
   31722           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31723             :   return resultobj;
   31724             : fail:
   31725             :   return NULL;
   31726             : }
   31727             : 
   31728             : 
   31729           0 : SWIGINTERN PyObject *_wrap_delete_Statistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31730           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31731           0 :   Statistics *arg1 = (Statistics *) 0 ;
   31732           0 :   void *argp1 = 0 ;
   31733           0 :   int res1 = 0 ;
   31734           0 :   PyObject *swig_obj[1] ;
   31735             :   
   31736           0 :   if (!args) SWIG_fail;
   31737           0 :   swig_obj[0] = args;
   31738           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, SWIG_POINTER_DISOWN |  0 );
   31739           0 :   if (!SWIG_IsOK(res1)) {
   31740           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Statistics" "', argument " "1"" of type '" "Statistics *""'"); 
   31741             :   }
   31742           0 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   31743           0 :   {
   31744           0 :     const int bLocalUseExceptions = GetUseExceptions();
   31745           0 :     if ( bLocalUseExceptions ) {
   31746           0 :       pushErrorHandler();
   31747             :     }
   31748           0 :     {
   31749           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31750           0 :       delete_Statistics(arg1);
   31751           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31752             :     }
   31753           0 :     if ( bLocalUseExceptions ) {
   31754           0 :       popErrorHandler();
   31755             :     }
   31756             : #ifndef SED_HACKS
   31757             :     if ( bLocalUseExceptions ) {
   31758             :       CPLErr eclass = CPLGetLastErrorType();
   31759             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31760             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31761             :       }
   31762             :     }
   31763             : #endif
   31764             :   }
   31765           0 :   resultobj = SWIG_Py_Void();
   31766           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31767             :   return resultobj;
   31768             : fail:
   31769             :   return NULL;
   31770             : }
   31771             : 
   31772             : 
   31773           0 : SWIGINTERN PyObject *_wrap_new_Statistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31774           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31775           0 :   Statistics *result = 0 ;
   31776             :   
   31777           0 :   if (!SWIG_Python_UnpackTuple(args, "new_Statistics", 0, 0, 0)) SWIG_fail;
   31778           0 :   {
   31779           0 :     const int bLocalUseExceptions = GetUseExceptions();
   31780           0 :     if ( bLocalUseExceptions ) {
   31781           0 :       pushErrorHandler();
   31782             :     }
   31783           0 :     {
   31784           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31785           0 :       result = (Statistics *)new Statistics();
   31786           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31787             :     }
   31788           0 :     if ( bLocalUseExceptions ) {
   31789           0 :       popErrorHandler();
   31790             :     }
   31791             : #ifndef SED_HACKS
   31792             :     if ( bLocalUseExceptions ) {
   31793             :       CPLErr eclass = CPLGetLastErrorType();
   31794             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31795             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31796             :       }
   31797             :     }
   31798             : #endif
   31799             :   }
   31800           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, SWIG_POINTER_NEW |  0 );
   31801           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31802             :   return resultobj;
   31803           0 : fail:
   31804           0 :   return NULL;
   31805             : }
   31806             : 
   31807             : 
   31808         276 : SWIGINTERN PyObject *Statistics_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31809         276 :   PyObject *obj;
   31810         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   31811         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_Statistics, SWIG_NewClientData(obj));
   31812         276 :   return SWIG_Py_Void();
   31813             : }
   31814             : 
   31815           0 : SWIGINTERN PyObject *Statistics_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31816           0 :   return SWIG_Python_InitShadowInstance(args);
   31817             : }
   31818             : 
   31819        2015 : SWIGINTERN PyObject *_wrap_delete_MDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31820        2015 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31821        2015 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31822        2015 :   void *argp1 = 0 ;
   31823        2015 :   int res1 = 0 ;
   31824        2015 :   PyObject *swig_obj[1] ;
   31825             :   
   31826        2015 :   if (!args) SWIG_fail;
   31827        2015 :   swig_obj[0] = args;
   31828        2015 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_DISOWN |  0 );
   31829        2015 :   if (!SWIG_IsOK(res1)) {
   31830           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MDArray" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31831             :   }
   31832        2015 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31833        2015 :   {
   31834        2015 :     const int bLocalUseExceptions = GetUseExceptions();
   31835        2015 :     if ( bLocalUseExceptions ) {
   31836         436 :       pushErrorHandler();
   31837             :     }
   31838        2015 :     {
   31839        2015 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31840        2015 :       delete_GDALMDArrayHS(arg1);
   31841        2015 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31842             :     }
   31843        2015 :     if ( bLocalUseExceptions ) {
   31844         436 :       popErrorHandler();
   31845             :     }
   31846             : #ifndef SED_HACKS
   31847             :     if ( bLocalUseExceptions ) {
   31848             :       CPLErr eclass = CPLGetLastErrorType();
   31849             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31850             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31851             :       }
   31852             :     }
   31853             : #endif
   31854             :   }
   31855        2015 :   resultobj = SWIG_Py_Void();
   31856        2015 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31857             :   return resultobj;
   31858             : fail:
   31859             :   return NULL;
   31860             : }
   31861             : 
   31862             : 
   31863          83 : SWIGINTERN PyObject *_wrap_MDArray_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31864          83 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31865          83 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31866          83 :   void *argp1 = 0 ;
   31867          83 :   int res1 = 0 ;
   31868          83 :   PyObject *swig_obj[1] ;
   31869          83 :   char *result = 0 ;
   31870             :   
   31871          83 :   if (!args) SWIG_fail;
   31872          83 :   swig_obj[0] = args;
   31873          83 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31874          83 :   if (!SWIG_IsOK(res1)) {
   31875           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetName" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31876             :   }
   31877          83 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31878          83 :   {
   31879          83 :     const int bLocalUseExceptions = GetUseExceptions();
   31880          83 :     if ( bLocalUseExceptions ) {
   31881          27 :       pushErrorHandler();
   31882             :     }
   31883          83 :     {
   31884          83 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31885          83 :       result = (char *)GDALMDArrayHS_GetName(arg1);
   31886          83 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31887             :     }
   31888          83 :     if ( bLocalUseExceptions ) {
   31889          27 :       popErrorHandler();
   31890             :     }
   31891             : #ifndef SED_HACKS
   31892             :     if ( bLocalUseExceptions ) {
   31893             :       CPLErr eclass = CPLGetLastErrorType();
   31894             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31895             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31896             :       }
   31897             :     }
   31898             : #endif
   31899             :   }
   31900          83 :   resultobj = SWIG_FromCharPtr((const char *)result);
   31901          83 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31902             :   return resultobj;
   31903             : fail:
   31904             :   return NULL;
   31905             : }
   31906             : 
   31907             : 
   31908          50 : SWIGINTERN PyObject *_wrap_MDArray_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31909          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31910          50 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31911          50 :   void *argp1 = 0 ;
   31912          50 :   int res1 = 0 ;
   31913          50 :   PyObject *swig_obj[1] ;
   31914          50 :   char *result = 0 ;
   31915             :   
   31916          50 :   if (!args) SWIG_fail;
   31917          50 :   swig_obj[0] = args;
   31918          50 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31919          50 :   if (!SWIG_IsOK(res1)) {
   31920           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetFullName" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31921             :   }
   31922          50 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31923          50 :   {
   31924          50 :     const int bLocalUseExceptions = GetUseExceptions();
   31925          50 :     if ( bLocalUseExceptions ) {
   31926          27 :       pushErrorHandler();
   31927             :     }
   31928          50 :     {
   31929          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31930          50 :       result = (char *)GDALMDArrayHS_GetFullName(arg1);
   31931          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31932             :     }
   31933          50 :     if ( bLocalUseExceptions ) {
   31934          27 :       popErrorHandler();
   31935             :     }
   31936             : #ifndef SED_HACKS
   31937             :     if ( bLocalUseExceptions ) {
   31938             :       CPLErr eclass = CPLGetLastErrorType();
   31939             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31940             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31941             :       }
   31942             :     }
   31943             : #endif
   31944             :   }
   31945          50 :   resultobj = SWIG_FromCharPtr((const char *)result);
   31946          50 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31947             :   return resultobj;
   31948             : fail:
   31949             :   return NULL;
   31950             : }
   31951             : 
   31952             : 
   31953           6 : SWIGINTERN PyObject *_wrap_MDArray_GetTotalElementsCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31954           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31955           6 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   31956           6 :   void *argp1 = 0 ;
   31957           6 :   int res1 = 0 ;
   31958           6 :   PyObject *swig_obj[1] ;
   31959           6 :   GUIntBig result;
   31960             :   
   31961           6 :   if (!args) SWIG_fail;
   31962           6 :   swig_obj[0] = args;
   31963           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   31964           6 :   if (!SWIG_IsOK(res1)) {
   31965           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetTotalElementsCount" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   31966             :   }
   31967           6 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   31968           6 :   {
   31969           6 :     const int bLocalUseExceptions = GetUseExceptions();
   31970           6 :     if ( bLocalUseExceptions ) {
   31971           0 :       pushErrorHandler();
   31972             :     }
   31973           6 :     {
   31974           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31975           6 :       result = GDALMDArrayHS_GetTotalElementsCount(arg1);
   31976           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31977             :     }
   31978           6 :     if ( bLocalUseExceptions ) {
   31979           0 :       popErrorHandler();
   31980             :     }
   31981             : #ifndef SED_HACKS
   31982             :     if ( bLocalUseExceptions ) {
   31983             :       CPLErr eclass = CPLGetLastErrorType();
   31984             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31985             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31986             :       }
   31987             :     }
   31988             : #endif
   31989             :   }
   31990           6 :   {
   31991           6 :     resultobj = PyLong_FromUnsignedLongLong(result);
   31992             :   }
   31993           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31994             :   return resultobj;
   31995             : fail:
   31996             :   return NULL;
   31997             : }
   31998             : 
   31999             : 
   32000        3505 : SWIGINTERN PyObject *_wrap_MDArray_GetDimensionCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32001        3505 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32002        3505 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32003        3505 :   void *argp1 = 0 ;
   32004        3505 :   int res1 = 0 ;
   32005        3505 :   PyObject *swig_obj[1] ;
   32006        3505 :   size_t result;
   32007             :   
   32008        3505 :   if (!args) SWIG_fail;
   32009        3505 :   swig_obj[0] = args;
   32010        3505 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32011        3505 :   if (!SWIG_IsOK(res1)) {
   32012           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDimensionCount" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32013             :   }
   32014        3505 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32015        3505 :   {
   32016        3505 :     const int bLocalUseExceptions = GetUseExceptions();
   32017        3505 :     if ( bLocalUseExceptions ) {
   32018         476 :       pushErrorHandler();
   32019             :     }
   32020        3505 :     {
   32021        3505 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32022        3505 :       result = GDALMDArrayHS_GetDimensionCount(arg1);
   32023        3505 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32024             :     }
   32025        3505 :     if ( bLocalUseExceptions ) {
   32026         476 :       popErrorHandler();
   32027             :     }
   32028             : #ifndef SED_HACKS
   32029             :     if ( bLocalUseExceptions ) {
   32030             :       CPLErr eclass = CPLGetLastErrorType();
   32031             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32032             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32033             :       }
   32034             :     }
   32035             : #endif
   32036             :   }
   32037        3505 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   32038        3505 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32039             :   return resultobj;
   32040             : fail:
   32041             :   return NULL;
   32042             : }
   32043             : 
   32044             : 
   32045        2279 : SWIGINTERN PyObject *_wrap_MDArray_GetDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32046        2279 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32047        2279 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32048        2279 :   GDALDimensionHS ***arg2 = (GDALDimensionHS ***) 0 ;
   32049        2279 :   size_t *arg3 = (size_t *) 0 ;
   32050        2279 :   void *argp1 = 0 ;
   32051        2279 :   int res1 = 0 ;
   32052        2279 :   GDALDimensionHS **dims2 = 0 ;
   32053        2279 :   size_t nCount2 = 0 ;
   32054        2279 :   PyObject *swig_obj[1] ;
   32055             :   
   32056        2279 :   {
   32057             :     /* %typemap(in,numinputs=0) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32058        2279 :     arg2 = &dims2;
   32059        2279 :     arg3 = &nCount2;
   32060             :   }
   32061        2279 :   if (!args) SWIG_fail;
   32062        2279 :   swig_obj[0] = args;
   32063        2279 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32064        2279 :   if (!SWIG_IsOK(res1)) {
   32065           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDimensions" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32066             :   }
   32067        2279 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32068        2279 :   {
   32069        2279 :     const int bLocalUseExceptions = GetUseExceptions();
   32070        2279 :     if ( bLocalUseExceptions ) {
   32071         316 :       pushErrorHandler();
   32072             :     }
   32073        2279 :     {
   32074        2279 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32075        2279 :       GDALMDArrayHS_GetDimensions(arg1,arg2,arg3);
   32076        2279 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32077             :     }
   32078        2279 :     if ( bLocalUseExceptions ) {
   32079         316 :       popErrorHandler();
   32080             :     }
   32081             : #ifndef SED_HACKS
   32082             :     if ( bLocalUseExceptions ) {
   32083             :       CPLErr eclass = CPLGetLastErrorType();
   32084             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32085             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32086             :       }
   32087             :     }
   32088             : #endif
   32089             :   }
   32090        2279 :   resultobj = SWIG_Py_Void();
   32091        2279 :   {
   32092             :     /* %typemap(argout) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32093        2279 :     Py_DECREF(resultobj);
   32094        2279 :     resultobj = PyList_New( *arg3 );
   32095        2279 :     if( !resultobj ) {
   32096           0 :       SWIG_fail;
   32097             :     }
   32098        6385 :     for( size_t i = 0; i < *arg3; i++ ) {
   32099        4106 :       PyList_SetItem(resultobj, i,
   32100        4106 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALDimensionHS,SWIG_POINTER_OWN) );
   32101             :       /* We have borrowed the GDALDimensionHS */
   32102        4106 :       (*arg2)[i] = NULL;
   32103             :     }
   32104             :   }
   32105        2279 :   {
   32106             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32107        2279 :     GDALReleaseDimensions(*arg2, *arg3);
   32108             :   }
   32109        2279 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32110             :   return resultobj;
   32111           0 : fail:
   32112           0 :   {
   32113             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32114           0 :     GDALReleaseDimensions(*arg2, *arg3);
   32115             :   }
   32116             :   return NULL;
   32117             : }
   32118             : 
   32119             : 
   32120          13 : SWIGINTERN PyObject *_wrap_MDArray_GetCoordinateVariables(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32121          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32122          13 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32123          13 :   GDALMDArrayHS ***arg2 = (GDALMDArrayHS ***) 0 ;
   32124          13 :   size_t *arg3 = (size_t *) 0 ;
   32125          13 :   void *argp1 = 0 ;
   32126          13 :   int res1 = 0 ;
   32127          13 :   GDALMDArrayHS **arrays2 = 0 ;
   32128          13 :   size_t nCount2 = 0 ;
   32129          13 :   PyObject *swig_obj[1] ;
   32130             :   
   32131          13 :   {
   32132             :     /* %typemap(in,numinputs=0) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32133          13 :     arg2 = &arrays2;
   32134          13 :     arg3 = &nCount2;
   32135             :   }
   32136          13 :   if (!args) SWIG_fail;
   32137          13 :   swig_obj[0] = args;
   32138          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32139          13 :   if (!SWIG_IsOK(res1)) {
   32140           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetCoordinateVariables" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32141             :   }
   32142          13 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32143          13 :   {
   32144          13 :     const int bLocalUseExceptions = GetUseExceptions();
   32145          13 :     if ( bLocalUseExceptions ) {
   32146           3 :       pushErrorHandler();
   32147             :     }
   32148          13 :     {
   32149          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32150          13 :       GDALMDArrayHS_GetCoordinateVariables(arg1,arg2,arg3);
   32151          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32152             :     }
   32153          13 :     if ( bLocalUseExceptions ) {
   32154           3 :       popErrorHandler();
   32155             :     }
   32156             : #ifndef SED_HACKS
   32157             :     if ( bLocalUseExceptions ) {
   32158             :       CPLErr eclass = CPLGetLastErrorType();
   32159             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32160             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32161             :       }
   32162             :     }
   32163             : #endif
   32164             :   }
   32165          13 :   resultobj = SWIG_Py_Void();
   32166          13 :   {
   32167             :     /* %typemap(argout) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32168          13 :     Py_DECREF(resultobj);
   32169          13 :     resultobj = PyList_New( *arg3 );
   32170          13 :     if( !resultobj ) {
   32171           0 :       SWIG_fail;
   32172             :     }
   32173          29 :     for( size_t i = 0; i < *arg3; i++ ) {
   32174          16 :       PyList_SetItem(resultobj, i,
   32175          16 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALMDArrayHS,SWIG_POINTER_OWN) );
   32176             :       /* We have borrowed the GDALMDArrayHS */
   32177          16 :       (*arg2)[i] = NULL;
   32178             :     }
   32179             :   }
   32180          13 :   {
   32181             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32182          13 :     GDALReleaseArrays(*arg2, *arg3);
   32183             :   }
   32184          13 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32185             :   return resultobj;
   32186           0 : fail:
   32187           0 :   {
   32188             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32189           0 :     GDALReleaseArrays(*arg2, *arg3);
   32190             :   }
   32191             :   return NULL;
   32192             : }
   32193             : 
   32194             : 
   32195          93 : SWIGINTERN PyObject *_wrap_MDArray_GetBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32196          93 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32197          93 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32198          93 :   GUIntBig **arg2 = (GUIntBig **) 0 ;
   32199          93 :   size_t *arg3 = (size_t *) 0 ;
   32200          93 :   void *argp1 = 0 ;
   32201          93 :   int res1 = 0 ;
   32202          93 :   GUIntBig *vals2 = 0 ;
   32203          93 :   size_t nCount2 = 0 ;
   32204          93 :   PyObject *swig_obj[1] ;
   32205             :   
   32206          93 :   {
   32207             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   32208          93 :     arg2 = &vals2;
   32209          93 :     arg3 = &nCount2;
   32210             :   }
   32211          93 :   if (!args) SWIG_fail;
   32212          93 :   swig_obj[0] = args;
   32213          93 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32214          93 :   if (!SWIG_IsOK(res1)) {
   32215           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetBlockSize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32216             :   }
   32217          93 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32218          93 :   {
   32219          93 :     const int bLocalUseExceptions = GetUseExceptions();
   32220          93 :     if ( bLocalUseExceptions ) {
   32221           3 :       pushErrorHandler();
   32222             :     }
   32223          93 :     {
   32224          93 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32225          93 :       GDALMDArrayHS_GetBlockSize(arg1,arg2,arg3);
   32226          93 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32227             :     }
   32228          93 :     if ( bLocalUseExceptions ) {
   32229           3 :       popErrorHandler();
   32230             :     }
   32231             : #ifndef SED_HACKS
   32232             :     if ( bLocalUseExceptions ) {
   32233             :       CPLErr eclass = CPLGetLastErrorType();
   32234             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32235             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32236             :       }
   32237             :     }
   32238             : #endif
   32239             :   }
   32240          93 :   resultobj = SWIG_Py_Void();
   32241          93 :   {
   32242             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   32243          93 :     Py_DECREF(resultobj);
   32244          93 :     resultobj = PyList_New( *arg3 );
   32245          93 :     if( !resultobj ) {
   32246           0 :       SWIG_fail;
   32247             :     }
   32248         285 :     for( size_t i = 0; i < *arg3; i++ ) {
   32249         192 :       char szTmp[32];
   32250         192 :       snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg2)[i]);
   32251         192 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   32252         192 :       PyList_SetItem(resultobj, i, o );
   32253             :     }
   32254             :   }
   32255          93 :   {
   32256             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32257          93 :     CPLFree(*arg2);
   32258             :   }
   32259          93 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32260             :   return resultobj;
   32261           0 : fail:
   32262           0 :   {
   32263             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32264           0 :     CPLFree(*arg2);
   32265             :   }
   32266             :   return NULL;
   32267             : }
   32268             : 
   32269             : 
   32270           1 : SWIGINTERN PyObject *_wrap_MDArray_GetProcessingChunkSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32271           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32272           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32273           1 :   size_t arg2 ;
   32274           1 :   GUIntBig **arg3 = (GUIntBig **) 0 ;
   32275           1 :   size_t *arg4 = (size_t *) 0 ;
   32276           1 :   void *argp1 = 0 ;
   32277           1 :   int res1 = 0 ;
   32278           1 :   size_t val2 ;
   32279           1 :   int ecode2 = 0 ;
   32280           1 :   GUIntBig *vals3 = 0 ;
   32281           1 :   size_t nCount3 = 0 ;
   32282           1 :   PyObject *swig_obj[2] ;
   32283             :   
   32284           1 :   {
   32285             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   32286           1 :     arg3 = &vals3;
   32287           1 :     arg4 = &nCount3;
   32288             :   }
   32289           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetProcessingChunkSize", 2, 2, swig_obj)) SWIG_fail;
   32290           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32291           1 :   if (!SWIG_IsOK(res1)) {
   32292           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetProcessingChunkSize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32293             :   }
   32294           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32295           1 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   32296           1 :   if (!SWIG_IsOK(ecode2)) {
   32297           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_GetProcessingChunkSize" "', argument " "2"" of type '" "size_t""'");
   32298             :   } 
   32299           1 :   arg2 = static_cast< size_t >(val2);
   32300           1 :   {
   32301           1 :     const int bLocalUseExceptions = GetUseExceptions();
   32302           1 :     if ( bLocalUseExceptions ) {
   32303           0 :       pushErrorHandler();
   32304             :     }
   32305           1 :     {
   32306           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32307           1 :       GDALMDArrayHS_GetProcessingChunkSize(arg1,arg2,arg3,arg4);
   32308           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32309             :     }
   32310           1 :     if ( bLocalUseExceptions ) {
   32311           0 :       popErrorHandler();
   32312             :     }
   32313             : #ifndef SED_HACKS
   32314             :     if ( bLocalUseExceptions ) {
   32315             :       CPLErr eclass = CPLGetLastErrorType();
   32316             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32317             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32318             :       }
   32319             :     }
   32320             : #endif
   32321             :   }
   32322           1 :   resultobj = SWIG_Py_Void();
   32323           1 :   {
   32324             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   32325           1 :     Py_DECREF(resultobj);
   32326           1 :     resultobj = PyList_New( *arg4 );
   32327           1 :     if( !resultobj ) {
   32328           0 :       SWIG_fail;
   32329             :     }
   32330           3 :     for( size_t i = 0; i < *arg4; i++ ) {
   32331           2 :       char szTmp[32];
   32332           2 :       snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg3)[i]);
   32333           2 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   32334           2 :       PyList_SetItem(resultobj, i, o );
   32335             :     }
   32336             :   }
   32337           1 :   {
   32338             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32339           1 :     CPLFree(*arg3);
   32340             :   }
   32341           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32342             :   return resultobj;
   32343           0 : fail:
   32344           0 :   {
   32345             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32346           0 :     CPLFree(*arg3);
   32347             :   }
   32348             :   return NULL;
   32349             : }
   32350             : 
   32351             : 
   32352        1972 : SWIGINTERN PyObject *_wrap_MDArray_GetDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32353        1972 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32354        1972 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32355        1972 :   void *argp1 = 0 ;
   32356        1972 :   int res1 = 0 ;
   32357        1972 :   PyObject *swig_obj[1] ;
   32358        1972 :   GDALExtendedDataTypeHS *result = 0 ;
   32359             :   
   32360        1972 :   if (!args) SWIG_fail;
   32361        1972 :   swig_obj[0] = args;
   32362        1972 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32363        1972 :   if (!SWIG_IsOK(res1)) {
   32364           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDataType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32365             :   }
   32366        1972 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32367        1972 :   {
   32368        1972 :     const int bLocalUseExceptions = GetUseExceptions();
   32369        1972 :     if ( bLocalUseExceptions ) {
   32370         402 :       pushErrorHandler();
   32371             :     }
   32372        1972 :     {
   32373        1972 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32374        1972 :       result = (GDALExtendedDataTypeHS *)GDALMDArrayHS_GetDataType(arg1);
   32375        1972 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32376             :     }
   32377        1972 :     if ( bLocalUseExceptions ) {
   32378         402 :       popErrorHandler();
   32379             :     }
   32380             : #ifndef SED_HACKS
   32381             :     if ( bLocalUseExceptions ) {
   32382             :       CPLErr eclass = CPLGetLastErrorType();
   32383             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32384             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32385             :       }
   32386             :     }
   32387             : #endif
   32388             :   }
   32389        1972 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   32390        1972 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32391             :   return resultobj;
   32392             : fail:
   32393             :   return NULL;
   32394             : }
   32395             : 
   32396             : 
   32397          15 : SWIGINTERN PyObject *_wrap_MDArray_GetStructuralInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32398          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32399          15 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32400          15 :   void *argp1 = 0 ;
   32401          15 :   int res1 = 0 ;
   32402          15 :   PyObject *swig_obj[1] ;
   32403          15 :   char **result = 0 ;
   32404             :   
   32405          15 :   if (!args) SWIG_fail;
   32406          15 :   swig_obj[0] = args;
   32407          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32408          15 :   if (!SWIG_IsOK(res1)) {
   32409           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetStructuralInfo" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32410             :   }
   32411          15 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32412          15 :   {
   32413          15 :     const int bLocalUseExceptions = GetUseExceptions();
   32414          15 :     if ( bLocalUseExceptions ) {
   32415           2 :       pushErrorHandler();
   32416             :     }
   32417          15 :     {
   32418          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32419          15 :       result = (char **)GDALMDArrayHS_GetStructuralInfo(arg1);
   32420          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32421             :     }
   32422          15 :     if ( bLocalUseExceptions ) {
   32423           2 :       popErrorHandler();
   32424             :     }
   32425             : #ifndef SED_HACKS
   32426             :     if ( bLocalUseExceptions ) {
   32427             :       CPLErr eclass = CPLGetLastErrorType();
   32428             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32429             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32430             :       }
   32431             :     }
   32432             : #endif
   32433             :   }
   32434          15 :   {
   32435             :     /* %typemap(out) char **dict */
   32436          15 :     resultobj = GetCSLStringAsPyDict(result, false);
   32437             :   }
   32438          15 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32439             :   return resultobj;
   32440             : fail:
   32441             :   return NULL;
   32442             : }
   32443             : 
   32444             : 
   32445          44 : SWIGINTERN PyObject *_wrap_MDArray_Resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32446          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32447          44 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32448          44 :   int arg2 ;
   32449          44 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   32450          44 :   char **arg4 = (char **) NULL ;
   32451          44 :   void *argp1 = 0 ;
   32452          44 :   int res1 = 0 ;
   32453          44 :   PyObject *swig_obj[3] ;
   32454          44 :   CPLErr result;
   32455             :   
   32456          44 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Resize", 2, 3, swig_obj)) SWIG_fail;
   32457          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32458          44 :   if (!SWIG_IsOK(res1)) {
   32459           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Resize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32460             :   }
   32461          44 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32462          44 :   {
   32463             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   32464          44 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   32465          44 :     if( arg2 < 0 ) {
   32466           0 :       SWIG_fail;
   32467             :     }
   32468             :   }
   32469          44 :   if (swig_obj[2]) {
   32470           0 :     {
   32471             :       /* %typemap(in) char **dict */
   32472           0 :       arg4 = NULL;
   32473           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   32474           0 :         int bErr = FALSE;
   32475           0 :         arg4 = CSLFromPySequence(swig_obj[2], &bErr);
   32476           0 :         if ( bErr )
   32477             :         {
   32478           0 :           SWIG_fail;
   32479             :         }
   32480             :       }
   32481           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   32482           0 :         int bErr = FALSE;
   32483           0 :         arg4 = CSLFromPyMapping(swig_obj[2], &bErr);
   32484           0 :         if ( bErr )
   32485             :         {
   32486           0 :           SWIG_fail;
   32487             :         }
   32488             :       }
   32489             :       else {
   32490           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   32491           0 :         SWIG_fail;
   32492             :       }
   32493             :     }
   32494             :   }
   32495          44 :   {
   32496          44 :     const int bLocalUseExceptions = GetUseExceptions();
   32497          44 :     if ( bLocalUseExceptions ) {
   32498           0 :       pushErrorHandler();
   32499             :     }
   32500          44 :     {
   32501          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32502          44 :       result = (CPLErr)GDALMDArrayHS_Resize(arg1,arg2,arg3,arg4);
   32503          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32504             :     }
   32505          44 :     if ( bLocalUseExceptions ) {
   32506           0 :       popErrorHandler();
   32507             :     }
   32508             : #ifndef SED_HACKS
   32509             :     if ( bLocalUseExceptions ) {
   32510             :       CPLErr eclass = CPLGetLastErrorType();
   32511             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32512             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32513             :       }
   32514             :     }
   32515             : #endif
   32516             :   }
   32517          44 :   resultobj = SWIG_From_int(static_cast< int >(result));
   32518          44 :   {
   32519             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32520          44 :     free(arg3);
   32521             :   }
   32522          44 :   {
   32523             :     /* %typemap(freearg) char **dict */
   32524          44 :     CSLDestroy( arg4 );
   32525             :   }
   32526          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32527             :   return resultobj;
   32528           0 : fail:
   32529           0 :   {
   32530             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32531           0 :     free(arg3);
   32532             :   }
   32533           0 :   {
   32534             :     /* %typemap(freearg) char **dict */
   32535           0 :     CSLDestroy( arg4 );
   32536             :   }
   32537             :   return NULL;
   32538             : }
   32539             : 
   32540             : 
   32541        1889 : SWIGINTERN PyObject *_wrap_MDArray_Read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32542        1889 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32543        1889 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32544        1889 :   int arg2 ;
   32545        1889 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   32546        1889 :   int arg4 ;
   32547        1889 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   32548        1889 :   int arg6 ;
   32549        1889 :   GIntBig *arg7 = (GIntBig *) 0 ;
   32550        1889 :   int arg8 ;
   32551        1889 :   GIntBig *arg9 = (GIntBig *) 0 ;
   32552        1889 :   GDALExtendedDataTypeHS *arg10 = (GDALExtendedDataTypeHS *) 0 ;
   32553        1889 :   void **arg11 = (void **) 0 ;
   32554        1889 :   void *argp1 = 0 ;
   32555        1889 :   int res1 = 0 ;
   32556        1889 :   void *argp10 = 0 ;
   32557        1889 :   int res10 = 0 ;
   32558        1889 :   void *pyObject11 = NULL ;
   32559        1889 :   PyObject *swig_obj[6] ;
   32560        1889 :   CPLErr result;
   32561             :   
   32562        1889 :   {
   32563             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject11 = NULL ) */
   32564        1889 :     arg11 = &pyObject11;
   32565             :   }
   32566        1889 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Read", 6, 6, swig_obj)) SWIG_fail;
   32567        1889 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32568        1889 :   if (!SWIG_IsOK(res1)) {
   32569           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Read" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32570             :   }
   32571        1889 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32572        1889 :   {
   32573             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   32574        1889 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   32575        1889 :     if( arg2 < 0 ) {
   32576           0 :       SWIG_fail;
   32577             :     }
   32578             :   }
   32579        1889 :   {
   32580             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   32581        1889 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   32582        1889 :     if( arg4 < 0 ) {
   32583           0 :       SWIG_fail;
   32584             :     }
   32585             :   }
   32586        1889 :   {
   32587             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   32588        1889 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   32589        1889 :     if( arg6 < 0 ) {
   32590           0 :       SWIG_fail;
   32591             :     }
   32592             :   }
   32593        1889 :   {
   32594             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   32595        1889 :     arg9 = CreateCGIntBigListFromSequence(swig_obj[4], &arg8);
   32596        1889 :     if( arg8 < 0 ) {
   32597           0 :       SWIG_fail;
   32598             :     }
   32599             :   }
   32600        1889 :   res10 = SWIG_ConvertPtr(swig_obj[5], &argp10,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   32601        1889 :   if (!SWIG_IsOK(res10)) {
   32602           0 :     SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "MDArray_Read" "', argument " "10"" of type '" "GDALExtendedDataTypeHS *""'"); 
   32603             :   }
   32604        1889 :   arg10 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp10);
   32605        1889 :   {
   32606        1889 :     if (!arg10) {
   32607           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   32608             :     }
   32609             :   }
   32610        1889 :   {
   32611        1889 :     const int bLocalUseExceptions = GetUseExceptions();
   32612        1889 :     if ( bLocalUseExceptions ) {
   32613         152 :       pushErrorHandler();
   32614             :     }
   32615        1889 :     {
   32616        1889 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32617        1889 :       result = (CPLErr)GDALMDArrayHS_Read(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   32618        1889 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32619             :     }
   32620        1889 :     if ( bLocalUseExceptions ) {
   32621         152 :       popErrorHandler();
   32622             :     }
   32623             : #ifndef SED_HACKS
   32624             :     if ( bLocalUseExceptions ) {
   32625             :       CPLErr eclass = CPLGetLastErrorType();
   32626             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32627             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32628             :       }
   32629             :     }
   32630             : #endif
   32631             :   }
   32632        1889 :   resultobj = SWIG_From_int(static_cast< int >(result));
   32633        1889 :   {
   32634             :     /* %typemap(argout) ( void **outPythonObject ) */
   32635        1889 :     Py_XDECREF(resultobj);
   32636        1889 :     if (*arg11)
   32637             :     {
   32638             :       resultobj = (PyObject*)*arg11;
   32639             :     }
   32640             :     else
   32641             :     {
   32642          40 :       resultobj = Py_None;
   32643          40 :       Py_INCREF(resultobj);
   32644             :     }
   32645             :   }
   32646        1889 :   {
   32647             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32648        1889 :     free(arg3);
   32649             :   }
   32650        1889 :   {
   32651             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32652        1889 :     free(arg5);
   32653             :   }
   32654        1889 :   {
   32655             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   32656        1889 :     free(arg7);
   32657             :   }
   32658        1889 :   {
   32659             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   32660        1889 :     free(arg9);
   32661             :   }
   32662        1895 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32663             :   return resultobj;
   32664           0 : fail:
   32665           0 :   {
   32666             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32667           0 :     free(arg3);
   32668             :   }
   32669           0 :   {
   32670             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32671           0 :     free(arg5);
   32672             :   }
   32673           0 :   {
   32674             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   32675           0 :     free(arg7);
   32676             :   }
   32677           0 :   {
   32678             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   32679           0 :     free(arg9);
   32680             :   }
   32681           0 :   return NULL;
   32682             : }
   32683             : 
   32684             : 
   32685          13 : SWIGINTERN PyObject *_wrap_MDArray_WriteStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32686          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32687          13 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32688          13 :   int arg2 ;
   32689          13 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   32690          13 :   int arg4 ;
   32691          13 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   32692          13 :   int arg6 ;
   32693          13 :   GIntBig *arg7 = (GIntBig *) 0 ;
   32694          13 :   GDALExtendedDataTypeHS *arg8 = (GDALExtendedDataTypeHS *) 0 ;
   32695          13 :   char **arg9 = (char **) 0 ;
   32696          13 :   void *argp1 = 0 ;
   32697          13 :   int res1 = 0 ;
   32698          13 :   void *argp8 = 0 ;
   32699          13 :   int res8 = 0 ;
   32700          13 :   PyObject *swig_obj[6] ;
   32701          13 :   CPLErr result;
   32702             :   
   32703          13 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_WriteStringArray", 6, 6, swig_obj)) SWIG_fail;
   32704          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32705          13 :   if (!SWIG_IsOK(res1)) {
   32706           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_WriteStringArray" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32707             :   }
   32708          13 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32709          13 :   {
   32710             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   32711          13 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   32712          13 :     if( arg2 < 0 ) {
   32713           0 :       SWIG_fail;
   32714             :     }
   32715             :   }
   32716          13 :   {
   32717             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   32718          13 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   32719          13 :     if( arg4 < 0 ) {
   32720           0 :       SWIG_fail;
   32721             :     }
   32722             :   }
   32723          13 :   {
   32724             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   32725          13 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   32726          13 :     if( arg6 < 0 ) {
   32727           0 :       SWIG_fail;
   32728             :     }
   32729             :   }
   32730          13 :   res8 = SWIG_ConvertPtr(swig_obj[4], &argp8,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   32731          13 :   if (!SWIG_IsOK(res8)) {
   32732           0 :     SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "MDArray_WriteStringArray" "', argument " "8"" of type '" "GDALExtendedDataTypeHS *""'"); 
   32733             :   }
   32734          13 :   arg8 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp8);
   32735          13 :   {
   32736             :     /* %typemap(in) char **dict */
   32737          13 :     arg9 = NULL;
   32738          13 :     if ( PySequence_Check( swig_obj[5] ) ) {
   32739          13 :       int bErr = FALSE;
   32740          13 :       arg9 = CSLFromPySequence(swig_obj[5], &bErr);
   32741          13 :       if ( bErr )
   32742             :       {
   32743           0 :         SWIG_fail;
   32744             :       }
   32745             :     }
   32746           0 :     else if ( PyMapping_Check( swig_obj[5] ) ) {
   32747           0 :       int bErr = FALSE;
   32748           0 :       arg9 = CSLFromPyMapping(swig_obj[5], &bErr);
   32749           0 :       if ( bErr )
   32750             :       {
   32751           0 :         SWIG_fail;
   32752             :       }
   32753             :     }
   32754             :     else {
   32755           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   32756           0 :       SWIG_fail;
   32757             :     }
   32758             :   }
   32759          13 :   {
   32760          13 :     if (!arg8) {
   32761           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   32762             :     }
   32763             :   }
   32764          13 :   {
   32765          13 :     const int bLocalUseExceptions = GetUseExceptions();
   32766          13 :     if ( bLocalUseExceptions ) {
   32767           3 :       pushErrorHandler();
   32768             :     }
   32769          13 :     {
   32770          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32771          13 :       result = (CPLErr)GDALMDArrayHS_WriteStringArray(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   32772          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32773             :     }
   32774          13 :     if ( bLocalUseExceptions ) {
   32775           3 :       popErrorHandler();
   32776             :     }
   32777             : #ifndef SED_HACKS
   32778             :     if ( bLocalUseExceptions ) {
   32779             :       CPLErr eclass = CPLGetLastErrorType();
   32780             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32781             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32782             :       }
   32783             :     }
   32784             : #endif
   32785             :   }
   32786          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   32787          13 :   {
   32788             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32789          13 :     free(arg3);
   32790             :   }
   32791          13 :   {
   32792             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32793          13 :     free(arg5);
   32794             :   }
   32795          13 :   {
   32796             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   32797          13 :     free(arg7);
   32798             :   }
   32799          13 :   {
   32800             :     /* %typemap(freearg) char **dict */
   32801          13 :     CSLDestroy( arg9 );
   32802             :   }
   32803          13 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32804             :   return resultobj;
   32805           0 : fail:
   32806           0 :   {
   32807             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32808           0 :     free(arg3);
   32809             :   }
   32810           0 :   {
   32811             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32812           0 :     free(arg5);
   32813             :   }
   32814           0 :   {
   32815             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   32816           0 :     free(arg7);
   32817             :   }
   32818           0 :   {
   32819             :     /* %typemap(freearg) char **dict */
   32820           0 :     CSLDestroy( arg9 );
   32821             :   }
   32822             :   return NULL;
   32823             : }
   32824             : 
   32825             : 
   32826         515 : SWIGINTERN PyObject *_wrap_MDArray_Write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32827         515 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32828         515 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32829         515 :   int arg2 ;
   32830         515 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   32831         515 :   int arg4 ;
   32832         515 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   32833         515 :   int arg6 ;
   32834         515 :   GIntBig *arg7 = (GIntBig *) 0 ;
   32835         515 :   int arg8 ;
   32836         515 :   GIntBig *arg9 = (GIntBig *) 0 ;
   32837         515 :   GDALExtendedDataTypeHS *arg10 = (GDALExtendedDataTypeHS *) 0 ;
   32838         515 :   GIntBig arg11 ;
   32839         515 :   char *arg12 = (char *) 0 ;
   32840         515 :   void *argp1 = 0 ;
   32841         515 :   int res1 = 0 ;
   32842         515 :   void *argp10 = 0 ;
   32843         515 :   int res10 = 0 ;
   32844         515 :   int alloc11 = 0 ;
   32845         515 :   bool viewIsValid11 = false ;
   32846         515 :   Py_buffer view11 ;
   32847         515 :   PyObject *swig_obj[7] ;
   32848         515 :   CPLErr result;
   32849             :   
   32850         515 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Write", 7, 7, swig_obj)) SWIG_fail;
   32851         515 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32852         515 :   if (!SWIG_IsOK(res1)) {
   32853           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Write" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32854             :   }
   32855         515 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32856         515 :   {
   32857             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   32858         515 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   32859         515 :     if( arg2 < 0 ) {
   32860           0 :       SWIG_fail;
   32861             :     }
   32862             :   }
   32863         515 :   {
   32864             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   32865         515 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   32866         515 :     if( arg4 < 0 ) {
   32867           0 :       SWIG_fail;
   32868             :     }
   32869             :   }
   32870         515 :   {
   32871             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   32872         515 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   32873         515 :     if( arg6 < 0 ) {
   32874           0 :       SWIG_fail;
   32875             :     }
   32876             :   }
   32877         515 :   {
   32878             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   32879         515 :     arg9 = CreateCGIntBigListFromSequence(swig_obj[4], &arg8);
   32880         515 :     if( arg8 < 0 ) {
   32881           0 :       SWIG_fail;
   32882             :     }
   32883             :   }
   32884         515 :   res10 = SWIG_ConvertPtr(swig_obj[5], &argp10,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   32885         515 :   if (!SWIG_IsOK(res10)) {
   32886           0 :     SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "MDArray_Write" "', argument " "10"" of type '" "GDALExtendedDataTypeHS *""'"); 
   32887             :   }
   32888         515 :   arg10 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp10);
   32889         515 :   {
   32890             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   32891         515 :     char* ptr = NULL;
   32892         515 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[6], &arg11, &ptr, &alloc11, &viewIsValid11, &view11) ) {
   32893           0 :       SWIG_fail;
   32894             :     }
   32895         515 :     arg12 = (char *)ptr;
   32896             :   }
   32897         515 :   {
   32898         515 :     if (!arg10) {
   32899           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   32900             :     }
   32901             :   }
   32902         515 :   {
   32903         515 :     const int bLocalUseExceptions = GetUseExceptions();
   32904         515 :     if ( bLocalUseExceptions ) {
   32905          44 :       pushErrorHandler();
   32906             :     }
   32907         515 :     {
   32908         515 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32909         515 :       result = (CPLErr)GDALMDArrayHS_Write(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   32910         515 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32911             :     }
   32912         515 :     if ( bLocalUseExceptions ) {
   32913          44 :       popErrorHandler();
   32914             :     }
   32915             : #ifndef SED_HACKS
   32916             :     if ( bLocalUseExceptions ) {
   32917             :       CPLErr eclass = CPLGetLastErrorType();
   32918             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32919             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32920             :       }
   32921             :     }
   32922             : #endif
   32923             :   }
   32924         515 :   resultobj = SWIG_From_int(static_cast< int >(result));
   32925         515 :   {
   32926             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32927         515 :     free(arg3);
   32928             :   }
   32929         515 :   {
   32930             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32931         515 :     free(arg5);
   32932             :   }
   32933         515 :   {
   32934             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   32935         515 :     free(arg7);
   32936             :   }
   32937         515 :   {
   32938             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   32939         515 :     free(arg9);
   32940             :   }
   32941         515 :   {
   32942             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   32943         515 :     if( viewIsValid11 ) {
   32944         514 :       PyBuffer_Release(&view11);
   32945             :     }
   32946           1 :     else if( alloc11 == SWIG_NEWOBJ ) {
   32947           1 :       delete[] arg12;
   32948             :     }
   32949             :   }
   32950         517 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32951             :   return resultobj;
   32952           0 : fail:
   32953           0 :   {
   32954             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32955           0 :     free(arg3);
   32956             :   }
   32957           0 :   {
   32958             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32959           0 :     free(arg5);
   32960             :   }
   32961           0 :   {
   32962             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   32963           0 :     free(arg7);
   32964             :   }
   32965           0 :   {
   32966             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   32967           0 :     free(arg9);
   32968             :   }
   32969           0 :   {
   32970             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   32971           0 :     if( viewIsValid11 ) {
   32972           0 :       PyBuffer_Release(&view11);
   32973             :     }
   32974           0 :     else if( alloc11 == SWIG_NEWOBJ ) {
   32975           0 :       delete[] arg12;
   32976             :     }
   32977             :   }
   32978             :   return NULL;
   32979             : }
   32980             : 
   32981             : 
   32982          22 : SWIGINTERN PyObject *_wrap_MDArray_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32983          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32984          22 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32985          22 :   int arg2 ;
   32986          22 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   32987          22 :   int arg4 ;
   32988          22 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   32989          22 :   char **arg6 = (char **) 0 ;
   32990          22 :   void *argp1 = 0 ;
   32991          22 :   int res1 = 0 ;
   32992          22 :   PyObject *swig_obj[4] ;
   32993          22 :   CPLErr result;
   32994             :   
   32995          22 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_AdviseRead", 3, 4, swig_obj)) SWIG_fail;
   32996          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32997          22 :   if (!SWIG_IsOK(res1)) {
   32998           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_AdviseRead" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32999             :   }
   33000          22 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33001          22 :   {
   33002             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33003          22 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   33004          22 :     if( arg2 < 0 ) {
   33005           0 :       SWIG_fail;
   33006             :     }
   33007             :   }
   33008          22 :   {
   33009             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33010          22 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   33011          22 :     if( arg4 < 0 ) {
   33012           0 :       SWIG_fail;
   33013             :     }
   33014             :   }
   33015          22 :   if (swig_obj[3]) {
   33016          22 :     {
   33017             :       /* %typemap(in) char **dict */
   33018          22 :       arg6 = NULL;
   33019          22 :       if ( PySequence_Check( swig_obj[3] ) ) {
   33020          22 :         int bErr = FALSE;
   33021          22 :         arg6 = CSLFromPySequence(swig_obj[3], &bErr);
   33022          22 :         if ( bErr )
   33023             :         {
   33024           0 :           SWIG_fail;
   33025             :         }
   33026             :       }
   33027           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   33028           0 :         int bErr = FALSE;
   33029           0 :         arg6 = CSLFromPyMapping(swig_obj[3], &bErr);
   33030           0 :         if ( bErr )
   33031             :         {
   33032           0 :           SWIG_fail;
   33033             :         }
   33034             :       }
   33035             :       else {
   33036           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33037           0 :         SWIG_fail;
   33038             :       }
   33039             :     }
   33040             :   }
   33041          22 :   {
   33042          22 :     const int bLocalUseExceptions = GetUseExceptions();
   33043          22 :     if ( bLocalUseExceptions ) {
   33044           0 :       pushErrorHandler();
   33045             :     }
   33046          22 :     {
   33047          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33048          22 :       result = (CPLErr)GDALMDArrayHS_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6);
   33049          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33050             :     }
   33051          22 :     if ( bLocalUseExceptions ) {
   33052           0 :       popErrorHandler();
   33053             :     }
   33054             : #ifndef SED_HACKS
   33055             :     if ( bLocalUseExceptions ) {
   33056             :       CPLErr eclass = CPLGetLastErrorType();
   33057             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33058             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33059             :       }
   33060             :     }
   33061             : #endif
   33062             :   }
   33063          22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33064          22 :   {
   33065             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33066          22 :     free(arg3);
   33067             :   }
   33068          22 :   {
   33069             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33070          22 :     free(arg5);
   33071             :   }
   33072          22 :   {
   33073             :     /* %typemap(freearg) char **dict */
   33074          22 :     CSLDestroy( arg6 );
   33075             :   }
   33076          22 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33077             :   return resultobj;
   33078           0 : fail:
   33079           0 :   {
   33080             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33081           0 :     free(arg3);
   33082             :   }
   33083           0 :   {
   33084             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33085           0 :     free(arg5);
   33086             :   }
   33087           0 :   {
   33088             :     /* %typemap(freearg) char **dict */
   33089           0 :     CSLDestroy( arg6 );
   33090             :   }
   33091             :   return NULL;
   33092             : }
   33093             : 
   33094             : 
   33095         119 : SWIGINTERN PyObject *_wrap_MDArray_GetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33096         119 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33097         119 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33098         119 :   char *arg2 = (char *) 0 ;
   33099         119 :   void *argp1 = 0 ;
   33100         119 :   int res1 = 0 ;
   33101         119 :   int res2 ;
   33102         119 :   char *buf2 = 0 ;
   33103         119 :   int alloc2 = 0 ;
   33104         119 :   PyObject *swig_obj[2] ;
   33105         119 :   GDALAttributeHS *result = 0 ;
   33106             :   
   33107         119 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetAttribute", 2, 2, swig_obj)) SWIG_fail;
   33108         119 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33109         119 :   if (!SWIG_IsOK(res1)) {
   33110           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33111             :   }
   33112         119 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33113         119 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33114         119 :   if (!SWIG_IsOK(res2)) {
   33115           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetAttribute" "', argument " "2"" of type '" "char const *""'");
   33116             :   }
   33117         119 :   arg2 = reinterpret_cast< char * >(buf2);
   33118         119 :   {
   33119         119 :     if (!arg2) {
   33120           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33121             :     }
   33122             :   }
   33123         119 :   {
   33124         119 :     const int bLocalUseExceptions = GetUseExceptions();
   33125         119 :     if ( bLocalUseExceptions ) {
   33126          59 :       pushErrorHandler();
   33127             :     }
   33128         119 :     {
   33129         119 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33130         119 :       result = (GDALAttributeHS *)GDALMDArrayHS_GetAttribute(arg1,(char const *)arg2);
   33131         119 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33132             :     }
   33133         119 :     if ( bLocalUseExceptions ) {
   33134          59 :       popErrorHandler();
   33135             :     }
   33136             : #ifndef SED_HACKS
   33137             :     if ( bLocalUseExceptions ) {
   33138             :       CPLErr eclass = CPLGetLastErrorType();
   33139             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33140             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33141             :       }
   33142             :     }
   33143             : #endif
   33144             :   }
   33145         119 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   33146         119 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33147         129 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33148             :   return resultobj;
   33149           0 : fail:
   33150           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33151             :   return NULL;
   33152             : }
   33153             : 
   33154             : 
   33155          58 : SWIGINTERN PyObject *_wrap_MDArray_GetAttributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33156          58 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33157          58 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33158          58 :   GDALAttributeHS ***arg2 = (GDALAttributeHS ***) 0 ;
   33159          58 :   size_t *arg3 = (size_t *) 0 ;
   33160          58 :   char **arg4 = (char **) 0 ;
   33161          58 :   void *argp1 = 0 ;
   33162          58 :   int res1 = 0 ;
   33163          58 :   GDALAttributeHS **attrs2 = 0 ;
   33164          58 :   size_t nCount2 = 0 ;
   33165          58 :   PyObject *swig_obj[2] ;
   33166             :   
   33167          58 :   {
   33168             :     /* %typemap(in,numinputs=0) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33169          58 :     arg2 = &attrs2;
   33170          58 :     arg3 = &nCount2;
   33171             :   }
   33172          58 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetAttributes", 1, 2, swig_obj)) SWIG_fail;
   33173          58 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33174          58 :   if (!SWIG_IsOK(res1)) {
   33175           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetAttributes" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33176             :   }
   33177          58 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33178          58 :   if (swig_obj[1]) {
   33179           0 :     {
   33180             :       /* %typemap(in) char **dict */
   33181           0 :       arg4 = NULL;
   33182           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   33183           0 :         int bErr = FALSE;
   33184           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   33185           0 :         if ( bErr )
   33186             :         {
   33187           0 :           SWIG_fail;
   33188             :         }
   33189             :       }
   33190           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   33191           0 :         int bErr = FALSE;
   33192           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   33193           0 :         if ( bErr )
   33194             :         {
   33195           0 :           SWIG_fail;
   33196             :         }
   33197             :       }
   33198             :       else {
   33199           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33200           0 :         SWIG_fail;
   33201             :       }
   33202             :     }
   33203             :   }
   33204          58 :   {
   33205          58 :     const int bLocalUseExceptions = GetUseExceptions();
   33206          58 :     if ( bLocalUseExceptions ) {
   33207          42 :       pushErrorHandler();
   33208             :     }
   33209          58 :     {
   33210          58 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33211          58 :       GDALMDArrayHS_GetAttributes(arg1,arg2,arg3,arg4);
   33212          58 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33213             :     }
   33214          58 :     if ( bLocalUseExceptions ) {
   33215          42 :       popErrorHandler();
   33216             :     }
   33217             : #ifndef SED_HACKS
   33218             :     if ( bLocalUseExceptions ) {
   33219             :       CPLErr eclass = CPLGetLastErrorType();
   33220             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33221             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33222             :       }
   33223             :     }
   33224             : #endif
   33225             :   }
   33226          58 :   resultobj = SWIG_Py_Void();
   33227          58 :   {
   33228             :     /* %typemap(argout) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33229          58 :     Py_DECREF(resultobj);
   33230          58 :     resultobj = PyList_New( *arg3 );
   33231          58 :     if( !resultobj ) {
   33232           0 :       SWIG_fail;
   33233             :     }
   33234         187 :     for( size_t i = 0; i < *arg3; i++ ) {
   33235         129 :       PyList_SetItem(resultobj, i,
   33236         129 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALAttributeHS,SWIG_POINTER_OWN) );
   33237             :       /* We have borrowed the GDALAttributeHS */
   33238         129 :       (*arg2)[i] = NULL;
   33239             :     }
   33240             :   }
   33241          58 :   {
   33242             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33243          58 :     GDALReleaseAttributes(*arg2, *arg3);
   33244             :   }
   33245          58 :   {
   33246             :     /* %typemap(freearg) char **dict */
   33247          58 :     CSLDestroy( arg4 );
   33248             :   }
   33249          74 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33250             :   return resultobj;
   33251           0 : fail:
   33252           0 :   {
   33253             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33254           0 :     GDALReleaseAttributes(*arg2, *arg3);
   33255             :   }
   33256           0 :   {
   33257             :     /* %typemap(freearg) char **dict */
   33258           0 :     CSLDestroy( arg4 );
   33259             :   }
   33260             :   return NULL;
   33261             : }
   33262             : 
   33263             : 
   33264         151 : SWIGINTERN PyObject *_wrap_MDArray_CreateAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33265         151 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33266         151 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33267         151 :   char *arg2 = (char *) 0 ;
   33268         151 :   int arg3 ;
   33269         151 :   GUIntBig *arg4 = (GUIntBig *) 0 ;
   33270         151 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   33271         151 :   char **arg6 = (char **) 0 ;
   33272         151 :   void *argp1 = 0 ;
   33273         151 :   int res1 = 0 ;
   33274         151 :   int res2 ;
   33275         151 :   char *buf2 = 0 ;
   33276         151 :   int alloc2 = 0 ;
   33277         151 :   void *argp5 = 0 ;
   33278         151 :   int res5 = 0 ;
   33279         151 :   PyObject *swig_obj[5] ;
   33280         151 :   GDALAttributeHS *result = 0 ;
   33281             :   
   33282         151 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_CreateAttribute", 4, 5, swig_obj)) SWIG_fail;
   33283         151 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33284         151 :   if (!SWIG_IsOK(res1)) {
   33285           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_CreateAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33286             :   }
   33287         151 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33288         151 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33289         151 :   if (!SWIG_IsOK(res2)) {
   33290           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_CreateAttribute" "', argument " "2"" of type '" "char const *""'");
   33291             :   }
   33292         151 :   arg2 = reinterpret_cast< char * >(buf2);
   33293         151 :   {
   33294             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33295         151 :     arg4 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg3);
   33296         151 :     if( arg3 < 0 ) {
   33297           0 :       SWIG_fail;
   33298             :     }
   33299             :   }
   33300         151 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   33301         151 :   if (!SWIG_IsOK(res5)) {
   33302           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MDArray_CreateAttribute" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   33303             :   }
   33304         151 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   33305         151 :   if (swig_obj[4]) {
   33306           0 :     {
   33307             :       /* %typemap(in) char **dict */
   33308           0 :       arg6 = NULL;
   33309           0 :       if ( PySequence_Check( swig_obj[4] ) ) {
   33310           0 :         int bErr = FALSE;
   33311           0 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   33312           0 :         if ( bErr )
   33313             :         {
   33314           0 :           SWIG_fail;
   33315             :         }
   33316             :       }
   33317           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   33318           0 :         int bErr = FALSE;
   33319           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   33320           0 :         if ( bErr )
   33321             :         {
   33322           0 :           SWIG_fail;
   33323             :         }
   33324             :       }
   33325             :       else {
   33326           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33327           0 :         SWIG_fail;
   33328             :       }
   33329             :     }
   33330             :   }
   33331         151 :   {
   33332         151 :     if (!arg2) {
   33333           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33334             :     }
   33335             :   }
   33336         150 :   {
   33337         150 :     if (!arg5) {
   33338           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33339             :     }
   33340             :   }
   33341         150 :   {
   33342         150 :     const int bLocalUseExceptions = GetUseExceptions();
   33343         150 :     if ( bLocalUseExceptions ) {
   33344         106 :       pushErrorHandler();
   33345             :     }
   33346         150 :     {
   33347         150 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33348         150 :       result = (GDALAttributeHS *)GDALMDArrayHS_CreateAttribute(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   33349         150 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33350             :     }
   33351         150 :     if ( bLocalUseExceptions ) {
   33352         106 :       popErrorHandler();
   33353             :     }
   33354             : #ifndef SED_HACKS
   33355             :     if ( bLocalUseExceptions ) {
   33356             :       CPLErr eclass = CPLGetLastErrorType();
   33357             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33358             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33359             :       }
   33360             :     }
   33361             : #endif
   33362             :   }
   33363         150 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   33364         150 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33365         150 :   {
   33366             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33367         150 :     free(arg4);
   33368             :   }
   33369         150 :   {
   33370             :     /* %typemap(freearg) char **dict */
   33371         150 :     CSLDestroy( arg6 );
   33372             :   }
   33373         153 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33374             :   return resultobj;
   33375           1 : fail:
   33376           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33377           1 :   {
   33378             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33379           1 :     free(arg4);
   33380             :   }
   33381           1 :   {
   33382             :     /* %typemap(freearg) char **dict */
   33383           1 :     CSLDestroy( arg6 );
   33384             :   }
   33385             :   return NULL;
   33386             : }
   33387             : 
   33388             : 
   33389          24 : SWIGINTERN PyObject *_wrap_MDArray_DeleteAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33390          24 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33391          24 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33392          24 :   char *arg2 = (char *) 0 ;
   33393          24 :   char **arg3 = (char **) 0 ;
   33394          24 :   void *argp1 = 0 ;
   33395          24 :   int res1 = 0 ;
   33396          24 :   int res2 ;
   33397          24 :   char *buf2 = 0 ;
   33398          24 :   int alloc2 = 0 ;
   33399          24 :   PyObject *swig_obj[3] ;
   33400          24 :   CPLErr result;
   33401             :   
   33402          24 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_DeleteAttribute", 2, 3, swig_obj)) SWIG_fail;
   33403          24 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33404          24 :   if (!SWIG_IsOK(res1)) {
   33405           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_DeleteAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33406             :   }
   33407          24 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33408          24 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33409          24 :   if (!SWIG_IsOK(res2)) {
   33410           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_DeleteAttribute" "', argument " "2"" of type '" "char const *""'");
   33411             :   }
   33412          24 :   arg2 = reinterpret_cast< char * >(buf2);
   33413          24 :   if (swig_obj[2]) {
   33414           0 :     {
   33415             :       /* %typemap(in) char **dict */
   33416           0 :       arg3 = NULL;
   33417           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   33418           0 :         int bErr = FALSE;
   33419           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   33420           0 :         if ( bErr )
   33421             :         {
   33422           0 :           SWIG_fail;
   33423             :         }
   33424             :       }
   33425           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   33426           0 :         int bErr = FALSE;
   33427           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   33428           0 :         if ( bErr )
   33429             :         {
   33430           0 :           SWIG_fail;
   33431             :         }
   33432             :       }
   33433             :       else {
   33434           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33435           0 :         SWIG_fail;
   33436             :       }
   33437             :     }
   33438             :   }
   33439          24 :   {
   33440          24 :     if (!arg2) {
   33441           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33442             :     }
   33443             :   }
   33444          24 :   {
   33445          24 :     const int bLocalUseExceptions = GetUseExceptions();
   33446          24 :     if ( bLocalUseExceptions ) {
   33447          24 :       pushErrorHandler();
   33448             :     }
   33449          24 :     {
   33450          24 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33451          24 :       result = (CPLErr)GDALMDArrayHS_DeleteAttribute(arg1,(char const *)arg2,arg3);
   33452          24 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33453             :     }
   33454          24 :     if ( bLocalUseExceptions ) {
   33455          24 :       popErrorHandler();
   33456             :     }
   33457             : #ifndef SED_HACKS
   33458             :     if ( bLocalUseExceptions ) {
   33459             :       CPLErr eclass = CPLGetLastErrorType();
   33460             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33461             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33462             :       }
   33463             :     }
   33464             : #endif
   33465             :   }
   33466          24 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33467          24 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33468          24 :   {
   33469             :     /* %typemap(freearg) char **dict */
   33470          24 :     CSLDestroy( arg3 );
   33471             :   }
   33472          52 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33473             :   return resultobj;
   33474           0 : fail:
   33475           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33476           0 :   {
   33477             :     /* %typemap(freearg) char **dict */
   33478           0 :     CSLDestroy( arg3 );
   33479             :   }
   33480             :   return NULL;
   33481             : }
   33482             : 
   33483             : 
   33484          72 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33485          72 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33486          72 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33487          72 :   void **arg2 = (void **) 0 ;
   33488          72 :   void *argp1 = 0 ;
   33489          72 :   int res1 = 0 ;
   33490          72 :   void *pyObject2 = NULL ;
   33491          72 :   PyObject *swig_obj[1] ;
   33492          72 :   CPLErr result;
   33493             :   
   33494          72 :   {
   33495             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   33496          72 :     arg2 = &pyObject2;
   33497             :   }
   33498          72 :   if (!args) SWIG_fail;
   33499          72 :   swig_obj[0] = args;
   33500          72 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33501          72 :   if (!SWIG_IsOK(res1)) {
   33502           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsRaw" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33503             :   }
   33504          72 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33505          72 :   {
   33506          72 :     const int bLocalUseExceptions = GetUseExceptions();
   33507          72 :     if ( bLocalUseExceptions ) {
   33508          20 :       pushErrorHandler();
   33509             :     }
   33510          72 :     {
   33511          72 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33512          72 :       result = (CPLErr)GDALMDArrayHS_GetNoDataValueAsRaw(arg1,arg2);
   33513          72 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33514             :     }
   33515          72 :     if ( bLocalUseExceptions ) {
   33516          20 :       popErrorHandler();
   33517             :     }
   33518             : #ifndef SED_HACKS
   33519             :     if ( bLocalUseExceptions ) {
   33520             :       CPLErr eclass = CPLGetLastErrorType();
   33521             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33522             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33523             :       }
   33524             :     }
   33525             : #endif
   33526             :   }
   33527          72 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33528          72 :   {
   33529             :     /* %typemap(argout) ( void **outPythonObject ) */
   33530          72 :     Py_XDECREF(resultobj);
   33531          72 :     if (*arg2)
   33532             :     {
   33533             :       resultobj = (PyObject*)*arg2;
   33534             :     }
   33535             :     else
   33536             :     {
   33537          36 :       resultobj = Py_None;
   33538          36 :       Py_INCREF(resultobj);
   33539             :     }
   33540             :   }
   33541          72 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33542             :   return resultobj;
   33543             : fail:
   33544             :   return NULL;
   33545             : }
   33546             : 
   33547             : 
   33548         120 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33549         120 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33550         120 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33551         120 :   double *arg2 = (double *) 0 ;
   33552         120 :   int *arg3 = (int *) 0 ;
   33553         120 :   void *argp1 = 0 ;
   33554         120 :   int res1 = 0 ;
   33555         120 :   double tmpval2 ;
   33556         120 :   int tmphasval2 ;
   33557         120 :   PyObject *swig_obj[1] ;
   33558             :   
   33559         120 :   {
   33560             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   33561         120 :     arg2 = &tmpval2;
   33562         120 :     arg3 = &tmphasval2;
   33563             :   }
   33564         120 :   if (!args) SWIG_fail;
   33565         120 :   swig_obj[0] = args;
   33566         120 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33567         120 :   if (!SWIG_IsOK(res1)) {
   33568           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsDouble" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33569             :   }
   33570         120 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33571         120 :   {
   33572         120 :     const int bLocalUseExceptions = GetUseExceptions();
   33573         120 :     if ( bLocalUseExceptions ) {
   33574           8 :       pushErrorHandler();
   33575             :     }
   33576         120 :     {
   33577         120 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33578         120 :       GDALMDArrayHS_GetNoDataValueAsDouble(arg1,arg2,arg3);
   33579         120 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33580             :     }
   33581         120 :     if ( bLocalUseExceptions ) {
   33582           8 :       popErrorHandler();
   33583             :     }
   33584             : #ifndef SED_HACKS
   33585             :     if ( bLocalUseExceptions ) {
   33586             :       CPLErr eclass = CPLGetLastErrorType();
   33587             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33588             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33589             :       }
   33590             :     }
   33591             : #endif
   33592             :   }
   33593         120 :   resultobj = SWIG_Py_Void();
   33594         120 :   {
   33595             :     /* %typemap(python,argout) (double *val, int *hasval) */
   33596         120 :     PyObject *r;
   33597         120 :     if ( !*arg3 ) {
   33598          48 :       Py_INCREF(Py_None);
   33599          48 :       r = Py_None;
   33600             :     }
   33601             :     else {
   33602          72 :       r = PyFloat_FromDouble( *arg2 );
   33603             :     }
   33604             : #if SWIG_VERSION >= 0x040300
   33605             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   33606             : #else
   33607         120 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   33608             : #endif
   33609             :   }
   33610         120 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33611             :   return resultobj;
   33612             : fail:
   33613             :   return NULL;
   33614             : }
   33615             : 
   33616             : 
   33617          11 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33618          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33619          11 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33620          11 :   GIntBig *arg2 = (GIntBig *) 0 ;
   33621          11 :   int *arg3 = (int *) 0 ;
   33622          11 :   void *argp1 = 0 ;
   33623          11 :   int res1 = 0 ;
   33624          11 :   GIntBig tmpval2 ;
   33625          11 :   int tmphasval2 ;
   33626          11 :   PyObject *swig_obj[1] ;
   33627             :   
   33628          11 :   {
   33629             :     /* %typemap(python,in,numinputs=0) (GIntBig *val, int *hasval) */
   33630          11 :     arg2 = &tmpval2;
   33631          11 :     arg3 = &tmphasval2;
   33632             :   }
   33633          11 :   if (!args) SWIG_fail;
   33634          11 :   swig_obj[0] = args;
   33635          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33636          11 :   if (!SWIG_IsOK(res1)) {
   33637           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33638             :   }
   33639          11 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33640          11 :   {
   33641          11 :     const int bLocalUseExceptions = GetUseExceptions();
   33642          11 :     if ( bLocalUseExceptions ) {
   33643           0 :       pushErrorHandler();
   33644             :     }
   33645          11 :     {
   33646          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33647          11 :       GDALMDArrayHS_GetNoDataValueAsInt64(arg1,arg2,arg3);
   33648          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33649             :     }
   33650          11 :     if ( bLocalUseExceptions ) {
   33651           0 :       popErrorHandler();
   33652             :     }
   33653             : #ifndef SED_HACKS
   33654             :     if ( bLocalUseExceptions ) {
   33655             :       CPLErr eclass = CPLGetLastErrorType();
   33656             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33657             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33658             :       }
   33659             :     }
   33660             : #endif
   33661             :   }
   33662          11 :   resultobj = SWIG_Py_Void();
   33663          11 :   {
   33664             :     /* %typemap(python,argout) (GIntBig *val, int *hasval) */
   33665          11 :     PyObject *r;
   33666          11 :     if ( !*arg3 ) {
   33667           4 :       Py_INCREF(Py_None);
   33668           4 :       r = Py_None;
   33669             :     }
   33670             :     else {
   33671           7 :       r = PyLong_FromLongLong( *arg2 );
   33672             :     }
   33673             : #if SWIG_VERSION >= 0x040300
   33674             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   33675             : #else
   33676          11 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   33677             : #endif
   33678             :   }
   33679          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33680             :   return resultobj;
   33681             : fail:
   33682             :   return NULL;
   33683             : }
   33684             : 
   33685             : 
   33686           7 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33687           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33688           7 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33689           7 :   GUIntBig *arg2 = (GUIntBig *) 0 ;
   33690           7 :   int *arg3 = (int *) 0 ;
   33691           7 :   void *argp1 = 0 ;
   33692           7 :   int res1 = 0 ;
   33693           7 :   GUIntBig tmpval2 ;
   33694           7 :   int tmphasval2 ;
   33695           7 :   PyObject *swig_obj[1] ;
   33696             :   
   33697           7 :   {
   33698             :     /* %typemap(python,in,numinputs=0) (GUIntBig *val, int *hasval) */
   33699           7 :     arg2 = &tmpval2;
   33700           7 :     arg3 = &tmphasval2;
   33701             :   }
   33702           7 :   if (!args) SWIG_fail;
   33703           7 :   swig_obj[0] = args;
   33704           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33705           7 :   if (!SWIG_IsOK(res1)) {
   33706           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33707             :   }
   33708           7 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33709           7 :   {
   33710           7 :     const int bLocalUseExceptions = GetUseExceptions();
   33711           7 :     if ( bLocalUseExceptions ) {
   33712           0 :       pushErrorHandler();
   33713             :     }
   33714           7 :     {
   33715           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33716           7 :       GDALMDArrayHS_GetNoDataValueAsUInt64(arg1,arg2,arg3);
   33717           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33718             :     }
   33719           7 :     if ( bLocalUseExceptions ) {
   33720           0 :       popErrorHandler();
   33721             :     }
   33722             : #ifndef SED_HACKS
   33723             :     if ( bLocalUseExceptions ) {
   33724             :       CPLErr eclass = CPLGetLastErrorType();
   33725             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33726             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33727             :       }
   33728             :     }
   33729             : #endif
   33730             :   }
   33731           7 :   resultobj = SWIG_Py_Void();
   33732           7 :   {
   33733             :     /* %typemap(python,argout) (GUIntBig *val, int *hasval) */
   33734           7 :     PyObject *r;
   33735           7 :     if ( !*arg3 ) {
   33736           2 :       Py_INCREF(Py_None);
   33737           2 :       r = Py_None;
   33738             :     }
   33739             :     else {
   33740           5 :       r = PyLong_FromUnsignedLongLong( *arg2 );
   33741             :     }
   33742             : #if SWIG_VERSION >= 0x040300
   33743             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   33744             : #else
   33745           7 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   33746             : #endif
   33747             :   }
   33748           7 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33749             :   return resultobj;
   33750             : fail:
   33751             :   return NULL;
   33752             : }
   33753             : 
   33754             : 
   33755           5 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33756           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33757           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33758           5 :   void *argp1 = 0 ;
   33759           5 :   int res1 = 0 ;
   33760           5 :   PyObject *swig_obj[1] ;
   33761           5 :   retStringAndCPLFree *result = 0 ;
   33762             :   
   33763           5 :   if (!args) SWIG_fail;
   33764           5 :   swig_obj[0] = args;
   33765           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33766           5 :   if (!SWIG_IsOK(res1)) {
   33767           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsString" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33768             :   }
   33769           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33770           5 :   {
   33771           5 :     const int bLocalUseExceptions = GetUseExceptions();
   33772           5 :     if ( bLocalUseExceptions ) {
   33773           0 :       pushErrorHandler();
   33774             :     }
   33775           5 :     {
   33776           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33777           5 :       result = (retStringAndCPLFree *)GDALMDArrayHS_GetNoDataValueAsString(arg1);
   33778           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33779             :     }
   33780           5 :     if ( bLocalUseExceptions ) {
   33781           0 :       popErrorHandler();
   33782             :     }
   33783             : #ifndef SED_HACKS
   33784             :     if ( bLocalUseExceptions ) {
   33785             :       CPLErr eclass = CPLGetLastErrorType();
   33786             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33787             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33788             :       }
   33789             :     }
   33790             : #endif
   33791             :   }
   33792           5 :   {
   33793             :     /* %typemap(out) (retStringAndCPLFree*) */
   33794           5 :     Py_XDECREF(resultobj);
   33795           5 :     if(result)
   33796             :     {
   33797           2 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   33798           2 :       CPLFree(result);
   33799             :     }
   33800             :     else
   33801             :     {
   33802           3 :       resultobj = Py_None;
   33803           3 :       Py_INCREF(resultobj);
   33804             :     }
   33805             :   }
   33806           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33807             :   return resultobj;
   33808             : fail:
   33809             :   return NULL;
   33810             : }
   33811             : 
   33812             : 
   33813          51 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33814          51 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33815          51 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33816          51 :   double arg2 ;
   33817          51 :   void *argp1 = 0 ;
   33818          51 :   int res1 = 0 ;
   33819          51 :   double val2 ;
   33820          51 :   int ecode2 = 0 ;
   33821          51 :   PyObject *swig_obj[2] ;
   33822          51 :   CPLErr result;
   33823             :   
   33824          51 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueDouble", 2, 2, swig_obj)) SWIG_fail;
   33825          51 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33826          51 :   if (!SWIG_IsOK(res1)) {
   33827           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueDouble" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33828             :   }
   33829          51 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33830          51 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   33831          51 :   if (!SWIG_IsOK(ecode2)) {
   33832           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetNoDataValueDouble" "', argument " "2"" of type '" "double""'");
   33833             :   } 
   33834          51 :   arg2 = static_cast< double >(val2);
   33835          51 :   {
   33836          51 :     const int bLocalUseExceptions = GetUseExceptions();
   33837          51 :     if ( bLocalUseExceptions ) {
   33838           4 :       pushErrorHandler();
   33839             :     }
   33840          51 :     {
   33841          51 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33842          51 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueDouble(arg1,arg2);
   33843          51 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33844             :     }
   33845          51 :     if ( bLocalUseExceptions ) {
   33846           4 :       popErrorHandler();
   33847             :     }
   33848             : #ifndef SED_HACKS
   33849             :     if ( bLocalUseExceptions ) {
   33850             :       CPLErr eclass = CPLGetLastErrorType();
   33851             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33852             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33853             :       }
   33854             :     }
   33855             : #endif
   33856             :   }
   33857          51 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33858          53 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33859             :   return resultobj;
   33860             : fail:
   33861             :   return NULL;
   33862             : }
   33863             : 
   33864             : 
   33865           1 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33866           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33867           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33868           1 :   GIntBig arg2 ;
   33869           1 :   void *argp1 = 0 ;
   33870           1 :   int res1 = 0 ;
   33871           1 :   PyObject *swig_obj[2] ;
   33872           1 :   CPLErr result;
   33873             :   
   33874           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueInt64", 2, 2, swig_obj)) SWIG_fail;
   33875           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33876           1 :   if (!SWIG_IsOK(res1)) {
   33877           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33878             :   }
   33879           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33880           1 :   {
   33881           1 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   33882             :   }
   33883           1 :   {
   33884           1 :     const int bLocalUseExceptions = GetUseExceptions();
   33885           1 :     if ( bLocalUseExceptions ) {
   33886           0 :       pushErrorHandler();
   33887             :     }
   33888           1 :     {
   33889           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33890           1 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueInt64(arg1,arg2);
   33891           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33892             :     }
   33893           1 :     if ( bLocalUseExceptions ) {
   33894           0 :       popErrorHandler();
   33895             :     }
   33896             : #ifndef SED_HACKS
   33897             :     if ( bLocalUseExceptions ) {
   33898             :       CPLErr eclass = CPLGetLastErrorType();
   33899             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33900             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33901             :       }
   33902             :     }
   33903             : #endif
   33904             :   }
   33905           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33906           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33907             :   return resultobj;
   33908             : fail:
   33909             :   return NULL;
   33910             : }
   33911             : 
   33912             : 
   33913           1 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33914           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33915           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33916           1 :   GUIntBig arg2 ;
   33917           1 :   void *argp1 = 0 ;
   33918           1 :   int res1 = 0 ;
   33919           1 :   PyObject *swig_obj[2] ;
   33920           1 :   CPLErr result;
   33921             :   
   33922           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueUInt64", 2, 2, swig_obj)) SWIG_fail;
   33923           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33924           1 :   if (!SWIG_IsOK(res1)) {
   33925           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueUInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33926             :   }
   33927           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33928           1 :   {
   33929           1 :     arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
   33930             :   }
   33931           1 :   {
   33932           1 :     const int bLocalUseExceptions = GetUseExceptions();
   33933           1 :     if ( bLocalUseExceptions ) {
   33934           0 :       pushErrorHandler();
   33935             :     }
   33936           1 :     {
   33937           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33938           1 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueUInt64(arg1,arg2);
   33939           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33940             :     }
   33941           1 :     if ( bLocalUseExceptions ) {
   33942           0 :       popErrorHandler();
   33943             :     }
   33944             : #ifndef SED_HACKS
   33945             :     if ( bLocalUseExceptions ) {
   33946             :       CPLErr eclass = CPLGetLastErrorType();
   33947             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33948             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33949             :       }
   33950             :     }
   33951             : #endif
   33952             :   }
   33953           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33954           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33955             :   return resultobj;
   33956             : fail:
   33957             :   return NULL;
   33958             : }
   33959             : 
   33960             : 
   33961           3 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33962           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33963           3 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33964           3 :   char *arg2 = (char *) 0 ;
   33965           3 :   void *argp1 = 0 ;
   33966           3 :   int res1 = 0 ;
   33967           3 :   int res2 ;
   33968           3 :   char *buf2 = 0 ;
   33969           3 :   int alloc2 = 0 ;
   33970           3 :   PyObject *swig_obj[2] ;
   33971           3 :   CPLErr result;
   33972             :   
   33973           3 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueString", 2, 2, swig_obj)) SWIG_fail;
   33974           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33975           3 :   if (!SWIG_IsOK(res1)) {
   33976           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueString" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33977             :   }
   33978           3 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33979           3 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33980           3 :   if (!SWIG_IsOK(res2)) {
   33981           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetNoDataValueString" "', argument " "2"" of type '" "char const *""'");
   33982             :   }
   33983           3 :   arg2 = reinterpret_cast< char * >(buf2);
   33984           3 :   {
   33985           3 :     const int bLocalUseExceptions = GetUseExceptions();
   33986           3 :     if ( bLocalUseExceptions ) {
   33987           0 :       pushErrorHandler();
   33988             :     }
   33989           3 :     {
   33990           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33991           3 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueString(arg1,(char const *)arg2);
   33992           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33993             :     }
   33994           3 :     if ( bLocalUseExceptions ) {
   33995           0 :       popErrorHandler();
   33996             :     }
   33997             : #ifndef SED_HACKS
   33998             :     if ( bLocalUseExceptions ) {
   33999             :       CPLErr eclass = CPLGetLastErrorType();
   34000             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34001             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34002             :       }
   34003             :     }
   34004             : #endif
   34005             :   }
   34006           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34007           3 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34008           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34009             :   return resultobj;
   34010           0 : fail:
   34011           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34012             :   return NULL;
   34013             : }
   34014             : 
   34015             : 
   34016           8 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34017           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34018           8 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34019           8 :   GIntBig arg2 ;
   34020           8 :   char *arg3 = (char *) 0 ;
   34021           8 :   void *argp1 = 0 ;
   34022           8 :   int res1 = 0 ;
   34023           8 :   int alloc2 = 0 ;
   34024           8 :   bool viewIsValid2 = false ;
   34025           8 :   Py_buffer view2 ;
   34026           8 :   PyObject *swig_obj[2] ;
   34027           8 :   CPLErr result;
   34028             :   
   34029           8 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueRaw", 2, 2, swig_obj)) SWIG_fail;
   34030           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34031           8 :   if (!SWIG_IsOK(res1)) {
   34032           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueRaw" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34033             :   }
   34034           8 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34035           8 :   {
   34036             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   34037           8 :     char* ptr = NULL;
   34038           8 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   34039           0 :       SWIG_fail;
   34040             :     }
   34041           8 :     arg3 = (char *)ptr;
   34042             :   }
   34043           8 :   {
   34044           8 :     const int bLocalUseExceptions = GetUseExceptions();
   34045           8 :     if ( bLocalUseExceptions ) {
   34046           1 :       pushErrorHandler();
   34047             :     }
   34048           8 :     {
   34049           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34050           8 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueRaw(arg1,arg2,arg3);
   34051           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34052             :     }
   34053           8 :     if ( bLocalUseExceptions ) {
   34054           1 :       popErrorHandler();
   34055             :     }
   34056             : #ifndef SED_HACKS
   34057             :     if ( bLocalUseExceptions ) {
   34058             :       CPLErr eclass = CPLGetLastErrorType();
   34059             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34060             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34061             :       }
   34062             :     }
   34063             : #endif
   34064             :   }
   34065           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34066           8 :   {
   34067             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   34068           8 :     if( viewIsValid2 ) {
   34069           8 :       PyBuffer_Release(&view2);
   34070             :     }
   34071           0 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   34072           0 :       delete[] arg3;
   34073             :     }
   34074             :   }
   34075           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34076             :   return resultobj;
   34077           0 : fail:
   34078           0 :   {
   34079             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   34080           0 :     if( viewIsValid2 ) {
   34081           0 :       PyBuffer_Release(&view2);
   34082             :     }
   34083           8 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   34084             :       delete[] arg3;
   34085             :     }
   34086             :   }
   34087             :   return NULL;
   34088             : }
   34089             : 
   34090             : 
   34091           4 : SWIGINTERN PyObject *_wrap_MDArray_DeleteNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34092           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34093           4 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34094           4 :   void *argp1 = 0 ;
   34095           4 :   int res1 = 0 ;
   34096           4 :   PyObject *swig_obj[1] ;
   34097           4 :   CPLErr result;
   34098             :   
   34099           4 :   if (!args) SWIG_fail;
   34100           4 :   swig_obj[0] = args;
   34101           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34102           4 :   if (!SWIG_IsOK(res1)) {
   34103           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_DeleteNoDataValue" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34104             :   }
   34105           4 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34106           4 :   {
   34107           4 :     const int bLocalUseExceptions = GetUseExceptions();
   34108           4 :     if ( bLocalUseExceptions ) {
   34109           0 :       pushErrorHandler();
   34110             :     }
   34111           4 :     {
   34112           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34113           4 :       result = (CPLErr)GDALMDArrayHS_DeleteNoDataValue(arg1);
   34114           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34115             :     }
   34116           4 :     if ( bLocalUseExceptions ) {
   34117           0 :       popErrorHandler();
   34118             :     }
   34119             : #ifndef SED_HACKS
   34120             :     if ( bLocalUseExceptions ) {
   34121             :       CPLErr eclass = CPLGetLastErrorType();
   34122             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34123             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34124             :       }
   34125             :     }
   34126             : #endif
   34127             :   }
   34128           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34129           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34130             :   return resultobj;
   34131             : fail:
   34132             :   return NULL;
   34133             : }
   34134             : 
   34135             : 
   34136         100 : SWIGINTERN PyObject *_wrap_MDArray_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34137         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34138         100 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34139         100 :   double *arg2 = (double *) 0 ;
   34140         100 :   int *arg3 = (int *) 0 ;
   34141         100 :   void *argp1 = 0 ;
   34142         100 :   int res1 = 0 ;
   34143         100 :   double tmpval2 ;
   34144         100 :   int tmphasval2 ;
   34145         100 :   PyObject *swig_obj[1] ;
   34146             :   
   34147         100 :   {
   34148             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   34149         100 :     arg2 = &tmpval2;
   34150         100 :     arg3 = &tmphasval2;
   34151             :   }
   34152         100 :   if (!args) SWIG_fail;
   34153         100 :   swig_obj[0] = args;
   34154         100 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34155         100 :   if (!SWIG_IsOK(res1)) {
   34156           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetOffset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34157             :   }
   34158         100 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34159         100 :   {
   34160         100 :     const int bLocalUseExceptions = GetUseExceptions();
   34161         100 :     if ( bLocalUseExceptions ) {
   34162           1 :       pushErrorHandler();
   34163             :     }
   34164         100 :     {
   34165         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34166         100 :       GDALMDArrayHS_GetOffset(arg1,arg2,arg3);
   34167         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34168             :     }
   34169         100 :     if ( bLocalUseExceptions ) {
   34170           1 :       popErrorHandler();
   34171             :     }
   34172             : #ifndef SED_HACKS
   34173             :     if ( bLocalUseExceptions ) {
   34174             :       CPLErr eclass = CPLGetLastErrorType();
   34175             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34176             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34177             :       }
   34178             :     }
   34179             : #endif
   34180             :   }
   34181         100 :   resultobj = SWIG_Py_Void();
   34182         100 :   {
   34183             :     /* %typemap(python,argout) (double *val, int *hasval) */
   34184         100 :     PyObject *r;
   34185         100 :     if ( !*arg3 ) {
   34186          82 :       Py_INCREF(Py_None);
   34187          82 :       r = Py_None;
   34188             :     }
   34189             :     else {
   34190          18 :       r = PyFloat_FromDouble( *arg2 );
   34191             :     }
   34192             : #if SWIG_VERSION >= 0x040300
   34193             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   34194             : #else
   34195         100 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   34196             : #endif
   34197             :   }
   34198         100 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34199             :   return resultobj;
   34200             : fail:
   34201             :   return NULL;
   34202             : }
   34203             : 
   34204             : 
   34205           5 : SWIGINTERN PyObject *_wrap_MDArray_GetOffsetStorageType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34206           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34207           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34208           5 :   void *argp1 = 0 ;
   34209           5 :   int res1 = 0 ;
   34210           5 :   PyObject *swig_obj[1] ;
   34211           5 :   GDALDataType result;
   34212             :   
   34213           5 :   if (!args) SWIG_fail;
   34214           5 :   swig_obj[0] = args;
   34215           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34216           5 :   if (!SWIG_IsOK(res1)) {
   34217           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetOffsetStorageType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34218             :   }
   34219           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34220           5 :   {
   34221           5 :     const int bLocalUseExceptions = GetUseExceptions();
   34222           5 :     if ( bLocalUseExceptions ) {
   34223           0 :       pushErrorHandler();
   34224             :     }
   34225           5 :     {
   34226           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34227           5 :       result = (GDALDataType)GDALMDArrayHS_GetOffsetStorageType(arg1);
   34228           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34229             :     }
   34230           5 :     if ( bLocalUseExceptions ) {
   34231           0 :       popErrorHandler();
   34232             :     }
   34233             : #ifndef SED_HACKS
   34234             :     if ( bLocalUseExceptions ) {
   34235             :       CPLErr eclass = CPLGetLastErrorType();
   34236             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34237             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34238             :       }
   34239             :     }
   34240             : #endif
   34241             :   }
   34242           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34243           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34244             :   return resultobj;
   34245             : fail:
   34246             :   return NULL;
   34247             : }
   34248             : 
   34249             : 
   34250         103 : SWIGINTERN PyObject *_wrap_MDArray_GetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34251         103 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34252         103 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34253         103 :   double *arg2 = (double *) 0 ;
   34254         103 :   int *arg3 = (int *) 0 ;
   34255         103 :   void *argp1 = 0 ;
   34256         103 :   int res1 = 0 ;
   34257         103 :   double tmpval2 ;
   34258         103 :   int tmphasval2 ;
   34259         103 :   PyObject *swig_obj[1] ;
   34260             :   
   34261         103 :   {
   34262             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   34263         103 :     arg2 = &tmpval2;
   34264         103 :     arg3 = &tmphasval2;
   34265             :   }
   34266         103 :   if (!args) SWIG_fail;
   34267         103 :   swig_obj[0] = args;
   34268         103 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34269         103 :   if (!SWIG_IsOK(res1)) {
   34270           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetScale" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34271             :   }
   34272         103 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34273         103 :   {
   34274         103 :     const int bLocalUseExceptions = GetUseExceptions();
   34275         103 :     if ( bLocalUseExceptions ) {
   34276           1 :       pushErrorHandler();
   34277             :     }
   34278         103 :     {
   34279         103 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34280         103 :       GDALMDArrayHS_GetScale(arg1,arg2,arg3);
   34281         103 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34282             :     }
   34283         103 :     if ( bLocalUseExceptions ) {
   34284           1 :       popErrorHandler();
   34285             :     }
   34286             : #ifndef SED_HACKS
   34287             :     if ( bLocalUseExceptions ) {
   34288             :       CPLErr eclass = CPLGetLastErrorType();
   34289             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34290             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34291             :       }
   34292             :     }
   34293             : #endif
   34294             :   }
   34295         103 :   resultobj = SWIG_Py_Void();
   34296         103 :   {
   34297             :     /* %typemap(python,argout) (double *val, int *hasval) */
   34298         103 :     PyObject *r;
   34299         103 :     if ( !*arg3 ) {
   34300          82 :       Py_INCREF(Py_None);
   34301          82 :       r = Py_None;
   34302             :     }
   34303             :     else {
   34304          21 :       r = PyFloat_FromDouble( *arg2 );
   34305             :     }
   34306             : #if SWIG_VERSION >= 0x040300
   34307             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   34308             : #else
   34309         103 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   34310             : #endif
   34311             :   }
   34312         103 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34313             :   return resultobj;
   34314             : fail:
   34315             :   return NULL;
   34316             : }
   34317             : 
   34318             : 
   34319           5 : SWIGINTERN PyObject *_wrap_MDArray_GetScaleStorageType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34320           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34321           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34322           5 :   void *argp1 = 0 ;
   34323           5 :   int res1 = 0 ;
   34324           5 :   PyObject *swig_obj[1] ;
   34325           5 :   GDALDataType result;
   34326             :   
   34327           5 :   if (!args) SWIG_fail;
   34328           5 :   swig_obj[0] = args;
   34329           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34330           5 :   if (!SWIG_IsOK(res1)) {
   34331           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetScaleStorageType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34332             :   }
   34333           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34334           5 :   {
   34335           5 :     const int bLocalUseExceptions = GetUseExceptions();
   34336           5 :     if ( bLocalUseExceptions ) {
   34337           0 :       pushErrorHandler();
   34338             :     }
   34339           5 :     {
   34340           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34341           5 :       result = (GDALDataType)GDALMDArrayHS_GetScaleStorageType(arg1);
   34342           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34343             :     }
   34344           5 :     if ( bLocalUseExceptions ) {
   34345           0 :       popErrorHandler();
   34346             :     }
   34347             : #ifndef SED_HACKS
   34348             :     if ( bLocalUseExceptions ) {
   34349             :       CPLErr eclass = CPLGetLastErrorType();
   34350             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34351             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34352             :       }
   34353             :     }
   34354             : #endif
   34355             :   }
   34356           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34357           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34358             :   return resultobj;
   34359             : fail:
   34360             :   return NULL;
   34361             : }
   34362             : 
   34363             : 
   34364          21 : SWIGINTERN PyObject *_wrap_MDArray_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   34365          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34366          21 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34367          21 :   double arg2 ;
   34368          21 :   GDALDataType arg3 = (GDALDataType) GDT_Unknown ;
   34369          21 :   void *argp1 = 0 ;
   34370          21 :   int res1 = 0 ;
   34371          21 :   double val2 ;
   34372          21 :   int ecode2 = 0 ;
   34373          21 :   PyObject * obj0 = 0 ;
   34374          21 :   PyObject * obj1 = 0 ;
   34375          21 :   PyObject * obj2 = 0 ;
   34376          21 :   char * kwnames[] = {
   34377             :     (char *)"self",  (char *)"val",  (char *)"storageType",  NULL 
   34378             :   };
   34379          21 :   CPLErr result;
   34380             :   
   34381          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:MDArray_SetOffset", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   34382          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34383          21 :   if (!SWIG_IsOK(res1)) {
   34384           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetOffset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34385             :   }
   34386          21 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34387          21 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   34388          21 :   if (!SWIG_IsOK(ecode2)) {
   34389           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetOffset" "', argument " "2"" of type '" "double""'");
   34390             :   } 
   34391          21 :   arg2 = static_cast< double >(val2);
   34392          21 :   if (obj2) {
   34393           2 :     {
   34394             :       // %typemap(in) GDALDataType
   34395           2 :       int val = 0;
   34396           2 :       int ecode = SWIG_AsVal_int(obj2, &val);
   34397           2 :       if (!SWIG_IsOK(ecode)) {
   34398           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   34399             :       }
   34400           2 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   34401             :       {
   34402           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   34403             :       }
   34404             :       arg3 = static_cast<GDALDataType>(val);
   34405             :     }
   34406             :   }
   34407          21 :   {
   34408          21 :     const int bLocalUseExceptions = GetUseExceptions();
   34409          21 :     if ( bLocalUseExceptions ) {
   34410           2 :       pushErrorHandler();
   34411             :     }
   34412          21 :     {
   34413          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34414          21 :       result = (CPLErr)GDALMDArrayHS_SetOffset(arg1,arg2,arg3);
   34415          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34416             :     }
   34417          21 :     if ( bLocalUseExceptions ) {
   34418           2 :       popErrorHandler();
   34419             :     }
   34420             : #ifndef SED_HACKS
   34421             :     if ( bLocalUseExceptions ) {
   34422             :       CPLErr eclass = CPLGetLastErrorType();
   34423             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34424             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34425             :       }
   34426             :     }
   34427             : #endif
   34428             :   }
   34429          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34430          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34431             :   return resultobj;
   34432             : fail:
   34433             :   return NULL;
   34434             : }
   34435             : 
   34436             : 
   34437          21 : SWIGINTERN PyObject *_wrap_MDArray_SetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   34438          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34439          21 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34440          21 :   double arg2 ;
   34441          21 :   GDALDataType arg3 = (GDALDataType) GDT_Unknown ;
   34442          21 :   void *argp1 = 0 ;
   34443          21 :   int res1 = 0 ;
   34444          21 :   double val2 ;
   34445          21 :   int ecode2 = 0 ;
   34446          21 :   PyObject * obj0 = 0 ;
   34447          21 :   PyObject * obj1 = 0 ;
   34448          21 :   PyObject * obj2 = 0 ;
   34449          21 :   char * kwnames[] = {
   34450             :     (char *)"self",  (char *)"val",  (char *)"storageType",  NULL 
   34451             :   };
   34452          21 :   CPLErr result;
   34453             :   
   34454          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:MDArray_SetScale", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   34455          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34456          21 :   if (!SWIG_IsOK(res1)) {
   34457           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetScale" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34458             :   }
   34459          21 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34460          21 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   34461          21 :   if (!SWIG_IsOK(ecode2)) {
   34462           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetScale" "', argument " "2"" of type '" "double""'");
   34463             :   } 
   34464          21 :   arg2 = static_cast< double >(val2);
   34465          21 :   if (obj2) {
   34466           2 :     {
   34467             :       // %typemap(in) GDALDataType
   34468           2 :       int val = 0;
   34469           2 :       int ecode = SWIG_AsVal_int(obj2, &val);
   34470           2 :       if (!SWIG_IsOK(ecode)) {
   34471           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   34472             :       }
   34473           2 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   34474             :       {
   34475           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   34476             :       }
   34477             :       arg3 = static_cast<GDALDataType>(val);
   34478             :     }
   34479             :   }
   34480          21 :   {
   34481          21 :     const int bLocalUseExceptions = GetUseExceptions();
   34482          21 :     if ( bLocalUseExceptions ) {
   34483           2 :       pushErrorHandler();
   34484             :     }
   34485          21 :     {
   34486          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34487          21 :       result = (CPLErr)GDALMDArrayHS_SetScale(arg1,arg2,arg3);
   34488          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34489             :     }
   34490          21 :     if ( bLocalUseExceptions ) {
   34491           2 :       popErrorHandler();
   34492             :     }
   34493             : #ifndef SED_HACKS
   34494             :     if ( bLocalUseExceptions ) {
   34495             :       CPLErr eclass = CPLGetLastErrorType();
   34496             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34497             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34498             :       }
   34499             :     }
   34500             : #endif
   34501             :   }
   34502          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34503          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34504             :   return resultobj;
   34505             : fail:
   34506             :   return NULL;
   34507             : }
   34508             : 
   34509             : 
   34510          15 : SWIGINTERN PyObject *_wrap_MDArray_SetUnit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34511          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34512          15 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34513          15 :   char *arg2 = (char *) 0 ;
   34514          15 :   void *argp1 = 0 ;
   34515          15 :   int res1 = 0 ;
   34516          15 :   int res2 ;
   34517          15 :   char *buf2 = 0 ;
   34518          15 :   int alloc2 = 0 ;
   34519          15 :   PyObject *swig_obj[2] ;
   34520          15 :   CPLErr result;
   34521             :   
   34522          15 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetUnit", 2, 2, swig_obj)) SWIG_fail;
   34523          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34524          15 :   if (!SWIG_IsOK(res1)) {
   34525           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetUnit" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34526             :   }
   34527          15 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34528          15 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   34529          15 :   if (!SWIG_IsOK(res2)) {
   34530           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetUnit" "', argument " "2"" of type '" "char const *""'");
   34531             :   }
   34532          15 :   arg2 = reinterpret_cast< char * >(buf2);
   34533          15 :   {
   34534          15 :     const int bLocalUseExceptions = GetUseExceptions();
   34535          15 :     if ( bLocalUseExceptions ) {
   34536           4 :       pushErrorHandler();
   34537             :     }
   34538          15 :     {
   34539          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34540          15 :       result = (CPLErr)GDALMDArrayHS_SetUnit(arg1,(char const *)arg2);
   34541          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34542             :     }
   34543          15 :     if ( bLocalUseExceptions ) {
   34544           4 :       popErrorHandler();
   34545             :     }
   34546             : #ifndef SED_HACKS
   34547             :     if ( bLocalUseExceptions ) {
   34548             :       CPLErr eclass = CPLGetLastErrorType();
   34549             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34550             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34551             :       }
   34552             :     }
   34553             : #endif
   34554             :   }
   34555          15 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34556          15 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34557          15 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34558             :   return resultobj;
   34559           0 : fail:
   34560           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34561             :   return NULL;
   34562             : }
   34563             : 
   34564             : 
   34565         111 : SWIGINTERN PyObject *_wrap_MDArray_GetUnit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34566         111 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34567         111 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34568         111 :   void *argp1 = 0 ;
   34569         111 :   int res1 = 0 ;
   34570         111 :   PyObject *swig_obj[1] ;
   34571         111 :   char *result = 0 ;
   34572             :   
   34573         111 :   if (!args) SWIG_fail;
   34574         111 :   swig_obj[0] = args;
   34575         111 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34576         111 :   if (!SWIG_IsOK(res1)) {
   34577           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetUnit" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34578             :   }
   34579         111 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34580         111 :   {
   34581         111 :     const int bLocalUseExceptions = GetUseExceptions();
   34582         111 :     if ( bLocalUseExceptions ) {
   34583           7 :       pushErrorHandler();
   34584             :     }
   34585         111 :     {
   34586         111 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34587         111 :       result = (char *)GDALMDArrayHS_GetUnit(arg1);
   34588         111 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34589             :     }
   34590         111 :     if ( bLocalUseExceptions ) {
   34591           7 :       popErrorHandler();
   34592             :     }
   34593             : #ifndef SED_HACKS
   34594             :     if ( bLocalUseExceptions ) {
   34595             :       CPLErr eclass = CPLGetLastErrorType();
   34596             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34597             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34598             :       }
   34599             :     }
   34600             : #endif
   34601             :   }
   34602         111 :   resultobj = SWIG_FromCharPtr((const char *)result);
   34603         111 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34604             :   return resultobj;
   34605             : fail:
   34606             :   return NULL;
   34607             : }
   34608             : 
   34609             : 
   34610          30 : SWIGINTERN PyObject *_wrap_MDArray_SetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34611          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34612          30 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34613          30 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
   34614          30 :   void *argp1 = 0 ;
   34615          30 :   int res1 = 0 ;
   34616          30 :   void *argp2 = 0 ;
   34617          30 :   int res2 = 0 ;
   34618          30 :   PyObject *swig_obj[2] ;
   34619          30 :   OGRErr result;
   34620             :   
   34621          30 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
   34622          30 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34623          30 :   if (!SWIG_IsOK(res1)) {
   34624           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetSpatialRef" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34625             :   }
   34626          30 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34627          30 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   34628          30 :   if (!SWIG_IsOK(res2)) {
   34629           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   34630             :   }
   34631          30 :   arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   34632          30 :   {
   34633          30 :     const int bLocalUseExceptions = GetUseExceptions();
   34634          30 :     if ( bLocalUseExceptions ) {
   34635           4 :       pushErrorHandler();
   34636             :     }
   34637          30 :     {
   34638          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34639          30 :       result = (OGRErr)GDALMDArrayHS_SetSpatialRef(arg1,arg2);
   34640          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34641             :     }
   34642          30 :     if ( bLocalUseExceptions ) {
   34643           4 :       popErrorHandler();
   34644             :     }
   34645             : #ifndef SED_HACKS
   34646             :     if ( bLocalUseExceptions ) {
   34647             :       CPLErr eclass = CPLGetLastErrorType();
   34648             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34649             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34650             :       }
   34651             :     }
   34652             : #endif
   34653             :   }
   34654          30 :   {
   34655             :     /* %typemap(out) OGRErr */
   34656          30 :     if ( result != 0 && GetUseExceptions()) {
   34657           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   34658           0 :       if( pszMessage[0] != '\0' )
   34659           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   34660             :       else
   34661           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   34662           0 :       SWIG_fail;
   34663             :     }
   34664             :   }
   34665          30 :   {
   34666             :     /* %typemap(ret) OGRErr */
   34667          30 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   34668          30 :       resultobj = PyInt_FromLong( result );
   34669             :     }
   34670             :   }
   34671          30 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34672             :   return resultobj;
   34673             : fail:
   34674             :   return NULL;
   34675             : }
   34676             : 
   34677             : 
   34678          77 : SWIGINTERN PyObject *_wrap_MDArray_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34679          77 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34680          77 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34681          77 :   void *argp1 = 0 ;
   34682          77 :   int res1 = 0 ;
   34683          77 :   PyObject *swig_obj[1] ;
   34684          77 :   OSRSpatialReferenceShadow *result = 0 ;
   34685             :   
   34686          77 :   if (!args) SWIG_fail;
   34687          77 :   swig_obj[0] = args;
   34688          77 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34689          77 :   if (!SWIG_IsOK(res1)) {
   34690           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetSpatialRef" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34691             :   }
   34692          77 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34693          77 :   {
   34694          77 :     const int bLocalUseExceptions = GetUseExceptions();
   34695          77 :     if ( bLocalUseExceptions ) {
   34696          13 :       pushErrorHandler();
   34697             :     }
   34698          77 :     {
   34699          77 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34700          77 :       result = (OSRSpatialReferenceShadow *)GDALMDArrayHS_GetSpatialRef(arg1);
   34701          77 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34702             :     }
   34703          77 :     if ( bLocalUseExceptions ) {
   34704          13 :       popErrorHandler();
   34705             :     }
   34706             : #ifndef SED_HACKS
   34707             :     if ( bLocalUseExceptions ) {
   34708             :       CPLErr eclass = CPLGetLastErrorType();
   34709             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34710             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34711             :       }
   34712             :     }
   34713             : #endif
   34714             :   }
   34715          77 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   34716          77 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34717             :   return resultobj;
   34718             : fail:
   34719             :   return NULL;
   34720             : }
   34721             : 
   34722             : 
   34723         431 : SWIGINTERN PyObject *_wrap_MDArray_GetView(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34724         431 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34725         431 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34726         431 :   char *arg2 = (char *) 0 ;
   34727         431 :   void *argp1 = 0 ;
   34728         431 :   int res1 = 0 ;
   34729         431 :   int res2 ;
   34730         431 :   char *buf2 = 0 ;
   34731         431 :   int alloc2 = 0 ;
   34732         431 :   PyObject *swig_obj[2] ;
   34733         431 :   GDALMDArrayHS *result = 0 ;
   34734             :   
   34735         431 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetView", 2, 2, swig_obj)) SWIG_fail;
   34736         431 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34737         431 :   if (!SWIG_IsOK(res1)) {
   34738           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetView" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34739             :   }
   34740         431 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34741         431 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   34742         431 :   if (!SWIG_IsOK(res2)) {
   34743           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetView" "', argument " "2"" of type '" "char const *""'");
   34744             :   }
   34745         431 :   arg2 = reinterpret_cast< char * >(buf2);
   34746         431 :   {
   34747         431 :     if (!arg2) {
   34748           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   34749             :     }
   34750             :   }
   34751         430 :   {
   34752         430 :     const int bLocalUseExceptions = GetUseExceptions();
   34753         430 :     if ( bLocalUseExceptions ) {
   34754           8 :       pushErrorHandler();
   34755             :     }
   34756         430 :     {
   34757         430 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34758         430 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetView(arg1,(char const *)arg2);
   34759         430 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34760             :     }
   34761         430 :     if ( bLocalUseExceptions ) {
   34762           8 :       popErrorHandler();
   34763             :     }
   34764             : #ifndef SED_HACKS
   34765             :     if ( bLocalUseExceptions ) {
   34766             :       CPLErr eclass = CPLGetLastErrorType();
   34767             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34768             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34769             :       }
   34770             :     }
   34771             : #endif
   34772             :   }
   34773         430 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   34774         430 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34775         431 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34776             :   return resultobj;
   34777           1 : fail:
   34778           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34779             :   return NULL;
   34780             : }
   34781             : 
   34782             : 
   34783          44 : SWIGINTERN PyObject *_wrap_MDArray_Transpose(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34784          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34785          44 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34786          44 :   int arg2 ;
   34787          44 :   int *arg3 = (int *) 0 ;
   34788          44 :   void *argp1 = 0 ;
   34789          44 :   int res1 = 0 ;
   34790          44 :   PyObject *swig_obj[2] ;
   34791          44 :   GDALMDArrayHS *result = 0 ;
   34792             :   
   34793          44 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Transpose", 2, 2, swig_obj)) SWIG_fail;
   34794          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34795          44 :   if (!SWIG_IsOK(res1)) {
   34796           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Transpose" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34797             :   }
   34798          44 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34799          44 :   {
   34800             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   34801          44 :     arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
   34802          44 :     if( arg2 < 0 ) {
   34803           0 :       SWIG_fail;
   34804             :     }
   34805             :   }
   34806          44 :   {
   34807          44 :     const int bLocalUseExceptions = GetUseExceptions();
   34808          44 :     if ( bLocalUseExceptions ) {
   34809           1 :       pushErrorHandler();
   34810             :     }
   34811          44 :     {
   34812          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34813          44 :       result = (GDALMDArrayHS *)GDALMDArrayHS_Transpose(arg1,arg2,arg3);
   34814          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34815             :     }
   34816          44 :     if ( bLocalUseExceptions ) {
   34817           1 :       popErrorHandler();
   34818             :     }
   34819             : #ifndef SED_HACKS
   34820             :     if ( bLocalUseExceptions ) {
   34821             :       CPLErr eclass = CPLGetLastErrorType();
   34822             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34823             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34824             :       }
   34825             :     }
   34826             : #endif
   34827             :   }
   34828          44 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   34829          44 :   {
   34830             :     /* %typemap(freearg) (int nList, int* pList) */
   34831          44 :     free(arg3);
   34832             :   }
   34833          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34834             :   return resultobj;
   34835           0 : fail:
   34836           0 :   {
   34837             :     /* %typemap(freearg) (int nList, int* pList) */
   34838           0 :     free(arg3);
   34839             :   }
   34840           0 :   return NULL;
   34841             : }
   34842             : 
   34843             : 
   34844          13 : SWIGINTERN PyObject *_wrap_MDArray_GetUnscaled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34845          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34846          13 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34847          13 :   void *argp1 = 0 ;
   34848          13 :   int res1 = 0 ;
   34849          13 :   PyObject *swig_obj[1] ;
   34850          13 :   GDALMDArrayHS *result = 0 ;
   34851             :   
   34852          13 :   if (!args) SWIG_fail;
   34853          13 :   swig_obj[0] = args;
   34854          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34855          13 :   if (!SWIG_IsOK(res1)) {
   34856           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetUnscaled" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34857             :   }
   34858          13 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34859          13 :   {
   34860          13 :     const int bLocalUseExceptions = GetUseExceptions();
   34861          13 :     if ( bLocalUseExceptions ) {
   34862           0 :       pushErrorHandler();
   34863             :     }
   34864          13 :     {
   34865          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34866          13 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetUnscaled(arg1);
   34867          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34868             :     }
   34869          13 :     if ( bLocalUseExceptions ) {
   34870           0 :       popErrorHandler();
   34871             :     }
   34872             : #ifndef SED_HACKS
   34873             :     if ( bLocalUseExceptions ) {
   34874             :       CPLErr eclass = CPLGetLastErrorType();
   34875             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34876             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34877             :       }
   34878             :     }
   34879             : #endif
   34880             :   }
   34881          13 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   34882          13 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34883             :   return resultobj;
   34884             : fail:
   34885             :   return NULL;
   34886             : }
   34887             : 
   34888             : 
   34889          35 : SWIGINTERN PyObject *_wrap_MDArray_GetMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34890          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34891          35 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34892          35 :   char **arg2 = (char **) 0 ;
   34893          35 :   void *argp1 = 0 ;
   34894          35 :   int res1 = 0 ;
   34895          35 :   PyObject *swig_obj[2] ;
   34896          35 :   GDALMDArrayHS *result = 0 ;
   34897             :   
   34898          35 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetMask", 1, 2, swig_obj)) SWIG_fail;
   34899          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34900          35 :   if (!SWIG_IsOK(res1)) {
   34901           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetMask" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34902             :   }
   34903          35 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34904          35 :   if (swig_obj[1]) {
   34905          14 :     {
   34906             :       /* %typemap(in) char **dict */
   34907          14 :       arg2 = NULL;
   34908          14 :       if ( PySequence_Check( swig_obj[1] ) ) {
   34909          14 :         int bErr = FALSE;
   34910          14 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   34911          14 :         if ( bErr )
   34912             :         {
   34913           0 :           SWIG_fail;
   34914             :         }
   34915             :       }
   34916           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   34917           0 :         int bErr = FALSE;
   34918           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   34919           0 :         if ( bErr )
   34920             :         {
   34921           0 :           SWIG_fail;
   34922             :         }
   34923             :       }
   34924             :       else {
   34925           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   34926           0 :         SWIG_fail;
   34927             :       }
   34928             :     }
   34929             :   }
   34930          35 :   {
   34931          35 :     const int bLocalUseExceptions = GetUseExceptions();
   34932          35 :     if ( bLocalUseExceptions ) {
   34933          14 :       pushErrorHandler();
   34934             :     }
   34935          35 :     {
   34936          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34937          35 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetMask(arg1,arg2);
   34938          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34939             :     }
   34940          35 :     if ( bLocalUseExceptions ) {
   34941          14 :       popErrorHandler();
   34942             :     }
   34943             : #ifndef SED_HACKS
   34944             :     if ( bLocalUseExceptions ) {
   34945             :       CPLErr eclass = CPLGetLastErrorType();
   34946             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34947             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34948             :       }
   34949             :     }
   34950             : #endif
   34951             :   }
   34952          35 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   34953          35 :   {
   34954             :     /* %typemap(freearg) char **dict */
   34955          35 :     CSLDestroy( arg2 );
   34956             :   }
   34957          47 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34958             :   return resultobj;
   34959           0 : fail:
   34960           0 :   {
   34961             :     /* %typemap(freearg) char **dict */
   34962           0 :     CSLDestroy( arg2 );
   34963             :   }
   34964             :   return NULL;
   34965             : }
   34966             : 
   34967             : 
   34968          22 : SWIGINTERN PyObject *_wrap_MDArray_GetGridded(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   34969          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34970          22 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34971          22 :   char *arg2 = (char *) 0 ;
   34972          22 :   GDALMDArrayHS *arg3 = (GDALMDArrayHS *) NULL ;
   34973          22 :   GDALMDArrayHS *arg4 = (GDALMDArrayHS *) NULL ;
   34974          22 :   char **arg5 = (char **) 0 ;
   34975          22 :   void *argp1 = 0 ;
   34976          22 :   int res1 = 0 ;
   34977          22 :   int res2 ;
   34978          22 :   char *buf2 = 0 ;
   34979          22 :   int alloc2 = 0 ;
   34980          22 :   void *argp3 = 0 ;
   34981          22 :   int res3 = 0 ;
   34982          22 :   void *argp4 = 0 ;
   34983          22 :   int res4 = 0 ;
   34984          22 :   PyObject * obj0 = 0 ;
   34985          22 :   PyObject * obj1 = 0 ;
   34986          22 :   PyObject * obj2 = 0 ;
   34987          22 :   PyObject * obj3 = 0 ;
   34988          22 :   PyObject * obj4 = 0 ;
   34989          22 :   char * kwnames[] = {
   34990             :     (char *)"self",  (char *)"pszGridOptions",  (char *)"xArray",  (char *)"yArray",  (char *)"options",  NULL 
   34991             :   };
   34992          22 :   GDALMDArrayHS *result = 0 ;
   34993             :   
   34994          22 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:MDArray_GetGridded", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   34995          22 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34996          22 :   if (!SWIG_IsOK(res1)) {
   34997           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetGridded" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34998             :   }
   34999          22 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35000          22 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   35001          22 :   if (!SWIG_IsOK(res2)) {
   35002           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetGridded" "', argument " "2"" of type '" "char const *""'");
   35003             :   }
   35004          22 :   arg2 = reinterpret_cast< char * >(buf2);
   35005          22 :   if (obj2) {
   35006          14 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35007          14 :     if (!SWIG_IsOK(res3)) {
   35008           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MDArray_GetGridded" "', argument " "3"" of type '" "GDALMDArrayHS *""'"); 
   35009             :     }
   35010          14 :     arg3 = reinterpret_cast< GDALMDArrayHS * >(argp3);
   35011             :   }
   35012          22 :   if (obj3) {
   35013          13 :     res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35014          13 :     if (!SWIG_IsOK(res4)) {
   35015           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MDArray_GetGridded" "', argument " "4"" of type '" "GDALMDArrayHS *""'"); 
   35016             :     }
   35017          13 :     arg4 = reinterpret_cast< GDALMDArrayHS * >(argp4);
   35018             :   }
   35019          22 :   if (obj4) {
   35020           3 :     {
   35021             :       /* %typemap(in) char **dict */
   35022           3 :       arg5 = NULL;
   35023           3 :       if ( PySequence_Check( obj4 ) ) {
   35024           3 :         int bErr = FALSE;
   35025           3 :         arg5 = CSLFromPySequence(obj4, &bErr);
   35026           3 :         if ( bErr )
   35027             :         {
   35028           0 :           SWIG_fail;
   35029             :         }
   35030             :       }
   35031           0 :       else if ( PyMapping_Check( obj4 ) ) {
   35032           0 :         int bErr = FALSE;
   35033           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   35034           0 :         if ( bErr )
   35035             :         {
   35036           0 :           SWIG_fail;
   35037             :         }
   35038             :       }
   35039             :       else {
   35040           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35041           0 :         SWIG_fail;
   35042             :       }
   35043             :     }
   35044             :   }
   35045          22 :   {
   35046          22 :     if (!arg2) {
   35047           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   35048             :     }
   35049             :   }
   35050          22 :   {
   35051          22 :     const int bLocalUseExceptions = GetUseExceptions();
   35052          22 :     if ( bLocalUseExceptions ) {
   35053           0 :       pushErrorHandler();
   35054             :     }
   35055          22 :     {
   35056          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35057          22 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetGridded(arg1,(char const *)arg2,arg3,arg4,arg5);
   35058          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35059             :     }
   35060          22 :     if ( bLocalUseExceptions ) {
   35061           0 :       popErrorHandler();
   35062             :     }
   35063             : #ifndef SED_HACKS
   35064             :     if ( bLocalUseExceptions ) {
   35065             :       CPLErr eclass = CPLGetLastErrorType();
   35066             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35067             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35068             :       }
   35069             :     }
   35070             : #endif
   35071             :   }
   35072          22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35073          22 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35074          22 :   {
   35075             :     /* %typemap(freearg) char **dict */
   35076          22 :     CSLDestroy( arg5 );
   35077             :   }
   35078          22 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   35079             :   return resultobj;
   35080           0 : fail:
   35081           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35082           0 :   {
   35083             :     /* %typemap(freearg) char **dict */
   35084           0 :     CSLDestroy( arg5 );
   35085             :   }
   35086             :   return NULL;
   35087             : }
   35088             : 
   35089             : 
   35090          71 : SWIGINTERN PyObject *_wrap_MDArray_AsClassicDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35091          71 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35092          71 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35093          71 :   size_t arg2 ;
   35094          71 :   size_t arg3 ;
   35095          71 :   GDALGroupHS *arg4 = (GDALGroupHS *) NULL ;
   35096          71 :   char **arg5 = (char **) 0 ;
   35097          71 :   void *argp1 = 0 ;
   35098          71 :   int res1 = 0 ;
   35099          71 :   size_t val2 ;
   35100          71 :   int ecode2 = 0 ;
   35101          71 :   size_t val3 ;
   35102          71 :   int ecode3 = 0 ;
   35103          71 :   void *argp4 = 0 ;
   35104          71 :   int res4 = 0 ;
   35105          71 :   PyObject *swig_obj[5] ;
   35106          71 :   GDALDatasetShadow *result = 0 ;
   35107             :   
   35108          71 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_AsClassicDataset", 3, 5, swig_obj)) SWIG_fail;
   35109          71 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35110          71 :   if (!SWIG_IsOK(res1)) {
   35111           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_AsClassicDataset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35112             :   }
   35113          71 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35114          71 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   35115          71 :   if (!SWIG_IsOK(ecode2)) {
   35116           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_AsClassicDataset" "', argument " "2"" of type '" "size_t""'");
   35117             :   } 
   35118          71 :   arg2 = static_cast< size_t >(val2);
   35119          71 :   ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
   35120          71 :   if (!SWIG_IsOK(ecode3)) {
   35121           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MDArray_AsClassicDataset" "', argument " "3"" of type '" "size_t""'");
   35122             :   } 
   35123          71 :   arg3 = static_cast< size_t >(val3);
   35124          71 :   if (swig_obj[3]) {
   35125          33 :     res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   35126          33 :     if (!SWIG_IsOK(res4)) {
   35127           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MDArray_AsClassicDataset" "', argument " "4"" of type '" "GDALGroupHS *""'"); 
   35128             :     }
   35129          33 :     arg4 = reinterpret_cast< GDALGroupHS * >(argp4);
   35130             :   }
   35131          71 :   if (swig_obj[4]) {
   35132          33 :     {
   35133             :       /* %typemap(in) char **dict */
   35134          33 :       arg5 = NULL;
   35135          33 :       if ( PySequence_Check( swig_obj[4] ) ) {
   35136          33 :         int bErr = FALSE;
   35137          33 :         arg5 = CSLFromPySequence(swig_obj[4], &bErr);
   35138          33 :         if ( bErr )
   35139             :         {
   35140           0 :           SWIG_fail;
   35141             :         }
   35142             :       }
   35143           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   35144           0 :         int bErr = FALSE;
   35145           0 :         arg5 = CSLFromPyMapping(swig_obj[4], &bErr);
   35146           0 :         if ( bErr )
   35147             :         {
   35148           0 :           SWIG_fail;
   35149             :         }
   35150             :       }
   35151             :       else {
   35152           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35153           0 :         SWIG_fail;
   35154             :       }
   35155             :     }
   35156             :   }
   35157          71 :   {
   35158          71 :     const int bLocalUseExceptions = GetUseExceptions();
   35159          71 :     if ( bLocalUseExceptions ) {
   35160          43 :       pushErrorHandler();
   35161             :     }
   35162          71 :     {
   35163          71 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35164          71 :       result = (GDALDatasetShadow *)GDALMDArrayHS_AsClassicDataset(arg1,arg2,arg3,arg4,arg5);
   35165          71 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35166             :     }
   35167          71 :     if ( bLocalUseExceptions ) {
   35168          43 :       popErrorHandler();
   35169             :     }
   35170             : #ifndef SED_HACKS
   35171             :     if ( bLocalUseExceptions ) {
   35172             :       CPLErr eclass = CPLGetLastErrorType();
   35173             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35174             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35175             :       }
   35176             :     }
   35177             : #endif
   35178             :   }
   35179          71 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   35180          71 :   {
   35181             :     /* %typemap(freearg) char **dict */
   35182          71 :     CSLDestroy( arg5 );
   35183             :   }
   35184         119 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   35185             :   return resultobj;
   35186           0 : fail:
   35187           0 :   {
   35188             :     /* %typemap(freearg) char **dict */
   35189           0 :     CSLDestroy( arg5 );
   35190             :   }
   35191             :   return NULL;
   35192             : }
   35193             : 
   35194             : 
   35195          15 : SWIGINTERN PyObject *_wrap_MDArray_GetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   35196          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35197          15 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35198          15 :   bool arg2 = (bool) FALSE ;
   35199          15 :   bool arg3 = (bool) TRUE ;
   35200          15 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   35201          15 :   void *arg5 = (void *) NULL ;
   35202          15 :   void *argp1 = 0 ;
   35203          15 :   int res1 = 0 ;
   35204          15 :   bool val2 ;
   35205          15 :   int ecode2 = 0 ;
   35206          15 :   bool val3 ;
   35207          15 :   int ecode3 = 0 ;
   35208          15 :   PyObject * obj0 = 0 ;
   35209          15 :   PyObject * obj1 = 0 ;
   35210          15 :   PyObject * obj2 = 0 ;
   35211          15 :   PyObject * obj3 = 0 ;
   35212          15 :   PyObject * obj4 = 0 ;
   35213          15 :   char * kwnames[] = {
   35214             :     (char *)"self",  (char *)"approx_ok",  (char *)"force",  (char *)"callback",  (char *)"callback_data",  NULL 
   35215             :   };
   35216          15 :   Statistics *result = 0 ;
   35217             :   
   35218             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   35219          15 :   PyProgressData *psProgressInfo;
   35220          15 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   35221          15 :   psProgressInfo->nLastReported = -1;
   35222          15 :   psProgressInfo->psPyCallback = NULL;
   35223          15 :   psProgressInfo->psPyCallbackData = NULL;
   35224          15 :   arg5 = psProgressInfo;
   35225          15 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:MDArray_GetStatistics", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   35226          15 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35227          15 :   if (!SWIG_IsOK(res1)) {
   35228           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetStatistics" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35229             :   }
   35230          15 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35231          15 :   if (obj1) {
   35232          13 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   35233          13 :     if (!SWIG_IsOK(ecode2)) {
   35234           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_GetStatistics" "', argument " "2"" of type '" "bool""'");
   35235             :     } 
   35236             :     arg2 = static_cast< bool >(val2);
   35237             :   }
   35238          15 :   if (obj2) {
   35239          13 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   35240          13 :     if (!SWIG_IsOK(ecode3)) {
   35241           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MDArray_GetStatistics" "', argument " "3"" of type '" "bool""'");
   35242             :     } 
   35243             :     arg3 = static_cast< bool >(val3);
   35244             :   }
   35245          15 :   if (obj3) {
   35246           0 :     {
   35247             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   35248             :       /* callback_func typemap */
   35249             :       
   35250             :       /* In some cases 0 is passed instead of None. */
   35251             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   35252           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   35253             :       {
   35254           0 :         if( PyLong_AsLong(obj3) == 0 )
   35255             :         {
   35256           0 :           obj3 = Py_None;
   35257             :         }
   35258             :       }
   35259             :       
   35260           0 :       if (obj3 && obj3 != Py_None ) {
   35261           0 :         void* cbfunction = NULL;
   35262           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   35263             :             (void**)&cbfunction,
   35264             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   35265             :             SWIG_POINTER_EXCEPTION | 0 ));
   35266             :         
   35267           0 :         if ( cbfunction == GDALTermProgress ) {
   35268             :           arg4 = GDALTermProgress;
   35269             :         } else {
   35270           0 :           if (!PyCallable_Check(obj3)) {
   35271           0 :             PyErr_SetString( PyExc_RuntimeError,
   35272             :               "Object given is not a Python function" );
   35273           0 :             SWIG_fail;
   35274             :           }
   35275           0 :           psProgressInfo->psPyCallback = obj3;
   35276           0 :           arg4 = PyProgressProxy;
   35277             :         }
   35278             :         
   35279             :       }
   35280             :       
   35281             :     }
   35282             :   }
   35283          15 :   if (obj4) {
   35284           0 :     {
   35285             :       /* %typemap(in) ( void* callback_data=NULL)  */
   35286           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   35287             :     }
   35288             :   }
   35289          15 :   {
   35290          15 :     const int bLocalUseExceptions = GetUseExceptions();
   35291          15 :     if ( bLocalUseExceptions ) {
   35292           5 :       pushErrorHandler();
   35293             :     }
   35294          15 :     {
   35295          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35296          15 :       result = (Statistics *)GDALMDArrayHS_GetStatistics(arg1,arg2,arg3,arg4,arg5);
   35297          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35298             :     }
   35299          15 :     if ( bLocalUseExceptions ) {
   35300           5 :       popErrorHandler();
   35301             :     }
   35302             : #ifndef SED_HACKS
   35303             :     if ( bLocalUseExceptions ) {
   35304             :       CPLErr eclass = CPLGetLastErrorType();
   35305             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35306             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35307             :       }
   35308             :     }
   35309             : #endif
   35310             :   }
   35311          15 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, 0 |  0 );
   35312          15 :   {
   35313             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35314             :     
   35315          15 :     CPLFree(psProgressInfo);
   35316             :     
   35317             :   }
   35318          15 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   35319             :   return resultobj;
   35320           0 : fail:
   35321           0 :   {
   35322             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35323             :     
   35324           0 :     CPLFree(psProgressInfo);
   35325             :     
   35326             :   }
   35327             :   return NULL;
   35328             : }
   35329             : 
   35330             : 
   35331           4 : SWIGINTERN PyObject *_wrap_MDArray_ComputeStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   35332           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35333           4 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35334           4 :   bool arg2 = (bool) FALSE ;
   35335           4 :   GDALProgressFunc arg3 = (GDALProgressFunc) NULL ;
   35336           4 :   void *arg4 = (void *) NULL ;
   35337           4 :   char **arg5 = (char **) 0 ;
   35338           4 :   void *argp1 = 0 ;
   35339           4 :   int res1 = 0 ;
   35340           4 :   bool val2 ;
   35341           4 :   int ecode2 = 0 ;
   35342           4 :   PyObject * obj0 = 0 ;
   35343           4 :   PyObject * obj1 = 0 ;
   35344           4 :   PyObject * obj2 = 0 ;
   35345           4 :   PyObject * obj3 = 0 ;
   35346           4 :   PyObject * obj4 = 0 ;
   35347           4 :   char * kwnames[] = {
   35348             :     (char *)"self",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   35349             :   };
   35350           4 :   Statistics *result = 0 ;
   35351             :   
   35352             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   35353           4 :   PyProgressData *psProgressInfo;
   35354           4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   35355           4 :   psProgressInfo->nLastReported = -1;
   35356           4 :   psProgressInfo->psPyCallback = NULL;
   35357           4 :   psProgressInfo->psPyCallbackData = NULL;
   35358           4 :   arg4 = psProgressInfo;
   35359           4 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:MDArray_ComputeStatistics", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   35360           4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35361           4 :   if (!SWIG_IsOK(res1)) {
   35362           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_ComputeStatistics" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35363             :   }
   35364           4 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35365           4 :   if (obj1) {
   35366           2 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   35367           2 :     if (!SWIG_IsOK(ecode2)) {
   35368           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
   35369             :     } 
   35370             :     arg2 = static_cast< bool >(val2);
   35371             :   }
   35372           4 :   if (obj2) {
   35373           0 :     {
   35374             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   35375             :       /* callback_func typemap */
   35376             :       
   35377             :       /* In some cases 0 is passed instead of None. */
   35378             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   35379           0 :       if ( PyLong_Check(obj2) || PyInt_Check(obj2) )
   35380             :       {
   35381           0 :         if( PyLong_AsLong(obj2) == 0 )
   35382             :         {
   35383           0 :           obj2 = Py_None;
   35384             :         }
   35385             :       }
   35386             :       
   35387           0 :       if (obj2 && obj2 != Py_None ) {
   35388           0 :         void* cbfunction = NULL;
   35389           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj2,
   35390             :             (void**)&cbfunction,
   35391             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   35392             :             SWIG_POINTER_EXCEPTION | 0 ));
   35393             :         
   35394           0 :         if ( cbfunction == GDALTermProgress ) {
   35395             :           arg3 = GDALTermProgress;
   35396             :         } else {
   35397           0 :           if (!PyCallable_Check(obj2)) {
   35398           0 :             PyErr_SetString( PyExc_RuntimeError,
   35399             :               "Object given is not a Python function" );
   35400           0 :             SWIG_fail;
   35401             :           }
   35402           0 :           psProgressInfo->psPyCallback = obj2;
   35403           0 :           arg3 = PyProgressProxy;
   35404             :         }
   35405             :         
   35406             :       }
   35407             :       
   35408             :     }
   35409             :   }
   35410           4 :   if (obj3) {
   35411           0 :     {
   35412             :       /* %typemap(in) ( void* callback_data=NULL)  */
   35413           0 :       psProgressInfo->psPyCallbackData = obj3 ;
   35414             :     }
   35415             :   }
   35416           4 :   if (obj4) {
   35417           2 :     {
   35418             :       /* %typemap(in) char **dict */
   35419           2 :       arg5 = NULL;
   35420           2 :       if ( PySequence_Check( obj4 ) ) {
   35421           2 :         int bErr = FALSE;
   35422           2 :         arg5 = CSLFromPySequence(obj4, &bErr);
   35423           2 :         if ( bErr )
   35424             :         {
   35425           0 :           SWIG_fail;
   35426             :         }
   35427             :       }
   35428           0 :       else if ( PyMapping_Check( obj4 ) ) {
   35429           0 :         int bErr = FALSE;
   35430           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   35431           0 :         if ( bErr )
   35432             :         {
   35433           0 :           SWIG_fail;
   35434             :         }
   35435             :       }
   35436             :       else {
   35437           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35438           0 :         SWIG_fail;
   35439             :       }
   35440             :     }
   35441             :   }
   35442           4 :   {
   35443           4 :     const int bLocalUseExceptions = GetUseExceptions();
   35444           4 :     if ( bLocalUseExceptions ) {
   35445           2 :       pushErrorHandler();
   35446             :     }
   35447           4 :     {
   35448           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35449           4 :       result = (Statistics *)GDALMDArrayHS_ComputeStatistics(arg1,arg2,arg3,arg4,arg5);
   35450           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35451             :     }
   35452           4 :     if ( bLocalUseExceptions ) {
   35453           2 :       popErrorHandler();
   35454             :     }
   35455             : #ifndef SED_HACKS
   35456             :     if ( bLocalUseExceptions ) {
   35457             :       CPLErr eclass = CPLGetLastErrorType();
   35458             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35459             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35460             :       }
   35461             :     }
   35462             : #endif
   35463             :   }
   35464           4 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, 0 |  0 );
   35465           4 :   {
   35466             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35467             :     
   35468           4 :     CPLFree(psProgressInfo);
   35469             :     
   35470             :   }
   35471           4 :   {
   35472             :     /* %typemap(freearg) char **dict */
   35473           4 :     CSLDestroy( arg5 );
   35474             :   }
   35475           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   35476             :   return resultobj;
   35477           0 : fail:
   35478           0 :   {
   35479             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35480             :     
   35481           0 :     CPLFree(psProgressInfo);
   35482             :     
   35483             :   }
   35484           0 :   {
   35485             :     /* %typemap(freearg) char **dict */
   35486           0 :     CSLDestroy( arg5 );
   35487             :   }
   35488             :   return NULL;
   35489             : }
   35490             : 
   35491             : 
   35492          34 : SWIGINTERN PyObject *_wrap_MDArray_GetResampled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35493          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35494          34 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35495          34 :   int arg2 ;
   35496          34 :   GDALDimensionHS **arg3 = (GDALDimensionHS **) 0 ;
   35497          34 :   GDALRIOResampleAlg arg4 ;
   35498          34 :   OSRSpatialReferenceShadow **arg5 = (OSRSpatialReferenceShadow **) 0 ;
   35499          34 :   char **arg6 = (char **) 0 ;
   35500          34 :   void *argp1 = 0 ;
   35501          34 :   int res1 = 0 ;
   35502          34 :   OSRSpatialReferenceShadow *val5 ;
   35503          34 :   PyObject *swig_obj[5] ;
   35504          34 :   GDALMDArrayHS *result = 0 ;
   35505             :   
   35506          34 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetResampled", 4, 5, swig_obj)) SWIG_fail;
   35507          34 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35508          34 :   if (!SWIG_IsOK(res1)) {
   35509           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetResampled" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35510             :   }
   35511          34 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35512          34 :   {
   35513             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDimensionHS *optional_##GDALDimensionHS)*/
   35514          34 :     if ( !PySequence_Check(swig_obj[1]) ) {
   35515           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   35516           0 :       SWIG_fail;
   35517             :     }
   35518          34 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   35519          34 :     if( size > (Py_ssize_t)INT_MAX ) {
   35520           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   35521           0 :       SWIG_fail;
   35522             :     }
   35523          34 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDimensionHS*) ) {
   35524           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   35525           0 :       SWIG_fail;
   35526             :     }
   35527          34 :     arg2 = (int)size;
   35528          34 :     arg3 = (GDALDimensionHS**) VSIMalloc(arg2*sizeof(GDALDimensionHS*));
   35529          34 :     if( !arg3) {
   35530           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   35531           0 :       SWIG_fail;
   35532             :     }
   35533             :     
   35534         112 :     for( int i = 0; i<arg2; i++ ) {
   35535          78 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   35536          78 :       GDALDimensionHS* rawobjectpointer = NULL;
   35537          78 :       if( o != Py_None )
   35538             :       {
   35539           8 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_EXCEPTION | 0 ));
   35540           8 :         if (!rawobjectpointer) {
   35541           0 :           Py_DECREF(o);
   35542           0 :           PyErr_SetString(PyExc_TypeError, "object of wrong GDALDimensionHS");
   35543           0 :           SWIG_fail;
   35544             :         }
   35545             :       }
   35546          78 :       arg3[i] = rawobjectpointer;
   35547          78 :       Py_DECREF(o);
   35548             :       
   35549             :     }
   35550             :   }
   35551          34 :   {
   35552             :     // %typemap(in) GDALRIOResampleAlg
   35553          34 :     int val = 0;
   35554          34 :     int ecode = SWIG_AsVal_int(swig_obj[2], &val);
   35555          34 :     if (!SWIG_IsOK(ecode)) {
   35556           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   35557             :     }
   35558          34 :     if( val < 0 ||
   35559          34 :       ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   35560          34 :         val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   35561             :       val > static_cast<int>(GRIORA_LAST) )
   35562             :     {
   35563           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   35564             :     }
   35565          34 :     arg4 = static_cast< GDALRIOResampleAlg >(val);
   35566             :   }
   35567          34 :   {
   35568             :     /* %typemap(in) (OSRSpatialReferenceShadow** optional_OSRSpatialReferenceShadow) */
   35569          34 :     if ( swig_obj[3] == Py_None ) {
   35570             :       arg5 = NULL;
   35571             :     }
   35572             :     else {
   35573           1 :       void* argp = NULL;
   35574           1 :       int res = SWIG_ConvertPtr(swig_obj[3], &argp, SWIGTYPE_p_OSRSpatialReferenceShadow,  0  | 0);
   35575           1 :       if (!SWIG_IsOK(res)) {
   35576           0 :         SWIG_exception_fail(SWIG_ArgError(res), "argument of type != OSRSpatialReferenceShadow");
   35577             :       }
   35578           1 :       val5 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp);
   35579           1 :       arg5 = &val5;
   35580             :     }
   35581             :   }
   35582          34 :   if (swig_obj[4]) {
   35583           5 :     {
   35584             :       /* %typemap(in) char **dict */
   35585           5 :       arg6 = NULL;
   35586           5 :       if ( PySequence_Check( swig_obj[4] ) ) {
   35587           5 :         int bErr = FALSE;
   35588           5 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   35589           5 :         if ( bErr )
   35590             :         {
   35591           0 :           SWIG_fail;
   35592             :         }
   35593             :       }
   35594           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   35595           0 :         int bErr = FALSE;
   35596           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   35597           0 :         if ( bErr )
   35598             :         {
   35599           0 :           SWIG_fail;
   35600             :         }
   35601             :       }
   35602             :       else {
   35603           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35604           0 :         SWIG_fail;
   35605             :       }
   35606             :     }
   35607             :   }
   35608          34 :   {
   35609          34 :     const int bLocalUseExceptions = GetUseExceptions();
   35610          34 :     if ( bLocalUseExceptions ) {
   35611           0 :       pushErrorHandler();
   35612             :     }
   35613          34 :     {
   35614          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35615          34 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetResampled(arg1,arg2,arg3,arg4,arg5,arg6);
   35616          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35617             :     }
   35618          34 :     if ( bLocalUseExceptions ) {
   35619           0 :       popErrorHandler();
   35620             :     }
   35621             : #ifndef SED_HACKS
   35622             :     if ( bLocalUseExceptions ) {
   35623             :       CPLErr eclass = CPLGetLastErrorType();
   35624             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35625             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35626             :       }
   35627             :     }
   35628             : #endif
   35629             :   }
   35630          34 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35631          34 :   {
   35632             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjectsItemMaybeNull)*/
   35633          34 :     CPLFree( arg3 );
   35634             :   }
   35635          34 :   {
   35636             :     /* %typemap(freearg) char **dict */
   35637          34 :     CSLDestroy( arg6 );
   35638             :   }
   35639          34 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   35640             :   return resultobj;
   35641           0 : fail:
   35642           0 :   {
   35643             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjectsItemMaybeNull)*/
   35644           0 :     CPLFree( arg3 );
   35645             :   }
   35646           0 :   {
   35647             :     /* %typemap(freearg) char **dict */
   35648           0 :     CSLDestroy( arg6 );
   35649             :   }
   35650             :   return NULL;
   35651             : }
   35652             : 
   35653             : 
   35654           7 : SWIGINTERN PyObject *_wrap_MDArray_GetMeshGrid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35655           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35656           7 :   int arg1 ;
   35657           7 :   GDALMDArrayHS **arg2 = (GDALMDArrayHS **) 0 ;
   35658           7 :   GDALMDArrayHS ***arg3 = (GDALMDArrayHS ***) 0 ;
   35659           7 :   size_t *arg4 = (size_t *) 0 ;
   35660           7 :   char **arg5 = (char **) 0 ;
   35661           7 :   GDALMDArrayHS **arrays3 = 0 ;
   35662           7 :   size_t nCount3 = 0 ;
   35663           7 :   PyObject *swig_obj[2] ;
   35664             :   
   35665           7 :   {
   35666             :     /* %typemap(in,numinputs=0) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   35667           7 :     arg3 = &arrays3;
   35668           7 :     arg4 = &nCount3;
   35669             :   }
   35670           7 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetMeshGrid", 1, 2, swig_obj)) SWIG_fail;
   35671           7 :   {
   35672             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALMDArrayHS *optional_##GDALMDArrayHS)*/
   35673           7 :     if ( !PySequence_Check(swig_obj[0]) ) {
   35674           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   35675           0 :       SWIG_fail;
   35676             :     }
   35677           7 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   35678           7 :     if( size > (Py_ssize_t)INT_MAX ) {
   35679           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   35680           0 :       SWIG_fail;
   35681             :     }
   35682           7 :     if( (size_t)size > SIZE_MAX / sizeof(GDALMDArrayHS*) ) {
   35683           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   35684           0 :       SWIG_fail;
   35685             :     }
   35686           7 :     arg1 = (int)size;
   35687           7 :     arg2 = (GDALMDArrayHS**) VSIMalloc(arg1*sizeof(GDALMDArrayHS*));
   35688           7 :     if( !arg2) {
   35689           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   35690           0 :       SWIG_fail;
   35691             :     }
   35692             :     
   35693          20 :     for( int i = 0; i<arg1; i++ ) {
   35694          13 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   35695          13 :       GDALMDArrayHS* rawobjectpointer = NULL;
   35696          13 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_EXCEPTION | 0 ));
   35697          13 :       if (!rawobjectpointer) {
   35698           0 :         Py_DECREF(o);
   35699           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALMDArrayHS");
   35700           0 :         SWIG_fail;
   35701             :       }
   35702          13 :       arg2[i] = rawobjectpointer;
   35703          13 :       Py_DECREF(o);
   35704             :       
   35705             :     }
   35706             :   }
   35707           7 :   if (swig_obj[1]) {
   35708           5 :     {
   35709             :       /* %typemap(in) char **dict */
   35710           5 :       arg5 = NULL;
   35711           5 :       if ( PySequence_Check( swig_obj[1] ) ) {
   35712           5 :         int bErr = FALSE;
   35713           5 :         arg5 = CSLFromPySequence(swig_obj[1], &bErr);
   35714           5 :         if ( bErr )
   35715             :         {
   35716           0 :           SWIG_fail;
   35717             :         }
   35718             :       }
   35719           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   35720           0 :         int bErr = FALSE;
   35721           0 :         arg5 = CSLFromPyMapping(swig_obj[1], &bErr);
   35722           0 :         if ( bErr )
   35723             :         {
   35724           0 :           SWIG_fail;
   35725             :         }
   35726             :       }
   35727             :       else {
   35728           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35729           0 :         SWIG_fail;
   35730             :       }
   35731             :     }
   35732             :   }
   35733           7 :   {
   35734           7 :     const int bLocalUseExceptions = GetUseExceptions();
   35735           7 :     if ( bLocalUseExceptions ) {
   35736           7 :       pushErrorHandler();
   35737             :     }
   35738           7 :     {
   35739           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35740           7 :       GDALMDArrayHS_GetMeshGrid(arg1,arg2,arg3,arg4,arg5);
   35741           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35742             :     }
   35743           7 :     if ( bLocalUseExceptions ) {
   35744           7 :       popErrorHandler();
   35745             :     }
   35746             : #ifndef SED_HACKS
   35747             :     if ( bLocalUseExceptions ) {
   35748             :       CPLErr eclass = CPLGetLastErrorType();
   35749             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35750             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35751             :       }
   35752             :     }
   35753             : #endif
   35754             :   }
   35755           7 :   resultobj = SWIG_Py_Void();
   35756           7 :   {
   35757             :     /* %typemap(argout) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   35758           7 :     Py_DECREF(resultobj);
   35759           7 :     resultobj = PyList_New( *arg4 );
   35760           7 :     if( !resultobj ) {
   35761           0 :       SWIG_fail;
   35762             :     }
   35763          17 :     for( size_t i = 0; i < *arg4; i++ ) {
   35764          10 :       PyList_SetItem(resultobj, i,
   35765          10 :         SWIG_NewPointerObj((void*)(*arg3)[i],SWIGTYPE_p_GDALMDArrayHS,SWIG_POINTER_OWN) );
   35766             :       /* We have borrowed the GDALMDArrayHS */
   35767          10 :       (*arg3)[i] = NULL;
   35768             :     }
   35769             :   }
   35770           7 :   {
   35771             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   35772           7 :     CPLFree( arg2 );
   35773             :   }
   35774           7 :   {
   35775             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   35776           7 :     GDALReleaseArrays(*arg3, *arg4);
   35777             :   }
   35778           7 :   {
   35779             :     /* %typemap(freearg) char **dict */
   35780           7 :     CSLDestroy( arg5 );
   35781             :   }
   35782          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   35783             :   return resultobj;
   35784           0 : fail:
   35785           0 :   {
   35786             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   35787           0 :     CPLFree( arg2 );
   35788             :   }
   35789           0 :   {
   35790             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   35791           0 :     GDALReleaseArrays(*arg3, *arg4);
   35792             :   }
   35793           0 :   {
   35794             :     /* %typemap(freearg) char **dict */
   35795           0 :     CSLDestroy( arg5 );
   35796             :   }
   35797             :   return NULL;
   35798             : }
   35799             : 
   35800             : 
   35801           7 : SWIGINTERN PyObject *_wrap_MDArray_Cache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35802           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35803           7 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35804           7 :   char **arg2 = (char **) NULL ;
   35805           7 :   void *argp1 = 0 ;
   35806           7 :   int res1 = 0 ;
   35807           7 :   PyObject *swig_obj[2] ;
   35808           7 :   bool result;
   35809             :   
   35810           7 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Cache", 1, 2, swig_obj)) SWIG_fail;
   35811           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35812           7 :   if (!SWIG_IsOK(res1)) {
   35813           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Cache" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35814             :   }
   35815           7 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35816           7 :   if (swig_obj[1]) {
   35817           1 :     {
   35818             :       /* %typemap(in) char **dict */
   35819           1 :       arg2 = NULL;
   35820           1 :       if ( PySequence_Check( swig_obj[1] ) ) {
   35821           1 :         int bErr = FALSE;
   35822           1 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   35823           1 :         if ( bErr )
   35824             :         {
   35825           0 :           SWIG_fail;
   35826             :         }
   35827             :       }
   35828           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   35829           0 :         int bErr = FALSE;
   35830           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   35831           0 :         if ( bErr )
   35832             :         {
   35833           0 :           SWIG_fail;
   35834             :         }
   35835             :       }
   35836             :       else {
   35837           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35838           0 :         SWIG_fail;
   35839             :       }
   35840             :     }
   35841             :   }
   35842           7 :   {
   35843           7 :     const int bLocalUseExceptions = GetUseExceptions();
   35844           7 :     if ( bLocalUseExceptions ) {
   35845           1 :       pushErrorHandler();
   35846             :     }
   35847           7 :     {
   35848           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35849           7 :       result = (bool)GDALMDArrayHS_Cache(arg1,arg2);
   35850           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35851             :     }
   35852           7 :     if ( bLocalUseExceptions ) {
   35853           1 :       popErrorHandler();
   35854             :     }
   35855             : #ifndef SED_HACKS
   35856             :     if ( bLocalUseExceptions ) {
   35857             :       CPLErr eclass = CPLGetLastErrorType();
   35858             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35859             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35860             :       }
   35861             :     }
   35862             : #endif
   35863             :   }
   35864           7 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   35865           7 :   {
   35866             :     /* %typemap(freearg) char **dict */
   35867           7 :     CSLDestroy( arg2 );
   35868             :   }
   35869           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   35870             :   return resultobj;
   35871           0 : fail:
   35872           0 :   {
   35873             :     /* %typemap(freearg) char **dict */
   35874           0 :     CSLDestroy( arg2 );
   35875             :   }
   35876             :   return NULL;
   35877             : }
   35878             : 
   35879             : 
   35880          28 : SWIGINTERN PyObject *_wrap_MDArray_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35881          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35882          28 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35883          28 :   char *arg2 = (char *) 0 ;
   35884          28 :   void *argp1 = 0 ;
   35885          28 :   int res1 = 0 ;
   35886          28 :   int res2 ;
   35887          28 :   char *buf2 = 0 ;
   35888          28 :   int alloc2 = 0 ;
   35889          28 :   PyObject *swig_obj[2] ;
   35890          28 :   CPLErr result;
   35891             :   
   35892          28 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Rename", 2, 2, swig_obj)) SWIG_fail;
   35893          28 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35894          28 :   if (!SWIG_IsOK(res1)) {
   35895           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Rename" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35896             :   }
   35897          28 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35898          28 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   35899          28 :   if (!SWIG_IsOK(res2)) {
   35900           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_Rename" "', argument " "2"" of type '" "char const *""'");
   35901             :   }
   35902          28 :   arg2 = reinterpret_cast< char * >(buf2);
   35903          28 :   {
   35904          28 :     const int bLocalUseExceptions = GetUseExceptions();
   35905          28 :     if ( bLocalUseExceptions ) {
   35906          28 :       pushErrorHandler();
   35907             :     }
   35908          28 :     {
   35909          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35910          28 :       result = (CPLErr)GDALMDArrayHS_Rename(arg1,(char const *)arg2);
   35911          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35912             :     }
   35913          28 :     if ( bLocalUseExceptions ) {
   35914          28 :       popErrorHandler();
   35915             :     }
   35916             : #ifndef SED_HACKS
   35917             :     if ( bLocalUseExceptions ) {
   35918             :       CPLErr eclass = CPLGetLastErrorType();
   35919             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35920             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35921             :       }
   35922             :     }
   35923             : #endif
   35924             :   }
   35925          28 :   resultobj = SWIG_From_int(static_cast< int >(result));
   35926          28 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35927          68 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   35928             :   return resultobj;
   35929           0 : fail:
   35930           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35931             :   return NULL;
   35932             : }
   35933             : 
   35934             : 
   35935         276 : SWIGINTERN PyObject *MDArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35936         276 :   PyObject *obj;
   35937         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   35938         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMDArrayHS, SWIG_NewClientData(obj));
   35939         276 :   return SWIG_Py_Void();
   35940             : }
   35941             : 
   35942         720 : SWIGINTERN PyObject *_wrap_delete_Attribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35943         720 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35944         720 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   35945         720 :   void *argp1 = 0 ;
   35946         720 :   int res1 = 0 ;
   35947         720 :   PyObject *swig_obj[1] ;
   35948             :   
   35949         720 :   if (!args) SWIG_fail;
   35950         720 :   swig_obj[0] = args;
   35951         720 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_DISOWN |  0 );
   35952         720 :   if (!SWIG_IsOK(res1)) {
   35953           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Attribute" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   35954             :   }
   35955         720 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   35956         720 :   {
   35957         720 :     const int bLocalUseExceptions = GetUseExceptions();
   35958         720 :     if ( bLocalUseExceptions ) {
   35959         355 :       pushErrorHandler();
   35960             :     }
   35961         720 :     {
   35962         720 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35963         720 :       delete_GDALAttributeHS(arg1);
   35964         720 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35965             :     }
   35966         720 :     if ( bLocalUseExceptions ) {
   35967         355 :       popErrorHandler();
   35968             :     }
   35969             : #ifndef SED_HACKS
   35970             :     if ( bLocalUseExceptions ) {
   35971             :       CPLErr eclass = CPLGetLastErrorType();
   35972             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35973             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35974             :       }
   35975             :     }
   35976             : #endif
   35977             :   }
   35978         720 :   resultobj = SWIG_Py_Void();
   35979         720 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   35980             :   return resultobj;
   35981             : fail:
   35982             :   return NULL;
   35983             : }
   35984             : 
   35985             : 
   35986         361 : SWIGINTERN PyObject *_wrap_Attribute_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35987         361 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35988         361 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   35989         361 :   void *argp1 = 0 ;
   35990         361 :   int res1 = 0 ;
   35991         361 :   PyObject *swig_obj[1] ;
   35992         361 :   char *result = 0 ;
   35993             :   
   35994         361 :   if (!args) SWIG_fail;
   35995         361 :   swig_obj[0] = args;
   35996         361 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   35997         361 :   if (!SWIG_IsOK(res1)) {
   35998           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetName" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   35999             :   }
   36000         361 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36001         361 :   {
   36002         361 :     const int bLocalUseExceptions = GetUseExceptions();
   36003         361 :     if ( bLocalUseExceptions ) {
   36004         149 :       pushErrorHandler();
   36005             :     }
   36006         361 :     {
   36007         361 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36008         361 :       result = (char *)GDALAttributeHS_GetName(arg1);
   36009         361 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36010             :     }
   36011         361 :     if ( bLocalUseExceptions ) {
   36012         149 :       popErrorHandler();
   36013             :     }
   36014             : #ifndef SED_HACKS
   36015             :     if ( bLocalUseExceptions ) {
   36016             :       CPLErr eclass = CPLGetLastErrorType();
   36017             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36018             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36019             :       }
   36020             :     }
   36021             : #endif
   36022             :   }
   36023         361 :   resultobj = SWIG_FromCharPtr((const char *)result);
   36024         361 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36025             :   return resultobj;
   36026             : fail:
   36027             :   return NULL;
   36028             : }
   36029             : 
   36030             : 
   36031          49 : SWIGINTERN PyObject *_wrap_Attribute_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36032          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36033          49 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36034          49 :   void *argp1 = 0 ;
   36035          49 :   int res1 = 0 ;
   36036          49 :   PyObject *swig_obj[1] ;
   36037          49 :   char *result = 0 ;
   36038             :   
   36039          49 :   if (!args) SWIG_fail;
   36040          49 :   swig_obj[0] = args;
   36041          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36042          49 :   if (!SWIG_IsOK(res1)) {
   36043           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetFullName" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36044             :   }
   36045          49 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36046          49 :   {
   36047          49 :     const int bLocalUseExceptions = GetUseExceptions();
   36048          49 :     if ( bLocalUseExceptions ) {
   36049          41 :       pushErrorHandler();
   36050             :     }
   36051          49 :     {
   36052          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36053          49 :       result = (char *)GDALAttributeHS_GetFullName(arg1);
   36054          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36055             :     }
   36056          49 :     if ( bLocalUseExceptions ) {
   36057          41 :       popErrorHandler();
   36058             :     }
   36059             : #ifndef SED_HACKS
   36060             :     if ( bLocalUseExceptions ) {
   36061             :       CPLErr eclass = CPLGetLastErrorType();
   36062             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36063             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36064             :       }
   36065             :     }
   36066             : #endif
   36067             :   }
   36068          49 :   resultobj = SWIG_FromCharPtr((const char *)result);
   36069          49 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36070             :   return resultobj;
   36071             : fail:
   36072             :   return NULL;
   36073             : }
   36074             : 
   36075             : 
   36076         176 : SWIGINTERN PyObject *_wrap_Attribute_GetTotalElementsCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36077         176 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36078         176 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36079         176 :   void *argp1 = 0 ;
   36080         176 :   int res1 = 0 ;
   36081         176 :   PyObject *swig_obj[1] ;
   36082         176 :   GUIntBig result;
   36083             :   
   36084         176 :   if (!args) SWIG_fail;
   36085         176 :   swig_obj[0] = args;
   36086         176 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36087         176 :   if (!SWIG_IsOK(res1)) {
   36088           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetTotalElementsCount" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36089             :   }
   36090         176 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36091         176 :   {
   36092         176 :     const int bLocalUseExceptions = GetUseExceptions();
   36093         176 :     if ( bLocalUseExceptions ) {
   36094          52 :       pushErrorHandler();
   36095             :     }
   36096         176 :     {
   36097         176 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36098         176 :       result = GDALAttributeHS_GetTotalElementsCount(arg1);
   36099         176 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36100             :     }
   36101         176 :     if ( bLocalUseExceptions ) {
   36102          52 :       popErrorHandler();
   36103             :     }
   36104             : #ifndef SED_HACKS
   36105             :     if ( bLocalUseExceptions ) {
   36106             :       CPLErr eclass = CPLGetLastErrorType();
   36107             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36108             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36109             :       }
   36110             :     }
   36111             : #endif
   36112             :   }
   36113         176 :   {
   36114         176 :     resultobj = PyLong_FromUnsignedLongLong(result);
   36115             :   }
   36116         176 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36117             :   return resultobj;
   36118             : fail:
   36119             :   return NULL;
   36120             : }
   36121             : 
   36122             : 
   36123          12 : SWIGINTERN PyObject *_wrap_Attribute_GetDimensionCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36124          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36125          12 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36126          12 :   void *argp1 = 0 ;
   36127          12 :   int res1 = 0 ;
   36128          12 :   PyObject *swig_obj[1] ;
   36129          12 :   size_t result;
   36130             :   
   36131          12 :   if (!args) SWIG_fail;
   36132          12 :   swig_obj[0] = args;
   36133          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36134          12 :   if (!SWIG_IsOK(res1)) {
   36135           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDimensionCount" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36136             :   }
   36137          12 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36138          12 :   {
   36139          12 :     const int bLocalUseExceptions = GetUseExceptions();
   36140          12 :     if ( bLocalUseExceptions ) {
   36141           6 :       pushErrorHandler();
   36142             :     }
   36143          12 :     {
   36144          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36145          12 :       result = GDALAttributeHS_GetDimensionCount(arg1);
   36146          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36147             :     }
   36148          12 :     if ( bLocalUseExceptions ) {
   36149           6 :       popErrorHandler();
   36150             :     }
   36151             : #ifndef SED_HACKS
   36152             :     if ( bLocalUseExceptions ) {
   36153             :       CPLErr eclass = CPLGetLastErrorType();
   36154             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36155             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36156             :       }
   36157             :     }
   36158             : #endif
   36159             :   }
   36160          12 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   36161          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36162             :   return resultobj;
   36163             : fail:
   36164             :   return NULL;
   36165             : }
   36166             : 
   36167             : 
   36168          11 : SWIGINTERN PyObject *_wrap_Attribute_GetDimensionsSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36169          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36170          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36171          11 :   GUIntBig **arg2 = (GUIntBig **) 0 ;
   36172          11 :   size_t *arg3 = (size_t *) 0 ;
   36173          11 :   void *argp1 = 0 ;
   36174          11 :   int res1 = 0 ;
   36175          11 :   GUIntBig *vals2 = 0 ;
   36176          11 :   size_t nCount2 = 0 ;
   36177          11 :   PyObject *swig_obj[1] ;
   36178             :   
   36179          11 :   {
   36180             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   36181          11 :     arg2 = &vals2;
   36182          11 :     arg3 = &nCount2;
   36183             :   }
   36184          11 :   if (!args) SWIG_fail;
   36185          11 :   swig_obj[0] = args;
   36186          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36187          11 :   if (!SWIG_IsOK(res1)) {
   36188           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDimensionsSize" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36189             :   }
   36190          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36191          11 :   {
   36192          11 :     const int bLocalUseExceptions = GetUseExceptions();
   36193          11 :     if ( bLocalUseExceptions ) {
   36194           5 :       pushErrorHandler();
   36195             :     }
   36196          11 :     {
   36197          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36198          11 :       GDALAttributeHS_GetDimensionsSize(arg1,arg2,arg3);
   36199          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36200             :     }
   36201          11 :     if ( bLocalUseExceptions ) {
   36202           5 :       popErrorHandler();
   36203             :     }
   36204             : #ifndef SED_HACKS
   36205             :     if ( bLocalUseExceptions ) {
   36206             :       CPLErr eclass = CPLGetLastErrorType();
   36207             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36208             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36209             :       }
   36210             :     }
   36211             : #endif
   36212             :   }
   36213          11 :   resultobj = SWIG_Py_Void();
   36214          11 :   {
   36215             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   36216          11 :     Py_DECREF(resultobj);
   36217          11 :     resultobj = PyList_New( *arg3 );
   36218          11 :     if( !resultobj ) {
   36219           0 :       SWIG_fail;
   36220             :     }
   36221          22 :     for( size_t i = 0; i < *arg3; i++ ) {
   36222          11 :       char szTmp[32];
   36223          11 :       snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg2)[i]);
   36224          11 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   36225          11 :       PyList_SetItem(resultobj, i, o );
   36226             :     }
   36227             :   }
   36228          11 :   {
   36229             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   36230          11 :     CPLFree(*arg2);
   36231             :   }
   36232          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36233             :   return resultobj;
   36234           0 : fail:
   36235           0 :   {
   36236             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   36237           0 :     CPLFree(*arg2);
   36238             :   }
   36239             :   return NULL;
   36240             : }
   36241             : 
   36242             : 
   36243         412 : SWIGINTERN PyObject *_wrap_Attribute_GetDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36244         412 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36245         412 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36246         412 :   void *argp1 = 0 ;
   36247         412 :   int res1 = 0 ;
   36248         412 :   PyObject *swig_obj[1] ;
   36249         412 :   GDALExtendedDataTypeHS *result = 0 ;
   36250             :   
   36251         412 :   if (!args) SWIG_fail;
   36252         412 :   swig_obj[0] = args;
   36253         412 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36254         412 :   if (!SWIG_IsOK(res1)) {
   36255           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDataType" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36256             :   }
   36257         412 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36258         412 :   {
   36259         412 :     const int bLocalUseExceptions = GetUseExceptions();
   36260         412 :     if ( bLocalUseExceptions ) {
   36261         197 :       pushErrorHandler();
   36262             :     }
   36263         412 :     {
   36264         412 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36265         412 :       result = (GDALExtendedDataTypeHS *)GDALAttributeHS_GetDataType(arg1);
   36266         412 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36267             :     }
   36268         412 :     if ( bLocalUseExceptions ) {
   36269         197 :       popErrorHandler();
   36270             :     }
   36271             : #ifndef SED_HACKS
   36272             :     if ( bLocalUseExceptions ) {
   36273             :       CPLErr eclass = CPLGetLastErrorType();
   36274             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36275             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36276             :       }
   36277             :     }
   36278             : #endif
   36279             :   }
   36280         412 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   36281         412 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36282             :   return resultobj;
   36283             : fail:
   36284             :   return NULL;
   36285             : }
   36286             : 
   36287             : 
   36288          10 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36289          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36290          10 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36291          10 :   void **arg2 = (void **) 0 ;
   36292          10 :   void *argp1 = 0 ;
   36293          10 :   int res1 = 0 ;
   36294          10 :   void *pyObject2 = NULL ;
   36295          10 :   PyObject *swig_obj[1] ;
   36296          10 :   CPLErr result;
   36297             :   
   36298          10 :   {
   36299             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   36300          10 :     arg2 = &pyObject2;
   36301             :   }
   36302          10 :   if (!args) SWIG_fail;
   36303          10 :   swig_obj[0] = args;
   36304          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36305          10 :   if (!SWIG_IsOK(res1)) {
   36306           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsRaw" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36307             :   }
   36308          10 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36309          10 :   {
   36310          10 :     const int bLocalUseExceptions = GetUseExceptions();
   36311          10 :     if ( bLocalUseExceptions ) {
   36312           4 :       pushErrorHandler();
   36313             :     }
   36314          10 :     {
   36315          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36316          10 :       result = (CPLErr)GDALAttributeHS_ReadAsRaw(arg1,arg2);
   36317          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36318             :     }
   36319          10 :     if ( bLocalUseExceptions ) {
   36320           4 :       popErrorHandler();
   36321             :     }
   36322             : #ifndef SED_HACKS
   36323             :     if ( bLocalUseExceptions ) {
   36324             :       CPLErr eclass = CPLGetLastErrorType();
   36325             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36326             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36327             :       }
   36328             :     }
   36329             : #endif
   36330             :   }
   36331          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36332          10 :   {
   36333             :     /* %typemap(argout) ( void **outPythonObject ) */
   36334          10 :     Py_XDECREF(resultobj);
   36335          10 :     if (*arg2)
   36336             :     {
   36337             :       resultobj = (PyObject*)*arg2;
   36338             :     }
   36339             :     else
   36340             :     {
   36341           4 :       resultobj = Py_None;
   36342           4 :       Py_INCREF(resultobj);
   36343             :     }
   36344             :   }
   36345          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36346             :   return resultobj;
   36347             : fail:
   36348             :   return NULL;
   36349             : }
   36350             : 
   36351             : 
   36352         107 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36353         107 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36354         107 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36355         107 :   void *argp1 = 0 ;
   36356         107 :   int res1 = 0 ;
   36357         107 :   PyObject *swig_obj[1] ;
   36358         107 :   char *result = 0 ;
   36359             :   
   36360         107 :   if (!args) SWIG_fail;
   36361         107 :   swig_obj[0] = args;
   36362         107 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36363         107 :   if (!SWIG_IsOK(res1)) {
   36364           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsString" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36365             :   }
   36366         107 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36367         107 :   {
   36368         107 :     const int bLocalUseExceptions = GetUseExceptions();
   36369         107 :     if ( bLocalUseExceptions ) {
   36370          31 :       pushErrorHandler();
   36371             :     }
   36372         107 :     {
   36373         107 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36374         107 :       result = (char *)GDALAttributeHS_ReadAsString(arg1);
   36375         107 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36376             :     }
   36377         107 :     if ( bLocalUseExceptions ) {
   36378          31 :       popErrorHandler();
   36379             :     }
   36380             : #ifndef SED_HACKS
   36381             :     if ( bLocalUseExceptions ) {
   36382             :       CPLErr eclass = CPLGetLastErrorType();
   36383             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36384             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36385             :       }
   36386             :     }
   36387             : #endif
   36388             :   }
   36389         107 :   resultobj = SWIG_FromCharPtr((const char *)result);
   36390         107 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36391             :   return resultobj;
   36392             : fail:
   36393             :   return NULL;
   36394             : }
   36395             : 
   36396             : 
   36397          22 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36398          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36399          22 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36400          22 :   void *argp1 = 0 ;
   36401          22 :   int res1 = 0 ;
   36402          22 :   PyObject *swig_obj[1] ;
   36403          22 :   int result;
   36404             :   
   36405          22 :   if (!args) SWIG_fail;
   36406          22 :   swig_obj[0] = args;
   36407          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36408          22 :   if (!SWIG_IsOK(res1)) {
   36409           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36410             :   }
   36411          22 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36412          22 :   {
   36413          22 :     const int bLocalUseExceptions = GetUseExceptions();
   36414          22 :     if ( bLocalUseExceptions ) {
   36415           9 :       pushErrorHandler();
   36416             :     }
   36417          22 :     {
   36418          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36419          22 :       result = (int)GDALAttributeHS_ReadAsInt(arg1);
   36420          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36421             :     }
   36422          22 :     if ( bLocalUseExceptions ) {
   36423           9 :       popErrorHandler();
   36424             :     }
   36425             : #ifndef SED_HACKS
   36426             :     if ( bLocalUseExceptions ) {
   36427             :       CPLErr eclass = CPLGetLastErrorType();
   36428             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36429             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36430             :       }
   36431             :     }
   36432             : #endif
   36433             :   }
   36434          22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36435          24 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36436             :   return resultobj;
   36437             : fail:
   36438             :   return NULL;
   36439             : }
   36440             : 
   36441             : 
   36442          15 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36443          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36444          15 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36445          15 :   void *argp1 = 0 ;
   36446          15 :   int res1 = 0 ;
   36447          15 :   PyObject *swig_obj[1] ;
   36448          15 :   long long result;
   36449             :   
   36450          15 :   if (!args) SWIG_fail;
   36451          15 :   swig_obj[0] = args;
   36452          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36453          15 :   if (!SWIG_IsOK(res1)) {
   36454           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt64" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36455             :   }
   36456          15 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36457          15 :   {
   36458          15 :     const int bLocalUseExceptions = GetUseExceptions();
   36459          15 :     if ( bLocalUseExceptions ) {
   36460           1 :       pushErrorHandler();
   36461             :     }
   36462          15 :     {
   36463          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36464          15 :       result = (long long)GDALAttributeHS_ReadAsInt64(arg1);
   36465          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36466             :     }
   36467          15 :     if ( bLocalUseExceptions ) {
   36468           1 :       popErrorHandler();
   36469             :     }
   36470             : #ifndef SED_HACKS
   36471             :     if ( bLocalUseExceptions ) {
   36472             :       CPLErr eclass = CPLGetLastErrorType();
   36473             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36474             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36475             :       }
   36476             :     }
   36477             : #endif
   36478             :   }
   36479          15 :   resultobj = SWIG_From_long_SS_long(static_cast< long long >(result));
   36480          15 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36481             :   return resultobj;
   36482             : fail:
   36483             :   return NULL;
   36484             : }
   36485             : 
   36486             : 
   36487          40 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36488          40 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36489          40 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36490          40 :   void *argp1 = 0 ;
   36491          40 :   int res1 = 0 ;
   36492          40 :   PyObject *swig_obj[1] ;
   36493          40 :   double result;
   36494             :   
   36495          40 :   if (!args) SWIG_fail;
   36496          40 :   swig_obj[0] = args;
   36497          40 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36498          40 :   if (!SWIG_IsOK(res1)) {
   36499           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsDouble" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36500             :   }
   36501          40 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36502          40 :   {
   36503          40 :     const int bLocalUseExceptions = GetUseExceptions();
   36504          40 :     if ( bLocalUseExceptions ) {
   36505           6 :       pushErrorHandler();
   36506             :     }
   36507          40 :     {
   36508          40 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36509          40 :       result = (double)GDALAttributeHS_ReadAsDouble(arg1);
   36510          40 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36511             :     }
   36512          40 :     if ( bLocalUseExceptions ) {
   36513           6 :       popErrorHandler();
   36514             :     }
   36515             : #ifndef SED_HACKS
   36516             :     if ( bLocalUseExceptions ) {
   36517             :       CPLErr eclass = CPLGetLastErrorType();
   36518             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36519             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36520             :       }
   36521             :     }
   36522             : #endif
   36523             :   }
   36524          40 :   resultobj = SWIG_From_double(static_cast< double >(result));
   36525          40 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36526             :   return resultobj;
   36527             : fail:
   36528             :   return NULL;
   36529             : }
   36530             : 
   36531             : 
   36532          19 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36533          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36534          19 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36535          19 :   void *argp1 = 0 ;
   36536          19 :   int res1 = 0 ;
   36537          19 :   PyObject *swig_obj[1] ;
   36538          19 :   char **result = 0 ;
   36539             :   
   36540          19 :   if (!args) SWIG_fail;
   36541          19 :   swig_obj[0] = args;
   36542          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36543          19 :   if (!SWIG_IsOK(res1)) {
   36544           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsStringArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36545             :   }
   36546          19 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36547          19 :   {
   36548          19 :     const int bLocalUseExceptions = GetUseExceptions();
   36549          19 :     if ( bLocalUseExceptions ) {
   36550           4 :       pushErrorHandler();
   36551             :     }
   36552          19 :     {
   36553          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36554          19 :       result = (char **)GDALAttributeHS_ReadAsStringArray(arg1);
   36555          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36556             :     }
   36557          19 :     if ( bLocalUseExceptions ) {
   36558           4 :       popErrorHandler();
   36559             :     }
   36560             : #ifndef SED_HACKS
   36561             :     if ( bLocalUseExceptions ) {
   36562             :       CPLErr eclass = CPLGetLastErrorType();
   36563             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36564             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36565             :       }
   36566             :     }
   36567             : #endif
   36568             :   }
   36569          19 :   {
   36570             :     /* %typemap(out) char **CSL -> ( string ) */
   36571          19 :     bool bErr = false;
   36572          19 :     resultobj = CSLToList(result, &bErr);
   36573          19 :     CSLDestroy(result);
   36574          19 :     if( bErr ) {
   36575           0 :       SWIG_fail;
   36576             :     }
   36577             :   }
   36578          19 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36579             :   return resultobj;
   36580             : fail:
   36581             :   return NULL;
   36582             : }
   36583             : 
   36584             : 
   36585          15 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsIntArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36586          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36587          15 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36588          15 :   int **arg2 = (int **) 0 ;
   36589          15 :   size_t *arg3 = (size_t *) 0 ;
   36590          15 :   void *argp1 = 0 ;
   36591          15 :   int res1 = 0 ;
   36592          15 :   int *vals2 = 0 ;
   36593          15 :   size_t nCount2 = 0 ;
   36594          15 :   PyObject *swig_obj[1] ;
   36595             :   
   36596          15 :   {
   36597             :     /* %typemap(in,numinputs=0) (int** pvals, size_t* pnCount) */
   36598          15 :     arg2 = &vals2;
   36599          15 :     arg3 = &nCount2;
   36600             :   }
   36601          15 :   if (!args) SWIG_fail;
   36602          15 :   swig_obj[0] = args;
   36603          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36604          15 :   if (!SWIG_IsOK(res1)) {
   36605           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsIntArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36606             :   }
   36607          15 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36608          15 :   {
   36609          15 :     const int bLocalUseExceptions = GetUseExceptions();
   36610          15 :     if ( bLocalUseExceptions ) {
   36611           4 :       pushErrorHandler();
   36612             :     }
   36613          15 :     {
   36614          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36615          15 :       GDALAttributeHS_ReadAsIntArray(arg1,arg2,arg3);
   36616          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36617             :     }
   36618          15 :     if ( bLocalUseExceptions ) {
   36619           4 :       popErrorHandler();
   36620             :     }
   36621             : #ifndef SED_HACKS
   36622             :     if ( bLocalUseExceptions ) {
   36623             :       CPLErr eclass = CPLGetLastErrorType();
   36624             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36625             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36626             :       }
   36627             :     }
   36628             : #endif
   36629             :   }
   36630          15 :   resultobj = SWIG_Py_Void();
   36631          15 :   {
   36632             :     /* %typemap(argout) (int** pvals, size_t* pnCount) */
   36633          15 :     PyObject *list = CreateTupleFromIntArray(*arg2, *arg3);
   36634          15 :     Py_DECREF(resultobj);
   36635          15 :     resultobj = list;
   36636             :   }
   36637          15 :   {
   36638             :     /* %typemap(freearg) (int** pvals, size_t* pnCount) */
   36639          15 :     CPLFree(*arg2);
   36640             :   }
   36641          15 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36642             :   return resultobj;
   36643           0 : fail:
   36644           0 :   {
   36645             :     /* %typemap(freearg) (int** pvals, size_t* pnCount) */
   36646           0 :     CPLFree(*arg2);
   36647             :   }
   36648             :   return NULL;
   36649             : }
   36650             : 
   36651             : 
   36652          14 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt64Array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36653          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36654          14 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36655          14 :   long long **arg2 = (long long **) 0 ;
   36656          14 :   size_t *arg3 = (size_t *) 0 ;
   36657          14 :   void *argp1 = 0 ;
   36658          14 :   int res1 = 0 ;
   36659          14 :   long long *vals2 = 0 ;
   36660          14 :   size_t nCount2 = 0 ;
   36661          14 :   PyObject *swig_obj[1] ;
   36662             :   
   36663          14 :   {
   36664             :     /* %typemap(in,numinputs=0) (long long** pvals, size_t* pnCount) */
   36665          14 :     arg2 = &vals2;
   36666          14 :     arg3 = &nCount2;
   36667             :   }
   36668          14 :   if (!args) SWIG_fail;
   36669          14 :   swig_obj[0] = args;
   36670          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36671          14 :   if (!SWIG_IsOK(res1)) {
   36672           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt64Array" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36673             :   }
   36674          14 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36675          14 :   {
   36676          14 :     const int bLocalUseExceptions = GetUseExceptions();
   36677          14 :     if ( bLocalUseExceptions ) {
   36678           1 :       pushErrorHandler();
   36679             :     }
   36680          14 :     {
   36681          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36682          14 :       GDALAttributeHS_ReadAsInt64Array(arg1,arg2,arg3);
   36683          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36684             :     }
   36685          14 :     if ( bLocalUseExceptions ) {
   36686           1 :       popErrorHandler();
   36687             :     }
   36688             : #ifndef SED_HACKS
   36689             :     if ( bLocalUseExceptions ) {
   36690             :       CPLErr eclass = CPLGetLastErrorType();
   36691             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36692             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36693             :       }
   36694             :     }
   36695             : #endif
   36696             :   }
   36697          14 :   resultobj = SWIG_Py_Void();
   36698          14 :   {
   36699             :     /* %typemap(argout) (int** pvals, size_t* pnCount) */
   36700          14 :     PyObject *list = CreateTupleFromInt64Array(*arg2, *arg3);
   36701          14 :     Py_DECREF(resultobj);
   36702          14 :     resultobj = list;
   36703             :   }
   36704          14 :   {
   36705             :     /* %typemap(freearg) (long long** pvals, size_t* pnCount) */
   36706          14 :     CPLFree(*arg2);
   36707             :   }
   36708          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36709             :   return resultobj;
   36710           0 : fail:
   36711           0 :   {
   36712             :     /* %typemap(freearg) (long long** pvals, size_t* pnCount) */
   36713           0 :     CPLFree(*arg2);
   36714             :   }
   36715             :   return NULL;
   36716             : }
   36717             : 
   36718             : 
   36719          29 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsDoubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36720          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36721          29 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36722          29 :   double **arg2 = (double **) 0 ;
   36723          29 :   size_t *arg3 = (size_t *) 0 ;
   36724          29 :   void *argp1 = 0 ;
   36725          29 :   int res1 = 0 ;
   36726          29 :   double *vals2 = 0 ;
   36727          29 :   size_t nCount2 = 0 ;
   36728          29 :   PyObject *swig_obj[1] ;
   36729             :   
   36730          29 :   {
   36731             :     /* %typemap(in,numinputs=0) (double** pvals, size_t* pnCount) */
   36732          29 :     arg2 = &vals2;
   36733          29 :     arg3 = &nCount2;
   36734             :   }
   36735          29 :   if (!args) SWIG_fail;
   36736          29 :   swig_obj[0] = args;
   36737          29 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36738          29 :   if (!SWIG_IsOK(res1)) {
   36739           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsDoubleArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36740             :   }
   36741          29 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36742          29 :   {
   36743          29 :     const int bLocalUseExceptions = GetUseExceptions();
   36744          29 :     if ( bLocalUseExceptions ) {
   36745           3 :       pushErrorHandler();
   36746             :     }
   36747          29 :     {
   36748          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36749          29 :       GDALAttributeHS_ReadAsDoubleArray(arg1,arg2,arg3);
   36750          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36751             :     }
   36752          29 :     if ( bLocalUseExceptions ) {
   36753           3 :       popErrorHandler();
   36754             :     }
   36755             : #ifndef SED_HACKS
   36756             :     if ( bLocalUseExceptions ) {
   36757             :       CPLErr eclass = CPLGetLastErrorType();
   36758             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36759             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36760             :       }
   36761             :     }
   36762             : #endif
   36763             :   }
   36764          29 :   resultobj = SWIG_Py_Void();
   36765          29 :   {
   36766             :     /* %typemap(argout) (double** pvals, size_t* pnCount) */
   36767          29 :     PyObject *list = CreateTupleFromDoubleArray(*arg2, *arg3);
   36768          29 :     Py_DECREF(resultobj);
   36769          29 :     resultobj = list;
   36770             :   }
   36771          29 :   {
   36772             :     /* %typemap(freearg) (double** pvals, size_t* pnCount) */
   36773          29 :     CPLFree(*arg2);
   36774             :   }
   36775          29 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36776             :   return resultobj;
   36777           0 : fail:
   36778           0 :   {
   36779             :     /* %typemap(freearg) (double** pvals, size_t* pnCount) */
   36780           0 :     CPLFree(*arg2);
   36781             :   }
   36782             :   return NULL;
   36783             : }
   36784             : 
   36785             : 
   36786           5 : SWIGINTERN PyObject *_wrap_Attribute_WriteRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36787           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36788           5 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36789           5 :   GIntBig arg2 ;
   36790           5 :   char *arg3 = (char *) 0 ;
   36791           5 :   void *argp1 = 0 ;
   36792           5 :   int res1 = 0 ;
   36793           5 :   int alloc2 = 0 ;
   36794           5 :   bool viewIsValid2 = false ;
   36795           5 :   Py_buffer view2 ;
   36796           5 :   PyObject *swig_obj[2] ;
   36797           5 :   CPLErr result;
   36798             :   
   36799           5 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteRaw", 2, 2, swig_obj)) SWIG_fail;
   36800           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36801           5 :   if (!SWIG_IsOK(res1)) {
   36802           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteRaw" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36803             :   }
   36804           5 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36805           5 :   {
   36806             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   36807           5 :     char* ptr = NULL;
   36808           5 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   36809           0 :       SWIG_fail;
   36810             :     }
   36811           5 :     arg3 = (char *)ptr;
   36812             :   }
   36813           5 :   {
   36814           5 :     const int bLocalUseExceptions = GetUseExceptions();
   36815           5 :     if ( bLocalUseExceptions ) {
   36816           4 :       pushErrorHandler();
   36817             :     }
   36818           5 :     {
   36819           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36820           5 :       result = (CPLErr)GDALAttributeHS_WriteRaw(arg1,arg2,arg3);
   36821           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36822             :     }
   36823           5 :     if ( bLocalUseExceptions ) {
   36824           4 :       popErrorHandler();
   36825             :     }
   36826             : #ifndef SED_HACKS
   36827             :     if ( bLocalUseExceptions ) {
   36828             :       CPLErr eclass = CPLGetLastErrorType();
   36829             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36830             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36831             :       }
   36832             :     }
   36833             : #endif
   36834             :   }
   36835           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36836           5 :   {
   36837             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   36838           5 :     if( viewIsValid2 ) {
   36839           5 :       PyBuffer_Release(&view2);
   36840             :     }
   36841           0 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   36842           0 :       delete[] arg3;
   36843             :     }
   36844             :   }
   36845           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36846             :   return resultobj;
   36847           0 : fail:
   36848           0 :   {
   36849             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   36850           0 :     if( viewIsValid2 ) {
   36851           0 :       PyBuffer_Release(&view2);
   36852             :     }
   36853           5 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   36854             :       delete[] arg3;
   36855             :     }
   36856             :   }
   36857             :   return NULL;
   36858             : }
   36859             : 
   36860             : 
   36861         175 : SWIGINTERN PyObject *_wrap_Attribute_WriteString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36862         175 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36863         175 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36864         175 :   char *arg2 = (char *) 0 ;
   36865         175 :   void *argp1 = 0 ;
   36866         175 :   int res1 = 0 ;
   36867         175 :   int res2 ;
   36868         175 :   char *buf2 = 0 ;
   36869         175 :   int alloc2 = 0 ;
   36870         175 :   PyObject *swig_obj[2] ;
   36871         175 :   CPLErr result;
   36872             :   
   36873         175 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteString", 2, 2, swig_obj)) SWIG_fail;
   36874         175 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36875         175 :   if (!SWIG_IsOK(res1)) {
   36876           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteString" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36877             :   }
   36878         175 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36879         175 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   36880         175 :   if (!SWIG_IsOK(res2)) {
   36881           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_WriteString" "', argument " "2"" of type '" "char const *""'");
   36882             :   }
   36883         175 :   arg2 = reinterpret_cast< char * >(buf2);
   36884         175 :   {
   36885         175 :     const int bLocalUseExceptions = GetUseExceptions();
   36886         175 :     if ( bLocalUseExceptions ) {
   36887         132 :       pushErrorHandler();
   36888             :     }
   36889         175 :     {
   36890         175 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36891         175 :       result = (CPLErr)GDALAttributeHS_WriteString(arg1,(char const *)arg2);
   36892         175 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36893             :     }
   36894         175 :     if ( bLocalUseExceptions ) {
   36895         132 :       popErrorHandler();
   36896             :     }
   36897             : #ifndef SED_HACKS
   36898             :     if ( bLocalUseExceptions ) {
   36899             :       CPLErr eclass = CPLGetLastErrorType();
   36900             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36901             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36902             :       }
   36903             :     }
   36904             : #endif
   36905             :   }
   36906         175 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36907         175 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   36908         201 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36909             :   return resultobj;
   36910           0 : fail:
   36911           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   36912             :   return NULL;
   36913             : }
   36914             : 
   36915             : 
   36916           8 : SWIGINTERN PyObject *_wrap_Attribute_WriteStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36917           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36918           8 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36919           8 :   char **arg2 = (char **) 0 ;
   36920           8 :   void *argp1 = 0 ;
   36921           8 :   int res1 = 0 ;
   36922           8 :   PyObject *swig_obj[2] ;
   36923           8 :   CPLErr result;
   36924             :   
   36925           8 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteStringArray", 2, 2, swig_obj)) SWIG_fail;
   36926           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36927           8 :   if (!SWIG_IsOK(res1)) {
   36928           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteStringArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36929             :   }
   36930           8 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36931           8 :   {
   36932             :     /* %typemap(in) char **dict */
   36933           8 :     arg2 = NULL;
   36934           8 :     if ( PySequence_Check( swig_obj[1] ) ) {
   36935           8 :       int bErr = FALSE;
   36936           8 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   36937           8 :       if ( bErr )
   36938             :       {
   36939           0 :         SWIG_fail;
   36940             :       }
   36941             :     }
   36942           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   36943           0 :       int bErr = FALSE;
   36944           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   36945           0 :       if ( bErr )
   36946             :       {
   36947           0 :         SWIG_fail;
   36948             :       }
   36949             :     }
   36950             :     else {
   36951           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   36952           0 :       SWIG_fail;
   36953             :     }
   36954             :   }
   36955           8 :   {
   36956           8 :     const int bLocalUseExceptions = GetUseExceptions();
   36957           8 :     if ( bLocalUseExceptions ) {
   36958           0 :       pushErrorHandler();
   36959             :     }
   36960           8 :     {
   36961           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36962           8 :       result = (CPLErr)GDALAttributeHS_WriteStringArray(arg1,arg2);
   36963           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36964             :     }
   36965           8 :     if ( bLocalUseExceptions ) {
   36966           0 :       popErrorHandler();
   36967             :     }
   36968             : #ifndef SED_HACKS
   36969             :     if ( bLocalUseExceptions ) {
   36970             :       CPLErr eclass = CPLGetLastErrorType();
   36971             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36972             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36973             :       }
   36974             :     }
   36975             : #endif
   36976             :   }
   36977           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36978           8 :   {
   36979             :     /* %typemap(freearg) char **dict */
   36980           8 :     CSLDestroy( arg2 );
   36981             :   }
   36982           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36983             :   return resultobj;
   36984           0 : fail:
   36985           0 :   {
   36986             :     /* %typemap(freearg) char **dict */
   36987           0 :     CSLDestroy( arg2 );
   36988             :   }
   36989             :   return NULL;
   36990             : }
   36991             : 
   36992             : 
   36993          22 : SWIGINTERN PyObject *_wrap_Attribute_WriteInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36994          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36995          22 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36996          22 :   int arg2 ;
   36997          22 :   void *argp1 = 0 ;
   36998          22 :   int res1 = 0 ;
   36999          22 :   int val2 ;
   37000          22 :   int ecode2 = 0 ;
   37001          22 :   PyObject *swig_obj[2] ;
   37002          22 :   CPLErr result;
   37003             :   
   37004          22 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt", 2, 2, swig_obj)) SWIG_fail;
   37005          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37006          22 :   if (!SWIG_IsOK(res1)) {
   37007           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37008             :   }
   37009          22 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37010          22 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   37011          22 :   if (!SWIG_IsOK(ecode2)) {
   37012           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteInt" "', argument " "2"" of type '" "int""'");
   37013             :   } 
   37014          22 :   arg2 = static_cast< int >(val2);
   37015          22 :   {
   37016          22 :     const int bLocalUseExceptions = GetUseExceptions();
   37017          22 :     if ( bLocalUseExceptions ) {
   37018           4 :       pushErrorHandler();
   37019             :     }
   37020          22 :     {
   37021          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37022          22 :       result = (CPLErr)GDALAttributeHS_WriteInt(arg1,arg2);
   37023          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37024             :     }
   37025          22 :     if ( bLocalUseExceptions ) {
   37026           4 :       popErrorHandler();
   37027             :     }
   37028             : #ifndef SED_HACKS
   37029             :     if ( bLocalUseExceptions ) {
   37030             :       CPLErr eclass = CPLGetLastErrorType();
   37031             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37032             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37033             :       }
   37034             :     }
   37035             : #endif
   37036             :   }
   37037          22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37038          24 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37039             :   return resultobj;
   37040             : fail:
   37041             :   return NULL;
   37042             : }
   37043             : 
   37044             : 
   37045          11 : SWIGINTERN PyObject *_wrap_Attribute_WriteInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37046          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37047          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37048          11 :   long long arg2 ;
   37049          11 :   void *argp1 = 0 ;
   37050          11 :   int res1 = 0 ;
   37051          11 :   long long val2 ;
   37052          11 :   int ecode2 = 0 ;
   37053          11 :   PyObject *swig_obj[2] ;
   37054          11 :   CPLErr result;
   37055             :   
   37056          11 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt64", 2, 2, swig_obj)) SWIG_fail;
   37057          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37058          11 :   if (!SWIG_IsOK(res1)) {
   37059           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt64" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37060             :   }
   37061          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37062          11 :   ecode2 = SWIG_AsVal_long_SS_long(swig_obj[1], &val2);
   37063          11 :   if (!SWIG_IsOK(ecode2)) {
   37064           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteInt64" "', argument " "2"" of type '" "long long""'");
   37065             :   } 
   37066          11 :   arg2 = static_cast< long long >(val2);
   37067          11 :   {
   37068          11 :     const int bLocalUseExceptions = GetUseExceptions();
   37069          11 :     if ( bLocalUseExceptions ) {
   37070           0 :       pushErrorHandler();
   37071             :     }
   37072          11 :     {
   37073          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37074          11 :       result = (CPLErr)GDALAttributeHS_WriteInt64(arg1,arg2);
   37075          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37076             :     }
   37077          11 :     if ( bLocalUseExceptions ) {
   37078           0 :       popErrorHandler();
   37079             :     }
   37080             : #ifndef SED_HACKS
   37081             :     if ( bLocalUseExceptions ) {
   37082             :       CPLErr eclass = CPLGetLastErrorType();
   37083             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37084             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37085             :       }
   37086             :     }
   37087             : #endif
   37088             :   }
   37089          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37090          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37091             :   return resultobj;
   37092             : fail:
   37093             :   return NULL;
   37094             : }
   37095             : 
   37096             : 
   37097          11 : SWIGINTERN PyObject *_wrap_Attribute_WriteDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37098          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37099          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37100          11 :   double arg2 ;
   37101          11 :   void *argp1 = 0 ;
   37102          11 :   int res1 = 0 ;
   37103          11 :   double val2 ;
   37104          11 :   int ecode2 = 0 ;
   37105          11 :   PyObject *swig_obj[2] ;
   37106          11 :   CPLErr result;
   37107             :   
   37108          11 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteDouble", 2, 2, swig_obj)) SWIG_fail;
   37109          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37110          11 :   if (!SWIG_IsOK(res1)) {
   37111           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteDouble" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37112             :   }
   37113          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37114          11 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   37115          11 :   if (!SWIG_IsOK(ecode2)) {
   37116           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteDouble" "', argument " "2"" of type '" "double""'");
   37117             :   } 
   37118          11 :   arg2 = static_cast< double >(val2);
   37119          11 :   {
   37120          11 :     const int bLocalUseExceptions = GetUseExceptions();
   37121          11 :     if ( bLocalUseExceptions ) {
   37122           1 :       pushErrorHandler();
   37123             :     }
   37124          11 :     {
   37125          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37126          11 :       result = (CPLErr)GDALAttributeHS_WriteDouble(arg1,arg2);
   37127          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37128             :     }
   37129          11 :     if ( bLocalUseExceptions ) {
   37130           1 :       popErrorHandler();
   37131             :     }
   37132             : #ifndef SED_HACKS
   37133             :     if ( bLocalUseExceptions ) {
   37134             :       CPLErr eclass = CPLGetLastErrorType();
   37135             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37136             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37137             :       }
   37138             :     }
   37139             : #endif
   37140             :   }
   37141          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37142          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37143             :   return resultobj;
   37144             : fail:
   37145             :   return NULL;
   37146             : }
   37147             : 
   37148             : 
   37149           9 : SWIGINTERN PyObject *_wrap_Attribute_WriteIntArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37150           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37151           9 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37152           9 :   int arg2 ;
   37153           9 :   int *arg3 = (int *) 0 ;
   37154           9 :   void *argp1 = 0 ;
   37155           9 :   int res1 = 0 ;
   37156           9 :   PyObject *swig_obj[2] ;
   37157           9 :   CPLErr result;
   37158             :   
   37159           9 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteIntArray", 2, 2, swig_obj)) SWIG_fail;
   37160           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37161           9 :   if (!SWIG_IsOK(res1)) {
   37162           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteIntArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37163             :   }
   37164           9 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37165           9 :   {
   37166             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   37167           9 :     arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
   37168           9 :     if( arg2 < 0 ) {
   37169           0 :       SWIG_fail;
   37170             :     }
   37171             :   }
   37172           9 :   {
   37173           9 :     const int bLocalUseExceptions = GetUseExceptions();
   37174           9 :     if ( bLocalUseExceptions ) {
   37175           1 :       pushErrorHandler();
   37176             :     }
   37177           9 :     {
   37178           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37179           9 :       result = (CPLErr)GDALAttributeHS_WriteIntArray(arg1,arg2,arg3);
   37180           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37181             :     }
   37182           9 :     if ( bLocalUseExceptions ) {
   37183           1 :       popErrorHandler();
   37184             :     }
   37185             : #ifndef SED_HACKS
   37186             :     if ( bLocalUseExceptions ) {
   37187             :       CPLErr eclass = CPLGetLastErrorType();
   37188             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37189             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37190             :       }
   37191             :     }
   37192             : #endif
   37193             :   }
   37194           9 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37195           9 :   {
   37196             :     /* %typemap(freearg) (int nList, int* pList) */
   37197           9 :     free(arg3);
   37198             :   }
   37199           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37200             :   return resultobj;
   37201           0 : fail:
   37202           0 :   {
   37203             :     /* %typemap(freearg) (int nList, int* pList) */
   37204           0 :     free(arg3);
   37205             :   }
   37206           0 :   return NULL;
   37207             : }
   37208             : 
   37209             : 
   37210          10 : SWIGINTERN PyObject *_wrap_Attribute_WriteInt64Array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37211          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37212          10 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37213          10 :   int arg2 ;
   37214          10 :   long long *arg3 = (long long *) 0 ;
   37215          10 :   void *argp1 = 0 ;
   37216          10 :   int res1 = 0 ;
   37217          10 :   PyObject *swig_obj[2] ;
   37218          10 :   CPLErr result;
   37219             :   
   37220          10 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt64Array", 2, 2, swig_obj)) SWIG_fail;
   37221          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37222          10 :   if (!SWIG_IsOK(res1)) {
   37223           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt64Array" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37224             :   }
   37225          10 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37226          10 :   {
   37227             :     /* %typemap(in,numinputs=1) (int nList, long long* pList)*/
   37228          10 :     arg3 = CreateCInt64ListFromSequence(swig_obj[1], &arg2);
   37229          10 :     if( arg2 < 0 ) {
   37230           0 :       SWIG_fail;
   37231             :     }
   37232             :   }
   37233          10 :   {
   37234          10 :     const int bLocalUseExceptions = GetUseExceptions();
   37235          10 :     if ( bLocalUseExceptions ) {
   37236           0 :       pushErrorHandler();
   37237             :     }
   37238          10 :     {
   37239          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37240          10 :       result = (CPLErr)GDALAttributeHS_WriteInt64Array(arg1,arg2,arg3);
   37241          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37242             :     }
   37243          10 :     if ( bLocalUseExceptions ) {
   37244           0 :       popErrorHandler();
   37245             :     }
   37246             : #ifndef SED_HACKS
   37247             :     if ( bLocalUseExceptions ) {
   37248             :       CPLErr eclass = CPLGetLastErrorType();
   37249             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37250             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37251             :       }
   37252             :     }
   37253             : #endif
   37254             :   }
   37255          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37256          10 :   {
   37257             :     /* %typemap(freearg) (int nList, long long* pList) */
   37258          10 :     free(arg3);
   37259             :   }
   37260          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37261             :   return resultobj;
   37262           0 : fail:
   37263           0 :   {
   37264             :     /* %typemap(freearg) (int nList, long long* pList) */
   37265           0 :     free(arg3);
   37266             :   }
   37267           0 :   return NULL;
   37268             : }
   37269             : 
   37270             : 
   37271           7 : SWIGINTERN PyObject *_wrap_Attribute_WriteDoubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37272           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37273           7 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37274           7 :   int arg2 ;
   37275           7 :   double *arg3 = (double *) 0 ;
   37276           7 :   void *argp1 = 0 ;
   37277           7 :   int res1 = 0 ;
   37278           7 :   PyObject *swig_obj[2] ;
   37279           7 :   CPLErr result;
   37280             :   
   37281           7 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteDoubleArray", 2, 2, swig_obj)) SWIG_fail;
   37282           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37283           7 :   if (!SWIG_IsOK(res1)) {
   37284           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteDoubleArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37285             :   }
   37286           7 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37287           7 :   {
   37288             :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   37289           7 :     arg3 = CreateCDoubleListFromSequence(swig_obj[1], &arg2);
   37290           7 :     if( arg2 < 0 ) {
   37291           0 :       SWIG_fail;
   37292             :     }
   37293             :   }
   37294           7 :   {
   37295           7 :     const int bLocalUseExceptions = GetUseExceptions();
   37296           7 :     if ( bLocalUseExceptions ) {
   37297           0 :       pushErrorHandler();
   37298             :     }
   37299           7 :     {
   37300           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37301           7 :       result = (CPLErr)GDALAttributeHS_WriteDoubleArray(arg1,arg2,arg3);
   37302           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37303             :     }
   37304           7 :     if ( bLocalUseExceptions ) {
   37305           0 :       popErrorHandler();
   37306             :     }
   37307             : #ifndef SED_HACKS
   37308             :     if ( bLocalUseExceptions ) {
   37309             :       CPLErr eclass = CPLGetLastErrorType();
   37310             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37311             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37312             :       }
   37313             :     }
   37314             : #endif
   37315             :   }
   37316           7 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37317           7 :   {
   37318             :     /* %typemap(freearg) (int nList, double* pList) */
   37319           7 :     free(arg3);
   37320             :   }
   37321           7 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37322             :   return resultobj;
   37323           0 : fail:
   37324           0 :   {
   37325             :     /* %typemap(freearg) (int nList, double* pList) */
   37326           0 :     free(arg3);
   37327             :   }
   37328           0 :   return NULL;
   37329             : }
   37330             : 
   37331             : 
   37332          27 : SWIGINTERN PyObject *_wrap_Attribute_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37333          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37334          27 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37335          27 :   char *arg2 = (char *) 0 ;
   37336          27 :   void *argp1 = 0 ;
   37337          27 :   int res1 = 0 ;
   37338          27 :   int res2 ;
   37339          27 :   char *buf2 = 0 ;
   37340          27 :   int alloc2 = 0 ;
   37341          27 :   PyObject *swig_obj[2] ;
   37342          27 :   CPLErr result;
   37343             :   
   37344          27 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_Rename", 2, 2, swig_obj)) SWIG_fail;
   37345          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37346          27 :   if (!SWIG_IsOK(res1)) {
   37347           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_Rename" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37348             :   }
   37349          27 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37350          27 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   37351          27 :   if (!SWIG_IsOK(res2)) {
   37352           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_Rename" "', argument " "2"" of type '" "char const *""'");
   37353             :   }
   37354          27 :   arg2 = reinterpret_cast< char * >(buf2);
   37355          27 :   {
   37356          27 :     const int bLocalUseExceptions = GetUseExceptions();
   37357          27 :     if ( bLocalUseExceptions ) {
   37358          27 :       pushErrorHandler();
   37359             :     }
   37360          27 :     {
   37361          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37362          27 :       result = (CPLErr)GDALAttributeHS_Rename(arg1,(char const *)arg2);
   37363          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37364             :     }
   37365          27 :     if ( bLocalUseExceptions ) {
   37366          27 :       popErrorHandler();
   37367             :     }
   37368             : #ifndef SED_HACKS
   37369             :     if ( bLocalUseExceptions ) {
   37370             :       CPLErr eclass = CPLGetLastErrorType();
   37371             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37372             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37373             :       }
   37374             :     }
   37375             : #endif
   37376             :   }
   37377          27 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37378          27 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37379          61 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37380             :   return resultobj;
   37381           0 : fail:
   37382           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37383             :   return NULL;
   37384             : }
   37385             : 
   37386             : 
   37387         276 : SWIGINTERN PyObject *Attribute_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37388         276 :   PyObject *obj;
   37389         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   37390         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAttributeHS, SWIG_NewClientData(obj));
   37391         276 :   return SWIG_Py_Void();
   37392             : }
   37393             : 
   37394        4908 : SWIGINTERN PyObject *_wrap_delete_Dimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37395        4908 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37396        4908 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37397        4908 :   void *argp1 = 0 ;
   37398        4908 :   int res1 = 0 ;
   37399        4908 :   PyObject *swig_obj[1] ;
   37400             :   
   37401        4908 :   if (!args) SWIG_fail;
   37402        4908 :   swig_obj[0] = args;
   37403        4908 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_DISOWN |  0 );
   37404        4908 :   if (!SWIG_IsOK(res1)) {
   37405           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dimension" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37406             :   }
   37407        4908 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37408        4908 :   {
   37409        4908 :     const int bLocalUseExceptions = GetUseExceptions();
   37410        4908 :     if ( bLocalUseExceptions ) {
   37411         721 :       pushErrorHandler();
   37412             :     }
   37413        4908 :     {
   37414        4908 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37415        4908 :       delete_GDALDimensionHS(arg1);
   37416        4908 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37417             :     }
   37418        4908 :     if ( bLocalUseExceptions ) {
   37419         721 :       popErrorHandler();
   37420             :     }
   37421             : #ifndef SED_HACKS
   37422             :     if ( bLocalUseExceptions ) {
   37423             :       CPLErr eclass = CPLGetLastErrorType();
   37424             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37425             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37426             :       }
   37427             :     }
   37428             : #endif
   37429             :   }
   37430        4908 :   resultobj = SWIG_Py_Void();
   37431        4908 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37432             :   return resultobj;
   37433             : fail:
   37434             :   return NULL;
   37435             : }
   37436             : 
   37437             : 
   37438         274 : SWIGINTERN PyObject *_wrap_Dimension_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37439         274 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37440         274 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37441         274 :   void *argp1 = 0 ;
   37442         274 :   int res1 = 0 ;
   37443         274 :   PyObject *swig_obj[1] ;
   37444         274 :   char *result = 0 ;
   37445             :   
   37446         274 :   if (!args) SWIG_fail;
   37447         274 :   swig_obj[0] = args;
   37448         274 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37449         274 :   if (!SWIG_IsOK(res1)) {
   37450           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetName" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37451             :   }
   37452         274 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37453         274 :   {
   37454         274 :     const int bLocalUseExceptions = GetUseExceptions();
   37455         274 :     if ( bLocalUseExceptions ) {
   37456         132 :       pushErrorHandler();
   37457             :     }
   37458         274 :     {
   37459         274 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37460         274 :       result = (char *)GDALDimensionHS_GetName(arg1);
   37461         274 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37462             :     }
   37463         274 :     if ( bLocalUseExceptions ) {
   37464         132 :       popErrorHandler();
   37465             :     }
   37466             : #ifndef SED_HACKS
   37467             :     if ( bLocalUseExceptions ) {
   37468             :       CPLErr eclass = CPLGetLastErrorType();
   37469             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37470             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37471             :       }
   37472             :     }
   37473             : #endif
   37474             :   }
   37475         274 :   resultobj = SWIG_FromCharPtr((const char *)result);
   37476         274 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37477             :   return resultobj;
   37478             : fail:
   37479             :   return NULL;
   37480             : }
   37481             : 
   37482             : 
   37483          80 : SWIGINTERN PyObject *_wrap_Dimension_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37484          80 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37485          80 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37486          80 :   void *argp1 = 0 ;
   37487          80 :   int res1 = 0 ;
   37488          80 :   PyObject *swig_obj[1] ;
   37489          80 :   char *result = 0 ;
   37490             :   
   37491          80 :   if (!args) SWIG_fail;
   37492          80 :   swig_obj[0] = args;
   37493          80 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37494          80 :   if (!SWIG_IsOK(res1)) {
   37495           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetFullName" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37496             :   }
   37497          80 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37498          80 :   {
   37499          80 :     const int bLocalUseExceptions = GetUseExceptions();
   37500          80 :     if ( bLocalUseExceptions ) {
   37501          49 :       pushErrorHandler();
   37502             :     }
   37503          80 :     {
   37504          80 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37505          80 :       result = (char *)GDALDimensionHS_GetFullName(arg1);
   37506          80 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37507             :     }
   37508          80 :     if ( bLocalUseExceptions ) {
   37509          49 :       popErrorHandler();
   37510             :     }
   37511             : #ifndef SED_HACKS
   37512             :     if ( bLocalUseExceptions ) {
   37513             :       CPLErr eclass = CPLGetLastErrorType();
   37514             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37515             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37516             :       }
   37517             :     }
   37518             : #endif
   37519             :   }
   37520          80 :   resultobj = SWIG_FromCharPtr((const char *)result);
   37521          80 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37522             :   return resultobj;
   37523             : fail:
   37524             :   return NULL;
   37525             : }
   37526             : 
   37527             : 
   37528          52 : SWIGINTERN PyObject *_wrap_Dimension_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37529          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37530          52 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37531          52 :   void *argp1 = 0 ;
   37532          52 :   int res1 = 0 ;
   37533          52 :   PyObject *swig_obj[1] ;
   37534          52 :   char *result = 0 ;
   37535             :   
   37536          52 :   if (!args) SWIG_fail;
   37537          52 :   swig_obj[0] = args;
   37538          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37539          52 :   if (!SWIG_IsOK(res1)) {
   37540           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetType" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37541             :   }
   37542          52 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37543          52 :   {
   37544          52 :     const int bLocalUseExceptions = GetUseExceptions();
   37545          52 :     if ( bLocalUseExceptions ) {
   37546           6 :       pushErrorHandler();
   37547             :     }
   37548          52 :     {
   37549          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37550          52 :       result = (char *)GDALDimensionHS_GetType(arg1);
   37551          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37552             :     }
   37553          52 :     if ( bLocalUseExceptions ) {
   37554           6 :       popErrorHandler();
   37555             :     }
   37556             : #ifndef SED_HACKS
   37557             :     if ( bLocalUseExceptions ) {
   37558             :       CPLErr eclass = CPLGetLastErrorType();
   37559             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37560             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37561             :       }
   37562             :     }
   37563             : #endif
   37564             :   }
   37565          52 :   resultobj = SWIG_FromCharPtr((const char *)result);
   37566          52 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37567             :   return resultobj;
   37568             : fail:
   37569             :   return NULL;
   37570             : }
   37571             : 
   37572             : 
   37573          22 : SWIGINTERN PyObject *_wrap_Dimension_GetDirection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37574          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37575          22 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37576          22 :   void *argp1 = 0 ;
   37577          22 :   int res1 = 0 ;
   37578          22 :   PyObject *swig_obj[1] ;
   37579          22 :   char *result = 0 ;
   37580             :   
   37581          22 :   if (!args) SWIG_fail;
   37582          22 :   swig_obj[0] = args;
   37583          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37584          22 :   if (!SWIG_IsOK(res1)) {
   37585           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetDirection" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37586             :   }
   37587          22 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37588          22 :   {
   37589          22 :     const int bLocalUseExceptions = GetUseExceptions();
   37590          22 :     if ( bLocalUseExceptions ) {
   37591           2 :       pushErrorHandler();
   37592             :     }
   37593          22 :     {
   37594          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37595          22 :       result = (char *)GDALDimensionHS_GetDirection(arg1);
   37596          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37597             :     }
   37598          22 :     if ( bLocalUseExceptions ) {
   37599           2 :       popErrorHandler();
   37600             :     }
   37601             : #ifndef SED_HACKS
   37602             :     if ( bLocalUseExceptions ) {
   37603             :       CPLErr eclass = CPLGetLastErrorType();
   37604             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37605             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37606             :       }
   37607             :     }
   37608             : #endif
   37609             :   }
   37610          22 :   resultobj = SWIG_FromCharPtr((const char *)result);
   37611          22 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37612             :   return resultobj;
   37613             : fail:
   37614             :   return NULL;
   37615             : }
   37616             : 
   37617             : 
   37618        3671 : SWIGINTERN PyObject *_wrap_Dimension_GetSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37619        3671 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37620        3671 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37621        3671 :   void *argp1 = 0 ;
   37622        3671 :   int res1 = 0 ;
   37623        3671 :   PyObject *swig_obj[1] ;
   37624        3671 :   GUIntBig result;
   37625             :   
   37626        3671 :   if (!args) SWIG_fail;
   37627        3671 :   swig_obj[0] = args;
   37628        3671 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37629        3671 :   if (!SWIG_IsOK(res1)) {
   37630           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetSize" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37631             :   }
   37632        3671 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37633        3671 :   {
   37634        3671 :     const int bLocalUseExceptions = GetUseExceptions();
   37635        3671 :     if ( bLocalUseExceptions ) {
   37636         480 :       pushErrorHandler();
   37637             :     }
   37638        3671 :     {
   37639        3671 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37640        3671 :       result = GDALDimensionHS_GetSize(arg1);
   37641        3671 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37642             :     }
   37643        3671 :     if ( bLocalUseExceptions ) {
   37644         480 :       popErrorHandler();
   37645             :     }
   37646             : #ifndef SED_HACKS
   37647             :     if ( bLocalUseExceptions ) {
   37648             :       CPLErr eclass = CPLGetLastErrorType();
   37649             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37650             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37651             :       }
   37652             :     }
   37653             : #endif
   37654             :   }
   37655        3671 :   {
   37656        3671 :     resultobj = PyLong_FromUnsignedLongLong(result);
   37657             :   }
   37658        3671 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37659             :   return resultobj;
   37660             : fail:
   37661             :   return NULL;
   37662             : }
   37663             : 
   37664             : 
   37665         118 : SWIGINTERN PyObject *_wrap_Dimension_GetIndexingVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37666         118 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37667         118 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37668         118 :   void *argp1 = 0 ;
   37669         118 :   int res1 = 0 ;
   37670         118 :   PyObject *swig_obj[1] ;
   37671         118 :   GDALMDArrayHS *result = 0 ;
   37672             :   
   37673         118 :   if (!args) SWIG_fail;
   37674         118 :   swig_obj[0] = args;
   37675         118 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37676         118 :   if (!SWIG_IsOK(res1)) {
   37677           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetIndexingVariable" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37678             :   }
   37679         118 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37680         118 :   {
   37681         118 :     const int bLocalUseExceptions = GetUseExceptions();
   37682         118 :     if ( bLocalUseExceptions ) {
   37683          44 :       pushErrorHandler();
   37684             :     }
   37685         118 :     {
   37686         118 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37687         118 :       result = (GDALMDArrayHS *)GDALDimensionHS_GetIndexingVariable(arg1);
   37688         118 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37689             :     }
   37690         118 :     if ( bLocalUseExceptions ) {
   37691          44 :       popErrorHandler();
   37692             :     }
   37693             : #ifndef SED_HACKS
   37694             :     if ( bLocalUseExceptions ) {
   37695             :       CPLErr eclass = CPLGetLastErrorType();
   37696             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37697             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37698             :       }
   37699             :     }
   37700             : #endif
   37701             :   }
   37702         118 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   37703         118 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37704             :   return resultobj;
   37705             : fail:
   37706             :   return NULL;
   37707             : }
   37708             : 
   37709             : 
   37710          23 : SWIGINTERN PyObject *_wrap_Dimension_SetIndexingVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37711          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37712          23 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37713          23 :   GDALMDArrayHS *arg2 = (GDALMDArrayHS *) 0 ;
   37714          23 :   void *argp1 = 0 ;
   37715          23 :   int res1 = 0 ;
   37716          23 :   void *argp2 = 0 ;
   37717          23 :   int res2 = 0 ;
   37718          23 :   PyObject *swig_obj[2] ;
   37719          23 :   bool result;
   37720             :   
   37721          23 :   if (!SWIG_Python_UnpackTuple(args, "Dimension_SetIndexingVariable", 2, 2, swig_obj)) SWIG_fail;
   37722          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37723          23 :   if (!SWIG_IsOK(res1)) {
   37724           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_SetIndexingVariable" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37725             :   }
   37726          23 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37727          23 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   37728          23 :   if (!SWIG_IsOK(res2)) {
   37729           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dimension_SetIndexingVariable" "', argument " "2"" of type '" "GDALMDArrayHS *""'"); 
   37730             :   }
   37731          23 :   arg2 = reinterpret_cast< GDALMDArrayHS * >(argp2);
   37732          23 :   {
   37733          23 :     const int bLocalUseExceptions = GetUseExceptions();
   37734          23 :     if ( bLocalUseExceptions ) {
   37735           9 :       pushErrorHandler();
   37736             :     }
   37737          23 :     {
   37738          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37739          23 :       result = (bool)GDALDimensionHS_SetIndexingVariable(arg1,arg2);
   37740          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37741             :     }
   37742          23 :     if ( bLocalUseExceptions ) {
   37743           9 :       popErrorHandler();
   37744             :     }
   37745             : #ifndef SED_HACKS
   37746             :     if ( bLocalUseExceptions ) {
   37747             :       CPLErr eclass = CPLGetLastErrorType();
   37748             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37749             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37750             :       }
   37751             :     }
   37752             : #endif
   37753             :   }
   37754          23 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   37755          23 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37756             :   return resultobj;
   37757             : fail:
   37758             :   return NULL;
   37759             : }
   37760             : 
   37761             : 
   37762          31 : SWIGINTERN PyObject *_wrap_Dimension_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37763          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37764          31 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37765          31 :   char *arg2 = (char *) 0 ;
   37766          31 :   void *argp1 = 0 ;
   37767          31 :   int res1 = 0 ;
   37768          31 :   int res2 ;
   37769          31 :   char *buf2 = 0 ;
   37770          31 :   int alloc2 = 0 ;
   37771          31 :   PyObject *swig_obj[2] ;
   37772          31 :   CPLErr result;
   37773             :   
   37774          31 :   if (!SWIG_Python_UnpackTuple(args, "Dimension_Rename", 2, 2, swig_obj)) SWIG_fail;
   37775          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37776          31 :   if (!SWIG_IsOK(res1)) {
   37777           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_Rename" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37778             :   }
   37779          31 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37780          31 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   37781          31 :   if (!SWIG_IsOK(res2)) {
   37782           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dimension_Rename" "', argument " "2"" of type '" "char const *""'");
   37783             :   }
   37784          31 :   arg2 = reinterpret_cast< char * >(buf2);
   37785          31 :   {
   37786          31 :     const int bLocalUseExceptions = GetUseExceptions();
   37787          31 :     if ( bLocalUseExceptions ) {
   37788          31 :       pushErrorHandler();
   37789             :     }
   37790          31 :     {
   37791          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37792          31 :       result = (CPLErr)GDALDimensionHS_Rename(arg1,(char const *)arg2);
   37793          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37794             :     }
   37795          31 :     if ( bLocalUseExceptions ) {
   37796          31 :       popErrorHandler();
   37797             :     }
   37798             : #ifndef SED_HACKS
   37799             :     if ( bLocalUseExceptions ) {
   37800             :       CPLErr eclass = CPLGetLastErrorType();
   37801             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37802             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37803             :       }
   37804             :     }
   37805             : #endif
   37806             :   }
   37807          31 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37808          31 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37809          77 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37810             :   return resultobj;
   37811           0 : fail:
   37812           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37813             :   return NULL;
   37814             : }
   37815             : 
   37816             : 
   37817         276 : SWIGINTERN PyObject *Dimension_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37818         276 :   PyObject *obj;
   37819         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   37820         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDimensionHS, SWIG_NewClientData(obj));
   37821         276 :   return SWIG_Py_Void();
   37822             : }
   37823             : 
   37824        4572 : SWIGINTERN PyObject *_wrap_delete_ExtendedDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37825        4572 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37826        4572 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   37827        4572 :   void *argp1 = 0 ;
   37828        4572 :   int res1 = 0 ;
   37829        4572 :   PyObject *swig_obj[1] ;
   37830             :   
   37831        4572 :   if (!args) SWIG_fail;
   37832        4572 :   swig_obj[0] = args;
   37833        4572 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_DISOWN |  0 );
   37834        4572 :   if (!SWIG_IsOK(res1)) {
   37835           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExtendedDataType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   37836             :   }
   37837        4572 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   37838        4572 :   {
   37839        4572 :     const int bLocalUseExceptions = GetUseExceptions();
   37840        4572 :     if ( bLocalUseExceptions ) {
   37841        1095 :       pushErrorHandler();
   37842             :     }
   37843        4572 :     {
   37844        4572 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37845        4572 :       delete_GDALExtendedDataTypeHS(arg1);
   37846        4572 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37847             :     }
   37848        4572 :     if ( bLocalUseExceptions ) {
   37849        1095 :       popErrorHandler();
   37850             :     }
   37851             : #ifndef SED_HACKS
   37852             :     if ( bLocalUseExceptions ) {
   37853             :       CPLErr eclass = CPLGetLastErrorType();
   37854             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37855             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37856             :       }
   37857             :     }
   37858             : #endif
   37859             :   }
   37860        4572 :   resultobj = SWIG_Py_Void();
   37861        4572 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37862             :   return resultobj;
   37863             : fail:
   37864             :   return NULL;
   37865             : }
   37866             : 
   37867             : 
   37868        1956 : SWIGINTERN PyObject *_wrap_ExtendedDataType_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37869        1956 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37870        1956 :   GDALDataType arg1 ;
   37871        1956 :   PyObject *swig_obj[1] ;
   37872        1956 :   GDALExtendedDataTypeHS *result = 0 ;
   37873             :   
   37874        1956 :   if (!args) SWIG_fail;
   37875        1956 :   swig_obj[0] = args;
   37876        1956 :   {
   37877             :     // %typemap(in) GDALDataType
   37878        1956 :     int val = 0;
   37879        1956 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   37880        1956 :     if (!SWIG_IsOK(ecode)) {
   37881           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   37882             :     }
   37883        1956 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   37884             :     {
   37885           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   37886             :     }
   37887        1956 :     arg1 = static_cast<GDALDataType>(val);
   37888             :   }
   37889        1956 :   {
   37890        1956 :     const int bLocalUseExceptions = GetUseExceptions();
   37891        1956 :     if ( bLocalUseExceptions ) {
   37892         377 :       pushErrorHandler();
   37893             :     }
   37894        1956 :     {
   37895        1956 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37896        1956 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_Create(arg1);
   37897        1956 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37898             :     }
   37899        1956 :     if ( bLocalUseExceptions ) {
   37900         377 :       popErrorHandler();
   37901             :     }
   37902             : #ifndef SED_HACKS
   37903             :     if ( bLocalUseExceptions ) {
   37904             :       CPLErr eclass = CPLGetLastErrorType();
   37905             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37906             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37907             :       }
   37908             :     }
   37909             : #endif
   37910             :   }
   37911        1956 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   37912        1956 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37913             :   return resultobj;
   37914             : fail:
   37915             :   return NULL;
   37916             : }
   37917             : 
   37918             : 
   37919         188 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CreateString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37920         188 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37921         188 :   size_t arg1 = (size_t) 0 ;
   37922         188 :   GDALExtendedDataTypeSubType arg2 = (GDALExtendedDataTypeSubType) GEDTST_NONE ;
   37923         188 :   size_t val1 ;
   37924         188 :   int ecode1 = 0 ;
   37925         188 :   int val2 ;
   37926         188 :   int ecode2 = 0 ;
   37927         188 :   PyObject *swig_obj[2] ;
   37928         188 :   GDALExtendedDataTypeHS *result = 0 ;
   37929             :   
   37930         188 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CreateString", 0, 2, swig_obj)) SWIG_fail;
   37931         188 :   if (swig_obj[0]) {
   37932          11 :     ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1);
   37933          11 :     if (!SWIG_IsOK(ecode1)) {
   37934           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ExtendedDataType_CreateString" "', argument " "1"" of type '" "size_t""'");
   37935             :     } 
   37936             :     arg1 = static_cast< size_t >(val1);
   37937             :   }
   37938         188 :   if (swig_obj[1]) {
   37939           4 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   37940           4 :     if (!SWIG_IsOK(ecode2)) {
   37941           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExtendedDataType_CreateString" "', argument " "2"" of type '" "GDALExtendedDataTypeSubType""'");
   37942             :     } 
   37943           4 :     arg2 = static_cast< GDALExtendedDataTypeSubType >(val2);
   37944             :   }
   37945         188 :   {
   37946         188 :     const int bLocalUseExceptions = GetUseExceptions();
   37947         188 :     if ( bLocalUseExceptions ) {
   37948         113 :       pushErrorHandler();
   37949             :     }
   37950         188 :     {
   37951         188 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37952         188 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_CreateString(arg1,arg2);
   37953         188 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37954             :     }
   37955         188 :     if ( bLocalUseExceptions ) {
   37956         113 :       popErrorHandler();
   37957             :     }
   37958             : #ifndef SED_HACKS
   37959             :     if ( bLocalUseExceptions ) {
   37960             :       CPLErr eclass = CPLGetLastErrorType();
   37961             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37962             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37963             :       }
   37964             :     }
   37965             : #endif
   37966             :   }
   37967         188 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   37968         188 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37969             :   return resultobj;
   37970             : fail:
   37971             :   return NULL;
   37972             : }
   37973             : 
   37974             : 
   37975          22 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CreateCompound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37976          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37977          22 :   char *arg1 = (char *) 0 ;
   37978          22 :   size_t arg2 ;
   37979          22 :   int arg3 ;
   37980          22 :   GDALEDTComponentHS **arg4 = (GDALEDTComponentHS **) 0 ;
   37981          22 :   int res1 ;
   37982          22 :   char *buf1 = 0 ;
   37983          22 :   int alloc1 = 0 ;
   37984          22 :   size_t val2 ;
   37985          22 :   int ecode2 = 0 ;
   37986          22 :   PyObject *swig_obj[3] ;
   37987          22 :   GDALExtendedDataTypeHS *result = 0 ;
   37988             :   
   37989          22 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CreateCompound", 3, 3, swig_obj)) SWIG_fail;
   37990          22 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   37991          22 :   if (!SWIG_IsOK(res1)) {
   37992           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_CreateCompound" "', argument " "1"" of type '" "char const *""'");
   37993             :   }
   37994          22 :   arg1 = reinterpret_cast< char * >(buf1);
   37995          22 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   37996          22 :   if (!SWIG_IsOK(ecode2)) {
   37997           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExtendedDataType_CreateCompound" "', argument " "2"" of type '" "size_t""'");
   37998             :   } 
   37999          22 :   arg2 = static_cast< size_t >(val2);
   38000          22 :   {
   38001             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALEDTComponentHS *optional_##GDALEDTComponentHS)*/
   38002          22 :     if ( !PySequence_Check(swig_obj[2]) ) {
   38003           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   38004           0 :       SWIG_fail;
   38005             :     }
   38006          22 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   38007          22 :     if( size > (Py_ssize_t)INT_MAX ) {
   38008           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   38009           0 :       SWIG_fail;
   38010             :     }
   38011          22 :     if( (size_t)size > SIZE_MAX / sizeof(GDALEDTComponentHS*) ) {
   38012           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   38013           0 :       SWIG_fail;
   38014             :     }
   38015          22 :     arg3 = (int)size;
   38016          22 :     arg4 = (GDALEDTComponentHS**) VSIMalloc(arg3*sizeof(GDALEDTComponentHS*));
   38017          22 :     if( !arg4) {
   38018           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   38019           0 :       SWIG_fail;
   38020             :     }
   38021             :     
   38022          54 :     for( int i = 0; i<arg3; i++ ) {
   38023          32 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   38024          32 :       GDALEDTComponentHS* rawobjectpointer = NULL;
   38025          32 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_EXCEPTION | 0 ));
   38026          32 :       if (!rawobjectpointer) {
   38027           0 :         Py_DECREF(o);
   38028           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALEDTComponentHS");
   38029           0 :         SWIG_fail;
   38030             :       }
   38031          32 :       arg4[i] = rawobjectpointer;
   38032          32 :       Py_DECREF(o);
   38033             :       
   38034             :     }
   38035             :   }
   38036          22 :   {
   38037          22 :     if (!arg1) {
   38038           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38039             :     }
   38040             :   }
   38041          22 :   {
   38042          22 :     const int bLocalUseExceptions = GetUseExceptions();
   38043          22 :     if ( bLocalUseExceptions ) {
   38044           6 :       pushErrorHandler();
   38045             :     }
   38046          22 :     {
   38047          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38048          22 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_CreateCompound((char const *)arg1,arg2,arg3,arg4);
   38049          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38050             :     }
   38051          22 :     if ( bLocalUseExceptions ) {
   38052           6 :       popErrorHandler();
   38053             :     }
   38054             : #ifndef SED_HACKS
   38055             :     if ( bLocalUseExceptions ) {
   38056             :       CPLErr eclass = CPLGetLastErrorType();
   38057             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38058             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38059             :       }
   38060             :     }
   38061             : #endif
   38062             :   }
   38063          22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   38064          22 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   38065          22 :   {
   38066             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALEDTComponentHS **poObjects)*/
   38067          22 :     CPLFree( arg4 );
   38068             :   }
   38069          22 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38070             :   return resultobj;
   38071           0 : fail:
   38072           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   38073           0 :   {
   38074             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALEDTComponentHS **poObjects)*/
   38075           0 :     CPLFree( arg4 );
   38076             :   }
   38077             :   return NULL;
   38078             : }
   38079             : 
   38080             : 
   38081           8 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38082           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38083           8 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38084           8 :   void *argp1 = 0 ;
   38085           8 :   int res1 = 0 ;
   38086           8 :   PyObject *swig_obj[1] ;
   38087           8 :   char *result = 0 ;
   38088             :   
   38089           8 :   if (!args) SWIG_fail;
   38090           8 :   swig_obj[0] = args;
   38091           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38092           8 :   if (!SWIG_IsOK(res1)) {
   38093           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetName" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38094             :   }
   38095           8 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38096           8 :   {
   38097           8 :     const int bLocalUseExceptions = GetUseExceptions();
   38098           8 :     if ( bLocalUseExceptions ) {
   38099           2 :       pushErrorHandler();
   38100             :     }
   38101           8 :     {
   38102           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38103           8 :       result = (char *)GDALExtendedDataTypeHS_GetName(arg1);
   38104           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38105             :     }
   38106           8 :     if ( bLocalUseExceptions ) {
   38107           2 :       popErrorHandler();
   38108             :     }
   38109             : #ifndef SED_HACKS
   38110             :     if ( bLocalUseExceptions ) {
   38111             :       CPLErr eclass = CPLGetLastErrorType();
   38112             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38113             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38114             :       }
   38115             :     }
   38116             : #endif
   38117             :   }
   38118           8 :   resultobj = SWIG_FromCharPtr((const char *)result);
   38119           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38120             :   return resultobj;
   38121             : fail:
   38122             :   return NULL;
   38123             : }
   38124             : 
   38125             : 
   38126        2885 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetClass(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38127        2885 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38128        2885 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38129        2885 :   void *argp1 = 0 ;
   38130        2885 :   int res1 = 0 ;
   38131        2885 :   PyObject *swig_obj[1] ;
   38132        2885 :   GDALExtendedDataTypeClass result;
   38133             :   
   38134        2885 :   if (!args) SWIG_fail;
   38135        2885 :   swig_obj[0] = args;
   38136        2885 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38137        2885 :   if (!SWIG_IsOK(res1)) {
   38138           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetClass" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38139             :   }
   38140        2885 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38141        2885 :   {
   38142        2885 :     const int bLocalUseExceptions = GetUseExceptions();
   38143        2885 :     if ( bLocalUseExceptions ) {
   38144         619 :       pushErrorHandler();
   38145             :     }
   38146        2885 :     {
   38147        2885 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38148        2885 :       result = (GDALExtendedDataTypeClass)GDALExtendedDataTypeHS_GetClass(arg1);
   38149        2885 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38150             :     }
   38151        2885 :     if ( bLocalUseExceptions ) {
   38152         619 :       popErrorHandler();
   38153             :     }
   38154             : #ifndef SED_HACKS
   38155             :     if ( bLocalUseExceptions ) {
   38156             :       CPLErr eclass = CPLGetLastErrorType();
   38157             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38158             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38159             :       }
   38160             :     }
   38161             : #endif
   38162             :   }
   38163        2885 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38164        2885 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38165             :   return resultobj;
   38166             : fail:
   38167             :   return NULL;
   38168             : }
   38169             : 
   38170             : 
   38171        2069 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetNumericDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38172        2069 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38173        2069 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38174        2069 :   void *argp1 = 0 ;
   38175        2069 :   int res1 = 0 ;
   38176        2069 :   PyObject *swig_obj[1] ;
   38177        2069 :   GDALDataType result;
   38178             :   
   38179        2069 :   if (!args) SWIG_fail;
   38180        2069 :   swig_obj[0] = args;
   38181        2069 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38182        2069 :   if (!SWIG_IsOK(res1)) {
   38183           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetNumericDataType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38184             :   }
   38185        2069 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38186        2069 :   {
   38187        2069 :     const int bLocalUseExceptions = GetUseExceptions();
   38188        2069 :     if ( bLocalUseExceptions ) {
   38189         419 :       pushErrorHandler();
   38190             :     }
   38191        2069 :     {
   38192        2069 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38193        2069 :       result = (GDALDataType)GDALExtendedDataTypeHS_GetNumericDataType(arg1);
   38194        2069 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38195             :     }
   38196        2069 :     if ( bLocalUseExceptions ) {
   38197         419 :       popErrorHandler();
   38198             :     }
   38199             : #ifndef SED_HACKS
   38200             :     if ( bLocalUseExceptions ) {
   38201             :       CPLErr eclass = CPLGetLastErrorType();
   38202             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38203             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38204             :       }
   38205             :     }
   38206             : #endif
   38207             :   }
   38208        2069 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38209        2069 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38210             :   return resultobj;
   38211             : fail:
   38212             :   return NULL;
   38213             : }
   38214             : 
   38215             : 
   38216          51 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38217          51 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38218          51 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38219          51 :   void *argp1 = 0 ;
   38220          51 :   int res1 = 0 ;
   38221          51 :   PyObject *swig_obj[1] ;
   38222          51 :   size_t result;
   38223             :   
   38224          51 :   if (!args) SWIG_fail;
   38225          51 :   swig_obj[0] = args;
   38226          51 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38227          51 :   if (!SWIG_IsOK(res1)) {
   38228           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetSize" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38229             :   }
   38230          51 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38231          51 :   {
   38232          51 :     const int bLocalUseExceptions = GetUseExceptions();
   38233          51 :     if ( bLocalUseExceptions ) {
   38234          34 :       pushErrorHandler();
   38235             :     }
   38236          51 :     {
   38237          51 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38238          51 :       result = GDALExtendedDataTypeHS_GetSize(arg1);
   38239          51 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38240             :     }
   38241          51 :     if ( bLocalUseExceptions ) {
   38242          34 :       popErrorHandler();
   38243             :     }
   38244             : #ifndef SED_HACKS
   38245             :     if ( bLocalUseExceptions ) {
   38246             :       CPLErr eclass = CPLGetLastErrorType();
   38247             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38248             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38249             :       }
   38250             :     }
   38251             : #endif
   38252             :   }
   38253          51 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   38254          51 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38255             :   return resultobj;
   38256             : fail:
   38257             :   return NULL;
   38258             : }
   38259             : 
   38260             : 
   38261           3 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetMaxStringLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38262           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38263           3 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38264           3 :   void *argp1 = 0 ;
   38265           3 :   int res1 = 0 ;
   38266           3 :   PyObject *swig_obj[1] ;
   38267           3 :   size_t result;
   38268             :   
   38269           3 :   if (!args) SWIG_fail;
   38270           3 :   swig_obj[0] = args;
   38271           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38272           3 :   if (!SWIG_IsOK(res1)) {
   38273           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetMaxStringLength" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38274             :   }
   38275           3 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38276           3 :   {
   38277           3 :     const int bLocalUseExceptions = GetUseExceptions();
   38278           3 :     if ( bLocalUseExceptions ) {
   38279           0 :       pushErrorHandler();
   38280             :     }
   38281           3 :     {
   38282           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38283           3 :       result = GDALExtendedDataTypeHS_GetMaxStringLength(arg1);
   38284           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38285             :     }
   38286           3 :     if ( bLocalUseExceptions ) {
   38287           0 :       popErrorHandler();
   38288             :     }
   38289             : #ifndef SED_HACKS
   38290             :     if ( bLocalUseExceptions ) {
   38291             :       CPLErr eclass = CPLGetLastErrorType();
   38292             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38293             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38294             :       }
   38295             :     }
   38296             : #endif
   38297             :   }
   38298           3 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   38299           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38300             :   return resultobj;
   38301             : fail:
   38302             :   return NULL;
   38303             : }
   38304             : 
   38305             : 
   38306         104 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetSubType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38307         104 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38308         104 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38309         104 :   void *argp1 = 0 ;
   38310         104 :   int res1 = 0 ;
   38311         104 :   PyObject *swig_obj[1] ;
   38312         104 :   GDALExtendedDataTypeSubType result;
   38313             :   
   38314         104 :   if (!args) SWIG_fail;
   38315         104 :   swig_obj[0] = args;
   38316         104 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38317         104 :   if (!SWIG_IsOK(res1)) {
   38318           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetSubType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38319             :   }
   38320         104 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38321         104 :   {
   38322         104 :     const int bLocalUseExceptions = GetUseExceptions();
   38323         104 :     if ( bLocalUseExceptions ) {
   38324          29 :       pushErrorHandler();
   38325             :     }
   38326         104 :     {
   38327         104 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38328         104 :       result = (GDALExtendedDataTypeSubType)GDALExtendedDataTypeHS_GetSubType(arg1);
   38329         104 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38330             :     }
   38331         104 :     if ( bLocalUseExceptions ) {
   38332          29 :       popErrorHandler();
   38333             :     }
   38334             : #ifndef SED_HACKS
   38335             :     if ( bLocalUseExceptions ) {
   38336             :       CPLErr eclass = CPLGetLastErrorType();
   38337             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38338             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38339             :       }
   38340             :     }
   38341             : #endif
   38342             :   }
   38343         104 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38344         104 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38345             :   return resultobj;
   38346             : fail:
   38347             :   return NULL;
   38348             : }
   38349             : 
   38350             : 
   38351           1 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38352           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38353           1 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38354           1 :   void *argp1 = 0 ;
   38355           1 :   int res1 = 0 ;
   38356           1 :   PyObject *swig_obj[1] ;
   38357           1 :   GDALRasterAttributeTableShadow *result = 0 ;
   38358             :   
   38359           1 :   if (!args) SWIG_fail;
   38360           1 :   swig_obj[0] = args;
   38361           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38362           1 :   if (!SWIG_IsOK(res1)) {
   38363           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetRAT" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38364             :   }
   38365           1 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38366           1 :   {
   38367           1 :     const int bLocalUseExceptions = GetUseExceptions();
   38368           1 :     if ( bLocalUseExceptions ) {
   38369           1 :       pushErrorHandler();
   38370             :     }
   38371           1 :     {
   38372           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38373           1 :       result = (GDALRasterAttributeTableShadow *)GDALExtendedDataTypeHS_GetRAT(arg1);
   38374           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38375             :     }
   38376           1 :     if ( bLocalUseExceptions ) {
   38377           1 :       popErrorHandler();
   38378             :     }
   38379             : #ifndef SED_HACKS
   38380             :     if ( bLocalUseExceptions ) {
   38381             :       CPLErr eclass = CPLGetLastErrorType();
   38382             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38383             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38384             :       }
   38385             :     }
   38386             : #endif
   38387             :   }
   38388           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   38389           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38390             :   return resultobj;
   38391             : fail:
   38392             :   return NULL;
   38393             : }
   38394             : 
   38395             : 
   38396          21 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetComponents(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38397          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38398          21 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38399          21 :   GDALEDTComponentHS ***arg2 = (GDALEDTComponentHS ***) 0 ;
   38400          21 :   size_t *arg3 = (size_t *) 0 ;
   38401          21 :   void *argp1 = 0 ;
   38402          21 :   int res1 = 0 ;
   38403          21 :   GDALEDTComponentHS **comps2 = 0 ;
   38404          21 :   size_t nCount2 = 0 ;
   38405          21 :   PyObject *swig_obj[1] ;
   38406             :   
   38407          21 :   {
   38408             :     /* %typemap(in,numinputs=0) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38409          21 :     arg2 = &comps2;
   38410          21 :     arg3 = &nCount2;
   38411             :   }
   38412          21 :   if (!args) SWIG_fail;
   38413          21 :   swig_obj[0] = args;
   38414          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38415          21 :   if (!SWIG_IsOK(res1)) {
   38416           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetComponents" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38417             :   }
   38418          21 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38419          21 :   {
   38420          21 :     const int bLocalUseExceptions = GetUseExceptions();
   38421          21 :     if ( bLocalUseExceptions ) {
   38422           6 :       pushErrorHandler();
   38423             :     }
   38424          21 :     {
   38425          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38426          21 :       GDALExtendedDataTypeHS_GetComponents(arg1,arg2,arg3);
   38427          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38428             :     }
   38429          21 :     if ( bLocalUseExceptions ) {
   38430           6 :       popErrorHandler();
   38431             :     }
   38432             : #ifndef SED_HACKS
   38433             :     if ( bLocalUseExceptions ) {
   38434             :       CPLErr eclass = CPLGetLastErrorType();
   38435             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38436             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38437             :       }
   38438             :     }
   38439             : #endif
   38440             :   }
   38441          21 :   resultobj = SWIG_Py_Void();
   38442          21 :   {
   38443             :     /* %typemap(argout) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38444          21 :     Py_DECREF(resultobj);
   38445          21 :     resultobj = PyList_New( *arg3 );
   38446          21 :     if( !resultobj ) {
   38447           0 :       SWIG_fail;
   38448             :     }
   38449          62 :     for( size_t i = 0; i < *arg3; i++ ) {
   38450          41 :       PyList_SetItem(resultobj, i,
   38451          41 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALEDTComponentHS,SWIG_POINTER_OWN) );
   38452             :       /* We have borrowed the GDALEDTComponentHS */
   38453          41 :       (*arg2)[i] = NULL;
   38454             :     }
   38455             :   }
   38456          21 :   {
   38457             :     /* %typemap(freearg) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38458          21 :     GDALExtendedDataTypeFreeComponents(*arg2, *arg3);
   38459             :   }
   38460          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38461             :   return resultobj;
   38462           0 : fail:
   38463           0 :   {
   38464             :     /* %typemap(freearg) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38465           0 :     GDALExtendedDataTypeFreeComponents(*arg2, *arg3);
   38466             :   }
   38467             :   return NULL;
   38468             : }
   38469             : 
   38470             : 
   38471           8 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CanConvertTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38472           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38473           8 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38474           8 :   GDALExtendedDataTypeHS *arg2 = (GDALExtendedDataTypeHS *) 0 ;
   38475           8 :   void *argp1 = 0 ;
   38476           8 :   int res1 = 0 ;
   38477           8 :   void *argp2 = 0 ;
   38478           8 :   int res2 = 0 ;
   38479           8 :   PyObject *swig_obj[2] ;
   38480           8 :   bool result;
   38481             :   
   38482           8 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CanConvertTo", 2, 2, swig_obj)) SWIG_fail;
   38483           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38484           8 :   if (!SWIG_IsOK(res1)) {
   38485           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_CanConvertTo" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38486             :   }
   38487           8 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38488           8 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38489           8 :   if (!SWIG_IsOK(res2)) {
   38490           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExtendedDataType_CanConvertTo" "', argument " "2"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38491             :   }
   38492           8 :   arg2 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp2);
   38493           8 :   {
   38494           8 :     if (!arg2) {
   38495           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38496             :     }
   38497             :   }
   38498           7 :   {
   38499           7 :     const int bLocalUseExceptions = GetUseExceptions();
   38500           7 :     if ( bLocalUseExceptions ) {
   38501           0 :       pushErrorHandler();
   38502             :     }
   38503           7 :     {
   38504           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38505           7 :       result = (bool)GDALExtendedDataTypeHS_CanConvertTo(arg1,arg2);
   38506           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38507             :     }
   38508           7 :     if ( bLocalUseExceptions ) {
   38509           0 :       popErrorHandler();
   38510             :     }
   38511             : #ifndef SED_HACKS
   38512             :     if ( bLocalUseExceptions ) {
   38513             :       CPLErr eclass = CPLGetLastErrorType();
   38514             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38515             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38516             :       }
   38517             :     }
   38518             : #endif
   38519             :   }
   38520           7 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   38521           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38522             :   return resultobj;
   38523             : fail:
   38524             :   return NULL;
   38525             : }
   38526             : 
   38527             : 
   38528         101 : SWIGINTERN PyObject *_wrap_ExtendedDataType_Equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38529         101 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38530         101 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38531         101 :   GDALExtendedDataTypeHS *arg2 = (GDALExtendedDataTypeHS *) 0 ;
   38532         101 :   void *argp1 = 0 ;
   38533         101 :   int res1 = 0 ;
   38534         101 :   void *argp2 = 0 ;
   38535         101 :   int res2 = 0 ;
   38536         101 :   PyObject *swig_obj[2] ;
   38537         101 :   bool result;
   38538             :   
   38539         101 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_Equals", 2, 2, swig_obj)) SWIG_fail;
   38540         101 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38541         101 :   if (!SWIG_IsOK(res1)) {
   38542           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_Equals" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38543             :   }
   38544         101 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38545         101 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38546         101 :   if (!SWIG_IsOK(res2)) {
   38547           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExtendedDataType_Equals" "', argument " "2"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38548             :   }
   38549         101 :   arg2 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp2);
   38550         101 :   {
   38551         101 :     if (!arg2) {
   38552           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38553             :     }
   38554             :   }
   38555         100 :   {
   38556         100 :     const int bLocalUseExceptions = GetUseExceptions();
   38557         100 :     if ( bLocalUseExceptions ) {
   38558          38 :       pushErrorHandler();
   38559             :     }
   38560         100 :     {
   38561         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38562         100 :       result = (bool)GDALExtendedDataTypeHS_Equals(arg1,arg2);
   38563         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38564             :     }
   38565         100 :     if ( bLocalUseExceptions ) {
   38566          38 :       popErrorHandler();
   38567             :     }
   38568             : #ifndef SED_HACKS
   38569             :     if ( bLocalUseExceptions ) {
   38570             :       CPLErr eclass = CPLGetLastErrorType();
   38571             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38572             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38573             :       }
   38574             :     }
   38575             : #endif
   38576             :   }
   38577         100 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   38578         101 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38579             :   return resultobj;
   38580             : fail:
   38581             :   return NULL;
   38582             : }
   38583             : 
   38584             : 
   38585         276 : SWIGINTERN PyObject *ExtendedDataType_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38586         276 :   PyObject *obj;
   38587         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   38588         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_NewClientData(obj));
   38589         276 :   return SWIG_Py_Void();
   38590             : }
   38591             : 
   38592          61 : SWIGINTERN PyObject *_wrap_delete_EDTComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38593          61 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38594          61 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   38595          61 :   void *argp1 = 0 ;
   38596          61 :   int res1 = 0 ;
   38597          61 :   PyObject *swig_obj[1] ;
   38598             :   
   38599          61 :   if (!args) SWIG_fail;
   38600          61 :   swig_obj[0] = args;
   38601          61 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_DISOWN |  0 );
   38602          61 :   if (!SWIG_IsOK(res1)) {
   38603           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EDTComponent" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   38604             :   }
   38605          61 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   38606          61 :   {
   38607          61 :     const int bLocalUseExceptions = GetUseExceptions();
   38608          61 :     if ( bLocalUseExceptions ) {
   38609          23 :       pushErrorHandler();
   38610             :     }
   38611          61 :     {
   38612          61 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38613          61 :       delete_GDALEDTComponentHS(arg1);
   38614          61 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38615             :     }
   38616          61 :     if ( bLocalUseExceptions ) {
   38617          23 :       popErrorHandler();
   38618             :     }
   38619             : #ifndef SED_HACKS
   38620             :     if ( bLocalUseExceptions ) {
   38621             :       CPLErr eclass = CPLGetLastErrorType();
   38622             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38623             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38624             :       }
   38625             :     }
   38626             : #endif
   38627             :   }
   38628          61 :   resultobj = SWIG_Py_Void();
   38629          61 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38630             :   return resultobj;
   38631             : fail:
   38632             :   return NULL;
   38633             : }
   38634             : 
   38635             : 
   38636          20 : SWIGINTERN PyObject *_wrap_EDTComponent_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38637          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38638          20 :   char *arg1 = (char *) 0 ;
   38639          20 :   size_t arg2 ;
   38640          20 :   GDALExtendedDataTypeHS *arg3 = (GDALExtendedDataTypeHS *) 0 ;
   38641          20 :   int res1 ;
   38642          20 :   char *buf1 = 0 ;
   38643          20 :   int alloc1 = 0 ;
   38644          20 :   size_t val2 ;
   38645          20 :   int ecode2 = 0 ;
   38646          20 :   void *argp3 = 0 ;
   38647          20 :   int res3 = 0 ;
   38648          20 :   PyObject *swig_obj[3] ;
   38649          20 :   GDALEDTComponentHS *result = 0 ;
   38650             :   
   38651          20 :   if (!SWIG_Python_UnpackTuple(args, "EDTComponent_Create", 3, 3, swig_obj)) SWIG_fail;
   38652          20 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   38653          20 :   if (!SWIG_IsOK(res1)) {
   38654           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_Create" "', argument " "1"" of type '" "char const *""'");
   38655             :   }
   38656          20 :   arg1 = reinterpret_cast< char * >(buf1);
   38657          20 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   38658          20 :   if (!SWIG_IsOK(ecode2)) {
   38659           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EDTComponent_Create" "', argument " "2"" of type '" "size_t""'");
   38660             :   } 
   38661          20 :   arg2 = static_cast< size_t >(val2);
   38662          20 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38663          20 :   if (!SWIG_IsOK(res3)) {
   38664           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EDTComponent_Create" "', argument " "3"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38665             :   }
   38666          20 :   arg3 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp3);
   38667          20 :   {
   38668          20 :     if (!arg1) {
   38669           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38670             :     }
   38671             :   }
   38672          20 :   {
   38673          20 :     if (!arg3) {
   38674           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38675             :     }
   38676             :   }
   38677          20 :   {
   38678          20 :     const int bLocalUseExceptions = GetUseExceptions();
   38679          20 :     if ( bLocalUseExceptions ) {
   38680          10 :       pushErrorHandler();
   38681             :     }
   38682          20 :     {
   38683          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38684          20 :       result = (GDALEDTComponentHS *)GDALEDTComponentHS_Create((char const *)arg1,arg2,arg3);
   38685          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38686             :     }
   38687          20 :     if ( bLocalUseExceptions ) {
   38688          10 :       popErrorHandler();
   38689             :     }
   38690             : #ifndef SED_HACKS
   38691             :     if ( bLocalUseExceptions ) {
   38692             :       CPLErr eclass = CPLGetLastErrorType();
   38693             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38694             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38695             :       }
   38696             :     }
   38697             : #endif
   38698             :   }
   38699          20 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_OWN |  0 );
   38700          20 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   38701          20 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38702             :   return resultobj;
   38703           0 : fail:
   38704           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   38705             :   return NULL;
   38706             : }
   38707             : 
   38708             : 
   38709          33 : SWIGINTERN PyObject *_wrap_EDTComponent_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38710          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38711          33 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   38712          33 :   void *argp1 = 0 ;
   38713          33 :   int res1 = 0 ;
   38714          33 :   PyObject *swig_obj[1] ;
   38715          33 :   char *result = 0 ;
   38716             :   
   38717          33 :   if (!args) SWIG_fail;
   38718          33 :   swig_obj[0] = args;
   38719          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   38720          33 :   if (!SWIG_IsOK(res1)) {
   38721           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetName" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   38722             :   }
   38723          33 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   38724          33 :   {
   38725          33 :     const int bLocalUseExceptions = GetUseExceptions();
   38726          33 :     if ( bLocalUseExceptions ) {
   38727          13 :       pushErrorHandler();
   38728             :     }
   38729          33 :     {
   38730          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38731          33 :       result = (char *)GDALEDTComponentHS_GetName(arg1);
   38732          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38733             :     }
   38734          33 :     if ( bLocalUseExceptions ) {
   38735          13 :       popErrorHandler();
   38736             :     }
   38737             : #ifndef SED_HACKS
   38738             :     if ( bLocalUseExceptions ) {
   38739             :       CPLErr eclass = CPLGetLastErrorType();
   38740             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38741             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38742             :       }
   38743             :     }
   38744             : #endif
   38745             :   }
   38746          33 :   resultobj = SWIG_FromCharPtr((const char *)result);
   38747          33 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38748             :   return resultobj;
   38749             : fail:
   38750             :   return NULL;
   38751             : }
   38752             : 
   38753             : 
   38754          31 : SWIGINTERN PyObject *_wrap_EDTComponent_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38755          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38756          31 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   38757          31 :   void *argp1 = 0 ;
   38758          31 :   int res1 = 0 ;
   38759          31 :   PyObject *swig_obj[1] ;
   38760          31 :   size_t result;
   38761             :   
   38762          31 :   if (!args) SWIG_fail;
   38763          31 :   swig_obj[0] = args;
   38764          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   38765          31 :   if (!SWIG_IsOK(res1)) {
   38766           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetOffset" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   38767             :   }
   38768          31 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   38769          31 :   {
   38770          31 :     const int bLocalUseExceptions = GetUseExceptions();
   38771          31 :     if ( bLocalUseExceptions ) {
   38772          13 :       pushErrorHandler();
   38773             :     }
   38774          31 :     {
   38775          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38776          31 :       result = GDALEDTComponentHS_GetOffset(arg1);
   38777          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38778             :     }
   38779          31 :     if ( bLocalUseExceptions ) {
   38780          13 :       popErrorHandler();
   38781             :     }
   38782             : #ifndef SED_HACKS
   38783             :     if ( bLocalUseExceptions ) {
   38784             :       CPLErr eclass = CPLGetLastErrorType();
   38785             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38786             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38787             :       }
   38788             :     }
   38789             : #endif
   38790             :   }
   38791          31 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   38792          31 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38793             :   return resultobj;
   38794             : fail:
   38795             :   return NULL;
   38796             : }
   38797             : 
   38798             : 
   38799          49 : SWIGINTERN PyObject *_wrap_EDTComponent_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38800          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38801          49 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   38802          49 :   void *argp1 = 0 ;
   38803          49 :   int res1 = 0 ;
   38804          49 :   PyObject *swig_obj[1] ;
   38805          49 :   GDALExtendedDataTypeHS *result = 0 ;
   38806             :   
   38807          49 :   if (!args) SWIG_fail;
   38808          49 :   swig_obj[0] = args;
   38809          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   38810          49 :   if (!SWIG_IsOK(res1)) {
   38811           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetType" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   38812             :   }
   38813          49 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   38814          49 :   {
   38815          49 :     const int bLocalUseExceptions = GetUseExceptions();
   38816          49 :     if ( bLocalUseExceptions ) {
   38817          21 :       pushErrorHandler();
   38818             :     }
   38819          49 :     {
   38820          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38821          49 :       result = (GDALExtendedDataTypeHS *)GDALEDTComponentHS_GetType(arg1);
   38822          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38823             :     }
   38824          49 :     if ( bLocalUseExceptions ) {
   38825          21 :       popErrorHandler();
   38826             :     }
   38827             : #ifndef SED_HACKS
   38828             :     if ( bLocalUseExceptions ) {
   38829             :       CPLErr eclass = CPLGetLastErrorType();
   38830             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38831             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38832             :       }
   38833             :     }
   38834             : #endif
   38835             :   }
   38836          49 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   38837          49 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38838             :   return resultobj;
   38839             : fail:
   38840             :   return NULL;
   38841             : }
   38842             : 
   38843             : 
   38844         276 : SWIGINTERN PyObject *EDTComponent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38845         276 :   PyObject *obj;
   38846         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   38847         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALEDTComponentHS, SWIG_NewClientData(obj));
   38848         276 :   return SWIG_Py_Void();
   38849             : }
   38850             : 
   38851          13 : SWIGINTERN PyObject *_wrap_CreateRasterAttributeTableFromMDArrays(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38852          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38853          13 :   GDALRATTableType arg1 ;
   38854          13 :   int arg2 ;
   38855          13 :   GDALMDArrayHS **arg3 = (GDALMDArrayHS **) 0 ;
   38856          13 :   int arg4 = (int) 0 ;
   38857          13 :   GDALRATFieldUsage *arg5 = (GDALRATFieldUsage *) NULL ;
   38858          13 :   int val1 ;
   38859          13 :   int ecode1 = 0 ;
   38860          13 :   PyObject *swig_obj[3] ;
   38861          13 :   GDALRasterAttributeTableShadow *result = 0 ;
   38862             :   
   38863          13 :   if (!SWIG_Python_UnpackTuple(args, "CreateRasterAttributeTableFromMDArrays", 2, 3, swig_obj)) SWIG_fail;
   38864          13 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   38865          13 :   if (!SWIG_IsOK(ecode1)) {
   38866           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "CreateRasterAttributeTableFromMDArrays" "', argument " "1"" of type '" "GDALRATTableType""'");
   38867             :   } 
   38868          13 :   arg1 = static_cast< GDALRATTableType >(val1);
   38869          13 :   {
   38870             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALMDArrayHS *optional_##GDALMDArrayHS)*/
   38871          13 :     if ( !PySequence_Check(swig_obj[1]) ) {
   38872           1 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   38873           1 :       SWIG_fail;
   38874             :     }
   38875          12 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   38876          12 :     if( size > (Py_ssize_t)INT_MAX ) {
   38877           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   38878           0 :       SWIG_fail;
   38879             :     }
   38880          12 :     if( (size_t)size > SIZE_MAX / sizeof(GDALMDArrayHS*) ) {
   38881           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   38882           0 :       SWIG_fail;
   38883             :     }
   38884          12 :     arg2 = (int)size;
   38885          12 :     arg3 = (GDALMDArrayHS**) VSIMalloc(arg2*sizeof(GDALMDArrayHS*));
   38886          12 :     if( !arg3) {
   38887           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   38888           0 :       SWIG_fail;
   38889             :     }
   38890             :     
   38891          26 :     for( int i = 0; i<arg2; i++ ) {
   38892          16 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   38893          16 :       GDALMDArrayHS* rawobjectpointer = NULL;
   38894          16 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_EXCEPTION | 0 ));
   38895          16 :       if (!rawobjectpointer) {
   38896           2 :         Py_DECREF(o);
   38897           2 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALMDArrayHS");
   38898           2 :         SWIG_fail;
   38899             :       }
   38900          14 :       arg3[i] = rawobjectpointer;
   38901          14 :       Py_DECREF(o);
   38902             :       
   38903             :     }
   38904             :   }
   38905          10 :   if (swig_obj[2]) {
   38906           6 :     {
   38907             :       /*  %typemap(in) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   38908           6 :       if ( !PySequence_Check(swig_obj[2]) ) {
   38909           1 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   38910           1 :         SWIG_fail;
   38911             :       }
   38912           5 :       Py_ssize_t size = PySequence_Size(swig_obj[2]);
   38913           5 :       if( size > (Py_ssize_t)INT_MAX ) {
   38914           0 :         PyErr_SetString(PyExc_TypeError, "too big sequence");
   38915           0 :         SWIG_fail;
   38916             :       }
   38917           5 :       if( (size_t)size > SIZE_MAX / sizeof(int) ) {
   38918           0 :         PyErr_SetString(PyExc_TypeError, "too big sequence");
   38919           0 :         SWIG_fail;
   38920             :       }
   38921           5 :       arg4 = (int)size;
   38922           5 :       arg5 = (GDALRATFieldUsage*) VSIMalloc(arg4*sizeof(GDALRATFieldUsage));
   38923           5 :       if( !arg5) {
   38924           0 :         PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   38925           0 :         SWIG_fail;
   38926             :       }
   38927             :       
   38928          10 :       for( int i = 0; i<arg4; i++ ) {
   38929           8 :         PyObject *o = PySequence_GetItem(swig_obj[2],i);
   38930           8 :         int nVal = 0;
   38931           8 :         if ( !PyArg_Parse(o,"i",&nVal) ) {
   38932           1 :           PyErr_SetString(PyExc_TypeError, "not a valid GDALRATFieldUsage");
   38933           1 :           Py_DECREF(o);
   38934           3 :           SWIG_fail;
   38935             :         }
   38936           7 :         Py_DECREF(o);
   38937           7 :         if( nVal < 0 || nVal >= GFU_MaxCount )
   38938             :         {
   38939           2 :           PyErr_SetString(PyExc_TypeError, "not a valid GDALRATFieldUsage");
   38940           2 :           SWIG_fail;
   38941             :         }
   38942           5 :         (arg5)[i] = static_cast<GDALRATFieldUsage>(nVal);
   38943             :       }
   38944             :     }
   38945             :   }
   38946           6 :   {
   38947           6 :     const int bLocalUseExceptions = GetUseExceptions();
   38948           6 :     if ( bLocalUseExceptions ) {
   38949           6 :       pushErrorHandler();
   38950             :     }
   38951           6 :     {
   38952           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38953           6 :       result = (GDALRasterAttributeTableShadow *)CreateRasterAttributeTableFromMDArrays(arg1,arg2,arg3,arg4,arg5);
   38954           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38955             :     }
   38956           6 :     if ( bLocalUseExceptions ) {
   38957           6 :       popErrorHandler();
   38958             :     }
   38959             : #ifndef SED_HACKS
   38960             :     if ( bLocalUseExceptions ) {
   38961             :       CPLErr eclass = CPLGetLastErrorType();
   38962             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38963             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38964             :       }
   38965             :     }
   38966             : #endif
   38967             :   }
   38968           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
   38969           6 :   {
   38970             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   38971           6 :     CPLFree( arg3 );
   38972             :   }
   38973           6 :   {
   38974             :     /* %typemap(freearg) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   38975           6 :     CPLFree( arg5 );
   38976             :   }
   38977          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38978             :   return resultobj;
   38979           7 : fail:
   38980           7 :   {
   38981             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   38982           7 :     CPLFree( arg3 );
   38983             :   }
   38984           7 :   {
   38985             :     /* %typemap(freearg) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   38986           7 :     CPLFree( arg5 );
   38987             :   }
   38988             :   return NULL;
   38989             : }
   38990             : 
   38991             : 
   38992       17813 : SWIGINTERN PyObject *_wrap_Band_XSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38993       17813 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38994       17813 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   38995       17813 :   void *argp1 = 0 ;
   38996       17813 :   int res1 = 0 ;
   38997       17813 :   PyObject *swig_obj[1] ;
   38998       17813 :   int result;
   38999             :   
   39000       17813 :   if (!args) SWIG_fail;
   39001       17813 :   swig_obj[0] = args;
   39002       17813 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39003       17813 :   if (!SWIG_IsOK(res1)) {
   39004           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_XSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39005             :   }
   39006       17813 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39007       17813 :   {
   39008       17813 :     const int bLocalUseExceptions = GetUseExceptions();
   39009       17813 :     if ( bLocalUseExceptions ) {
   39010       14701 :       pushErrorHandler();
   39011             :     }
   39012       17813 :     {
   39013       17813 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39014       17813 :       result = (int)GDALRasterBandShadow_XSize_get(arg1);
   39015       17813 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39016             :     }
   39017       17813 :     if ( bLocalUseExceptions ) {
   39018       14701 :       popErrorHandler();
   39019             :     }
   39020             : #ifndef SED_HACKS
   39021             :     if ( bLocalUseExceptions ) {
   39022             :       CPLErr eclass = CPLGetLastErrorType();
   39023             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39024             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39025             :       }
   39026             :     }
   39027             : #endif
   39028             :   }
   39029       17813 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39030       17813 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39031             :   return resultobj;
   39032             : fail:
   39033             :   return NULL;
   39034             : }
   39035             : 
   39036             : 
   39037       16680 : SWIGINTERN PyObject *_wrap_Band_YSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39038       16680 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39039       16680 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39040       16680 :   void *argp1 = 0 ;
   39041       16680 :   int res1 = 0 ;
   39042       16680 :   PyObject *swig_obj[1] ;
   39043       16680 :   int result;
   39044             :   
   39045       16680 :   if (!args) SWIG_fail;
   39046       16680 :   swig_obj[0] = args;
   39047       16680 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39048       16680 :   if (!SWIG_IsOK(res1)) {
   39049           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_YSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39050             :   }
   39051       16680 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39052       16680 :   {
   39053       16680 :     const int bLocalUseExceptions = GetUseExceptions();
   39054       16680 :     if ( bLocalUseExceptions ) {
   39055       13624 :       pushErrorHandler();
   39056             :     }
   39057       16680 :     {
   39058       16680 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39059       16680 :       result = (int)GDALRasterBandShadow_YSize_get(arg1);
   39060       16680 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39061             :     }
   39062       16680 :     if ( bLocalUseExceptions ) {
   39063       13624 :       popErrorHandler();
   39064             :     }
   39065             : #ifndef SED_HACKS
   39066             :     if ( bLocalUseExceptions ) {
   39067             :       CPLErr eclass = CPLGetLastErrorType();
   39068             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39069             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39070             :       }
   39071             :     }
   39072             : #endif
   39073             :   }
   39074       16680 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39075       16680 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39076             :   return resultobj;
   39077             : fail:
   39078             :   return NULL;
   39079             : }
   39080             : 
   39081             : 
   39082      848856 : SWIGINTERN PyObject *_wrap_Band_DataType_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39083      848856 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39084      848856 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39085      848856 :   void *argp1 = 0 ;
   39086      848856 :   int res1 = 0 ;
   39087      848856 :   PyObject *swig_obj[1] ;
   39088      848856 :   GDALDataType result;
   39089             :   
   39090      848856 :   if (!args) SWIG_fail;
   39091      848856 :   swig_obj[0] = args;
   39092      848856 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39093      848856 :   if (!SWIG_IsOK(res1)) {
   39094           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DataType_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39095             :   }
   39096      848856 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39097      848856 :   {
   39098      848856 :     const int bLocalUseExceptions = GetUseExceptions();
   39099      848856 :     if ( bLocalUseExceptions ) {
   39100      836940 :       pushErrorHandler();
   39101             :     }
   39102      848856 :     {
   39103      848856 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39104      848856 :       result = (GDALDataType)GDALRasterBandShadow_DataType_get(arg1);
   39105      848856 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39106             :     }
   39107      848856 :     if ( bLocalUseExceptions ) {
   39108      836940 :       popErrorHandler();
   39109             :     }
   39110             : #ifndef SED_HACKS
   39111             :     if ( bLocalUseExceptions ) {
   39112             :       CPLErr eclass = CPLGetLastErrorType();
   39113             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39114             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39115             :       }
   39116             :     }
   39117             : #endif
   39118             :   }
   39119      848856 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39120      848856 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39121             :   return resultobj;
   39122             : fail:
   39123             :   return NULL;
   39124             : }
   39125             : 
   39126             : 
   39127          66 : SWIGINTERN PyObject *_wrap_Band_GetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39128          66 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39129          66 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39130          66 :   void *argp1 = 0 ;
   39131          66 :   int res1 = 0 ;
   39132          66 :   PyObject *swig_obj[1] ;
   39133          66 :   GDALDatasetShadow *result = 0 ;
   39134             :   
   39135          66 :   if (!args) SWIG_fail;
   39136          66 :   swig_obj[0] = args;
   39137          66 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39138          66 :   if (!SWIG_IsOK(res1)) {
   39139           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDataset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39140             :   }
   39141          66 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39142          66 :   {
   39143          66 :     const int bLocalUseExceptions = GetUseExceptions();
   39144          66 :     if ( bLocalUseExceptions ) {
   39145           7 :       pushErrorHandler();
   39146             :     }
   39147          66 :     {
   39148          66 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39149          66 :       result = (GDALDatasetShadow *)GDALRasterBandShadow_GetDataset(arg1);
   39150          66 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39151             :     }
   39152          66 :     if ( bLocalUseExceptions ) {
   39153           7 :       popErrorHandler();
   39154             :     }
   39155             : #ifndef SED_HACKS
   39156             :     if ( bLocalUseExceptions ) {
   39157             :       CPLErr eclass = CPLGetLastErrorType();
   39158             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39159             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39160             :       }
   39161             :     }
   39162             : #endif
   39163             :   }
   39164          66 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   39165          66 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39166             :   return resultobj;
   39167             : fail:
   39168             :   return NULL;
   39169             : }
   39170             : 
   39171             : 
   39172           8 : SWIGINTERN PyObject *_wrap_Band_GetBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39173           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39174           8 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39175           8 :   void *argp1 = 0 ;
   39176           8 :   int res1 = 0 ;
   39177           8 :   PyObject *swig_obj[1] ;
   39178           8 :   int result;
   39179             :   
   39180           8 :   if (!args) SWIG_fail;
   39181           8 :   swig_obj[0] = args;
   39182           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39183           8 :   if (!SWIG_IsOK(res1)) {
   39184           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39185             :   }
   39186           8 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39187           8 :   {
   39188           8 :     const int bLocalUseExceptions = GetUseExceptions();
   39189           8 :     if ( bLocalUseExceptions ) {
   39190           8 :       pushErrorHandler();
   39191             :     }
   39192           8 :     {
   39193           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39194           8 :       result = (int)GDALRasterBandShadow_GetBand(arg1);
   39195           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39196             :     }
   39197           8 :     if ( bLocalUseExceptions ) {
   39198           8 :       popErrorHandler();
   39199             :     }
   39200             : #ifndef SED_HACKS
   39201             :     if ( bLocalUseExceptions ) {
   39202             :       CPLErr eclass = CPLGetLastErrorType();
   39203             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39204             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39205             :       }
   39206             :     }
   39207             : #endif
   39208             :   }
   39209           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39210           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39211             :   return resultobj;
   39212             : fail:
   39213             :   return NULL;
   39214             : }
   39215             : 
   39216             : 
   39217         491 : SWIGINTERN PyObject *_wrap_Band_GetBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39218         491 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39219         491 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39220         491 :   int *arg2 = (int *) 0 ;
   39221         491 :   int *arg3 = (int *) 0 ;
   39222         491 :   void *argp1 = 0 ;
   39223         491 :   int res1 = 0 ;
   39224         491 :   int temp2 ;
   39225         491 :   int res2 = SWIG_TMPOBJ ;
   39226         491 :   int temp3 ;
   39227         491 :   int res3 = SWIG_TMPOBJ ;
   39228         491 :   PyObject *swig_obj[1] ;
   39229             :   
   39230         491 :   arg2 = &temp2;
   39231         491 :   arg3 = &temp3;
   39232         491 :   if (!args) SWIG_fail;
   39233         491 :   swig_obj[0] = args;
   39234         491 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39235         491 :   if (!SWIG_IsOK(res1)) {
   39236           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39237             :   }
   39238         491 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39239         491 :   {
   39240         491 :     const int bLocalUseExceptions = GetUseExceptions();
   39241         491 :     if ( bLocalUseExceptions ) {
   39242         205 :       pushErrorHandler();
   39243             :     }
   39244         491 :     {
   39245         491 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39246         491 :       GDALRasterBandShadow_GetBlockSize(arg1,arg2,arg3);
   39247         491 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39248             :     }
   39249         491 :     if ( bLocalUseExceptions ) {
   39250         205 :       popErrorHandler();
   39251             :     }
   39252             : #ifndef SED_HACKS
   39253             :     if ( bLocalUseExceptions ) {
   39254             :       CPLErr eclass = CPLGetLastErrorType();
   39255             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39256             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39257             :       }
   39258             :     }
   39259             : #endif
   39260             :   }
   39261         491 :   resultobj = SWIG_Py_Void();
   39262         491 :   if (ReturnSame(SWIG_IsTmpObj(res2))) {
   39263         491 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
   39264             :   } else {
   39265           0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   39266           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
   39267             :   }
   39268         491 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   39269         491 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   39270             :   } else {
   39271           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   39272           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   39273             :   }
   39274         491 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39275             :   return resultobj;
   39276             : fail:
   39277             :   return NULL;
   39278             : }
   39279             : 
   39280             : 
   39281           6 : SWIGINTERN PyObject *_wrap_Band_GetActualBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39282           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39283           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39284           6 :   int arg2 ;
   39285           6 :   int arg3 ;
   39286           6 :   int *arg4 = (int *) 0 ;
   39287           6 :   int *arg5 = (int *) 0 ;
   39288           6 :   int *arg6 = (int *) 0 ;
   39289           6 :   void *argp1 = 0 ;
   39290           6 :   int res1 = 0 ;
   39291           6 :   int val2 ;
   39292           6 :   int ecode2 = 0 ;
   39293           6 :   int val3 ;
   39294           6 :   int ecode3 = 0 ;
   39295           6 :   int nxvalid4 = 0 ;
   39296           6 :   int nyvalid4 = 0 ;
   39297           6 :   int isvalid4 = 0 ;
   39298           6 :   PyObject *swig_obj[3] ;
   39299             :   
   39300           6 :   {
   39301             :     /* %typemap(in) (int *pnxvalid, int *pnyvalid, int* pisvalid) */
   39302           6 :     arg4 = &nxvalid4;
   39303           6 :     arg5 = &nyvalid4;
   39304           6 :     arg6 = &isvalid4;
   39305             :   }
   39306           6 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetActualBlockSize", 3, 3, swig_obj)) SWIG_fail;
   39307           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39308           6 :   if (!SWIG_IsOK(res1)) {
   39309           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetActualBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39310             :   }
   39311           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39312           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   39313           6 :   if (!SWIG_IsOK(ecode2)) {
   39314           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetActualBlockSize" "', argument " "2"" of type '" "int""'");
   39315             :   } 
   39316           6 :   arg2 = static_cast< int >(val2);
   39317           6 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   39318           6 :   if (!SWIG_IsOK(ecode3)) {
   39319           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetActualBlockSize" "', argument " "3"" of type '" "int""'");
   39320             :   } 
   39321           6 :   arg3 = static_cast< int >(val3);
   39322           6 :   {
   39323           6 :     const int bLocalUseExceptions = GetUseExceptions();
   39324           6 :     if ( bLocalUseExceptions ) {
   39325           0 :       pushErrorHandler();
   39326             :     }
   39327           6 :     {
   39328           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39329           6 :       GDALRasterBandShadow_GetActualBlockSize(arg1,arg2,arg3,arg4,arg5,arg6);
   39330           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39331             :     }
   39332           6 :     if ( bLocalUseExceptions ) {
   39333           0 :       popErrorHandler();
   39334             :     }
   39335             : #ifndef SED_HACKS
   39336             :     if ( bLocalUseExceptions ) {
   39337             :       CPLErr eclass = CPLGetLastErrorType();
   39338             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39339             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39340             :       }
   39341             :     }
   39342             : #endif
   39343             :   }
   39344           6 :   resultobj = SWIG_Py_Void();
   39345           6 :   {
   39346             :     /* %typemap(argout) (int *pnxvalid, int *pnyvalid, int* pisvalid)  */
   39347           6 :     PyObject *r;
   39348           6 :     if ( !*arg6 ) {
   39349           4 :       Py_INCREF(Py_None);
   39350           4 :       r = Py_None;
   39351             :     }
   39352             :     else {
   39353           2 :       r = PyTuple_New( 2 );
   39354           2 :       PyTuple_SetItem( r, 0, PyLong_FromLong(*arg4) );
   39355           2 :       PyTuple_SetItem( r, 1, PyLong_FromLong(*arg5) );
   39356             :     }
   39357             : #if SWIG_VERSION >= 0x040300
   39358             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   39359             : #else
   39360           6 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   39361             : #endif
   39362             :   }
   39363           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39364             :   return resultobj;
   39365             : fail:
   39366             :   return NULL;
   39367             : }
   39368             : 
   39369             : 
   39370         792 : SWIGINTERN PyObject *_wrap_Band_GetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39371         792 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39372         792 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39373         792 :   void *argp1 = 0 ;
   39374         792 :   int res1 = 0 ;
   39375         792 :   PyObject *swig_obj[1] ;
   39376         792 :   GDALColorInterp result;
   39377             :   
   39378         792 :   if (!args) SWIG_fail;
   39379         792 :   swig_obj[0] = args;
   39380         792 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39381         792 :   if (!SWIG_IsOK(res1)) {
   39382           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39383             :   }
   39384         792 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39385         792 :   {
   39386         792 :     const int bLocalUseExceptions = GetUseExceptions();
   39387         792 :     if ( bLocalUseExceptions ) {
   39388         250 :       pushErrorHandler();
   39389             :     }
   39390         792 :     {
   39391         792 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39392         792 :       result = (GDALColorInterp)GDALRasterBandShadow_GetColorInterpretation(arg1);
   39393         792 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39394             :     }
   39395         792 :     if ( bLocalUseExceptions ) {
   39396         250 :       popErrorHandler();
   39397             :     }
   39398             : #ifndef SED_HACKS
   39399             :     if ( bLocalUseExceptions ) {
   39400             :       CPLErr eclass = CPLGetLastErrorType();
   39401             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39402             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39403             :       }
   39404             :     }
   39405             : #endif
   39406             :   }
   39407         792 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39408         792 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39409             :   return resultobj;
   39410             : fail:
   39411             :   return NULL;
   39412             : }
   39413             : 
   39414             : 
   39415         182 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39416         182 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39417         182 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39418         182 :   void *argp1 = 0 ;
   39419         182 :   int res1 = 0 ;
   39420         182 :   PyObject *swig_obj[1] ;
   39421         182 :   GDALColorInterp result;
   39422             :   
   39423         182 :   if (!args) SWIG_fail;
   39424         182 :   swig_obj[0] = args;
   39425         182 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39426         182 :   if (!SWIG_IsOK(res1)) {
   39427           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39428             :   }
   39429         182 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39430         182 :   {
   39431         182 :     const int bLocalUseExceptions = GetUseExceptions();
   39432         182 :     if ( bLocalUseExceptions ) {
   39433          64 :       pushErrorHandler();
   39434             :     }
   39435         182 :     {
   39436         182 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39437         182 :       result = (GDALColorInterp)GDALRasterBandShadow_GetRasterColorInterpretation(arg1);
   39438         182 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39439             :     }
   39440         182 :     if ( bLocalUseExceptions ) {
   39441          64 :       popErrorHandler();
   39442             :     }
   39443             : #ifndef SED_HACKS
   39444             :     if ( bLocalUseExceptions ) {
   39445             :       CPLErr eclass = CPLGetLastErrorType();
   39446             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39447             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39448             :       }
   39449             :     }
   39450             : #endif
   39451             :   }
   39452         182 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39453         182 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39454             :   return resultobj;
   39455             : fail:
   39456             :   return NULL;
   39457             : }
   39458             : 
   39459             : 
   39460         669 : SWIGINTERN PyObject *_wrap_Band_SetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39461         669 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39462         669 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39463         669 :   GDALColorInterp arg2 ;
   39464         669 :   void *argp1 = 0 ;
   39465         669 :   int res1 = 0 ;
   39466         669 :   int val2 ;
   39467         669 :   int ecode2 = 0 ;
   39468         669 :   PyObject *swig_obj[2] ;
   39469         669 :   CPLErr result;
   39470             :   
   39471         669 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetColorInterpretation", 2, 2, swig_obj)) SWIG_fail;
   39472         669 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39473         669 :   if (!SWIG_IsOK(res1)) {
   39474           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39475             :   }
   39476         669 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39477         669 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   39478         669 :   if (!SWIG_IsOK(ecode2)) {
   39479           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   39480             :   } 
   39481         669 :   arg2 = static_cast< GDALColorInterp >(val2);
   39482         669 :   {
   39483         669 :     const int bLocalUseExceptions = GetUseExceptions();
   39484         669 :     if ( bLocalUseExceptions ) {
   39485         313 :       pushErrorHandler();
   39486             :     }
   39487         669 :     {
   39488         669 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39489         669 :       result = (CPLErr)GDALRasterBandShadow_SetColorInterpretation(arg1,arg2);
   39490         669 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39491             :     }
   39492         669 :     if ( bLocalUseExceptions ) {
   39493         313 :       popErrorHandler();
   39494             :     }
   39495             : #ifndef SED_HACKS
   39496             :     if ( bLocalUseExceptions ) {
   39497             :       CPLErr eclass = CPLGetLastErrorType();
   39498             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39499             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39500             :       }
   39501             :     }
   39502             : #endif
   39503             :   }
   39504         669 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39505         669 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39506             :   return resultobj;
   39507             : fail:
   39508             :   return NULL;
   39509             : }
   39510             : 
   39511             : 
   39512         409 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39513         409 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39514         409 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39515         409 :   GDALColorInterp arg2 ;
   39516         409 :   void *argp1 = 0 ;
   39517         409 :   int res1 = 0 ;
   39518         409 :   int val2 ;
   39519         409 :   int ecode2 = 0 ;
   39520         409 :   PyObject *swig_obj[2] ;
   39521         409 :   CPLErr result;
   39522             :   
   39523         409 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterColorInterpretation", 2, 2, swig_obj)) SWIG_fail;
   39524         409 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39525         409 :   if (!SWIG_IsOK(res1)) {
   39526           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39527             :   }
   39528         409 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39529         409 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   39530         409 :   if (!SWIG_IsOK(ecode2)) {
   39531           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetRasterColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   39532             :   } 
   39533         409 :   arg2 = static_cast< GDALColorInterp >(val2);
   39534         409 :   {
   39535         409 :     const int bLocalUseExceptions = GetUseExceptions();
   39536         409 :     if ( bLocalUseExceptions ) {
   39537         355 :       pushErrorHandler();
   39538             :     }
   39539         409 :     {
   39540         409 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39541         409 :       result = (CPLErr)GDALRasterBandShadow_SetRasterColorInterpretation(arg1,arg2);
   39542         409 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39543             :     }
   39544         409 :     if ( bLocalUseExceptions ) {
   39545         355 :       popErrorHandler();
   39546             :     }
   39547             : #ifndef SED_HACKS
   39548             :     if ( bLocalUseExceptions ) {
   39549             :       CPLErr eclass = CPLGetLastErrorType();
   39550             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39551             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39552             :       }
   39553             :     }
   39554             : #endif
   39555             :   }
   39556         409 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39557         409 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39558             :   return resultobj;
   39559             : fail:
   39560             :   return NULL;
   39561             : }
   39562             : 
   39563             : 
   39564      410172 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39565      410172 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39566      410172 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39567      410172 :   double *arg2 = (double *) 0 ;
   39568      410172 :   int *arg3 = (int *) 0 ;
   39569      410172 :   void *argp1 = 0 ;
   39570      410172 :   int res1 = 0 ;
   39571      410172 :   double tmpval2 ;
   39572      410172 :   int tmphasval2 ;
   39573      410172 :   PyObject *swig_obj[1] ;
   39574             :   
   39575      410172 :   {
   39576             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   39577      410172 :     arg2 = &tmpval2;
   39578      410172 :     arg3 = &tmphasval2;
   39579             :   }
   39580      410172 :   if (!args) SWIG_fail;
   39581      410172 :   swig_obj[0] = args;
   39582      410172 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39583      410172 :   if (!SWIG_IsOK(res1)) {
   39584           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39585             :   }
   39586      410172 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39587      410172 :   {
   39588      410172 :     const int bLocalUseExceptions = GetUseExceptions();
   39589      410172 :     if ( bLocalUseExceptions ) {
   39590      409985 :       pushErrorHandler();
   39591             :     }
   39592      410172 :     {
   39593      410172 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39594      410172 :       GDALRasterBandShadow_GetNoDataValue(arg1,arg2,arg3);
   39595      410172 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39596             :     }
   39597      410172 :     if ( bLocalUseExceptions ) {
   39598      409985 :       popErrorHandler();
   39599             :     }
   39600             : #ifndef SED_HACKS
   39601             :     if ( bLocalUseExceptions ) {
   39602             :       CPLErr eclass = CPLGetLastErrorType();
   39603             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39604             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39605             :       }
   39606             :     }
   39607             : #endif
   39608             :   }
   39609      410172 :   resultobj = SWIG_Py_Void();
   39610      410172 :   {
   39611             :     /* %typemap(python,argout) (double *val, int *hasval) */
   39612      410172 :     PyObject *r;
   39613      410172 :     if ( !*arg3 ) {
   39614         459 :       Py_INCREF(Py_None);
   39615         459 :       r = Py_None;
   39616             :     }
   39617             :     else {
   39618      409713 :       r = PyFloat_FromDouble( *arg2 );
   39619             :     }
   39620             : #if SWIG_VERSION >= 0x040300
   39621             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   39622             : #else
   39623      410172 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   39624             : #endif
   39625             :   }
   39626      410172 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39627             :   return resultobj;
   39628             : fail:
   39629             :   return NULL;
   39630             : }
   39631             : 
   39632             : 
   39633          27 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39634          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39635          27 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39636          27 :   GIntBig *arg2 = (GIntBig *) 0 ;
   39637          27 :   int *arg3 = (int *) 0 ;
   39638          27 :   void *argp1 = 0 ;
   39639          27 :   int res1 = 0 ;
   39640          27 :   GIntBig tmpval2 ;
   39641          27 :   int tmphasval2 ;
   39642          27 :   PyObject *swig_obj[1] ;
   39643             :   
   39644          27 :   {
   39645             :     /* %typemap(python,in,numinputs=0) (GIntBig *val, int *hasval) */
   39646          27 :     arg2 = &tmpval2;
   39647          27 :     arg3 = &tmphasval2;
   39648             :   }
   39649          27 :   if (!args) SWIG_fail;
   39650          27 :   swig_obj[0] = args;
   39651          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39652          27 :   if (!SWIG_IsOK(res1)) {
   39653           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39654             :   }
   39655          27 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39656          27 :   {
   39657          27 :     const int bLocalUseExceptions = GetUseExceptions();
   39658          27 :     if ( bLocalUseExceptions ) {
   39659          22 :       pushErrorHandler();
   39660             :     }
   39661          27 :     {
   39662          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39663          27 :       GDALRasterBandShadow_GetNoDataValueAsInt64(arg1,arg2,arg3);
   39664          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39665             :     }
   39666          27 :     if ( bLocalUseExceptions ) {
   39667          22 :       popErrorHandler();
   39668             :     }
   39669             : #ifndef SED_HACKS
   39670             :     if ( bLocalUseExceptions ) {
   39671             :       CPLErr eclass = CPLGetLastErrorType();
   39672             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39673             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39674             :       }
   39675             :     }
   39676             : #endif
   39677             :   }
   39678          27 :   resultobj = SWIG_Py_Void();
   39679          27 :   {
   39680             :     /* %typemap(python,argout) (GIntBig *val, int *hasval) */
   39681          27 :     PyObject *r;
   39682          27 :     if ( !*arg3 ) {
   39683          10 :       Py_INCREF(Py_None);
   39684          10 :       r = Py_None;
   39685             :     }
   39686             :     else {
   39687          17 :       r = PyLong_FromLongLong( *arg2 );
   39688             :     }
   39689             : #if SWIG_VERSION >= 0x040300
   39690             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   39691             : #else
   39692          27 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   39693             : #endif
   39694             :   }
   39695          27 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39696             :   return resultobj;
   39697             : fail:
   39698             :   return NULL;
   39699             : }
   39700             : 
   39701             : 
   39702          18 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39703          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39704          18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39705          18 :   GUIntBig *arg2 = (GUIntBig *) 0 ;
   39706          18 :   int *arg3 = (int *) 0 ;
   39707          18 :   void *argp1 = 0 ;
   39708          18 :   int res1 = 0 ;
   39709          18 :   GUIntBig tmpval2 ;
   39710          18 :   int tmphasval2 ;
   39711          18 :   PyObject *swig_obj[1] ;
   39712             :   
   39713          18 :   {
   39714             :     /* %typemap(python,in,numinputs=0) (GUIntBig *val, int *hasval) */
   39715          18 :     arg2 = &tmpval2;
   39716          18 :     arg3 = &tmphasval2;
   39717             :   }
   39718          18 :   if (!args) SWIG_fail;
   39719          18 :   swig_obj[0] = args;
   39720          18 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39721          18 :   if (!SWIG_IsOK(res1)) {
   39722           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39723             :   }
   39724          18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39725          18 :   {
   39726          18 :     const int bLocalUseExceptions = GetUseExceptions();
   39727          18 :     if ( bLocalUseExceptions ) {
   39728          13 :       pushErrorHandler();
   39729             :     }
   39730          18 :     {
   39731          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39732          18 :       GDALRasterBandShadow_GetNoDataValueAsUInt64(arg1,arg2,arg3);
   39733          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39734             :     }
   39735          18 :     if ( bLocalUseExceptions ) {
   39736          13 :       popErrorHandler();
   39737             :     }
   39738             : #ifndef SED_HACKS
   39739             :     if ( bLocalUseExceptions ) {
   39740             :       CPLErr eclass = CPLGetLastErrorType();
   39741             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39742             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39743             :       }
   39744             :     }
   39745             : #endif
   39746             :   }
   39747          18 :   resultobj = SWIG_Py_Void();
   39748          18 :   {
   39749             :     /* %typemap(python,argout) (GUIntBig *val, int *hasval) */
   39750          18 :     PyObject *r;
   39751          18 :     if ( !*arg3 ) {
   39752           4 :       Py_INCREF(Py_None);
   39753           4 :       r = Py_None;
   39754             :     }
   39755             :     else {
   39756          14 :       r = PyLong_FromUnsignedLongLong( *arg2 );
   39757             :     }
   39758             : #if SWIG_VERSION >= 0x040300
   39759             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   39760             : #else
   39761          18 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   39762             : #endif
   39763             :   }
   39764          18 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39765             :   return resultobj;
   39766             : fail:
   39767             :   return NULL;
   39768             : }
   39769             : 
   39770             : 
   39771         572 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39772         572 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39773         572 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39774         572 :   double arg2 ;
   39775         572 :   void *argp1 = 0 ;
   39776         572 :   int res1 = 0 ;
   39777         572 :   double val2 ;
   39778         572 :   int ecode2 = 0 ;
   39779         572 :   PyObject *swig_obj[2] ;
   39780         572 :   CPLErr result;
   39781             :   
   39782         572 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValue", 2, 2, swig_obj)) SWIG_fail;
   39783         572 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39784         572 :   if (!SWIG_IsOK(res1)) {
   39785           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39786             :   }
   39787         572 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39788         572 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   39789         572 :   if (!SWIG_IsOK(ecode2)) {
   39790           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetNoDataValue" "', argument " "2"" of type '" "double""'");
   39791             :   } 
   39792         572 :   arg2 = static_cast< double >(val2);
   39793         572 :   {
   39794         572 :     const int bLocalUseExceptions = GetUseExceptions();
   39795         572 :     if ( bLocalUseExceptions ) {
   39796         411 :       pushErrorHandler();
   39797             :     }
   39798         572 :     {
   39799         572 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39800         572 :       result = (CPLErr)GDALRasterBandShadow_SetNoDataValue(arg1,arg2);
   39801         572 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39802             :     }
   39803         572 :     if ( bLocalUseExceptions ) {
   39804         411 :       popErrorHandler();
   39805             :     }
   39806             : #ifndef SED_HACKS
   39807             :     if ( bLocalUseExceptions ) {
   39808             :       CPLErr eclass = CPLGetLastErrorType();
   39809             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39810             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39811             :       }
   39812             :     }
   39813             : #endif
   39814             :   }
   39815         572 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39816         584 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39817             :   return resultobj;
   39818             : fail:
   39819             :   return NULL;
   39820             : }
   39821             : 
   39822             : 
   39823          17 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39824          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39825          17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39826          17 :   GIntBig arg2 ;
   39827          17 :   void *argp1 = 0 ;
   39828          17 :   int res1 = 0 ;
   39829          17 :   PyObject *swig_obj[2] ;
   39830          17 :   CPLErr result;
   39831             :   
   39832          17 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValueAsInt64", 2, 2, swig_obj)) SWIG_fail;
   39833          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39834          17 :   if (!SWIG_IsOK(res1)) {
   39835           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39836             :   }
   39837          17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39838          17 :   {
   39839          17 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   39840             :   }
   39841          17 :   {
   39842          17 :     const int bLocalUseExceptions = GetUseExceptions();
   39843          17 :     if ( bLocalUseExceptions ) {
   39844           8 :       pushErrorHandler();
   39845             :     }
   39846          17 :     {
   39847          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39848          17 :       result = (CPLErr)GDALRasterBandShadow_SetNoDataValueAsInt64(arg1,arg2);
   39849          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39850             :     }
   39851          17 :     if ( bLocalUseExceptions ) {
   39852           8 :       popErrorHandler();
   39853             :     }
   39854             : #ifndef SED_HACKS
   39855             :     if ( bLocalUseExceptions ) {
   39856             :       CPLErr eclass = CPLGetLastErrorType();
   39857             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39858             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39859             :       }
   39860             :     }
   39861             : #endif
   39862             :   }
   39863          17 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39864          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39865             :   return resultobj;
   39866             : fail:
   39867             :   return NULL;
   39868             : }
   39869             : 
   39870             : 
   39871          16 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39872          16 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39873          16 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39874          16 :   GUIntBig arg2 ;
   39875          16 :   void *argp1 = 0 ;
   39876          16 :   int res1 = 0 ;
   39877          16 :   PyObject *swig_obj[2] ;
   39878          16 :   CPLErr result;
   39879             :   
   39880          16 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValueAsUInt64", 2, 2, swig_obj)) SWIG_fail;
   39881          16 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39882          16 :   if (!SWIG_IsOK(res1)) {
   39883           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39884             :   }
   39885          16 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39886          16 :   {
   39887          16 :     arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
   39888             :   }
   39889          16 :   {
   39890          16 :     const int bLocalUseExceptions = GetUseExceptions();
   39891          16 :     if ( bLocalUseExceptions ) {
   39892           7 :       pushErrorHandler();
   39893             :     }
   39894          16 :     {
   39895          16 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39896          16 :       result = (CPLErr)GDALRasterBandShadow_SetNoDataValueAsUInt64(arg1,arg2);
   39897          16 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39898             :     }
   39899          16 :     if ( bLocalUseExceptions ) {
   39900           7 :       popErrorHandler();
   39901             :     }
   39902             : #ifndef SED_HACKS
   39903             :     if ( bLocalUseExceptions ) {
   39904             :       CPLErr eclass = CPLGetLastErrorType();
   39905             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39906             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39907             :       }
   39908             :     }
   39909             : #endif
   39910             :   }
   39911          16 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39912          16 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39913             :   return resultobj;
   39914             : fail:
   39915             :   return NULL;
   39916             : }
   39917             : 
   39918             : 
   39919          53 : SWIGINTERN PyObject *_wrap_Band_DeleteNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39920          53 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39921          53 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39922          53 :   void *argp1 = 0 ;
   39923          53 :   int res1 = 0 ;
   39924          53 :   PyObject *swig_obj[1] ;
   39925          53 :   CPLErr result;
   39926             :   
   39927          53 :   if (!args) SWIG_fail;
   39928          53 :   swig_obj[0] = args;
   39929          53 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39930          53 :   if (!SWIG_IsOK(res1)) {
   39931           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DeleteNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39932             :   }
   39933          53 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39934          53 :   {
   39935          53 :     const int bLocalUseExceptions = GetUseExceptions();
   39936          53 :     if ( bLocalUseExceptions ) {
   39937          42 :       pushErrorHandler();
   39938             :     }
   39939          53 :     {
   39940          53 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39941          53 :       result = (CPLErr)GDALRasterBandShadow_DeleteNoDataValue(arg1);
   39942          53 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39943             :     }
   39944          53 :     if ( bLocalUseExceptions ) {
   39945          42 :       popErrorHandler();
   39946             :     }
   39947             : #ifndef SED_HACKS
   39948             :     if ( bLocalUseExceptions ) {
   39949             :       CPLErr eclass = CPLGetLastErrorType();
   39950             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39951             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39952             :       }
   39953             :     }
   39954             : #endif
   39955             :   }
   39956          53 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39957          53 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39958             :   return resultobj;
   39959             : fail:
   39960             :   return NULL;
   39961             : }
   39962             : 
   39963             : 
   39964          69 : SWIGINTERN PyObject *_wrap_Band_GetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39965          69 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39966          69 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39967          69 :   void *argp1 = 0 ;
   39968          69 :   int res1 = 0 ;
   39969          69 :   PyObject *swig_obj[1] ;
   39970          69 :   char *result = 0 ;
   39971             :   
   39972          69 :   if (!args) SWIG_fail;
   39973          69 :   swig_obj[0] = args;
   39974          69 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39975          69 :   if (!SWIG_IsOK(res1)) {
   39976           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39977             :   }
   39978          69 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39979          69 :   {
   39980          69 :     const int bLocalUseExceptions = GetUseExceptions();
   39981          69 :     if ( bLocalUseExceptions ) {
   39982          38 :       pushErrorHandler();
   39983             :     }
   39984          69 :     {
   39985          69 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39986          69 :       result = (char *)GDALRasterBandShadow_GetUnitType(arg1);
   39987          69 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39988             :     }
   39989          69 :     if ( bLocalUseExceptions ) {
   39990          38 :       popErrorHandler();
   39991             :     }
   39992             : #ifndef SED_HACKS
   39993             :     if ( bLocalUseExceptions ) {
   39994             :       CPLErr eclass = CPLGetLastErrorType();
   39995             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39996             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39997             :       }
   39998             :     }
   39999             : #endif
   40000             :   }
   40001          69 :   resultobj = SWIG_FromCharPtr((const char *)result);
   40002          69 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40003             :   return resultobj;
   40004             : fail:
   40005             :   return NULL;
   40006             : }
   40007             : 
   40008             : 
   40009          27 : SWIGINTERN PyObject *_wrap_Band_SetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40010          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40011          27 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40012          27 :   char *arg2 = (char *) 0 ;
   40013          27 :   void *argp1 = 0 ;
   40014          27 :   int res1 = 0 ;
   40015          27 :   int res2 ;
   40016          27 :   char *buf2 = 0 ;
   40017          27 :   int alloc2 = 0 ;
   40018          27 :   PyObject *swig_obj[2] ;
   40019          27 :   CPLErr result;
   40020             :   
   40021          27 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetUnitType", 2, 2, swig_obj)) SWIG_fail;
   40022          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40023          27 :   if (!SWIG_IsOK(res1)) {
   40024           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40025             :   }
   40026          27 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40027          27 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   40028          27 :   if (!SWIG_IsOK(res2)) {
   40029           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetUnitType" "', argument " "2"" of type '" "char const *""'");
   40030             :   }
   40031          27 :   arg2 = reinterpret_cast< char * >(buf2);
   40032          27 :   {
   40033          27 :     const int bLocalUseExceptions = GetUseExceptions();
   40034          27 :     if ( bLocalUseExceptions ) {
   40035          18 :       pushErrorHandler();
   40036             :     }
   40037          27 :     {
   40038          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40039          27 :       result = (CPLErr)GDALRasterBandShadow_SetUnitType(arg1,(char const *)arg2);
   40040          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40041             :     }
   40042          27 :     if ( bLocalUseExceptions ) {
   40043          18 :       popErrorHandler();
   40044             :     }
   40045             : #ifndef SED_HACKS
   40046             :     if ( bLocalUseExceptions ) {
   40047             :       CPLErr eclass = CPLGetLastErrorType();
   40048             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40049             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40050             :       }
   40051             :     }
   40052             : #endif
   40053             :   }
   40054          27 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40055          27 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   40056          27 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40057             :   return resultobj;
   40058           0 : fail:
   40059           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   40060             :   return NULL;
   40061             : }
   40062             : 
   40063             : 
   40064          17 : SWIGINTERN PyObject *_wrap_Band_GetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40065          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40066          17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40067          17 :   void *argp1 = 0 ;
   40068          17 :   int res1 = 0 ;
   40069          17 :   PyObject *swig_obj[1] ;
   40070          17 :   char **result = 0 ;
   40071             :   
   40072          17 :   if (!args) SWIG_fail;
   40073          17 :   swig_obj[0] = args;
   40074          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40075          17 :   if (!SWIG_IsOK(res1)) {
   40076           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40077             :   }
   40078          17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40079          17 :   {
   40080          17 :     const int bLocalUseExceptions = GetUseExceptions();
   40081          17 :     if ( bLocalUseExceptions ) {
   40082           0 :       pushErrorHandler();
   40083             :     }
   40084          17 :     {
   40085          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40086          17 :       result = (char **)GDALRasterBandShadow_GetRasterCategoryNames(arg1);
   40087          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40088             :     }
   40089          17 :     if ( bLocalUseExceptions ) {
   40090           0 :       popErrorHandler();
   40091             :     }
   40092             : #ifndef SED_HACKS
   40093             :     if ( bLocalUseExceptions ) {
   40094             :       CPLErr eclass = CPLGetLastErrorType();
   40095             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40096             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40097             :       }
   40098             :     }
   40099             : #endif
   40100             :   }
   40101          17 :   {
   40102             :     /* %typemap(out) char **options -> ( string ) */
   40103          17 :     bool bErr = false;
   40104          17 :     resultobj = CSLToList(result, &bErr);
   40105          17 :     if( bErr ) {
   40106           0 :       SWIG_fail;
   40107             :     }
   40108             :   }
   40109          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40110             :   return resultobj;
   40111             : fail:
   40112             :   return NULL;
   40113             : }
   40114             : 
   40115             : 
   40116           0 : SWIGINTERN PyObject *_wrap_Band_SetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40117           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40118           0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40119           0 :   char **arg2 = (char **) 0 ;
   40120           0 :   void *argp1 = 0 ;
   40121           0 :   int res1 = 0 ;
   40122           0 :   PyObject *swig_obj[2] ;
   40123           0 :   CPLErr result;
   40124             :   
   40125           0 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterCategoryNames", 2, 2, swig_obj)) SWIG_fail;
   40126           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40127           0 :   if (!SWIG_IsOK(res1)) {
   40128           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40129             :   }
   40130           0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40131           0 :   {
   40132             :     /* %typemap(in) char **dict */
   40133           0 :     arg2 = NULL;
   40134           0 :     if ( PySequence_Check( swig_obj[1] ) ) {
   40135           0 :       int bErr = FALSE;
   40136           0 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   40137           0 :       if ( bErr )
   40138             :       {
   40139           0 :         SWIG_fail;
   40140             :       }
   40141             :     }
   40142           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   40143           0 :       int bErr = FALSE;
   40144           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   40145           0 :       if ( bErr )
   40146             :       {
   40147           0 :         SWIG_fail;
   40148             :       }
   40149             :     }
   40150             :     else {
   40151           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   40152           0 :       SWIG_fail;
   40153             :     }
   40154             :   }
   40155           0 :   {
   40156           0 :     const int bLocalUseExceptions = GetUseExceptions();
   40157           0 :     if ( bLocalUseExceptions ) {
   40158           0 :       pushErrorHandler();
   40159             :     }
   40160           0 :     {
   40161           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40162           0 :       result = (CPLErr)GDALRasterBandShadow_SetRasterCategoryNames(arg1,arg2);
   40163           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40164             :     }
   40165           0 :     if ( bLocalUseExceptions ) {
   40166           0 :       popErrorHandler();
   40167             :     }
   40168             : #ifndef SED_HACKS
   40169             :     if ( bLocalUseExceptions ) {
   40170             :       CPLErr eclass = CPLGetLastErrorType();
   40171             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40172             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40173             :       }
   40174             :     }
   40175             : #endif
   40176             :   }
   40177           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40178           0 :   {
   40179             :     /* %typemap(freearg) char **dict */
   40180           0 :     CSLDestroy( arg2 );
   40181             :   }
   40182           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40183             :   return resultobj;
   40184           0 : fail:
   40185           0 :   {
   40186             :     /* %typemap(freearg) char **dict */
   40187           0 :     CSLDestroy( arg2 );
   40188             :   }
   40189             :   return NULL;
   40190             : }
   40191             : 
   40192             : 
   40193          62 : SWIGINTERN PyObject *_wrap_Band_GetMinimum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40194          62 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40195          62 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40196          62 :   double *arg2 = (double *) 0 ;
   40197          62 :   int *arg3 = (int *) 0 ;
   40198          62 :   void *argp1 = 0 ;
   40199          62 :   int res1 = 0 ;
   40200          62 :   double tmpval2 ;
   40201          62 :   int tmphasval2 ;
   40202          62 :   PyObject *swig_obj[1] ;
   40203             :   
   40204          62 :   {
   40205             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40206          62 :     arg2 = &tmpval2;
   40207          62 :     arg3 = &tmphasval2;
   40208             :   }
   40209          62 :   if (!args) SWIG_fail;
   40210          62 :   swig_obj[0] = args;
   40211          62 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40212          62 :   if (!SWIG_IsOK(res1)) {
   40213           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMinimum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40214             :   }
   40215          62 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40216          62 :   {
   40217          62 :     const int bLocalUseExceptions = GetUseExceptions();
   40218          62 :     if ( bLocalUseExceptions ) {
   40219          26 :       pushErrorHandler();
   40220             :     }
   40221          62 :     {
   40222          62 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40223          62 :       GDALRasterBandShadow_GetMinimum(arg1,arg2,arg3);
   40224          62 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40225             :     }
   40226          62 :     if ( bLocalUseExceptions ) {
   40227          26 :       popErrorHandler();
   40228             :     }
   40229             : #ifndef SED_HACKS
   40230             :     if ( bLocalUseExceptions ) {
   40231             :       CPLErr eclass = CPLGetLastErrorType();
   40232             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40233             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40234             :       }
   40235             :     }
   40236             : #endif
   40237             :   }
   40238          62 :   resultobj = SWIG_Py_Void();
   40239          62 :   {
   40240             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40241          62 :     PyObject *r;
   40242          62 :     if ( !*arg3 ) {
   40243          27 :       Py_INCREF(Py_None);
   40244          27 :       r = Py_None;
   40245             :     }
   40246             :     else {
   40247          35 :       r = PyFloat_FromDouble( *arg2 );
   40248             :     }
   40249             : #if SWIG_VERSION >= 0x040300
   40250             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40251             : #else
   40252          62 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40253             : #endif
   40254             :   }
   40255          62 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40256             :   return resultobj;
   40257             : fail:
   40258             :   return NULL;
   40259             : }
   40260             : 
   40261             : 
   40262          52 : SWIGINTERN PyObject *_wrap_Band_GetMaximum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40263          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40264          52 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40265          52 :   double *arg2 = (double *) 0 ;
   40266          52 :   int *arg3 = (int *) 0 ;
   40267          52 :   void *argp1 = 0 ;
   40268          52 :   int res1 = 0 ;
   40269          52 :   double tmpval2 ;
   40270          52 :   int tmphasval2 ;
   40271          52 :   PyObject *swig_obj[1] ;
   40272             :   
   40273          52 :   {
   40274             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40275          52 :     arg2 = &tmpval2;
   40276          52 :     arg3 = &tmphasval2;
   40277             :   }
   40278          52 :   if (!args) SWIG_fail;
   40279          52 :   swig_obj[0] = args;
   40280          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40281          52 :   if (!SWIG_IsOK(res1)) {
   40282           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaximum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40283             :   }
   40284          52 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40285          52 :   {
   40286          52 :     const int bLocalUseExceptions = GetUseExceptions();
   40287          52 :     if ( bLocalUseExceptions ) {
   40288          22 :       pushErrorHandler();
   40289             :     }
   40290          52 :     {
   40291          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40292          52 :       GDALRasterBandShadow_GetMaximum(arg1,arg2,arg3);
   40293          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40294             :     }
   40295          52 :     if ( bLocalUseExceptions ) {
   40296          22 :       popErrorHandler();
   40297             :     }
   40298             : #ifndef SED_HACKS
   40299             :     if ( bLocalUseExceptions ) {
   40300             :       CPLErr eclass = CPLGetLastErrorType();
   40301             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40302             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40303             :       }
   40304             :     }
   40305             : #endif
   40306             :   }
   40307          52 :   resultobj = SWIG_Py_Void();
   40308          52 :   {
   40309             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40310          52 :     PyObject *r;
   40311          52 :     if ( !*arg3 ) {
   40312          24 :       Py_INCREF(Py_None);
   40313          24 :       r = Py_None;
   40314             :     }
   40315             :     else {
   40316          28 :       r = PyFloat_FromDouble( *arg2 );
   40317             :     }
   40318             : #if SWIG_VERSION >= 0x040300
   40319             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40320             : #else
   40321          52 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40322             : #endif
   40323             :   }
   40324          52 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40325             :   return resultobj;
   40326             : fail:
   40327             :   return NULL;
   40328             : }
   40329             : 
   40330             : 
   40331         151 : SWIGINTERN PyObject *_wrap_Band_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40332         151 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40333         151 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40334         151 :   double *arg2 = (double *) 0 ;
   40335         151 :   int *arg3 = (int *) 0 ;
   40336         151 :   void *argp1 = 0 ;
   40337         151 :   int res1 = 0 ;
   40338         151 :   double tmpval2 ;
   40339         151 :   int tmphasval2 ;
   40340         151 :   PyObject *swig_obj[1] ;
   40341             :   
   40342         151 :   {
   40343             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40344         151 :     arg2 = &tmpval2;
   40345         151 :     arg3 = &tmphasval2;
   40346             :   }
   40347         151 :   if (!args) SWIG_fail;
   40348         151 :   swig_obj[0] = args;
   40349         151 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40350         151 :   if (!SWIG_IsOK(res1)) {
   40351           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40352             :   }
   40353         151 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40354         151 :   {
   40355         151 :     const int bLocalUseExceptions = GetUseExceptions();
   40356         151 :     if ( bLocalUseExceptions ) {
   40357          98 :       pushErrorHandler();
   40358             :     }
   40359         151 :     {
   40360         151 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40361         151 :       GDALRasterBandShadow_GetOffset(arg1,arg2,arg3);
   40362         151 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40363             :     }
   40364         151 :     if ( bLocalUseExceptions ) {
   40365          98 :       popErrorHandler();
   40366             :     }
   40367             : #ifndef SED_HACKS
   40368             :     if ( bLocalUseExceptions ) {
   40369             :       CPLErr eclass = CPLGetLastErrorType();
   40370             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40371             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40372             :       }
   40373             :     }
   40374             : #endif
   40375             :   }
   40376         151 :   resultobj = SWIG_Py_Void();
   40377         151 :   {
   40378             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40379         151 :     PyObject *r;
   40380         151 :     if ( !*arg3 ) {
   40381          47 :       Py_INCREF(Py_None);
   40382          47 :       r = Py_None;
   40383             :     }
   40384             :     else {
   40385         104 :       r = PyFloat_FromDouble( *arg2 );
   40386             :     }
   40387             : #if SWIG_VERSION >= 0x040300
   40388             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40389             : #else
   40390         151 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40391             : #endif
   40392             :   }
   40393         151 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40394             :   return resultobj;
   40395             : fail:
   40396             :   return NULL;
   40397             : }
   40398             : 
   40399             : 
   40400         149 : SWIGINTERN PyObject *_wrap_Band_GetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40401         149 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40402         149 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40403         149 :   double *arg2 = (double *) 0 ;
   40404         149 :   int *arg3 = (int *) 0 ;
   40405         149 :   void *argp1 = 0 ;
   40406         149 :   int res1 = 0 ;
   40407         149 :   double tmpval2 ;
   40408         149 :   int tmphasval2 ;
   40409         149 :   PyObject *swig_obj[1] ;
   40410             :   
   40411         149 :   {
   40412             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40413         149 :     arg2 = &tmpval2;
   40414         149 :     arg3 = &tmphasval2;
   40415             :   }
   40416         149 :   if (!args) SWIG_fail;
   40417         149 :   swig_obj[0] = args;
   40418         149 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40419         149 :   if (!SWIG_IsOK(res1)) {
   40420           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40421             :   }
   40422         149 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40423         149 :   {
   40424         149 :     const int bLocalUseExceptions = GetUseExceptions();
   40425         149 :     if ( bLocalUseExceptions ) {
   40426          97 :       pushErrorHandler();
   40427             :     }
   40428         149 :     {
   40429         149 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40430         149 :       GDALRasterBandShadow_GetScale(arg1,arg2,arg3);
   40431         149 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40432             :     }
   40433         149 :     if ( bLocalUseExceptions ) {
   40434          97 :       popErrorHandler();
   40435             :     }
   40436             : #ifndef SED_HACKS
   40437             :     if ( bLocalUseExceptions ) {
   40438             :       CPLErr eclass = CPLGetLastErrorType();
   40439             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40440             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40441             :       }
   40442             :     }
   40443             : #endif
   40444             :   }
   40445         149 :   resultobj = SWIG_Py_Void();
   40446         149 :   {
   40447             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40448         149 :     PyObject *r;
   40449         149 :     if ( !*arg3 ) {
   40450          47 :       Py_INCREF(Py_None);
   40451          47 :       r = Py_None;
   40452             :     }
   40453             :     else {
   40454         102 :       r = PyFloat_FromDouble( *arg2 );
   40455             :     }
   40456             : #if SWIG_VERSION >= 0x040300
   40457             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40458             : #else
   40459         149 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40460             : #endif
   40461             :   }
   40462         149 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40463             :   return resultobj;
   40464             : fail:
   40465             :   return NULL;
   40466             : }
   40467             : 
   40468             : 
   40469          75 : SWIGINTERN PyObject *_wrap_Band_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40470          75 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40471          75 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40472          75 :   double arg2 ;
   40473          75 :   void *argp1 = 0 ;
   40474          75 :   int res1 = 0 ;
   40475          75 :   double val2 ;
   40476          75 :   int ecode2 = 0 ;
   40477          75 :   PyObject *swig_obj[2] ;
   40478          75 :   CPLErr result;
   40479             :   
   40480          75 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetOffset", 2, 2, swig_obj)) SWIG_fail;
   40481          75 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40482          75 :   if (!SWIG_IsOK(res1)) {
   40483           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40484             :   }
   40485          75 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40486          75 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   40487          75 :   if (!SWIG_IsOK(ecode2)) {
   40488           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetOffset" "', argument " "2"" of type '" "double""'");
   40489             :   } 
   40490          75 :   arg2 = static_cast< double >(val2);
   40491          75 :   {
   40492          75 :     const int bLocalUseExceptions = GetUseExceptions();
   40493          75 :     if ( bLocalUseExceptions ) {
   40494          64 :       pushErrorHandler();
   40495             :     }
   40496          75 :     {
   40497          75 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40498          75 :       result = (CPLErr)GDALRasterBandShadow_SetOffset(arg1,arg2);
   40499          75 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40500             :     }
   40501          75 :     if ( bLocalUseExceptions ) {
   40502          64 :       popErrorHandler();
   40503             :     }
   40504             : #ifndef SED_HACKS
   40505             :     if ( bLocalUseExceptions ) {
   40506             :       CPLErr eclass = CPLGetLastErrorType();
   40507             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40508             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40509             :       }
   40510             :     }
   40511             : #endif
   40512             :   }
   40513          75 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40514          75 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40515             :   return resultobj;
   40516             : fail:
   40517             :   return NULL;
   40518             : }
   40519             : 
   40520             : 
   40521          76 : SWIGINTERN PyObject *_wrap_Band_SetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40522          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40523          76 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40524          76 :   double arg2 ;
   40525          76 :   void *argp1 = 0 ;
   40526          76 :   int res1 = 0 ;
   40527          76 :   double val2 ;
   40528          76 :   int ecode2 = 0 ;
   40529          76 :   PyObject *swig_obj[2] ;
   40530          76 :   CPLErr result;
   40531             :   
   40532          76 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetScale", 2, 2, swig_obj)) SWIG_fail;
   40533          76 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40534          76 :   if (!SWIG_IsOK(res1)) {
   40535           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40536             :   }
   40537          76 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40538          76 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   40539          76 :   if (!SWIG_IsOK(ecode2)) {
   40540           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetScale" "', argument " "2"" of type '" "double""'");
   40541             :   } 
   40542          76 :   arg2 = static_cast< double >(val2);
   40543          76 :   {
   40544          76 :     const int bLocalUseExceptions = GetUseExceptions();
   40545          76 :     if ( bLocalUseExceptions ) {
   40546          64 :       pushErrorHandler();
   40547             :     }
   40548          76 :     {
   40549          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40550          76 :       result = (CPLErr)GDALRasterBandShadow_SetScale(arg1,arg2);
   40551          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40552             :     }
   40553          76 :     if ( bLocalUseExceptions ) {
   40554          64 :       popErrorHandler();
   40555             :     }
   40556             : #ifndef SED_HACKS
   40557             :     if ( bLocalUseExceptions ) {
   40558             :       CPLErr eclass = CPLGetLastErrorType();
   40559             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40560             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40561             :       }
   40562             :     }
   40563             : #endif
   40564             :   }
   40565          76 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40566          76 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40567             :   return resultobj;
   40568             : fail:
   40569             :   return NULL;
   40570             : }
   40571             : 
   40572             : 
   40573         112 : SWIGINTERN PyObject *_wrap_Band_GetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40574         112 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40575         112 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40576         112 :   int arg2 ;
   40577         112 :   int arg3 ;
   40578         112 :   double *arg4 = (double *) 0 ;
   40579         112 :   double *arg5 = (double *) 0 ;
   40580         112 :   double *arg6 = (double *) 0 ;
   40581         112 :   double *arg7 = (double *) 0 ;
   40582         112 :   void *argp1 = 0 ;
   40583         112 :   int res1 = 0 ;
   40584         112 :   int val2 ;
   40585         112 :   int ecode2 = 0 ;
   40586         112 :   int val3 ;
   40587         112 :   int ecode3 = 0 ;
   40588         112 :   double temp4 ;
   40589         112 :   int res4 = SWIG_TMPOBJ ;
   40590         112 :   double temp5 ;
   40591         112 :   int res5 = SWIG_TMPOBJ ;
   40592         112 :   double temp6 ;
   40593         112 :   int res6 = SWIG_TMPOBJ ;
   40594         112 :   double temp7 ;
   40595         112 :   int res7 = SWIG_TMPOBJ ;
   40596         112 :   PyObject *swig_obj[3] ;
   40597         112 :   CPLErr result;
   40598             :   
   40599         112 :   arg4 = &temp4;
   40600         112 :   arg5 = &temp5;
   40601         112 :   arg6 = &temp6;
   40602         112 :   arg7 = &temp7;
   40603         112 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetStatistics", 3, 3, swig_obj)) SWIG_fail;
   40604         112 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40605         112 :   if (!SWIG_IsOK(res1)) {
   40606           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40607             :   }
   40608         112 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40609         112 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   40610         112 :   if (!SWIG_IsOK(ecode2)) {
   40611           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetStatistics" "', argument " "2"" of type '" "int""'");
   40612             :   } 
   40613         112 :   arg2 = static_cast< int >(val2);
   40614         112 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   40615         112 :   if (!SWIG_IsOK(ecode3)) {
   40616           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetStatistics" "', argument " "3"" of type '" "int""'");
   40617             :   } 
   40618         112 :   arg3 = static_cast< int >(val3);
   40619         112 :   {
   40620         112 :     const int bLocalUseExceptions = GetUseExceptions();
   40621         112 :     if ( bLocalUseExceptions ) {
   40622          80 :       pushErrorHandler();
   40623             :     }
   40624         112 :     {
   40625         112 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40626         112 :       result = (CPLErr)GDALRasterBandShadow_GetStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   40627         112 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40628             :     }
   40629         112 :     if ( bLocalUseExceptions ) {
   40630          80 :       popErrorHandler();
   40631             :     }
   40632             : #ifndef SED_HACKS
   40633             :     if ( bLocalUseExceptions ) {
   40634             :       CPLErr eclass = CPLGetLastErrorType();
   40635             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40636             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40637             :       }
   40638             :     }
   40639             : #endif
   40640             :   }
   40641         112 :   {
   40642             :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   40643             :   }
   40644         112 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   40645         112 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   40646             :   } else {
   40647           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   40648           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   40649             :   }
   40650         112 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   40651         112 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   40652             :   } else {
   40653           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   40654           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   40655             :   }
   40656         112 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   40657         112 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   40658             :   } else {
   40659           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   40660           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   40661             :   }
   40662         112 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   40663         112 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   40664             :   } else {
   40665           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   40666           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   40667             :   }
   40668         112 :   {
   40669             :     /* %typemap(ret) IF_ERROR_RETURN_NONE */
   40670         112 :     if (result != CE_None ) {
   40671          29 :       Py_XDECREF( resultobj );
   40672          29 :       resultobj = Py_None;
   40673          29 :       Py_INCREF(resultobj);
   40674             :     }
   40675             :   }
   40676         116 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40677             :   return resultobj;
   40678             : fail:
   40679             :   return NULL;
   40680             : }
   40681             : 
   40682             : 
   40683         154 : SWIGINTERN PyObject *_wrap_Band_ComputeStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   40684         154 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40685         154 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40686         154 :   bool arg2 ;
   40687         154 :   double *arg3 = (double *) 0 ;
   40688         154 :   double *arg4 = (double *) 0 ;
   40689         154 :   double *arg5 = (double *) 0 ;
   40690         154 :   double *arg6 = (double *) 0 ;
   40691         154 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   40692         154 :   void *arg8 = (void *) NULL ;
   40693         154 :   void *argp1 = 0 ;
   40694         154 :   int res1 = 0 ;
   40695         154 :   bool val2 ;
   40696         154 :   int ecode2 = 0 ;
   40697         154 :   double temp3 ;
   40698         154 :   int res3 = SWIG_TMPOBJ ;
   40699         154 :   double temp4 ;
   40700         154 :   int res4 = SWIG_TMPOBJ ;
   40701         154 :   double temp5 ;
   40702         154 :   int res5 = SWIG_TMPOBJ ;
   40703         154 :   double temp6 ;
   40704         154 :   int res6 = SWIG_TMPOBJ ;
   40705         154 :   PyObject * obj0 = 0 ;
   40706         154 :   PyObject * obj1 = 0 ;
   40707         154 :   PyObject * obj2 = 0 ;
   40708         154 :   PyObject * obj3 = 0 ;
   40709         154 :   char * kwnames[] = {
   40710             :     (char *)"self",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  NULL 
   40711             :   };
   40712         154 :   CPLErr result;
   40713             :   
   40714             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   40715         154 :   PyProgressData *psProgressInfo;
   40716         154 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   40717         154 :   psProgressInfo->nLastReported = -1;
   40718         154 :   psProgressInfo->psPyCallback = NULL;
   40719         154 :   psProgressInfo->psPyCallbackData = NULL;
   40720         154 :   arg8 = psProgressInfo;
   40721         154 :   arg3 = &temp3;
   40722         154 :   arg4 = &temp4;
   40723         154 :   arg5 = &temp5;
   40724         154 :   arg6 = &temp6;
   40725         154 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Band_ComputeStatistics", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   40726         154 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40727         154 :   if (!SWIG_IsOK(res1)) {
   40728           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40729             :   }
   40730         154 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40731         154 :   ecode2 = SWIG_AsVal_bool(obj1, &val2);
   40732         154 :   if (!SWIG_IsOK(ecode2)) {
   40733           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
   40734             :   } 
   40735         154 :   arg2 = static_cast< bool >(val2);
   40736         154 :   if (obj2) {
   40737           3 :     {
   40738             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   40739             :       /* callback_func typemap */
   40740             :       
   40741             :       /* In some cases 0 is passed instead of None. */
   40742             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   40743           3 :       if ( PyLong_Check(obj2) || PyInt_Check(obj2) )
   40744             :       {
   40745           0 :         if( PyLong_AsLong(obj2) == 0 )
   40746             :         {
   40747           0 :           obj2 = Py_None;
   40748             :         }
   40749             :       }
   40750             :       
   40751           3 :       if (obj2 && obj2 != Py_None ) {
   40752           3 :         void* cbfunction = NULL;
   40753           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj2,
   40754             :             (void**)&cbfunction,
   40755             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   40756             :             SWIG_POINTER_EXCEPTION | 0 ));
   40757             :         
   40758           3 :         if ( cbfunction == GDALTermProgress ) {
   40759             :           arg7 = GDALTermProgress;
   40760             :         } else {
   40761           3 :           if (!PyCallable_Check(obj2)) {
   40762           0 :             PyErr_SetString( PyExc_RuntimeError,
   40763             :               "Object given is not a Python function" );
   40764           0 :             SWIG_fail;
   40765             :           }
   40766           3 :           psProgressInfo->psPyCallback = obj2;
   40767           3 :           arg7 = PyProgressProxy;
   40768             :         }
   40769             :         
   40770             :       }
   40771             :       
   40772             :     }
   40773             :   }
   40774         154 :   if (obj3) {
   40775           3 :     {
   40776             :       /* %typemap(in) ( void* callback_data=NULL)  */
   40777           3 :       psProgressInfo->psPyCallbackData = obj3 ;
   40778             :     }
   40779             :   }
   40780         154 :   {
   40781         154 :     const int bLocalUseExceptions = GetUseExceptions();
   40782         154 :     if ( bLocalUseExceptions ) {
   40783          69 :       pushErrorHandler();
   40784             :     }
   40785         154 :     {
   40786         154 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40787         154 :       result = (CPLErr)GDALRasterBandShadow_ComputeStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   40788         154 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40789             :     }
   40790         154 :     if ( bLocalUseExceptions ) {
   40791          69 :       popErrorHandler();
   40792             :     }
   40793             : #ifndef SED_HACKS
   40794             :     if ( bLocalUseExceptions ) {
   40795             :       CPLErr eclass = CPLGetLastErrorType();
   40796             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40797             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40798             :       }
   40799             :     }
   40800             : #endif
   40801             :   }
   40802         154 :   {
   40803             :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   40804             :   }
   40805         154 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   40806         154 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   40807             :   } else {
   40808           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   40809           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   40810             :   }
   40811         154 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   40812         154 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   40813             :   } else {
   40814           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   40815           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   40816             :   }
   40817         154 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   40818         154 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   40819             :   } else {
   40820           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   40821           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   40822             :   }
   40823         154 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   40824         154 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   40825             :   } else {
   40826           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   40827           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   40828             :   }
   40829         154 :   {
   40830             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   40831             :     
   40832         154 :     CPLFree(psProgressInfo);
   40833             :     
   40834             :   }
   40835         154 :   {
   40836             :     /* %typemap(ret) IF_ERROR_RETURN_NONE */
   40837         154 :     if (result != CE_None ) {
   40838           1 :       Py_XDECREF( resultobj );
   40839           1 :       resultobj = Py_None;
   40840           1 :       Py_INCREF(resultobj);
   40841             :     }
   40842             :   }
   40843         154 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40844             :   return resultobj;
   40845           0 : fail:
   40846           0 :   {
   40847             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   40848             :     
   40849           0 :     CPLFree(psProgressInfo);
   40850             :     
   40851             :   }
   40852             :   return NULL;
   40853             : }
   40854             : 
   40855             : 
   40856           2 : SWIGINTERN PyObject *_wrap_Band_SetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40857           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40858           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40859           2 :   double arg2 ;
   40860           2 :   double arg3 ;
   40861           2 :   double arg4 ;
   40862           2 :   double arg5 ;
   40863           2 :   void *argp1 = 0 ;
   40864           2 :   int res1 = 0 ;
   40865           2 :   double val2 ;
   40866           2 :   int ecode2 = 0 ;
   40867           2 :   double val3 ;
   40868           2 :   int ecode3 = 0 ;
   40869           2 :   double val4 ;
   40870           2 :   int ecode4 = 0 ;
   40871           2 :   double val5 ;
   40872           2 :   int ecode5 = 0 ;
   40873           2 :   PyObject *swig_obj[5] ;
   40874           2 :   CPLErr result;
   40875             :   
   40876           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetStatistics", 5, 5, swig_obj)) SWIG_fail;
   40877           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40878           2 :   if (!SWIG_IsOK(res1)) {
   40879           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40880             :   }
   40881           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40882           2 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   40883           2 :   if (!SWIG_IsOK(ecode2)) {
   40884           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetStatistics" "', argument " "2"" of type '" "double""'");
   40885             :   } 
   40886           2 :   arg2 = static_cast< double >(val2);
   40887           2 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   40888           2 :   if (!SWIG_IsOK(ecode3)) {
   40889           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetStatistics" "', argument " "3"" of type '" "double""'");
   40890             :   } 
   40891           2 :   arg3 = static_cast< double >(val3);
   40892           2 :   ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   40893           2 :   if (!SWIG_IsOK(ecode4)) {
   40894           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_SetStatistics" "', argument " "4"" of type '" "double""'");
   40895             :   } 
   40896           2 :   arg4 = static_cast< double >(val4);
   40897           2 :   ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   40898           2 :   if (!SWIG_IsOK(ecode5)) {
   40899           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_SetStatistics" "', argument " "5"" of type '" "double""'");
   40900             :   } 
   40901           2 :   arg5 = static_cast< double >(val5);
   40902           2 :   {
   40903           2 :     const int bLocalUseExceptions = GetUseExceptions();
   40904           2 :     if ( bLocalUseExceptions ) {
   40905           2 :       pushErrorHandler();
   40906             :     }
   40907           2 :     {
   40908           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40909           2 :       result = (CPLErr)GDALRasterBandShadow_SetStatistics(arg1,arg2,arg3,arg4,arg5);
   40910           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40911             :     }
   40912           2 :     if ( bLocalUseExceptions ) {
   40913           2 :       popErrorHandler();
   40914             :     }
   40915             : #ifndef SED_HACKS
   40916             :     if ( bLocalUseExceptions ) {
   40917             :       CPLErr eclass = CPLGetLastErrorType();
   40918             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40919             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40920             :       }
   40921             :     }
   40922             : #endif
   40923             :   }
   40924           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40925           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40926             :   return resultobj;
   40927             : fail:
   40928             :   return NULL;
   40929             : }
   40930             : 
   40931             : 
   40932         524 : SWIGINTERN PyObject *_wrap_Band_GetOverviewCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40933         524 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40934         524 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40935         524 :   void *argp1 = 0 ;
   40936         524 :   int res1 = 0 ;
   40937         524 :   PyObject *swig_obj[1] ;
   40938         524 :   int result;
   40939             :   
   40940         524 :   if (!args) SWIG_fail;
   40941         524 :   swig_obj[0] = args;
   40942         524 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40943         524 :   if (!SWIG_IsOK(res1)) {
   40944           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverviewCount" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40945             :   }
   40946         524 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40947         524 :   {
   40948         524 :     const int bLocalUseExceptions = GetUseExceptions();
   40949         524 :     if ( bLocalUseExceptions ) {
   40950         331 :       pushErrorHandler();
   40951             :     }
   40952         524 :     {
   40953         524 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40954         524 :       result = (int)GDALRasterBandShadow_GetOverviewCount(arg1);
   40955         524 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40956             :     }
   40957         524 :     if ( bLocalUseExceptions ) {
   40958         331 :       popErrorHandler();
   40959             :     }
   40960             : #ifndef SED_HACKS
   40961             :     if ( bLocalUseExceptions ) {
   40962             :       CPLErr eclass = CPLGetLastErrorType();
   40963             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40964             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40965             :       }
   40966             :     }
   40967             : #endif
   40968             :   }
   40969         524 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40970         534 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40971             :   return resultobj;
   40972             : fail:
   40973             :   return NULL;
   40974             : }
   40975             : 
   40976             : 
   40977        5600 : SWIGINTERN PyObject *_wrap_Band_GetOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40978        5600 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40979        5600 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40980        5600 :   int arg2 ;
   40981        5600 :   void *argp1 = 0 ;
   40982        5600 :   int res1 = 0 ;
   40983        5600 :   int val2 ;
   40984        5600 :   int ecode2 = 0 ;
   40985        5600 :   PyObject *swig_obj[2] ;
   40986        5600 :   GDALRasterBandShadow *result = 0 ;
   40987             :   
   40988        5600 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetOverview", 2, 2, swig_obj)) SWIG_fail;
   40989        5600 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40990        5600 :   if (!SWIG_IsOK(res1)) {
   40991           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40992             :   }
   40993        5600 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40994        5600 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   40995        5600 :   if (!SWIG_IsOK(ecode2)) {
   40996           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetOverview" "', argument " "2"" of type '" "int""'");
   40997             :   } 
   40998        5600 :   arg2 = static_cast< int >(val2);
   40999        5600 :   {
   41000        5600 :     const int bLocalUseExceptions = GetUseExceptions();
   41001        5600 :     if ( bLocalUseExceptions ) {
   41002        4580 :       pushErrorHandler();
   41003             :     }
   41004        5600 :     {
   41005        5600 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41006        5600 :       result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetOverview(arg1,arg2);
   41007        5600 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41008             :     }
   41009        5600 :     if ( bLocalUseExceptions ) {
   41010        4580 :       popErrorHandler();
   41011             :     }
   41012             : #ifndef SED_HACKS
   41013             :     if ( bLocalUseExceptions ) {
   41014             :       CPLErr eclass = CPLGetLastErrorType();
   41015             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41016             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41017             :       }
   41018             :     }
   41019             : #endif
   41020             :   }
   41021        5600 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41022        5602 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41023             :   return resultobj;
   41024             : fail:
   41025             :   return NULL;
   41026             : }
   41027             : 
   41028             : 
   41029        2000 : SWIGINTERN PyObject *_wrap_Band_GetSampleOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41030        2000 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41031        2000 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41032        2000 :   GUIntBig arg2 ;
   41033        2000 :   void *argp1 = 0 ;
   41034        2000 :   int res1 = 0 ;
   41035        2000 :   PyObject *swig_obj[2] ;
   41036        2000 :   GDALRasterBandShadow *result = 0 ;
   41037             :   
   41038        2000 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetSampleOverview", 2, 2, swig_obj)) SWIG_fail;
   41039        2000 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41040        2000 :   if (!SWIG_IsOK(res1)) {
   41041           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetSampleOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41042             :   }
   41043        2000 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41044        2000 :   {
   41045        2000 :     arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
   41046             :   }
   41047        2000 :   {
   41048        2000 :     const int bLocalUseExceptions = GetUseExceptions();
   41049        2000 :     if ( bLocalUseExceptions ) {
   41050        2000 :       pushErrorHandler();
   41051             :     }
   41052        2000 :     {
   41053        2000 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41054        2000 :       result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetSampleOverview(arg1,arg2);
   41055        2000 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41056             :     }
   41057        2000 :     if ( bLocalUseExceptions ) {
   41058        2000 :       popErrorHandler();
   41059             :     }
   41060             : #ifndef SED_HACKS
   41061             :     if ( bLocalUseExceptions ) {
   41062             :       CPLErr eclass = CPLGetLastErrorType();
   41063             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41064             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41065             :       }
   41066             :     }
   41067             : #endif
   41068             :   }
   41069        2000 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41070        2000 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41071             :   return resultobj;
   41072             : fail:
   41073             :   return NULL;
   41074             : }
   41075             : 
   41076             : 
   41077       38609 : SWIGINTERN PyObject *_wrap_Band_Checksum(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   41078       38609 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41079       38609 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41080       38609 :   int arg2 = (int) 0 ;
   41081       38609 :   int arg3 = (int) 0 ;
   41082       38609 :   int *arg4 = (int *) 0 ;
   41083       38609 :   int *arg5 = (int *) 0 ;
   41084       38609 :   void *argp1 = 0 ;
   41085       38609 :   int res1 = 0 ;
   41086       38609 :   int val2 ;
   41087       38609 :   int ecode2 = 0 ;
   41088       38609 :   int val3 ;
   41089       38609 :   int ecode3 = 0 ;
   41090       38609 :   int val4 ;
   41091       38609 :   int val5 ;
   41092       38609 :   PyObject * obj0 = 0 ;
   41093       38609 :   PyObject * obj1 = 0 ;
   41094       38609 :   PyObject * obj2 = 0 ;
   41095       38609 :   PyObject * obj3 = 0 ;
   41096       38609 :   PyObject * obj4 = 0 ;
   41097       38609 :   char * kwnames[] = {
   41098             :     (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"xsize",  (char *)"ysize",  NULL 
   41099             :   };
   41100       38609 :   int result;
   41101             :   
   41102       38609 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Band_Checksum", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   41103       38609 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41104       38609 :   if (!SWIG_IsOK(res1)) {
   41105          10 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Checksum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41106             :   }
   41107       38604 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41108       38604 :   if (obj1) {
   41109         365 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   41110         365 :     if (!SWIG_IsOK(ecode2)) {
   41111           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Checksum" "', argument " "2"" of type '" "int""'");
   41112             :     } 
   41113             :     arg2 = static_cast< int >(val2);
   41114             :   }
   41115       38604 :   if (obj2) {
   41116         365 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   41117         365 :     if (!SWIG_IsOK(ecode3)) {
   41118           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Checksum" "', argument " "3"" of type '" "int""'");
   41119             :     } 
   41120             :     arg3 = static_cast< int >(val3);
   41121             :   }
   41122       38604 :   if (obj3) {
   41123         365 :     {
   41124             :       /* %typemap(in) (int *optional_##int) */
   41125         365 :       if ( obj3 == Py_None ) {
   41126             :         arg4 = 0;
   41127             :       }
   41128         365 :       else if ( PyArg_Parse( obj3,"i" ,&val4 ) ) {
   41129             :         arg4 = (int *) &val4;
   41130             :       }
   41131             :       else {
   41132           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41133           0 :         SWIG_fail;
   41134             :       }
   41135             :     }
   41136             :   }
   41137       38604 :   if (obj4) {
   41138         365 :     {
   41139             :       /* %typemap(in) (int *optional_##int) */
   41140         365 :       if ( obj4 == Py_None ) {
   41141             :         arg5 = 0;
   41142             :       }
   41143         365 :       else if ( PyArg_Parse( obj4,"i" ,&val5 ) ) {
   41144             :         arg5 = (int *) &val5;
   41145             :       }
   41146             :       else {
   41147           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41148           0 :         SWIG_fail;
   41149             :       }
   41150             :     }
   41151             :   }
   41152       38604 :   {
   41153       38604 :     const int bLocalUseExceptions = GetUseExceptions();
   41154       38604 :     if ( bLocalUseExceptions ) {
   41155       35009 :       pushErrorHandler();
   41156             :     }
   41157       38604 :     {
   41158       38604 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41159       38604 :       result = (int)GDALRasterBandShadow_Checksum(arg1,arg2,arg3,arg4,arg5);
   41160       38604 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41161             :     }
   41162       38604 :     if ( bLocalUseExceptions ) {
   41163       35009 :       popErrorHandler();
   41164             :     }
   41165             : #ifndef SED_HACKS
   41166             :     if ( bLocalUseExceptions ) {
   41167             :       CPLErr eclass = CPLGetLastErrorType();
   41168             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41169             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41170             :       }
   41171             :     }
   41172             : #endif
   41173             :   }
   41174       38604 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41175       38721 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41176             :   return resultobj;
   41177             : fail:
   41178             :   return NULL;
   41179             : }
   41180             : 
   41181             : 
   41182        1366 : SWIGINTERN PyObject *_wrap_Band_ComputeRasterMinMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   41183        1366 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41184        1366 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41185        1366 :   double *arg2 ;
   41186        1366 :   int *arg3 = (int *) 0 ;
   41187        1366 :   bool arg4 = (bool) false ;
   41188        1366 :   bool arg5 = (bool) false ;
   41189        1366 :   void *argp1 = 0 ;
   41190        1366 :   int res1 = 0 ;
   41191        1366 :   double argout2[2] ;
   41192        1366 :   int isvalid2 ;
   41193        1366 :   bool val4 ;
   41194        1366 :   int ecode4 = 0 ;
   41195        1366 :   bool val5 ;
   41196        1366 :   int ecode5 = 0 ;
   41197        1366 :   PyObject * obj0 = 0 ;
   41198        1366 :   PyObject * obj1 = 0 ;
   41199        1366 :   PyObject * obj2 = 0 ;
   41200        1366 :   char * kwnames[] = {
   41201             :     (char *)"self",  (char *)"approx_ok",  (char *)"can_return_none",  NULL 
   41202             :   };
   41203             :   
   41204        1366 :   {
   41205             :     /* %typemap(in,numinputs=0) (double argout2[2], int* isvalid2) */
   41206        1366 :     arg2 = argout2;
   41207        1366 :     arg3 = &isvalid2;
   41208             :   }
   41209        1366 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Band_ComputeRasterMinMax", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   41210        1366 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41211        1366 :   if (!SWIG_IsOK(res1)) {
   41212           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeRasterMinMax" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41213             :   }
   41214        1366 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41215        1366 :   if (obj1) {
   41216          79 :     ecode4 = SWIG_AsVal_bool(obj1, &val4);
   41217          79 :     if (!SWIG_IsOK(ecode4)) {
   41218           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ComputeRasterMinMax" "', argument " "4"" of type '" "bool""'");
   41219             :     } 
   41220             :     arg4 = static_cast< bool >(val4);
   41221             :   }
   41222        1366 :   if (obj2) {
   41223          13 :     ecode5 = SWIG_AsVal_bool(obj2, &val5);
   41224          13 :     if (!SWIG_IsOK(ecode5)) {
   41225           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ComputeRasterMinMax" "', argument " "5"" of type '" "bool""'");
   41226             :     } 
   41227             :     arg5 = static_cast< bool >(val5);
   41228             :   }
   41229        1366 :   {
   41230        1366 :     const int bLocalUseExceptions = GetUseExceptions();
   41231        1366 :     if ( bLocalUseExceptions ) {
   41232         861 :       pushErrorHandler();
   41233             :     }
   41234        1366 :     {
   41235        1366 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41236        1366 :       GDALRasterBandShadow_ComputeRasterMinMax(arg1,arg2,arg3,arg4,arg5);
   41237        1366 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41238             :     }
   41239        1366 :     if ( bLocalUseExceptions ) {
   41240         861 :       popErrorHandler();
   41241             :     }
   41242             : #ifndef SED_HACKS
   41243             :     if ( bLocalUseExceptions ) {
   41244             :       CPLErr eclass = CPLGetLastErrorType();
   41245             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41246             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41247             :       }
   41248             :     }
   41249             : #endif
   41250             :   }
   41251        1366 :   resultobj = SWIG_Py_Void();
   41252        1366 :   {
   41253             :     /* %typemap(argout) (double argout[2], int* isvalid)  */
   41254        1366 :     PyObject *r;
   41255        1366 :     if ( !*arg3 ) {
   41256           6 :       Py_INCREF(Py_None);
   41257           6 :       r = Py_None;
   41258             :     }
   41259             :     else {
   41260        1360 :       r = CreateTupleFromDoubleArray(arg2, 2);
   41261             :     }
   41262             : #if 0x040001 >= 0x040300
   41263             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   41264             : #else
   41265        1366 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   41266             : #endif
   41267             :   }
   41268        1378 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41269             :   return resultobj;
   41270             : fail:
   41271             :   return NULL;
   41272             : }
   41273             : 
   41274             : 
   41275          18 : SWIGINTERN PyObject *_wrap_Band_ComputeBandStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41276          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41277          18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41278          18 :   double *arg2 ;
   41279          18 :   int arg3 = (int) 1 ;
   41280          18 :   void *argp1 = 0 ;
   41281          18 :   int res1 = 0 ;
   41282          18 :   double argout2[2] ;
   41283          18 :   int val3 ;
   41284          18 :   int ecode3 = 0 ;
   41285          18 :   PyObject *swig_obj[2] ;
   41286             :   
   41287          18 :   {
   41288             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   41289          18 :     memset(argout2, 0, sizeof(argout2));
   41290          18 :     arg2 = argout2;
   41291             :   }
   41292          18 :   if (!SWIG_Python_UnpackTuple(args, "Band_ComputeBandStats", 1, 2, swig_obj)) SWIG_fail;
   41293          18 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41294          18 :   if (!SWIG_IsOK(res1)) {
   41295           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeBandStats" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41296             :   }
   41297          18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41298          18 :   if (swig_obj[1]) {
   41299           0 :     ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   41300           0 :     if (!SWIG_IsOK(ecode3)) {
   41301           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ComputeBandStats" "', argument " "3"" of type '" "int""'");
   41302             :     } 
   41303             :     arg3 = static_cast< int >(val3);
   41304             :   }
   41305          18 :   {
   41306          18 :     const int bLocalUseExceptions = GetUseExceptions();
   41307          18 :     if ( bLocalUseExceptions ) {
   41308          11 :       pushErrorHandler();
   41309             :     }
   41310          18 :     {
   41311          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41312          18 :       GDALRasterBandShadow_ComputeBandStats(arg1,arg2,arg3);
   41313          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41314             :     }
   41315          18 :     if ( bLocalUseExceptions ) {
   41316          11 :       popErrorHandler();
   41317             :     }
   41318             : #ifndef SED_HACKS
   41319             :     if ( bLocalUseExceptions ) {
   41320             :       CPLErr eclass = CPLGetLastErrorType();
   41321             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41322             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41323             :       }
   41324             :     }
   41325             : #endif
   41326             :   }
   41327          18 :   resultobj = SWIG_Py_Void();
   41328          18 :   {
   41329             :     /* %typemap(argout) (double argout[ANY]) */
   41330          18 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 2 );
   41331             : #if SWIG_VERSION >= 0x040300
   41332             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   41333             : #else
   41334          18 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   41335             : #endif
   41336             :   }
   41337          18 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41338             :   return resultobj;
   41339             : fail:
   41340             :   return NULL;
   41341             : }
   41342             : 
   41343             : 
   41344      169489 : SWIGINTERN PyObject *_wrap_Band_Fill(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41345      169489 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41346      169489 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41347      169489 :   double arg2 ;
   41348      169489 :   double arg3 = (double) 0.0 ;
   41349      169489 :   void *argp1 = 0 ;
   41350      169489 :   int res1 = 0 ;
   41351      169489 :   double val2 ;
   41352      169489 :   int ecode2 = 0 ;
   41353      169489 :   double val3 ;
   41354      169489 :   int ecode3 = 0 ;
   41355      169489 :   PyObject *swig_obj[3] ;
   41356      169489 :   CPLErr result;
   41357             :   
   41358      169489 :   if (!SWIG_Python_UnpackTuple(args, "Band_Fill", 2, 3, swig_obj)) SWIG_fail;
   41359      169489 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41360      169489 :   if (!SWIG_IsOK(res1)) {
   41361           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Fill" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41362             :   }
   41363      169489 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41364      169489 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   41365      169489 :   if (!SWIG_IsOK(ecode2)) {
   41366           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Fill" "', argument " "2"" of type '" "double""'");
   41367             :   } 
   41368      169489 :   arg2 = static_cast< double >(val2);
   41369      169489 :   if (swig_obj[2]) {
   41370         266 :     ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   41371         266 :     if (!SWIG_IsOK(ecode3)) {
   41372           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Fill" "', argument " "3"" of type '" "double""'");
   41373             :     } 
   41374         266 :     arg3 = static_cast< double >(val3);
   41375             :   }
   41376      169489 :   {
   41377      169489 :     const int bLocalUseExceptions = GetUseExceptions();
   41378      169489 :     if ( bLocalUseExceptions ) {
   41379      168561 :       pushErrorHandler();
   41380             :     }
   41381      169489 :     {
   41382      169489 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41383      169489 :       result = (CPLErr)GDALRasterBandShadow_Fill(arg1,arg2,arg3);
   41384      169489 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41385             :     }
   41386      169489 :     if ( bLocalUseExceptions ) {
   41387      168561 :       popErrorHandler();
   41388             :     }
   41389             : #ifndef SED_HACKS
   41390             :     if ( bLocalUseExceptions ) {
   41391             :       CPLErr eclass = CPLGetLastErrorType();
   41392             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41393             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41394             :       }
   41395             :     }
   41396             : #endif
   41397             :   }
   41398      169489 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41399      169499 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41400             :   return resultobj;
   41401             : fail:
   41402             :   return NULL;
   41403             : }
   41404             : 
   41405             : 
   41406        8826 : SWIGINTERN PyObject *_wrap_Band_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   41407        8826 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41408        8826 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41409        8826 :   int arg2 ;
   41410        8826 :   int arg3 ;
   41411        8826 :   int arg4 ;
   41412        8826 :   int arg5 ;
   41413        8826 :   GIntBig arg6 ;
   41414        8826 :   char *arg7 = (char *) 0 ;
   41415        8826 :   int *arg8 = (int *) 0 ;
   41416        8826 :   int *arg9 = (int *) 0 ;
   41417        8826 :   GDALDataType *arg10 = (GDALDataType *) 0 ;
   41418        8826 :   GIntBig *arg11 = (GIntBig *) 0 ;
   41419        8826 :   GIntBig *arg12 = (GIntBig *) 0 ;
   41420        8826 :   void *argp1 = 0 ;
   41421        8826 :   int res1 = 0 ;
   41422        8826 :   int val2 ;
   41423        8826 :   int ecode2 = 0 ;
   41424        8826 :   int val3 ;
   41425        8826 :   int ecode3 = 0 ;
   41426        8826 :   int val4 ;
   41427        8826 :   int ecode4 = 0 ;
   41428        8826 :   int val5 ;
   41429        8826 :   int ecode5 = 0 ;
   41430        8826 :   int alloc6 = 0 ;
   41431        8826 :   bool viewIsValid6 = false ;
   41432        8826 :   Py_buffer view6 ;
   41433        8826 :   int val8 ;
   41434        8826 :   int val9 ;
   41435        8826 :   GDALDataType val10 ;
   41436        8826 :   GIntBig val11 ;
   41437        8826 :   GIntBig val12 ;
   41438        8826 :   PyObject * obj0 = 0 ;
   41439        8826 :   PyObject * obj1 = 0 ;
   41440        8826 :   PyObject * obj2 = 0 ;
   41441        8826 :   PyObject * obj3 = 0 ;
   41442        8826 :   PyObject * obj4 = 0 ;
   41443        8826 :   PyObject * obj5 = 0 ;
   41444        8826 :   PyObject * obj6 = 0 ;
   41445        8826 :   PyObject * obj7 = 0 ;
   41446        8826 :   PyObject * obj8 = 0 ;
   41447        8826 :   PyObject * obj9 = 0 ;
   41448        8826 :   PyObject * obj10 = 0 ;
   41449        8826 :   char * kwnames[] = {
   41450             :     (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 
   41451             :   };
   41452        8826 :   CPLErr result;
   41453             :   
   41454        8826 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO|OOOOO:Band_WriteRaster", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   41455        8826 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41456        8826 :   if (!SWIG_IsOK(res1)) {
   41457           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_WriteRaster" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41458             :   }
   41459        8826 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41460        8826 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   41461        8826 :   if (!SWIG_IsOK(ecode2)) {
   41462           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_WriteRaster" "', argument " "2"" of type '" "int""'");
   41463             :   } 
   41464        8826 :   arg2 = static_cast< int >(val2);
   41465        8826 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   41466        8826 :   if (!SWIG_IsOK(ecode3)) {
   41467           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_WriteRaster" "', argument " "3"" of type '" "int""'");
   41468             :   } 
   41469        8826 :   arg3 = static_cast< int >(val3);
   41470        8826 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   41471        8826 :   if (!SWIG_IsOK(ecode4)) {
   41472           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_WriteRaster" "', argument " "4"" of type '" "int""'");
   41473             :   } 
   41474        8826 :   arg4 = static_cast< int >(val4);
   41475        8826 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   41476        8826 :   if (!SWIG_IsOK(ecode5)) {
   41477           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_WriteRaster" "', argument " "5"" of type '" "int""'");
   41478             :   } 
   41479        8826 :   arg5 = static_cast< int >(val5);
   41480        8826 :   {
   41481             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   41482        8826 :     char* ptr = NULL;
   41483        8826 :     if( !GetBufferAsCharPtrGIntBigSize(obj5, &arg6, &ptr, &alloc6, &viewIsValid6, &view6) ) {
   41484           1 :       SWIG_fail;
   41485             :     }
   41486        8825 :     arg7 = (char *)ptr;
   41487             :   }
   41488        8825 :   if (obj6) {
   41489        8825 :     {
   41490             :       /* %typemap(in) (int *optional_##int) */
   41491        8825 :       if ( obj6 == Py_None ) {
   41492             :         arg8 = 0;
   41493             :       }
   41494        8825 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   41495             :         arg8 = (int *) &val8;
   41496             :       }
   41497             :       else {
   41498           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41499           0 :         SWIG_fail;
   41500             :       }
   41501             :     }
   41502             :   }
   41503        8825 :   if (obj7) {
   41504        8825 :     {
   41505             :       /* %typemap(in) (int *optional_##int) */
   41506        8825 :       if ( obj7 == Py_None ) {
   41507             :         arg9 = 0;
   41508             :       }
   41509        8825 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   41510             :         arg9 = (int *) &val9;
   41511             :       }
   41512             :       else {
   41513           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41514           0 :         SWIG_fail;
   41515             :       }
   41516             :     }
   41517             :   }
   41518        8825 :   if (obj8) {
   41519        8825 :     {
   41520             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   41521        8825 :       int intval = 0;
   41522        8825 :       if ( obj8 == Py_None ) {
   41523             :         arg10 = NULL;
   41524             :       }
   41525       17650 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj8, &intval)) ) {
   41526        8825 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   41527             :         {
   41528           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   41529             :         }
   41530        8825 :         val10 = static_cast<GDALDataType>(intval);
   41531        8825 :         arg10 = &val10;
   41532             :       }
   41533             :       else {
   41534           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41535           0 :         SWIG_fail;
   41536             :       }
   41537             :     }
   41538             :   }
   41539        8825 :   if (obj9) {
   41540        8825 :     {
   41541             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   41542        8825 :       if ( obj9 == Py_None ) {
   41543             :         arg11 = 0;
   41544             :       }
   41545          16 :       else if ( PyArg_Parse( obj9,"L" ,&val11 ) ) {
   41546             :         arg11 = (GIntBig *) &val11;
   41547             :       }
   41548             :       else {
   41549           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41550           0 :         SWIG_fail;
   41551             :       }
   41552             :     }
   41553             :   }
   41554        8825 :   if (obj10) {
   41555        8825 :     {
   41556             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   41557        8825 :       if ( obj10 == Py_None ) {
   41558             :         arg12 = 0;
   41559             :       }
   41560          12 :       else if ( PyArg_Parse( obj10,"L" ,&val12 ) ) {
   41561             :         arg12 = (GIntBig *) &val12;
   41562             :       }
   41563             :       else {
   41564           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41565           0 :         SWIG_fail;
   41566             :       }
   41567             :     }
   41568             :   }
   41569        8825 :   {
   41570        8825 :     const int bLocalUseExceptions = GetUseExceptions();
   41571        8825 :     if ( bLocalUseExceptions ) {
   41572        8077 :       pushErrorHandler();
   41573             :     }
   41574        8825 :     {
   41575        8825 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41576        8825 :       result = (CPLErr)GDALRasterBandShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   41577        8825 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41578             :     }
   41579        8825 :     if ( bLocalUseExceptions ) {
   41580        8077 :       popErrorHandler();
   41581             :     }
   41582             : #ifndef SED_HACKS
   41583             :     if ( bLocalUseExceptions ) {
   41584             :       CPLErr eclass = CPLGetLastErrorType();
   41585             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41586             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41587             :       }
   41588             :     }
   41589             : #endif
   41590             :   }
   41591        8825 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41592        8825 :   {
   41593             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   41594        8825 :     if( viewIsValid6 ) {
   41595        2763 :       PyBuffer_Release(&view6);
   41596             :     }
   41597        6062 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   41598        6062 :       delete[] arg7;
   41599             :     }
   41600             :   }
   41601        8833 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41602             :   return resultobj;
   41603           1 : fail:
   41604           1 :   {
   41605             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   41606           1 :     if( viewIsValid6 ) {
   41607           0 :       PyBuffer_Release(&view6);
   41608             :     }
   41609        8826 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   41610           0 :       delete[] arg7;
   41611             :     }
   41612             :   }
   41613             :   return NULL;
   41614             : }
   41615             : 
   41616             : 
   41617          37 : SWIGINTERN PyObject *_wrap_Band_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41618          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41619          37 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41620          37 :   void *argp1 = 0 ;
   41621          37 :   int res1 = 0 ;
   41622          37 :   PyObject *swig_obj[1] ;
   41623             :   
   41624          37 :   if (!args) SWIG_fail;
   41625          37 :   swig_obj[0] = args;
   41626          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41627          37 :   if (!SWIG_IsOK(res1)) {
   41628           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_FlushCache" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41629             :   }
   41630          37 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41631          37 :   {
   41632          37 :     const int bLocalUseExceptions = GetUseExceptions();
   41633          37 :     if ( bLocalUseExceptions ) {
   41634           5 :       pushErrorHandler();
   41635             :     }
   41636          37 :     {
   41637          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41638          37 :       GDALRasterBandShadow_FlushCache(arg1);
   41639          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41640             :     }
   41641          37 :     if ( bLocalUseExceptions ) {
   41642           5 :       popErrorHandler();
   41643             :     }
   41644             : #ifndef SED_HACKS
   41645             :     if ( bLocalUseExceptions ) {
   41646             :       CPLErr eclass = CPLGetLastErrorType();
   41647             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41648             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41649             :       }
   41650             :     }
   41651             : #endif
   41652             :   }
   41653          37 :   resultobj = SWIG_Py_Void();
   41654          37 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41655             :   return resultobj;
   41656             : fail:
   41657             :   return NULL;
   41658             : }
   41659             : 
   41660             : 
   41661         129 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41662         129 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41663         129 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41664         129 :   void *argp1 = 0 ;
   41665         129 :   int res1 = 0 ;
   41666         129 :   PyObject *swig_obj[1] ;
   41667         129 :   GDALColorTableShadow *result = 0 ;
   41668             :   
   41669         129 :   if (!args) SWIG_fail;
   41670         129 :   swig_obj[0] = args;
   41671         129 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41672         129 :   if (!SWIG_IsOK(res1)) {
   41673           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41674             :   }
   41675         129 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41676         129 :   {
   41677         129 :     const int bLocalUseExceptions = GetUseExceptions();
   41678         129 :     if ( bLocalUseExceptions ) {
   41679          91 :       pushErrorHandler();
   41680             :     }
   41681         129 :     {
   41682         129 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41683         129 :       result = (GDALColorTableShadow *)GDALRasterBandShadow_GetRasterColorTable(arg1);
   41684         129 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41685             :     }
   41686         129 :     if ( bLocalUseExceptions ) {
   41687          91 :       popErrorHandler();
   41688             :     }
   41689             : #ifndef SED_HACKS
   41690             :     if ( bLocalUseExceptions ) {
   41691             :       CPLErr eclass = CPLGetLastErrorType();
   41692             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41693             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41694             :       }
   41695             :     }
   41696             : #endif
   41697             :   }
   41698         129 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   41699         129 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41700             :   return resultobj;
   41701             : fail:
   41702             :   return NULL;
   41703             : }
   41704             : 
   41705             : 
   41706          80 : SWIGINTERN PyObject *_wrap_Band_GetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41707          80 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41708          80 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41709          80 :   void *argp1 = 0 ;
   41710          80 :   int res1 = 0 ;
   41711          80 :   PyObject *swig_obj[1] ;
   41712          80 :   GDALColorTableShadow *result = 0 ;
   41713             :   
   41714          80 :   if (!args) SWIG_fail;
   41715          80 :   swig_obj[0] = args;
   41716          80 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41717          80 :   if (!SWIG_IsOK(res1)) {
   41718           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41719             :   }
   41720          80 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41721          80 :   {
   41722          80 :     const int bLocalUseExceptions = GetUseExceptions();
   41723          80 :     if ( bLocalUseExceptions ) {
   41724          56 :       pushErrorHandler();
   41725             :     }
   41726          80 :     {
   41727          80 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41728          80 :       result = (GDALColorTableShadow *)GDALRasterBandShadow_GetColorTable(arg1);
   41729          80 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41730             :     }
   41731          80 :     if ( bLocalUseExceptions ) {
   41732          56 :       popErrorHandler();
   41733             :     }
   41734             : #ifndef SED_HACKS
   41735             :     if ( bLocalUseExceptions ) {
   41736             :       CPLErr eclass = CPLGetLastErrorType();
   41737             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41738             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41739             :       }
   41740             :     }
   41741             : #endif
   41742             :   }
   41743          80 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   41744          80 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41745             :   return resultobj;
   41746             : fail:
   41747             :   return NULL;
   41748             : }
   41749             : 
   41750             : 
   41751          46 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41752          46 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41753          46 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41754          46 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   41755          46 :   void *argp1 = 0 ;
   41756          46 :   int res1 = 0 ;
   41757          46 :   void *argp2 = 0 ;
   41758          46 :   int res2 = 0 ;
   41759          46 :   PyObject *swig_obj[2] ;
   41760          46 :   int result;
   41761             :   
   41762          46 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterColorTable", 2, 2, swig_obj)) SWIG_fail;
   41763          46 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41764          46 :   if (!SWIG_IsOK(res1)) {
   41765           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41766             :   }
   41767          46 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41768          46 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   41769          46 :   if (!SWIG_IsOK(res2)) {
   41770           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetRasterColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   41771             :   }
   41772          46 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   41773          46 :   {
   41774          46 :     const int bLocalUseExceptions = GetUseExceptions();
   41775          46 :     if ( bLocalUseExceptions ) {
   41776          24 :       pushErrorHandler();
   41777             :     }
   41778          46 :     {
   41779          46 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41780          46 :       result = (int)GDALRasterBandShadow_SetRasterColorTable(arg1,arg2);
   41781          46 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41782             :     }
   41783          46 :     if ( bLocalUseExceptions ) {
   41784          24 :       popErrorHandler();
   41785             :     }
   41786             : #ifndef SED_HACKS
   41787             :     if ( bLocalUseExceptions ) {
   41788             :       CPLErr eclass = CPLGetLastErrorType();
   41789             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41790             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41791             :       }
   41792             :     }
   41793             : #endif
   41794             :   }
   41795          46 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41796          46 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41797             :   return resultobj;
   41798             : fail:
   41799             :   return NULL;
   41800             : }
   41801             : 
   41802             : 
   41803          29 : SWIGINTERN PyObject *_wrap_Band_SetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41804          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41805          29 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41806          29 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   41807          29 :   void *argp1 = 0 ;
   41808          29 :   int res1 = 0 ;
   41809          29 :   void *argp2 = 0 ;
   41810          29 :   int res2 = 0 ;
   41811          29 :   PyObject *swig_obj[2] ;
   41812          29 :   int result;
   41813             :   
   41814          29 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetColorTable", 2, 2, swig_obj)) SWIG_fail;
   41815          29 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41816          29 :   if (!SWIG_IsOK(res1)) {
   41817           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41818             :   }
   41819          29 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41820          29 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   41821          29 :   if (!SWIG_IsOK(res2)) {
   41822           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   41823             :   }
   41824          29 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   41825          29 :   {
   41826          29 :     const int bLocalUseExceptions = GetUseExceptions();
   41827          29 :     if ( bLocalUseExceptions ) {
   41828          14 :       pushErrorHandler();
   41829             :     }
   41830          29 :     {
   41831          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41832          29 :       result = (int)GDALRasterBandShadow_SetColorTable(arg1,arg2);
   41833          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41834             :     }
   41835          29 :     if ( bLocalUseExceptions ) {
   41836          14 :       popErrorHandler();
   41837             :     }
   41838             : #ifndef SED_HACKS
   41839             :     if ( bLocalUseExceptions ) {
   41840             :       CPLErr eclass = CPLGetLastErrorType();
   41841             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41842             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41843             :       }
   41844             :     }
   41845             : #endif
   41846             :   }
   41847          29 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41848          29 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41849             :   return resultobj;
   41850             : fail:
   41851             :   return NULL;
   41852             : }
   41853             : 
   41854             : 
   41855          58 : SWIGINTERN PyObject *_wrap_Band_GetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41856          58 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41857          58 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41858          58 :   void *argp1 = 0 ;
   41859          58 :   int res1 = 0 ;
   41860          58 :   PyObject *swig_obj[1] ;
   41861          58 :   GDALRasterAttributeTableShadow *result = 0 ;
   41862             :   
   41863          58 :   if (!args) SWIG_fail;
   41864          58 :   swig_obj[0] = args;
   41865          58 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41866          58 :   if (!SWIG_IsOK(res1)) {
   41867           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41868             :   }
   41869          58 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41870          58 :   {
   41871          58 :     const int bLocalUseExceptions = GetUseExceptions();
   41872          58 :     if ( bLocalUseExceptions ) {
   41873          57 :       pushErrorHandler();
   41874             :     }
   41875          58 :     {
   41876          58 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41877          58 :       result = (GDALRasterAttributeTableShadow *)GDALRasterBandShadow_GetDefaultRAT(arg1);
   41878          58 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41879             :     }
   41880          58 :     if ( bLocalUseExceptions ) {
   41881          57 :       popErrorHandler();
   41882             :     }
   41883             : #ifndef SED_HACKS
   41884             :     if ( bLocalUseExceptions ) {
   41885             :       CPLErr eclass = CPLGetLastErrorType();
   41886             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41887             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41888             :       }
   41889             :     }
   41890             : #endif
   41891             :   }
   41892          58 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   41893          62 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41894             :   return resultobj;
   41895             : fail:
   41896             :   return NULL;
   41897             : }
   41898             : 
   41899             : 
   41900          18 : SWIGINTERN PyObject *_wrap_Band_SetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41901          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41902          18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41903          18 :   GDALRasterAttributeTableShadow *arg2 = (GDALRasterAttributeTableShadow *) 0 ;
   41904          18 :   void *argp1 = 0 ;
   41905          18 :   int res1 = 0 ;
   41906          18 :   void *argp2 = 0 ;
   41907          18 :   int res2 = 0 ;
   41908          18 :   PyObject *swig_obj[2] ;
   41909          18 :   int result;
   41910             :   
   41911          18 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetDefaultRAT", 2, 2, swig_obj)) SWIG_fail;
   41912          18 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41913          18 :   if (!SWIG_IsOK(res1)) {
   41914           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41915             :   }
   41916          18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41917          18 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   41918          18 :   if (!SWIG_IsOK(res2)) {
   41919           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetDefaultRAT" "', argument " "2"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   41920             :   }
   41921          18 :   arg2 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp2);
   41922          18 :   {
   41923          18 :     const int bLocalUseExceptions = GetUseExceptions();
   41924          18 :     if ( bLocalUseExceptions ) {
   41925          18 :       pushErrorHandler();
   41926             :     }
   41927          18 :     {
   41928          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41929          18 :       result = (int)GDALRasterBandShadow_SetDefaultRAT(arg1,arg2);
   41930          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41931             :     }
   41932          18 :     if ( bLocalUseExceptions ) {
   41933          18 :       popErrorHandler();
   41934             :     }
   41935             : #ifndef SED_HACKS
   41936             :     if ( bLocalUseExceptions ) {
   41937             :       CPLErr eclass = CPLGetLastErrorType();
   41938             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41939             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41940             :       }
   41941             :     }
   41942             : #endif
   41943             :   }
   41944          18 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41945          18 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41946             :   return resultobj;
   41947             : fail:
   41948             :   return NULL;
   41949             : }
   41950             : 
   41951             : 
   41952       10777 : SWIGINTERN PyObject *_wrap_Band_GetMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41953       10777 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41954       10777 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41955       10777 :   void *argp1 = 0 ;
   41956       10777 :   int res1 = 0 ;
   41957       10777 :   PyObject *swig_obj[1] ;
   41958       10777 :   GDALRasterBandShadow *result = 0 ;
   41959             :   
   41960       10777 :   if (!args) SWIG_fail;
   41961       10777 :   swig_obj[0] = args;
   41962       10777 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41963       10777 :   if (!SWIG_IsOK(res1)) {
   41964           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41965             :   }
   41966       10777 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41967       10777 :   {
   41968       10777 :     const int bLocalUseExceptions = GetUseExceptions();
   41969       10777 :     if ( bLocalUseExceptions ) {
   41970       10411 :       pushErrorHandler();
   41971             :     }
   41972       10777 :     {
   41973       10777 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41974       10777 :       result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetMaskBand(arg1);
   41975       10777 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41976             :     }
   41977       10777 :     if ( bLocalUseExceptions ) {
   41978       10411 :       popErrorHandler();
   41979             :     }
   41980             : #ifndef SED_HACKS
   41981             :     if ( bLocalUseExceptions ) {
   41982             :       CPLErr eclass = CPLGetLastErrorType();
   41983             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41984             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41985             :       }
   41986             :     }
   41987             : #endif
   41988             :   }
   41989       10777 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41990       10777 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41991             :   return resultobj;
   41992             : fail:
   41993             :   return NULL;
   41994             : }
   41995             : 
   41996             : 
   41997         442 : SWIGINTERN PyObject *_wrap_Band_GetMaskFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41998         442 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41999         442 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42000         442 :   void *argp1 = 0 ;
   42001         442 :   int res1 = 0 ;
   42002         442 :   PyObject *swig_obj[1] ;
   42003         442 :   int result;
   42004             :   
   42005         442 :   if (!args) SWIG_fail;
   42006         442 :   swig_obj[0] = args;
   42007         442 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42008         442 :   if (!SWIG_IsOK(res1)) {
   42009           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskFlags" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42010             :   }
   42011         442 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42012         442 :   {
   42013         442 :     const int bLocalUseExceptions = GetUseExceptions();
   42014         442 :     if ( bLocalUseExceptions ) {
   42015         276 :       pushErrorHandler();
   42016             :     }
   42017         442 :     {
   42018         442 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42019         442 :       result = (int)GDALRasterBandShadow_GetMaskFlags(arg1);
   42020         442 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42021             :     }
   42022         442 :     if ( bLocalUseExceptions ) {
   42023         276 :       popErrorHandler();
   42024             :     }
   42025             : #ifndef SED_HACKS
   42026             :     if ( bLocalUseExceptions ) {
   42027             :       CPLErr eclass = CPLGetLastErrorType();
   42028             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42029             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42030             :       }
   42031             :     }
   42032             : #endif
   42033             :   }
   42034         442 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42035         442 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42036             :   return resultobj;
   42037             : fail:
   42038             :   return NULL;
   42039             : }
   42040             : 
   42041             : 
   42042          33 : SWIGINTERN PyObject *_wrap_Band_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42043          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42044          33 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42045          33 :   int arg2 ;
   42046          33 :   void *argp1 = 0 ;
   42047          33 :   int res1 = 0 ;
   42048          33 :   int val2 ;
   42049          33 :   int ecode2 = 0 ;
   42050          33 :   PyObject *swig_obj[2] ;
   42051          33 :   CPLErr result;
   42052             :   
   42053          33 :   if (!SWIG_Python_UnpackTuple(args, "Band_CreateMaskBand", 2, 2, swig_obj)) SWIG_fail;
   42054          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42055          33 :   if (!SWIG_IsOK(res1)) {
   42056           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_CreateMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42057             :   }
   42058          33 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42059          33 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   42060          33 :   if (!SWIG_IsOK(ecode2)) {
   42061           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   42062             :   } 
   42063          33 :   arg2 = static_cast< int >(val2);
   42064          33 :   {
   42065          33 :     const int bLocalUseExceptions = GetUseExceptions();
   42066          33 :     if ( bLocalUseExceptions ) {
   42067          17 :       pushErrorHandler();
   42068             :     }
   42069          33 :     {
   42070          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42071          33 :       result = (CPLErr)GDALRasterBandShadow_CreateMaskBand(arg1,arg2);
   42072          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42073             :     }
   42074          33 :     if ( bLocalUseExceptions ) {
   42075          17 :       popErrorHandler();
   42076             :     }
   42077             : #ifndef SED_HACKS
   42078             :     if ( bLocalUseExceptions ) {
   42079             :       CPLErr eclass = CPLGetLastErrorType();
   42080             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42081             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42082             :       }
   42083             :     }
   42084             : #endif
   42085             :   }
   42086          33 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42087          37 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42088             :   return resultobj;
   42089             : fail:
   42090             :   return NULL;
   42091             : }
   42092             : 
   42093             : 
   42094          37 : SWIGINTERN PyObject *_wrap_Band_IsMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42095          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42096          37 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42097          37 :   void *argp1 = 0 ;
   42098          37 :   int res1 = 0 ;
   42099          37 :   PyObject *swig_obj[1] ;
   42100          37 :   bool result;
   42101             :   
   42102          37 :   if (!args) SWIG_fail;
   42103          37 :   swig_obj[0] = args;
   42104          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42105          37 :   if (!SWIG_IsOK(res1)) {
   42106           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_IsMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42107             :   }
   42108          37 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42109          37 :   {
   42110          37 :     const int bLocalUseExceptions = GetUseExceptions();
   42111          37 :     if ( bLocalUseExceptions ) {
   42112           9 :       pushErrorHandler();
   42113             :     }
   42114          37 :     {
   42115          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42116          37 :       result = (bool)GDALRasterBandShadow_IsMaskBand(arg1);
   42117          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42118             :     }
   42119          37 :     if ( bLocalUseExceptions ) {
   42120           9 :       popErrorHandler();
   42121             :     }
   42122             : #ifndef SED_HACKS
   42123             :     if ( bLocalUseExceptions ) {
   42124             :       CPLErr eclass = CPLGetLastErrorType();
   42125             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42126             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42127             :       }
   42128             :     }
   42129             : #endif
   42130             :   }
   42131          37 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   42132          37 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42133             :   return resultobj;
   42134             : fail:
   42135             :   return NULL;
   42136             : }
   42137             : 
   42138             : 
   42139          27 : SWIGINTERN PyObject *_wrap_Band_GetHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   42140          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42141          27 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42142          27 :   double arg2 = (double) -0.5 ;
   42143          27 :   double arg3 = (double) 255.5 ;
   42144          27 :   int arg4 = (int) 256 ;
   42145          27 :   GUIntBig *arg5 = (GUIntBig *) NULL ;
   42146          27 :   int arg6 = (int) 0 ;
   42147          27 :   int arg7 = (int) 1 ;
   42148          27 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   42149          27 :   void *arg9 = (void *) NULL ;
   42150          27 :   void *argp1 = 0 ;
   42151          27 :   int res1 = 0 ;
   42152          27 :   double val2 ;
   42153          27 :   int ecode2 = 0 ;
   42154          27 :   double val3 ;
   42155          27 :   int ecode3 = 0 ;
   42156          27 :   int val6 ;
   42157          27 :   int ecode6 = 0 ;
   42158          27 :   int val7 ;
   42159          27 :   int ecode7 = 0 ;
   42160          27 :   PyObject * obj0 = 0 ;
   42161          27 :   PyObject * obj1 = 0 ;
   42162          27 :   PyObject * obj2 = 0 ;
   42163          27 :   PyObject * obj3 = 0 ;
   42164          27 :   PyObject * obj4 = 0 ;
   42165          27 :   PyObject * obj5 = 0 ;
   42166          27 :   PyObject * obj6 = 0 ;
   42167          27 :   PyObject * obj7 = 0 ;
   42168          27 :   char * kwnames[] = {
   42169             :     (char *)"self",  (char *)"min",  (char *)"max",  (char *)"buckets",  (char *)"include_out_of_range",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  NULL 
   42170             :   };
   42171          27 :   CPLErr result;
   42172             :   
   42173          27 :   {
   42174             :     /* %typemap(in) int buckets, GUIntBig* panHistogram -> list */
   42175          27 :     arg5 = (GUIntBig *) VSICalloc(sizeof(GUIntBig),arg4);
   42176             :   }
   42177             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   42178          27 :   PyProgressData *psProgressInfo;
   42179          27 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   42180          27 :   psProgressInfo->nLastReported = -1;
   42181          27 :   psProgressInfo->psPyCallback = NULL;
   42182          27 :   psProgressInfo->psPyCallbackData = NULL;
   42183          27 :   arg9 = psProgressInfo;
   42184          27 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOOOO:Band_GetHistogram", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   42185          27 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42186          27 :   if (!SWIG_IsOK(res1)) {
   42187           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42188             :   }
   42189          27 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42190          27 :   if (obj1) {
   42191          18 :     ecode2 = SWIG_AsVal_double(obj1, &val2);
   42192          18 :     if (!SWIG_IsOK(ecode2)) {
   42193           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetHistogram" "', argument " "2"" of type '" "double""'");
   42194             :     } 
   42195          18 :     arg2 = static_cast< double >(val2);
   42196             :   }
   42197          27 :   if (obj2) {
   42198          16 :     ecode3 = SWIG_AsVal_double(obj2, &val3);
   42199          16 :     if (!SWIG_IsOK(ecode3)) {
   42200           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetHistogram" "', argument " "3"" of type '" "double""'");
   42201             :     } 
   42202          16 :     arg3 = static_cast< double >(val3);
   42203             :   }
   42204          27 :   if (obj3) {
   42205          16 :     {
   42206             :       /* %typemap(in) int buckets, GUIntBig* panHistogram -> list */
   42207          16 :       int requested_buckets = 0;
   42208          32 :       CPL_IGNORE_RET_VAL(SWIG_AsVal_int(obj3, &requested_buckets));
   42209          16 :       if( requested_buckets != arg4 )
   42210             :       {
   42211          16 :         arg4 = requested_buckets;
   42212          16 :         if (requested_buckets <= 0 || (size_t)requested_buckets > SIZE_MAX / sizeof(GUIntBig))
   42213             :         {
   42214           1 :           PyErr_SetString( PyExc_RuntimeError, "Bad value for buckets" );
   42215           1 :           SWIG_fail;
   42216             :         }
   42217          15 :         void* tmp = VSIRealloc(arg5, sizeof(GUIntBig) * requested_buckets);
   42218          15 :         if( !tmp) {
   42219           0 :           PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   42220           0 :           SWIG_fail;
   42221             :         }
   42222             :         arg5 = (GUIntBig *)tmp;
   42223             :       }
   42224          15 :       if (arg5 == NULL)
   42225             :       {
   42226           0 :         PyErr_SetString( PyExc_RuntimeError, "Cannot allocate buckets" );
   42227           0 :         SWIG_fail;
   42228             :       }
   42229             :     }
   42230             :   }
   42231          26 :   if (obj4) {
   42232          15 :     ecode6 = SWIG_AsVal_int(obj4, &val6);
   42233          15 :     if (!SWIG_IsOK(ecode6)) {
   42234           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetHistogram" "', argument " "6"" of type '" "int""'");
   42235             :     } 
   42236             :     arg6 = static_cast< int >(val6);
   42237             :   }
   42238          26 :   if (obj5) {
   42239          17 :     ecode7 = SWIG_AsVal_int(obj5, &val7);
   42240          17 :     if (!SWIG_IsOK(ecode7)) {
   42241           0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetHistogram" "', argument " "7"" of type '" "int""'");
   42242             :     } 
   42243             :     arg7 = static_cast< int >(val7);
   42244             :   }
   42245          26 :   if (obj6) {
   42246           0 :     {
   42247             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   42248             :       /* callback_func typemap */
   42249             :       
   42250             :       /* In some cases 0 is passed instead of None. */
   42251             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   42252           0 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   42253             :       {
   42254           0 :         if( PyLong_AsLong(obj6) == 0 )
   42255             :         {
   42256           0 :           obj6 = Py_None;
   42257             :         }
   42258             :       }
   42259             :       
   42260           0 :       if (obj6 && obj6 != Py_None ) {
   42261           0 :         void* cbfunction = NULL;
   42262           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   42263             :             (void**)&cbfunction,
   42264             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   42265             :             SWIG_POINTER_EXCEPTION | 0 ));
   42266             :         
   42267           0 :         if ( cbfunction == GDALTermProgress ) {
   42268             :           arg8 = GDALTermProgress;
   42269             :         } else {
   42270           0 :           if (!PyCallable_Check(obj6)) {
   42271           0 :             PyErr_SetString( PyExc_RuntimeError,
   42272             :               "Object given is not a Python function" );
   42273           0 :             SWIG_fail;
   42274             :           }
   42275           0 :           psProgressInfo->psPyCallback = obj6;
   42276           0 :           arg8 = PyProgressProxy;
   42277             :         }
   42278             :         
   42279             :       }
   42280             :       
   42281             :     }
   42282             :   }
   42283          26 :   if (obj7) {
   42284           0 :     {
   42285             :       /* %typemap(in) ( void* callback_data=NULL)  */
   42286           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   42287             :     }
   42288             :   }
   42289          26 :   {
   42290          26 :     const int bLocalUseExceptions = GetUseExceptions();
   42291          26 :     if ( bLocalUseExceptions ) {
   42292           4 :       pushErrorHandler();
   42293             :     }
   42294          26 :     {
   42295          26 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42296          26 :       result = (CPLErr)GDALRasterBandShadow_GetHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   42297          26 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42298             :     }
   42299          26 :     if ( bLocalUseExceptions ) {
   42300           4 :       popErrorHandler();
   42301             :     }
   42302             : #ifndef SED_HACKS
   42303             :     if ( bLocalUseExceptions ) {
   42304             :       CPLErr eclass = CPLGetLastErrorType();
   42305             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42306             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42307             :       }
   42308             :     }
   42309             : #endif
   42310             :   }
   42311          26 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42312          26 :   {
   42313             :     /* %typemap(out) int buckets, GUIntBig* panHistogram -> list */
   42314          26 :     GUIntBig *integerarray = arg5;
   42315          26 :     Py_DECREF( resultobj );
   42316          26 :     if ( integerarray == NULL ) {
   42317           0 :       resultobj = Py_None;
   42318           0 :       Py_INCREF( resultobj );
   42319             :     }
   42320             :     else {
   42321          26 :       resultobj = PyList_New( arg4 );
   42322          26 :       if( !resultobj ) {
   42323           0 :         SWIG_fail;
   42324             :       }
   42325        2924 :       for ( int i = 0; i < arg4; ++i ) {
   42326        2898 :         char szTmp[32];
   42327        2898 :         snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, integerarray[i]);
   42328        2898 :         PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   42329        2898 :         PyList_SetItem(resultobj, i, o );
   42330             :       }
   42331             :     }
   42332             :   }
   42333          26 :   {
   42334             :     /* %typemap(freearg) (int buckets, GUIntBig* panHistogram)*/
   42335          26 :     VSIFree( arg5 );
   42336             :   }
   42337          26 :   {
   42338             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   42339             :     
   42340          26 :     CPLFree(psProgressInfo);
   42341             :     
   42342             :   }
   42343          27 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42344             :   return resultobj;
   42345           1 : fail:
   42346           1 :   {
   42347             :     /* %typemap(freearg) (int buckets, GUIntBig* panHistogram)*/
   42348           1 :     VSIFree( arg5 );
   42349             :   }
   42350           1 :   {
   42351             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   42352             :     
   42353           1 :     CPLFree(psProgressInfo);
   42354             :     
   42355             :   }
   42356             :   return NULL;
   42357             : }
   42358             : 
   42359             : 
   42360          11 : SWIGINTERN PyObject *_wrap_Band_GetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   42361          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42362          11 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42363          11 :   double *arg2 = (double *) NULL ;
   42364          11 :   double *arg3 = (double *) NULL ;
   42365          11 :   int *arg4 = (int *) NULL ;
   42366          11 :   GUIntBig **arg5 = (GUIntBig **) NULL ;
   42367          11 :   int arg6 = (int) 1 ;
   42368          11 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   42369          11 :   void *arg8 = (void *) NULL ;
   42370          11 :   void *argp1 = 0 ;
   42371          11 :   int res1 = 0 ;
   42372          11 :   void *argp2 = 0 ;
   42373          11 :   int res2 = 0 ;
   42374          11 :   void *argp3 = 0 ;
   42375          11 :   int res3 = 0 ;
   42376          11 :   void *argp4 = 0 ;
   42377          11 :   int res4 = 0 ;
   42378          11 :   void *argp5 = 0 ;
   42379          11 :   int res5 = 0 ;
   42380          11 :   int val6 ;
   42381          11 :   int ecode6 = 0 ;
   42382          11 :   PyObject * obj0 = 0 ;
   42383          11 :   PyObject * obj1 = 0 ;
   42384          11 :   PyObject * obj2 = 0 ;
   42385          11 :   PyObject * obj3 = 0 ;
   42386          11 :   PyObject * obj4 = 0 ;
   42387          11 :   PyObject * obj5 = 0 ;
   42388          11 :   PyObject * obj6 = 0 ;
   42389          11 :   PyObject * obj7 = 0 ;
   42390          11 :   char * kwnames[] = {
   42391             :     (char *)"self",  (char *)"min_ret",  (char *)"max_ret",  (char *)"buckets_ret",  (char *)"ppanHistogram",  (char *)"force",  (char *)"callback",  (char *)"callback_data",  NULL 
   42392             :   };
   42393          11 :   CPLErr result;
   42394             :   
   42395          11 :   double min_val = 0.0, max_val = 0.0;
   42396          11 :   int buckets_val = 0;
   42397          11 :   GUIntBig *panHistogram = NULL;
   42398             :   
   42399          11 :   arg2 = &min_val;
   42400          11 :   arg3 = &max_val;
   42401          11 :   arg4 = &buckets_val;
   42402          11 :   arg5 = &panHistogram;
   42403             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   42404          11 :   PyProgressData *psProgressInfo;
   42405          11 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   42406          11 :   psProgressInfo->nLastReported = -1;
   42407          11 :   psProgressInfo->psPyCallback = NULL;
   42408          11 :   psProgressInfo->psPyCallbackData = NULL;
   42409          11 :   arg8 = psProgressInfo;
   42410          11 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOOOO:Band_GetDefaultHistogram", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   42411          11 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42412          11 :   if (!SWIG_IsOK(res1)) {
   42413           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42414             :   }
   42415          11 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42416          11 :   if (obj1) {
   42417           0 :     res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
   42418           0 :     if (!SWIG_IsOK(res2)) {
   42419           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_GetDefaultHistogram" "', argument " "2"" of type '" "double *""'"); 
   42420             :     }
   42421           0 :     arg2 = reinterpret_cast< double * >(argp2);
   42422             :   }
   42423          11 :   if (obj2) {
   42424           0 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
   42425           0 :     if (!SWIG_IsOK(res3)) {
   42426           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_GetDefaultHistogram" "', argument " "3"" of type '" "double *""'"); 
   42427             :     }
   42428           0 :     arg3 = reinterpret_cast< double * >(argp3);
   42429             :   }
   42430          11 :   if (obj3) {
   42431           0 :     res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
   42432           0 :     if (!SWIG_IsOK(res4)) {
   42433           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Band_GetDefaultHistogram" "', argument " "4"" of type '" "int *""'"); 
   42434             :     }
   42435           0 :     arg4 = reinterpret_cast< int * >(argp4);
   42436             :   }
   42437          11 :   if (obj4) {
   42438           0 :     res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_p_GUIntBig, 0 |  0 );
   42439           0 :     if (!SWIG_IsOK(res5)) {
   42440           0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Band_GetDefaultHistogram" "', argument " "5"" of type '" "GUIntBig **""'"); 
   42441             :     }
   42442           0 :     arg5 = reinterpret_cast< GUIntBig ** >(argp5);
   42443             :   }
   42444          11 :   if (obj5) {
   42445           5 :     ecode6 = SWIG_AsVal_int(obj5, &val6);
   42446           5 :     if (!SWIG_IsOK(ecode6)) {
   42447           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDefaultHistogram" "', argument " "6"" of type '" "int""'");
   42448             :     } 
   42449             :     arg6 = static_cast< int >(val6);
   42450             :   }
   42451          11 :   if (obj6) {
   42452           1 :     {
   42453             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   42454             :       /* callback_func typemap */
   42455             :       
   42456             :       /* In some cases 0 is passed instead of None. */
   42457             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   42458           1 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   42459             :       {
   42460           0 :         if( PyLong_AsLong(obj6) == 0 )
   42461             :         {
   42462           0 :           obj6 = Py_None;
   42463             :         }
   42464             :       }
   42465             :       
   42466           1 :       if (obj6 && obj6 != Py_None ) {
   42467           1 :         void* cbfunction = NULL;
   42468           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   42469             :             (void**)&cbfunction,
   42470             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   42471             :             SWIG_POINTER_EXCEPTION | 0 ));
   42472             :         
   42473           1 :         if ( cbfunction == GDALTermProgress ) {
   42474             :           arg7 = GDALTermProgress;
   42475             :         } else {
   42476           1 :           if (!PyCallable_Check(obj6)) {
   42477           0 :             PyErr_SetString( PyExc_RuntimeError,
   42478             :               "Object given is not a Python function" );
   42479           0 :             SWIG_fail;
   42480             :           }
   42481           1 :           psProgressInfo->psPyCallback = obj6;
   42482           1 :           arg7 = PyProgressProxy;
   42483             :         }
   42484             :         
   42485             :       }
   42486             :       
   42487             :     }
   42488             :   }
   42489          11 :   if (obj7) {
   42490           0 :     {
   42491             :       /* %typemap(in) ( void* callback_data=NULL)  */
   42492           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   42493             :     }
   42494             :   }
   42495          11 :   {
   42496          11 :     const int bLocalUseExceptions = GetUseExceptions();
   42497          11 :     if ( bLocalUseExceptions ) {
   42498           4 :       pushErrorHandler();
   42499             :     }
   42500          11 :     {
   42501          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42502          11 :       result = (CPLErr)GDALRasterBandShadow_GetDefaultHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   42503          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42504             :     }
   42505          11 :     if ( bLocalUseExceptions ) {
   42506           4 :       popErrorHandler();
   42507             :     }
   42508             : #ifndef SED_HACKS
   42509             :     if ( bLocalUseExceptions ) {
   42510             :       CPLErr eclass = CPLGetLastErrorType();
   42511             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42512             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42513             :       }
   42514             :     }
   42515             : #endif
   42516             :   }
   42517          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42518          11 :   {
   42519          11 :     int i;
   42520          11 :     PyObject *psList = NULL;
   42521             :     
   42522          11 :     Py_XDECREF(resultobj);
   42523             :     
   42524          11 :     if (panHistogram)
   42525             :     {
   42526          10 :       psList = PyList_New(buckets_val);
   42527          10 :       if( !psList ) {
   42528           0 :         SWIG_fail;
   42529             :       }
   42530        2062 :       for( i = 0; i < buckets_val; i++ )
   42531        2052 :       PyList_SetItem(psList, i, Py_BuildValue("K", panHistogram[i] ));
   42532             :       
   42533          10 :       CPLFree( panHistogram );
   42534             :       
   42535          10 :       resultobj = Py_BuildValue( "(ddiO)", min_val, max_val, buckets_val, psList );
   42536          10 :       Py_XDECREF(psList);
   42537             :     }
   42538             :     else
   42539             :     {
   42540           1 :       resultobj = Py_None;
   42541           1 :       Py_INCREF(resultobj);
   42542             :     }
   42543             :   }
   42544          11 :   {
   42545             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   42546             :     
   42547          11 :     CPLFree(psProgressInfo);
   42548             :     
   42549             :   }
   42550          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42551             :   return resultobj;
   42552           0 : fail:
   42553           0 :   {
   42554             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   42555             :     
   42556           0 :     CPLFree(psProgressInfo);
   42557             :     
   42558             :   }
   42559             :   return NULL;
   42560             : }
   42561             : 
   42562             : 
   42563           5 : SWIGINTERN PyObject *_wrap_Band_SetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42564           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42565           5 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42566           5 :   double arg2 ;
   42567           5 :   double arg3 ;
   42568           5 :   int arg4 ;
   42569           5 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   42570           5 :   void *argp1 = 0 ;
   42571           5 :   int res1 = 0 ;
   42572           5 :   double val2 ;
   42573           5 :   int ecode2 = 0 ;
   42574           5 :   double val3 ;
   42575           5 :   int ecode3 = 0 ;
   42576           5 :   PyObject *swig_obj[4] ;
   42577           5 :   CPLErr result;
   42578             :   
   42579           5 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetDefaultHistogram", 4, 4, swig_obj)) SWIG_fail;
   42580           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42581           5 :   if (!SWIG_IsOK(res1)) {
   42582           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42583             :   }
   42584           5 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42585           5 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   42586           5 :   if (!SWIG_IsOK(ecode2)) {
   42587           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetDefaultHistogram" "', argument " "2"" of type '" "double""'");
   42588             :   } 
   42589           5 :   arg2 = static_cast< double >(val2);
   42590           5 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   42591           5 :   if (!SWIG_IsOK(ecode3)) {
   42592           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetDefaultHistogram" "', argument " "3"" of type '" "double""'");
   42593             :   } 
   42594           5 :   arg3 = static_cast< double >(val3);
   42595           5 :   {
   42596             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   42597           5 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[3], &arg4);
   42598           5 :     if( arg4 < 0 ) {
   42599           0 :       SWIG_fail;
   42600             :     }
   42601             :   }
   42602           5 :   {
   42603           5 :     const int bLocalUseExceptions = GetUseExceptions();
   42604           5 :     if ( bLocalUseExceptions ) {
   42605           5 :       pushErrorHandler();
   42606             :     }
   42607           5 :     {
   42608           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42609           5 :       result = (CPLErr)GDALRasterBandShadow_SetDefaultHistogram(arg1,arg2,arg3,arg4,arg5);
   42610           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42611             :     }
   42612           5 :     if ( bLocalUseExceptions ) {
   42613           5 :       popErrorHandler();
   42614             :     }
   42615             : #ifndef SED_HACKS
   42616             :     if ( bLocalUseExceptions ) {
   42617             :       CPLErr eclass = CPLGetLastErrorType();
   42618             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42619             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42620             :       }
   42621             :     }
   42622             : #endif
   42623             :   }
   42624           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42625           5 :   {
   42626             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   42627           5 :     free(arg5);
   42628             :   }
   42629           5 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42630             :   return resultobj;
   42631           0 : fail:
   42632           0 :   {
   42633             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   42634           0 :     free(arg5);
   42635             :   }
   42636           0 :   return NULL;
   42637             : }
   42638             : 
   42639             : 
   42640          17 : SWIGINTERN PyObject *_wrap_Band_HasArbitraryOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42641          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42642          17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42643          17 :   void *argp1 = 0 ;
   42644          17 :   int res1 = 0 ;
   42645          17 :   PyObject *swig_obj[1] ;
   42646          17 :   bool result;
   42647             :   
   42648          17 :   if (!args) SWIG_fail;
   42649          17 :   swig_obj[0] = args;
   42650          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42651          17 :   if (!SWIG_IsOK(res1)) {
   42652           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_HasArbitraryOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42653             :   }
   42654          17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42655          17 :   {
   42656          17 :     const int bLocalUseExceptions = GetUseExceptions();
   42657          17 :     if ( bLocalUseExceptions ) {
   42658           0 :       pushErrorHandler();
   42659             :     }
   42660          17 :     {
   42661          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42662          17 :       result = (bool)GDALRasterBandShadow_HasArbitraryOverviews(arg1);
   42663          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42664             :     }
   42665          17 :     if ( bLocalUseExceptions ) {
   42666           0 :       popErrorHandler();
   42667             :     }
   42668             : #ifndef SED_HACKS
   42669             :     if ( bLocalUseExceptions ) {
   42670             :       CPLErr eclass = CPLGetLastErrorType();
   42671             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42672             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42673             :       }
   42674             :     }
   42675             : #endif
   42676             :   }
   42677          17 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   42678          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42679             :   return resultobj;
   42680             : fail:
   42681             :   return NULL;
   42682             : }
   42683             : 
   42684             : 
   42685          10 : SWIGINTERN PyObject *_wrap_Band_GetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42686          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42687          10 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42688          10 :   void *argp1 = 0 ;
   42689          10 :   int res1 = 0 ;
   42690          10 :   PyObject *swig_obj[1] ;
   42691          10 :   char **result = 0 ;
   42692             :   
   42693          10 :   if (!args) SWIG_fail;
   42694          10 :   swig_obj[0] = args;
   42695          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42696          10 :   if (!SWIG_IsOK(res1)) {
   42697           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42698             :   }
   42699          10 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42700          10 :   {
   42701          10 :     const int bLocalUseExceptions = GetUseExceptions();
   42702          10 :     if ( bLocalUseExceptions ) {
   42703           8 :       pushErrorHandler();
   42704             :     }
   42705          10 :     {
   42706          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42707          10 :       result = (char **)GDALRasterBandShadow_GetCategoryNames(arg1);
   42708          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42709             :     }
   42710          10 :     if ( bLocalUseExceptions ) {
   42711           8 :       popErrorHandler();
   42712             :     }
   42713             : #ifndef SED_HACKS
   42714             :     if ( bLocalUseExceptions ) {
   42715             :       CPLErr eclass = CPLGetLastErrorType();
   42716             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42717             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42718             :       }
   42719             :     }
   42720             : #endif
   42721             :   }
   42722          10 :   {
   42723             :     /* %typemap(out) char **options -> ( string ) */
   42724          10 :     bool bErr = false;
   42725          10 :     resultobj = CSLToList(result, &bErr);
   42726          10 :     if( bErr ) {
   42727           0 :       SWIG_fail;
   42728             :     }
   42729             :   }
   42730          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42731             :   return resultobj;
   42732             : fail:
   42733             :   return NULL;
   42734             : }
   42735             : 
   42736             : 
   42737           2 : SWIGINTERN PyObject *_wrap_Band_SetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42738           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42739           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42740           2 :   char **arg2 = (char **) 0 ;
   42741           2 :   void *argp1 = 0 ;
   42742           2 :   int res1 = 0 ;
   42743           2 :   PyObject *swig_obj[2] ;
   42744           2 :   CPLErr result;
   42745             :   
   42746           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetCategoryNames", 2, 2, swig_obj)) SWIG_fail;
   42747           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42748           2 :   if (!SWIG_IsOK(res1)) {
   42749           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42750             :   }
   42751           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42752           2 :   {
   42753             :     /* %typemap(in) char **dict */
   42754           2 :     arg2 = NULL;
   42755           2 :     if ( PySequence_Check( swig_obj[1] ) ) {
   42756           2 :       int bErr = FALSE;
   42757           2 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   42758           2 :       if ( bErr )
   42759             :       {
   42760           0 :         SWIG_fail;
   42761             :       }
   42762             :     }
   42763           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   42764           0 :       int bErr = FALSE;
   42765           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   42766           0 :       if ( bErr )
   42767             :       {
   42768           0 :         SWIG_fail;
   42769             :       }
   42770             :     }
   42771             :     else {
   42772           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   42773           0 :       SWIG_fail;
   42774             :     }
   42775             :   }
   42776           2 :   {
   42777           2 :     const int bLocalUseExceptions = GetUseExceptions();
   42778           2 :     if ( bLocalUseExceptions ) {
   42779           2 :       pushErrorHandler();
   42780             :     }
   42781           2 :     {
   42782           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42783           2 :       result = (CPLErr)GDALRasterBandShadow_SetCategoryNames(arg1,arg2);
   42784           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42785             :     }
   42786           2 :     if ( bLocalUseExceptions ) {
   42787           2 :       popErrorHandler();
   42788             :     }
   42789             : #ifndef SED_HACKS
   42790             :     if ( bLocalUseExceptions ) {
   42791             :       CPLErr eclass = CPLGetLastErrorType();
   42792             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42793             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42794             :       }
   42795             :     }
   42796             : #endif
   42797             :   }
   42798           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42799           2 :   {
   42800             :     /* %typemap(freearg) char **dict */
   42801           2 :     CSLDestroy( arg2 );
   42802             :   }
   42803           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42804             :   return resultobj;
   42805           0 : fail:
   42806           0 :   {
   42807             :     /* %typemap(freearg) char **dict */
   42808           0 :     CSLDestroy( arg2 );
   42809             :   }
   42810             :   return NULL;
   42811             : }
   42812             : 
   42813             : 
   42814           1 : SWIGINTERN PyObject *_wrap_Band_GetVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   42815           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42816           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42817           1 :   GDALRWFlag arg2 ;
   42818           1 :   int arg3 ;
   42819           1 :   int arg4 ;
   42820           1 :   int arg5 ;
   42821           1 :   int arg6 ;
   42822           1 :   int arg7 ;
   42823           1 :   int arg8 ;
   42824           1 :   GDALDataType arg9 ;
   42825           1 :   size_t arg10 ;
   42826           1 :   size_t arg11 ;
   42827           1 :   char **arg12 = (char **) NULL ;
   42828           1 :   void *argp1 = 0 ;
   42829           1 :   int res1 = 0 ;
   42830           1 :   int val2 ;
   42831           1 :   int ecode2 = 0 ;
   42832           1 :   int val3 ;
   42833           1 :   int ecode3 = 0 ;
   42834           1 :   int val4 ;
   42835           1 :   int ecode4 = 0 ;
   42836           1 :   int val5 ;
   42837           1 :   int ecode5 = 0 ;
   42838           1 :   int val6 ;
   42839           1 :   int ecode6 = 0 ;
   42840           1 :   int val7 ;
   42841           1 :   int ecode7 = 0 ;
   42842           1 :   int val8 ;
   42843           1 :   int ecode8 = 0 ;
   42844           1 :   size_t val10 ;
   42845           1 :   int ecode10 = 0 ;
   42846           1 :   size_t val11 ;
   42847           1 :   int ecode11 = 0 ;
   42848           1 :   PyObject * obj0 = 0 ;
   42849           1 :   PyObject * obj1 = 0 ;
   42850           1 :   PyObject * obj2 = 0 ;
   42851           1 :   PyObject * obj3 = 0 ;
   42852           1 :   PyObject * obj4 = 0 ;
   42853           1 :   PyObject * obj5 = 0 ;
   42854           1 :   PyObject * obj6 = 0 ;
   42855           1 :   PyObject * obj7 = 0 ;
   42856           1 :   PyObject * obj8 = 0 ;
   42857           1 :   PyObject * obj9 = 0 ;
   42858           1 :   PyObject * obj10 = 0 ;
   42859           1 :   PyObject * obj11 = 0 ;
   42860           1 :   char * kwnames[] = {
   42861             :     (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 
   42862             :   };
   42863           1 :   CPLVirtualMemShadow *result = 0 ;
   42864             :   
   42865           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;
   42866           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42867           1 :   if (!SWIG_IsOK(res1)) {
   42868           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetVirtualMem" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42869             :   }
   42870           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42871           1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   42872           1 :   if (!SWIG_IsOK(ecode2)) {
   42873           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   42874             :   } 
   42875           1 :   arg2 = static_cast< GDALRWFlag >(val2);
   42876           1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   42877           1 :   if (!SWIG_IsOK(ecode3)) {
   42878           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetVirtualMem" "', argument " "3"" of type '" "int""'");
   42879             :   } 
   42880           1 :   arg3 = static_cast< int >(val3);
   42881           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   42882           1 :   if (!SWIG_IsOK(ecode4)) {
   42883           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetVirtualMem" "', argument " "4"" of type '" "int""'");
   42884             :   } 
   42885           1 :   arg4 = static_cast< int >(val4);
   42886           1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   42887           1 :   if (!SWIG_IsOK(ecode5)) {
   42888           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetVirtualMem" "', argument " "5"" of type '" "int""'");
   42889             :   } 
   42890           1 :   arg5 = static_cast< int >(val5);
   42891           1 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   42892           1 :   if (!SWIG_IsOK(ecode6)) {
   42893           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetVirtualMem" "', argument " "6"" of type '" "int""'");
   42894             :   } 
   42895           1 :   arg6 = static_cast< int >(val6);
   42896           1 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   42897           1 :   if (!SWIG_IsOK(ecode7)) {
   42898           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetVirtualMem" "', argument " "7"" of type '" "int""'");
   42899             :   } 
   42900           1 :   arg7 = static_cast< int >(val7);
   42901           1 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   42902           1 :   if (!SWIG_IsOK(ecode8)) {
   42903           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Band_GetVirtualMem" "', argument " "8"" of type '" "int""'");
   42904             :   } 
   42905           1 :   arg8 = static_cast< int >(val8);
   42906           1 :   {
   42907             :     // %typemap(in) GDALDataType
   42908           1 :     int val = 0;
   42909           1 :     int ecode = SWIG_AsVal_int(obj8, &val);
   42910           1 :     if (!SWIG_IsOK(ecode)) {
   42911           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   42912             :     }
   42913           1 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   42914             :     {
   42915           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   42916             :     }
   42917           1 :     arg9 = static_cast<GDALDataType>(val);
   42918             :   }
   42919           1 :   ecode10 = SWIG_AsVal_size_t(obj9, &val10);
   42920           1 :   if (!SWIG_IsOK(ecode10)) {
   42921           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Band_GetVirtualMem" "', argument " "10"" of type '" "size_t""'");
   42922             :   } 
   42923           1 :   arg10 = static_cast< size_t >(val10);
   42924           1 :   ecode11 = SWIG_AsVal_size_t(obj10, &val11);
   42925           1 :   if (!SWIG_IsOK(ecode11)) {
   42926           0 :     SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "Band_GetVirtualMem" "', argument " "11"" of type '" "size_t""'");
   42927             :   } 
   42928           1 :   arg11 = static_cast< size_t >(val11);
   42929           1 :   if (obj11) {
   42930           0 :     {
   42931             :       /* %typemap(in) char **dict */
   42932           0 :       arg12 = NULL;
   42933           0 :       if ( PySequence_Check( obj11 ) ) {
   42934           0 :         int bErr = FALSE;
   42935           0 :         arg12 = CSLFromPySequence(obj11, &bErr);
   42936           0 :         if ( bErr )
   42937             :         {
   42938           0 :           SWIG_fail;
   42939             :         }
   42940             :       }
   42941           0 :       else if ( PyMapping_Check( obj11 ) ) {
   42942           0 :         int bErr = FALSE;
   42943           0 :         arg12 = CSLFromPyMapping(obj11, &bErr);
   42944           0 :         if ( bErr )
   42945             :         {
   42946           0 :           SWIG_fail;
   42947             :         }
   42948             :       }
   42949             :       else {
   42950           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   42951           0 :         SWIG_fail;
   42952             :       }
   42953             :     }
   42954             :   }
   42955           1 :   {
   42956           1 :     const int bLocalUseExceptions = GetUseExceptions();
   42957           1 :     if ( bLocalUseExceptions ) {
   42958           1 :       pushErrorHandler();
   42959             :     }
   42960           1 :     {
   42961           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42962           1 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   42963           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42964             :     }
   42965           1 :     if ( bLocalUseExceptions ) {
   42966           1 :       popErrorHandler();
   42967             :     }
   42968             : #ifndef SED_HACKS
   42969             :     if ( bLocalUseExceptions ) {
   42970             :       CPLErr eclass = CPLGetLastErrorType();
   42971             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42972             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42973             :       }
   42974             :     }
   42975             : #endif
   42976             :   }
   42977           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   42978           1 :   {
   42979             :     /* %typemap(freearg) char **dict */
   42980           1 :     CSLDestroy( arg12 );
   42981             :   }
   42982           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42983             :   return resultobj;
   42984           0 : fail:
   42985           0 :   {
   42986             :     /* %typemap(freearg) char **dict */
   42987           0 :     CSLDestroy( arg12 );
   42988             :   }
   42989             :   return NULL;
   42990             : }
   42991             : 
   42992             : 
   42993          21 : SWIGINTERN PyObject *_wrap_Band_GetVirtualMemAuto(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   42994          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42995          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42996          21 :   GDALRWFlag arg2 ;
   42997          21 :   char **arg3 = (char **) NULL ;
   42998          21 :   void *argp1 = 0 ;
   42999          21 :   int res1 = 0 ;
   43000          21 :   int val2 ;
   43001          21 :   int ecode2 = 0 ;
   43002          21 :   PyObject * obj0 = 0 ;
   43003          21 :   PyObject * obj1 = 0 ;
   43004          21 :   PyObject * obj2 = 0 ;
   43005          21 :   char * kwnames[] = {
   43006             :     (char *)"self",  (char *)"eRWFlag",  (char *)"options",  NULL 
   43007             :   };
   43008          21 :   CPLVirtualMemShadow *result = 0 ;
   43009             :   
   43010          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Band_GetVirtualMemAuto", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   43011          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43012          21 :   if (!SWIG_IsOK(res1)) {
   43013           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetVirtualMemAuto" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43014             :   }
   43015          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43016          21 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   43017          21 :   if (!SWIG_IsOK(ecode2)) {
   43018           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetVirtualMemAuto" "', argument " "2"" of type '" "GDALRWFlag""'");
   43019             :   } 
   43020          21 :   arg2 = static_cast< GDALRWFlag >(val2);
   43021          21 :   if (obj2) {
   43022           0 :     {
   43023             :       /* %typemap(in) char **dict */
   43024           0 :       arg3 = NULL;
   43025           0 :       if ( PySequence_Check( obj2 ) ) {
   43026           0 :         int bErr = FALSE;
   43027           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   43028           0 :         if ( bErr )
   43029             :         {
   43030           0 :           SWIG_fail;
   43031             :         }
   43032             :       }
   43033           0 :       else if ( PyMapping_Check( obj2 ) ) {
   43034           0 :         int bErr = FALSE;
   43035           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   43036           0 :         if ( bErr )
   43037             :         {
   43038           0 :           SWIG_fail;
   43039             :         }
   43040             :       }
   43041             :       else {
   43042           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43043           0 :         SWIG_fail;
   43044             :       }
   43045             :     }
   43046             :   }
   43047          21 :   {
   43048          21 :     const int bLocalUseExceptions = GetUseExceptions();
   43049          21 :     if ( bLocalUseExceptions ) {
   43050          21 :       pushErrorHandler();
   43051             :     }
   43052          21 :     {
   43053          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43054          21 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetVirtualMemAuto(arg1,arg2,arg3);
   43055          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43056             :     }
   43057          21 :     if ( bLocalUseExceptions ) {
   43058          21 :       popErrorHandler();
   43059             :     }
   43060             : #ifndef SED_HACKS
   43061             :     if ( bLocalUseExceptions ) {
   43062             :       CPLErr eclass = CPLGetLastErrorType();
   43063             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43064             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43065             :       }
   43066             :     }
   43067             : #endif
   43068             :   }
   43069          21 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   43070          21 :   {
   43071             :     /* %typemap(freearg) char **dict */
   43072          21 :     CSLDestroy( arg3 );
   43073             :   }
   43074          23 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   43075             :   return resultobj;
   43076           0 : fail:
   43077           0 :   {
   43078             :     /* %typemap(freearg) char **dict */
   43079           0 :     CSLDestroy( arg3 );
   43080             :   }
   43081             :   return NULL;
   43082             : }
   43083             : 
   43084             : 
   43085           1 : SWIGINTERN PyObject *_wrap_Band_GetTiledVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43086           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43087           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43088           1 :   GDALRWFlag arg2 ;
   43089           1 :   int arg3 ;
   43090           1 :   int arg4 ;
   43091           1 :   int arg5 ;
   43092           1 :   int arg6 ;
   43093           1 :   int arg7 ;
   43094           1 :   int arg8 ;
   43095           1 :   GDALDataType arg9 ;
   43096           1 :   size_t arg10 ;
   43097           1 :   char **arg11 = (char **) NULL ;
   43098           1 :   void *argp1 = 0 ;
   43099           1 :   int res1 = 0 ;
   43100           1 :   int val2 ;
   43101           1 :   int ecode2 = 0 ;
   43102           1 :   int val3 ;
   43103           1 :   int ecode3 = 0 ;
   43104           1 :   int val4 ;
   43105           1 :   int ecode4 = 0 ;
   43106           1 :   int val5 ;
   43107           1 :   int ecode5 = 0 ;
   43108           1 :   int val6 ;
   43109           1 :   int ecode6 = 0 ;
   43110           1 :   int val7 ;
   43111           1 :   int ecode7 = 0 ;
   43112           1 :   int val8 ;
   43113           1 :   int ecode8 = 0 ;
   43114           1 :   size_t val10 ;
   43115           1 :   int ecode10 = 0 ;
   43116           1 :   PyObject * obj0 = 0 ;
   43117           1 :   PyObject * obj1 = 0 ;
   43118           1 :   PyObject * obj2 = 0 ;
   43119           1 :   PyObject * obj3 = 0 ;
   43120           1 :   PyObject * obj4 = 0 ;
   43121           1 :   PyObject * obj5 = 0 ;
   43122           1 :   PyObject * obj6 = 0 ;
   43123           1 :   PyObject * obj7 = 0 ;
   43124           1 :   PyObject * obj8 = 0 ;
   43125           1 :   PyObject * obj9 = 0 ;
   43126           1 :   PyObject * obj10 = 0 ;
   43127           1 :   char * kwnames[] = {
   43128             :     (char *)"self",  (char *)"eRWFlag",  (char *)"nXOff",  (char *)"nYOff",  (char *)"nXSize",  (char *)"nYSize",  (char *)"nTileXSize",  (char *)"nTileYSize",  (char *)"eBufType",  (char *)"nCacheSize",  (char *)"options",  NULL 
   43129             :   };
   43130           1 :   CPLVirtualMemShadow *result = 0 ;
   43131             :   
   43132           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOO|O:Band_GetTiledVirtualMem", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   43133           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43134           1 :   if (!SWIG_IsOK(res1)) {
   43135           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetTiledVirtualMem" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43136             :   }
   43137           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43138           1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   43139           1 :   if (!SWIG_IsOK(ecode2)) {
   43140           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetTiledVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   43141             :   } 
   43142           1 :   arg2 = static_cast< GDALRWFlag >(val2);
   43143           1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   43144           1 :   if (!SWIG_IsOK(ecode3)) {
   43145           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetTiledVirtualMem" "', argument " "3"" of type '" "int""'");
   43146             :   } 
   43147           1 :   arg3 = static_cast< int >(val3);
   43148           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   43149           1 :   if (!SWIG_IsOK(ecode4)) {
   43150           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetTiledVirtualMem" "', argument " "4"" of type '" "int""'");
   43151             :   } 
   43152           1 :   arg4 = static_cast< int >(val4);
   43153           1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   43154           1 :   if (!SWIG_IsOK(ecode5)) {
   43155           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetTiledVirtualMem" "', argument " "5"" of type '" "int""'");
   43156             :   } 
   43157           1 :   arg5 = static_cast< int >(val5);
   43158           1 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   43159           1 :   if (!SWIG_IsOK(ecode6)) {
   43160           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetTiledVirtualMem" "', argument " "6"" of type '" "int""'");
   43161             :   } 
   43162           1 :   arg6 = static_cast< int >(val6);
   43163           1 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   43164           1 :   if (!SWIG_IsOK(ecode7)) {
   43165           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetTiledVirtualMem" "', argument " "7"" of type '" "int""'");
   43166             :   } 
   43167           1 :   arg7 = static_cast< int >(val7);
   43168           1 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   43169           1 :   if (!SWIG_IsOK(ecode8)) {
   43170           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Band_GetTiledVirtualMem" "', argument " "8"" of type '" "int""'");
   43171             :   } 
   43172           1 :   arg8 = static_cast< int >(val8);
   43173           1 :   {
   43174             :     // %typemap(in) GDALDataType
   43175           1 :     int val = 0;
   43176           1 :     int ecode = SWIG_AsVal_int(obj8, &val);
   43177           1 :     if (!SWIG_IsOK(ecode)) {
   43178           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   43179             :     }
   43180           1 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   43181             :     {
   43182           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   43183             :     }
   43184           1 :     arg9 = static_cast<GDALDataType>(val);
   43185             :   }
   43186           1 :   ecode10 = SWIG_AsVal_size_t(obj9, &val10);
   43187           1 :   if (!SWIG_IsOK(ecode10)) {
   43188           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Band_GetTiledVirtualMem" "', argument " "10"" of type '" "size_t""'");
   43189             :   } 
   43190           1 :   arg10 = static_cast< size_t >(val10);
   43191           1 :   if (obj10) {
   43192           0 :     {
   43193             :       /* %typemap(in) char **dict */
   43194           0 :       arg11 = NULL;
   43195           0 :       if ( PySequence_Check( obj10 ) ) {
   43196           0 :         int bErr = FALSE;
   43197           0 :         arg11 = CSLFromPySequence(obj10, &bErr);
   43198           0 :         if ( bErr )
   43199             :         {
   43200           0 :           SWIG_fail;
   43201             :         }
   43202             :       }
   43203           0 :       else if ( PyMapping_Check( obj10 ) ) {
   43204           0 :         int bErr = FALSE;
   43205           0 :         arg11 = CSLFromPyMapping(obj10, &bErr);
   43206           0 :         if ( bErr )
   43207             :         {
   43208           0 :           SWIG_fail;
   43209             :         }
   43210             :       }
   43211             :       else {
   43212           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43213           0 :         SWIG_fail;
   43214             :       }
   43215             :     }
   43216             :   }
   43217           1 :   {
   43218           1 :     const int bLocalUseExceptions = GetUseExceptions();
   43219           1 :     if ( bLocalUseExceptions ) {
   43220           1 :       pushErrorHandler();
   43221             :     }
   43222           1 :     {
   43223           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43224           1 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetTiledVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   43225           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43226             :     }
   43227           1 :     if ( bLocalUseExceptions ) {
   43228           1 :       popErrorHandler();
   43229             :     }
   43230             : #ifndef SED_HACKS
   43231             :     if ( bLocalUseExceptions ) {
   43232             :       CPLErr eclass = CPLGetLastErrorType();
   43233             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43234             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43235             :       }
   43236             :     }
   43237             : #endif
   43238             :   }
   43239           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   43240           1 :   {
   43241             :     /* %typemap(freearg) char **dict */
   43242           1 :     CSLDestroy( arg11 );
   43243             :   }
   43244           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   43245             :   return resultobj;
   43246           0 : fail:
   43247           0 :   {
   43248             :     /* %typemap(freearg) char **dict */
   43249           0 :     CSLDestroy( arg11 );
   43250             :   }
   43251             :   return NULL;
   43252             : }
   43253             : 
   43254             : 
   43255          26 : SWIGINTERN PyObject *_wrap_Band_GetDataCoverageStatus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43256          26 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43257          26 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43258          26 :   int arg2 ;
   43259          26 :   int arg3 ;
   43260          26 :   int arg4 ;
   43261          26 :   int arg5 ;
   43262          26 :   int arg6 = (int) 0 ;
   43263          26 :   double *arg7 = (double *) NULL ;
   43264          26 :   void *argp1 = 0 ;
   43265          26 :   int res1 = 0 ;
   43266          26 :   int val2 ;
   43267          26 :   int ecode2 = 0 ;
   43268          26 :   int val3 ;
   43269          26 :   int ecode3 = 0 ;
   43270          26 :   int val4 ;
   43271          26 :   int ecode4 = 0 ;
   43272          26 :   int val5 ;
   43273          26 :   int ecode5 = 0 ;
   43274          26 :   int val6 ;
   43275          26 :   int ecode6 = 0 ;
   43276          26 :   double temp7 ;
   43277          26 :   int res7 = SWIG_TMPOBJ ;
   43278          26 :   PyObject *swig_obj[6] ;
   43279          26 :   int result;
   43280             :   
   43281          26 :   arg7 = &temp7;
   43282          26 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetDataCoverageStatus", 5, 6, swig_obj)) SWIG_fail;
   43283          26 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43284          26 :   if (!SWIG_IsOK(res1)) {
   43285           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDataCoverageStatus" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43286             :   }
   43287          26 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43288          26 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   43289          26 :   if (!SWIG_IsOK(ecode2)) {
   43290           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetDataCoverageStatus" "', argument " "2"" of type '" "int""'");
   43291             :   } 
   43292          26 :   arg2 = static_cast< int >(val2);
   43293          26 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   43294          26 :   if (!SWIG_IsOK(ecode3)) {
   43295           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetDataCoverageStatus" "', argument " "3"" of type '" "int""'");
   43296             :   } 
   43297          26 :   arg3 = static_cast< int >(val3);
   43298          26 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   43299          26 :   if (!SWIG_IsOK(ecode4)) {
   43300           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetDataCoverageStatus" "', argument " "4"" of type '" "int""'");
   43301             :   } 
   43302          26 :   arg4 = static_cast< int >(val4);
   43303          26 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   43304          26 :   if (!SWIG_IsOK(ecode5)) {
   43305           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetDataCoverageStatus" "', argument " "5"" of type '" "int""'");
   43306             :   } 
   43307          26 :   arg5 = static_cast< int >(val5);
   43308          26 :   if (swig_obj[5]) {
   43309           0 :     ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
   43310           0 :     if (!SWIG_IsOK(ecode6)) {
   43311           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDataCoverageStatus" "', argument " "6"" of type '" "int""'");
   43312             :     } 
   43313             :     arg6 = static_cast< int >(val6);
   43314             :   }
   43315          26 :   {
   43316          26 :     const int bLocalUseExceptions = GetUseExceptions();
   43317          26 :     if ( bLocalUseExceptions ) {
   43318           6 :       pushErrorHandler();
   43319             :     }
   43320          26 :     {
   43321          26 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43322          26 :       result = (int)GDALRasterBandShadow_GetDataCoverageStatus(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   43323          26 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43324             :     }
   43325          26 :     if ( bLocalUseExceptions ) {
   43326           6 :       popErrorHandler();
   43327             :     }
   43328             : #ifndef SED_HACKS
   43329             :     if ( bLocalUseExceptions ) {
   43330             :       CPLErr eclass = CPLGetLastErrorType();
   43331             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43332             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43333             :       }
   43334             :     }
   43335             : #endif
   43336             :   }
   43337          26 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43338          26 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   43339          26 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   43340             :   } else {
   43341           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43342           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   43343             :   }
   43344          26 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   43345             :   return resultobj;
   43346             : fail:
   43347             :   return NULL;
   43348             : }
   43349             : 
   43350             : 
   43351           2 : SWIGINTERN PyObject *_wrap_Band_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43352           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43353           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43354           2 :   int arg2 ;
   43355           2 :   int arg3 ;
   43356           2 :   int arg4 ;
   43357           2 :   int arg5 ;
   43358           2 :   int *arg6 = (int *) 0 ;
   43359           2 :   int *arg7 = (int *) 0 ;
   43360           2 :   GDALDataType *arg8 = (GDALDataType *) 0 ;
   43361           2 :   char **arg9 = (char **) NULL ;
   43362           2 :   void *argp1 = 0 ;
   43363           2 :   int res1 = 0 ;
   43364           2 :   int val2 ;
   43365           2 :   int ecode2 = 0 ;
   43366           2 :   int val3 ;
   43367           2 :   int ecode3 = 0 ;
   43368           2 :   int val4 ;
   43369           2 :   int ecode4 = 0 ;
   43370           2 :   int val5 ;
   43371           2 :   int ecode5 = 0 ;
   43372           2 :   void *argp6 = 0 ;
   43373           2 :   int res6 = 0 ;
   43374           2 :   void *argp7 = 0 ;
   43375           2 :   int res7 = 0 ;
   43376           2 :   int val8 ;
   43377           2 :   PyObject *swig_obj[9] ;
   43378           2 :   CPLErr result;
   43379             :   
   43380           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_AdviseRead", 5, 9, swig_obj)) SWIG_fail;
   43381           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43382           2 :   if (!SWIG_IsOK(res1)) {
   43383           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AdviseRead" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43384             :   }
   43385           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43386           2 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   43387           2 :   if (!SWIG_IsOK(ecode2)) {
   43388           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_AdviseRead" "', argument " "2"" of type '" "int""'");
   43389             :   } 
   43390           2 :   arg2 = static_cast< int >(val2);
   43391           2 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   43392           2 :   if (!SWIG_IsOK(ecode3)) {
   43393           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_AdviseRead" "', argument " "3"" of type '" "int""'");
   43394             :   } 
   43395           2 :   arg3 = static_cast< int >(val3);
   43396           2 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   43397           2 :   if (!SWIG_IsOK(ecode4)) {
   43398           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_AdviseRead" "', argument " "4"" of type '" "int""'");
   43399             :   } 
   43400           2 :   arg4 = static_cast< int >(val4);
   43401           2 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   43402           2 :   if (!SWIG_IsOK(ecode5)) {
   43403           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_AdviseRead" "', argument " "5"" of type '" "int""'");
   43404             :   } 
   43405           2 :   arg5 = static_cast< int >(val5);
   43406           2 :   if (swig_obj[5]) {
   43407           0 :     res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
   43408           0 :     if (!SWIG_IsOK(res6)) {
   43409           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Band_AdviseRead" "', argument " "6"" of type '" "int *""'"); 
   43410             :     }
   43411           0 :     arg6 = reinterpret_cast< int * >(argp6);
   43412             :   }
   43413           2 :   if (swig_obj[6]) {
   43414           0 :     res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
   43415           0 :     if (!SWIG_IsOK(res7)) {
   43416           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Band_AdviseRead" "', argument " "7"" of type '" "int *""'"); 
   43417             :     }
   43418           0 :     arg7 = reinterpret_cast< int * >(argp7);
   43419             :   }
   43420           2 :   if (swig_obj[7]) {
   43421           0 :     {
   43422             :       /* %typemap(in) (int *optional_##int) */
   43423           0 :       if ( swig_obj[7] == Py_None ) {
   43424             :         arg8 = 0;
   43425             :       }
   43426           0 :       else if ( PyArg_Parse( swig_obj[7],"i" ,&val8 ) ) {
   43427             :         arg8 = (GDALDataType *) &val8;
   43428             :       }
   43429             :       else {
   43430           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   43431           0 :         SWIG_fail;
   43432             :       }
   43433             :     }
   43434             :   }
   43435           2 :   if (swig_obj[8]) {
   43436           0 :     {
   43437             :       /* %typemap(in) char **dict */
   43438           0 :       arg9 = NULL;
   43439           0 :       if ( PySequence_Check( swig_obj[8] ) ) {
   43440           0 :         int bErr = FALSE;
   43441           0 :         arg9 = CSLFromPySequence(swig_obj[8], &bErr);
   43442           0 :         if ( bErr )
   43443             :         {
   43444           0 :           SWIG_fail;
   43445             :         }
   43446             :       }
   43447           0 :       else if ( PyMapping_Check( swig_obj[8] ) ) {
   43448           0 :         int bErr = FALSE;
   43449           0 :         arg9 = CSLFromPyMapping(swig_obj[8], &bErr);
   43450           0 :         if ( bErr )
   43451             :         {
   43452           0 :           SWIG_fail;
   43453             :         }
   43454             :       }
   43455             :       else {
   43456           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43457           0 :         SWIG_fail;
   43458             :       }
   43459             :     }
   43460             :   }
   43461           2 :   {
   43462           2 :     const int bLocalUseExceptions = GetUseExceptions();
   43463           2 :     if ( bLocalUseExceptions ) {
   43464           0 :       pushErrorHandler();
   43465             :     }
   43466           2 :     {
   43467           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43468           2 :       result = (CPLErr)GDALRasterBandShadow_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   43469           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43470             :     }
   43471           2 :     if ( bLocalUseExceptions ) {
   43472           0 :       popErrorHandler();
   43473             :     }
   43474             : #ifndef SED_HACKS
   43475             :     if ( bLocalUseExceptions ) {
   43476             :       CPLErr eclass = CPLGetLastErrorType();
   43477             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43478             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43479             :       }
   43480             :     }
   43481             : #endif
   43482             :   }
   43483           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43484           2 :   {
   43485             :     /* %typemap(freearg) char **dict */
   43486           2 :     CSLDestroy( arg9 );
   43487             :   }
   43488           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   43489             :   return resultobj;
   43490           0 : fail:
   43491           0 :   {
   43492             :     /* %typemap(freearg) char **dict */
   43493           0 :     CSLDestroy( arg9 );
   43494             :   }
   43495             :   return NULL;
   43496             : }
   43497             : 
   43498             : 
   43499          69 : SWIGINTERN PyObject *_wrap_Band_InterpolateAtPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43500          69 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43501          69 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43502          69 :   double arg2 ;
   43503          69 :   double arg3 ;
   43504          69 :   GDALRIOResampleAlg arg4 ;
   43505          69 :   double *arg5 = (double *) 0 ;
   43506          69 :   double *arg6 = (double *) 0 ;
   43507          69 :   void *argp1 = 0 ;
   43508          69 :   int res1 = 0 ;
   43509          69 :   double val2 ;
   43510          69 :   int ecode2 = 0 ;
   43511          69 :   double val3 ;
   43512          69 :   int ecode3 = 0 ;
   43513          69 :   double temp5 ;
   43514          69 :   int res5 = SWIG_TMPOBJ ;
   43515          69 :   double temp6 ;
   43516          69 :   int res6 = SWIG_TMPOBJ ;
   43517          69 :   PyObject *swig_obj[4] ;
   43518          69 :   CPLErr result;
   43519             :   
   43520          69 :   arg5 = &temp5;
   43521          69 :   arg6 = &temp6;
   43522          69 :   if (!SWIG_Python_UnpackTuple(args, "Band_InterpolateAtPoint", 4, 4, swig_obj)) SWIG_fail;
   43523          69 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43524          69 :   if (!SWIG_IsOK(res1)) {
   43525           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_InterpolateAtPoint" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43526             :   }
   43527          69 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43528          69 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   43529          69 :   if (!SWIG_IsOK(ecode2)) {
   43530           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_InterpolateAtPoint" "', argument " "2"" of type '" "double""'");
   43531             :   } 
   43532          69 :   arg2 = static_cast< double >(val2);
   43533          69 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   43534          69 :   if (!SWIG_IsOK(ecode3)) {
   43535           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_InterpolateAtPoint" "', argument " "3"" of type '" "double""'");
   43536             :   } 
   43537          69 :   arg3 = static_cast< double >(val3);
   43538          69 :   {
   43539             :     // %typemap(in) GDALRIOResampleAlg
   43540          69 :     int val = 0;
   43541          69 :     int ecode = SWIG_AsVal_int(swig_obj[3], &val);
   43542          69 :     if (!SWIG_IsOK(ecode)) {
   43543           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   43544             :     }
   43545          69 :     if( val < 0 ||
   43546          69 :       ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   43547          69 :         val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   43548             :       val > static_cast<int>(GRIORA_LAST) )
   43549             :     {
   43550           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   43551             :     }
   43552          69 :     arg4 = static_cast< GDALRIOResampleAlg >(val);
   43553             :   }
   43554          69 :   {
   43555          69 :     const int bLocalUseExceptions = GetUseExceptions();
   43556          69 :     if ( bLocalUseExceptions ) {
   43557          68 :       pushErrorHandler();
   43558             :     }
   43559          69 :     {
   43560          69 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43561          69 :       result = (CPLErr)GDALRasterBandShadow_InterpolateAtPoint(arg1,arg2,arg3,arg4,arg5,arg6);
   43562          69 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43563             :     }
   43564          69 :     if ( bLocalUseExceptions ) {
   43565          68 :       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          69 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43577          69 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   43578          69 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   43579             :   } else {
   43580           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43581           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   43582             :   }
   43583          69 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   43584          69 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   43585             :   } else {
   43586           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43587           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   43588             :   }
   43589          71 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   43590             :   return resultobj;
   43591             : fail:
   43592             :   return NULL;
   43593             : }
   43594             : 
   43595             : 
   43596          15 : SWIGINTERN PyObject *_wrap_Band_InterpolateAtGeolocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43597          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43598          15 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43599          15 :   double arg2 ;
   43600          15 :   double arg3 ;
   43601          15 :   OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
   43602          15 :   GDALRIOResampleAlg arg5 ;
   43603          15 :   double *arg6 = (double *) 0 ;
   43604          15 :   double *arg7 = (double *) 0 ;
   43605          15 :   char **arg8 = (char **) NULL ;
   43606          15 :   void *argp1 = 0 ;
   43607          15 :   int res1 = 0 ;
   43608          15 :   double val2 ;
   43609          15 :   int ecode2 = 0 ;
   43610          15 :   double val3 ;
   43611          15 :   int ecode3 = 0 ;
   43612          15 :   void *argp4 = 0 ;
   43613          15 :   int res4 = 0 ;
   43614          15 :   double temp6 ;
   43615          15 :   int res6 = SWIG_TMPOBJ ;
   43616          15 :   double temp7 ;
   43617          15 :   int res7 = SWIG_TMPOBJ ;
   43618          15 :   PyObject *swig_obj[6] ;
   43619          15 :   CPLErr result;
   43620             :   
   43621          15 :   arg6 = &temp6;
   43622          15 :   arg7 = &temp7;
   43623          15 :   if (!SWIG_Python_UnpackTuple(args, "Band_InterpolateAtGeolocation", 5, 6, swig_obj)) SWIG_fail;
   43624          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43625          15 :   if (!SWIG_IsOK(res1)) {
   43626           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_InterpolateAtGeolocation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43627             :   }
   43628          15 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43629          15 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   43630          15 :   if (!SWIG_IsOK(ecode2)) {
   43631           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_InterpolateAtGeolocation" "', argument " "2"" of type '" "double""'");
   43632             :   } 
   43633          15 :   arg2 = static_cast< double >(val2);
   43634          15 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   43635          15 :   if (!SWIG_IsOK(ecode3)) {
   43636           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_InterpolateAtGeolocation" "', argument " "3"" of type '" "double""'");
   43637             :   } 
   43638          15 :   arg3 = static_cast< double >(val3);
   43639          15 :   res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   43640          15 :   if (!SWIG_IsOK(res4)) {
   43641           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Band_InterpolateAtGeolocation" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
   43642             :   }
   43643          15 :   arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
   43644          15 :   {
   43645             :     // %typemap(in) GDALRIOResampleAlg
   43646          15 :     int val = 0;
   43647          15 :     int ecode = SWIG_AsVal_int(swig_obj[4], &val);
   43648          15 :     if (!SWIG_IsOK(ecode)) {
   43649           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   43650             :     }
   43651          15 :     if( val < 0 ||
   43652          15 :       ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   43653          15 :         val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   43654             :       val > static_cast<int>(GRIORA_LAST) )
   43655             :     {
   43656           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   43657             :     }
   43658          15 :     arg5 = static_cast< GDALRIOResampleAlg >(val);
   43659             :   }
   43660          15 :   if (swig_obj[5]) {
   43661           0 :     {
   43662             :       /* %typemap(in) char **dict */
   43663           0 :       arg8 = NULL;
   43664           0 :       if ( PySequence_Check( swig_obj[5] ) ) {
   43665           0 :         int bErr = FALSE;
   43666           0 :         arg8 = CSLFromPySequence(swig_obj[5], &bErr);
   43667           0 :         if ( bErr )
   43668             :         {
   43669           0 :           SWIG_fail;
   43670             :         }
   43671             :       }
   43672           0 :       else if ( PyMapping_Check( swig_obj[5] ) ) {
   43673           0 :         int bErr = FALSE;
   43674           0 :         arg8 = CSLFromPyMapping(swig_obj[5], &bErr);
   43675           0 :         if ( bErr )
   43676             :         {
   43677           0 :           SWIG_fail;
   43678             :         }
   43679             :       }
   43680             :       else {
   43681           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43682           0 :         SWIG_fail;
   43683             :       }
   43684             :     }
   43685             :   }
   43686          15 :   {
   43687          15 :     const int bLocalUseExceptions = GetUseExceptions();
   43688          15 :     if ( bLocalUseExceptions ) {
   43689          15 :       pushErrorHandler();
   43690             :     }
   43691          15 :     {
   43692          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43693          15 :       result = (CPLErr)GDALRasterBandShadow_InterpolateAtGeolocation(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   43694          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43695             :     }
   43696          15 :     if ( bLocalUseExceptions ) {
   43697          15 :       popErrorHandler();
   43698             :     }
   43699             : #ifndef SED_HACKS
   43700             :     if ( bLocalUseExceptions ) {
   43701             :       CPLErr eclass = CPLGetLastErrorType();
   43702             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43703             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43704             :       }
   43705             :     }
   43706             : #endif
   43707             :   }
   43708          15 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43709          15 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   43710          15 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   43711             :   } else {
   43712           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43713           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   43714             :   }
   43715          15 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   43716          15 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   43717             :   } else {
   43718           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43719           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   43720             :   }
   43721          15 :   {
   43722             :     /* %typemap(freearg) char **dict */
   43723          15 :     CSLDestroy( arg8 );
   43724             :   }
   43725          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   43726             :   return resultobj;
   43727           0 : fail:
   43728           0 :   {
   43729             :     /* %typemap(freearg) char **dict */
   43730           0 :     CSLDestroy( arg8 );
   43731             :   }
   43732             :   return NULL;
   43733             : }
   43734             : 
   43735             : 
   43736           2 : SWIGINTERN PyObject *_wrap_Band_ComputeMinMaxLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43737           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43738           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43739           2 :   double *arg2 = (double *) 0 ;
   43740           2 :   double *arg3 = (double *) 0 ;
   43741           2 :   int *arg4 = (int *) 0 ;
   43742           2 :   int *arg5 = (int *) 0 ;
   43743           2 :   int *arg6 = (int *) 0 ;
   43744           2 :   int *arg7 = (int *) 0 ;
   43745           2 :   void *argp1 = 0 ;
   43746           2 :   int res1 = 0 ;
   43747           2 :   double temp2 ;
   43748           2 :   int res2 = SWIG_TMPOBJ ;
   43749           2 :   double temp3 ;
   43750           2 :   int res3 = SWIG_TMPOBJ ;
   43751           2 :   int temp4 ;
   43752           2 :   int res4 = SWIG_TMPOBJ ;
   43753           2 :   int temp5 ;
   43754           2 :   int res5 = SWIG_TMPOBJ ;
   43755           2 :   int temp6 ;
   43756           2 :   int res6 = SWIG_TMPOBJ ;
   43757           2 :   int temp7 ;
   43758           2 :   int res7 = SWIG_TMPOBJ ;
   43759           2 :   PyObject *swig_obj[1] ;
   43760           2 :   CPLErr result;
   43761             :   
   43762           2 :   arg2 = &temp2;
   43763           2 :   arg3 = &temp3;
   43764           2 :   arg4 = &temp4;
   43765           2 :   arg5 = &temp5;
   43766           2 :   arg6 = &temp6;
   43767           2 :   arg7 = &temp7;
   43768           2 :   if (!args) SWIG_fail;
   43769           2 :   swig_obj[0] = args;
   43770           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43771           2 :   if (!SWIG_IsOK(res1)) {
   43772           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeMinMaxLocation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43773             :   }
   43774           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43775           2 :   {
   43776           2 :     const int bLocalUseExceptions = GetUseExceptions();
   43777           2 :     if ( bLocalUseExceptions ) {
   43778           0 :       pushErrorHandler();
   43779             :     }
   43780           2 :     {
   43781           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43782           2 :       result = (CPLErr)GDALRasterBandShadow_ComputeMinMaxLocation(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   43783           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43784             :     }
   43785           2 :     if ( bLocalUseExceptions ) {
   43786           0 :       popErrorHandler();
   43787             :     }
   43788             : #ifndef SED_HACKS
   43789             :     if ( bLocalUseExceptions ) {
   43790             :       CPLErr eclass = CPLGetLastErrorType();
   43791             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43792             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43793             :       }
   43794             :     }
   43795             : #endif
   43796             :   }
   43797           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43798           2 :   if (ReturnSame(SWIG_IsTmpObj(res2))) {
   43799           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
   43800             :   } else {
   43801           0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43802           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
   43803             :   }
   43804           2 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   43805           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   43806             :   } else {
   43807           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43808           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   43809             :   }
   43810           2 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   43811           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
   43812             :   } else {
   43813           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43814           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
   43815             :   }
   43816           2 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   43817           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
   43818             :   } else {
   43819           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43820           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
   43821             :   }
   43822           2 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   43823           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
   43824             :   } else {
   43825           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43826           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
   43827             :   }
   43828           2 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   43829           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)));
   43830             :   } else {
   43831           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43832           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags));
   43833             :   }
   43834           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   43835             :   return resultobj;
   43836             : fail:
   43837             :   return NULL;
   43838             : }
   43839             : 
   43840             : 
   43841          21 : SWIGINTERN PyObject *_wrap_Band_AsMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43842          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43843          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43844          21 :   void *argp1 = 0 ;
   43845          21 :   int res1 = 0 ;
   43846          21 :   PyObject *swig_obj[1] ;
   43847          21 :   GDALMDArrayHS *result = 0 ;
   43848             :   
   43849          21 :   if (!args) SWIG_fail;
   43850          21 :   swig_obj[0] = args;
   43851          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43852          21 :   if (!SWIG_IsOK(res1)) {
   43853           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AsMDArray" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43854             :   }
   43855          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43856          21 :   {
   43857          21 :     const int bLocalUseExceptions = GetUseExceptions();
   43858          21 :     if ( bLocalUseExceptions ) {
   43859           0 :       pushErrorHandler();
   43860             :     }
   43861          21 :     {
   43862          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43863          21 :       result = (GDALMDArrayHS *)GDALRasterBandShadow_AsMDArray(arg1);
   43864          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43865             :     }
   43866          21 :     if ( bLocalUseExceptions ) {
   43867           0 :       popErrorHandler();
   43868             :     }
   43869             : #ifndef SED_HACKS
   43870             :     if ( bLocalUseExceptions ) {
   43871             :       CPLErr eclass = CPLGetLastErrorType();
   43872             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43873             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43874             :       }
   43875             :     }
   43876             : #endif
   43877             :   }
   43878          21 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   43879          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   43880             :   return resultobj;
   43881             : fail:
   43882             :   return NULL;
   43883             : }
   43884             : 
   43885             : 
   43886        4866 : SWIGINTERN PyObject *_wrap_Band__EnablePixelTypeSignedByteWarning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43887        4866 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43888        4866 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43889        4866 :   bool arg2 ;
   43890        4866 :   void *argp1 = 0 ;
   43891        4866 :   int res1 = 0 ;
   43892        4866 :   bool val2 ;
   43893        4866 :   int ecode2 = 0 ;
   43894        4866 :   PyObject *swig_obj[2] ;
   43895             :   
   43896        4866 :   if (!SWIG_Python_UnpackTuple(args, "Band__EnablePixelTypeSignedByteWarning", 2, 2, swig_obj)) SWIG_fail;
   43897        4866 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43898        4866 :   if (!SWIG_IsOK(res1)) {
   43899           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band__EnablePixelTypeSignedByteWarning" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43900             :   }
   43901        4866 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43902        4866 :   ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
   43903        4866 :   if (!SWIG_IsOK(ecode2)) {
   43904           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band__EnablePixelTypeSignedByteWarning" "', argument " "2"" of type '" "bool""'");
   43905             :   } 
   43906        4866 :   arg2 = static_cast< bool >(val2);
   43907        4866 :   {
   43908        4866 :     const int bLocalUseExceptions = GetUseExceptions();
   43909        4866 :     if ( bLocalUseExceptions ) {
   43910        4466 :       pushErrorHandler();
   43911             :     }
   43912        4866 :     {
   43913        4866 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43914        4866 :       GDALRasterBandShadow__EnablePixelTypeSignedByteWarning(arg1,arg2);
   43915        4866 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43916             :     }
   43917        4866 :     if ( bLocalUseExceptions ) {
   43918        4466 :       popErrorHandler();
   43919             :     }
   43920             : #ifndef SED_HACKS
   43921             :     if ( bLocalUseExceptions ) {
   43922             :       CPLErr eclass = CPLGetLastErrorType();
   43923             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43924             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43925             :       }
   43926             :     }
   43927             : #endif
   43928             :   }
   43929        4866 :   resultobj = SWIG_Py_Void();
   43930        4866 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   43931             :   return resultobj;
   43932             : fail:
   43933             :   return NULL;
   43934             : }
   43935             : 
   43936             : 
   43937        9855 : SWIGINTERN PyObject *_wrap_Band_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43938        9855 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43939        9855 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43940        9855 :   double arg2 ;
   43941        9855 :   double arg3 ;
   43942        9855 :   double arg4 ;
   43943        9855 :   double arg5 ;
   43944        9855 :   void **arg6 = (void **) 0 ;
   43945        9855 :   int *arg7 = (int *) 0 ;
   43946        9855 :   int *arg8 = (int *) 0 ;
   43947        9855 :   GDALDataType *arg9 = (GDALDataType *) 0 ;
   43948        9855 :   GIntBig *arg10 = (GIntBig *) 0 ;
   43949        9855 :   GIntBig *arg11 = (GIntBig *) 0 ;
   43950        9855 :   GDALRIOResampleAlg arg12 = (GDALRIOResampleAlg) GRIORA_NearestNeighbour ;
   43951        9855 :   GDALProgressFunc arg13 = (GDALProgressFunc) NULL ;
   43952        9855 :   void *arg14 = (void *) NULL ;
   43953        9855 :   void *arg15 = (void *) NULL ;
   43954        9855 :   void *argp1 = 0 ;
   43955        9855 :   int res1 = 0 ;
   43956        9855 :   double val2 ;
   43957        9855 :   int ecode2 = 0 ;
   43958        9855 :   double val3 ;
   43959        9855 :   int ecode3 = 0 ;
   43960        9855 :   double val4 ;
   43961        9855 :   int ecode4 = 0 ;
   43962        9855 :   double val5 ;
   43963        9855 :   int ecode5 = 0 ;
   43964        9855 :   void *pyObject6 = NULL ;
   43965        9855 :   int val7 ;
   43966        9855 :   int val8 ;
   43967        9855 :   GDALDataType val9 ;
   43968        9855 :   GIntBig val10 ;
   43969        9855 :   GIntBig val11 ;
   43970        9855 :   PyObject * obj0 = 0 ;
   43971        9855 :   PyObject * obj1 = 0 ;
   43972        9855 :   PyObject * obj2 = 0 ;
   43973        9855 :   PyObject * obj3 = 0 ;
   43974        9855 :   PyObject * obj4 = 0 ;
   43975        9855 :   PyObject * obj5 = 0 ;
   43976        9855 :   PyObject * obj6 = 0 ;
   43977        9855 :   PyObject * obj7 = 0 ;
   43978        9855 :   PyObject * obj8 = 0 ;
   43979        9855 :   PyObject * obj9 = 0 ;
   43980        9855 :   PyObject * obj10 = 0 ;
   43981        9855 :   PyObject * obj11 = 0 ;
   43982        9855 :   PyObject * obj12 = 0 ;
   43983        9855 :   PyObject * obj13 = 0 ;
   43984        9855 :   char * kwnames[] = {
   43985             :     (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 
   43986             :   };
   43987        9855 :   CPLErr result;
   43988             :   
   43989             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   43990        9855 :   PyProgressData *psProgressInfo;
   43991        9855 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   43992        9855 :   psProgressInfo->nLastReported = -1;
   43993        9855 :   psProgressInfo->psPyCallback = NULL;
   43994        9855 :   psProgressInfo->psPyCallbackData = NULL;
   43995        9855 :   arg14 = psProgressInfo;
   43996        9855 :   {
   43997             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   43998        9855 :     arg6 = &pyObject6;
   43999             :   }
   44000        9855 :   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;
   44001        9855 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44002        9855 :   if (!SWIG_IsOK(res1)) {
   44003           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadRaster1" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44004             :   }
   44005        9855 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44006        9855 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   44007        9855 :   if (!SWIG_IsOK(ecode2)) {
   44008           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadRaster1" "', argument " "2"" of type '" "double""'");
   44009             :   } 
   44010        9855 :   arg2 = static_cast< double >(val2);
   44011        9855 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   44012        9855 :   if (!SWIG_IsOK(ecode3)) {
   44013           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadRaster1" "', argument " "3"" of type '" "double""'");
   44014             :   } 
   44015        9855 :   arg3 = static_cast< double >(val3);
   44016        9855 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   44017        9855 :   if (!SWIG_IsOK(ecode4)) {
   44018           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ReadRaster1" "', argument " "4"" of type '" "double""'");
   44019             :   } 
   44020        9855 :   arg4 = static_cast< double >(val4);
   44021        9855 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   44022        9855 :   if (!SWIG_IsOK(ecode5)) {
   44023           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ReadRaster1" "', argument " "5"" of type '" "double""'");
   44024             :   } 
   44025        9855 :   arg5 = static_cast< double >(val5);
   44026        9855 :   if (obj5) {
   44027        9855 :     {
   44028             :       /* %typemap(in) (int *optional_##int) */
   44029        9855 :       if ( obj5 == Py_None ) {
   44030             :         arg7 = 0;
   44031             :       }
   44032        1291 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   44033             :         arg7 = (int *) &val7;
   44034             :       }
   44035             :       else {
   44036           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   44037           0 :         SWIG_fail;
   44038             :       }
   44039             :     }
   44040             :   }
   44041        9855 :   if (obj6) {
   44042        9855 :     {
   44043             :       /* %typemap(in) (int *optional_##int) */
   44044        9855 :       if ( obj6 == Py_None ) {
   44045             :         arg8 = 0;
   44046             :       }
   44047        1289 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   44048             :         arg8 = (int *) &val8;
   44049             :       }
   44050             :       else {
   44051           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   44052           0 :         SWIG_fail;
   44053             :       }
   44054             :     }
   44055             :   }
   44056        9855 :   if (obj7) {
   44057        9855 :     {
   44058             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   44059        9855 :       int intval = 0;
   44060        9855 :       if ( obj7 == Py_None ) {
   44061             :         arg9 = NULL;
   44062             :       }
   44063        2196 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj7, &intval)) ) {
   44064        1098 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   44065             :         {
   44066           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   44067             :         }
   44068        1098 :         val9 = static_cast<GDALDataType>(intval);
   44069        1098 :         arg9 = &val9;
   44070             :       }
   44071             :       else {
   44072           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   44073           0 :         SWIG_fail;
   44074             :       }
   44075             :     }
   44076             :   }
   44077        9855 :   if (obj8) {
   44078        9855 :     {
   44079             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   44080        9855 :       if ( obj8 == Py_None ) {
   44081             :         arg10 = 0;
   44082             :       }
   44083         168 :       else if ( PyArg_Parse( obj8,"L" ,&val10 ) ) {
   44084             :         arg10 = (GIntBig *) &val10;
   44085             :       }
   44086             :       else {
   44087           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   44088           0 :         SWIG_fail;
   44089             :       }
   44090             :     }
   44091             :   }
   44092        9855 :   if (obj9) {
   44093        9855 :     {
   44094             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   44095        9855 :       if ( obj9 == Py_None ) {
   44096             :         arg11 = 0;
   44097             :       }
   44098          10 :       else if ( PyArg_Parse( obj9,"L" ,&val11 ) ) {
   44099             :         arg11 = (GIntBig *) &val11;
   44100             :       }
   44101             :       else {
   44102           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   44103           0 :         SWIG_fail;
   44104             :       }
   44105             :     }
   44106             :   }
   44107        9855 :   if (obj10) {
   44108        9855 :     {
   44109             :       // %typemap(in) GDALRIOResampleAlg
   44110        9855 :       int val = 0;
   44111        9855 :       int ecode = SWIG_AsVal_int(obj10, &val);
   44112        9855 :       if (!SWIG_IsOK(ecode)) {
   44113           1 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   44114             :       }
   44115        9854 :       if( val < 0 ||
   44116        9853 :         ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   44117        9852 :           val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   44118             :         val > static_cast<int>(GRIORA_LAST) )
   44119             :       {
   44120           2 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   44121             :       }
   44122             :       arg12 = static_cast< GDALRIOResampleAlg >(val);
   44123             :     }
   44124             :   }
   44125        9852 :   if (obj11) {
   44126        9852 :     {
   44127             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   44128             :       /* callback_func typemap */
   44129             :       
   44130             :       /* In some cases 0 is passed instead of None. */
   44131             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   44132        9852 :       if ( PyLong_Check(obj11) || PyInt_Check(obj11) )
   44133             :       {
   44134           0 :         if( PyLong_AsLong(obj11) == 0 )
   44135             :         {
   44136           0 :           obj11 = Py_None;
   44137             :         }
   44138             :       }
   44139             :       
   44140        9852 :       if (obj11 && obj11 != Py_None ) {
   44141          19 :         void* cbfunction = NULL;
   44142          19 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj11,
   44143             :             (void**)&cbfunction,
   44144             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   44145             :             SWIG_POINTER_EXCEPTION | 0 ));
   44146             :         
   44147          19 :         if ( cbfunction == GDALTermProgress ) {
   44148             :           arg13 = GDALTermProgress;
   44149             :         } else {
   44150          19 :           if (!PyCallable_Check(obj11)) {
   44151           0 :             PyErr_SetString( PyExc_RuntimeError,
   44152             :               "Object given is not a Python function" );
   44153           0 :             SWIG_fail;
   44154             :           }
   44155          19 :           psProgressInfo->psPyCallback = obj11;
   44156          19 :           arg13 = PyProgressProxy;
   44157             :         }
   44158             :         
   44159             :       }
   44160             :       
   44161             :     }
   44162             :   }
   44163        9852 :   if (obj12) {
   44164        9852 :     {
   44165             :       /* %typemap(in) ( void* callback_data=NULL)  */
   44166        9852 :       psProgressInfo->psPyCallbackData = obj12 ;
   44167             :     }
   44168             :   }
   44169        9852 :   if (obj13) {
   44170        9852 :     {
   44171             :       /* %typemap(in) ( void *inPythonObject ) */
   44172        9852 :       arg15 = obj13;
   44173             :     }
   44174             :   }
   44175        9852 :   {
   44176        9852 :     const int bLocalUseExceptions = GetUseExceptions();
   44177        9852 :     if ( bLocalUseExceptions ) {
   44178        4476 :       pushErrorHandler();
   44179             :     }
   44180        9852 :     {
   44181        9852 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44182        9852 :       result = (CPLErr)GDALRasterBandShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   44183        9852 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44184             :     }
   44185        9852 :     if ( bLocalUseExceptions ) {
   44186        4476 :       popErrorHandler();
   44187             :     }
   44188             : #ifndef SED_HACKS
   44189             :     if ( bLocalUseExceptions ) {
   44190             :       CPLErr eclass = CPLGetLastErrorType();
   44191             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44192             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44193             :       }
   44194             :     }
   44195             : #endif
   44196             :   }
   44197        9852 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44198        9852 :   {
   44199             :     /* %typemap(argout) ( void **outPythonObject ) */
   44200        9852 :     Py_XDECREF(resultobj);
   44201        9852 :     if (*arg6)
   44202             :     {
   44203             :       resultobj = (PyObject*)*arg6;
   44204             :     }
   44205             :     else
   44206             :     {
   44207          50 :       resultobj = Py_None;
   44208          50 :       Py_INCREF(resultobj);
   44209             :     }
   44210             :   }
   44211        9852 :   {
   44212             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   44213             :     
   44214        9852 :     CPLFree(psProgressInfo);
   44215             :     
   44216             :   }
   44217        9867 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44218             :   return resultobj;
   44219           3 : fail:
   44220           3 :   {
   44221             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   44222             :     
   44223           3 :     CPLFree(psProgressInfo);
   44224             :     
   44225             :   }
   44226             :   return NULL;
   44227             : }
   44228             : 
   44229             : 
   44230          82 : SWIGINTERN PyObject *_wrap_Band_ReadBlock(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   44231          82 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44232          82 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44233          82 :   int arg2 ;
   44234          82 :   int arg3 ;
   44235          82 :   void **arg4 = (void **) 0 ;
   44236          82 :   void *arg5 = (void *) NULL ;
   44237          82 :   void *argp1 = 0 ;
   44238          82 :   int res1 = 0 ;
   44239          82 :   int val2 ;
   44240          82 :   int ecode2 = 0 ;
   44241          82 :   int val3 ;
   44242          82 :   int ecode3 = 0 ;
   44243          82 :   void *pyObject4 = NULL ;
   44244          82 :   PyObject * obj0 = 0 ;
   44245          82 :   PyObject * obj1 = 0 ;
   44246          82 :   PyObject * obj2 = 0 ;
   44247          82 :   PyObject * obj3 = 0 ;
   44248          82 :   char * kwnames[] = {
   44249             :     (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"buf_obj",  NULL 
   44250             :   };
   44251          82 :   CPLErr result;
   44252             :   
   44253          82 :   {
   44254             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject4 = NULL ) */
   44255          82 :     arg4 = &pyObject4;
   44256             :   }
   44257          82 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:Band_ReadBlock", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   44258          82 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44259          82 :   if (!SWIG_IsOK(res1)) {
   44260           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadBlock" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44261             :   }
   44262          82 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44263          82 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   44264          82 :   if (!SWIG_IsOK(ecode2)) {
   44265           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadBlock" "', argument " "2"" of type '" "int""'");
   44266             :   } 
   44267          82 :   arg2 = static_cast< int >(val2);
   44268          82 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   44269          82 :   if (!SWIG_IsOK(ecode3)) {
   44270           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadBlock" "', argument " "3"" of type '" "int""'");
   44271             :   } 
   44272          82 :   arg3 = static_cast< int >(val3);
   44273          82 :   if (obj3) {
   44274          25 :     {
   44275             :       /* %typemap(in) ( void *inPythonObject ) */
   44276          25 :       arg5 = obj3;
   44277             :     }
   44278             :   }
   44279          82 :   {
   44280          82 :     const int bLocalUseExceptions = GetUseExceptions();
   44281          82 :     if ( bLocalUseExceptions ) {
   44282          26 :       pushErrorHandler();
   44283             :     }
   44284          82 :     {
   44285          82 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44286          82 :       result = (CPLErr)GDALRasterBandShadow_ReadBlock(arg1,arg2,arg3,arg4,arg5);
   44287          82 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44288             :     }
   44289          82 :     if ( bLocalUseExceptions ) {
   44290          26 :       popErrorHandler();
   44291             :     }
   44292             : #ifndef SED_HACKS
   44293             :     if ( bLocalUseExceptions ) {
   44294             :       CPLErr eclass = CPLGetLastErrorType();
   44295             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44296             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44297             :       }
   44298             :     }
   44299             : #endif
   44300             :   }
   44301          82 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44302          82 :   {
   44303             :     /* %typemap(argout) ( void **outPythonObject ) */
   44304          82 :     Py_XDECREF(resultobj);
   44305          82 :     if (*arg4)
   44306             :     {
   44307             :       resultobj = (PyObject*)*arg4;
   44308             :     }
   44309             :     else
   44310             :     {
   44311          16 :       resultobj = Py_None;
   44312          16 :       Py_INCREF(resultobj);
   44313             :     }
   44314             :   }
   44315          82 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44316             :   return resultobj;
   44317             : fail:
   44318             :   return NULL;
   44319             : }
   44320             : 
   44321             : 
   44322         276 : SWIGINTERN PyObject *Band_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44323         276 :   PyObject *obj;
   44324         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   44325         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterBandShadow, SWIG_NewClientData(obj));
   44326         276 :   return SWIG_Py_Void();
   44327             : }
   44328             : 
   44329          56 : SWIGINTERN PyObject *_wrap_new_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   44330          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44331          56 :   GDALPaletteInterp arg1 = (GDALPaletteInterp) GPI_RGB ;
   44332          56 :   int val1 ;
   44333          56 :   int ecode1 = 0 ;
   44334          56 :   PyObject * obj0 = 0 ;
   44335          56 :   char * kwnames[] = {
   44336             :     (char *)"palette",  NULL 
   44337             :   };
   44338          56 :   GDALColorTableShadow *result = 0 ;
   44339             :   
   44340          56 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:new_ColorTable", kwnames, &obj0)) SWIG_fail;
   44341          56 :   if (obj0) {
   44342           0 :     ecode1 = SWIG_AsVal_int(obj0, &val1);
   44343           0 :     if (!SWIG_IsOK(ecode1)) {
   44344           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ColorTable" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   44345             :     } 
   44346           0 :     arg1 = static_cast< GDALPaletteInterp >(val1);
   44347             :   }
   44348          56 :   {
   44349          56 :     const int bLocalUseExceptions = GetUseExceptions();
   44350          56 :     if ( bLocalUseExceptions ) {
   44351          28 :       pushErrorHandler();
   44352             :     }
   44353          56 :     {
   44354          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44355          56 :       result = (GDALColorTableShadow *)new_GDALColorTableShadow(arg1);
   44356          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44357             :     }
   44358          56 :     if ( bLocalUseExceptions ) {
   44359          28 :       popErrorHandler();
   44360             :     }
   44361             : #ifndef SED_HACKS
   44362             :     if ( bLocalUseExceptions ) {
   44363             :       CPLErr eclass = CPLGetLastErrorType();
   44364             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44365             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44366             :       }
   44367             :     }
   44368             : #endif
   44369             :   }
   44370          56 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_NEW |  0 );
   44371          56 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44372             :   return resultobj;
   44373             : fail:
   44374             :   return NULL;
   44375             : }
   44376             : 
   44377             : 
   44378          68 : SWIGINTERN PyObject *_wrap_delete_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44379          68 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44380          68 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   44381          68 :   void *argp1 = 0 ;
   44382          68 :   int res1 = 0 ;
   44383          68 :   PyObject *swig_obj[1] ;
   44384             :   
   44385          68 :   if (!args) SWIG_fail;
   44386          68 :   swig_obj[0] = args;
   44387          68 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_DISOWN |  0 );
   44388          68 :   if (!SWIG_IsOK(res1)) {
   44389           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ColorTable" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   44390             :   }
   44391          68 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   44392          68 :   {
   44393          68 :     const int bLocalUseExceptions = GetUseExceptions();
   44394          68 :     if ( bLocalUseExceptions ) {
   44395          36 :       pushErrorHandler();
   44396             :     }
   44397          68 :     {
   44398          68 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44399          68 :       delete_GDALColorTableShadow(arg1);
   44400          68 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44401             :     }
   44402          68 :     if ( bLocalUseExceptions ) {
   44403          36 :       popErrorHandler();
   44404             :     }
   44405             : #ifndef SED_HACKS
   44406             :     if ( bLocalUseExceptions ) {
   44407             :       CPLErr eclass = CPLGetLastErrorType();
   44408             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44409             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44410             :       }
   44411             :     }
   44412             : #endif
   44413             :   }
   44414          68 :   resultobj = SWIG_Py_Void();
   44415          68 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44416             :   return resultobj;
   44417             : fail:
   44418             :   return NULL;
   44419             : }
   44420             : 
   44421             : 
   44422          12 : SWIGINTERN PyObject *_wrap_ColorTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44423          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44424          12 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   44425          12 :   void *argp1 = 0 ;
   44426          12 :   int res1 = 0 ;
   44427          12 :   PyObject *swig_obj[1] ;
   44428          12 :   GDALColorTableShadow *result = 0 ;
   44429             :   
   44430          12 :   if (!args) SWIG_fail;
   44431          12 :   swig_obj[0] = args;
   44432          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   44433          12 :   if (!SWIG_IsOK(res1)) {
   44434           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_Clone" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   44435             :   }
   44436          12 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   44437          12 :   {
   44438          12 :     const int bLocalUseExceptions = GetUseExceptions();
   44439          12 :     if ( bLocalUseExceptions ) {
   44440           8 :       pushErrorHandler();
   44441             :     }
   44442          12 :     {
   44443          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44444          12 :       result = (GDALColorTableShadow *)GDALColorTableShadow_Clone(arg1);
   44445          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44446             :     }
   44447          12 :     if ( bLocalUseExceptions ) {
   44448           8 :       popErrorHandler();
   44449             :     }
   44450             : #ifndef SED_HACKS
   44451             :     if ( bLocalUseExceptions ) {
   44452             :       CPLErr eclass = CPLGetLastErrorType();
   44453             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44454             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44455             :       }
   44456             :     }
   44457             : #endif
   44458             :   }
   44459          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_OWN |  0 );
   44460          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44461             :   return resultobj;
   44462             : fail:
   44463             :   return NULL;
   44464             : }
   44465             : 
   44466             : 
   44467           2 : SWIGINTERN PyObject *_wrap_ColorTable_GetPaletteInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44468           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44469           2 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   44470           2 :   void *argp1 = 0 ;
   44471           2 :   int res1 = 0 ;
   44472           2 :   PyObject *swig_obj[1] ;
   44473           2 :   GDALPaletteInterp result;
   44474             :   
   44475           2 :   if (!args) SWIG_fail;
   44476           2 :   swig_obj[0] = args;
   44477           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   44478           2 :   if (!SWIG_IsOK(res1)) {
   44479           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetPaletteInterpretation" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   44480             :   }
   44481           2 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   44482           2 :   {
   44483           2 :     const int bLocalUseExceptions = GetUseExceptions();
   44484           2 :     if ( bLocalUseExceptions ) {
   44485           0 :       pushErrorHandler();
   44486             :     }
   44487           2 :     {
   44488           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44489           2 :       result = (GDALPaletteInterp)GDALColorTableShadow_GetPaletteInterpretation(arg1);
   44490           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44491             :     }
   44492           2 :     if ( bLocalUseExceptions ) {
   44493           0 :       popErrorHandler();
   44494             :     }
   44495             : #ifndef SED_HACKS
   44496             :     if ( bLocalUseExceptions ) {
   44497             :       CPLErr eclass = CPLGetLastErrorType();
   44498             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44499             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44500             :       }
   44501             :     }
   44502             : #endif
   44503             :   }
   44504           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44505           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44506             :   return resultobj;
   44507             : fail:
   44508             :   return NULL;
   44509             : }
   44510             : 
   44511             : 
   44512          73 : SWIGINTERN PyObject *_wrap_ColorTable_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44513          73 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44514          73 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   44515          73 :   void *argp1 = 0 ;
   44516          73 :   int res1 = 0 ;
   44517          73 :   PyObject *swig_obj[1] ;
   44518          73 :   int result;
   44519             :   
   44520          73 :   if (!args) SWIG_fail;
   44521          73 :   swig_obj[0] = args;
   44522          73 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   44523          73 :   if (!SWIG_IsOK(res1)) {
   44524           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetCount" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   44525             :   }
   44526          73 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   44527          73 :   {
   44528          73 :     const int bLocalUseExceptions = GetUseExceptions();
   44529          73 :     if ( bLocalUseExceptions ) {
   44530          52 :       pushErrorHandler();
   44531             :     }
   44532          73 :     {
   44533          73 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44534          73 :       result = (int)GDALColorTableShadow_GetColorEntryCount(arg1);
   44535          73 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44536             :     }
   44537          73 :     if ( bLocalUseExceptions ) {
   44538          52 :       popErrorHandler();
   44539             :     }
   44540             : #ifndef SED_HACKS
   44541             :     if ( bLocalUseExceptions ) {
   44542             :       CPLErr eclass = CPLGetLastErrorType();
   44543             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44544             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44545             :       }
   44546             :     }
   44547             : #endif
   44548             :   }
   44549          73 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44550          73 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44551             :   return resultobj;
   44552             : fail:
   44553             :   return NULL;
   44554             : }
   44555             : 
   44556             : 
   44557        4669 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44558        4669 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44559        4669 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   44560        4669 :   int arg2 ;
   44561        4669 :   void *argp1 = 0 ;
   44562        4669 :   int res1 = 0 ;
   44563        4669 :   int val2 ;
   44564        4669 :   int ecode2 = 0 ;
   44565        4669 :   PyObject *swig_obj[2] ;
   44566        4669 :   GDALColorEntry *result = 0 ;
   44567             :   
   44568        4669 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_GetColorEntry", 2, 2, swig_obj)) SWIG_fail;
   44569        4669 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   44570        4669 :   if (!SWIG_IsOK(res1)) {
   44571           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   44572             :   }
   44573        4669 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   44574        4669 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44575        4669 :   if (!SWIG_IsOK(ecode2)) {
   44576           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntry" "', argument " "2"" of type '" "int""'");
   44577             :   } 
   44578        4669 :   arg2 = static_cast< int >(val2);
   44579        4669 :   {
   44580        4669 :     const int bLocalUseExceptions = GetUseExceptions();
   44581        4669 :     if ( bLocalUseExceptions ) {
   44582        4584 :       pushErrorHandler();
   44583             :     }
   44584        4669 :     {
   44585        4669 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44586        4669 :       result = (GDALColorEntry *)GDALColorTableShadow_GetColorEntry(arg1,arg2);
   44587        4669 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44588             :     }
   44589        4669 :     if ( bLocalUseExceptions ) {
   44590        4584 :       popErrorHandler();
   44591             :     }
   44592             : #ifndef SED_HACKS
   44593             :     if ( bLocalUseExceptions ) {
   44594             :       CPLErr eclass = CPLGetLastErrorType();
   44595             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44596             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44597             :       }
   44598             :     }
   44599             : #endif
   44600             :   }
   44601        4669 :   {
   44602             :     /* %typemap(out) GDALColorEntry* */
   44603        4669 :     if ( result != NULL )
   44604        4669 :     resultobj = Py_BuildValue( "(hhhh)", (*result).c1,(*result).c2,(*result).c3,(*result).c4);
   44605             :     else
   44606             :     resultobj = NULL;
   44607             :   }
   44608        4669 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44609             :   return resultobj;
   44610             : fail:
   44611             :   return NULL;
   44612             : }
   44613             : 
   44614             : 
   44615           0 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntryAsRGB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44616           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44617           0 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   44618           0 :   int arg2 ;
   44619           0 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   44620           0 :   void *argp1 = 0 ;
   44621           0 :   int res1 = 0 ;
   44622           0 :   int val2 ;
   44623           0 :   int ecode2 = 0 ;
   44624           0 :   GDALColorEntry ce3 ;
   44625           0 :   PyObject *swig_obj[3] ;
   44626           0 :   int result;
   44627             :   
   44628           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_GetColorEntryAsRGB", 3, 3, swig_obj)) SWIG_fail;
   44629           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   44630           0 :   if (!SWIG_IsOK(res1)) {
   44631           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   44632             :   }
   44633           0 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   44634           0 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44635           0 :   if (!SWIG_IsOK(ecode2)) {
   44636           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "2"" of type '" "int""'");
   44637             :   } 
   44638           0 :   arg2 = static_cast< int >(val2);
   44639           0 :   {
   44640             :     /* %typemap(in) GDALColorEntry* */
   44641           0 :     ce3.c4 = 255;
   44642           0 :     if (! PySequence_Check(swig_obj[2]) ) {
   44643           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   44644           0 :       SWIG_fail;
   44645             :     }
   44646           0 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   44647           0 :     if ( size > 4 ) {
   44648           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   44649           0 :       SWIG_fail;
   44650             :     }
   44651           0 :     if ( size < 3 ) {
   44652           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   44653           0 :       SWIG_fail;
   44654             :     }
   44655           0 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   44656           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   44657           0 :       SWIG_fail;
   44658             :     }
   44659           0 :     arg3 = &ce3;
   44660             :   }
   44661           0 :   {
   44662           0 :     const int bLocalUseExceptions = GetUseExceptions();
   44663           0 :     if ( bLocalUseExceptions ) {
   44664           0 :       pushErrorHandler();
   44665             :     }
   44666           0 :     {
   44667           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44668           0 :       result = (int)GDALColorTableShadow_GetColorEntryAsRGB(arg1,arg2,arg3);
   44669           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44670             :     }
   44671           0 :     if ( bLocalUseExceptions ) {
   44672           0 :       popErrorHandler();
   44673             :     }
   44674             : #ifndef SED_HACKS
   44675             :     if ( bLocalUseExceptions ) {
   44676             :       CPLErr eclass = CPLGetLastErrorType();
   44677             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44678             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44679             :       }
   44680             :     }
   44681             : #endif
   44682             :   }
   44683           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44684           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44685             :   return resultobj;
   44686             : fail:
   44687             :   return NULL;
   44688             : }
   44689             : 
   44690             : 
   44691        1379 : SWIGINTERN PyObject *_wrap_ColorTable_SetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44692        1379 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44693        1379 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   44694        1379 :   int arg2 ;
   44695        1379 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   44696        1379 :   void *argp1 = 0 ;
   44697        1379 :   int res1 = 0 ;
   44698        1379 :   int val2 ;
   44699        1379 :   int ecode2 = 0 ;
   44700        1379 :   GDALColorEntry ce3 ;
   44701        1379 :   PyObject *swig_obj[3] ;
   44702             :   
   44703        1379 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_SetColorEntry", 3, 3, swig_obj)) SWIG_fail;
   44704        1379 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   44705        1379 :   if (!SWIG_IsOK(res1)) {
   44706           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_SetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   44707             :   }
   44708        1379 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   44709        1379 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44710        1379 :   if (!SWIG_IsOK(ecode2)) {
   44711           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_SetColorEntry" "', argument " "2"" of type '" "int""'");
   44712             :   } 
   44713        1379 :   arg2 = static_cast< int >(val2);
   44714        1379 :   {
   44715             :     /* %typemap(in) GDALColorEntry* */
   44716        1379 :     ce3.c4 = 255;
   44717        1379 :     if (! PySequence_Check(swig_obj[2]) ) {
   44718           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   44719           0 :       SWIG_fail;
   44720             :     }
   44721        1379 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   44722        1379 :     if ( size > 4 ) {
   44723           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   44724           0 :       SWIG_fail;
   44725             :     }
   44726        1379 :     if ( size < 3 ) {
   44727           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   44728           0 :       SWIG_fail;
   44729             :     }
   44730        1379 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   44731           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   44732           0 :       SWIG_fail;
   44733             :     }
   44734        1379 :     arg3 = &ce3;
   44735             :   }
   44736        1379 :   {
   44737        1379 :     const int bLocalUseExceptions = GetUseExceptions();
   44738        1379 :     if ( bLocalUseExceptions ) {
   44739        1313 :       pushErrorHandler();
   44740             :     }
   44741        1379 :     {
   44742        1379 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44743        1379 :       GDALColorTableShadow_SetColorEntry(arg1,arg2,(GDALColorEntry const *)arg3);
   44744        1379 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44745             :     }
   44746        1379 :     if ( bLocalUseExceptions ) {
   44747        1313 :       popErrorHandler();
   44748             :     }
   44749             : #ifndef SED_HACKS
   44750             :     if ( bLocalUseExceptions ) {
   44751             :       CPLErr eclass = CPLGetLastErrorType();
   44752             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44753             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44754             :       }
   44755             :     }
   44756             : #endif
   44757             :   }
   44758        1379 :   resultobj = SWIG_Py_Void();
   44759        1379 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44760             :   return resultobj;
   44761             : fail:
   44762             :   return NULL;
   44763             : }
   44764             : 
   44765             : 
   44766           1 : SWIGINTERN PyObject *_wrap_ColorTable_CreateColorRamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44767           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44768           1 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   44769           1 :   int arg2 ;
   44770           1 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   44771           1 :   int arg4 ;
   44772           1 :   GDALColorEntry *arg5 = (GDALColorEntry *) 0 ;
   44773           1 :   void *argp1 = 0 ;
   44774           1 :   int res1 = 0 ;
   44775           1 :   int val2 ;
   44776           1 :   int ecode2 = 0 ;
   44777           1 :   GDALColorEntry ce3 ;
   44778           1 :   int val4 ;
   44779           1 :   int ecode4 = 0 ;
   44780           1 :   GDALColorEntry ce5 ;
   44781           1 :   PyObject *swig_obj[5] ;
   44782             :   
   44783           1 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_CreateColorRamp", 5, 5, swig_obj)) SWIG_fail;
   44784           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   44785           1 :   if (!SWIG_IsOK(res1)) {
   44786           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_CreateColorRamp" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   44787             :   }
   44788           1 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   44789           1 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44790           1 :   if (!SWIG_IsOK(ecode2)) {
   44791           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_CreateColorRamp" "', argument " "2"" of type '" "int""'");
   44792             :   } 
   44793           1 :   arg2 = static_cast< int >(val2);
   44794           1 :   {
   44795             :     /* %typemap(in) GDALColorEntry* */
   44796           1 :     ce3.c4 = 255;
   44797           1 :     if (! PySequence_Check(swig_obj[2]) ) {
   44798           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   44799           0 :       SWIG_fail;
   44800             :     }
   44801           1 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   44802           1 :     if ( size > 4 ) {
   44803           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   44804           0 :       SWIG_fail;
   44805             :     }
   44806           1 :     if ( size < 3 ) {
   44807           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   44808           0 :       SWIG_fail;
   44809             :     }
   44810           1 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   44811           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   44812           0 :       SWIG_fail;
   44813             :     }
   44814           1 :     arg3 = &ce3;
   44815             :   }
   44816           1 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   44817           1 :   if (!SWIG_IsOK(ecode4)) {
   44818           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ColorTable_CreateColorRamp" "', argument " "4"" of type '" "int""'");
   44819             :   } 
   44820           1 :   arg4 = static_cast< int >(val4);
   44821           1 :   {
   44822             :     /* %typemap(in) GDALColorEntry* */
   44823           1 :     ce5.c4 = 255;
   44824           1 :     if (! PySequence_Check(swig_obj[4]) ) {
   44825           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   44826           0 :       SWIG_fail;
   44827             :     }
   44828           1 :     Py_ssize_t size = PySequence_Size(swig_obj[4]);
   44829           1 :     if ( size > 4 ) {
   44830           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   44831           0 :       SWIG_fail;
   44832             :     }
   44833           1 :     if ( size < 3 ) {
   44834           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   44835           0 :       SWIG_fail;
   44836             :     }
   44837           1 :     if ( !PyArg_ParseTuple( swig_obj[4],"hhh|h", &ce5.c1, &ce5.c2, &ce5.c3, &ce5.c4 ) ) {
   44838           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   44839           0 :       SWIG_fail;
   44840             :     }
   44841           1 :     arg5 = &ce5;
   44842             :   }
   44843           1 :   {
   44844           1 :     const int bLocalUseExceptions = GetUseExceptions();
   44845           1 :     if ( bLocalUseExceptions ) {
   44846           1 :       pushErrorHandler();
   44847             :     }
   44848           1 :     {
   44849           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44850           1 :       GDALColorTableShadow_CreateColorRamp(arg1,arg2,(GDALColorEntry const *)arg3,arg4,(GDALColorEntry const *)arg5);
   44851           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44852             :     }
   44853           1 :     if ( bLocalUseExceptions ) {
   44854           1 :       popErrorHandler();
   44855             :     }
   44856             : #ifndef SED_HACKS
   44857             :     if ( bLocalUseExceptions ) {
   44858             :       CPLErr eclass = CPLGetLastErrorType();
   44859             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44860             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44861             :       }
   44862             :     }
   44863             : #endif
   44864             :   }
   44865           1 :   resultobj = SWIG_Py_Void();
   44866           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44867             :   return resultobj;
   44868             : fail:
   44869             :   return NULL;
   44870             : }
   44871             : 
   44872             : 
   44873         276 : SWIGINTERN PyObject *ColorTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44874         276 :   PyObject *obj;
   44875         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   44876         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorTableShadow, SWIG_NewClientData(obj));
   44877         276 :   return SWIG_Py_Void();
   44878             : }
   44879             : 
   44880          56 : SWIGINTERN PyObject *ColorTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44881          56 :   return SWIG_Python_InitShadowInstance(args);
   44882             : }
   44883             : 
   44884          60 : SWIGINTERN PyObject *_wrap_delete_SubdatasetInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44885          60 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44886          60 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   44887          60 :   void *argp1 = 0 ;
   44888          60 :   int res1 = 0 ;
   44889          60 :   PyObject *swig_obj[1] ;
   44890             :   
   44891          60 :   if (!args) SWIG_fail;
   44892          60 :   swig_obj[0] = args;
   44893          60 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, SWIG_POINTER_DISOWN |  0 );
   44894          60 :   if (!SWIG_IsOK(res1)) {
   44895           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SubdatasetInfo" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   44896             :   }
   44897          60 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   44898          60 :   {
   44899          60 :     const int bLocalUseExceptions = GetUseExceptions();
   44900          60 :     if ( bLocalUseExceptions ) {
   44901          36 :       pushErrorHandler();
   44902             :     }
   44903          60 :     {
   44904          60 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44905          60 :       delete_GDALSubdatasetInfoShadow(arg1);
   44906          60 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44907             :     }
   44908          60 :     if ( bLocalUseExceptions ) {
   44909          36 :       popErrorHandler();
   44910             :     }
   44911             : #ifndef SED_HACKS
   44912             :     if ( bLocalUseExceptions ) {
   44913             :       CPLErr eclass = CPLGetLastErrorType();
   44914             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44915             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44916             :       }
   44917             :     }
   44918             : #endif
   44919             :   }
   44920          60 :   resultobj = SWIG_Py_Void();
   44921          60 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44922             :   return resultobj;
   44923             : fail:
   44924             :   return NULL;
   44925             : }
   44926             : 
   44927             : 
   44928          35 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_GetPathComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44929          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44930          35 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   44931          35 :   void *argp1 = 0 ;
   44932          35 :   int res1 = 0 ;
   44933          35 :   PyObject *swig_obj[1] ;
   44934          35 :   retStringAndCPLFree *result = 0 ;
   44935             :   
   44936          35 :   if (!args) SWIG_fail;
   44937          35 :   swig_obj[0] = args;
   44938          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   44939          35 :   if (!SWIG_IsOK(res1)) {
   44940           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_GetPathComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   44941             :   }
   44942          35 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   44943          35 :   {
   44944          35 :     const int bLocalUseExceptions = GetUseExceptions();
   44945          35 :     if ( bLocalUseExceptions ) {
   44946          19 :       pushErrorHandler();
   44947             :     }
   44948          35 :     {
   44949          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44950          35 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_GetPathComponent(arg1);
   44951          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44952             :     }
   44953          35 :     if ( bLocalUseExceptions ) {
   44954          19 :       popErrorHandler();
   44955             :     }
   44956             : #ifndef SED_HACKS
   44957             :     if ( bLocalUseExceptions ) {
   44958             :       CPLErr eclass = CPLGetLastErrorType();
   44959             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44960             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44961             :       }
   44962             :     }
   44963             : #endif
   44964             :   }
   44965          35 :   {
   44966             :     /* %typemap(out) (retStringAndCPLFree*) */
   44967          35 :     Py_XDECREF(resultobj);
   44968          35 :     if(result)
   44969             :     {
   44970          35 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   44971          35 :       CPLFree(result);
   44972             :     }
   44973             :     else
   44974             :     {
   44975           0 :       resultobj = Py_None;
   44976           0 :       Py_INCREF(resultobj);
   44977             :     }
   44978             :   }
   44979          35 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44980             :   return resultobj;
   44981             : fail:
   44982             :   return NULL;
   44983             : }
   44984             : 
   44985             : 
   44986          39 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_GetSubdatasetComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44987          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44988          39 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   44989          39 :   void *argp1 = 0 ;
   44990          39 :   int res1 = 0 ;
   44991          39 :   PyObject *swig_obj[1] ;
   44992          39 :   retStringAndCPLFree *result = 0 ;
   44993             :   
   44994          39 :   if (!args) SWIG_fail;
   44995          39 :   swig_obj[0] = args;
   44996          39 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   44997          39 :   if (!SWIG_IsOK(res1)) {
   44998           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_GetSubdatasetComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   44999             :   }
   45000          39 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   45001          39 :   {
   45002          39 :     const int bLocalUseExceptions = GetUseExceptions();
   45003          39 :     if ( bLocalUseExceptions ) {
   45004          23 :       pushErrorHandler();
   45005             :     }
   45006          39 :     {
   45007          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45008          39 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_GetSubdatasetComponent(arg1);
   45009          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45010             :     }
   45011          39 :     if ( bLocalUseExceptions ) {
   45012          23 :       popErrorHandler();
   45013             :     }
   45014             : #ifndef SED_HACKS
   45015             :     if ( bLocalUseExceptions ) {
   45016             :       CPLErr eclass = CPLGetLastErrorType();
   45017             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45018             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45019             :       }
   45020             :     }
   45021             : #endif
   45022             :   }
   45023          39 :   {
   45024             :     /* %typemap(out) (retStringAndCPLFree*) */
   45025          39 :     Py_XDECREF(resultobj);
   45026          39 :     if(result)
   45027             :     {
   45028          39 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   45029          39 :       CPLFree(result);
   45030             :     }
   45031             :     else
   45032             :     {
   45033           0 :       resultobj = Py_None;
   45034           0 :       Py_INCREF(resultobj);
   45035             :     }
   45036             :   }
   45037          39 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45038             :   return resultobj;
   45039             : fail:
   45040             :   return NULL;
   45041             : }
   45042             : 
   45043             : 
   45044          21 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_ModifyPathComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45045          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45046          21 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   45047          21 :   char *arg2 = (char *) 0 ;
   45048          21 :   void *argp1 = 0 ;
   45049          21 :   int res1 = 0 ;
   45050          21 :   int res2 ;
   45051          21 :   char *buf2 = 0 ;
   45052          21 :   int alloc2 = 0 ;
   45053          21 :   PyObject *swig_obj[2] ;
   45054          21 :   retStringAndCPLFree *result = 0 ;
   45055             :   
   45056          21 :   if (!SWIG_Python_UnpackTuple(args, "SubdatasetInfo_ModifyPathComponent", 2, 2, swig_obj)) SWIG_fail;
   45057          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   45058          21 :   if (!SWIG_IsOK(res1)) {
   45059           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_ModifyPathComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   45060             :   }
   45061          21 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   45062          21 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   45063          21 :   if (!SWIG_IsOK(res2)) {
   45064           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SubdatasetInfo_ModifyPathComponent" "', argument " "2"" of type '" "char const *""'");
   45065             :   }
   45066          21 :   arg2 = reinterpret_cast< char * >(buf2);
   45067          21 :   {
   45068          21 :     const int bLocalUseExceptions = GetUseExceptions();
   45069          21 :     if ( bLocalUseExceptions ) {
   45070          11 :       pushErrorHandler();
   45071             :     }
   45072          21 :     {
   45073          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45074          21 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_ModifyPathComponent(arg1,(char const *)arg2);
   45075          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45076             :     }
   45077          21 :     if ( bLocalUseExceptions ) {
   45078          11 :       popErrorHandler();
   45079             :     }
   45080             : #ifndef SED_HACKS
   45081             :     if ( bLocalUseExceptions ) {
   45082             :       CPLErr eclass = CPLGetLastErrorType();
   45083             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45084             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45085             :       }
   45086             :     }
   45087             : #endif
   45088             :   }
   45089          21 :   {
   45090             :     /* %typemap(out) (retStringAndCPLFree*) */
   45091          21 :     Py_XDECREF(resultobj);
   45092          21 :     if(result)
   45093             :     {
   45094          21 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   45095          21 :       CPLFree(result);
   45096             :     }
   45097             :     else
   45098             :     {
   45099           0 :       resultobj = Py_None;
   45100           0 :       Py_INCREF(resultobj);
   45101             :     }
   45102             :   }
   45103          21 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   45104          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45105             :   return resultobj;
   45106           0 : fail:
   45107           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   45108             :   return NULL;
   45109             : }
   45110             : 
   45111             : 
   45112         276 : SWIGINTERN PyObject *SubdatasetInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45113         276 :   PyObject *obj;
   45114         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   45115         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALSubdatasetInfo, SWIG_NewClientData(obj));
   45116         276 :   return SWIG_Py_Void();
   45117             : }
   45118             : 
   45119          83 : SWIGINTERN PyObject *_wrap_GetSubdatasetInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45120          83 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45121          83 :   char *arg1 = (char *) 0 ;
   45122          83 :   int res1 ;
   45123          83 :   char *buf1 = 0 ;
   45124          83 :   int alloc1 = 0 ;
   45125          83 :   PyObject *swig_obj[1] ;
   45126          83 :   GDALSubdatasetInfoShadow *result = 0 ;
   45127             :   
   45128          83 :   if (!args) SWIG_fail;
   45129          83 :   swig_obj[0] = args;
   45130          83 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   45131          83 :   if (!SWIG_IsOK(res1)) {
   45132           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetSubdatasetInfo" "', argument " "1"" of type '" "char const *""'");
   45133             :   }
   45134          83 :   arg1 = reinterpret_cast< char * >(buf1);
   45135          83 :   {
   45136          83 :     const int bLocalUseExceptions = GetUseExceptions();
   45137          83 :     if ( bLocalUseExceptions ) {
   45138          51 :       pushErrorHandler();
   45139             :     }
   45140          83 :     {
   45141          83 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45142          83 :       result = (GDALSubdatasetInfoShadow *)GetSubdatasetInfo((char const *)arg1);
   45143          83 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45144             :     }
   45145          83 :     if ( bLocalUseExceptions ) {
   45146          51 :       popErrorHandler();
   45147             :     }
   45148             : #ifndef SED_HACKS
   45149             :     if ( bLocalUseExceptions ) {
   45150             :       CPLErr eclass = CPLGetLastErrorType();
   45151             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45152             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45153             :       }
   45154             :     }
   45155             : #endif
   45156             :   }
   45157          83 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALSubdatasetInfo, SWIG_POINTER_OWN |  0 );
   45158          83 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   45159          83 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45160             :   return resultobj;
   45161           0 : fail:
   45162           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   45163             :   return NULL;
   45164             : }
   45165             : 
   45166             : 
   45167          30 : SWIGINTERN PyObject *_wrap_new_Relationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45168          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45169          30 :   char *arg1 = (char *) 0 ;
   45170          30 :   char *arg2 = (char *) 0 ;
   45171          30 :   char *arg3 = (char *) 0 ;
   45172          30 :   GDALRelationshipCardinality arg4 ;
   45173          30 :   int res1 ;
   45174          30 :   char *buf1 = 0 ;
   45175          30 :   int alloc1 = 0 ;
   45176          30 :   int res2 ;
   45177          30 :   char *buf2 = 0 ;
   45178          30 :   int alloc2 = 0 ;
   45179          30 :   int res3 ;
   45180          30 :   char *buf3 = 0 ;
   45181          30 :   int alloc3 = 0 ;
   45182          30 :   int val4 ;
   45183          30 :   int ecode4 = 0 ;
   45184          30 :   PyObject *swig_obj[4] ;
   45185          30 :   GDALRelationshipShadow *result = 0 ;
   45186             :   
   45187          30 :   if (!SWIG_Python_UnpackTuple(args, "new_Relationship", 4, 4, swig_obj)) SWIG_fail;
   45188          30 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   45189          30 :   if (!SWIG_IsOK(res1)) {
   45190           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Relationship" "', argument " "1"" of type '" "char const *""'");
   45191             :   }
   45192          30 :   arg1 = reinterpret_cast< char * >(buf1);
   45193          30 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   45194          30 :   if (!SWIG_IsOK(res2)) {
   45195           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Relationship" "', argument " "2"" of type '" "char const *""'");
   45196             :   }
   45197          30 :   arg2 = reinterpret_cast< char * >(buf2);
   45198          30 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   45199          30 :   if (!SWIG_IsOK(res3)) {
   45200           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Relationship" "', argument " "3"" of type '" "char const *""'");
   45201             :   }
   45202          30 :   arg3 = reinterpret_cast< char * >(buf3);
   45203          30 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   45204          30 :   if (!SWIG_IsOK(ecode4)) {
   45205           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Relationship" "', argument " "4"" of type '" "GDALRelationshipCardinality""'");
   45206             :   } 
   45207          30 :   arg4 = static_cast< GDALRelationshipCardinality >(val4);
   45208          30 :   {
   45209          30 :     if (!arg1) {
   45210           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   45211             :     }
   45212             :   }
   45213          29 :   {
   45214          29 :     const int bLocalUseExceptions = GetUseExceptions();
   45215          29 :     if ( bLocalUseExceptions ) {
   45216           2 :       pushErrorHandler();
   45217             :     }
   45218          29 :     {
   45219          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45220          29 :       result = (GDALRelationshipShadow *)new_GDALRelationshipShadow((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4);
   45221          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45222             :     }
   45223          29 :     if ( bLocalUseExceptions ) {
   45224           2 :       popErrorHandler();
   45225             :     }
   45226             : #ifndef SED_HACKS
   45227             :     if ( bLocalUseExceptions ) {
   45228             :       CPLErr eclass = CPLGetLastErrorType();
   45229             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45230             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45231             :       }
   45232             :     }
   45233             : #endif
   45234             :   }
   45235          29 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRelationshipShadow, SWIG_POINTER_NEW |  0 );
   45236          29 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   45237          29 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   45238          29 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   45239          30 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45240             :   return resultobj;
   45241           1 : fail:
   45242           1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   45243           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   45244           1 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   45245             :   return NULL;
   45246             : }
   45247             : 
   45248             : 
   45249          29 : SWIGINTERN PyObject *_wrap_delete_Relationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45250          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45251          29 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   45252          29 :   void *argp1 = 0 ;
   45253          29 :   int res1 = 0 ;
   45254          29 :   PyObject *swig_obj[1] ;
   45255             :   
   45256          29 :   if (!args) SWIG_fail;
   45257          29 :   swig_obj[0] = args;
   45258          29 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, SWIG_POINTER_DISOWN |  0 );
   45259          29 :   if (!SWIG_IsOK(res1)) {
   45260           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Relationship" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   45261             :   }
   45262          29 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   45263          29 :   {
   45264          29 :     const int bLocalUseExceptions = GetUseExceptions();
   45265          29 :     if ( bLocalUseExceptions ) {
   45266           2 :       pushErrorHandler();
   45267             :     }
   45268          29 :     {
   45269          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45270          29 :       delete_GDALRelationshipShadow(arg1);
   45271          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45272             :     }
   45273          29 :     if ( bLocalUseExceptions ) {
   45274           2 :       popErrorHandler();
   45275             :     }
   45276             : #ifndef SED_HACKS
   45277             :     if ( bLocalUseExceptions ) {
   45278             :       CPLErr eclass = CPLGetLastErrorType();
   45279             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45280             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45281             :       }
   45282             :     }
   45283             : #endif
   45284             :   }
   45285          29 :   resultobj = SWIG_Py_Void();
   45286          29 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45287             :   return resultobj;
   45288             : fail:
   45289             :   return NULL;
   45290             : }
   45291             : 
   45292             : 
   45293          31 : SWIGINTERN PyObject *_wrap_Relationship_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45294          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45295          31 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   45296          31 :   void *argp1 = 0 ;
   45297          31 :   int res1 = 0 ;
   45298          31 :   PyObject *swig_obj[1] ;
   45299          31 :   char *result = 0 ;
   45300             :   
   45301          31 :   if (!args) SWIG_fail;
   45302          31 :   swig_obj[0] = args;
   45303          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   45304          31 :   if (!SWIG_IsOK(res1)) {
   45305           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   45306             :   }
   45307          31 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   45308          31 :   {
   45309          31 :     const int bLocalUseExceptions = GetUseExceptions();
   45310          31 :     if ( bLocalUseExceptions ) {
   45311           8 :       pushErrorHandler();
   45312             :     }
   45313          31 :     {
   45314          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45315          31 :       result = (char *)GDALRelationshipShadow_GetName(arg1);
   45316          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45317             :     }
   45318          31 :     if ( bLocalUseExceptions ) {
   45319           8 :       popErrorHandler();
   45320             :     }
   45321             : #ifndef SED_HACKS
   45322             :     if ( bLocalUseExceptions ) {
   45323             :       CPLErr eclass = CPLGetLastErrorType();
   45324             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45325             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45326             :       }
   45327             :     }
   45328             : #endif
   45329             :   }
   45330          31 :   resultobj = SWIG_FromCharPtr((const char *)result);
   45331          31 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45332             :   return resultobj;
   45333             : fail:
   45334             :   return NULL;
   45335             : }
   45336             : 
   45337             : 
   45338          47 : SWIGINTERN PyObject *_wrap_Relationship_GetCardinality(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45339          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45340          47 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   45341          47 :   void *argp1 = 0 ;
   45342          47 :   int res1 = 0 ;
   45343          47 :   PyObject *swig_obj[1] ;
   45344          47 :   GDALRelationshipCardinality result;
   45345             :   
   45346          47 :   if (!args) SWIG_fail;
   45347          47 :   swig_obj[0] = args;
   45348          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   45349          47 :   if (!SWIG_IsOK(res1)) {
   45350           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetCardinality" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   45351             :   }
   45352          47 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   45353          47 :   {
   45354          47 :     const int bLocalUseExceptions = GetUseExceptions();
   45355          47 :     if ( bLocalUseExceptions ) {
   45356           9 :       pushErrorHandler();
   45357             :     }
   45358          47 :     {
   45359          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45360          47 :       result = (GDALRelationshipCardinality)GDALRelationshipShadow_GetCardinality(arg1);
   45361          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45362             :     }
   45363          47 :     if ( bLocalUseExceptions ) {
   45364           9 :       popErrorHandler();
   45365             :     }
   45366             : #ifndef SED_HACKS
   45367             :     if ( bLocalUseExceptions ) {
   45368             :       CPLErr eclass = CPLGetLastErrorType();
   45369             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45370             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45371             :       }
   45372             :     }
   45373             : #endif
   45374             :   }
   45375          47 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45376          47 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45377             :   return resultobj;
   45378             : fail:
   45379             :   return NULL;
   45380             : }
   45381             : 
   45382             : 
   45383          49 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45384          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45385          49 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   45386          49 :   void *argp1 = 0 ;
   45387          49 :   int res1 = 0 ;
   45388          49 :   PyObject *swig_obj[1] ;
   45389          49 :   char *result = 0 ;
   45390             :   
   45391          49 :   if (!args) SWIG_fail;
   45392          49 :   swig_obj[0] = args;
   45393          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   45394          49 :   if (!SWIG_IsOK(res1)) {
   45395           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   45396             :   }
   45397          49 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   45398          49 :   {
   45399          49 :     const int bLocalUseExceptions = GetUseExceptions();
   45400          49 :     if ( bLocalUseExceptions ) {
   45401          10 :       pushErrorHandler();
   45402             :     }
   45403          49 :     {
   45404          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45405          49 :       result = (char *)GDALRelationshipShadow_GetLeftTableName(arg1);
   45406          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45407             :     }
   45408          49 :     if ( bLocalUseExceptions ) {
   45409          10 :       popErrorHandler();
   45410             :     }
   45411             : #ifndef SED_HACKS
   45412             :     if ( bLocalUseExceptions ) {
   45413             :       CPLErr eclass = CPLGetLastErrorType();
   45414             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45415             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45416             :       }
   45417             :     }
   45418             : #endif
   45419             :   }
   45420          49 :   resultobj = SWIG_FromCharPtr((const char *)result);
   45421          49 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45422             :   return resultobj;
   45423             : fail:
   45424             :   return NULL;
   45425             : }
   45426             : 
   45427             : 
   45428          49 : SWIGINTERN PyObject *_wrap_Relationship_GetRightTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45429          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45430          49 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   45431          49 :   void *argp1 = 0 ;
   45432          49 :   int res1 = 0 ;
   45433          49 :   PyObject *swig_obj[1] ;
   45434          49 :   char *result = 0 ;
   45435             :   
   45436          49 :   if (!args) SWIG_fail;
   45437          49 :   swig_obj[0] = args;
   45438          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   45439          49 :   if (!SWIG_IsOK(res1)) {
   45440           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   45441             :   }
   45442          49 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   45443          49 :   {
   45444          49 :     const int bLocalUseExceptions = GetUseExceptions();
   45445          49 :     if ( bLocalUseExceptions ) {
   45446          10 :       pushErrorHandler();
   45447             :     }
   45448          49 :     {
   45449          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45450          49 :       result = (char *)GDALRelationshipShadow_GetRightTableName(arg1);
   45451          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45452             :     }
   45453          49 :     if ( bLocalUseExceptions ) {
   45454          10 :       popErrorHandler();
   45455             :     }
   45456             : #ifndef SED_HACKS
   45457             :     if ( bLocalUseExceptions ) {
   45458             :       CPLErr eclass = CPLGetLastErrorType();
   45459             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45460             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45461             :       }
   45462             :     }
   45463             : #endif
   45464             :   }
   45465          49 :   resultobj = SWIG_FromCharPtr((const char *)result);
   45466          49 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45467             :   return resultobj;
   45468             : fail:
   45469             :   return NULL;
   45470             : }
   45471             : 
   45472             : 
   45473          34 : SWIGINTERN PyObject *_wrap_Relationship_GetMappingTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45474          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45475          34 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   45476          34 :   void *argp1 = 0 ;
   45477          34 :   int res1 = 0 ;
   45478          34 :   PyObject *swig_obj[1] ;
   45479          34 :   char *result = 0 ;
   45480             :   
   45481          34 :   if (!args) SWIG_fail;
   45482          34 :   swig_obj[0] = args;
   45483          34 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   45484          34 :   if (!SWIG_IsOK(res1)) {
   45485           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetMappingTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   45486             :   }
   45487          34 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   45488          34 :   {
   45489          34 :     const int bLocalUseExceptions = GetUseExceptions();
   45490          34 :     if ( bLocalUseExceptions ) {
   45491          11 :       pushErrorHandler();
   45492             :     }
   45493          34 :     {
   45494          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45495          34 :       result = (char *)GDALRelationshipShadow_GetMappingTableName(arg1);
   45496          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45497             :     }
   45498          34 :     if ( bLocalUseExceptions ) {
   45499          11 :       popErrorHandler();
   45500             :     }
   45501             : #ifndef SED_HACKS
   45502             :     if ( bLocalUseExceptions ) {
   45503             :       CPLErr eclass = CPLGetLastErrorType();
   45504             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45505             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45506             :       }
   45507             :     }
   45508             : #endif
   45509             :   }
   45510          34 :   resultobj = SWIG_FromCharPtr((const char *)result);
   45511          34 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45512             :   return resultobj;
   45513             : fail:
   45514             :   return NULL;
   45515             : }
   45516             : 
   45517             : 
   45518          14 : SWIGINTERN PyObject *_wrap_Relationship_SetMappingTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45519          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45520          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   45521          14 :   char *arg2 = (char *) 0 ;
   45522          14 :   void *argp1 = 0 ;
   45523          14 :   int res1 = 0 ;
   45524          14 :   PyObject *str2 = 0 ;
   45525          14 :   int bToFree2 = 0 ;
   45526          14 :   PyObject *swig_obj[2] ;
   45527             :   
   45528          14 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetMappingTableName", 2, 2, swig_obj)) SWIG_fail;
   45529          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   45530          14 :   if (!SWIG_IsOK(res1)) {
   45531           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetMappingTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   45532             :   }
   45533          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   45534          14 :   {
   45535             :     /* %typemap(in) (tostring argin) */
   45536          14 :     str2 = PyObject_Str( swig_obj[1] );
   45537          14 :     if ( str2 == 0 ) {
   45538           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   45539           0 :       SWIG_fail;
   45540             :     }
   45541             :     
   45542          14 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   45543             :   }
   45544          14 :   {
   45545          14 :     const int bLocalUseExceptions = GetUseExceptions();
   45546          14 :     if ( bLocalUseExceptions ) {
   45547           1 :       pushErrorHandler();
   45548             :     }
   45549          14 :     {
   45550          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45551          14 :       GDALRelationshipShadow_SetMappingTableName(arg1,(char const *)arg2);
   45552          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45553             :     }
   45554          14 :     if ( bLocalUseExceptions ) {
   45555           1 :       popErrorHandler();
   45556             :     }
   45557             : #ifndef SED_HACKS
   45558             :     if ( bLocalUseExceptions ) {
   45559             :       CPLErr eclass = CPLGetLastErrorType();
   45560             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45561             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45562             :       }
   45563             :     }
   45564             : #endif
   45565             :   }
   45566          14 :   resultobj = SWIG_Py_Void();
   45567          14 :   {
   45568             :     /* %typemap(freearg) (tostring argin) */
   45569          14 :     if ( str2 != NULL)
   45570             :     {
   45571          14 :       Py_DECREF(str2);
   45572             :     }
   45573          14 :     GDALPythonFreeCStr(arg2, bToFree2);
   45574             :   }
   45575          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45576             :   return resultobj;
   45577           0 : fail:
   45578           0 :   {
   45579             :     /* %typemap(freearg) (tostring argin) */
   45580           0 :     if ( str2 != NULL)
   45581             :     {
   45582           0 :       Py_DECREF(str2);
   45583             :     }
   45584          14 :     GDALPythonFreeCStr(arg2, bToFree2);
   45585             :   }
   45586             :   return NULL;
   45587             : }
   45588             : 
   45589             : 
   45590          48 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45591          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45592          48 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   45593          48 :   void *argp1 = 0 ;
   45594          48 :   int res1 = 0 ;
   45595          48 :   PyObject *swig_obj[1] ;
   45596          48 :   char **result = 0 ;
   45597             :   
   45598          48 :   if (!args) SWIG_fail;
   45599          48 :   swig_obj[0] = args;
   45600          48 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   45601          48 :   if (!SWIG_IsOK(res1)) {
   45602           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   45603             :   }
   45604          48 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   45605          48 :   {
   45606          48 :     const int bLocalUseExceptions = GetUseExceptions();
   45607          48 :     if ( bLocalUseExceptions ) {
   45608           9 :       pushErrorHandler();
   45609             :     }
   45610          48 :     {
   45611          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45612          48 :       result = (char **)GDALRelationshipShadow_GetLeftTableFields(arg1);
   45613          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45614             :     }
   45615          48 :     if ( bLocalUseExceptions ) {
   45616           9 :       popErrorHandler();
   45617             :     }
   45618             : #ifndef SED_HACKS
   45619             :     if ( bLocalUseExceptions ) {
   45620             :       CPLErr eclass = CPLGetLastErrorType();
   45621             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45622             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45623             :       }
   45624             :     }
   45625             : #endif
   45626             :   }
   45627          48 :   {
   45628             :     /* %typemap(out) char **CSL -> ( string ) */
   45629          48 :     bool bErr = false;
   45630          48 :     resultobj = CSLToList(result, &bErr);
   45631          48 :     CSLDestroy(result);
   45632          48 :     if( bErr ) {
   45633           0 :       SWIG_fail;
   45634             :     }
   45635             :   }
   45636          48 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45637             :   return resultobj;
   45638             : fail:
   45639             :   return NULL;
   45640             : }
   45641             : 
   45642             : 
   45643          48 : SWIGINTERN PyObject *_wrap_Relationship_GetRightTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45644          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45645          48 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   45646          48 :   void *argp1 = 0 ;
   45647          48 :   int res1 = 0 ;
   45648          48 :   PyObject *swig_obj[1] ;
   45649          48 :   char **result = 0 ;
   45650             :   
   45651          48 :   if (!args) SWIG_fail;
   45652          48 :   swig_obj[0] = args;
   45653          48 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   45654          48 :   if (!SWIG_IsOK(res1)) {
   45655           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   45656             :   }
   45657          48 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   45658          48 :   {
   45659          48 :     const int bLocalUseExceptions = GetUseExceptions();
   45660          48 :     if ( bLocalUseExceptions ) {
   45661           9 :       pushErrorHandler();
   45662             :     }
   45663          48 :     {
   45664          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45665          48 :       result = (char **)GDALRelationshipShadow_GetRightTableFields(arg1);
   45666          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45667             :     }
   45668          48 :     if ( bLocalUseExceptions ) {
   45669           9 :       popErrorHandler();
   45670             :     }
   45671             : #ifndef SED_HACKS
   45672             :     if ( bLocalUseExceptions ) {
   45673             :       CPLErr eclass = CPLGetLastErrorType();
   45674             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45675             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45676             :       }
   45677             :     }
   45678             : #endif
   45679             :   }
   45680          48 :   {
   45681             :     /* %typemap(out) char **CSL -> ( string ) */
   45682          48 :     bool bErr = false;
   45683          48 :     resultobj = CSLToList(result, &bErr);
   45684          48 :     CSLDestroy(result);
   45685          48 :     if( bErr ) {
   45686           0 :       SWIG_fail;
   45687             :     }
   45688             :   }
   45689          48 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45690             :   return resultobj;
   45691             : fail:
   45692             :   return NULL;
   45693             : }
   45694             : 
   45695             : 
   45696          37 : SWIGINTERN PyObject *_wrap_Relationship_SetLeftTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45697          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45698          37 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   45699          37 :   char **arg2 = (char **) 0 ;
   45700          37 :   void *argp1 = 0 ;
   45701          37 :   int res1 = 0 ;
   45702          37 :   PyObject *swig_obj[2] ;
   45703             :   
   45704          37 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetLeftTableFields", 2, 2, swig_obj)) SWIG_fail;
   45705          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   45706          37 :   if (!SWIG_IsOK(res1)) {
   45707           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetLeftTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   45708             :   }
   45709          37 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   45710          37 :   {
   45711             :     /* %typemap(in) char **dict */
   45712          37 :     arg2 = NULL;
   45713          37 :     if ( PySequence_Check( swig_obj[1] ) ) {
   45714          37 :       int bErr = FALSE;
   45715          37 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   45716          37 :       if ( bErr )
   45717             :       {
   45718           0 :         SWIG_fail;
   45719             :       }
   45720             :     }
   45721           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   45722           0 :       int bErr = FALSE;
   45723           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   45724           0 :       if ( bErr )
   45725             :       {
   45726           0 :         SWIG_fail;
   45727             :       }
   45728             :     }
   45729             :     else {
   45730           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   45731           0 :       SWIG_fail;
   45732             :     }
   45733             :   }
   45734          37 :   {
   45735          37 :     const int bLocalUseExceptions = GetUseExceptions();
   45736          37 :     if ( bLocalUseExceptions ) {
   45737           1 :       pushErrorHandler();
   45738             :     }
   45739          37 :     {
   45740          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45741          37 :       GDALRelationshipShadow_SetLeftTableFields(arg1,arg2);
   45742          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45743             :     }
   45744          37 :     if ( bLocalUseExceptions ) {
   45745           1 :       popErrorHandler();
   45746             :     }
   45747             : #ifndef SED_HACKS
   45748             :     if ( bLocalUseExceptions ) {
   45749             :       CPLErr eclass = CPLGetLastErrorType();
   45750             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45751             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45752             :       }
   45753             :     }
   45754             : #endif
   45755             :   }
   45756          37 :   resultobj = SWIG_Py_Void();
   45757          37 :   {
   45758             :     /* %typemap(freearg) char **dict */
   45759          37 :     CSLDestroy( arg2 );
   45760             :   }
   45761          37 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45762             :   return resultobj;
   45763           0 : fail:
   45764           0 :   {
   45765             :     /* %typemap(freearg) char **dict */
   45766           0 :     CSLDestroy( arg2 );
   45767             :   }
   45768             :   return NULL;
   45769             : }
   45770             : 
   45771             : 
   45772          38 : SWIGINTERN PyObject *_wrap_Relationship_SetRightTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45773          38 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45774          38 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   45775          38 :   char **arg2 = (char **) 0 ;
   45776          38 :   void *argp1 = 0 ;
   45777          38 :   int res1 = 0 ;
   45778          38 :   PyObject *swig_obj[2] ;
   45779             :   
   45780          38 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRightTableFields", 2, 2, swig_obj)) SWIG_fail;
   45781          38 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   45782          38 :   if (!SWIG_IsOK(res1)) {
   45783           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRightTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   45784             :   }
   45785          38 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   45786          38 :   {
   45787             :     /* %typemap(in) char **dict */
   45788          38 :     arg2 = NULL;
   45789          38 :     if ( PySequence_Check( swig_obj[1] ) ) {
   45790          38 :       int bErr = FALSE;
   45791          38 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   45792          38 :       if ( bErr )
   45793             :       {
   45794           0 :         SWIG_fail;
   45795             :       }
   45796             :     }
   45797           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   45798           0 :       int bErr = FALSE;
   45799           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   45800           0 :       if ( bErr )
   45801             :       {
   45802           0 :         SWIG_fail;
   45803             :       }
   45804             :     }
   45805             :     else {
   45806           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   45807           0 :       SWIG_fail;
   45808             :     }
   45809             :   }
   45810          38 :   {
   45811          38 :     const int bLocalUseExceptions = GetUseExceptions();
   45812          38 :     if ( bLocalUseExceptions ) {
   45813           1 :       pushErrorHandler();
   45814             :     }
   45815          38 :     {
   45816          38 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45817          38 :       GDALRelationshipShadow_SetRightTableFields(arg1,arg2);
   45818          38 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45819             :     }
   45820          38 :     if ( bLocalUseExceptions ) {
   45821           1 :       popErrorHandler();
   45822             :     }
   45823             : #ifndef SED_HACKS
   45824             :     if ( bLocalUseExceptions ) {
   45825             :       CPLErr eclass = CPLGetLastErrorType();
   45826             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45827             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45828             :       }
   45829             :     }
   45830             : #endif
   45831             :   }
   45832          38 :   resultobj = SWIG_Py_Void();
   45833          38 :   {
   45834             :     /* %typemap(freearg) char **dict */
   45835          38 :     CSLDestroy( arg2 );
   45836             :   }
   45837          38 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45838             :   return resultobj;
   45839           0 : fail:
   45840           0 :   {
   45841             :     /* %typemap(freearg) char **dict */
   45842           0 :     CSLDestroy( arg2 );
   45843             :   }
   45844             :   return NULL;
   45845             : }
   45846             : 
   45847             : 
   45848          23 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45849          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45850          23 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   45851          23 :   void *argp1 = 0 ;
   45852          23 :   int res1 = 0 ;
   45853          23 :   PyObject *swig_obj[1] ;
   45854          23 :   char **result = 0 ;
   45855             :   
   45856          23 :   if (!args) SWIG_fail;
   45857          23 :   swig_obj[0] = args;
   45858          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   45859          23 :   if (!SWIG_IsOK(res1)) {
   45860           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   45861             :   }
   45862          23 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   45863          23 :   {
   45864          23 :     const int bLocalUseExceptions = GetUseExceptions();
   45865          23 :     if ( bLocalUseExceptions ) {
   45866           5 :       pushErrorHandler();
   45867             :     }
   45868          23 :     {
   45869          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45870          23 :       result = (char **)GDALRelationshipShadow_GetLeftMappingTableFields(arg1);
   45871          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45872             :     }
   45873          23 :     if ( bLocalUseExceptions ) {
   45874           5 :       popErrorHandler();
   45875             :     }
   45876             : #ifndef SED_HACKS
   45877             :     if ( bLocalUseExceptions ) {
   45878             :       CPLErr eclass = CPLGetLastErrorType();
   45879             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45880             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45881             :       }
   45882             :     }
   45883             : #endif
   45884             :   }
   45885          23 :   {
   45886             :     /* %typemap(out) char **CSL -> ( string ) */
   45887          23 :     bool bErr = false;
   45888          23 :     resultobj = CSLToList(result, &bErr);
   45889          23 :     CSLDestroy(result);
   45890          23 :     if( bErr ) {
   45891           0 :       SWIG_fail;
   45892             :     }
   45893             :   }
   45894          23 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45895             :   return resultobj;
   45896             : fail:
   45897             :   return NULL;
   45898             : }
   45899             : 
   45900             : 
   45901          23 : SWIGINTERN PyObject *_wrap_Relationship_GetRightMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45902          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45903          23 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   45904          23 :   void *argp1 = 0 ;
   45905          23 :   int res1 = 0 ;
   45906          23 :   PyObject *swig_obj[1] ;
   45907          23 :   char **result = 0 ;
   45908             :   
   45909          23 :   if (!args) SWIG_fail;
   45910          23 :   swig_obj[0] = args;
   45911          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   45912          23 :   if (!SWIG_IsOK(res1)) {
   45913           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   45914             :   }
   45915          23 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   45916          23 :   {
   45917          23 :     const int bLocalUseExceptions = GetUseExceptions();
   45918          23 :     if ( bLocalUseExceptions ) {
   45919           5 :       pushErrorHandler();
   45920             :     }
   45921          23 :     {
   45922          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45923          23 :       result = (char **)GDALRelationshipShadow_GetRightMappingTableFields(arg1);
   45924          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45925             :     }
   45926          23 :     if ( bLocalUseExceptions ) {
   45927           5 :       popErrorHandler();
   45928             :     }
   45929             : #ifndef SED_HACKS
   45930             :     if ( bLocalUseExceptions ) {
   45931             :       CPLErr eclass = CPLGetLastErrorType();
   45932             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45933             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45934             :       }
   45935             :     }
   45936             : #endif
   45937             :   }
   45938          23 :   {
   45939             :     /* %typemap(out) char **CSL -> ( string ) */
   45940          23 :     bool bErr = false;
   45941          23 :     resultobj = CSLToList(result, &bErr);
   45942          23 :     CSLDestroy(result);
   45943          23 :     if( bErr ) {
   45944           0 :       SWIG_fail;
   45945             :     }
   45946             :   }
   45947          23 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45948             :   return resultobj;
   45949             : fail:
   45950             :   return NULL;
   45951             : }
   45952             : 
   45953             : 
   45954           9 : SWIGINTERN PyObject *_wrap_Relationship_SetLeftMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45955           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45956           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   45957           9 :   char **arg2 = (char **) 0 ;
   45958           9 :   void *argp1 = 0 ;
   45959           9 :   int res1 = 0 ;
   45960           9 :   PyObject *swig_obj[2] ;
   45961             :   
   45962           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetLeftMappingTableFields", 2, 2, swig_obj)) SWIG_fail;
   45963           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   45964           9 :   if (!SWIG_IsOK(res1)) {
   45965           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetLeftMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   45966             :   }
   45967           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   45968           9 :   {
   45969             :     /* %typemap(in) char **dict */
   45970           9 :     arg2 = NULL;
   45971           9 :     if ( PySequence_Check( swig_obj[1] ) ) {
   45972           9 :       int bErr = FALSE;
   45973           9 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   45974           9 :       if ( bErr )
   45975             :       {
   45976           0 :         SWIG_fail;
   45977             :       }
   45978             :     }
   45979           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   45980           0 :       int bErr = FALSE;
   45981           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   45982           0 :       if ( bErr )
   45983             :       {
   45984           0 :         SWIG_fail;
   45985             :       }
   45986             :     }
   45987             :     else {
   45988           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   45989           0 :       SWIG_fail;
   45990             :     }
   45991             :   }
   45992           9 :   {
   45993           9 :     const int bLocalUseExceptions = GetUseExceptions();
   45994           9 :     if ( bLocalUseExceptions ) {
   45995           1 :       pushErrorHandler();
   45996             :     }
   45997           9 :     {
   45998           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45999           9 :       GDALRelationshipShadow_SetLeftMappingTableFields(arg1,arg2);
   46000           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46001             :     }
   46002           9 :     if ( bLocalUseExceptions ) {
   46003           1 :       popErrorHandler();
   46004             :     }
   46005             : #ifndef SED_HACKS
   46006             :     if ( bLocalUseExceptions ) {
   46007             :       CPLErr eclass = CPLGetLastErrorType();
   46008             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46009             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46010             :       }
   46011             :     }
   46012             : #endif
   46013             :   }
   46014           9 :   resultobj = SWIG_Py_Void();
   46015           9 :   {
   46016             :     /* %typemap(freearg) char **dict */
   46017           9 :     CSLDestroy( arg2 );
   46018             :   }
   46019           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   46020             :   return resultobj;
   46021           0 : fail:
   46022           0 :   {
   46023             :     /* %typemap(freearg) char **dict */
   46024           0 :     CSLDestroy( arg2 );
   46025             :   }
   46026             :   return NULL;
   46027             : }
   46028             : 
   46029             : 
   46030           9 : SWIGINTERN PyObject *_wrap_Relationship_SetRightMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46031           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46032           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46033           9 :   char **arg2 = (char **) 0 ;
   46034           9 :   void *argp1 = 0 ;
   46035           9 :   int res1 = 0 ;
   46036           9 :   PyObject *swig_obj[2] ;
   46037             :   
   46038           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRightMappingTableFields", 2, 2, swig_obj)) SWIG_fail;
   46039           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46040           9 :   if (!SWIG_IsOK(res1)) {
   46041           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRightMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46042             :   }
   46043           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46044           9 :   {
   46045             :     /* %typemap(in) char **dict */
   46046           9 :     arg2 = NULL;
   46047           9 :     if ( PySequence_Check( swig_obj[1] ) ) {
   46048           9 :       int bErr = FALSE;
   46049           9 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   46050           9 :       if ( bErr )
   46051             :       {
   46052           0 :         SWIG_fail;
   46053             :       }
   46054             :     }
   46055           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   46056           0 :       int bErr = FALSE;
   46057           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   46058           0 :       if ( bErr )
   46059             :       {
   46060           0 :         SWIG_fail;
   46061             :       }
   46062             :     }
   46063             :     else {
   46064           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   46065           0 :       SWIG_fail;
   46066             :     }
   46067             :   }
   46068           9 :   {
   46069           9 :     const int bLocalUseExceptions = GetUseExceptions();
   46070           9 :     if ( bLocalUseExceptions ) {
   46071           1 :       pushErrorHandler();
   46072             :     }
   46073           9 :     {
   46074           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46075           9 :       GDALRelationshipShadow_SetRightMappingTableFields(arg1,arg2);
   46076           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46077             :     }
   46078           9 :     if ( bLocalUseExceptions ) {
   46079           1 :       popErrorHandler();
   46080             :     }
   46081             : #ifndef SED_HACKS
   46082             :     if ( bLocalUseExceptions ) {
   46083             :       CPLErr eclass = CPLGetLastErrorType();
   46084             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46085             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46086             :       }
   46087             :     }
   46088             : #endif
   46089             :   }
   46090           9 :   resultobj = SWIG_Py_Void();
   46091           9 :   {
   46092             :     /* %typemap(freearg) char **dict */
   46093           9 :     CSLDestroy( arg2 );
   46094             :   }
   46095           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   46096             :   return resultobj;
   46097           0 : fail:
   46098           0 :   {
   46099             :     /* %typemap(freearg) char **dict */
   46100           0 :     CSLDestroy( arg2 );
   46101             :   }
   46102             :   return NULL;
   46103             : }
   46104             : 
   46105             : 
   46106          47 : SWIGINTERN PyObject *_wrap_Relationship_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46107          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46108          47 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46109          47 :   void *argp1 = 0 ;
   46110          47 :   int res1 = 0 ;
   46111          47 :   PyObject *swig_obj[1] ;
   46112          47 :   GDALRelationshipType result;
   46113             :   
   46114          47 :   if (!args) SWIG_fail;
   46115          47 :   swig_obj[0] = args;
   46116          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46117          47 :   if (!SWIG_IsOK(res1)) {
   46118           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46119             :   }
   46120          47 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46121          47 :   {
   46122          47 :     const int bLocalUseExceptions = GetUseExceptions();
   46123          47 :     if ( bLocalUseExceptions ) {
   46124           9 :       pushErrorHandler();
   46125             :     }
   46126          47 :     {
   46127          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46128          47 :       result = (GDALRelationshipType)GDALRelationshipShadow_GetType(arg1);
   46129          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46130             :     }
   46131          47 :     if ( bLocalUseExceptions ) {
   46132           9 :       popErrorHandler();
   46133             :     }
   46134             : #ifndef SED_HACKS
   46135             :     if ( bLocalUseExceptions ) {
   46136             :       CPLErr eclass = CPLGetLastErrorType();
   46137             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46138             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46139             :       }
   46140             :     }
   46141             : #endif
   46142             :   }
   46143          47 :   resultobj = SWIG_From_int(static_cast< int >(result));
   46144          47 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   46145             :   return resultobj;
   46146             : fail:
   46147             :   return NULL;
   46148             : }
   46149             : 
   46150             : 
   46151          10 : SWIGINTERN PyObject *_wrap_Relationship_SetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46152          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46153          10 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46154          10 :   GDALRelationshipType arg2 ;
   46155          10 :   void *argp1 = 0 ;
   46156          10 :   int res1 = 0 ;
   46157          10 :   int val2 ;
   46158          10 :   int ecode2 = 0 ;
   46159          10 :   PyObject *swig_obj[2] ;
   46160             :   
   46161          10 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetType", 2, 2, swig_obj)) SWIG_fail;
   46162          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46163          10 :   if (!SWIG_IsOK(res1)) {
   46164           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46165             :   }
   46166          10 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46167          10 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   46168          10 :   if (!SWIG_IsOK(ecode2)) {
   46169           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Relationship_SetType" "', argument " "2"" of type '" "GDALRelationshipType""'");
   46170             :   } 
   46171          10 :   arg2 = static_cast< GDALRelationshipType >(val2);
   46172          10 :   {
   46173          10 :     const int bLocalUseExceptions = GetUseExceptions();
   46174          10 :     if ( bLocalUseExceptions ) {
   46175           1 :       pushErrorHandler();
   46176             :     }
   46177          10 :     {
   46178          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46179          10 :       GDALRelationshipShadow_SetType(arg1,arg2);
   46180          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46181             :     }
   46182          10 :     if ( bLocalUseExceptions ) {
   46183           1 :       popErrorHandler();
   46184             :     }
   46185             : #ifndef SED_HACKS
   46186             :     if ( bLocalUseExceptions ) {
   46187             :       CPLErr eclass = CPLGetLastErrorType();
   46188             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46189             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46190             :       }
   46191             :     }
   46192             : #endif
   46193             :   }
   46194          10 :   resultobj = SWIG_Py_Void();
   46195          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   46196             :   return resultobj;
   46197             : fail:
   46198             :   return NULL;
   46199             : }
   46200             : 
   46201             : 
   46202          14 : SWIGINTERN PyObject *_wrap_Relationship_GetForwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46203          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46204          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46205          14 :   void *argp1 = 0 ;
   46206          14 :   int res1 = 0 ;
   46207          14 :   PyObject *swig_obj[1] ;
   46208          14 :   char *result = 0 ;
   46209             :   
   46210          14 :   if (!args) SWIG_fail;
   46211          14 :   swig_obj[0] = args;
   46212          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46213          14 :   if (!SWIG_IsOK(res1)) {
   46214           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetForwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46215             :   }
   46216          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46217          14 :   {
   46218          14 :     const int bLocalUseExceptions = GetUseExceptions();
   46219          14 :     if ( bLocalUseExceptions ) {
   46220           4 :       pushErrorHandler();
   46221             :     }
   46222          14 :     {
   46223          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46224          14 :       result = (char *)GDALRelationshipShadow_GetForwardPathLabel(arg1);
   46225          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46226             :     }
   46227          14 :     if ( bLocalUseExceptions ) {
   46228           4 :       popErrorHandler();
   46229             :     }
   46230             : #ifndef SED_HACKS
   46231             :     if ( bLocalUseExceptions ) {
   46232             :       CPLErr eclass = CPLGetLastErrorType();
   46233             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46234             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46235             :       }
   46236             :     }
   46237             : #endif
   46238             :   }
   46239          14 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46240          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   46241             :   return resultobj;
   46242             : fail:
   46243             :   return NULL;
   46244             : }
   46245             : 
   46246             : 
   46247           9 : SWIGINTERN PyObject *_wrap_Relationship_SetForwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46248           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46249           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46250           9 :   char *arg2 = (char *) 0 ;
   46251           9 :   void *argp1 = 0 ;
   46252           9 :   int res1 = 0 ;
   46253           9 :   PyObject *str2 = 0 ;
   46254           9 :   int bToFree2 = 0 ;
   46255           9 :   PyObject *swig_obj[2] ;
   46256             :   
   46257           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetForwardPathLabel", 2, 2, swig_obj)) SWIG_fail;
   46258           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46259           9 :   if (!SWIG_IsOK(res1)) {
   46260           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetForwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46261             :   }
   46262           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46263           9 :   {
   46264             :     /* %typemap(in) (tostring argin) */
   46265           9 :     str2 = PyObject_Str( swig_obj[1] );
   46266           9 :     if ( str2 == 0 ) {
   46267           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   46268           0 :       SWIG_fail;
   46269             :     }
   46270             :     
   46271           9 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   46272             :   }
   46273           9 :   {
   46274           9 :     const int bLocalUseExceptions = GetUseExceptions();
   46275           9 :     if ( bLocalUseExceptions ) {
   46276           1 :       pushErrorHandler();
   46277             :     }
   46278           9 :     {
   46279           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46280           9 :       GDALRelationshipShadow_SetForwardPathLabel(arg1,(char const *)arg2);
   46281           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46282             :     }
   46283           9 :     if ( bLocalUseExceptions ) {
   46284           1 :       popErrorHandler();
   46285             :     }
   46286             : #ifndef SED_HACKS
   46287             :     if ( bLocalUseExceptions ) {
   46288             :       CPLErr eclass = CPLGetLastErrorType();
   46289             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46290             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46291             :       }
   46292             :     }
   46293             : #endif
   46294             :   }
   46295           9 :   resultobj = SWIG_Py_Void();
   46296           9 :   {
   46297             :     /* %typemap(freearg) (tostring argin) */
   46298           9 :     if ( str2 != NULL)
   46299             :     {
   46300           9 :       Py_DECREF(str2);
   46301             :     }
   46302           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   46303             :   }
   46304           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   46305             :   return resultobj;
   46306           0 : fail:
   46307           0 :   {
   46308             :     /* %typemap(freearg) (tostring argin) */
   46309           0 :     if ( str2 != NULL)
   46310             :     {
   46311           0 :       Py_DECREF(str2);
   46312             :     }
   46313           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   46314             :   }
   46315             :   return NULL;
   46316             : }
   46317             : 
   46318             : 
   46319          14 : SWIGINTERN PyObject *_wrap_Relationship_GetBackwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46320          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46321          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46322          14 :   void *argp1 = 0 ;
   46323          14 :   int res1 = 0 ;
   46324          14 :   PyObject *swig_obj[1] ;
   46325          14 :   char *result = 0 ;
   46326             :   
   46327          14 :   if (!args) SWIG_fail;
   46328          14 :   swig_obj[0] = args;
   46329          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46330          14 :   if (!SWIG_IsOK(res1)) {
   46331           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetBackwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46332             :   }
   46333          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46334          14 :   {
   46335          14 :     const int bLocalUseExceptions = GetUseExceptions();
   46336          14 :     if ( bLocalUseExceptions ) {
   46337           4 :       pushErrorHandler();
   46338             :     }
   46339          14 :     {
   46340          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46341          14 :       result = (char *)GDALRelationshipShadow_GetBackwardPathLabel(arg1);
   46342          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46343             :     }
   46344          14 :     if ( bLocalUseExceptions ) {
   46345           4 :       popErrorHandler();
   46346             :     }
   46347             : #ifndef SED_HACKS
   46348             :     if ( bLocalUseExceptions ) {
   46349             :       CPLErr eclass = CPLGetLastErrorType();
   46350             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46351             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46352             :       }
   46353             :     }
   46354             : #endif
   46355             :   }
   46356          14 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46357          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   46358             :   return resultobj;
   46359             : fail:
   46360             :   return NULL;
   46361             : }
   46362             : 
   46363             : 
   46364           9 : SWIGINTERN PyObject *_wrap_Relationship_SetBackwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46365           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46366           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46367           9 :   char *arg2 = (char *) 0 ;
   46368           9 :   void *argp1 = 0 ;
   46369           9 :   int res1 = 0 ;
   46370           9 :   PyObject *str2 = 0 ;
   46371           9 :   int bToFree2 = 0 ;
   46372           9 :   PyObject *swig_obj[2] ;
   46373             :   
   46374           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetBackwardPathLabel", 2, 2, swig_obj)) SWIG_fail;
   46375           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46376           9 :   if (!SWIG_IsOK(res1)) {
   46377           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetBackwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46378             :   }
   46379           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46380           9 :   {
   46381             :     /* %typemap(in) (tostring argin) */
   46382           9 :     str2 = PyObject_Str( swig_obj[1] );
   46383           9 :     if ( str2 == 0 ) {
   46384           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   46385           0 :       SWIG_fail;
   46386             :     }
   46387             :     
   46388           9 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   46389             :   }
   46390           9 :   {
   46391           9 :     const int bLocalUseExceptions = GetUseExceptions();
   46392           9 :     if ( bLocalUseExceptions ) {
   46393           1 :       pushErrorHandler();
   46394             :     }
   46395           9 :     {
   46396           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46397           9 :       GDALRelationshipShadow_SetBackwardPathLabel(arg1,(char const *)arg2);
   46398           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46399             :     }
   46400           9 :     if ( bLocalUseExceptions ) {
   46401           1 :       popErrorHandler();
   46402             :     }
   46403             : #ifndef SED_HACKS
   46404             :     if ( bLocalUseExceptions ) {
   46405             :       CPLErr eclass = CPLGetLastErrorType();
   46406             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46407             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46408             :       }
   46409             :     }
   46410             : #endif
   46411             :   }
   46412           9 :   resultobj = SWIG_Py_Void();
   46413           9 :   {
   46414             :     /* %typemap(freearg) (tostring argin) */
   46415           9 :     if ( str2 != NULL)
   46416             :     {
   46417           9 :       Py_DECREF(str2);
   46418             :     }
   46419           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   46420             :   }
   46421           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   46422             :   return resultobj;
   46423           0 : fail:
   46424           0 :   {
   46425             :     /* %typemap(freearg) (tostring argin) */
   46426           0 :     if ( str2 != NULL)
   46427             :     {
   46428           0 :       Py_DECREF(str2);
   46429             :     }
   46430           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   46431             :   }
   46432             :   return NULL;
   46433             : }
   46434             : 
   46435             : 
   46436          44 : SWIGINTERN PyObject *_wrap_Relationship_GetRelatedTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46437          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46438          44 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46439          44 :   void *argp1 = 0 ;
   46440          44 :   int res1 = 0 ;
   46441          44 :   PyObject *swig_obj[1] ;
   46442          44 :   char *result = 0 ;
   46443             :   
   46444          44 :   if (!args) SWIG_fail;
   46445          44 :   swig_obj[0] = args;
   46446          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46447          44 :   if (!SWIG_IsOK(res1)) {
   46448           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRelatedTableType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46449             :   }
   46450          44 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46451          44 :   {
   46452          44 :     const int bLocalUseExceptions = GetUseExceptions();
   46453          44 :     if ( bLocalUseExceptions ) {
   46454           9 :       pushErrorHandler();
   46455             :     }
   46456          44 :     {
   46457          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46458          44 :       result = (char *)GDALRelationshipShadow_GetRelatedTableType(arg1);
   46459          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46460             :     }
   46461          44 :     if ( bLocalUseExceptions ) {
   46462           9 :       popErrorHandler();
   46463             :     }
   46464             : #ifndef SED_HACKS
   46465             :     if ( bLocalUseExceptions ) {
   46466             :       CPLErr eclass = CPLGetLastErrorType();
   46467             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46468             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46469             :       }
   46470             :     }
   46471             : #endif
   46472             :   }
   46473          44 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46474          44 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   46475             :   return resultobj;
   46476             : fail:
   46477             :   return NULL;
   46478             : }
   46479             : 
   46480             : 
   46481          20 : SWIGINTERN PyObject *_wrap_Relationship_SetRelatedTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46482          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46483          20 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46484          20 :   char *arg2 = (char *) 0 ;
   46485          20 :   void *argp1 = 0 ;
   46486          20 :   int res1 = 0 ;
   46487          20 :   PyObject *str2 = 0 ;
   46488          20 :   int bToFree2 = 0 ;
   46489          20 :   PyObject *swig_obj[2] ;
   46490             :   
   46491          20 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRelatedTableType", 2, 2, swig_obj)) SWIG_fail;
   46492          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46493          20 :   if (!SWIG_IsOK(res1)) {
   46494           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRelatedTableType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46495             :   }
   46496          20 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46497          20 :   {
   46498             :     /* %typemap(in) (tostring argin) */
   46499          20 :     str2 = PyObject_Str( swig_obj[1] );
   46500          20 :     if ( str2 == 0 ) {
   46501           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   46502           0 :       SWIG_fail;
   46503             :     }
   46504             :     
   46505          20 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   46506             :   }
   46507          20 :   {
   46508          20 :     const int bLocalUseExceptions = GetUseExceptions();
   46509          20 :     if ( bLocalUseExceptions ) {
   46510           1 :       pushErrorHandler();
   46511             :     }
   46512          20 :     {
   46513          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46514          20 :       GDALRelationshipShadow_SetRelatedTableType(arg1,(char const *)arg2);
   46515          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46516             :     }
   46517          20 :     if ( bLocalUseExceptions ) {
   46518           1 :       popErrorHandler();
   46519             :     }
   46520             : #ifndef SED_HACKS
   46521             :     if ( bLocalUseExceptions ) {
   46522             :       CPLErr eclass = CPLGetLastErrorType();
   46523             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46524             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46525             :       }
   46526             :     }
   46527             : #endif
   46528             :   }
   46529          20 :   resultobj = SWIG_Py_Void();
   46530          20 :   {
   46531             :     /* %typemap(freearg) (tostring argin) */
   46532          20 :     if ( str2 != NULL)
   46533             :     {
   46534          20 :       Py_DECREF(str2);
   46535             :     }
   46536          20 :     GDALPythonFreeCStr(arg2, bToFree2);
   46537             :   }
   46538          20 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   46539             :   return resultobj;
   46540           0 : fail:
   46541           0 :   {
   46542             :     /* %typemap(freearg) (tostring argin) */
   46543           0 :     if ( str2 != NULL)
   46544             :     {
   46545           0 :       Py_DECREF(str2);
   46546             :     }
   46547          20 :     GDALPythonFreeCStr(arg2, bToFree2);
   46548             :   }
   46549             :   return NULL;
   46550             : }
   46551             : 
   46552             : 
   46553         276 : SWIGINTERN PyObject *Relationship_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46554         276 :   PyObject *obj;
   46555         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   46556         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRelationshipShadow, SWIG_NewClientData(obj));
   46557         276 :   return SWIG_Py_Void();
   46558             : }
   46559             : 
   46560          29 : SWIGINTERN PyObject *Relationship_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46561          29 :   return SWIG_Python_InitShadowInstance(args);
   46562             : }
   46563             : 
   46564        3713 : SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   46565        3713 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46566        3713 :   double arg1 ;
   46567        3713 :   char *arg2 = (char *) NULL ;
   46568        3713 :   void *arg3 = (void *) NULL ;
   46569        3713 :   double val1 ;
   46570        3713 :   int ecode1 = 0 ;
   46571        3713 :   int res2 ;
   46572        3713 :   char *buf2 = 0 ;
   46573        3713 :   int alloc2 = 0 ;
   46574        3713 :   int res3 ;
   46575        3713 :   PyObject * obj0 = 0 ;
   46576        3713 :   PyObject * obj1 = 0 ;
   46577        3713 :   PyObject * obj2 = 0 ;
   46578        3713 :   char * kwnames[] = {
   46579             :     (char *)"dfProgress",  (char *)"pszMessage",  (char *)"pData",  NULL 
   46580             :   };
   46581        3713 :   int result;
   46582             :   
   46583        3713 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:TermProgress_nocb", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   46584        3713 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   46585        3713 :   if (!SWIG_IsOK(ecode1)) {
   46586           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
   46587             :   } 
   46588        3713 :   arg1 = static_cast< double >(val1);
   46589        3713 :   if (obj1) {
   46590        1347 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   46591        1347 :     if (!SWIG_IsOK(res2)) {
   46592           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
   46593             :     }
   46594        1347 :     arg2 = reinterpret_cast< char * >(buf2);
   46595             :   }
   46596        3713 :   if (obj2) {
   46597        1347 :     res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
   46598        1347 :     if (!SWIG_IsOK(res3)) {
   46599           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'"); 
   46600             :     }
   46601             :   }
   46602        3713 :   {
   46603        3713 :     const int bLocalUseExceptions = GetUseExceptions();
   46604        3713 :     if ( bLocalUseExceptions ) {
   46605        3710 :       pushErrorHandler();
   46606             :     }
   46607        3713 :     {
   46608        3713 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46609        3713 :       result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
   46610        3713 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46611             :     }
   46612        3713 :     if ( bLocalUseExceptions ) {
   46613        3710 :       popErrorHandler();
   46614             :     }
   46615             : #ifndef SED_HACKS
   46616             :     if ( bLocalUseExceptions ) {
   46617             :       CPLErr eclass = CPLGetLastErrorType();
   46618             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46619             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46620             :       }
   46621             :     }
   46622             : #endif
   46623             :   }
   46624        3713 :   resultobj = SWIG_From_int(static_cast< int >(result));
   46625        3713 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46626        3713 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   46627             :   return resultobj;
   46628           0 : fail:
   46629           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46630             :   return NULL;
   46631             : }
   46632             : 
   46633             : 
   46634           4 : SWIGINTERN PyObject *_wrap_ComputeMedianCutPCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   46635           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46636           4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   46637           4 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   46638           4 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   46639           4 :   int arg4 ;
   46640           4 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   46641           4 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   46642           4 :   void *arg7 = (void *) NULL ;
   46643           4 :   void *argp1 = 0 ;
   46644           4 :   int res1 = 0 ;
   46645           4 :   void *argp2 = 0 ;
   46646           4 :   int res2 = 0 ;
   46647           4 :   void *argp3 = 0 ;
   46648           4 :   int res3 = 0 ;
   46649           4 :   int val4 ;
   46650           4 :   int ecode4 = 0 ;
   46651           4 :   void *argp5 = 0 ;
   46652           4 :   int res5 = 0 ;
   46653           4 :   PyObject * obj0 = 0 ;
   46654           4 :   PyObject * obj1 = 0 ;
   46655           4 :   PyObject * obj2 = 0 ;
   46656           4 :   PyObject * obj3 = 0 ;
   46657           4 :   PyObject * obj4 = 0 ;
   46658           4 :   PyObject * obj5 = 0 ;
   46659           4 :   PyObject * obj6 = 0 ;
   46660           4 :   char * kwnames[] = {
   46661             :     (char *)"red",  (char *)"green",  (char *)"blue",  (char *)"num_colors",  (char *)"colors",  (char *)"callback",  (char *)"callback_data",  NULL 
   46662             :   };
   46663           4 :   int result;
   46664             :   
   46665             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   46666           4 :   PyProgressData *psProgressInfo;
   46667           4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   46668           4 :   psProgressInfo->nLastReported = -1;
   46669           4 :   psProgressInfo->psPyCallback = NULL;
   46670           4 :   psProgressInfo->psPyCallbackData = NULL;
   46671           4 :   arg7 = psProgressInfo;
   46672           4 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OO:ComputeMedianCutPCT", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   46673           4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   46674           4 :   if (!SWIG_IsOK(res1)) {
   46675           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeMedianCutPCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   46676             :   }
   46677           4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   46678           4 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   46679           4 :   if (!SWIG_IsOK(res2)) {
   46680           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeMedianCutPCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   46681             :   }
   46682           4 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   46683           4 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   46684           4 :   if (!SWIG_IsOK(res3)) {
   46685           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ComputeMedianCutPCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   46686             :   }
   46687           4 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   46688           4 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   46689           4 :   if (!SWIG_IsOK(ecode4)) {
   46690           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ComputeMedianCutPCT" "', argument " "4"" of type '" "int""'");
   46691             :   } 
   46692           4 :   arg4 = static_cast< int >(val4);
   46693           4 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   46694           4 :   if (!SWIG_IsOK(res5)) {
   46695           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ComputeMedianCutPCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   46696             :   }
   46697           4 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   46698           4 :   if (obj5) {
   46699           3 :     {
   46700             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   46701             :       /* callback_func typemap */
   46702             :       
   46703             :       /* In some cases 0 is passed instead of None. */
   46704             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   46705           3 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   46706             :       {
   46707           0 :         if( PyLong_AsLong(obj5) == 0 )
   46708             :         {
   46709           0 :           obj5 = Py_None;
   46710             :         }
   46711             :       }
   46712             :       
   46713           3 :       if (obj5 && obj5 != Py_None ) {
   46714           3 :         void* cbfunction = NULL;
   46715           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   46716             :             (void**)&cbfunction,
   46717             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   46718             :             SWIG_POINTER_EXCEPTION | 0 ));
   46719             :         
   46720           3 :         if ( cbfunction == GDALTermProgress ) {
   46721             :           arg6 = GDALTermProgress;
   46722             :         } else {
   46723           3 :           if (!PyCallable_Check(obj5)) {
   46724           0 :             PyErr_SetString( PyExc_RuntimeError,
   46725             :               "Object given is not a Python function" );
   46726           0 :             SWIG_fail;
   46727             :           }
   46728           3 :           psProgressInfo->psPyCallback = obj5;
   46729           3 :           arg6 = PyProgressProxy;
   46730             :         }
   46731             :         
   46732             :       }
   46733             :       
   46734             :     }
   46735             :   }
   46736           4 :   if (obj6) {
   46737           0 :     {
   46738             :       /* %typemap(in) ( void* callback_data=NULL)  */
   46739           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   46740             :     }
   46741             :   }
   46742           4 :   {
   46743           4 :     if (!arg1) {
   46744           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46745             :     }
   46746             :   }
   46747           4 :   {
   46748           4 :     if (!arg2) {
   46749           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46750             :     }
   46751             :   }
   46752           4 :   {
   46753           4 :     if (!arg3) {
   46754           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46755             :     }
   46756             :   }
   46757           4 :   {
   46758           4 :     if (!arg5) {
   46759           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46760             :     }
   46761             :   }
   46762           4 :   {
   46763           4 :     const int bLocalUseExceptions = GetUseExceptions();
   46764           4 :     if ( bLocalUseExceptions ) {
   46765           4 :       pushErrorHandler();
   46766             :     }
   46767           4 :     {
   46768           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46769           4 :       result = (int)ComputeMedianCutPCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   46770           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46771             :     }
   46772           4 :     if ( bLocalUseExceptions ) {
   46773           4 :       popErrorHandler();
   46774             :     }
   46775             : #ifndef SED_HACKS
   46776             :     if ( bLocalUseExceptions ) {
   46777             :       CPLErr eclass = CPLGetLastErrorType();
   46778             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46779             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46780             :       }
   46781             :     }
   46782             : #endif
   46783             :   }
   46784           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   46785           4 :   {
   46786             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   46787             :     
   46788           4 :     CPLFree(psProgressInfo);
   46789             :     
   46790             :   }
   46791           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   46792             :   return resultobj;
   46793           0 : fail:
   46794           0 :   {
   46795             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   46796             :     
   46797           0 :     CPLFree(psProgressInfo);
   46798             :     
   46799             :   }
   46800             :   return NULL;
   46801             : }
   46802             : 
   46803             : 
   46804           7 : SWIGINTERN PyObject *_wrap_DitherRGB2PCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   46805           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46806           7 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   46807           7 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   46808           7 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   46809           7 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   46810           7 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   46811           7 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   46812           7 :   void *arg7 = (void *) NULL ;
   46813           7 :   void *argp1 = 0 ;
   46814           7 :   int res1 = 0 ;
   46815           7 :   void *argp2 = 0 ;
   46816           7 :   int res2 = 0 ;
   46817           7 :   void *argp3 = 0 ;
   46818           7 :   int res3 = 0 ;
   46819           7 :   void *argp4 = 0 ;
   46820           7 :   int res4 = 0 ;
   46821           7 :   void *argp5 = 0 ;
   46822           7 :   int res5 = 0 ;
   46823           7 :   PyObject * obj0 = 0 ;
   46824           7 :   PyObject * obj1 = 0 ;
   46825           7 :   PyObject * obj2 = 0 ;
   46826           7 :   PyObject * obj3 = 0 ;
   46827           7 :   PyObject * obj4 = 0 ;
   46828           7 :   PyObject * obj5 = 0 ;
   46829           7 :   PyObject * obj6 = 0 ;
   46830           7 :   char * kwnames[] = {
   46831             :     (char *)"red",  (char *)"green",  (char *)"blue",  (char *)"target",  (char *)"colors",  (char *)"callback",  (char *)"callback_data",  NULL 
   46832             :   };
   46833           7 :   int result;
   46834             :   
   46835             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   46836           7 :   PyProgressData *psProgressInfo;
   46837           7 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   46838           7 :   psProgressInfo->nLastReported = -1;
   46839           7 :   psProgressInfo->psPyCallback = NULL;
   46840           7 :   psProgressInfo->psPyCallbackData = NULL;
   46841           7 :   arg7 = psProgressInfo;
   46842           7 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OO:DitherRGB2PCT", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   46843           7 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   46844           7 :   if (!SWIG_IsOK(res1)) {
   46845           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DitherRGB2PCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   46846             :   }
   46847           7 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   46848           7 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   46849           7 :   if (!SWIG_IsOK(res2)) {
   46850           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DitherRGB2PCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   46851             :   }
   46852           7 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   46853           7 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   46854           7 :   if (!SWIG_IsOK(res3)) {
   46855           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DitherRGB2PCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   46856             :   }
   46857           7 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   46858           7 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   46859           7 :   if (!SWIG_IsOK(res4)) {
   46860           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DitherRGB2PCT" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   46861             :   }
   46862           7 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   46863           7 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   46864           7 :   if (!SWIG_IsOK(res5)) {
   46865           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DitherRGB2PCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   46866             :   }
   46867           7 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   46868           7 :   if (obj5) {
   46869           6 :     {
   46870             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   46871             :       /* callback_func typemap */
   46872             :       
   46873             :       /* In some cases 0 is passed instead of None. */
   46874             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   46875           6 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   46876             :       {
   46877           0 :         if( PyLong_AsLong(obj5) == 0 )
   46878             :         {
   46879           0 :           obj5 = Py_None;
   46880             :         }
   46881             :       }
   46882             :       
   46883           6 :       if (obj5 && obj5 != Py_None ) {
   46884           6 :         void* cbfunction = NULL;
   46885           6 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   46886             :             (void**)&cbfunction,
   46887             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   46888             :             SWIG_POINTER_EXCEPTION | 0 ));
   46889             :         
   46890           6 :         if ( cbfunction == GDALTermProgress ) {
   46891             :           arg6 = GDALTermProgress;
   46892             :         } else {
   46893           6 :           if (!PyCallable_Check(obj5)) {
   46894           0 :             PyErr_SetString( PyExc_RuntimeError,
   46895             :               "Object given is not a Python function" );
   46896           0 :             SWIG_fail;
   46897             :           }
   46898           6 :           psProgressInfo->psPyCallback = obj5;
   46899           6 :           arg6 = PyProgressProxy;
   46900             :         }
   46901             :         
   46902             :       }
   46903             :       
   46904             :     }
   46905             :   }
   46906           7 :   if (obj6) {
   46907           0 :     {
   46908             :       /* %typemap(in) ( void* callback_data=NULL)  */
   46909           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   46910             :     }
   46911             :   }
   46912           7 :   {
   46913           7 :     if (!arg1) {
   46914           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46915             :     }
   46916             :   }
   46917           7 :   {
   46918           7 :     if (!arg2) {
   46919           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46920             :     }
   46921             :   }
   46922           7 :   {
   46923           7 :     if (!arg3) {
   46924           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46925             :     }
   46926             :   }
   46927           7 :   {
   46928           7 :     if (!arg4) {
   46929           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46930             :     }
   46931             :   }
   46932           7 :   {
   46933           7 :     if (!arg5) {
   46934           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46935             :     }
   46936             :   }
   46937           7 :   {
   46938           7 :     const int bLocalUseExceptions = GetUseExceptions();
   46939           7 :     if ( bLocalUseExceptions ) {
   46940           7 :       pushErrorHandler();
   46941             :     }
   46942           7 :     {
   46943           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46944           7 :       result = (int)DitherRGB2PCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   46945           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46946             :     }
   46947           7 :     if ( bLocalUseExceptions ) {
   46948           7 :       popErrorHandler();
   46949             :     }
   46950             : #ifndef SED_HACKS
   46951             :     if ( bLocalUseExceptions ) {
   46952             :       CPLErr eclass = CPLGetLastErrorType();
   46953             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46954             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46955             :       }
   46956             :     }
   46957             : #endif
   46958             :   }
   46959           7 :   resultobj = SWIG_From_int(static_cast< int >(result));
   46960           7 :   {
   46961             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   46962             :     
   46963           7 :     CPLFree(psProgressInfo);
   46964             :     
   46965             :   }
   46966           7 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   46967             :   return resultobj;
   46968           0 : fail:
   46969           0 :   {
   46970             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   46971             :     
   46972           0 :     CPLFree(psProgressInfo);
   46973             :     
   46974             :   }
   46975             :   return NULL;
   46976             : }
   46977             : 
   46978             : 
   46979          62 : SWIGINTERN PyObject *_wrap_ReprojectImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   46980          62 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46981          62 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   46982          62 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   46983          62 :   char *arg3 = (char *) NULL ;
   46984          62 :   char *arg4 = (char *) NULL ;
   46985          62 :   GDALResampleAlg arg5 = (GDALResampleAlg) GRA_NearestNeighbour ;
   46986          62 :   double arg6 = (double) 0.0 ;
   46987          62 :   double arg7 = (double) 0.0 ;
   46988          62 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   46989          62 :   void *arg9 = (void *) NULL ;
   46990          62 :   char **arg10 = (char **) NULL ;
   46991          62 :   void *argp1 = 0 ;
   46992          62 :   int res1 = 0 ;
   46993          62 :   void *argp2 = 0 ;
   46994          62 :   int res2 = 0 ;
   46995          62 :   int res3 ;
   46996          62 :   char *buf3 = 0 ;
   46997          62 :   int alloc3 = 0 ;
   46998          62 :   int res4 ;
   46999          62 :   char *buf4 = 0 ;
   47000          62 :   int alloc4 = 0 ;
   47001          62 :   int val5 ;
   47002          62 :   int ecode5 = 0 ;
   47003          62 :   double val6 ;
   47004          62 :   int ecode6 = 0 ;
   47005          62 :   double val7 ;
   47006          62 :   int ecode7 = 0 ;
   47007          62 :   PyObject * obj0 = 0 ;
   47008          62 :   PyObject * obj1 = 0 ;
   47009          62 :   PyObject * obj2 = 0 ;
   47010          62 :   PyObject * obj3 = 0 ;
   47011          62 :   PyObject * obj4 = 0 ;
   47012          62 :   PyObject * obj5 = 0 ;
   47013          62 :   PyObject * obj6 = 0 ;
   47014          62 :   PyObject * obj7 = 0 ;
   47015          62 :   PyObject * obj8 = 0 ;
   47016          62 :   PyObject * obj9 = 0 ;
   47017          62 :   char * kwnames[] = {
   47018             :     (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 
   47019             :   };
   47020          62 :   CPLErr result;
   47021             :   
   47022             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   47023          62 :   PyProgressData *psProgressInfo;
   47024          62 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   47025          62 :   psProgressInfo->nLastReported = -1;
   47026          62 :   psProgressInfo->psPyCallback = NULL;
   47027          62 :   psProgressInfo->psPyCallbackData = NULL;
   47028          62 :   arg9 = psProgressInfo;
   47029          62 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOOOOOO:ReprojectImage", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
   47030          62 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   47031          62 :   if (!SWIG_IsOK(res1)) {
   47032           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReprojectImage" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   47033             :   }
   47034          62 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   47035          62 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   47036          62 :   if (!SWIG_IsOK(res2)) {
   47037           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReprojectImage" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   47038             :   }
   47039          62 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   47040          62 :   if (obj2) {
   47041          61 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   47042          61 :     if (!SWIG_IsOK(res3)) {
   47043           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReprojectImage" "', argument " "3"" of type '" "char const *""'");
   47044             :     }
   47045          61 :     arg3 = reinterpret_cast< char * >(buf3);
   47046             :   }
   47047          62 :   if (obj3) {
   47048          61 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   47049          61 :     if (!SWIG_IsOK(res4)) {
   47050           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReprojectImage" "', argument " "4"" of type '" "char const *""'");
   47051             :     }
   47052          61 :     arg4 = reinterpret_cast< char * >(buf4);
   47053             :   }
   47054          62 :   if (obj4) {
   47055          60 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   47056          60 :     if (!SWIG_IsOK(ecode5)) {
   47057           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ReprojectImage" "', argument " "5"" of type '" "GDALResampleAlg""'");
   47058             :     } 
   47059          60 :     arg5 = static_cast< GDALResampleAlg >(val5);
   47060             :   }
   47061          62 :   if (obj5) {
   47062           3 :     ecode6 = SWIG_AsVal_double(obj5, &val6);
   47063           3 :     if (!SWIG_IsOK(ecode6)) {
   47064           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ReprojectImage" "', argument " "6"" of type '" "double""'");
   47065             :     } 
   47066           3 :     arg6 = static_cast< double >(val6);
   47067             :   }
   47068          62 :   if (obj6) {
   47069           3 :     ecode7 = SWIG_AsVal_double(obj6, &val7);
   47070           3 :     if (!SWIG_IsOK(ecode7)) {
   47071           0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ReprojectImage" "', argument " "7"" of type '" "double""'");
   47072             :     } 
   47073           3 :     arg7 = static_cast< double >(val7);
   47074             :   }
   47075          62 :   if (obj7) {
   47076           3 :     {
   47077             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   47078             :       /* callback_func typemap */
   47079             :       
   47080             :       /* In some cases 0 is passed instead of None. */
   47081             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   47082           3 :       if ( PyLong_Check(obj7) || PyInt_Check(obj7) )
   47083             :       {
   47084           0 :         if( PyLong_AsLong(obj7) == 0 )
   47085             :         {
   47086           0 :           obj7 = Py_None;
   47087             :         }
   47088             :       }
   47089             :       
   47090           3 :       if (obj7 && obj7 != Py_None ) {
   47091           3 :         void* cbfunction = NULL;
   47092           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj7,
   47093             :             (void**)&cbfunction,
   47094             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   47095             :             SWIG_POINTER_EXCEPTION | 0 ));
   47096             :         
   47097           3 :         if ( cbfunction == GDALTermProgress ) {
   47098             :           arg8 = GDALTermProgress;
   47099             :         } else {
   47100           3 :           if (!PyCallable_Check(obj7)) {
   47101           0 :             PyErr_SetString( PyExc_RuntimeError,
   47102             :               "Object given is not a Python function" );
   47103           0 :             SWIG_fail;
   47104             :           }
   47105           3 :           psProgressInfo->psPyCallback = obj7;
   47106           3 :           arg8 = PyProgressProxy;
   47107             :         }
   47108             :         
   47109             :       }
   47110             :       
   47111             :     }
   47112             :   }
   47113          62 :   if (obj8) {
   47114           3 :     {
   47115             :       /* %typemap(in) ( void* callback_data=NULL)  */
   47116           3 :       psProgressInfo->psPyCallbackData = obj8 ;
   47117             :     }
   47118             :   }
   47119          62 :   if (obj9) {
   47120           1 :     {
   47121             :       /* %typemap(in) char **dict */
   47122           1 :       arg10 = NULL;
   47123           1 :       if ( PySequence_Check( obj9 ) ) {
   47124           1 :         int bErr = FALSE;
   47125           1 :         arg10 = CSLFromPySequence(obj9, &bErr);
   47126           1 :         if ( bErr )
   47127             :         {
   47128           0 :           SWIG_fail;
   47129             :         }
   47130             :       }
   47131           0 :       else if ( PyMapping_Check( obj9 ) ) {
   47132           0 :         int bErr = FALSE;
   47133           0 :         arg10 = CSLFromPyMapping(obj9, &bErr);
   47134           0 :         if ( bErr )
   47135             :         {
   47136           0 :           SWIG_fail;
   47137             :         }
   47138             :       }
   47139             :       else {
   47140           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   47141           0 :         SWIG_fail;
   47142             :       }
   47143             :     }
   47144             :   }
   47145          62 :   {
   47146          62 :     if (!arg1) {
   47147           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47148             :     }
   47149             :   }
   47150          62 :   {
   47151          62 :     if (!arg2) {
   47152           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47153             :     }
   47154             :   }
   47155          62 :   {
   47156          62 :     const int bLocalUseExceptions = GetUseExceptions();
   47157          62 :     if ( bLocalUseExceptions ) {
   47158          62 :       pushErrorHandler();
   47159             :     }
   47160          62 :     {
   47161          62 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47162          62 :       result = (CPLErr)ReprojectImage(arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7,arg8,arg9,arg10);
   47163          62 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47164             :     }
   47165          62 :     if ( bLocalUseExceptions ) {
   47166          62 :       popErrorHandler();
   47167             :     }
   47168             : #ifndef SED_HACKS
   47169             :     if ( bLocalUseExceptions ) {
   47170             :       CPLErr eclass = CPLGetLastErrorType();
   47171             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47172             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47173             :       }
   47174             :     }
   47175             : #endif
   47176             :   }
   47177          62 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47178          62 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   47179          62 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   47180          62 :   {
   47181             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   47182             :     
   47183          62 :     CPLFree(psProgressInfo);
   47184             :     
   47185             :   }
   47186          62 :   {
   47187             :     /* %typemap(freearg) char **dict */
   47188          62 :     CSLDestroy( arg10 );
   47189             :   }
   47190          64 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   47191             :   return resultobj;
   47192           0 : fail:
   47193           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   47194           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   47195           0 :   {
   47196             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   47197             :     
   47198           0 :     CPLFree(psProgressInfo);
   47199             :     
   47200             :   }
   47201           0 :   {
   47202             :     /* %typemap(freearg) char **dict */
   47203           0 :     CSLDestroy( arg10 );
   47204             :   }
   47205             :   return NULL;
   47206             : }
   47207             : 
   47208             : 
   47209           6 : SWIGINTERN PyObject *_wrap_ComputeProximity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   47210           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47211           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   47212           6 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   47213           6 :   char **arg3 = (char **) NULL ;
   47214           6 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   47215           6 :   void *arg5 = (void *) NULL ;
   47216           6 :   void *argp1 = 0 ;
   47217           6 :   int res1 = 0 ;
   47218           6 :   void *argp2 = 0 ;
   47219           6 :   int res2 = 0 ;
   47220           6 :   PyObject * obj0 = 0 ;
   47221           6 :   PyObject * obj1 = 0 ;
   47222           6 :   PyObject * obj2 = 0 ;
   47223           6 :   PyObject * obj3 = 0 ;
   47224           6 :   PyObject * obj4 = 0 ;
   47225           6 :   char * kwnames[] = {
   47226             :     (char *)"srcBand",  (char *)"proximityBand",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   47227             :   };
   47228           6 :   int result;
   47229             :   
   47230             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   47231           6 :   PyProgressData *psProgressInfo;
   47232           6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   47233           6 :   psProgressInfo->nLastReported = -1;
   47234           6 :   psProgressInfo->psPyCallback = NULL;
   47235           6 :   psProgressInfo->psPyCallbackData = NULL;
   47236           6 :   arg5 = psProgressInfo;
   47237           6 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:ComputeProximity", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   47238           6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47239           6 :   if (!SWIG_IsOK(res1)) {
   47240           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeProximity" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   47241             :   }
   47242           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   47243           6 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47244           6 :   if (!SWIG_IsOK(res2)) {
   47245           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeProximity" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   47246             :   }
   47247           6 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   47248           6 :   if (obj2) {
   47249           5 :     {
   47250             :       /* %typemap(in) char **dict */
   47251           5 :       arg3 = NULL;
   47252           5 :       if ( PySequence_Check( obj2 ) ) {
   47253           5 :         int bErr = FALSE;
   47254           5 :         arg3 = CSLFromPySequence(obj2, &bErr);
   47255           5 :         if ( bErr )
   47256             :         {
   47257           0 :           SWIG_fail;
   47258             :         }
   47259             :       }
   47260           0 :       else if ( PyMapping_Check( obj2 ) ) {
   47261           0 :         int bErr = FALSE;
   47262           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   47263           0 :         if ( bErr )
   47264             :         {
   47265           0 :           SWIG_fail;
   47266             :         }
   47267             :       }
   47268             :       else {
   47269           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   47270           0 :         SWIG_fail;
   47271             :       }
   47272             :     }
   47273             :   }
   47274           6 :   if (obj3) {
   47275           3 :     {
   47276             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   47277             :       /* callback_func typemap */
   47278             :       
   47279             :       /* In some cases 0 is passed instead of None. */
   47280             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   47281           3 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   47282             :       {
   47283           0 :         if( PyLong_AsLong(obj3) == 0 )
   47284             :         {
   47285           0 :           obj3 = Py_None;
   47286             :         }
   47287             :       }
   47288             :       
   47289           3 :       if (obj3 && obj3 != Py_None ) {
   47290           1 :         void* cbfunction = NULL;
   47291           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   47292             :             (void**)&cbfunction,
   47293             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   47294             :             SWIG_POINTER_EXCEPTION | 0 ));
   47295             :         
   47296           1 :         if ( cbfunction == GDALTermProgress ) {
   47297             :           arg4 = GDALTermProgress;
   47298             :         } else {
   47299           1 :           if (!PyCallable_Check(obj3)) {
   47300           0 :             PyErr_SetString( PyExc_RuntimeError,
   47301             :               "Object given is not a Python function" );
   47302           0 :             SWIG_fail;
   47303             :           }
   47304           1 :           psProgressInfo->psPyCallback = obj3;
   47305           1 :           arg4 = PyProgressProxy;
   47306             :         }
   47307             :         
   47308             :       }
   47309             :       
   47310             :     }
   47311             :   }
   47312           6 :   if (obj4) {
   47313           0 :     {
   47314             :       /* %typemap(in) ( void* callback_data=NULL)  */
   47315           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   47316             :     }
   47317             :   }
   47318           6 :   {
   47319           6 :     if (!arg1) {
   47320           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47321             :     }
   47322             :   }
   47323           6 :   {
   47324           6 :     if (!arg2) {
   47325           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47326             :     }
   47327             :   }
   47328           6 :   {
   47329           6 :     const int bLocalUseExceptions = GetUseExceptions();
   47330           6 :     if ( bLocalUseExceptions ) {
   47331           6 :       pushErrorHandler();
   47332             :     }
   47333           6 :     {
   47334           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47335           6 :       result = (int)ComputeProximity(arg1,arg2,arg3,arg4,arg5);
   47336           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47337             :     }
   47338           6 :     if ( bLocalUseExceptions ) {
   47339           6 :       popErrorHandler();
   47340             :     }
   47341             : #ifndef SED_HACKS
   47342             :     if ( bLocalUseExceptions ) {
   47343             :       CPLErr eclass = CPLGetLastErrorType();
   47344             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47345             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47346             :       }
   47347             :     }
   47348             : #endif
   47349             :   }
   47350           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47351           6 :   {
   47352             :     /* %typemap(freearg) char **dict */
   47353           6 :     CSLDestroy( arg3 );
   47354             :   }
   47355           6 :   {
   47356             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   47357             :     
   47358           6 :     CPLFree(psProgressInfo);
   47359             :     
   47360             :   }
   47361           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   47362             :   return resultobj;
   47363           0 : fail:
   47364           0 :   {
   47365             :     /* %typemap(freearg) char **dict */
   47366           0 :     CSLDestroy( arg3 );
   47367             :   }
   47368           0 :   {
   47369             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   47370             :     
   47371           0 :     CPLFree(psProgressInfo);
   47372             :     
   47373             :   }
   47374             :   return NULL;
   47375             : }
   47376             : 
   47377             : 
   47378          42 : SWIGINTERN PyObject *_wrap_RasterizeLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   47379          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47380          42 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   47381          42 :   int arg2 ;
   47382          42 :   int *arg3 = (int *) 0 ;
   47383          42 :   OGRLayerShadow *arg4 = (OGRLayerShadow *) 0 ;
   47384          42 :   void *arg5 = (void *) NULL ;
   47385          42 :   void *arg6 = (void *) NULL ;
   47386          42 :   int arg7 = (int) 0 ;
   47387          42 :   double *arg8 = (double *) NULL ;
   47388          42 :   char **arg9 = (char **) NULL ;
   47389          42 :   GDALProgressFunc arg10 = (GDALProgressFunc) NULL ;
   47390          42 :   void *arg11 = (void *) NULL ;
   47391          42 :   void *argp1 = 0 ;
   47392          42 :   int res1 = 0 ;
   47393          42 :   void *argp4 = 0 ;
   47394          42 :   int res4 = 0 ;
   47395          42 :   int res5 ;
   47396          42 :   int res6 ;
   47397          42 :   PyObject * obj0 = 0 ;
   47398          42 :   PyObject * obj1 = 0 ;
   47399          42 :   PyObject * obj2 = 0 ;
   47400          42 :   PyObject * obj3 = 0 ;
   47401          42 :   PyObject * obj4 = 0 ;
   47402          42 :   PyObject * obj5 = 0 ;
   47403          42 :   PyObject * obj6 = 0 ;
   47404          42 :   PyObject * obj7 = 0 ;
   47405          42 :   PyObject * obj8 = 0 ;
   47406          42 :   char * kwnames[] = {
   47407             :     (char *)"dataset",  (char *)"bands",  (char *)"layer",  (char *)"pfnTransformer",  (char *)"pTransformArg",  (char *)"burn_values",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   47408             :   };
   47409          42 :   int result;
   47410             :   
   47411             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   47412          42 :   PyProgressData *psProgressInfo;
   47413          42 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   47414          42 :   psProgressInfo->nLastReported = -1;
   47415          42 :   psProgressInfo->psPyCallback = NULL;
   47416          42 :   psProgressInfo->psPyCallbackData = NULL;
   47417          42 :   arg11 = psProgressInfo;
   47418          42 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOOOOO:RasterizeLayer", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
   47419          42 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   47420          42 :   if (!SWIG_IsOK(res1)) {
   47421           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterizeLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   47422             :   }
   47423          42 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   47424          42 :   {
   47425             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   47426          42 :     arg3 = CreateCIntListFromSequence(obj1, &arg2);
   47427          42 :     if( arg2 < 0 ) {
   47428           0 :       SWIG_fail;
   47429             :     }
   47430             :   }
   47431          42 :   res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   47432          42 :   if (!SWIG_IsOK(res4)) {
   47433           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RasterizeLayer" "', argument " "4"" of type '" "OGRLayerShadow *""'"); 
   47434             :   }
   47435          42 :   arg4 = reinterpret_cast< OGRLayerShadow * >(argp4);
   47436          42 :   if (obj3) {
   47437           0 :     res5 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg5), 0, 0);
   47438           0 :     if (!SWIG_IsOK(res5)) {
   47439           0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "RasterizeLayer" "', argument " "5"" of type '" "void *""'"); 
   47440             :     }
   47441             :   }
   47442          42 :   if (obj4) {
   47443           0 :     res6 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg6), 0, 0);
   47444           0 :     if (!SWIG_IsOK(res6)) {
   47445           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "RasterizeLayer" "', argument " "6"" of type '" "void *""'"); 
   47446             :     }
   47447             :   }
   47448          42 :   if (obj5) {
   47449          41 :     {
   47450             :       /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   47451          41 :       arg8 = CreateCDoubleListFromSequence(obj5, &arg7);
   47452          41 :       if( arg7 < 0 ) {
   47453           0 :         SWIG_fail;
   47454             :       }
   47455             :     }
   47456             :   }
   47457          42 :   if (obj6) {
   47458          41 :     {
   47459             :       /* %typemap(in) char **dict */
   47460          41 :       arg9 = NULL;
   47461          41 :       if ( PySequence_Check( obj6 ) ) {
   47462          41 :         int bErr = FALSE;
   47463          41 :         arg9 = CSLFromPySequence(obj6, &bErr);
   47464          41 :         if ( bErr )
   47465             :         {
   47466           0 :           SWIG_fail;
   47467             :         }
   47468             :       }
   47469           0 :       else if ( PyMapping_Check( obj6 ) ) {
   47470           0 :         int bErr = FALSE;
   47471           0 :         arg9 = CSLFromPyMapping(obj6, &bErr);
   47472           0 :         if ( bErr )
   47473             :         {
   47474           0 :           SWIG_fail;
   47475             :         }
   47476             :       }
   47477             :       else {
   47478           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   47479           0 :         SWIG_fail;
   47480             :       }
   47481             :     }
   47482             :   }
   47483          42 :   if (obj7) {
   47484           0 :     {
   47485             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   47486             :       /* callback_func typemap */
   47487             :       
   47488             :       /* In some cases 0 is passed instead of None. */
   47489             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   47490           0 :       if ( PyLong_Check(obj7) || PyInt_Check(obj7) )
   47491             :       {
   47492           0 :         if( PyLong_AsLong(obj7) == 0 )
   47493             :         {
   47494           0 :           obj7 = Py_None;
   47495             :         }
   47496             :       }
   47497             :       
   47498           0 :       if (obj7 && obj7 != Py_None ) {
   47499           0 :         void* cbfunction = NULL;
   47500           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj7,
   47501             :             (void**)&cbfunction,
   47502             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   47503             :             SWIG_POINTER_EXCEPTION | 0 ));
   47504             :         
   47505           0 :         if ( cbfunction == GDALTermProgress ) {
   47506             :           arg10 = GDALTermProgress;
   47507             :         } else {
   47508           0 :           if (!PyCallable_Check(obj7)) {
   47509           0 :             PyErr_SetString( PyExc_RuntimeError,
   47510             :               "Object given is not a Python function" );
   47511           0 :             SWIG_fail;
   47512             :           }
   47513           0 :           psProgressInfo->psPyCallback = obj7;
   47514           0 :           arg10 = PyProgressProxy;
   47515             :         }
   47516             :         
   47517             :       }
   47518             :       
   47519             :     }
   47520             :   }
   47521          42 :   if (obj8) {
   47522           0 :     {
   47523             :       /* %typemap(in) ( void* callback_data=NULL)  */
   47524           0 :       psProgressInfo->psPyCallbackData = obj8 ;
   47525             :     }
   47526             :   }
   47527          42 :   {
   47528          42 :     if (!arg1) {
   47529           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47530             :     }
   47531             :   }
   47532          42 :   {
   47533          42 :     if (!arg4) {
   47534           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47535             :     }
   47536             :   }
   47537          42 :   {
   47538          42 :     const int bLocalUseExceptions = GetUseExceptions();
   47539          42 :     if ( bLocalUseExceptions ) {
   47540          42 :       pushErrorHandler();
   47541             :     }
   47542          42 :     {
   47543          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47544          42 :       result = (int)RasterizeLayer(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   47545          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47546             :     }
   47547          42 :     if ( bLocalUseExceptions ) {
   47548          42 :       popErrorHandler();
   47549             :     }
   47550             : #ifndef SED_HACKS
   47551             :     if ( bLocalUseExceptions ) {
   47552             :       CPLErr eclass = CPLGetLastErrorType();
   47553             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47554             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47555             :       }
   47556             :     }
   47557             : #endif
   47558             :   }
   47559          42 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47560          42 :   {
   47561             :     /* %typemap(freearg) (int nList, int* pList) */
   47562          42 :     free(arg3);
   47563             :   }
   47564          42 :   {
   47565             :     /* %typemap(freearg) (int nList, double* pList) */
   47566          42 :     free(arg8);
   47567             :   }
   47568          42 :   {
   47569             :     /* %typemap(freearg) char **dict */
   47570          42 :     CSLDestroy( arg9 );
   47571             :   }
   47572          42 :   {
   47573             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   47574             :     
   47575          42 :     CPLFree(psProgressInfo);
   47576             :     
   47577             :   }
   47578          42 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   47579             :   return resultobj;
   47580           0 : fail:
   47581           0 :   {
   47582             :     /* %typemap(freearg) (int nList, int* pList) */
   47583           0 :     free(arg3);
   47584             :   }
   47585           0 :   {
   47586             :     /* %typemap(freearg) (int nList, double* pList) */
   47587           0 :     free(arg8);
   47588             :   }
   47589           0 :   {
   47590             :     /* %typemap(freearg) char **dict */
   47591           0 :     CSLDestroy( arg9 );
   47592             :   }
   47593           0 :   {
   47594             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   47595             :     
   47596           0 :     CPLFree(psProgressInfo);
   47597             :     
   47598             :   }
   47599             :   return NULL;
   47600             : }
   47601             : 
   47602             : 
   47603          21 : SWIGINTERN PyObject *_wrap_Polygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   47604          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47605          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   47606          21 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   47607          21 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
   47608          21 :   int arg4 ;
   47609          21 :   char **arg5 = (char **) NULL ;
   47610          21 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   47611          21 :   void *arg7 = (void *) NULL ;
   47612          21 :   void *argp1 = 0 ;
   47613          21 :   int res1 = 0 ;
   47614          21 :   void *argp2 = 0 ;
   47615          21 :   int res2 = 0 ;
   47616          21 :   void *argp3 = 0 ;
   47617          21 :   int res3 = 0 ;
   47618          21 :   int val4 ;
   47619          21 :   int ecode4 = 0 ;
   47620          21 :   PyObject * obj0 = 0 ;
   47621          21 :   PyObject * obj1 = 0 ;
   47622          21 :   PyObject * obj2 = 0 ;
   47623          21 :   PyObject * obj3 = 0 ;
   47624          21 :   PyObject * obj4 = 0 ;
   47625          21 :   PyObject * obj5 = 0 ;
   47626          21 :   PyObject * obj6 = 0 ;
   47627          21 :   char * kwnames[] = {
   47628             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"outLayer",  (char *)"iPixValField",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   47629             :   };
   47630          21 :   int result;
   47631             :   
   47632             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   47633          21 :   PyProgressData *psProgressInfo;
   47634          21 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   47635          21 :   psProgressInfo->nLastReported = -1;
   47636          21 :   psProgressInfo->psPyCallback = NULL;
   47637          21 :   psProgressInfo->psPyCallbackData = NULL;
   47638          21 :   arg7 = psProgressInfo;
   47639          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:Polygonize", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   47640          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47641          21 :   if (!SWIG_IsOK(res1)) {
   47642           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Polygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   47643             :   }
   47644          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   47645          21 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47646          21 :   if (!SWIG_IsOK(res2)) {
   47647           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Polygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   47648             :   }
   47649          21 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   47650          21 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   47651          21 :   if (!SWIG_IsOK(res3)) {
   47652           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Polygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
   47653             :   }
   47654          21 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
   47655          21 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   47656          21 :   if (!SWIG_IsOK(ecode4)) {
   47657           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Polygonize" "', argument " "4"" of type '" "int""'");
   47658             :   } 
   47659          21 :   arg4 = static_cast< int >(val4);
   47660          21 :   if (obj4) {
   47661          14 :     {
   47662             :       /* %typemap(in) char **dict */
   47663          14 :       arg5 = NULL;
   47664          14 :       if ( PySequence_Check( obj4 ) ) {
   47665          14 :         int bErr = FALSE;
   47666          14 :         arg5 = CSLFromPySequence(obj4, &bErr);
   47667          14 :         if ( bErr )
   47668             :         {
   47669           0 :           SWIG_fail;
   47670             :         }
   47671             :       }
   47672           0 :       else if ( PyMapping_Check( obj4 ) ) {
   47673           0 :         int bErr = FALSE;
   47674           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   47675           0 :         if ( bErr )
   47676             :         {
   47677           0 :           SWIG_fail;
   47678             :         }
   47679             :       }
   47680             :       else {
   47681           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   47682           0 :         SWIG_fail;
   47683             :       }
   47684             :     }
   47685             :   }
   47686          21 :   if (obj5) {
   47687          12 :     {
   47688             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   47689             :       /* callback_func typemap */
   47690             :       
   47691             :       /* In some cases 0 is passed instead of None. */
   47692             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   47693          12 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   47694             :       {
   47695           0 :         if( PyLong_AsLong(obj5) == 0 )
   47696             :         {
   47697           0 :           obj5 = Py_None;
   47698             :         }
   47699             :       }
   47700             :       
   47701          12 :       if (obj5 && obj5 != Py_None ) {
   47702           7 :         void* cbfunction = NULL;
   47703           7 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   47704             :             (void**)&cbfunction,
   47705             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   47706             :             SWIG_POINTER_EXCEPTION | 0 ));
   47707             :         
   47708           7 :         if ( cbfunction == GDALTermProgress ) {
   47709             :           arg6 = GDALTermProgress;
   47710             :         } else {
   47711           7 :           if (!PyCallable_Check(obj5)) {
   47712           0 :             PyErr_SetString( PyExc_RuntimeError,
   47713             :               "Object given is not a Python function" );
   47714           0 :             SWIG_fail;
   47715             :           }
   47716           7 :           psProgressInfo->psPyCallback = obj5;
   47717           7 :           arg6 = PyProgressProxy;
   47718             :         }
   47719             :         
   47720             :       }
   47721             :       
   47722             :     }
   47723             :   }
   47724          21 :   if (obj6) {
   47725           0 :     {
   47726             :       /* %typemap(in) ( void* callback_data=NULL)  */
   47727           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   47728             :     }
   47729             :   }
   47730          21 :   {
   47731          21 :     if (!arg1) {
   47732           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47733             :     }
   47734             :   }
   47735          21 :   {
   47736          21 :     if (!arg3) {
   47737           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47738             :     }
   47739             :   }
   47740          21 :   {
   47741          21 :     const int bLocalUseExceptions = GetUseExceptions();
   47742          21 :     if ( bLocalUseExceptions ) {
   47743          21 :       pushErrorHandler();
   47744             :     }
   47745          21 :     {
   47746          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47747          21 :       result = (int)Polygonize(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   47748          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47749             :     }
   47750          21 :     if ( bLocalUseExceptions ) {
   47751          21 :       popErrorHandler();
   47752             :     }
   47753             : #ifndef SED_HACKS
   47754             :     if ( bLocalUseExceptions ) {
   47755             :       CPLErr eclass = CPLGetLastErrorType();
   47756             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47757             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47758             :       }
   47759             :     }
   47760             : #endif
   47761             :   }
   47762          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47763          21 :   {
   47764             :     /* %typemap(freearg) char **dict */
   47765          21 :     CSLDestroy( arg5 );
   47766             :   }
   47767          21 :   {
   47768             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   47769             :     
   47770          21 :     CPLFree(psProgressInfo);
   47771             :     
   47772             :   }
   47773          21 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   47774             :   return resultobj;
   47775           0 : fail:
   47776           0 :   {
   47777             :     /* %typemap(freearg) char **dict */
   47778           0 :     CSLDestroy( arg5 );
   47779             :   }
   47780           0 :   {
   47781             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   47782             :     
   47783           0 :     CPLFree(psProgressInfo);
   47784             :     
   47785             :   }
   47786             :   return NULL;
   47787             : }
   47788             : 
   47789             : 
   47790           1 : SWIGINTERN PyObject *_wrap_FPolygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   47791           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47792           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   47793           1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   47794           1 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
   47795           1 :   int arg4 ;
   47796           1 :   char **arg5 = (char **) NULL ;
   47797           1 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   47798           1 :   void *arg7 = (void *) NULL ;
   47799           1 :   void *argp1 = 0 ;
   47800           1 :   int res1 = 0 ;
   47801           1 :   void *argp2 = 0 ;
   47802           1 :   int res2 = 0 ;
   47803           1 :   void *argp3 = 0 ;
   47804           1 :   int res3 = 0 ;
   47805           1 :   int val4 ;
   47806           1 :   int ecode4 = 0 ;
   47807           1 :   PyObject * obj0 = 0 ;
   47808           1 :   PyObject * obj1 = 0 ;
   47809           1 :   PyObject * obj2 = 0 ;
   47810           1 :   PyObject * obj3 = 0 ;
   47811           1 :   PyObject * obj4 = 0 ;
   47812           1 :   PyObject * obj5 = 0 ;
   47813           1 :   PyObject * obj6 = 0 ;
   47814           1 :   char * kwnames[] = {
   47815             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"outLayer",  (char *)"iPixValField",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   47816             :   };
   47817           1 :   int result;
   47818             :   
   47819             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   47820           1 :   PyProgressData *psProgressInfo;
   47821           1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   47822           1 :   psProgressInfo->nLastReported = -1;
   47823           1 :   psProgressInfo->psPyCallback = NULL;
   47824           1 :   psProgressInfo->psPyCallbackData = NULL;
   47825           1 :   arg7 = psProgressInfo;
   47826           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:FPolygonize", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   47827           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47828           1 :   if (!SWIG_IsOK(res1)) {
   47829           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FPolygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   47830             :   }
   47831           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   47832           1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47833           1 :   if (!SWIG_IsOK(res2)) {
   47834           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FPolygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   47835             :   }
   47836           1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   47837           1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   47838           1 :   if (!SWIG_IsOK(res3)) {
   47839           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FPolygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
   47840             :   }
   47841           1 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
   47842           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   47843           1 :   if (!SWIG_IsOK(ecode4)) {
   47844           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FPolygonize" "', argument " "4"" of type '" "int""'");
   47845             :   } 
   47846           1 :   arg4 = static_cast< int >(val4);
   47847           1 :   if (obj4) {
   47848           0 :     {
   47849             :       /* %typemap(in) char **dict */
   47850           0 :       arg5 = NULL;
   47851           0 :       if ( PySequence_Check( obj4 ) ) {
   47852           0 :         int bErr = FALSE;
   47853           0 :         arg5 = CSLFromPySequence(obj4, &bErr);
   47854           0 :         if ( bErr )
   47855             :         {
   47856           0 :           SWIG_fail;
   47857             :         }
   47858             :       }
   47859           0 :       else if ( PyMapping_Check( obj4 ) ) {
   47860           0 :         int bErr = FALSE;
   47861           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   47862           0 :         if ( bErr )
   47863             :         {
   47864           0 :           SWIG_fail;
   47865             :         }
   47866             :       }
   47867             :       else {
   47868           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   47869           0 :         SWIG_fail;
   47870             :       }
   47871             :     }
   47872             :   }
   47873           1 :   if (obj5) {
   47874           0 :     {
   47875             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   47876             :       /* callback_func typemap */
   47877             :       
   47878             :       /* In some cases 0 is passed instead of None. */
   47879             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   47880           0 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   47881             :       {
   47882           0 :         if( PyLong_AsLong(obj5) == 0 )
   47883             :         {
   47884           0 :           obj5 = Py_None;
   47885             :         }
   47886             :       }
   47887             :       
   47888           0 :       if (obj5 && obj5 != Py_None ) {
   47889           0 :         void* cbfunction = NULL;
   47890           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   47891             :             (void**)&cbfunction,
   47892             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   47893             :             SWIG_POINTER_EXCEPTION | 0 ));
   47894             :         
   47895           0 :         if ( cbfunction == GDALTermProgress ) {
   47896             :           arg6 = GDALTermProgress;
   47897             :         } else {
   47898           0 :           if (!PyCallable_Check(obj5)) {
   47899           0 :             PyErr_SetString( PyExc_RuntimeError,
   47900             :               "Object given is not a Python function" );
   47901           0 :             SWIG_fail;
   47902             :           }
   47903           0 :           psProgressInfo->psPyCallback = obj5;
   47904           0 :           arg6 = PyProgressProxy;
   47905             :         }
   47906             :         
   47907             :       }
   47908             :       
   47909             :     }
   47910             :   }
   47911           1 :   if (obj6) {
   47912           0 :     {
   47913             :       /* %typemap(in) ( void* callback_data=NULL)  */
   47914           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   47915             :     }
   47916             :   }
   47917           1 :   {
   47918           1 :     if (!arg1) {
   47919           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47920             :     }
   47921             :   }
   47922           1 :   {
   47923           1 :     if (!arg3) {
   47924           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47925             :     }
   47926             :   }
   47927           1 :   {
   47928           1 :     const int bLocalUseExceptions = GetUseExceptions();
   47929           1 :     if ( bLocalUseExceptions ) {
   47930           1 :       pushErrorHandler();
   47931             :     }
   47932           1 :     {
   47933           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47934           1 :       result = (int)FPolygonize(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   47935           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47936             :     }
   47937           1 :     if ( bLocalUseExceptions ) {
   47938           1 :       popErrorHandler();
   47939             :     }
   47940             : #ifndef SED_HACKS
   47941             :     if ( bLocalUseExceptions ) {
   47942             :       CPLErr eclass = CPLGetLastErrorType();
   47943             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47944             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47945             :       }
   47946             :     }
   47947             : #endif
   47948             :   }
   47949           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47950           1 :   {
   47951             :     /* %typemap(freearg) char **dict */
   47952           1 :     CSLDestroy( arg5 );
   47953             :   }
   47954           1 :   {
   47955             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   47956             :     
   47957           1 :     CPLFree(psProgressInfo);
   47958             :     
   47959             :   }
   47960           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   47961             :   return resultobj;
   47962           0 : fail:
   47963           0 :   {
   47964             :     /* %typemap(freearg) char **dict */
   47965           0 :     CSLDestroy( arg5 );
   47966             :   }
   47967           0 :   {
   47968             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   47969             :     
   47970           0 :     CPLFree(psProgressInfo);
   47971             :     
   47972             :   }
   47973             :   return NULL;
   47974             : }
   47975             : 
   47976             : 
   47977          29 : SWIGINTERN PyObject *_wrap_FillNodata(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   47978          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47979          29 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   47980          29 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   47981          29 :   double arg3 ;
   47982          29 :   int arg4 ;
   47983          29 :   char **arg5 = (char **) NULL ;
   47984          29 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   47985          29 :   void *arg7 = (void *) NULL ;
   47986          29 :   void *argp1 = 0 ;
   47987          29 :   int res1 = 0 ;
   47988          29 :   void *argp2 = 0 ;
   47989          29 :   int res2 = 0 ;
   47990          29 :   double val3 ;
   47991          29 :   int ecode3 = 0 ;
   47992          29 :   int val4 ;
   47993          29 :   int ecode4 = 0 ;
   47994          29 :   PyObject * obj0 = 0 ;
   47995          29 :   PyObject * obj1 = 0 ;
   47996          29 :   PyObject * obj2 = 0 ;
   47997          29 :   PyObject * obj3 = 0 ;
   47998          29 :   PyObject * obj4 = 0 ;
   47999          29 :   PyObject * obj5 = 0 ;
   48000          29 :   PyObject * obj6 = 0 ;
   48001          29 :   char * kwnames[] = {
   48002             :     (char *)"targetBand",  (char *)"maskBand",  (char *)"maxSearchDist",  (char *)"smoothingIterations",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   48003             :   };
   48004          29 :   int result;
   48005             :   
   48006             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48007          29 :   PyProgressData *psProgressInfo;
   48008          29 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48009          29 :   psProgressInfo->nLastReported = -1;
   48010          29 :   psProgressInfo->psPyCallback = NULL;
   48011          29 :   psProgressInfo->psPyCallbackData = NULL;
   48012          29 :   arg7 = psProgressInfo;
   48013          29 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:FillNodata", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   48014          29 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48015          29 :   if (!SWIG_IsOK(res1)) {
   48016           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FillNodata" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48017             :   }
   48018          29 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48019          29 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48020          29 :   if (!SWIG_IsOK(res2)) {
   48021           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FillNodata" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   48022             :   }
   48023          29 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   48024          29 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   48025          29 :   if (!SWIG_IsOK(ecode3)) {
   48026           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FillNodata" "', argument " "3"" of type '" "double""'");
   48027             :   } 
   48028          29 :   arg3 = static_cast< double >(val3);
   48029          29 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   48030          29 :   if (!SWIG_IsOK(ecode4)) {
   48031           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FillNodata" "', argument " "4"" of type '" "int""'");
   48032             :   } 
   48033          29 :   arg4 = static_cast< int >(val4);
   48034          29 :   if (obj4) {
   48035          26 :     {
   48036             :       /* %typemap(in) char **dict */
   48037          26 :       arg5 = NULL;
   48038          26 :       if ( PySequence_Check( obj4 ) ) {
   48039          26 :         int bErr = FALSE;
   48040          26 :         arg5 = CSLFromPySequence(obj4, &bErr);
   48041          26 :         if ( bErr )
   48042             :         {
   48043           0 :           SWIG_fail;
   48044             :         }
   48045             :       }
   48046           0 :       else if ( PyMapping_Check( obj4 ) ) {
   48047           0 :         int bErr = FALSE;
   48048           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   48049           0 :         if ( bErr )
   48050             :         {
   48051           0 :           SWIG_fail;
   48052             :         }
   48053             :       }
   48054             :       else {
   48055           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48056           0 :         SWIG_fail;
   48057             :       }
   48058             :     }
   48059             :   }
   48060          29 :   if (obj5) {
   48061           4 :     {
   48062             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48063             :       /* callback_func typemap */
   48064             :       
   48065             :       /* In some cases 0 is passed instead of None. */
   48066             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48067           4 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   48068             :       {
   48069           0 :         if( PyLong_AsLong(obj5) == 0 )
   48070             :         {
   48071           0 :           obj5 = Py_None;
   48072             :         }
   48073             :       }
   48074             :       
   48075           4 :       if (obj5 && obj5 != Py_None ) {
   48076           4 :         void* cbfunction = NULL;
   48077           4 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   48078             :             (void**)&cbfunction,
   48079             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48080             :             SWIG_POINTER_EXCEPTION | 0 ));
   48081             :         
   48082           4 :         if ( cbfunction == GDALTermProgress ) {
   48083             :           arg6 = GDALTermProgress;
   48084             :         } else {
   48085           4 :           if (!PyCallable_Check(obj5)) {
   48086           0 :             PyErr_SetString( PyExc_RuntimeError,
   48087             :               "Object given is not a Python function" );
   48088           0 :             SWIG_fail;
   48089             :           }
   48090           4 :           psProgressInfo->psPyCallback = obj5;
   48091           4 :           arg6 = PyProgressProxy;
   48092             :         }
   48093             :         
   48094             :       }
   48095             :       
   48096             :     }
   48097             :   }
   48098          29 :   if (obj6) {
   48099           0 :     {
   48100             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48101           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   48102             :     }
   48103             :   }
   48104          29 :   {
   48105          29 :     if (!arg1) {
   48106           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48107             :     }
   48108             :   }
   48109          29 :   {
   48110          29 :     const int bLocalUseExceptions = GetUseExceptions();
   48111          29 :     if ( bLocalUseExceptions ) {
   48112          29 :       pushErrorHandler();
   48113             :     }
   48114          29 :     {
   48115          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48116          29 :       result = (int)FillNodata(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   48117          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48118             :     }
   48119          29 :     if ( bLocalUseExceptions ) {
   48120          29 :       popErrorHandler();
   48121             :     }
   48122             : #ifndef SED_HACKS
   48123             :     if ( bLocalUseExceptions ) {
   48124             :       CPLErr eclass = CPLGetLastErrorType();
   48125             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48126             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48127             :       }
   48128             :     }
   48129             : #endif
   48130             :   }
   48131          29 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48132          29 :   {
   48133             :     /* %typemap(freearg) char **dict */
   48134          29 :     CSLDestroy( arg5 );
   48135             :   }
   48136          29 :   {
   48137             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48138             :     
   48139          29 :     CPLFree(psProgressInfo);
   48140             :     
   48141             :   }
   48142          29 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   48143             :   return resultobj;
   48144           0 : fail:
   48145           0 :   {
   48146             :     /* %typemap(freearg) char **dict */
   48147           0 :     CSLDestroy( arg5 );
   48148             :   }
   48149           0 :   {
   48150             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48151             :     
   48152           0 :     CPLFree(psProgressInfo);
   48153             :     
   48154             :   }
   48155             :   return NULL;
   48156             : }
   48157             : 
   48158             : 
   48159          12 : SWIGINTERN PyObject *_wrap_SieveFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48160          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48161          12 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   48162          12 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   48163          12 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   48164          12 :   int arg4 ;
   48165          12 :   int arg5 = (int) 4 ;
   48166          12 :   char **arg6 = (char **) NULL ;
   48167          12 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   48168          12 :   void *arg8 = (void *) NULL ;
   48169          12 :   void *argp1 = 0 ;
   48170          12 :   int res1 = 0 ;
   48171          12 :   void *argp2 = 0 ;
   48172          12 :   int res2 = 0 ;
   48173          12 :   void *argp3 = 0 ;
   48174          12 :   int res3 = 0 ;
   48175          12 :   int val4 ;
   48176          12 :   int ecode4 = 0 ;
   48177          12 :   int val5 ;
   48178          12 :   int ecode5 = 0 ;
   48179          12 :   PyObject * obj0 = 0 ;
   48180          12 :   PyObject * obj1 = 0 ;
   48181          12 :   PyObject * obj2 = 0 ;
   48182          12 :   PyObject * obj3 = 0 ;
   48183          12 :   PyObject * obj4 = 0 ;
   48184          12 :   PyObject * obj5 = 0 ;
   48185          12 :   PyObject * obj6 = 0 ;
   48186          12 :   PyObject * obj7 = 0 ;
   48187          12 :   char * kwnames[] = {
   48188             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"dstBand",  (char *)"threshold",  (char *)"connectedness",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   48189             :   };
   48190          12 :   int result;
   48191             :   
   48192             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48193          12 :   PyProgressData *psProgressInfo;
   48194          12 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48195          12 :   psProgressInfo->nLastReported = -1;
   48196          12 :   psProgressInfo->psPyCallback = NULL;
   48197          12 :   psProgressInfo->psPyCallbackData = NULL;
   48198          12 :   arg8 = psProgressInfo;
   48199          12 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOOO:SieveFilter", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   48200          12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48201          12 :   if (!SWIG_IsOK(res1)) {
   48202           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SieveFilter" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48203             :   }
   48204          12 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48205          12 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48206          12 :   if (!SWIG_IsOK(res2)) {
   48207           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SieveFilter" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   48208             :   }
   48209          12 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   48210          12 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48211          12 :   if (!SWIG_IsOK(res3)) {
   48212           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SieveFilter" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   48213             :   }
   48214          12 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   48215          12 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   48216          12 :   if (!SWIG_IsOK(ecode4)) {
   48217           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SieveFilter" "', argument " "4"" of type '" "int""'");
   48218             :   } 
   48219          12 :   arg4 = static_cast< int >(val4);
   48220          12 :   if (obj4) {
   48221          12 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   48222          12 :     if (!SWIG_IsOK(ecode5)) {
   48223           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SieveFilter" "', argument " "5"" of type '" "int""'");
   48224             :     } 
   48225             :     arg5 = static_cast< int >(val5);
   48226             :   }
   48227          12 :   if (obj5) {
   48228           0 :     {
   48229             :       /* %typemap(in) char **dict */
   48230           0 :       arg6 = NULL;
   48231           0 :       if ( PySequence_Check( obj5 ) ) {
   48232           0 :         int bErr = FALSE;
   48233           0 :         arg6 = CSLFromPySequence(obj5, &bErr);
   48234           0 :         if ( bErr )
   48235             :         {
   48236           0 :           SWIG_fail;
   48237             :         }
   48238             :       }
   48239           0 :       else if ( PyMapping_Check( obj5 ) ) {
   48240           0 :         int bErr = FALSE;
   48241           0 :         arg6 = CSLFromPyMapping(obj5, &bErr);
   48242           0 :         if ( bErr )
   48243             :         {
   48244           0 :           SWIG_fail;
   48245             :         }
   48246             :       }
   48247             :       else {
   48248           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48249           0 :         SWIG_fail;
   48250             :       }
   48251             :     }
   48252             :   }
   48253          12 :   if (obj6) {
   48254           2 :     {
   48255             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48256             :       /* callback_func typemap */
   48257             :       
   48258             :       /* In some cases 0 is passed instead of None. */
   48259             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48260           2 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   48261             :       {
   48262           0 :         if( PyLong_AsLong(obj6) == 0 )
   48263             :         {
   48264           0 :           obj6 = Py_None;
   48265             :         }
   48266             :       }
   48267             :       
   48268           2 :       if (obj6 && obj6 != Py_None ) {
   48269           2 :         void* cbfunction = NULL;
   48270           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   48271             :             (void**)&cbfunction,
   48272             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48273             :             SWIG_POINTER_EXCEPTION | 0 ));
   48274             :         
   48275           2 :         if ( cbfunction == GDALTermProgress ) {
   48276             :           arg7 = GDALTermProgress;
   48277             :         } else {
   48278           2 :           if (!PyCallable_Check(obj6)) {
   48279           0 :             PyErr_SetString( PyExc_RuntimeError,
   48280             :               "Object given is not a Python function" );
   48281           0 :             SWIG_fail;
   48282             :           }
   48283           2 :           psProgressInfo->psPyCallback = obj6;
   48284           2 :           arg7 = PyProgressProxy;
   48285             :         }
   48286             :         
   48287             :       }
   48288             :       
   48289             :     }
   48290             :   }
   48291          12 :   if (obj7) {
   48292           0 :     {
   48293             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48294           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   48295             :     }
   48296             :   }
   48297          12 :   {
   48298          12 :     if (!arg1) {
   48299           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48300             :     }
   48301             :   }
   48302          12 :   {
   48303          12 :     if (!arg3) {
   48304           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48305             :     }
   48306             :   }
   48307          12 :   {
   48308          12 :     const int bLocalUseExceptions = GetUseExceptions();
   48309          12 :     if ( bLocalUseExceptions ) {
   48310          12 :       pushErrorHandler();
   48311             :     }
   48312          12 :     {
   48313          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48314          12 :       result = (int)SieveFilter(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   48315          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48316             :     }
   48317          12 :     if ( bLocalUseExceptions ) {
   48318          12 :       popErrorHandler();
   48319             :     }
   48320             : #ifndef SED_HACKS
   48321             :     if ( bLocalUseExceptions ) {
   48322             :       CPLErr eclass = CPLGetLastErrorType();
   48323             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48324             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48325             :       }
   48326             :     }
   48327             : #endif
   48328             :   }
   48329          12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48330          12 :   {
   48331             :     /* %typemap(freearg) char **dict */
   48332          12 :     CSLDestroy( arg6 );
   48333             :   }
   48334          12 :   {
   48335             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48336             :     
   48337          12 :     CPLFree(psProgressInfo);
   48338             :     
   48339             :   }
   48340          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   48341             :   return resultobj;
   48342           0 : fail:
   48343           0 :   {
   48344             :     /* %typemap(freearg) char **dict */
   48345           0 :     CSLDestroy( arg6 );
   48346             :   }
   48347           0 :   {
   48348             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48349             :     
   48350           0 :     CPLFree(psProgressInfo);
   48351             :     
   48352             :   }
   48353             :   return NULL;
   48354             : }
   48355             : 
   48356             : 
   48357           2 : SWIGINTERN PyObject *_wrap_RegenerateOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48358           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48359           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   48360           2 :   int arg2 ;
   48361           2 :   GDALRasterBandShadow **arg3 = (GDALRasterBandShadow **) 0 ;
   48362           2 :   char *arg4 = (char *) "average" ;
   48363           2 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   48364           2 :   void *arg6 = (void *) NULL ;
   48365           2 :   void *argp1 = 0 ;
   48366           2 :   int res1 = 0 ;
   48367           2 :   int res4 ;
   48368           2 :   char *buf4 = 0 ;
   48369           2 :   int alloc4 = 0 ;
   48370           2 :   PyObject * obj0 = 0 ;
   48371           2 :   PyObject * obj1 = 0 ;
   48372           2 :   PyObject * obj2 = 0 ;
   48373           2 :   PyObject * obj3 = 0 ;
   48374           2 :   PyObject * obj4 = 0 ;
   48375           2 :   char * kwnames[] = {
   48376             :     (char *)"srcBand",  (char *)"overviewBandCount",  (char *)"resampling",  (char *)"callback",  (char *)"callback_data",  NULL 
   48377             :   };
   48378           2 :   int result;
   48379             :   
   48380             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48381           2 :   PyProgressData *psProgressInfo;
   48382           2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48383           2 :   psProgressInfo->nLastReported = -1;
   48384           2 :   psProgressInfo->psPyCallback = NULL;
   48385           2 :   psProgressInfo->psPyCallbackData = NULL;
   48386           2 :   arg6 = psProgressInfo;
   48387           2 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:RegenerateOverviews", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   48388           2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48389           2 :   if (!SWIG_IsOK(res1)) {
   48390           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48391             :   }
   48392           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48393           2 :   {
   48394             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   48395           2 :     if ( !PySequence_Check(obj1) ) {
   48396           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   48397           0 :       SWIG_fail;
   48398             :     }
   48399           2 :     Py_ssize_t size = PySequence_Size(obj1);
   48400           2 :     if( size > (Py_ssize_t)INT_MAX ) {
   48401           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   48402           0 :       SWIG_fail;
   48403             :     }
   48404           2 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   48405           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   48406           0 :       SWIG_fail;
   48407             :     }
   48408           2 :     arg2 = (int)size;
   48409           2 :     arg3 = (GDALRasterBandShadow**) VSIMalloc(arg2*sizeof(GDALRasterBandShadow*));
   48410           2 :     if( !arg3) {
   48411           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   48412           0 :       SWIG_fail;
   48413             :     }
   48414             :     
   48415           6 :     for( int i = 0; i<arg2; i++ ) {
   48416           4 :       PyObject *o = PySequence_GetItem(obj1,i);
   48417           4 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   48418           4 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   48419           4 :       if (!rawobjectpointer) {
   48420           0 :         Py_DECREF(o);
   48421           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   48422           0 :         SWIG_fail;
   48423             :       }
   48424           4 :       arg3[i] = rawobjectpointer;
   48425           4 :       Py_DECREF(o);
   48426             :       
   48427             :     }
   48428             :   }
   48429           2 :   if (obj2) {
   48430           2 :     res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4);
   48431           2 :     if (!SWIG_IsOK(res4)) {
   48432           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RegenerateOverviews" "', argument " "4"" of type '" "char const *""'");
   48433             :     }
   48434           2 :     arg4 = reinterpret_cast< char * >(buf4);
   48435             :   }
   48436           2 :   if (obj3) {
   48437           0 :     {
   48438             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48439             :       /* callback_func typemap */
   48440             :       
   48441             :       /* In some cases 0 is passed instead of None. */
   48442             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48443           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   48444             :       {
   48445           0 :         if( PyLong_AsLong(obj3) == 0 )
   48446             :         {
   48447           0 :           obj3 = Py_None;
   48448             :         }
   48449             :       }
   48450             :       
   48451           0 :       if (obj3 && obj3 != Py_None ) {
   48452           0 :         void* cbfunction = NULL;
   48453           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   48454             :             (void**)&cbfunction,
   48455             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48456             :             SWIG_POINTER_EXCEPTION | 0 ));
   48457             :         
   48458           0 :         if ( cbfunction == GDALTermProgress ) {
   48459             :           arg5 = GDALTermProgress;
   48460             :         } else {
   48461           0 :           if (!PyCallable_Check(obj3)) {
   48462           0 :             PyErr_SetString( PyExc_RuntimeError,
   48463             :               "Object given is not a Python function" );
   48464           0 :             SWIG_fail;
   48465             :           }
   48466           0 :           psProgressInfo->psPyCallback = obj3;
   48467           0 :           arg5 = PyProgressProxy;
   48468             :         }
   48469             :         
   48470             :       }
   48471             :       
   48472             :     }
   48473             :   }
   48474           2 :   if (obj4) {
   48475           0 :     {
   48476             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48477           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   48478             :     }
   48479             :   }
   48480           2 :   {
   48481           2 :     if (!arg1) {
   48482           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48483             :     }
   48484             :   }
   48485           2 :   {
   48486           2 :     const int bLocalUseExceptions = GetUseExceptions();
   48487           2 :     if ( bLocalUseExceptions ) {
   48488           0 :       pushErrorHandler();
   48489             :     }
   48490           2 :     {
   48491           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48492           2 :       result = (int)RegenerateOverviews(arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
   48493           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48494             :     }
   48495           2 :     if ( bLocalUseExceptions ) {
   48496           0 :       popErrorHandler();
   48497             :     }
   48498             : #ifndef SED_HACKS
   48499             :     if ( bLocalUseExceptions ) {
   48500             :       CPLErr eclass = CPLGetLastErrorType();
   48501             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48502             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48503             :       }
   48504             :     }
   48505             : #endif
   48506             :   }
   48507           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48508           2 :   {
   48509             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   48510           2 :     CPLFree( arg3 );
   48511             :   }
   48512           2 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   48513           2 :   {
   48514             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48515             :     
   48516           2 :     CPLFree(psProgressInfo);
   48517             :     
   48518             :   }
   48519           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   48520             :   return resultobj;
   48521           0 : fail:
   48522           0 :   {
   48523             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   48524           0 :     CPLFree( arg3 );
   48525             :   }
   48526           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   48527           0 :   {
   48528             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48529             :     
   48530           0 :     CPLFree(psProgressInfo);
   48531             :     
   48532             :   }
   48533             :   return NULL;
   48534             : }
   48535             : 
   48536             : 
   48537         248 : SWIGINTERN PyObject *_wrap_RegenerateOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48538         248 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48539         248 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   48540         248 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   48541         248 :   char *arg3 = (char *) "average" ;
   48542         248 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   48543         248 :   void *arg5 = (void *) NULL ;
   48544         248 :   void *argp1 = 0 ;
   48545         248 :   int res1 = 0 ;
   48546         248 :   void *argp2 = 0 ;
   48547         248 :   int res2 = 0 ;
   48548         248 :   int res3 ;
   48549         248 :   char *buf3 = 0 ;
   48550         248 :   int alloc3 = 0 ;
   48551         248 :   PyObject * obj0 = 0 ;
   48552         248 :   PyObject * obj1 = 0 ;
   48553         248 :   PyObject * obj2 = 0 ;
   48554         248 :   PyObject * obj3 = 0 ;
   48555         248 :   PyObject * obj4 = 0 ;
   48556         248 :   char * kwnames[] = {
   48557             :     (char *)"srcBand",  (char *)"overviewBand",  (char *)"resampling",  (char *)"callback",  (char *)"callback_data",  NULL 
   48558             :   };
   48559         248 :   int result;
   48560             :   
   48561             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48562         248 :   PyProgressData *psProgressInfo;
   48563         248 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48564         248 :   psProgressInfo->nLastReported = -1;
   48565         248 :   psProgressInfo->psPyCallback = NULL;
   48566         248 :   psProgressInfo->psPyCallbackData = NULL;
   48567         248 :   arg5 = psProgressInfo;
   48568         248 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:RegenerateOverview", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   48569         248 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48570         248 :   if (!SWIG_IsOK(res1)) {
   48571           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48572             :   }
   48573         248 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48574         248 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48575         248 :   if (!SWIG_IsOK(res2)) {
   48576           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RegenerateOverview" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   48577             :   }
   48578         248 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   48579         248 :   if (obj2) {
   48580         248 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   48581         248 :     if (!SWIG_IsOK(res3)) {
   48582           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RegenerateOverview" "', argument " "3"" of type '" "char const *""'");
   48583             :     }
   48584         248 :     arg3 = reinterpret_cast< char * >(buf3);
   48585             :   }
   48586         248 :   if (obj3) {
   48587           0 :     {
   48588             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48589             :       /* callback_func typemap */
   48590             :       
   48591             :       /* In some cases 0 is passed instead of None. */
   48592             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48593           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   48594             :       {
   48595           0 :         if( PyLong_AsLong(obj3) == 0 )
   48596             :         {
   48597           0 :           obj3 = Py_None;
   48598             :         }
   48599             :       }
   48600             :       
   48601           0 :       if (obj3 && obj3 != Py_None ) {
   48602           0 :         void* cbfunction = NULL;
   48603           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   48604             :             (void**)&cbfunction,
   48605             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48606             :             SWIG_POINTER_EXCEPTION | 0 ));
   48607             :         
   48608           0 :         if ( cbfunction == GDALTermProgress ) {
   48609             :           arg4 = GDALTermProgress;
   48610             :         } else {
   48611           0 :           if (!PyCallable_Check(obj3)) {
   48612           0 :             PyErr_SetString( PyExc_RuntimeError,
   48613             :               "Object given is not a Python function" );
   48614           0 :             SWIG_fail;
   48615             :           }
   48616           0 :           psProgressInfo->psPyCallback = obj3;
   48617           0 :           arg4 = PyProgressProxy;
   48618             :         }
   48619             :         
   48620             :       }
   48621             :       
   48622             :     }
   48623             :   }
   48624         248 :   if (obj4) {
   48625           0 :     {
   48626             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48627           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   48628             :     }
   48629             :   }
   48630         248 :   {
   48631         248 :     if (!arg1) {
   48632           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48633             :     }
   48634             :   }
   48635         248 :   {
   48636         248 :     if (!arg2) {
   48637           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48638             :     }
   48639             :   }
   48640         248 :   {
   48641         248 :     const int bLocalUseExceptions = GetUseExceptions();
   48642         248 :     if ( bLocalUseExceptions ) {
   48643         246 :       pushErrorHandler();
   48644             :     }
   48645         248 :     {
   48646         248 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48647         248 :       result = (int)RegenerateOverview(arg1,arg2,(char const *)arg3,arg4,arg5);
   48648         248 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48649             :     }
   48650         248 :     if ( bLocalUseExceptions ) {
   48651         246 :       popErrorHandler();
   48652             :     }
   48653             : #ifndef SED_HACKS
   48654             :     if ( bLocalUseExceptions ) {
   48655             :       CPLErr eclass = CPLGetLastErrorType();
   48656             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48657             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48658             :       }
   48659             :     }
   48660             : #endif
   48661             :   }
   48662         248 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48663         248 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   48664         248 :   {
   48665             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48666             :     
   48667         248 :     CPLFree(psProgressInfo);
   48668             :     
   48669             :   }
   48670         248 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   48671             :   return resultobj;
   48672           0 : fail:
   48673           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   48674           0 :   {
   48675             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48676             :     
   48677           0 :     CPLFree(psProgressInfo);
   48678             :     
   48679             :   }
   48680             :   return NULL;
   48681             : }
   48682             : 
   48683             : 
   48684           3 : SWIGINTERN PyObject *_wrap_ContourGenerate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48685           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48686           3 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   48687           3 :   double arg2 ;
   48688           3 :   double arg3 ;
   48689           3 :   int arg4 ;
   48690           3 :   double *arg5 = (double *) 0 ;
   48691           3 :   int arg6 ;
   48692           3 :   double arg7 ;
   48693           3 :   OGRLayerShadow *arg8 = (OGRLayerShadow *) 0 ;
   48694           3 :   int arg9 ;
   48695           3 :   int arg10 ;
   48696           3 :   GDALProgressFunc arg11 = (GDALProgressFunc) NULL ;
   48697           3 :   void *arg12 = (void *) NULL ;
   48698           3 :   void *argp1 = 0 ;
   48699           3 :   int res1 = 0 ;
   48700           3 :   double val2 ;
   48701           3 :   int ecode2 = 0 ;
   48702           3 :   double val3 ;
   48703           3 :   int ecode3 = 0 ;
   48704           3 :   int val6 ;
   48705           3 :   int ecode6 = 0 ;
   48706           3 :   double val7 ;
   48707           3 :   int ecode7 = 0 ;
   48708           3 :   void *argp8 = 0 ;
   48709           3 :   int res8 = 0 ;
   48710           3 :   int val9 ;
   48711           3 :   int ecode9 = 0 ;
   48712           3 :   int val10 ;
   48713           3 :   int ecode10 = 0 ;
   48714           3 :   PyObject * obj0 = 0 ;
   48715           3 :   PyObject * obj1 = 0 ;
   48716           3 :   PyObject * obj2 = 0 ;
   48717           3 :   PyObject * obj3 = 0 ;
   48718           3 :   PyObject * obj4 = 0 ;
   48719           3 :   PyObject * obj5 = 0 ;
   48720           3 :   PyObject * obj6 = 0 ;
   48721           3 :   PyObject * obj7 = 0 ;
   48722           3 :   PyObject * obj8 = 0 ;
   48723           3 :   PyObject * obj9 = 0 ;
   48724           3 :   PyObject * obj10 = 0 ;
   48725           3 :   char * kwnames[] = {
   48726             :     (char *)"srcBand",  (char *)"contourInterval",  (char *)"contourBase",  (char *)"fixedLevelCount",  (char *)"useNoData",  (char *)"noDataValue",  (char *)"dstLayer",  (char *)"idField",  (char *)"elevField",  (char *)"callback",  (char *)"callback_data",  NULL 
   48727             :   };
   48728           3 :   int result;
   48729             :   
   48730             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48731           3 :   PyProgressData *psProgressInfo;
   48732           3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48733           3 :   psProgressInfo->nLastReported = -1;
   48734           3 :   psProgressInfo->psPyCallback = NULL;
   48735           3 :   psProgressInfo->psPyCallbackData = NULL;
   48736           3 :   arg12 = psProgressInfo;
   48737           3 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO|OO:ContourGenerate", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   48738           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48739           3 :   if (!SWIG_IsOK(res1)) {
   48740           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48741             :   }
   48742           3 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48743           3 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   48744           3 :   if (!SWIG_IsOK(ecode2)) {
   48745           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContourGenerate" "', argument " "2"" of type '" "double""'");
   48746             :   } 
   48747           3 :   arg2 = static_cast< double >(val2);
   48748           3 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   48749           3 :   if (!SWIG_IsOK(ecode3)) {
   48750           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContourGenerate" "', argument " "3"" of type '" "double""'");
   48751             :   } 
   48752           3 :   arg3 = static_cast< double >(val3);
   48753           3 :   {
   48754             :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   48755           3 :     arg5 = CreateCDoubleListFromSequence(obj3, &arg4);
   48756           3 :     if( arg4 < 0 ) {
   48757           0 :       SWIG_fail;
   48758             :     }
   48759             :   }
   48760           3 :   ecode6 = SWIG_AsVal_int(obj4, &val6);
   48761           3 :   if (!SWIG_IsOK(ecode6)) {
   48762           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ContourGenerate" "', argument " "6"" of type '" "int""'");
   48763             :   } 
   48764           3 :   arg6 = static_cast< int >(val6);
   48765           3 :   ecode7 = SWIG_AsVal_double(obj5, &val7);
   48766           3 :   if (!SWIG_IsOK(ecode7)) {
   48767           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ContourGenerate" "', argument " "7"" of type '" "double""'");
   48768             :   } 
   48769           3 :   arg7 = static_cast< double >(val7);
   48770           3 :   res8 = SWIG_ConvertPtr(obj6, &argp8,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   48771           3 :   if (!SWIG_IsOK(res8)) {
   48772           0 :     SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "ContourGenerate" "', argument " "8"" of type '" "OGRLayerShadow *""'"); 
   48773             :   }
   48774           3 :   arg8 = reinterpret_cast< OGRLayerShadow * >(argp8);
   48775           3 :   ecode9 = SWIG_AsVal_int(obj7, &val9);
   48776           3 :   if (!SWIG_IsOK(ecode9)) {
   48777           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ContourGenerate" "', argument " "9"" of type '" "int""'");
   48778             :   } 
   48779           3 :   arg9 = static_cast< int >(val9);
   48780           3 :   ecode10 = SWIG_AsVal_int(obj8, &val10);
   48781           3 :   if (!SWIG_IsOK(ecode10)) {
   48782           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ContourGenerate" "', argument " "10"" of type '" "int""'");
   48783             :   } 
   48784           3 :   arg10 = static_cast< int >(val10);
   48785           3 :   if (obj9) {
   48786           0 :     {
   48787             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48788             :       /* callback_func typemap */
   48789             :       
   48790             :       /* In some cases 0 is passed instead of None. */
   48791             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48792           0 :       if ( PyLong_Check(obj9) || PyInt_Check(obj9) )
   48793             :       {
   48794           0 :         if( PyLong_AsLong(obj9) == 0 )
   48795             :         {
   48796           0 :           obj9 = Py_None;
   48797             :         }
   48798             :       }
   48799             :       
   48800           0 :       if (obj9 && obj9 != Py_None ) {
   48801           0 :         void* cbfunction = NULL;
   48802           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj9,
   48803             :             (void**)&cbfunction,
   48804             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48805             :             SWIG_POINTER_EXCEPTION | 0 ));
   48806             :         
   48807           0 :         if ( cbfunction == GDALTermProgress ) {
   48808             :           arg11 = GDALTermProgress;
   48809             :         } else {
   48810           0 :           if (!PyCallable_Check(obj9)) {
   48811           0 :             PyErr_SetString( PyExc_RuntimeError,
   48812             :               "Object given is not a Python function" );
   48813           0 :             SWIG_fail;
   48814             :           }
   48815           0 :           psProgressInfo->psPyCallback = obj9;
   48816           0 :           arg11 = PyProgressProxy;
   48817             :         }
   48818             :         
   48819             :       }
   48820             :       
   48821             :     }
   48822             :   }
   48823           3 :   if (obj10) {
   48824           0 :     {
   48825             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48826           0 :       psProgressInfo->psPyCallbackData = obj10 ;
   48827             :     }
   48828             :   }
   48829           3 :   {
   48830           3 :     if (!arg1) {
   48831           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48832             :     }
   48833             :   }
   48834           3 :   {
   48835           3 :     if (!arg8) {
   48836           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48837             :     }
   48838             :   }
   48839           3 :   {
   48840           3 :     const int bLocalUseExceptions = GetUseExceptions();
   48841           3 :     if ( bLocalUseExceptions ) {
   48842           3 :       pushErrorHandler();
   48843             :     }
   48844           3 :     {
   48845           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48846           3 :       result = (int)ContourGenerate(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   48847           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48848             :     }
   48849           3 :     if ( bLocalUseExceptions ) {
   48850           3 :       popErrorHandler();
   48851             :     }
   48852             : #ifndef SED_HACKS
   48853             :     if ( bLocalUseExceptions ) {
   48854             :       CPLErr eclass = CPLGetLastErrorType();
   48855             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48856             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48857             :       }
   48858             :     }
   48859             : #endif
   48860             :   }
   48861           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48862           3 :   {
   48863             :     /* %typemap(freearg) (int nList, double* pList) */
   48864           3 :     free(arg5);
   48865             :   }
   48866           3 :   {
   48867             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48868             :     
   48869           3 :     CPLFree(psProgressInfo);
   48870             :     
   48871             :   }
   48872           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   48873             :   return resultobj;
   48874           0 : fail:
   48875           0 :   {
   48876             :     /* %typemap(freearg) (int nList, double* pList) */
   48877           0 :     free(arg5);
   48878             :   }
   48879           0 :   {
   48880             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48881             :     
   48882           0 :     CPLFree(psProgressInfo);
   48883             :     
   48884             :   }
   48885             :   return NULL;
   48886             : }
   48887             : 
   48888             : 
   48889          25 : SWIGINTERN PyObject *_wrap_ContourGenerateEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48890          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48891          25 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   48892          25 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   48893          25 :   char **arg3 = (char **) NULL ;
   48894          25 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   48895          25 :   void *arg5 = (void *) NULL ;
   48896          25 :   void *argp1 = 0 ;
   48897          25 :   int res1 = 0 ;
   48898          25 :   void *argp2 = 0 ;
   48899          25 :   int res2 = 0 ;
   48900          25 :   PyObject * obj0 = 0 ;
   48901          25 :   PyObject * obj1 = 0 ;
   48902          25 :   PyObject * obj2 = 0 ;
   48903          25 :   PyObject * obj3 = 0 ;
   48904          25 :   PyObject * obj4 = 0 ;
   48905          25 :   char * kwnames[] = {
   48906             :     (char *)"srcBand",  (char *)"dstLayer",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   48907             :   };
   48908          25 :   int result;
   48909             :   
   48910             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48911          25 :   PyProgressData *psProgressInfo;
   48912          25 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48913          25 :   psProgressInfo->nLastReported = -1;
   48914          25 :   psProgressInfo->psPyCallback = NULL;
   48915          25 :   psProgressInfo->psPyCallbackData = NULL;
   48916          25 :   arg5 = psProgressInfo;
   48917          25 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:ContourGenerateEx", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   48918          25 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48919          25 :   if (!SWIG_IsOK(res1)) {
   48920           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerateEx" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48921             :   }
   48922          25 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48923          25 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   48924          25 :   if (!SWIG_IsOK(res2)) {
   48925           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContourGenerateEx" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
   48926             :   }
   48927          25 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
   48928          25 :   if (obj2) {
   48929          25 :     {
   48930             :       /* %typemap(in) char **dict */
   48931          25 :       arg3 = NULL;
   48932          25 :       if ( PySequence_Check( obj2 ) ) {
   48933          25 :         int bErr = FALSE;
   48934          25 :         arg3 = CSLFromPySequence(obj2, &bErr);
   48935          25 :         if ( bErr )
   48936             :         {
   48937           0 :           SWIG_fail;
   48938             :         }
   48939             :       }
   48940           0 :       else if ( PyMapping_Check( obj2 ) ) {
   48941           0 :         int bErr = FALSE;
   48942           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   48943           0 :         if ( bErr )
   48944             :         {
   48945           0 :           SWIG_fail;
   48946             :         }
   48947             :       }
   48948             :       else {
   48949           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48950           0 :         SWIG_fail;
   48951             :       }
   48952             :     }
   48953             :   }
   48954          25 :   if (obj3) {
   48955           0 :     {
   48956             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48957             :       /* callback_func typemap */
   48958             :       
   48959             :       /* In some cases 0 is passed instead of None. */
   48960             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48961           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   48962             :       {
   48963           0 :         if( PyLong_AsLong(obj3) == 0 )
   48964             :         {
   48965           0 :           obj3 = Py_None;
   48966             :         }
   48967             :       }
   48968             :       
   48969           0 :       if (obj3 && obj3 != Py_None ) {
   48970           0 :         void* cbfunction = NULL;
   48971           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   48972             :             (void**)&cbfunction,
   48973             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48974             :             SWIG_POINTER_EXCEPTION | 0 ));
   48975             :         
   48976           0 :         if ( cbfunction == GDALTermProgress ) {
   48977             :           arg4 = GDALTermProgress;
   48978             :         } else {
   48979           0 :           if (!PyCallable_Check(obj3)) {
   48980           0 :             PyErr_SetString( PyExc_RuntimeError,
   48981             :               "Object given is not a Python function" );
   48982           0 :             SWIG_fail;
   48983             :           }
   48984           0 :           psProgressInfo->psPyCallback = obj3;
   48985           0 :           arg4 = PyProgressProxy;
   48986             :         }
   48987             :         
   48988             :       }
   48989             :       
   48990             :     }
   48991             :   }
   48992          25 :   if (obj4) {
   48993           0 :     {
   48994             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48995           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   48996             :     }
   48997             :   }
   48998          25 :   {
   48999          25 :     if (!arg1) {
   49000           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49001             :     }
   49002             :   }
   49003          25 :   {
   49004          25 :     if (!arg2) {
   49005           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49006             :     }
   49007             :   }
   49008          25 :   {
   49009          25 :     const int bLocalUseExceptions = GetUseExceptions();
   49010          25 :     if ( bLocalUseExceptions ) {
   49011          25 :       pushErrorHandler();
   49012             :     }
   49013          25 :     {
   49014          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49015          25 :       result = (int)ContourGenerateEx(arg1,arg2,arg3,arg4,arg5);
   49016          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49017             :     }
   49018          25 :     if ( bLocalUseExceptions ) {
   49019          25 :       popErrorHandler();
   49020             :     }
   49021             : #ifndef SED_HACKS
   49022             :     if ( bLocalUseExceptions ) {
   49023             :       CPLErr eclass = CPLGetLastErrorType();
   49024             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49025             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49026             :       }
   49027             :     }
   49028             : #endif
   49029             :   }
   49030          25 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49031          25 :   {
   49032             :     /* %typemap(freearg) char **dict */
   49033          25 :     CSLDestroy( arg3 );
   49034             :   }
   49035          25 :   {
   49036             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49037             :     
   49038          25 :     CPLFree(psProgressInfo);
   49039             :     
   49040             :   }
   49041          37 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   49042             :   return resultobj;
   49043           0 : fail:
   49044           0 :   {
   49045             :     /* %typemap(freearg) char **dict */
   49046           0 :     CSLDestroy( arg3 );
   49047             :   }
   49048           0 :   {
   49049             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49050             :     
   49051           0 :     CPLFree(psProgressInfo);
   49052             :     
   49053             :   }
   49054             :   return NULL;
   49055             : }
   49056             : 
   49057             : 
   49058           0 : SWIGINTERN PyObject *_wrap_ViewshedGenerate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49059           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49060           0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49061           0 :   char *arg2 = (char *) 0 ;
   49062           0 :   char *arg3 = (char *) 0 ;
   49063           0 :   char **arg4 = (char **) 0 ;
   49064           0 :   double arg5 ;
   49065           0 :   double arg6 ;
   49066           0 :   double arg7 ;
   49067           0 :   double arg8 ;
   49068           0 :   double arg9 ;
   49069           0 :   double arg10 ;
   49070           0 :   double arg11 ;
   49071           0 :   double arg12 ;
   49072           0 :   double arg13 ;
   49073           0 :   GDALViewshedMode arg14 ;
   49074           0 :   double arg15 ;
   49075           0 :   GDALProgressFunc arg16 = (GDALProgressFunc) NULL ;
   49076           0 :   void *arg17 = (void *) NULL ;
   49077           0 :   GDALViewshedOutputType arg18 = (GDALViewshedOutputType) GVOT_NORMAL ;
   49078           0 :   char **arg19 = (char **) NULL ;
   49079           0 :   void *argp1 = 0 ;
   49080           0 :   int res1 = 0 ;
   49081           0 :   int res2 ;
   49082           0 :   char *buf2 = 0 ;
   49083           0 :   int alloc2 = 0 ;
   49084           0 :   int res3 ;
   49085           0 :   char *buf3 = 0 ;
   49086           0 :   int alloc3 = 0 ;
   49087           0 :   double val5 ;
   49088           0 :   int ecode5 = 0 ;
   49089           0 :   double val6 ;
   49090           0 :   int ecode6 = 0 ;
   49091           0 :   double val7 ;
   49092           0 :   int ecode7 = 0 ;
   49093           0 :   double val8 ;
   49094           0 :   int ecode8 = 0 ;
   49095           0 :   double val9 ;
   49096           0 :   int ecode9 = 0 ;
   49097           0 :   double val10 ;
   49098           0 :   int ecode10 = 0 ;
   49099           0 :   double val11 ;
   49100           0 :   int ecode11 = 0 ;
   49101           0 :   double val12 ;
   49102           0 :   int ecode12 = 0 ;
   49103           0 :   double val13 ;
   49104           0 :   int ecode13 = 0 ;
   49105           0 :   int val14 ;
   49106           0 :   int ecode14 = 0 ;
   49107           0 :   double val15 ;
   49108           0 :   int ecode15 = 0 ;
   49109           0 :   int val18 ;
   49110           0 :   int ecode18 = 0 ;
   49111           0 :   PyObject * obj0 = 0 ;
   49112           0 :   PyObject * obj1 = 0 ;
   49113           0 :   PyObject * obj2 = 0 ;
   49114           0 :   PyObject * obj3 = 0 ;
   49115           0 :   PyObject * obj4 = 0 ;
   49116           0 :   PyObject * obj5 = 0 ;
   49117           0 :   PyObject * obj6 = 0 ;
   49118           0 :   PyObject * obj7 = 0 ;
   49119           0 :   PyObject * obj8 = 0 ;
   49120           0 :   PyObject * obj9 = 0 ;
   49121           0 :   PyObject * obj10 = 0 ;
   49122           0 :   PyObject * obj11 = 0 ;
   49123           0 :   PyObject * obj12 = 0 ;
   49124           0 :   PyObject * obj13 = 0 ;
   49125           0 :   PyObject * obj14 = 0 ;
   49126           0 :   PyObject * obj15 = 0 ;
   49127           0 :   PyObject * obj16 = 0 ;
   49128           0 :   PyObject * obj17 = 0 ;
   49129           0 :   PyObject * obj18 = 0 ;
   49130           0 :   char * kwnames[] = {
   49131             :     (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 
   49132             :   };
   49133           0 :   GDALDatasetShadow *result = 0 ;
   49134             :   
   49135             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49136           0 :   PyProgressData *psProgressInfo;
   49137           0 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49138           0 :   psProgressInfo->nLastReported = -1;
   49139           0 :   psProgressInfo->psPyCallback = NULL;
   49140           0 :   psProgressInfo->psPyCallbackData = NULL;
   49141           0 :   arg17 = psProgressInfo;
   49142           0 :   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;
   49143           0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49144           0 :   if (!SWIG_IsOK(res1)) {
   49145           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewshedGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49146             :   }
   49147           0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49148           0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   49149           0 :   if (!SWIG_IsOK(res2)) {
   49150           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewshedGenerate" "', argument " "2"" of type '" "char const *""'");
   49151             :   }
   49152           0 :   arg2 = reinterpret_cast< char * >(buf2);
   49153           0 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   49154           0 :   if (!SWIG_IsOK(res3)) {
   49155           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewshedGenerate" "', argument " "3"" of type '" "char const *""'");
   49156             :   }
   49157           0 :   arg3 = reinterpret_cast< char * >(buf3);
   49158           0 :   {
   49159             :     /* %typemap(in) char **dict */
   49160           0 :     arg4 = NULL;
   49161           0 :     if ( PySequence_Check( obj3 ) ) {
   49162           0 :       int bErr = FALSE;
   49163           0 :       arg4 = CSLFromPySequence(obj3, &bErr);
   49164           0 :       if ( bErr )
   49165             :       {
   49166           0 :         SWIG_fail;
   49167             :       }
   49168             :     }
   49169           0 :     else if ( PyMapping_Check( obj3 ) ) {
   49170           0 :       int bErr = FALSE;
   49171           0 :       arg4 = CSLFromPyMapping(obj3, &bErr);
   49172           0 :       if ( bErr )
   49173             :       {
   49174           0 :         SWIG_fail;
   49175             :       }
   49176             :     }
   49177             :     else {
   49178           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49179           0 :       SWIG_fail;
   49180             :     }
   49181             :   }
   49182           0 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   49183           0 :   if (!SWIG_IsOK(ecode5)) {
   49184           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ViewshedGenerate" "', argument " "5"" of type '" "double""'");
   49185             :   } 
   49186           0 :   arg5 = static_cast< double >(val5);
   49187           0 :   ecode6 = SWIG_AsVal_double(obj5, &val6);
   49188           0 :   if (!SWIG_IsOK(ecode6)) {
   49189           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ViewshedGenerate" "', argument " "6"" of type '" "double""'");
   49190             :   } 
   49191           0 :   arg6 = static_cast< double >(val6);
   49192           0 :   ecode7 = SWIG_AsVal_double(obj6, &val7);
   49193           0 :   if (!SWIG_IsOK(ecode7)) {
   49194           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ViewshedGenerate" "', argument " "7"" of type '" "double""'");
   49195             :   } 
   49196           0 :   arg7 = static_cast< double >(val7);
   49197           0 :   ecode8 = SWIG_AsVal_double(obj7, &val8);
   49198           0 :   if (!SWIG_IsOK(ecode8)) {
   49199           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "ViewshedGenerate" "', argument " "8"" of type '" "double""'");
   49200             :   } 
   49201           0 :   arg8 = static_cast< double >(val8);
   49202           0 :   ecode9 = SWIG_AsVal_double(obj8, &val9);
   49203           0 :   if (!SWIG_IsOK(ecode9)) {
   49204           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ViewshedGenerate" "', argument " "9"" of type '" "double""'");
   49205             :   } 
   49206           0 :   arg9 = static_cast< double >(val9);
   49207           0 :   ecode10 = SWIG_AsVal_double(obj9, &val10);
   49208           0 :   if (!SWIG_IsOK(ecode10)) {
   49209           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ViewshedGenerate" "', argument " "10"" of type '" "double""'");
   49210             :   } 
   49211           0 :   arg10 = static_cast< double >(val10);
   49212           0 :   ecode11 = SWIG_AsVal_double(obj10, &val11);
   49213           0 :   if (!SWIG_IsOK(ecode11)) {
   49214           0 :     SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "ViewshedGenerate" "', argument " "11"" of type '" "double""'");
   49215             :   } 
   49216           0 :   arg11 = static_cast< double >(val11);
   49217           0 :   ecode12 = SWIG_AsVal_double(obj11, &val12);
   49218           0 :   if (!SWIG_IsOK(ecode12)) {
   49219           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "ViewshedGenerate" "', argument " "12"" of type '" "double""'");
   49220             :   } 
   49221           0 :   arg12 = static_cast< double >(val12);
   49222           0 :   ecode13 = SWIG_AsVal_double(obj12, &val13);
   49223           0 :   if (!SWIG_IsOK(ecode13)) {
   49224           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "ViewshedGenerate" "', argument " "13"" of type '" "double""'");
   49225             :   } 
   49226           0 :   arg13 = static_cast< double >(val13);
   49227           0 :   ecode14 = SWIG_AsVal_int(obj13, &val14);
   49228           0 :   if (!SWIG_IsOK(ecode14)) {
   49229           0 :     SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "ViewshedGenerate" "', argument " "14"" of type '" "GDALViewshedMode""'");
   49230             :   } 
   49231           0 :   arg14 = static_cast< GDALViewshedMode >(val14);
   49232           0 :   ecode15 = SWIG_AsVal_double(obj14, &val15);
   49233           0 :   if (!SWIG_IsOK(ecode15)) {
   49234           0 :     SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "ViewshedGenerate" "', argument " "15"" of type '" "double""'");
   49235             :   } 
   49236           0 :   arg15 = static_cast< double >(val15);
   49237           0 :   if (obj15) {
   49238           0 :     {
   49239             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49240             :       /* callback_func typemap */
   49241             :       
   49242             :       /* In some cases 0 is passed instead of None. */
   49243             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49244           0 :       if ( PyLong_Check(obj15) || PyInt_Check(obj15) )
   49245             :       {
   49246           0 :         if( PyLong_AsLong(obj15) == 0 )
   49247             :         {
   49248           0 :           obj15 = Py_None;
   49249             :         }
   49250             :       }
   49251             :       
   49252           0 :       if (obj15 && obj15 != Py_None ) {
   49253           0 :         void* cbfunction = NULL;
   49254           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj15,
   49255             :             (void**)&cbfunction,
   49256             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49257             :             SWIG_POINTER_EXCEPTION | 0 ));
   49258             :         
   49259           0 :         if ( cbfunction == GDALTermProgress ) {
   49260             :           arg16 = GDALTermProgress;
   49261             :         } else {
   49262           0 :           if (!PyCallable_Check(obj15)) {
   49263           0 :             PyErr_SetString( PyExc_RuntimeError,
   49264             :               "Object given is not a Python function" );
   49265           0 :             SWIG_fail;
   49266             :           }
   49267           0 :           psProgressInfo->psPyCallback = obj15;
   49268           0 :           arg16 = PyProgressProxy;
   49269             :         }
   49270             :         
   49271             :       }
   49272             :       
   49273             :     }
   49274             :   }
   49275           0 :   if (obj16) {
   49276           0 :     {
   49277             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49278           0 :       psProgressInfo->psPyCallbackData = obj16 ;
   49279             :     }
   49280             :   }
   49281           0 :   if (obj17) {
   49282           0 :     ecode18 = SWIG_AsVal_int(obj17, &val18);
   49283           0 :     if (!SWIG_IsOK(ecode18)) {
   49284           0 :       SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "ViewshedGenerate" "', argument " "18"" of type '" "GDALViewshedOutputType""'");
   49285             :     } 
   49286           0 :     arg18 = static_cast< GDALViewshedOutputType >(val18);
   49287             :   }
   49288           0 :   if (obj18) {
   49289           0 :     {
   49290             :       /* %typemap(in) char **dict */
   49291           0 :       arg19 = NULL;
   49292           0 :       if ( PySequence_Check( obj18 ) ) {
   49293           0 :         int bErr = FALSE;
   49294           0 :         arg19 = CSLFromPySequence(obj18, &bErr);
   49295           0 :         if ( bErr )
   49296             :         {
   49297           0 :           SWIG_fail;
   49298             :         }
   49299             :       }
   49300           0 :       else if ( PyMapping_Check( obj18 ) ) {
   49301           0 :         int bErr = FALSE;
   49302           0 :         arg19 = CSLFromPyMapping(obj18, &bErr);
   49303           0 :         if ( bErr )
   49304             :         {
   49305           0 :           SWIG_fail;
   49306             :         }
   49307             :       }
   49308             :       else {
   49309           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49310           0 :         SWIG_fail;
   49311             :       }
   49312             :     }
   49313             :   }
   49314           0 :   {
   49315           0 :     if (!arg1) {
   49316           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49317             :     }
   49318             :   }
   49319           0 :   {
   49320           0 :     const int bLocalUseExceptions = GetUseExceptions();
   49321           0 :     if ( bLocalUseExceptions ) {
   49322           0 :       pushErrorHandler();
   49323             :     }
   49324           0 :     {
   49325           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49326           0 :       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);
   49327           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49328             :     }
   49329           0 :     if ( bLocalUseExceptions ) {
   49330           0 :       popErrorHandler();
   49331             :     }
   49332             : #ifndef SED_HACKS
   49333             :     if ( bLocalUseExceptions ) {
   49334             :       CPLErr eclass = CPLGetLastErrorType();
   49335             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49336             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49337             :       }
   49338             :     }
   49339             : #endif
   49340             :   }
   49341           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   49342           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   49343           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   49344           0 :   {
   49345             :     /* %typemap(freearg) char **dict */
   49346           0 :     CSLDestroy( arg4 );
   49347             :   }
   49348           0 :   {
   49349             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49350             :     
   49351           0 :     CPLFree(psProgressInfo);
   49352             :     
   49353             :   }
   49354           0 :   {
   49355             :     /* %typemap(freearg) char **dict */
   49356           0 :     CSLDestroy( arg19 );
   49357             :   }
   49358           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   49359             :   return resultobj;
   49360           0 : fail:
   49361           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   49362           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   49363           0 :   {
   49364             :     /* %typemap(freearg) char **dict */
   49365           0 :     CSLDestroy( arg4 );
   49366             :   }
   49367           0 :   {
   49368             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49369             :     
   49370           0 :     CPLFree(psProgressInfo);
   49371             :     
   49372             :   }
   49373           0 :   {
   49374             :     /* %typemap(freearg) char **dict */
   49375           0 :     CSLDestroy( arg19 );
   49376             :   }
   49377             :   return NULL;
   49378             : }
   49379             : 
   49380             : 
   49381           6 : SWIGINTERN PyObject *_wrap_IsLineOfSightVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49382           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49383           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49384           6 :   int arg2 ;
   49385           6 :   int arg3 ;
   49386           6 :   double arg4 ;
   49387           6 :   int arg5 ;
   49388           6 :   int arg6 ;
   49389           6 :   double arg7 ;
   49390           6 :   bool *arg8 = (bool *) 0 ;
   49391           6 :   int *arg9 = (int *) 0 ;
   49392           6 :   int *arg10 = (int *) 0 ;
   49393           6 :   char **arg11 = (char **) NULL ;
   49394           6 :   void *argp1 = 0 ;
   49395           6 :   int res1 = 0 ;
   49396           6 :   int val2 ;
   49397           6 :   int ecode2 = 0 ;
   49398           6 :   int val3 ;
   49399           6 :   int ecode3 = 0 ;
   49400           6 :   double val4 ;
   49401           6 :   int ecode4 = 0 ;
   49402           6 :   int val5 ;
   49403           6 :   int ecode5 = 0 ;
   49404           6 :   int val6 ;
   49405           6 :   int ecode6 = 0 ;
   49406           6 :   double val7 ;
   49407           6 :   int ecode7 = 0 ;
   49408           6 :   bool visible8 = 0 ;
   49409           6 :   int nxintersection8 = 0 ;
   49410           6 :   int nyintersection8 = 0 ;
   49411           6 :   PyObject * obj0 = 0 ;
   49412           6 :   PyObject * obj1 = 0 ;
   49413           6 :   PyObject * obj2 = 0 ;
   49414           6 :   PyObject * obj3 = 0 ;
   49415           6 :   PyObject * obj4 = 0 ;
   49416           6 :   PyObject * obj5 = 0 ;
   49417           6 :   PyObject * obj6 = 0 ;
   49418           6 :   PyObject * obj7 = 0 ;
   49419           6 :   char * kwnames[] = {
   49420             :     (char *)"band",  (char *)"xA",  (char *)"yA",  (char *)"zA",  (char *)"xB",  (char *)"yB",  (char *)"zB",  (char *)"options",  NULL 
   49421             :   };
   49422             :   
   49423           6 :   {
   49424             :     /* %typemap(in) (bool *pbVisible, int *pnXIntersection, int *pnYIntersection) */
   49425           6 :     arg8 = &visible8;
   49426           6 :     arg9 = &nxintersection8;
   49427           6 :     arg10 = &nyintersection8;
   49428             :   }
   49429           6 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO|O:IsLineOfSightVisible", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   49430           6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49431           6 :   if (!SWIG_IsOK(res1)) {
   49432           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IsLineOfSightVisible" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49433             :   }
   49434           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49435           6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   49436           6 :   if (!SWIG_IsOK(ecode2)) {
   49437           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IsLineOfSightVisible" "', argument " "2"" of type '" "int""'");
   49438             :   } 
   49439           6 :   arg2 = static_cast< int >(val2);
   49440           6 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   49441           6 :   if (!SWIG_IsOK(ecode3)) {
   49442           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IsLineOfSightVisible" "', argument " "3"" of type '" "int""'");
   49443             :   } 
   49444           6 :   arg3 = static_cast< int >(val3);
   49445           6 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   49446           6 :   if (!SWIG_IsOK(ecode4)) {
   49447           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IsLineOfSightVisible" "', argument " "4"" of type '" "double""'");
   49448             :   } 
   49449           6 :   arg4 = static_cast< double >(val4);
   49450           6 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   49451           6 :   if (!SWIG_IsOK(ecode5)) {
   49452           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IsLineOfSightVisible" "', argument " "5"" of type '" "int""'");
   49453             :   } 
   49454           6 :   arg5 = static_cast< int >(val5);
   49455           6 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   49456           6 :   if (!SWIG_IsOK(ecode6)) {
   49457           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "IsLineOfSightVisible" "', argument " "6"" of type '" "int""'");
   49458             :   } 
   49459           6 :   arg6 = static_cast< int >(val6);
   49460           6 :   ecode7 = SWIG_AsVal_double(obj6, &val7);
   49461           6 :   if (!SWIG_IsOK(ecode7)) {
   49462           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "IsLineOfSightVisible" "', argument " "7"" of type '" "double""'");
   49463             :   } 
   49464           6 :   arg7 = static_cast< double >(val7);
   49465           6 :   if (obj7) {
   49466           0 :     {
   49467             :       /* %typemap(in) char **dict */
   49468           0 :       arg11 = NULL;
   49469           0 :       if ( PySequence_Check( obj7 ) ) {
   49470           0 :         int bErr = FALSE;
   49471           0 :         arg11 = CSLFromPySequence(obj7, &bErr);
   49472           0 :         if ( bErr )
   49473             :         {
   49474           0 :           SWIG_fail;
   49475             :         }
   49476             :       }
   49477           0 :       else if ( PyMapping_Check( obj7 ) ) {
   49478           0 :         int bErr = FALSE;
   49479           0 :         arg11 = CSLFromPyMapping(obj7, &bErr);
   49480           0 :         if ( bErr )
   49481             :         {
   49482           0 :           SWIG_fail;
   49483             :         }
   49484             :       }
   49485             :       else {
   49486           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49487           0 :         SWIG_fail;
   49488             :       }
   49489             :     }
   49490             :   }
   49491           6 :   {
   49492           6 :     if (!arg1) {
   49493           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49494             :     }
   49495             :   }
   49496           5 :   {
   49497           5 :     const int bLocalUseExceptions = GetUseExceptions();
   49498           5 :     if ( bLocalUseExceptions ) {
   49499           5 :       pushErrorHandler();
   49500             :     }
   49501           5 :     {
   49502           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49503           5 :       IsLineOfSightVisible(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   49504           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49505             :     }
   49506           5 :     if ( bLocalUseExceptions ) {
   49507           5 :       popErrorHandler();
   49508             :     }
   49509             : #ifndef SED_HACKS
   49510             :     if ( bLocalUseExceptions ) {
   49511             :       CPLErr eclass = CPLGetLastErrorType();
   49512             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49513             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49514             :       }
   49515             :     }
   49516             : #endif
   49517             :   }
   49518           5 :   resultobj = SWIG_Py_Void();
   49519           5 :   {
   49520             :     /* %typemap(argout) (bool *pbVisible, int *pnXIntersection, int *pnYIntersection)  */
   49521           5 :     PyObject *r = PyTuple_New( 3 );
   49522           5 :     PyTuple_SetItem( r, 0, PyBool_FromLong(*arg8) );
   49523           5 :     PyTuple_SetItem( r, 1, PyLong_FromLong(*arg9) );
   49524           5 :     PyTuple_SetItem( r, 2, PyLong_FromLong(*arg10) );
   49525             : #if SWIG_VERSION >= 0x040300
   49526             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   49527             : #else
   49528           5 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   49529             : #endif
   49530             :   }
   49531           5 :   {
   49532             :     /* %typemap(freearg) char **dict */
   49533           5 :     CSLDestroy( arg11 );
   49534             :   }
   49535           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   49536             :   return resultobj;
   49537           1 : fail:
   49538           1 :   {
   49539             :     /* %typemap(freearg) char **dict */
   49540           1 :     CSLDestroy( arg11 );
   49541             :   }
   49542             :   return NULL;
   49543             : }
   49544             : 
   49545             : 
   49546          24 : SWIGINTERN PyObject *_wrap_AutoCreateWarpedVRT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49547          24 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49548          24 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   49549          24 :   char *arg2 = (char *) 0 ;
   49550          24 :   char *arg3 = (char *) 0 ;
   49551          24 :   GDALResampleAlg arg4 = (GDALResampleAlg) GRA_NearestNeighbour ;
   49552          24 :   double arg5 = (double) 0.0 ;
   49553          24 :   void *argp1 = 0 ;
   49554          24 :   int res1 = 0 ;
   49555          24 :   int res2 ;
   49556          24 :   char *buf2 = 0 ;
   49557          24 :   int alloc2 = 0 ;
   49558          24 :   int res3 ;
   49559          24 :   char *buf3 = 0 ;
   49560          24 :   int alloc3 = 0 ;
   49561          24 :   int val4 ;
   49562          24 :   int ecode4 = 0 ;
   49563          24 :   double val5 ;
   49564          24 :   int ecode5 = 0 ;
   49565          24 :   PyObject *swig_obj[5] ;
   49566          24 :   GDALDatasetShadow *result = 0 ;
   49567             :   
   49568          24 :   if (!SWIG_Python_UnpackTuple(args, "AutoCreateWarpedVRT", 1, 5, swig_obj)) SWIG_fail;
   49569          24 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   49570          24 :   if (!SWIG_IsOK(res1)) {
   49571           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoCreateWarpedVRT" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   49572             :   }
   49573          24 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   49574          24 :   if (swig_obj[1]) {
   49575           9 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   49576           9 :     if (!SWIG_IsOK(res2)) {
   49577           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoCreateWarpedVRT" "', argument " "2"" of type '" "char const *""'");
   49578             :     }
   49579           9 :     arg2 = reinterpret_cast< char * >(buf2);
   49580             :   }
   49581          24 :   if (swig_obj[2]) {
   49582           9 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   49583           9 :     if (!SWIG_IsOK(res3)) {
   49584           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AutoCreateWarpedVRT" "', argument " "3"" of type '" "char const *""'");
   49585             :     }
   49586           9 :     arg3 = reinterpret_cast< char * >(buf3);
   49587             :   }
   49588          24 :   if (swig_obj[3]) {
   49589           3 :     ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   49590           3 :     if (!SWIG_IsOK(ecode4)) {
   49591           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AutoCreateWarpedVRT" "', argument " "4"" of type '" "GDALResampleAlg""'");
   49592             :     } 
   49593           3 :     arg4 = static_cast< GDALResampleAlg >(val4);
   49594             :   }
   49595          24 :   if (swig_obj[4]) {
   49596           3 :     ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   49597           3 :     if (!SWIG_IsOK(ecode5)) {
   49598           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "AutoCreateWarpedVRT" "', argument " "5"" of type '" "double""'");
   49599             :     } 
   49600           3 :     arg5 = static_cast< double >(val5);
   49601             :   }
   49602          24 :   {
   49603          24 :     if (!arg1) {
   49604           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49605             :     }
   49606             :   }
   49607          24 :   {
   49608          24 :     const int bLocalUseExceptions = GetUseExceptions();
   49609          24 :     if ( bLocalUseExceptions ) {
   49610          24 :       pushErrorHandler();
   49611             :     }
   49612          24 :     {
   49613          24 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49614          24 :       result = (GDALDatasetShadow *)AutoCreateWarpedVRT(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
   49615          24 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49616             :     }
   49617          24 :     if ( bLocalUseExceptions ) {
   49618          24 :       popErrorHandler();
   49619             :     }
   49620             : #ifndef SED_HACKS
   49621             :     if ( bLocalUseExceptions ) {
   49622             :       CPLErr eclass = CPLGetLastErrorType();
   49623             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49624             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49625             :       }
   49626             :     }
   49627             : #endif
   49628             :   }
   49629          24 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   49630          24 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   49631          24 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   49632          26 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   49633             :   return resultobj;
   49634           0 : fail:
   49635           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   49636           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   49637             :   return NULL;
   49638             : }
   49639             : 
   49640             : 
   49641           8 : SWIGINTERN PyObject *_wrap_CreatePansharpenedVRT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49642           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49643           8 :   char *arg1 = (char *) 0 ;
   49644           8 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   49645           8 :   int arg3 ;
   49646           8 :   GDALRasterBandShadow **arg4 = (GDALRasterBandShadow **) 0 ;
   49647           8 :   int res1 ;
   49648           8 :   char *buf1 = 0 ;
   49649           8 :   int alloc1 = 0 ;
   49650           8 :   void *argp2 = 0 ;
   49651           8 :   int res2 = 0 ;
   49652           8 :   PyObject *swig_obj[3] ;
   49653           8 :   GDALDatasetShadow *result = 0 ;
   49654             :   
   49655           8 :   if (!SWIG_Python_UnpackTuple(args, "CreatePansharpenedVRT", 3, 3, swig_obj)) SWIG_fail;
   49656           8 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   49657           8 :   if (!SWIG_IsOK(res1)) {
   49658           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreatePansharpenedVRT" "', argument " "1"" of type '" "char const *""'");
   49659             :   }
   49660           8 :   arg1 = reinterpret_cast< char * >(buf1);
   49661           8 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49662           8 :   if (!SWIG_IsOK(res2)) {
   49663           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreatePansharpenedVRT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   49664             :   }
   49665           8 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   49666           8 :   {
   49667             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   49668           8 :     if ( !PySequence_Check(swig_obj[2]) ) {
   49669           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   49670           0 :       SWIG_fail;
   49671             :     }
   49672           8 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   49673           8 :     if( size > (Py_ssize_t)INT_MAX ) {
   49674           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   49675           0 :       SWIG_fail;
   49676             :     }
   49677           8 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   49678           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   49679           0 :       SWIG_fail;
   49680             :     }
   49681           8 :     arg3 = (int)size;
   49682           8 :     arg4 = (GDALRasterBandShadow**) VSIMalloc(arg3*sizeof(GDALRasterBandShadow*));
   49683           8 :     if( !arg4) {
   49684           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   49685           0 :       SWIG_fail;
   49686             :     }
   49687             :     
   49688          30 :     for( int i = 0; i<arg3; i++ ) {
   49689          22 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   49690          22 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   49691          22 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   49692          22 :       if (!rawobjectpointer) {
   49693           0 :         Py_DECREF(o);
   49694           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   49695           0 :         SWIG_fail;
   49696             :       }
   49697          22 :       arg4[i] = rawobjectpointer;
   49698          22 :       Py_DECREF(o);
   49699             :       
   49700             :     }
   49701             :   }
   49702           8 :   {
   49703           8 :     if (!arg2) {
   49704           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49705             :     }
   49706             :   }
   49707           8 :   {
   49708           8 :     const int bLocalUseExceptions = GetUseExceptions();
   49709           8 :     if ( bLocalUseExceptions ) {
   49710           2 :       pushErrorHandler();
   49711             :     }
   49712           8 :     {
   49713           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49714           8 :       result = (GDALDatasetShadow *)CreatePansharpenedVRT((char const *)arg1,arg2,arg3,arg4);
   49715           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49716             :     }
   49717           8 :     if ( bLocalUseExceptions ) {
   49718           2 :       popErrorHandler();
   49719             :     }
   49720             : #ifndef SED_HACKS
   49721             :     if ( bLocalUseExceptions ) {
   49722             :       CPLErr eclass = CPLGetLastErrorType();
   49723             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49724             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49725             :       }
   49726             :     }
   49727             : #endif
   49728             :   }
   49729           8 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   49730           8 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   49731           8 :   {
   49732             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   49733           8 :     CPLFree( arg4 );
   49734             :   }
   49735           8 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   49736             :   return resultobj;
   49737           0 : fail:
   49738           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   49739           0 :   {
   49740             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   49741           0 :     CPLFree( arg4 );
   49742             :   }
   49743             :   return NULL;
   49744             : }
   49745             : 
   49746             : 
   49747           1 : SWIGINTERN PyObject *_wrap_GetTranformerOptionList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49748           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49749           1 :   char *result = 0 ;
   49750             :   
   49751           1 :   if (!SWIG_Python_UnpackTuple(args, "GetTranformerOptionList", 0, 0, 0)) SWIG_fail;
   49752           1 :   {
   49753           1 :     const int bLocalUseExceptions = GetUseExceptions();
   49754           1 :     if ( bLocalUseExceptions ) {
   49755           1 :       pushErrorHandler();
   49756             :     }
   49757           1 :     {
   49758           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49759           1 :       result = (char *)GDALGetGenImgProjTranformerOptionList();
   49760           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49761             :     }
   49762           1 :     if ( bLocalUseExceptions ) {
   49763           1 :       popErrorHandler();
   49764             :     }
   49765             : #ifndef SED_HACKS
   49766             :     if ( bLocalUseExceptions ) {
   49767             :       CPLErr eclass = CPLGetLastErrorType();
   49768             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49769             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49770             :       }
   49771             :     }
   49772             : #endif
   49773             :   }
   49774           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   49775           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   49776             :   return resultobj;
   49777           0 : fail:
   49778           0 :   return NULL;
   49779             : }
   49780             : 
   49781             : 
   49782          71 : SWIGINTERN PyObject *_wrap_delete_GDALTransformerInfoShadow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   49783          71 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49784          71 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   49785          71 :   void *argp1 = 0 ;
   49786          71 :   int res1 = 0 ;
   49787          71 :   PyObject *swig_obj[1] ;
   49788             :   
   49789          71 :   if (!args) SWIG_fail;
   49790          71 :   swig_obj[0] = args;
   49791          71 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_DISOWN |  0 );
   49792          71 :   if (!SWIG_IsOK(res1)) {
   49793           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTransformerInfoShadow" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   49794             :   }
   49795          71 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   49796          71 :   {
   49797          71 :     const int bLocalUseExceptions = GetUseExceptions();
   49798          71 :     if ( bLocalUseExceptions ) {
   49799          69 :       pushErrorHandler();
   49800             :     }
   49801          71 :     {
   49802          71 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49803          71 :       delete_GDALTransformerInfoShadow(arg1);
   49804          71 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49805             :     }
   49806          71 :     if ( bLocalUseExceptions ) {
   49807          69 :       popErrorHandler();
   49808             :     }
   49809             : #ifndef SED_HACKS
   49810             :     if ( bLocalUseExceptions ) {
   49811             :       CPLErr eclass = CPLGetLastErrorType();
   49812             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49813             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49814             :       }
   49815             :     }
   49816             : #endif
   49817             :   }
   49818          71 :   resultobj = SWIG_Py_Void();
   49819          71 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   49820             :   return resultobj;
   49821             : fail:
   49822             :   return NULL;
   49823             : }
   49824             : 
   49825             : 
   49826             : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   49827             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49828             :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   49829             :   int arg2 ;
   49830             :   double *arg3 ;
   49831             :   void *argp1 = 0 ;
   49832             :   int res1 = 0 ;
   49833             :   int val2 ;
   49834             :   int ecode2 = 0 ;
   49835             :   double argin3[3] ;
   49836             :   int result;
   49837             :   
   49838             :   if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
   49839             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   49840             :   if (!SWIG_IsOK(res1)) {
   49841             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   49842             :   }
   49843             :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   49844             :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   49845             :   if (!SWIG_IsOK(ecode2)) {
   49846             :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "2"" of type '" "int""'");
   49847             :   } 
   49848             :   arg2 = static_cast< int >(val2);
   49849             :   {
   49850             :     /* %typemap(in) (double argin3[ANY]) */
   49851             :     arg3 = argin3;
   49852             :     if (! PySequence_Check(swig_obj[2]) ) {
   49853             :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   49854             :       SWIG_fail;
   49855             :     }
   49856             :     Py_ssize_t seq_size = PySequence_Size(swig_obj[2]);
   49857             :     if ( seq_size != 3 ) {
   49858             :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   49859             :       SWIG_fail;
   49860             :     }
   49861             :     for (unsigned int i=0; i<3; i++) {
   49862             :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   49863             :       double val;
   49864             :       if ( !PyArg_Parse(o, "d", &val ) ) {
   49865             :         PyErr_SetString(PyExc_TypeError, "not a number");
   49866             :         Py_DECREF(o);
   49867             :         SWIG_fail;
   49868             :       }
   49869             :       arg3[i] =  val;
   49870             :       Py_DECREF(o);
   49871             :     }
   49872             :   }
   49873             :   {
   49874             :     const int bLocalUseExceptions = GetUseExceptions();
   49875             :     if ( bLocalUseExceptions ) {
   49876             :       pushErrorHandler();
   49877             :     }
   49878             :     {
   49879             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49880             :       result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_0(arg1,arg2,arg3);
   49881             :       SWIG_PYTHON_THREAD_END_ALLOW;
   49882             :     }
   49883             :     if ( bLocalUseExceptions ) {
   49884             :       popErrorHandler();
   49885             :     }
   49886             : #ifndef SED_HACKS
   49887             :     if ( bLocalUseExceptions ) {
   49888             :       CPLErr eclass = CPLGetLastErrorType();
   49889             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49890             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49891             :       }
   49892             :     }
   49893             : #endif
   49894             :   }
   49895             :   resultobj = SWIG_From_int(static_cast< int >(result));
   49896             :   {
   49897             :     /* %typemap(argout) (double argout[ANY]) */
   49898             :     PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
   49899             : #if SWIG_VERSION >= 0x040300
   49900             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   49901             : #else
   49902             :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   49903             : #endif
   49904             :   }
   49905             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   49906             :   return resultobj;
   49907             : fail:
   49908             :   return NULL;
   49909             : }
   49910             : 
   49911             : 
   49912             : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   49913             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49914             :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   49915             :   double *arg2 ;
   49916             :   int arg3 ;
   49917             :   double arg4 ;
   49918             :   double arg5 ;
   49919             :   double arg6 = (double) 0.0 ;
   49920             :   void *argp1 = 0 ;
   49921             :   int res1 = 0 ;
   49922             :   double argout2[3] ;
   49923             :   int val3 ;
   49924             :   int ecode3 = 0 ;
   49925             :   double val4 ;
   49926             :   int ecode4 = 0 ;
   49927             :   double val5 ;
   49928             :   int ecode5 = 0 ;
   49929             :   double val6 ;
   49930             :   int ecode6 = 0 ;
   49931             :   int result;
   49932             :   
   49933             :   {
   49934             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   49935             :     memset(argout2, 0, sizeof(argout2));
   49936             :     arg2 = argout2;
   49937             :   }
   49938             :   if ((nobjs < 4) || (nobjs > 5)) SWIG_fail;
   49939             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   49940             :   if (!SWIG_IsOK(res1)) {
   49941             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   49942             :   }
   49943             :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   49944             :   ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   49945             :   if (!SWIG_IsOK(ecode3)) {
   49946             :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "3"" of type '" "int""'");
   49947             :   } 
   49948             :   arg3 = static_cast< int >(val3);
   49949             :   ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
   49950             :   if (!SWIG_IsOK(ecode4)) {
   49951             :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "4"" of type '" "double""'");
   49952             :   } 
   49953             :   arg4 = static_cast< double >(val4);
   49954             :   ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
   49955             :   if (!SWIG_IsOK(ecode5)) {
   49956             :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "5"" of type '" "double""'");
   49957             :   } 
   49958             :   arg5 = static_cast< double >(val5);
   49959             :   if (swig_obj[4]) {
   49960             :     ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
   49961             :     if (!SWIG_IsOK(ecode6)) {
   49962             :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "6"" of type '" "double""'");
   49963             :     } 
   49964             :     arg6 = static_cast< double >(val6);
   49965             :   }
   49966             :   {
   49967             :     const int bLocalUseExceptions = GetUseExceptions();
   49968             :     if ( bLocalUseExceptions ) {
   49969             :       pushErrorHandler();
   49970             :     }
   49971             :     {
   49972             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49973             :       result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
   49974             :       SWIG_PYTHON_THREAD_END_ALLOW;
   49975             :     }
   49976             :     if ( bLocalUseExceptions ) {
   49977             :       popErrorHandler();
   49978             :     }
   49979             : #ifndef SED_HACKS
   49980             :     if ( bLocalUseExceptions ) {
   49981             :       CPLErr eclass = CPLGetLastErrorType();
   49982             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49983             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49984             :       }
   49985             :     }
   49986             : #endif
   49987             :   }
   49988             :   resultobj = SWIG_From_int(static_cast< int >(result));
   49989             :   {
   49990             :     /* %typemap(argout) (double argout[ANY]) */
   49991             :     PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
   49992             : #if SWIG_VERSION >= 0x040300
   49993             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   49994             : #else
   49995             :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   49996             : #endif
   49997             :   }
   49998             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   49999             :   return resultobj;
   50000             : fail:
   50001             :   return NULL;
   50002             : }
   50003             : 
   50004             : 
   50005        8677 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint(PyObject *self, PyObject *args) {
   50006        8677 :   Py_ssize_t argc;
   50007        8677 :   PyObject *argv[6] = {
   50008             :     0
   50009             :   };
   50010             :   
   50011        8677 :   if (!(argc = SWIG_Python_UnpackTuple(args, "GDALTransformerInfoShadow_TransformPoint", 0, 5, argv))) SWIG_fail;
   50012        8677 :   --argc;
   50013        8677 :   if (argc == 3) {
   50014           0 :     int _v;
   50015           0 :     void *vptr = 0;
   50016           0 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   50017           0 :     _v = SWIG_CheckState(res);
   50018           0 :     if (_v) {
   50019           0 :       {
   50020           0 :         int res = SWIG_AsVal_int(argv[1], NULL);
   50021           0 :         _v = SWIG_CheckState(res);
   50022             :       }
   50023           0 :       if (_v) {
   50024           0 :         void *vptr = 0;
   50025           0 :         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
   50026           0 :         _v = SWIG_CheckState(res);
   50027           0 :         if (_v) {
   50028           0 :           return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_0(self, argc, argv);
   50029             :         }
   50030             :       }
   50031             :     }
   50032             :   }
   50033        8677 :   if ((argc >= 4) && (argc <= 5)) {
   50034        8677 :     int _v;
   50035        8677 :     void *vptr = 0;
   50036        8677 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   50037        8677 :     _v = SWIG_CheckState(res);
   50038        8677 :     if (_v) {
   50039        8677 :       {
   50040        8677 :         int res = SWIG_AsVal_int(argv[1], NULL);
   50041        8677 :         _v = SWIG_CheckState(res);
   50042             :       }
   50043        8677 :       if (_v) {
   50044        8677 :         {
   50045        8677 :           int res = SWIG_AsVal_double(argv[2], NULL);
   50046        8677 :           _v = SWIG_CheckState(res);
   50047             :         }
   50048        8677 :         if (_v) {
   50049        8677 :           {
   50050        8677 :             int res = SWIG_AsVal_double(argv[3], NULL);
   50051        8677 :             _v = SWIG_CheckState(res);
   50052             :           }
   50053        8677 :           if (_v) {
   50054        8677 :             if (argc <= 4) {
   50055        8677 :               return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(self, argc, argv);
   50056             :             }
   50057          40 :             {
   50058          40 :               int res = SWIG_AsVal_double(argv[4], NULL);
   50059          40 :               _v = SWIG_CheckState(res);
   50060             :             }
   50061          40 :             if (_v) {
   50062          40 :               return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(self, argc, argv);
   50063             :             }
   50064             :           }
   50065             :         }
   50066             :       }
   50067             :     }
   50068             :   }
   50069             :   
   50070           0 : fail:
   50071           0 :   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GDALTransformerInfoShadow_TransformPoint'.\n"
   50072             :     "  Possible C/C++ prototypes are:\n"
   50073             :     "    GDALTransformerInfoShadow::TransformPoint(int,double [3])\n"
   50074             :     "    GDALTransformerInfoShadow::TransformPoint(double [3],int,double,double,double)\n");
   50075             :   return 0;
   50076             : }
   50077             : 
   50078             : 
   50079           4 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50080           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50081           4 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   50082           4 :   int arg2 ;
   50083           4 :   int arg3 ;
   50084           4 :   double *arg4 = (double *) 0 ;
   50085           4 :   double *arg5 = (double *) 0 ;
   50086           4 :   double *arg6 = (double *) 0 ;
   50087           4 :   int *arg7 = (int *) 0 ;
   50088           4 :   void *argp1 = 0 ;
   50089           4 :   int res1 = 0 ;
   50090           4 :   int val2 ;
   50091           4 :   int ecode2 = 0 ;
   50092           4 :   PyObject *swig_obj[3] ;
   50093           4 :   int result;
   50094             :   
   50095           4 :   if (!SWIG_Python_UnpackTuple(args, "GDALTransformerInfoShadow_TransformPoints", 3, 3, swig_obj)) SWIG_fail;
   50096           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   50097           4 :   if (!SWIG_IsOK(res1)) {
   50098           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoints" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   50099             :   }
   50100           4 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   50101           4 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   50102           4 :   if (!SWIG_IsOK(ecode2)) {
   50103           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDALTransformerInfoShadow_TransformPoints" "', argument " "2"" of type '" "int""'");
   50104             :   } 
   50105           4 :   arg2 = static_cast< int >(val2);
   50106           4 :   {
   50107             :     /*  typemap(in,numinputs=1) (int nCount, double *x, double *y, double *z, int* panSuccess) */
   50108           4 :     if ( !PySequence_Check(swig_obj[2]) ) {
   50109           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   50110           0 :       SWIG_fail;
   50111             :     }
   50112             :     
   50113           4 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   50114           4 :     if( size != (int)size ) {
   50115           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   50116           0 :       SWIG_fail;
   50117             :     }
   50118           4 :     arg3 = (int)size;
   50119           4 :     arg4 = (double*) VSIMalloc(arg3*sizeof(double));
   50120           4 :     arg5 = (double*) VSIMalloc(arg3*sizeof(double));
   50121           4 :     arg6 = (double*) VSIMalloc(arg3*sizeof(double));
   50122           4 :     arg7 = (int*) VSIMalloc(arg3*sizeof(int));
   50123             :     
   50124           4 :     if (arg4 == NULL || arg5 == NULL || arg6 == NULL || arg7 == NULL)
   50125             :     {
   50126           0 :       PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
   50127           0 :       SWIG_fail;
   50128             :     }
   50129             :     
   50130           4 :     if (!DecomposeSequenceOfCoordinates(swig_obj[2],arg3,arg4,arg5,arg6)) {
   50131           0 :       SWIG_fail;
   50132             :     }
   50133             :   }
   50134           4 :   {
   50135           4 :     const int bLocalUseExceptions = GetUseExceptions();
   50136           4 :     if ( bLocalUseExceptions ) {
   50137           4 :       pushErrorHandler();
   50138             :     }
   50139           4 :     {
   50140           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50141           4 :       result = (int)GDALTransformerInfoShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   50142           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50143             :     }
   50144           4 :     if ( bLocalUseExceptions ) {
   50145           4 :       popErrorHandler();
   50146             :     }
   50147             : #ifndef SED_HACKS
   50148             :     if ( bLocalUseExceptions ) {
   50149             :       CPLErr eclass = CPLGetLastErrorType();
   50150             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50151             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50152             :       }
   50153             :     }
   50154             : #endif
   50155             :   }
   50156           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   50157           4 :   {
   50158             :     /* %typemap(argout)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   50159           4 :     Py_DECREF(resultobj);
   50160           4 :     PyObject *xyz = PyList_New( arg3 );
   50161           4 :     if( !xyz ) {
   50162           0 :       SWIG_fail;
   50163             :     }
   50164           4 :     PyObject *success = PyList_New( arg3 );
   50165           4 :     if( !success ) {
   50166           0 :       Py_DECREF(xyz);
   50167           0 :       SWIG_fail;
   50168             :     }
   50169          35 :     for( int i=0; i< arg3; i++ ) {
   50170          31 :       PyObject *tuple = PyTuple_New( 3 );
   50171          31 :       PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg4)[i] ) );
   50172          31 :       PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg5)[i] ) );
   50173          31 :       PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg6)[i] ) );
   50174          31 :       PyList_SetItem( xyz, i, tuple );
   50175          31 :       PyList_SetItem( success, i, Py_BuildValue( "i",  (arg7)[i]) );
   50176             :     }
   50177           4 :     resultobj = PyTuple_New( 2 );
   50178           4 :     PyTuple_SetItem( resultobj, 0, xyz );
   50179           4 :     PyTuple_SetItem( resultobj, 1, success );
   50180             :   }
   50181           4 :   {
   50182             :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   50183           4 :     VSIFree(arg4);
   50184           4 :     VSIFree(arg5);
   50185           4 :     VSIFree(arg6);
   50186           4 :     VSIFree(arg7);
   50187             :   }
   50188           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50189             :   return resultobj;
   50190           0 : fail:
   50191           0 :   {
   50192             :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   50193           0 :     VSIFree(arg4);
   50194           0 :     VSIFree(arg5);
   50195           0 :     VSIFree(arg6);
   50196           0 :     VSIFree(arg7);
   50197             :   }
   50198             :   return NULL;
   50199             : }
   50200             : 
   50201             : 
   50202           1 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformGeolocations(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   50203           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50204           1 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   50205           1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   50206           1 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   50207           1 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   50208           1 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   50209           1 :   void *arg6 = (void *) NULL ;
   50210           1 :   char **arg7 = (char **) NULL ;
   50211           1 :   void *argp1 = 0 ;
   50212           1 :   int res1 = 0 ;
   50213           1 :   void *argp2 = 0 ;
   50214           1 :   int res2 = 0 ;
   50215           1 :   void *argp3 = 0 ;
   50216           1 :   int res3 = 0 ;
   50217           1 :   void *argp4 = 0 ;
   50218           1 :   int res4 = 0 ;
   50219           1 :   PyObject * obj0 = 0 ;
   50220           1 :   PyObject * obj1 = 0 ;
   50221           1 :   PyObject * obj2 = 0 ;
   50222           1 :   PyObject * obj3 = 0 ;
   50223           1 :   PyObject * obj4 = 0 ;
   50224           1 :   PyObject * obj5 = 0 ;
   50225           1 :   PyObject * obj6 = 0 ;
   50226           1 :   char * kwnames[] = {
   50227             :     (char *)"self",  (char *)"xBand",  (char *)"yBand",  (char *)"zBand",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   50228             :   };
   50229           1 :   int result;
   50230             :   
   50231             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   50232           1 :   PyProgressData *psProgressInfo;
   50233           1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   50234           1 :   psProgressInfo->nLastReported = -1;
   50235           1 :   psProgressInfo->psPyCallback = NULL;
   50236           1 :   psProgressInfo->psPyCallbackData = NULL;
   50237           1 :   arg6 = psProgressInfo;
   50238           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:GDALTransformerInfoShadow_TransformGeolocations", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   50239           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   50240           1 :   if (!SWIG_IsOK(res1)) {
   50241           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   50242             :   }
   50243           1 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   50244           1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50245           1 :   if (!SWIG_IsOK(res2)) {
   50246           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   50247             :   }
   50248           1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   50249           1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50250           1 :   if (!SWIG_IsOK(res3)) {
   50251           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   50252             :   }
   50253           1 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   50254           1 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50255           1 :   if (!SWIG_IsOK(res4)) {
   50256           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   50257             :   }
   50258           1 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   50259           1 :   if (obj4) {
   50260           0 :     {
   50261             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   50262             :       /* callback_func typemap */
   50263             :       
   50264             :       /* In some cases 0 is passed instead of None. */
   50265             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   50266           0 :       if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
   50267             :       {
   50268           0 :         if( PyLong_AsLong(obj4) == 0 )
   50269             :         {
   50270           0 :           obj4 = Py_None;
   50271             :         }
   50272             :       }
   50273             :       
   50274           0 :       if (obj4 && obj4 != Py_None ) {
   50275           0 :         void* cbfunction = NULL;
   50276           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
   50277             :             (void**)&cbfunction,
   50278             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   50279             :             SWIG_POINTER_EXCEPTION | 0 ));
   50280             :         
   50281           0 :         if ( cbfunction == GDALTermProgress ) {
   50282             :           arg5 = GDALTermProgress;
   50283             :         } else {
   50284           0 :           if (!PyCallable_Check(obj4)) {
   50285           0 :             PyErr_SetString( PyExc_RuntimeError,
   50286             :               "Object given is not a Python function" );
   50287           0 :             SWIG_fail;
   50288             :           }
   50289           0 :           psProgressInfo->psPyCallback = obj4;
   50290           0 :           arg5 = PyProgressProxy;
   50291             :         }
   50292             :         
   50293             :       }
   50294             :       
   50295             :     }
   50296             :   }
   50297           1 :   if (obj5) {
   50298           0 :     {
   50299             :       /* %typemap(in) ( void* callback_data=NULL)  */
   50300           0 :       psProgressInfo->psPyCallbackData = obj5 ;
   50301             :     }
   50302             :   }
   50303           1 :   if (obj6) {
   50304           0 :     {
   50305             :       /* %typemap(in) char **dict */
   50306           0 :       arg7 = NULL;
   50307           0 :       if ( PySequence_Check( obj6 ) ) {
   50308           0 :         int bErr = FALSE;
   50309           0 :         arg7 = CSLFromPySequence(obj6, &bErr);
   50310           0 :         if ( bErr )
   50311             :         {
   50312           0 :           SWIG_fail;
   50313             :         }
   50314             :       }
   50315           0 :       else if ( PyMapping_Check( obj6 ) ) {
   50316           0 :         int bErr = FALSE;
   50317           0 :         arg7 = CSLFromPyMapping(obj6, &bErr);
   50318           0 :         if ( bErr )
   50319             :         {
   50320           0 :           SWIG_fail;
   50321             :         }
   50322             :       }
   50323             :       else {
   50324           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50325           0 :         SWIG_fail;
   50326             :       }
   50327             :     }
   50328             :   }
   50329           1 :   {
   50330           1 :     if (!arg2) {
   50331           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50332             :     }
   50333             :   }
   50334           1 :   {
   50335           1 :     if (!arg3) {
   50336           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50337             :     }
   50338             :   }
   50339           1 :   {
   50340           1 :     if (!arg4) {
   50341           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50342             :     }
   50343             :   }
   50344           1 :   {
   50345           1 :     const int bLocalUseExceptions = GetUseExceptions();
   50346           1 :     if ( bLocalUseExceptions ) {
   50347           1 :       pushErrorHandler();
   50348             :     }
   50349           1 :     {
   50350           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50351           1 :       result = (int)GDALTransformerInfoShadow_TransformGeolocations(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   50352           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50353             :     }
   50354           1 :     if ( bLocalUseExceptions ) {
   50355           1 :       popErrorHandler();
   50356             :     }
   50357             : #ifndef SED_HACKS
   50358             :     if ( bLocalUseExceptions ) {
   50359             :       CPLErr eclass = CPLGetLastErrorType();
   50360             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50361             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50362             :       }
   50363             :     }
   50364             : #endif
   50365             :   }
   50366           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   50367           1 :   {
   50368             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50369             :     
   50370           1 :     CPLFree(psProgressInfo);
   50371             :     
   50372             :   }
   50373           1 :   {
   50374             :     /* %typemap(freearg) char **dict */
   50375           1 :     CSLDestroy( arg7 );
   50376             :   }
   50377           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50378             :   return resultobj;
   50379           0 : fail:
   50380           0 :   {
   50381             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50382             :     
   50383           0 :     CPLFree(psProgressInfo);
   50384             :     
   50385             :   }
   50386           0 :   {
   50387             :     /* %typemap(freearg) char **dict */
   50388           0 :     CSLDestroy( arg7 );
   50389             :   }
   50390             :   return NULL;
   50391             : }
   50392             : 
   50393             : 
   50394         276 : SWIGINTERN PyObject *GDALTransformerInfoShadow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50395         276 :   PyObject *obj;
   50396         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   50397         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_NewClientData(obj));
   50398         276 :   return SWIG_Py_Void();
   50399             : }
   50400             : 
   50401          79 : SWIGINTERN PyObject *_wrap_Transformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50402          79 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50403          79 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   50404          79 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   50405          79 :   char **arg3 = (char **) 0 ;
   50406          79 :   void *argp1 = 0 ;
   50407          79 :   int res1 = 0 ;
   50408          79 :   void *argp2 = 0 ;
   50409          79 :   int res2 = 0 ;
   50410          79 :   PyObject *swig_obj[3] ;
   50411          79 :   GDALTransformerInfoShadow *result = 0 ;
   50412             :   
   50413          79 :   if (!SWIG_Python_UnpackTuple(args, "Transformer", 3, 3, swig_obj)) SWIG_fail;
   50414          79 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   50415          79 :   if (!SWIG_IsOK(res1)) {
   50416           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   50417             :   }
   50418          79 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   50419          79 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   50420          79 :   if (!SWIG_IsOK(res2)) {
   50421           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Transformer" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   50422             :   }
   50423          79 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   50424          79 :   {
   50425             :     /* %typemap(in) char **dict */
   50426          79 :     arg3 = NULL;
   50427          79 :     if ( PySequence_Check( swig_obj[2] ) ) {
   50428          79 :       int bErr = FALSE;
   50429          79 :       arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   50430          79 :       if ( bErr )
   50431             :       {
   50432           0 :         SWIG_fail;
   50433             :       }
   50434             :     }
   50435           0 :     else if ( PyMapping_Check( swig_obj[2] ) ) {
   50436           0 :       int bErr = FALSE;
   50437           0 :       arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   50438           0 :       if ( bErr )
   50439             :       {
   50440           0 :         SWIG_fail;
   50441             :       }
   50442             :     }
   50443             :     else {
   50444           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50445           0 :       SWIG_fail;
   50446             :     }
   50447             :   }
   50448          79 :   {
   50449          79 :     const int bLocalUseExceptions = GetUseExceptions();
   50450          79 :     if ( bLocalUseExceptions ) {
   50451          76 :       pushErrorHandler();
   50452             :     }
   50453          79 :     {
   50454          79 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50455          79 :       result = (GDALTransformerInfoShadow *)Transformer(arg1,arg2,arg3);
   50456          79 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50457             :     }
   50458          79 :     if ( bLocalUseExceptions ) {
   50459          76 :       popErrorHandler();
   50460             :     }
   50461             : #ifndef SED_HACKS
   50462             :     if ( bLocalUseExceptions ) {
   50463             :       CPLErr eclass = CPLGetLastErrorType();
   50464             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50465             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50466             :       }
   50467             :     }
   50468             : #endif
   50469             :   }
   50470          79 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_OWN |  0 );
   50471          79 :   {
   50472             :     /* %typemap(freearg) char **dict */
   50473          79 :     CSLDestroy( arg3 );
   50474             :   }
   50475          91 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50476             :   return resultobj;
   50477           0 : fail:
   50478           0 :   {
   50479             :     /* %typemap(freearg) char **dict */
   50480           0 :     CSLDestroy( arg3 );
   50481             :   }
   50482             :   return NULL;
   50483             : }
   50484             : 
   50485             : 
   50486           1 : SWIGINTERN PyObject *_wrap_WarpGetOptionList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50487           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50488           1 :   char *result = 0 ;
   50489             :   
   50490           1 :   if (!SWIG_Python_UnpackTuple(args, "WarpGetOptionList", 0, 0, 0)) SWIG_fail;
   50491           1 :   {
   50492           1 :     const int bLocalUseExceptions = GetUseExceptions();
   50493           1 :     if ( bLocalUseExceptions ) {
   50494           1 :       pushErrorHandler();
   50495             :     }
   50496           1 :     {
   50497           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50498           1 :       result = (char *)GDALWarpGetOptionList();
   50499           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50500             :     }
   50501           1 :     if ( bLocalUseExceptions ) {
   50502           1 :       popErrorHandler();
   50503             :     }
   50504             : #ifndef SED_HACKS
   50505             :     if ( bLocalUseExceptions ) {
   50506             :       CPLErr eclass = CPLGetLastErrorType();
   50507             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50508             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50509             :       }
   50510             :     }
   50511             : #endif
   50512             :   }
   50513           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   50514           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50515             :   return resultobj;
   50516           0 : fail:
   50517           0 :   return NULL;
   50518             : }
   50519             : 
   50520             : 
   50521           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_width_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50522           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50523           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   50524           2 :   void *argp1 = 0 ;
   50525           2 :   int res1 = 0 ;
   50526           2 :   PyObject *swig_obj[1] ;
   50527           2 :   int result;
   50528             :   
   50529           2 :   if (!args) SWIG_fail;
   50530           2 :   swig_obj[0] = args;
   50531           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   50532           2 :   if (!SWIG_IsOK(res1)) {
   50533           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_width_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   50534             :   }
   50535           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   50536           2 :   {
   50537           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50538           2 :     result = (int) ((arg1)->width);
   50539           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   50540             :   }
   50541           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   50542           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50543             :   return resultobj;
   50544             : fail:
   50545             :   return NULL;
   50546             : }
   50547             : 
   50548             : 
   50549           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_height_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50550           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50551           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   50552           2 :   void *argp1 = 0 ;
   50553           2 :   int res1 = 0 ;
   50554           2 :   PyObject *swig_obj[1] ;
   50555           2 :   int result;
   50556             :   
   50557           2 :   if (!args) SWIG_fail;
   50558           2 :   swig_obj[0] = args;
   50559           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   50560           2 :   if (!SWIG_IsOK(res1)) {
   50561           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_height_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   50562             :   }
   50563           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   50564           2 :   {
   50565           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50566           2 :     result = (int) ((arg1)->height);
   50567           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   50568             :   }
   50569           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   50570           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50571             :   return resultobj;
   50572             : fail:
   50573             :   return NULL;
   50574             : }
   50575             : 
   50576             : 
   50577           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_xmin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50578           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50579           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   50580           3 :   void *argp1 = 0 ;
   50581           3 :   int res1 = 0 ;
   50582           3 :   PyObject *swig_obj[1] ;
   50583           3 :   double result;
   50584             :   
   50585           3 :   if (!args) SWIG_fail;
   50586           3 :   swig_obj[0] = args;
   50587           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   50588           3 :   if (!SWIG_IsOK(res1)) {
   50589           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_xmin_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   50590             :   }
   50591           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   50592           3 :   {
   50593           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50594           3 :     result = (double) ((arg1)->xmin);
   50595           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   50596             :   }
   50597           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   50598           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50599             :   return resultobj;
   50600             : fail:
   50601             :   return NULL;
   50602             : }
   50603             : 
   50604             : 
   50605           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_ymin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50606           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50607           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   50608           3 :   void *argp1 = 0 ;
   50609           3 :   int res1 = 0 ;
   50610           3 :   PyObject *swig_obj[1] ;
   50611           3 :   double result;
   50612             :   
   50613           3 :   if (!args) SWIG_fail;
   50614           3 :   swig_obj[0] = args;
   50615           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   50616           3 :   if (!SWIG_IsOK(res1)) {
   50617           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_ymin_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   50618             :   }
   50619           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   50620           3 :   {
   50621           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50622           3 :     result = (double) ((arg1)->ymin);
   50623           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   50624             :   }
   50625           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   50626           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50627             :   return resultobj;
   50628             : fail:
   50629             :   return NULL;
   50630             : }
   50631             : 
   50632             : 
   50633           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_xmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50634           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50635           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   50636           3 :   void *argp1 = 0 ;
   50637           3 :   int res1 = 0 ;
   50638           3 :   PyObject *swig_obj[1] ;
   50639           3 :   double result;
   50640             :   
   50641           3 :   if (!args) SWIG_fail;
   50642           3 :   swig_obj[0] = args;
   50643           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   50644           3 :   if (!SWIG_IsOK(res1)) {
   50645           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_xmax_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   50646             :   }
   50647           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   50648           3 :   {
   50649           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50650           3 :     result = (double) ((arg1)->xmax);
   50651           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   50652             :   }
   50653           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   50654           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50655             :   return resultobj;
   50656             : fail:
   50657             :   return NULL;
   50658             : }
   50659             : 
   50660             : 
   50661           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_ymax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50662           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50663           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   50664           3 :   void *argp1 = 0 ;
   50665           3 :   int res1 = 0 ;
   50666           3 :   PyObject *swig_obj[1] ;
   50667           3 :   double result;
   50668             :   
   50669           3 :   if (!args) SWIG_fail;
   50670           3 :   swig_obj[0] = args;
   50671           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   50672           3 :   if (!SWIG_IsOK(res1)) {
   50673           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_ymax_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   50674             :   }
   50675           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   50676           3 :   {
   50677           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50678           3 :     result = (double) ((arg1)->ymax);
   50679           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   50680             :   }
   50681           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   50682           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50683             :   return resultobj;
   50684             : fail:
   50685             :   return NULL;
   50686             : }
   50687             : 
   50688             : 
   50689           3 : SWIGINTERN PyObject *_wrap_delete_SuggestedWarpOutputRes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50690           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50691           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   50692           3 :   void *argp1 = 0 ;
   50693           3 :   int res1 = 0 ;
   50694           3 :   PyObject *swig_obj[1] ;
   50695             :   
   50696           3 :   if (!args) SWIG_fail;
   50697           3 :   swig_obj[0] = args;
   50698           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_DISOWN |  0 );
   50699           3 :   if (!SWIG_IsOK(res1)) {
   50700           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SuggestedWarpOutputRes" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   50701             :   }
   50702           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   50703           3 :   {
   50704           3 :     const int bLocalUseExceptions = GetUseExceptions();
   50705           3 :     if ( bLocalUseExceptions ) {
   50706           3 :       pushErrorHandler();
   50707             :     }
   50708           3 :     {
   50709           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50710           3 :       delete_SuggestedWarpOutputRes(arg1);
   50711           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50712             :     }
   50713           3 :     if ( bLocalUseExceptions ) {
   50714           3 :       popErrorHandler();
   50715             :     }
   50716             : #ifndef SED_HACKS
   50717             :     if ( bLocalUseExceptions ) {
   50718             :       CPLErr eclass = CPLGetLastErrorType();
   50719             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50720             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50721             :       }
   50722             :     }
   50723             : #endif
   50724             :   }
   50725           3 :   resultobj = SWIG_Py_Void();
   50726           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50727             :   return resultobj;
   50728             : fail:
   50729             :   return NULL;
   50730             : }
   50731             : 
   50732             : 
   50733           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_GetGeotransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50734           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50735           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   50736           2 :   double *arg2 ;
   50737           2 :   void *argp1 = 0 ;
   50738           2 :   int res1 = 0 ;
   50739           2 :   double argout2[6] ;
   50740           2 :   PyObject *swig_obj[1] ;
   50741             :   
   50742           2 :   {
   50743             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   50744           2 :     memset(argout2, 0, sizeof(argout2));
   50745           2 :     arg2 = argout2;
   50746             :   }
   50747           2 :   if (!args) SWIG_fail;
   50748           2 :   swig_obj[0] = args;
   50749           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   50750           2 :   if (!SWIG_IsOK(res1)) {
   50751           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_GetGeotransform" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   50752             :   }
   50753           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   50754           2 :   {
   50755           2 :     const int bLocalUseExceptions = GetUseExceptions();
   50756           2 :     if ( bLocalUseExceptions ) {
   50757           2 :       pushErrorHandler();
   50758             :     }
   50759           2 :     {
   50760           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50761           2 :       SuggestedWarpOutputRes_GetGeotransform(arg1,arg2);
   50762           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50763             :     }
   50764           2 :     if ( bLocalUseExceptions ) {
   50765           2 :       popErrorHandler();
   50766             :     }
   50767             : #ifndef SED_HACKS
   50768             :     if ( bLocalUseExceptions ) {
   50769             :       CPLErr eclass = CPLGetLastErrorType();
   50770             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50771             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50772             :       }
   50773             :     }
   50774             : #endif
   50775             :   }
   50776           2 :   resultobj = SWIG_Py_Void();
   50777           2 :   {
   50778             :     /* %typemap(argout) (double argout[ANY]) */
   50779           2 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   50780             : #if SWIG_VERSION >= 0x040300
   50781             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   50782             : #else
   50783           2 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   50784             : #endif
   50785             :   }
   50786           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50787             :   return resultobj;
   50788             : fail:
   50789             :   return NULL;
   50790             : }
   50791             : 
   50792             : 
   50793         276 : SWIGINTERN PyObject *SuggestedWarpOutputRes_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50794         276 :   PyObject *obj;
   50795         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   50796         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_NewClientData(obj));
   50797         276 :   return SWIG_Py_Void();
   50798             : }
   50799             : 
   50800           1 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputFromTransformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50801           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50802           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   50803           1 :   GDALTransformerInfoShadow *arg2 = (GDALTransformerInfoShadow *) 0 ;
   50804           1 :   void *argp1 = 0 ;
   50805           1 :   int res1 = 0 ;
   50806           1 :   void *argp2 = 0 ;
   50807           1 :   int res2 = 0 ;
   50808           1 :   PyObject *swig_obj[2] ;
   50809           1 :   SuggestedWarpOutputRes *result = 0 ;
   50810             :   
   50811           1 :   if (!SWIG_Python_UnpackTuple(args, "SuggestedWarpOutputFromTransformer", 2, 2, swig_obj)) SWIG_fail;
   50812           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   50813           1 :   if (!SWIG_IsOK(res1)) {
   50814           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputFromTransformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   50815             :   }
   50816           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   50817           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   50818           1 :   if (!SWIG_IsOK(res2)) {
   50819           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SuggestedWarpOutputFromTransformer" "', argument " "2"" of type '" "GDALTransformerInfoShadow *""'"); 
   50820             :   }
   50821           1 :   arg2 = reinterpret_cast< GDALTransformerInfoShadow * >(argp2);
   50822           1 :   {
   50823           1 :     const int bLocalUseExceptions = GetUseExceptions();
   50824           1 :     if ( bLocalUseExceptions ) {
   50825           1 :       pushErrorHandler();
   50826             :     }
   50827           1 :     {
   50828           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50829           1 :       result = (SuggestedWarpOutputRes *)SuggestedWarpOutputFromTransformer(arg1,arg2);
   50830           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50831             :     }
   50832           1 :     if ( bLocalUseExceptions ) {
   50833           1 :       popErrorHandler();
   50834             :     }
   50835             : #ifndef SED_HACKS
   50836             :     if ( bLocalUseExceptions ) {
   50837             :       CPLErr eclass = CPLGetLastErrorType();
   50838             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50839             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50840             :       }
   50841             :     }
   50842             : #endif
   50843             :   }
   50844           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_OWN |  0 );
   50845           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50846             :   return resultobj;
   50847             : fail:
   50848             :   return NULL;
   50849             : }
   50850             : 
   50851             : 
   50852           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputFromOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50853           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50854           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   50855           2 :   char **arg2 = (char **) 0 ;
   50856           2 :   void *argp1 = 0 ;
   50857           2 :   int res1 = 0 ;
   50858           2 :   PyObject *swig_obj[2] ;
   50859           2 :   SuggestedWarpOutputRes *result = 0 ;
   50860             :   
   50861           2 :   if (!SWIG_Python_UnpackTuple(args, "SuggestedWarpOutputFromOptions", 2, 2, swig_obj)) SWIG_fail;
   50862           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   50863           2 :   if (!SWIG_IsOK(res1)) {
   50864           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputFromOptions" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   50865             :   }
   50866           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   50867           2 :   {
   50868             :     /* %typemap(in) char **dict */
   50869           2 :     arg2 = NULL;
   50870           2 :     if ( PySequence_Check( swig_obj[1] ) ) {
   50871           2 :       int bErr = FALSE;
   50872           2 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   50873           2 :       if ( bErr )
   50874             :       {
   50875           0 :         SWIG_fail;
   50876             :       }
   50877             :     }
   50878           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   50879           0 :       int bErr = FALSE;
   50880           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   50881           0 :       if ( bErr )
   50882             :       {
   50883           0 :         SWIG_fail;
   50884             :       }
   50885             :     }
   50886             :     else {
   50887           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50888           0 :       SWIG_fail;
   50889             :     }
   50890             :   }
   50891           2 :   {
   50892           2 :     const int bLocalUseExceptions = GetUseExceptions();
   50893           2 :     if ( bLocalUseExceptions ) {
   50894           2 :       pushErrorHandler();
   50895             :     }
   50896           2 :     {
   50897           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50898           2 :       result = (SuggestedWarpOutputRes *)SuggestedWarpOutputFromOptions(arg1,arg2);
   50899           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50900             :     }
   50901           2 :     if ( bLocalUseExceptions ) {
   50902           2 :       popErrorHandler();
   50903             :     }
   50904             : #ifndef SED_HACKS
   50905             :     if ( bLocalUseExceptions ) {
   50906             :       CPLErr eclass = CPLGetLastErrorType();
   50907             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50908             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50909             :       }
   50910             :     }
   50911             : #endif
   50912             :   }
   50913           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_OWN |  0 );
   50914           2 :   {
   50915             :     /* %typemap(freearg) char **dict */
   50916           2 :     CSLDestroy( arg2 );
   50917             :   }
   50918           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50919             :   return resultobj;
   50920           0 : fail:
   50921           0 :   {
   50922             :     /* %typemap(freearg) char **dict */
   50923           0 :     CSLDestroy( arg2 );
   50924             :   }
   50925             :   return NULL;
   50926             : }
   50927             : 
   50928             : 
   50929          23 : SWIGINTERN PyObject *_wrap__ApplyVerticalShiftGrid(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   50930          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50931          23 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   50932          23 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   50933          23 :   bool arg3 = (bool) false ;
   50934          23 :   double arg4 = (double) 1.0 ;
   50935          23 :   double arg5 = (double) 1.0 ;
   50936          23 :   char **arg6 = (char **) NULL ;
   50937          23 :   void *argp1 = 0 ;
   50938          23 :   int res1 = 0 ;
   50939          23 :   void *argp2 = 0 ;
   50940          23 :   int res2 = 0 ;
   50941          23 :   bool val3 ;
   50942          23 :   int ecode3 = 0 ;
   50943          23 :   double val4 ;
   50944          23 :   int ecode4 = 0 ;
   50945          23 :   double val5 ;
   50946          23 :   int ecode5 = 0 ;
   50947          23 :   PyObject * obj0 = 0 ;
   50948          23 :   PyObject * obj1 = 0 ;
   50949          23 :   PyObject * obj2 = 0 ;
   50950          23 :   PyObject * obj3 = 0 ;
   50951          23 :   PyObject * obj4 = 0 ;
   50952          23 :   PyObject * obj5 = 0 ;
   50953          23 :   char * kwnames[] = {
   50954             :     (char *)"src_ds",  (char *)"grid_ds",  (char *)"inverse",  (char *)"srcUnitToMeter",  (char *)"dstUnitToMeter",  (char *)"options",  NULL 
   50955             :   };
   50956          23 :   GDALDatasetShadow *result = 0 ;
   50957             :   
   50958          23 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOO:_ApplyVerticalShiftGrid", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
   50959          23 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   50960          23 :   if (!SWIG_IsOK(res1)) {
   50961           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_ApplyVerticalShiftGrid" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   50962             :   }
   50963          23 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   50964          23 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   50965          23 :   if (!SWIG_IsOK(res2)) {
   50966           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_ApplyVerticalShiftGrid" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   50967             :   }
   50968          23 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   50969          23 :   if (obj2) {
   50970           1 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   50971           1 :     if (!SWIG_IsOK(ecode3)) {
   50972           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_ApplyVerticalShiftGrid" "', argument " "3"" of type '" "bool""'");
   50973             :     } 
   50974             :     arg3 = static_cast< bool >(val3);
   50975             :   }
   50976          23 :   if (obj3) {
   50977           1 :     ecode4 = SWIG_AsVal_double(obj3, &val4);
   50978           1 :     if (!SWIG_IsOK(ecode4)) {
   50979           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_ApplyVerticalShiftGrid" "', argument " "4"" of type '" "double""'");
   50980             :     } 
   50981           1 :     arg4 = static_cast< double >(val4);
   50982             :   }
   50983          23 :   if (obj4) {
   50984           1 :     ecode5 = SWIG_AsVal_double(obj4, &val5);
   50985           1 :     if (!SWIG_IsOK(ecode5)) {
   50986           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "_ApplyVerticalShiftGrid" "', argument " "5"" of type '" "double""'");
   50987             :     } 
   50988           1 :     arg5 = static_cast< double >(val5);
   50989             :   }
   50990          23 :   if (obj5) {
   50991          11 :     {
   50992             :       /* %typemap(in) char **dict */
   50993          11 :       arg6 = NULL;
   50994          11 :       if ( PySequence_Check( obj5 ) ) {
   50995          11 :         int bErr = FALSE;
   50996          11 :         arg6 = CSLFromPySequence(obj5, &bErr);
   50997          11 :         if ( bErr )
   50998             :         {
   50999           0 :           SWIG_fail;
   51000             :         }
   51001             :       }
   51002           0 :       else if ( PyMapping_Check( obj5 ) ) {
   51003           0 :         int bErr = FALSE;
   51004           0 :         arg6 = CSLFromPyMapping(obj5, &bErr);
   51005           0 :         if ( bErr )
   51006             :         {
   51007           0 :           SWIG_fail;
   51008             :         }
   51009             :       }
   51010             :       else {
   51011           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   51012           0 :         SWIG_fail;
   51013             :       }
   51014             :     }
   51015             :   }
   51016          23 :   {
   51017          23 :     if (!arg1) {
   51018           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51019             :     }
   51020             :   }
   51021          23 :   {
   51022          23 :     if (!arg2) {
   51023           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51024             :     }
   51025             :   }
   51026          23 :   {
   51027          23 :     const int bLocalUseExceptions = GetUseExceptions();
   51028          23 :     if ( bLocalUseExceptions ) {
   51029          12 :       pushErrorHandler();
   51030             :     }
   51031          23 :     {
   51032          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51033          23 :       result = (GDALDatasetShadow *)ApplyVerticalShiftGrid(arg1,arg2,arg3,arg4,arg5,arg6);
   51034          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51035             :     }
   51036          23 :     if ( bLocalUseExceptions ) {
   51037          12 :       popErrorHandler();
   51038             :     }
   51039             : #ifndef SED_HACKS
   51040             :     if ( bLocalUseExceptions ) {
   51041             :       CPLErr eclass = CPLGetLastErrorType();
   51042             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51043             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51044             :       }
   51045             :     }
   51046             : #endif
   51047             :   }
   51048          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   51049          23 :   {
   51050             :     /* %typemap(freearg) char **dict */
   51051          23 :     CSLDestroy( arg6 );
   51052             :   }
   51053          23 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51054             :   return resultobj;
   51055           0 : fail:
   51056           0 :   {
   51057             :     /* %typemap(freearg) char **dict */
   51058           0 :     CSLDestroy( arg6 );
   51059             :   }
   51060             :   return NULL;
   51061             : }
   51062             : 
   51063             : 
   51064        1362 : SWIGINTERN PyObject *_wrap_GetGlobalAlgorithmRegistry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51065        1362 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51066        1362 :   GDALAlgorithmRegistryHS *result = 0 ;
   51067             :   
   51068        1362 :   if (!SWIG_Python_UnpackTuple(args, "GetGlobalAlgorithmRegistry", 0, 0, 0)) SWIG_fail;
   51069        1362 :   {
   51070        1362 :     const int bLocalUseExceptions = GetUseExceptions();
   51071        1362 :     if ( bLocalUseExceptions ) {
   51072        1362 :       pushErrorHandler();
   51073             :     }
   51074        1362 :     {
   51075        1362 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51076        1362 :       result = (GDALAlgorithmRegistryHS *)GDALGetGlobalAlgorithmRegistry();
   51077        1362 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51078             :     }
   51079        1362 :     if ( bLocalUseExceptions ) {
   51080        1362 :       popErrorHandler();
   51081             :     }
   51082             : #ifndef SED_HACKS
   51083             :     if ( bLocalUseExceptions ) {
   51084             :       CPLErr eclass = CPLGetLastErrorType();
   51085             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51086             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51087             :       }
   51088             :     }
   51089             : #endif
   51090             :   }
   51091        1362 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_POINTER_OWN |  0 );
   51092        1362 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51093             :   return resultobj;
   51094           0 : fail:
   51095           0 :   return NULL;
   51096             : }
   51097             : 
   51098             : 
   51099           0 : SWIGINTERN PyObject *_wrap_AlgorithmArgTypeIsList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51100           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51101           0 :   GDALAlgorithmArgType arg1 ;
   51102           0 :   int val1 ;
   51103           0 :   int ecode1 = 0 ;
   51104           0 :   PyObject *swig_obj[1] ;
   51105           0 :   bool result;
   51106             :   
   51107           0 :   if (!args) SWIG_fail;
   51108           0 :   swig_obj[0] = args;
   51109           0 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   51110           0 :   if (!SWIG_IsOK(ecode1)) {
   51111           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "AlgorithmArgTypeIsList" "', argument " "1"" of type '" "GDALAlgorithmArgType""'");
   51112             :   } 
   51113           0 :   arg1 = static_cast< GDALAlgorithmArgType >(val1);
   51114           0 :   {
   51115           0 :     const int bLocalUseExceptions = GetUseExceptions();
   51116           0 :     if ( bLocalUseExceptions ) {
   51117           0 :       pushErrorHandler();
   51118             :     }
   51119           0 :     {
   51120           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51121           0 :       result = (bool)GDALAlgorithmArgTypeIsList(arg1);
   51122           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51123             :     }
   51124           0 :     if ( bLocalUseExceptions ) {
   51125           0 :       popErrorHandler();
   51126             :     }
   51127             : #ifndef SED_HACKS
   51128             :     if ( bLocalUseExceptions ) {
   51129             :       CPLErr eclass = CPLGetLastErrorType();
   51130             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51131             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51132             :       }
   51133             :     }
   51134             : #endif
   51135             :   }
   51136           0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   51137           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51138             :   return resultobj;
   51139             : fail:
   51140             :   return NULL;
   51141             : }
   51142             : 
   51143             : 
   51144           0 : SWIGINTERN PyObject *_wrap_AlgorithmArgTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51145           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51146           0 :   GDALAlgorithmArgType arg1 ;
   51147           0 :   int val1 ;
   51148           0 :   int ecode1 = 0 ;
   51149           0 :   PyObject *swig_obj[1] ;
   51150           0 :   char *result = 0 ;
   51151             :   
   51152           0 :   if (!args) SWIG_fail;
   51153           0 :   swig_obj[0] = args;
   51154           0 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   51155           0 :   if (!SWIG_IsOK(ecode1)) {
   51156           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "AlgorithmArgTypeName" "', argument " "1"" of type '" "GDALAlgorithmArgType""'");
   51157             :   } 
   51158           0 :   arg1 = static_cast< GDALAlgorithmArgType >(val1);
   51159           0 :   {
   51160           0 :     const int bLocalUseExceptions = GetUseExceptions();
   51161           0 :     if ( bLocalUseExceptions ) {
   51162           0 :       pushErrorHandler();
   51163             :     }
   51164           0 :     {
   51165           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51166           0 :       result = (char *)GDALAlgorithmArgTypeName(arg1);
   51167           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51168             :     }
   51169           0 :     if ( bLocalUseExceptions ) {
   51170           0 :       popErrorHandler();
   51171             :     }
   51172             : #ifndef SED_HACKS
   51173             :     if ( bLocalUseExceptions ) {
   51174             :       CPLErr eclass = CPLGetLastErrorType();
   51175             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51176             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51177             :       }
   51178             :     }
   51179             : #endif
   51180             :   }
   51181           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   51182           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51183             :   return resultobj;
   51184             : fail:
   51185             :   return NULL;
   51186             : }
   51187             : 
   51188             : 
   51189        6299 : SWIGINTERN PyObject *_wrap_delete_AlgorithmArg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51190        6299 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51191        6299 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51192        6299 :   void *argp1 = 0 ;
   51193        6299 :   int res1 = 0 ;
   51194        6299 :   PyObject *swig_obj[1] ;
   51195             :   
   51196        6299 :   if (!args) SWIG_fail;
   51197        6299 :   swig_obj[0] = args;
   51198        6299 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_POINTER_DISOWN |  0 );
   51199        6299 :   if (!SWIG_IsOK(res1)) {
   51200           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AlgorithmArg" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51201             :   }
   51202        6299 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51203        6299 :   {
   51204        6299 :     const int bLocalUseExceptions = GetUseExceptions();
   51205        6299 :     if ( bLocalUseExceptions ) {
   51206        6299 :       pushErrorHandler();
   51207             :     }
   51208        6299 :     {
   51209        6299 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51210        6299 :       delete_GDALAlgorithmArgHS(arg1);
   51211        6299 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51212             :     }
   51213        6299 :     if ( bLocalUseExceptions ) {
   51214        6299 :       popErrorHandler();
   51215             :     }
   51216             : #ifndef SED_HACKS
   51217             :     if ( bLocalUseExceptions ) {
   51218             :       CPLErr eclass = CPLGetLastErrorType();
   51219             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51220             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51221             :       }
   51222             :     }
   51223             : #endif
   51224             :   }
   51225        6299 :   resultobj = SWIG_Py_Void();
   51226        6299 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51227             :   return resultobj;
   51228             : fail:
   51229             :   return NULL;
   51230             : }
   51231             : 
   51232             : 
   51233         211 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51234         211 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51235         211 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51236         211 :   void *argp1 = 0 ;
   51237         211 :   int res1 = 0 ;
   51238         211 :   PyObject *swig_obj[1] ;
   51239         211 :   char *result = 0 ;
   51240             :   
   51241         211 :   if (!args) SWIG_fail;
   51242         211 :   swig_obj[0] = args;
   51243         211 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51244         211 :   if (!SWIG_IsOK(res1)) {
   51245           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetName" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51246             :   }
   51247         211 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51248         211 :   {
   51249         211 :     const int bLocalUseExceptions = GetUseExceptions();
   51250         211 :     if ( bLocalUseExceptions ) {
   51251         211 :       pushErrorHandler();
   51252             :     }
   51253         211 :     {
   51254         211 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51255         211 :       result = (char *)GDALAlgorithmArgHS_GetName(arg1);
   51256         211 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51257             :     }
   51258         211 :     if ( bLocalUseExceptions ) {
   51259         211 :       popErrorHandler();
   51260             :     }
   51261             : #ifndef SED_HACKS
   51262             :     if ( bLocalUseExceptions ) {
   51263             :       CPLErr eclass = CPLGetLastErrorType();
   51264             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51265             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51266             :       }
   51267             :     }
   51268             : #endif
   51269             :   }
   51270         211 :   resultobj = SWIG_FromCharPtr((const char *)result);
   51271         211 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51272             :   return resultobj;
   51273             : fail:
   51274             :   return NULL;
   51275             : }
   51276             : 
   51277             : 
   51278        4710 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51279        4710 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51280        4710 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51281        4710 :   void *argp1 = 0 ;
   51282        4710 :   int res1 = 0 ;
   51283        4710 :   PyObject *swig_obj[1] ;
   51284        4710 :   GDALAlgorithmArgType result;
   51285             :   
   51286        4710 :   if (!args) SWIG_fail;
   51287        4710 :   swig_obj[0] = args;
   51288        4710 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51289        4710 :   if (!SWIG_IsOK(res1)) {
   51290           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetType" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51291             :   }
   51292        4710 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51293        4710 :   {
   51294        4710 :     const int bLocalUseExceptions = GetUseExceptions();
   51295        4710 :     if ( bLocalUseExceptions ) {
   51296        4710 :       pushErrorHandler();
   51297             :     }
   51298        4710 :     {
   51299        4710 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51300        4710 :       result = (GDALAlgorithmArgType)GDALAlgorithmArgHS_GetType(arg1);
   51301        4710 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51302             :     }
   51303        4710 :     if ( bLocalUseExceptions ) {
   51304        4710 :       popErrorHandler();
   51305             :     }
   51306             : #ifndef SED_HACKS
   51307             :     if ( bLocalUseExceptions ) {
   51308             :       CPLErr eclass = CPLGetLastErrorType();
   51309             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51310             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51311             :       }
   51312             :     }
   51313             : #endif
   51314             :   }
   51315        4710 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51316        4710 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51317             :   return resultobj;
   51318             : fail:
   51319             :   return NULL;
   51320             : }
   51321             : 
   51322             : 
   51323           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51324           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51325           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51326           1 :   void *argp1 = 0 ;
   51327           1 :   int res1 = 0 ;
   51328           1 :   PyObject *swig_obj[1] ;
   51329           1 :   char *result = 0 ;
   51330             :   
   51331           1 :   if (!args) SWIG_fail;
   51332           1 :   swig_obj[0] = args;
   51333           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51334           1 :   if (!SWIG_IsOK(res1)) {
   51335           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDescription" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51336             :   }
   51337           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51338           1 :   {
   51339           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51340           1 :     if ( bLocalUseExceptions ) {
   51341           1 :       pushErrorHandler();
   51342             :     }
   51343           1 :     {
   51344           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51345           1 :       result = (char *)GDALAlgorithmArgHS_GetDescription(arg1);
   51346           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51347             :     }
   51348           1 :     if ( bLocalUseExceptions ) {
   51349           1 :       popErrorHandler();
   51350             :     }
   51351             : #ifndef SED_HACKS
   51352             :     if ( bLocalUseExceptions ) {
   51353             :       CPLErr eclass = CPLGetLastErrorType();
   51354             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51355             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51356             :       }
   51357             :     }
   51358             : #endif
   51359             :   }
   51360           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   51361           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51362             :   return resultobj;
   51363             : fail:
   51364             :   return NULL;
   51365             : }
   51366             : 
   51367             : 
   51368           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetShortName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51369           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51370           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51371           1 :   void *argp1 = 0 ;
   51372           1 :   int res1 = 0 ;
   51373           1 :   PyObject *swig_obj[1] ;
   51374           1 :   char *result = 0 ;
   51375             :   
   51376           1 :   if (!args) SWIG_fail;
   51377           1 :   swig_obj[0] = args;
   51378           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51379           1 :   if (!SWIG_IsOK(res1)) {
   51380           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetShortName" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51381             :   }
   51382           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51383           1 :   {
   51384           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51385           1 :     if ( bLocalUseExceptions ) {
   51386           1 :       pushErrorHandler();
   51387             :     }
   51388           1 :     {
   51389           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51390           1 :       result = (char *)GDALAlgorithmArgHS_GetShortName(arg1);
   51391           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51392             :     }
   51393           1 :     if ( bLocalUseExceptions ) {
   51394           1 :       popErrorHandler();
   51395             :     }
   51396             : #ifndef SED_HACKS
   51397             :     if ( bLocalUseExceptions ) {
   51398             :       CPLErr eclass = CPLGetLastErrorType();
   51399             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51400             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51401             :       }
   51402             :     }
   51403             : #endif
   51404             :   }
   51405           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   51406           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51407             :   return resultobj;
   51408             : fail:
   51409             :   return NULL;
   51410             : }
   51411             : 
   51412             : 
   51413           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAliases(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51414           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51415           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51416           1 :   void *argp1 = 0 ;
   51417           1 :   int res1 = 0 ;
   51418           1 :   PyObject *swig_obj[1] ;
   51419           1 :   char **result = 0 ;
   51420             :   
   51421           1 :   if (!args) SWIG_fail;
   51422           1 :   swig_obj[0] = args;
   51423           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51424           1 :   if (!SWIG_IsOK(res1)) {
   51425           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAliases" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51426             :   }
   51427           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51428           1 :   {
   51429           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51430           1 :     if ( bLocalUseExceptions ) {
   51431           1 :       pushErrorHandler();
   51432             :     }
   51433           1 :     {
   51434           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51435           1 :       result = (char **)GDALAlgorithmArgHS_GetAliases(arg1);
   51436           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51437             :     }
   51438           1 :     if ( bLocalUseExceptions ) {
   51439           1 :       popErrorHandler();
   51440             :     }
   51441             : #ifndef SED_HACKS
   51442             :     if ( bLocalUseExceptions ) {
   51443             :       CPLErr eclass = CPLGetLastErrorType();
   51444             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51445             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51446             :       }
   51447             :     }
   51448             : #endif
   51449             :   }
   51450           1 :   {
   51451             :     /* %typemap(out) char **CSL -> ( string ) */
   51452           1 :     bool bErr = false;
   51453           1 :     resultobj = CSLToList(result, &bErr);
   51454           1 :     CSLDestroy(result);
   51455           1 :     if( bErr ) {
   51456           0 :       SWIG_fail;
   51457             :     }
   51458             :   }
   51459           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51460             :   return resultobj;
   51461             : fail:
   51462             :   return NULL;
   51463             : }
   51464             : 
   51465             : 
   51466           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMetaVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51467           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51468           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51469           1 :   void *argp1 = 0 ;
   51470           1 :   int res1 = 0 ;
   51471           1 :   PyObject *swig_obj[1] ;
   51472           1 :   char *result = 0 ;
   51473             :   
   51474           1 :   if (!args) SWIG_fail;
   51475           1 :   swig_obj[0] = args;
   51476           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51477           1 :   if (!SWIG_IsOK(res1)) {
   51478           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMetaVar" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51479             :   }
   51480           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51481           1 :   {
   51482           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51483           1 :     if ( bLocalUseExceptions ) {
   51484           1 :       pushErrorHandler();
   51485             :     }
   51486           1 :     {
   51487           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51488           1 :       result = (char *)GDALAlgorithmArgHS_GetMetaVar(arg1);
   51489           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51490             :     }
   51491           1 :     if ( bLocalUseExceptions ) {
   51492           1 :       popErrorHandler();
   51493             :     }
   51494             : #ifndef SED_HACKS
   51495             :     if ( bLocalUseExceptions ) {
   51496             :       CPLErr eclass = CPLGetLastErrorType();
   51497             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51498             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51499             :       }
   51500             :     }
   51501             : #endif
   51502             :   }
   51503           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   51504           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51505             :   return resultobj;
   51506             : fail:
   51507             :   return NULL;
   51508             : }
   51509             : 
   51510             : 
   51511           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetCategory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51512           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51513           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51514           1 :   void *argp1 = 0 ;
   51515           1 :   int res1 = 0 ;
   51516           1 :   PyObject *swig_obj[1] ;
   51517           1 :   char *result = 0 ;
   51518             :   
   51519           1 :   if (!args) SWIG_fail;
   51520           1 :   swig_obj[0] = args;
   51521           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51522           1 :   if (!SWIG_IsOK(res1)) {
   51523           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetCategory" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51524             :   }
   51525           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51526           1 :   {
   51527           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51528           1 :     if ( bLocalUseExceptions ) {
   51529           1 :       pushErrorHandler();
   51530             :     }
   51531           1 :     {
   51532           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51533           1 :       result = (char *)GDALAlgorithmArgHS_GetCategory(arg1);
   51534           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51535             :     }
   51536           1 :     if ( bLocalUseExceptions ) {
   51537           1 :       popErrorHandler();
   51538             :     }
   51539             : #ifndef SED_HACKS
   51540             :     if ( bLocalUseExceptions ) {
   51541             :       CPLErr eclass = CPLGetLastErrorType();
   51542             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51543             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51544             :       }
   51545             :     }
   51546             : #endif
   51547             :   }
   51548           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   51549           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51550             :   return resultobj;
   51551             : fail:
   51552             :   return NULL;
   51553             : }
   51554             : 
   51555             : 
   51556           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsPositional(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51557           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51558           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51559           1 :   void *argp1 = 0 ;
   51560           1 :   int res1 = 0 ;
   51561           1 :   PyObject *swig_obj[1] ;
   51562           1 :   bool result;
   51563             :   
   51564           1 :   if (!args) SWIG_fail;
   51565           1 :   swig_obj[0] = args;
   51566           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51567           1 :   if (!SWIG_IsOK(res1)) {
   51568           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsPositional" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51569             :   }
   51570           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51571           1 :   {
   51572           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51573           1 :     if ( bLocalUseExceptions ) {
   51574           1 :       pushErrorHandler();
   51575             :     }
   51576           1 :     {
   51577           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51578           1 :       result = (bool)GDALAlgorithmArgHS_IsPositional(arg1);
   51579           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51580             :     }
   51581           1 :     if ( bLocalUseExceptions ) {
   51582           1 :       popErrorHandler();
   51583             :     }
   51584             : #ifndef SED_HACKS
   51585             :     if ( bLocalUseExceptions ) {
   51586             :       CPLErr eclass = CPLGetLastErrorType();
   51587             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51588             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51589             :       }
   51590             :     }
   51591             : #endif
   51592             :   }
   51593           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   51594           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51595             :   return resultobj;
   51596             : fail:
   51597             :   return NULL;
   51598             : }
   51599             : 
   51600             : 
   51601           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsRequired(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51602           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51603           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51604           1 :   void *argp1 = 0 ;
   51605           1 :   int res1 = 0 ;
   51606           1 :   PyObject *swig_obj[1] ;
   51607           1 :   bool result;
   51608             :   
   51609           1 :   if (!args) SWIG_fail;
   51610           1 :   swig_obj[0] = args;
   51611           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51612           1 :   if (!SWIG_IsOK(res1)) {
   51613           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsRequired" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51614             :   }
   51615           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51616           1 :   {
   51617           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51618           1 :     if ( bLocalUseExceptions ) {
   51619           1 :       pushErrorHandler();
   51620             :     }
   51621           1 :     {
   51622           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51623           1 :       result = (bool)GDALAlgorithmArgHS_IsRequired(arg1);
   51624           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51625             :     }
   51626           1 :     if ( bLocalUseExceptions ) {
   51627           1 :       popErrorHandler();
   51628             :     }
   51629             : #ifndef SED_HACKS
   51630             :     if ( bLocalUseExceptions ) {
   51631             :       CPLErr eclass = CPLGetLastErrorType();
   51632             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51633             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51634             :       }
   51635             :     }
   51636             : #endif
   51637             :   }
   51638           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   51639           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51640             :   return resultobj;
   51641             : fail:
   51642             :   return NULL;
   51643             : }
   51644             : 
   51645             : 
   51646           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMinCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51647           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51648           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51649           1 :   void *argp1 = 0 ;
   51650           1 :   int res1 = 0 ;
   51651           1 :   PyObject *swig_obj[1] ;
   51652           1 :   int result;
   51653             :   
   51654           1 :   if (!args) SWIG_fail;
   51655           1 :   swig_obj[0] = args;
   51656           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51657           1 :   if (!SWIG_IsOK(res1)) {
   51658           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMinCount" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51659             :   }
   51660           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51661           1 :   {
   51662           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51663           1 :     if ( bLocalUseExceptions ) {
   51664           1 :       pushErrorHandler();
   51665             :     }
   51666           1 :     {
   51667           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51668           1 :       result = (int)GDALAlgorithmArgHS_GetMinCount(arg1);
   51669           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51670             :     }
   51671           1 :     if ( bLocalUseExceptions ) {
   51672           1 :       popErrorHandler();
   51673             :     }
   51674             : #ifndef SED_HACKS
   51675             :     if ( bLocalUseExceptions ) {
   51676             :       CPLErr eclass = CPLGetLastErrorType();
   51677             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51678             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51679             :       }
   51680             :     }
   51681             : #endif
   51682             :   }
   51683           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51684           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51685             :   return resultobj;
   51686             : fail:
   51687             :   return NULL;
   51688             : }
   51689             : 
   51690             : 
   51691           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMaxCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51692           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51693           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51694           1 :   void *argp1 = 0 ;
   51695           1 :   int res1 = 0 ;
   51696           1 :   PyObject *swig_obj[1] ;
   51697           1 :   int result;
   51698             :   
   51699           1 :   if (!args) SWIG_fail;
   51700           1 :   swig_obj[0] = args;
   51701           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51702           1 :   if (!SWIG_IsOK(res1)) {
   51703           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMaxCount" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51704             :   }
   51705           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51706           1 :   {
   51707           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51708           1 :     if ( bLocalUseExceptions ) {
   51709           1 :       pushErrorHandler();
   51710             :     }
   51711           1 :     {
   51712           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51713           1 :       result = (int)GDALAlgorithmArgHS_GetMaxCount(arg1);
   51714           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51715             :     }
   51716           1 :     if ( bLocalUseExceptions ) {
   51717           1 :       popErrorHandler();
   51718             :     }
   51719             : #ifndef SED_HACKS
   51720             :     if ( bLocalUseExceptions ) {
   51721             :       CPLErr eclass = CPLGetLastErrorType();
   51722             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51723             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51724             :       }
   51725             :     }
   51726             : #endif
   51727             :   }
   51728           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51729           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51730             :   return resultobj;
   51731             : fail:
   51732             :   return NULL;
   51733             : }
   51734             : 
   51735             : 
   51736           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetPackedValuesAllowed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51737           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51738           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51739           1 :   void *argp1 = 0 ;
   51740           1 :   int res1 = 0 ;
   51741           1 :   PyObject *swig_obj[1] ;
   51742           1 :   bool result;
   51743             :   
   51744           1 :   if (!args) SWIG_fail;
   51745           1 :   swig_obj[0] = args;
   51746           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51747           1 :   if (!SWIG_IsOK(res1)) {
   51748           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetPackedValuesAllowed" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51749             :   }
   51750           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51751           1 :   {
   51752           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51753           1 :     if ( bLocalUseExceptions ) {
   51754           1 :       pushErrorHandler();
   51755             :     }
   51756           1 :     {
   51757           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51758           1 :       result = (bool)GDALAlgorithmArgHS_GetPackedValuesAllowed(arg1);
   51759           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51760             :     }
   51761           1 :     if ( bLocalUseExceptions ) {
   51762           1 :       popErrorHandler();
   51763             :     }
   51764             : #ifndef SED_HACKS
   51765             :     if ( bLocalUseExceptions ) {
   51766             :       CPLErr eclass = CPLGetLastErrorType();
   51767             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51768             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51769             :       }
   51770             :     }
   51771             : #endif
   51772             :   }
   51773           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   51774           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51775             :   return resultobj;
   51776             : fail:
   51777             :   return NULL;
   51778             : }
   51779             : 
   51780             : 
   51781           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetRepeatedArgAllowed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51782           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51783           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51784           1 :   void *argp1 = 0 ;
   51785           1 :   int res1 = 0 ;
   51786           1 :   PyObject *swig_obj[1] ;
   51787           1 :   bool result;
   51788             :   
   51789           1 :   if (!args) SWIG_fail;
   51790           1 :   swig_obj[0] = args;
   51791           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51792           1 :   if (!SWIG_IsOK(res1)) {
   51793           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetRepeatedArgAllowed" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51794             :   }
   51795           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51796           1 :   {
   51797           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51798           1 :     if ( bLocalUseExceptions ) {
   51799           1 :       pushErrorHandler();
   51800             :     }
   51801           1 :     {
   51802           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51803           1 :       result = (bool)GDALAlgorithmArgHS_GetRepeatedArgAllowed(arg1);
   51804           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51805             :     }
   51806           1 :     if ( bLocalUseExceptions ) {
   51807           1 :       popErrorHandler();
   51808             :     }
   51809             : #ifndef SED_HACKS
   51810             :     if ( bLocalUseExceptions ) {
   51811             :       CPLErr eclass = CPLGetLastErrorType();
   51812             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51813             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51814             :       }
   51815             :     }
   51816             : #endif
   51817             :   }
   51818           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   51819           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51820             :   return resultobj;
   51821             : fail:
   51822             :   return NULL;
   51823             : }
   51824             : 
   51825             : 
   51826           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetChoices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51827           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51828           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51829           1 :   void *argp1 = 0 ;
   51830           1 :   int res1 = 0 ;
   51831           1 :   PyObject *swig_obj[1] ;
   51832           1 :   char **result = 0 ;
   51833             :   
   51834           1 :   if (!args) SWIG_fail;
   51835           1 :   swig_obj[0] = args;
   51836           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51837           1 :   if (!SWIG_IsOK(res1)) {
   51838           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetChoices" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51839             :   }
   51840           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51841           1 :   {
   51842           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51843           1 :     if ( bLocalUseExceptions ) {
   51844           1 :       pushErrorHandler();
   51845             :     }
   51846           1 :     {
   51847           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51848           1 :       result = (char **)GDALAlgorithmArgHS_GetChoices(arg1);
   51849           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51850             :     }
   51851           1 :     if ( bLocalUseExceptions ) {
   51852           1 :       popErrorHandler();
   51853             :     }
   51854             : #ifndef SED_HACKS
   51855             :     if ( bLocalUseExceptions ) {
   51856             :       CPLErr eclass = CPLGetLastErrorType();
   51857             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51858             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51859             :       }
   51860             :     }
   51861             : #endif
   51862             :   }
   51863           1 :   {
   51864             :     /* %typemap(out) char **CSL -> ( string ) */
   51865           1 :     bool bErr = false;
   51866           1 :     resultobj = CSLToList(result, &bErr);
   51867           1 :     CSLDestroy(result);
   51868           1 :     if( bErr ) {
   51869           0 :       SWIG_fail;
   51870             :     }
   51871             :   }
   51872           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51873             :   return resultobj;
   51874             : fail:
   51875             :   return NULL;
   51876             : }
   51877             : 
   51878             : 
   51879          19 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51880          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51881          19 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51882          19 :   char *arg2 = (char *) 0 ;
   51883          19 :   void *argp1 = 0 ;
   51884          19 :   int res1 = 0 ;
   51885          19 :   int res2 ;
   51886          19 :   char *buf2 = 0 ;
   51887          19 :   int alloc2 = 0 ;
   51888          19 :   PyObject *swig_obj[2] ;
   51889          19 :   char **result = 0 ;
   51890             :   
   51891          19 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_GetMetadataItem", 2, 2, swig_obj)) SWIG_fail;
   51892          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51893          19 :   if (!SWIG_IsOK(res1)) {
   51894           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMetadataItem" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51895             :   }
   51896          19 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51897          19 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   51898          19 :   if (!SWIG_IsOK(res2)) {
   51899           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
   51900             :   }
   51901          19 :   arg2 = reinterpret_cast< char * >(buf2);
   51902          19 :   {
   51903          19 :     const int bLocalUseExceptions = GetUseExceptions();
   51904          19 :     if ( bLocalUseExceptions ) {
   51905          19 :       pushErrorHandler();
   51906             :     }
   51907          19 :     {
   51908          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51909          19 :       result = (char **)GDALAlgorithmArgHS_GetMetadataItem(arg1,(char const *)arg2);
   51910          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51911             :     }
   51912          19 :     if ( bLocalUseExceptions ) {
   51913          19 :       popErrorHandler();
   51914             :     }
   51915             : #ifndef SED_HACKS
   51916             :     if ( bLocalUseExceptions ) {
   51917             :       CPLErr eclass = CPLGetLastErrorType();
   51918             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51919             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51920             :       }
   51921             :     }
   51922             : #endif
   51923             :   }
   51924          19 :   {
   51925             :     /* %typemap(out) char **CSL -> ( string ) */
   51926          19 :     bool bErr = false;
   51927          19 :     resultobj = CSLToList(result, &bErr);
   51928          19 :     CSLDestroy(result);
   51929          19 :     if( bErr ) {
   51930           0 :       SWIG_fail;
   51931             :     }
   51932             :   }
   51933          19 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   51934          19 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51935             :   return resultobj;
   51936           0 : fail:
   51937           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   51938             :   return NULL;
   51939             : }
   51940             : 
   51941             : 
   51942           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsExplicitlySet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51943           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51944           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51945           1 :   void *argp1 = 0 ;
   51946           1 :   int res1 = 0 ;
   51947           1 :   PyObject *swig_obj[1] ;
   51948           1 :   bool result;
   51949             :   
   51950           1 :   if (!args) SWIG_fail;
   51951           1 :   swig_obj[0] = args;
   51952           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51953           1 :   if (!SWIG_IsOK(res1)) {
   51954           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsExplicitlySet" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   51955             :   }
   51956           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   51957           1 :   {
   51958           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51959           1 :     if ( bLocalUseExceptions ) {
   51960           1 :       pushErrorHandler();
   51961             :     }
   51962           1 :     {
   51963           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51964           1 :       result = (bool)GDALAlgorithmArgHS_IsExplicitlySet(arg1);
   51965           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51966             :     }
   51967           1 :     if ( bLocalUseExceptions ) {
   51968           1 :       popErrorHandler();
   51969             :     }
   51970             : #ifndef SED_HACKS
   51971             :     if ( bLocalUseExceptions ) {
   51972             :       CPLErr eclass = CPLGetLastErrorType();
   51973             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51974             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51975             :       }
   51976             :     }
   51977             : #endif
   51978             :   }
   51979           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   51980           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51981             :   return resultobj;
   51982             : fail:
   51983             :   return NULL;
   51984             : }
   51985             : 
   51986             : 
   51987           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_HasDefaultValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51988           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51989           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   51990           1 :   void *argp1 = 0 ;
   51991           1 :   int res1 = 0 ;
   51992           1 :   PyObject *swig_obj[1] ;
   51993           1 :   bool result;
   51994             :   
   51995           1 :   if (!args) SWIG_fail;
   51996           1 :   swig_obj[0] = args;
   51997           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   51998           1 :   if (!SWIG_IsOK(res1)) {
   51999           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_HasDefaultValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52000             :   }
   52001           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52002           1 :   {
   52003           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52004           1 :     if ( bLocalUseExceptions ) {
   52005           1 :       pushErrorHandler();
   52006             :     }
   52007           1 :     {
   52008           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52009           1 :       result = (bool)GDALAlgorithmArgHS_HasDefaultValue(arg1);
   52010           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52011             :     }
   52012           1 :     if ( bLocalUseExceptions ) {
   52013           1 :       popErrorHandler();
   52014             :     }
   52015             : #ifndef SED_HACKS
   52016             :     if ( bLocalUseExceptions ) {
   52017             :       CPLErr eclass = CPLGetLastErrorType();
   52018             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52019             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52020             :       }
   52021             :     }
   52022             : #endif
   52023             :   }
   52024           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52025           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52026             :   return resultobj;
   52027             : fail:
   52028             :   return NULL;
   52029             : }
   52030             : 
   52031             : 
   52032           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsHiddenForCLI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52033           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52034           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52035           1 :   void *argp1 = 0 ;
   52036           1 :   int res1 = 0 ;
   52037           1 :   PyObject *swig_obj[1] ;
   52038           1 :   bool result;
   52039             :   
   52040           1 :   if (!args) SWIG_fail;
   52041           1 :   swig_obj[0] = args;
   52042           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52043           1 :   if (!SWIG_IsOK(res1)) {
   52044           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsHiddenForCLI" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52045             :   }
   52046           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52047           1 :   {
   52048           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52049           1 :     if ( bLocalUseExceptions ) {
   52050           1 :       pushErrorHandler();
   52051             :     }
   52052           1 :     {
   52053           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52054           1 :       result = (bool)GDALAlgorithmArgHS_IsHiddenForCLI(arg1);
   52055           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52056             :     }
   52057           1 :     if ( bLocalUseExceptions ) {
   52058           1 :       popErrorHandler();
   52059             :     }
   52060             : #ifndef SED_HACKS
   52061             :     if ( bLocalUseExceptions ) {
   52062             :       CPLErr eclass = CPLGetLastErrorType();
   52063             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52064             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52065             :       }
   52066             :     }
   52067             : #endif
   52068             :   }
   52069           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52070           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52071             :   return resultobj;
   52072             : fail:
   52073             :   return NULL;
   52074             : }
   52075             : 
   52076             : 
   52077           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsOnlyForCLI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52078           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52079           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52080           1 :   void *argp1 = 0 ;
   52081           1 :   int res1 = 0 ;
   52082           1 :   PyObject *swig_obj[1] ;
   52083           1 :   bool result;
   52084             :   
   52085           1 :   if (!args) SWIG_fail;
   52086           1 :   swig_obj[0] = args;
   52087           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52088           1 :   if (!SWIG_IsOK(res1)) {
   52089           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsOnlyForCLI" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52090             :   }
   52091           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52092           1 :   {
   52093           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52094           1 :     if ( bLocalUseExceptions ) {
   52095           1 :       pushErrorHandler();
   52096             :     }
   52097           1 :     {
   52098           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52099           1 :       result = (bool)GDALAlgorithmArgHS_IsOnlyForCLI(arg1);
   52100           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52101             :     }
   52102           1 :     if ( bLocalUseExceptions ) {
   52103           1 :       popErrorHandler();
   52104             :     }
   52105             : #ifndef SED_HACKS
   52106             :     if ( bLocalUseExceptions ) {
   52107             :       CPLErr eclass = CPLGetLastErrorType();
   52108             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52109             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52110             :       }
   52111             :     }
   52112             : #endif
   52113             :   }
   52114           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52115           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52116             :   return resultobj;
   52117             : fail:
   52118             :   return NULL;
   52119             : }
   52120             : 
   52121             : 
   52122           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsInput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52123           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52124           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52125           1 :   void *argp1 = 0 ;
   52126           1 :   int res1 = 0 ;
   52127           1 :   PyObject *swig_obj[1] ;
   52128           1 :   bool result;
   52129             :   
   52130           1 :   if (!args) SWIG_fail;
   52131           1 :   swig_obj[0] = args;
   52132           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52133           1 :   if (!SWIG_IsOK(res1)) {
   52134           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsInput" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52135             :   }
   52136           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52137           1 :   {
   52138           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52139           1 :     if ( bLocalUseExceptions ) {
   52140           1 :       pushErrorHandler();
   52141             :     }
   52142           1 :     {
   52143           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52144           1 :       result = (bool)GDALAlgorithmArgHS_IsInput(arg1);
   52145           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52146             :     }
   52147           1 :     if ( bLocalUseExceptions ) {
   52148           1 :       popErrorHandler();
   52149             :     }
   52150             : #ifndef SED_HACKS
   52151             :     if ( bLocalUseExceptions ) {
   52152             :       CPLErr eclass = CPLGetLastErrorType();
   52153             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52154             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52155             :       }
   52156             :     }
   52157             : #endif
   52158             :   }
   52159           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52160           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52161             :   return resultobj;
   52162             : fail:
   52163             :   return NULL;
   52164             : }
   52165             : 
   52166             : 
   52167        1853 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsOutput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52168        1853 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52169        1853 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52170        1853 :   void *argp1 = 0 ;
   52171        1853 :   int res1 = 0 ;
   52172        1853 :   PyObject *swig_obj[1] ;
   52173        1853 :   bool result;
   52174             :   
   52175        1853 :   if (!args) SWIG_fail;
   52176        1853 :   swig_obj[0] = args;
   52177        1853 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52178        1853 :   if (!SWIG_IsOK(res1)) {
   52179           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsOutput" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52180             :   }
   52181        1853 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52182        1853 :   {
   52183        1853 :     const int bLocalUseExceptions = GetUseExceptions();
   52184        1853 :     if ( bLocalUseExceptions ) {
   52185        1853 :       pushErrorHandler();
   52186             :     }
   52187        1853 :     {
   52188        1853 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52189        1853 :       result = (bool)GDALAlgorithmArgHS_IsOutput(arg1);
   52190        1853 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52191             :     }
   52192        1853 :     if ( bLocalUseExceptions ) {
   52193        1853 :       popErrorHandler();
   52194             :     }
   52195             : #ifndef SED_HACKS
   52196             :     if ( bLocalUseExceptions ) {
   52197             :       CPLErr eclass = CPLGetLastErrorType();
   52198             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52199             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52200             :       }
   52201             :     }
   52202             : #endif
   52203             :   }
   52204        1853 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52205        1853 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52206             :   return resultobj;
   52207             : fail:
   52208             :   return NULL;
   52209             : }
   52210             : 
   52211             : 
   52212           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52213           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52214           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52215           1 :   void *argp1 = 0 ;
   52216           1 :   int res1 = 0 ;
   52217           1 :   PyObject *swig_obj[1] ;
   52218           1 :   int result;
   52219             :   
   52220           1 :   if (!args) SWIG_fail;
   52221           1 :   swig_obj[0] = args;
   52222           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52223           1 :   if (!SWIG_IsOK(res1)) {
   52224           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetType" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52225             :   }
   52226           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52227           1 :   {
   52228           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52229           1 :     if ( bLocalUseExceptions ) {
   52230           1 :       pushErrorHandler();
   52231             :     }
   52232           1 :     {
   52233           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52234           1 :       result = (int)GDALAlgorithmArgHS_GetDatasetType(arg1);
   52235           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52236             :     }
   52237           1 :     if ( bLocalUseExceptions ) {
   52238           1 :       popErrorHandler();
   52239             :     }
   52240             : #ifndef SED_HACKS
   52241             :     if ( bLocalUseExceptions ) {
   52242             :       CPLErr eclass = CPLGetLastErrorType();
   52243             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52244             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52245             :       }
   52246             :     }
   52247             : #endif
   52248             :   }
   52249           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52250           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52251             :   return resultobj;
   52252             : fail:
   52253             :   return NULL;
   52254             : }
   52255             : 
   52256             : 
   52257           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetInputFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52258           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52259           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52260           1 :   void *argp1 = 0 ;
   52261           1 :   int res1 = 0 ;
   52262           1 :   PyObject *swig_obj[1] ;
   52263           1 :   int result;
   52264             :   
   52265           1 :   if (!args) SWIG_fail;
   52266           1 :   swig_obj[0] = args;
   52267           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52268           1 :   if (!SWIG_IsOK(res1)) {
   52269           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetInputFlags" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52270             :   }
   52271           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52272           1 :   {
   52273           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52274           1 :     if ( bLocalUseExceptions ) {
   52275           1 :       pushErrorHandler();
   52276             :     }
   52277           1 :     {
   52278           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52279           1 :       result = (int)GDALAlgorithmArgHS_GetDatasetInputFlags(arg1);
   52280           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52281             :     }
   52282           1 :     if ( bLocalUseExceptions ) {
   52283           1 :       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           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52295           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52296             :   return resultobj;
   52297             : fail:
   52298             :   return NULL;
   52299             : }
   52300             : 
   52301             : 
   52302           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetOutputFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52303           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52304           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52305           1 :   void *argp1 = 0 ;
   52306           1 :   int res1 = 0 ;
   52307           1 :   PyObject *swig_obj[1] ;
   52308           1 :   int result;
   52309             :   
   52310           1 :   if (!args) SWIG_fail;
   52311           1 :   swig_obj[0] = args;
   52312           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52313           1 :   if (!SWIG_IsOK(res1)) {
   52314           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetOutputFlags" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52315             :   }
   52316           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52317           1 :   {
   52318           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52319           1 :     if ( bLocalUseExceptions ) {
   52320           1 :       pushErrorHandler();
   52321             :     }
   52322           1 :     {
   52323           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52324           1 :       result = (int)GDALAlgorithmArgHS_GetDatasetOutputFlags(arg1);
   52325           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52326             :     }
   52327           1 :     if ( bLocalUseExceptions ) {
   52328           1 :       popErrorHandler();
   52329             :     }
   52330             : #ifndef SED_HACKS
   52331             :     if ( bLocalUseExceptions ) {
   52332             :       CPLErr eclass = CPLGetLastErrorType();
   52333             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52334             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52335             :       }
   52336             :     }
   52337             : #endif
   52338             :   }
   52339           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52340           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52341             :   return resultobj;
   52342             : fail:
   52343             :   return NULL;
   52344             : }
   52345             : 
   52346             : 
   52347           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMutualExclusionGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52348           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52349           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52350           1 :   void *argp1 = 0 ;
   52351           1 :   int res1 = 0 ;
   52352           1 :   PyObject *swig_obj[1] ;
   52353           1 :   char *result = 0 ;
   52354             :   
   52355           1 :   if (!args) SWIG_fail;
   52356           1 :   swig_obj[0] = args;
   52357           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52358           1 :   if (!SWIG_IsOK(res1)) {
   52359           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMutualExclusionGroup" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52360             :   }
   52361           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52362           1 :   {
   52363           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52364           1 :     if ( bLocalUseExceptions ) {
   52365           1 :       pushErrorHandler();
   52366             :     }
   52367           1 :     {
   52368           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52369           1 :       result = (char *)GDALAlgorithmArgHS_GetMutualExclusionGroup(arg1);
   52370           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52371             :     }
   52372           1 :     if ( bLocalUseExceptions ) {
   52373           1 :       popErrorHandler();
   52374             :     }
   52375             : #ifndef SED_HACKS
   52376             :     if ( bLocalUseExceptions ) {
   52377             :       CPLErr eclass = CPLGetLastErrorType();
   52378             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52379             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52380             :       }
   52381             :     }
   52382             : #endif
   52383             :   }
   52384           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52385           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52386             :   return resultobj;
   52387             : fail:
   52388             :   return NULL;
   52389             : }
   52390             : 
   52391             : 
   52392           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsBoolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52393           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52394           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52395           7 :   void *argp1 = 0 ;
   52396           7 :   int res1 = 0 ;
   52397           7 :   PyObject *swig_obj[1] ;
   52398           7 :   bool result;
   52399             :   
   52400           7 :   if (!args) SWIG_fail;
   52401           7 :   swig_obj[0] = args;
   52402           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52403           7 :   if (!SWIG_IsOK(res1)) {
   52404           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsBoolean" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52405             :   }
   52406           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52407           7 :   {
   52408           7 :     const int bLocalUseExceptions = GetUseExceptions();
   52409           7 :     if ( bLocalUseExceptions ) {
   52410           7 :       pushErrorHandler();
   52411             :     }
   52412           7 :     {
   52413           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52414           7 :       result = (bool)GDALAlgorithmArgHS_GetAsBoolean(arg1);
   52415           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52416             :     }
   52417           7 :     if ( bLocalUseExceptions ) {
   52418           7 :       popErrorHandler();
   52419             :     }
   52420             : #ifndef SED_HACKS
   52421             :     if ( bLocalUseExceptions ) {
   52422             :       CPLErr eclass = CPLGetLastErrorType();
   52423             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52424             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52425             :       }
   52426             :     }
   52427             : #endif
   52428             :   }
   52429           7 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52430           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52431             :   return resultobj;
   52432             : fail:
   52433             :   return NULL;
   52434             : }
   52435             : 
   52436             : 
   52437          96 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52438          96 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52439          96 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52440          96 :   void *argp1 = 0 ;
   52441          96 :   int res1 = 0 ;
   52442          96 :   PyObject *swig_obj[1] ;
   52443          96 :   char *result = 0 ;
   52444             :   
   52445          96 :   if (!args) SWIG_fail;
   52446          96 :   swig_obj[0] = args;
   52447          96 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52448          96 :   if (!SWIG_IsOK(res1)) {
   52449           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsString" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52450             :   }
   52451          96 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52452          96 :   {
   52453          96 :     const int bLocalUseExceptions = GetUseExceptions();
   52454          96 :     if ( bLocalUseExceptions ) {
   52455          96 :       pushErrorHandler();
   52456             :     }
   52457          96 :     {
   52458          96 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52459          96 :       result = (char *)GDALAlgorithmArgHS_GetAsString(arg1);
   52460          96 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52461             :     }
   52462          96 :     if ( bLocalUseExceptions ) {
   52463          96 :       popErrorHandler();
   52464             :     }
   52465             : #ifndef SED_HACKS
   52466             :     if ( bLocalUseExceptions ) {
   52467             :       CPLErr eclass = CPLGetLastErrorType();
   52468             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52469             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52470             :       }
   52471             :     }
   52472             : #endif
   52473             :   }
   52474          96 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52475          98 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52476             :   return resultobj;
   52477             : fail:
   52478             :   return NULL;
   52479             : }
   52480             : 
   52481             : 
   52482           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52483           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52484           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52485           7 :   void *argp1 = 0 ;
   52486           7 :   int res1 = 0 ;
   52487           7 :   PyObject *swig_obj[1] ;
   52488           7 :   int result;
   52489             :   
   52490           7 :   if (!args) SWIG_fail;
   52491           7 :   swig_obj[0] = args;
   52492           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52493           7 :   if (!SWIG_IsOK(res1)) {
   52494           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsInteger" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52495             :   }
   52496           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52497           7 :   {
   52498           7 :     const int bLocalUseExceptions = GetUseExceptions();
   52499           7 :     if ( bLocalUseExceptions ) {
   52500           7 :       pushErrorHandler();
   52501             :     }
   52502           7 :     {
   52503           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52504           7 :       result = (int)GDALAlgorithmArgHS_GetAsInteger(arg1);
   52505           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52506             :     }
   52507           7 :     if ( bLocalUseExceptions ) {
   52508           7 :       popErrorHandler();
   52509             :     }
   52510             : #ifndef SED_HACKS
   52511             :     if ( bLocalUseExceptions ) {
   52512             :       CPLErr eclass = CPLGetLastErrorType();
   52513             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52514             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52515             :       }
   52516             :     }
   52517             : #endif
   52518             :   }
   52519           7 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52520           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52521             :   return resultobj;
   52522             : fail:
   52523             :   return NULL;
   52524             : }
   52525             : 
   52526             : 
   52527           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52528           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52529           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52530           7 :   void *argp1 = 0 ;
   52531           7 :   int res1 = 0 ;
   52532           7 :   PyObject *swig_obj[1] ;
   52533           7 :   double result;
   52534             :   
   52535           7 :   if (!args) SWIG_fail;
   52536           7 :   swig_obj[0] = args;
   52537           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52538           7 :   if (!SWIG_IsOK(res1)) {
   52539           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDouble" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52540             :   }
   52541           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52542           7 :   {
   52543           7 :     const int bLocalUseExceptions = GetUseExceptions();
   52544           7 :     if ( bLocalUseExceptions ) {
   52545           7 :       pushErrorHandler();
   52546             :     }
   52547           7 :     {
   52548           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52549           7 :       result = (double)GDALAlgorithmArgHS_GetAsDouble(arg1);
   52550           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52551             :     }
   52552           7 :     if ( bLocalUseExceptions ) {
   52553           7 :       popErrorHandler();
   52554             :     }
   52555             : #ifndef SED_HACKS
   52556             :     if ( bLocalUseExceptions ) {
   52557             :       CPLErr eclass = CPLGetLastErrorType();
   52558             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52559             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52560             :       }
   52561             :     }
   52562             : #endif
   52563             :   }
   52564           7 :   resultobj = SWIG_From_double(static_cast< double >(result));
   52565           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52566             :   return resultobj;
   52567             : fail:
   52568             :   return NULL;
   52569             : }
   52570             : 
   52571             : 
   52572        1850 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDatasetValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52573        1850 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52574        1850 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52575        1850 :   void *argp1 = 0 ;
   52576        1850 :   int res1 = 0 ;
   52577        1850 :   PyObject *swig_obj[1] ;
   52578        1850 :   GDALArgDatasetValueHS *result = 0 ;
   52579             :   
   52580        1850 :   if (!args) SWIG_fail;
   52581        1850 :   swig_obj[0] = args;
   52582        1850 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52583        1850 :   if (!SWIG_IsOK(res1)) {
   52584           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDatasetValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52585             :   }
   52586        1850 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52587        1850 :   {
   52588        1850 :     const int bLocalUseExceptions = GetUseExceptions();
   52589        1850 :     if ( bLocalUseExceptions ) {
   52590        1850 :       pushErrorHandler();
   52591             :     }
   52592        1850 :     {
   52593        1850 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52594        1850 :       result = (GDALArgDatasetValueHS *)GDALAlgorithmArgHS_GetAsDatasetValue(arg1);
   52595        1850 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52596             :     }
   52597        1850 :     if ( bLocalUseExceptions ) {
   52598        1850 :       popErrorHandler();
   52599             :     }
   52600             : #ifndef SED_HACKS
   52601             :     if ( bLocalUseExceptions ) {
   52602             :       CPLErr eclass = CPLGetLastErrorType();
   52603             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52604             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52605             :       }
   52606             :     }
   52607             : #endif
   52608             :   }
   52609        1850 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_POINTER_OWN |  0 );
   52610        1852 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52611             :   return resultobj;
   52612             : fail:
   52613             :   return NULL;
   52614             : }
   52615             : 
   52616             : 
   52617           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52618           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52619           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52620           1 :   void *argp1 = 0 ;
   52621           1 :   int res1 = 0 ;
   52622           1 :   PyObject *swig_obj[1] ;
   52623           1 :   char **result = 0 ;
   52624             :   
   52625           1 :   if (!args) SWIG_fail;
   52626           1 :   swig_obj[0] = args;
   52627           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52628           1 :   if (!SWIG_IsOK(res1)) {
   52629           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsStringList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52630             :   }
   52631           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52632           1 :   {
   52633           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52634           1 :     if ( bLocalUseExceptions ) {
   52635           1 :       pushErrorHandler();
   52636             :     }
   52637           1 :     {
   52638           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52639           1 :       result = (char **)GDALAlgorithmArgHS_GetAsStringList(arg1);
   52640           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52641             :     }
   52642           1 :     if ( bLocalUseExceptions ) {
   52643           1 :       popErrorHandler();
   52644             :     }
   52645             : #ifndef SED_HACKS
   52646             :     if ( bLocalUseExceptions ) {
   52647             :       CPLErr eclass = CPLGetLastErrorType();
   52648             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52649             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52650             :       }
   52651             :     }
   52652             : #endif
   52653             :   }
   52654           1 :   {
   52655             :     /* %typemap(out) char **CSL -> ( string ) */
   52656           1 :     bool bErr = false;
   52657           1 :     resultobj = CSLToList(result, &bErr);
   52658           1 :     CSLDestroy(result);
   52659           1 :     if( bErr ) {
   52660           0 :       SWIG_fail;
   52661             :     }
   52662             :   }
   52663           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52664             :   return resultobj;
   52665             : fail:
   52666             :   return NULL;
   52667             : }
   52668             : 
   52669             : 
   52670           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52671           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52672           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52673           7 :   int *arg2 = (int *) 0 ;
   52674           7 :   int **arg3 = (int **) 0 ;
   52675           7 :   void *argp1 = 0 ;
   52676           7 :   int res1 = 0 ;
   52677           7 :   int nLen2 = 0 ;
   52678           7 :   int *pList2 = NULL ;
   52679           7 :   PyObject *swig_obj[1] ;
   52680             :   
   52681           7 :   {
   52682             :     /* %typemap(in,numinputs=0) (int *nLen2, const int **pList2) (int nLen2, int *pList2) */
   52683           7 :     arg2 = &nLen2;
   52684           7 :     arg3 = &pList2;
   52685             :   }
   52686           7 :   if (!args) SWIG_fail;
   52687           7 :   swig_obj[0] = args;
   52688           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52689           7 :   if (!SWIG_IsOK(res1)) {
   52690           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsIntegerList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52691             :   }
   52692           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52693           7 :   {
   52694           7 :     const int bLocalUseExceptions = GetUseExceptions();
   52695           7 :     if ( bLocalUseExceptions ) {
   52696           7 :       pushErrorHandler();
   52697             :     }
   52698           7 :     {
   52699           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52700           7 :       GDALAlgorithmArgHS_GetAsIntegerList(arg1,arg2,(int const **)arg3);
   52701           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52702             :     }
   52703           7 :     if ( bLocalUseExceptions ) {
   52704           7 :       popErrorHandler();
   52705             :     }
   52706             : #ifndef SED_HACKS
   52707             :     if ( bLocalUseExceptions ) {
   52708             :       CPLErr eclass = CPLGetLastErrorType();
   52709             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52710             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52711             :       }
   52712             :     }
   52713             : #endif
   52714             :   }
   52715           7 :   resultobj = SWIG_Py_Void();
   52716           7 :   {
   52717             :     /* %typemap(argout) (int *nLen, const int **pList ) */
   52718           7 :     Py_DECREF(resultobj);
   52719           7 :     PyObject *out = PyList_New( *arg2 );
   52720           7 :     if( !out ) {
   52721           0 :       SWIG_fail;
   52722             :     }
   52723          16 :     for( int i=0; i<*arg2; i++ ) {
   52724           9 :       PyObject *val = PyInt_FromLong( (*arg3)[i] );
   52725           9 :       PyList_SetItem( out, i, val );
   52726             :     }
   52727           7 :     resultobj = out;
   52728             :   }
   52729           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52730             :   return resultobj;
   52731             : fail:
   52732             :   return NULL;
   52733             : }
   52734             : 
   52735             : 
   52736           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52737           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52738           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52739           7 :   int *arg2 = (int *) 0 ;
   52740           7 :   double **arg3 = (double **) 0 ;
   52741           7 :   void *argp1 = 0 ;
   52742           7 :   int res1 = 0 ;
   52743           7 :   int nLen2 = 0 ;
   52744           7 :   double *pList2 = NULL ;
   52745           7 :   PyObject *swig_obj[1] ;
   52746             :   
   52747           7 :   {
   52748             :     /* %typemap(in,numinputs=0) (int *nLen2, const double **pList2) (int nLen2, double *pList2) */
   52749           7 :     arg2 = &nLen2;
   52750           7 :     arg3 = &pList2;
   52751             :   }
   52752           7 :   if (!args) SWIG_fail;
   52753           7 :   swig_obj[0] = args;
   52754           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52755           7 :   if (!SWIG_IsOK(res1)) {
   52756           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDoubleList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52757             :   }
   52758           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52759           7 :   {
   52760           7 :     const int bLocalUseExceptions = GetUseExceptions();
   52761           7 :     if ( bLocalUseExceptions ) {
   52762           7 :       pushErrorHandler();
   52763             :     }
   52764           7 :     {
   52765           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52766           7 :       GDALAlgorithmArgHS_GetAsDoubleList(arg1,arg2,(double const **)arg3);
   52767           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52768             :     }
   52769           7 :     if ( bLocalUseExceptions ) {
   52770           7 :       popErrorHandler();
   52771             :     }
   52772             : #ifndef SED_HACKS
   52773             :     if ( bLocalUseExceptions ) {
   52774             :       CPLErr eclass = CPLGetLastErrorType();
   52775             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52776             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52777             :       }
   52778             :     }
   52779             : #endif
   52780             :   }
   52781           7 :   resultobj = SWIG_Py_Void();
   52782           7 :   {
   52783             :     /* %typemap(argout) (int *nLen, const double **pList ) */
   52784           7 :     Py_DECREF(resultobj);
   52785           7 :     PyObject *out = PyList_New( *arg2 );
   52786           7 :     if( !out ) {
   52787           0 :       SWIG_fail;
   52788             :     }
   52789          16 :     for( int i=0; i<*arg2; i++ ) {
   52790           9 :       PyObject *val = PyFloat_FromDouble( (*arg3)[i] );
   52791           9 :       PyList_SetItem( out, i, val );
   52792             :     }
   52793           7 :     resultobj = out;
   52794             :   }
   52795           9 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52796             :   return resultobj;
   52797             : fail:
   52798             :   return NULL;
   52799             : }
   52800             : 
   52801             : 
   52802         276 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsBoolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52803         276 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52804         276 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52805         276 :   bool arg2 ;
   52806         276 :   void *argp1 = 0 ;
   52807         276 :   int res1 = 0 ;
   52808         276 :   bool val2 ;
   52809         276 :   int ecode2 = 0 ;
   52810         276 :   PyObject *swig_obj[2] ;
   52811         276 :   bool result;
   52812             :   
   52813         276 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsBoolean", 2, 2, swig_obj)) SWIG_fail;
   52814         276 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52815         276 :   if (!SWIG_IsOK(res1)) {
   52816           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsBoolean" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52817             :   }
   52818         276 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52819         276 :   ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
   52820         275 :   if (!SWIG_IsOK(ecode2)) {
   52821           1 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsBoolean" "', argument " "2"" of type '" "bool""'");
   52822             :   } 
   52823         275 :   arg2 = static_cast< bool >(val2);
   52824         275 :   {
   52825         275 :     const int bLocalUseExceptions = GetUseExceptions();
   52826         275 :     if ( bLocalUseExceptions ) {
   52827         275 :       pushErrorHandler();
   52828             :     }
   52829         275 :     {
   52830         275 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52831         275 :       result = (bool)GDALAlgorithmArgHS_SetAsBoolean(arg1,arg2);
   52832         275 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52833             :     }
   52834         275 :     if ( bLocalUseExceptions ) {
   52835         275 :       popErrorHandler();
   52836             :     }
   52837             : #ifndef SED_HACKS
   52838             :     if ( bLocalUseExceptions ) {
   52839             :       CPLErr eclass = CPLGetLastErrorType();
   52840             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52841             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52842             :       }
   52843             :     }
   52844             : #endif
   52845             :   }
   52846         275 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52847         276 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52848             :   return resultobj;
   52849             : fail:
   52850             :   return NULL;
   52851             : }
   52852             : 
   52853             : 
   52854        1179 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52855        1179 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52856        1179 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52857        1179 :   char *arg2 = (char *) 0 ;
   52858        1179 :   void *argp1 = 0 ;
   52859        1179 :   int res1 = 0 ;
   52860        1179 :   int res2 ;
   52861        1179 :   char *buf2 = 0 ;
   52862        1179 :   int alloc2 = 0 ;
   52863        1179 :   PyObject *swig_obj[2] ;
   52864        1179 :   bool result;
   52865             :   
   52866        1179 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsString", 2, 2, swig_obj)) SWIG_fail;
   52867        1179 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52868        1179 :   if (!SWIG_IsOK(res1)) {
   52869           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsString" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52870             :   }
   52871        1179 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52872        1179 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   52873        1179 :   if (!SWIG_IsOK(res2)) {
   52874           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetAsString" "', argument " "2"" of type '" "char const *""'");
   52875             :   }
   52876        1179 :   arg2 = reinterpret_cast< char * >(buf2);
   52877        1179 :   {
   52878        1179 :     const int bLocalUseExceptions = GetUseExceptions();
   52879        1179 :     if ( bLocalUseExceptions ) {
   52880        1179 :       pushErrorHandler();
   52881             :     }
   52882        1179 :     {
   52883        1179 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52884        1179 :       result = (bool)GDALAlgorithmArgHS_SetAsString(arg1,(char const *)arg2);
   52885        1179 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52886             :     }
   52887        1179 :     if ( bLocalUseExceptions ) {
   52888        1179 :       popErrorHandler();
   52889             :     }
   52890             : #ifndef SED_HACKS
   52891             :     if ( bLocalUseExceptions ) {
   52892             :       CPLErr eclass = CPLGetLastErrorType();
   52893             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52894             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52895             :       }
   52896             :     }
   52897             : #endif
   52898             :   }
   52899        1179 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52900        1179 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   52901        1213 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52902             :   return resultobj;
   52903           0 : fail:
   52904           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   52905             :   return NULL;
   52906             : }
   52907             : 
   52908             : 
   52909         192 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52910         192 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52911         192 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52912         192 :   int arg2 ;
   52913         192 :   void *argp1 = 0 ;
   52914         192 :   int res1 = 0 ;
   52915         192 :   int val2 ;
   52916         192 :   int ecode2 = 0 ;
   52917         192 :   PyObject *swig_obj[2] ;
   52918         192 :   bool result;
   52919             :   
   52920         192 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsInteger", 2, 2, swig_obj)) SWIG_fail;
   52921         192 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52922         192 :   if (!SWIG_IsOK(res1)) {
   52923           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsInteger" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52924             :   }
   52925         192 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52926         192 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   52927         192 :   if (!SWIG_IsOK(ecode2)) {
   52928           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsInteger" "', argument " "2"" of type '" "int""'");
   52929             :   } 
   52930         192 :   arg2 = static_cast< int >(val2);
   52931         192 :   {
   52932         192 :     const int bLocalUseExceptions = GetUseExceptions();
   52933         192 :     if ( bLocalUseExceptions ) {
   52934         192 :       pushErrorHandler();
   52935             :     }
   52936         192 :     {
   52937         192 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52938         192 :       result = (bool)GDALAlgorithmArgHS_SetAsInteger(arg1,arg2);
   52939         192 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52940             :     }
   52941         192 :     if ( bLocalUseExceptions ) {
   52942         192 :       popErrorHandler();
   52943             :     }
   52944             : #ifndef SED_HACKS
   52945             :     if ( bLocalUseExceptions ) {
   52946             :       CPLErr eclass = CPLGetLastErrorType();
   52947             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52948             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52949             :       }
   52950             :     }
   52951             : #endif
   52952             :   }
   52953         192 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52954         194 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52955             :   return resultobj;
   52956             : fail:
   52957             :   return NULL;
   52958             : }
   52959             : 
   52960             : 
   52961         210 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52962         210 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52963         210 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52964         210 :   double arg2 ;
   52965         210 :   void *argp1 = 0 ;
   52966         210 :   int res1 = 0 ;
   52967         210 :   double val2 ;
   52968         210 :   int ecode2 = 0 ;
   52969         210 :   PyObject *swig_obj[2] ;
   52970         210 :   bool result;
   52971             :   
   52972         210 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDouble", 2, 2, swig_obj)) SWIG_fail;
   52973         210 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52974         210 :   if (!SWIG_IsOK(res1)) {
   52975           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDouble" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52976             :   }
   52977         210 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52978         210 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   52979         210 :   if (!SWIG_IsOK(ecode2)) {
   52980           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsDouble" "', argument " "2"" of type '" "double""'");
   52981             :   } 
   52982         210 :   arg2 = static_cast< double >(val2);
   52983         210 :   {
   52984         210 :     const int bLocalUseExceptions = GetUseExceptions();
   52985         210 :     if ( bLocalUseExceptions ) {
   52986         210 :       pushErrorHandler();
   52987             :     }
   52988         210 :     {
   52989         210 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52990         210 :       result = (bool)GDALAlgorithmArgHS_SetAsDouble(arg1,arg2);
   52991         210 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52992             :     }
   52993         210 :     if ( bLocalUseExceptions ) {
   52994         210 :       popErrorHandler();
   52995             :     }
   52996             : #ifndef SED_HACKS
   52997             :     if ( bLocalUseExceptions ) {
   52998             :       CPLErr eclass = CPLGetLastErrorType();
   52999             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53000             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53001             :       }
   53002             :     }
   53003             : #endif
   53004             :   }
   53005         210 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53006         222 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53007             :   return resultobj;
   53008             : fail:
   53009             :   return NULL;
   53010             : }
   53011             : 
   53012             : 
   53013           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDatasetValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53014           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53015           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53016           1 :   GDALArgDatasetValueHS *arg2 = (GDALArgDatasetValueHS *) 0 ;
   53017           1 :   void *argp1 = 0 ;
   53018           1 :   int res1 = 0 ;
   53019           1 :   void *argp2 = 0 ;
   53020           1 :   int res2 = 0 ;
   53021           1 :   PyObject *swig_obj[2] ;
   53022           1 :   bool result;
   53023             :   
   53024           1 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDatasetValue", 2, 2, swig_obj)) SWIG_fail;
   53025           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53026           1 :   if (!SWIG_IsOK(res1)) {
   53027           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDatasetValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53028             :   }
   53029           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53030           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   53031           1 :   if (!SWIG_IsOK(res2)) {
   53032           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetAsDatasetValue" "', argument " "2"" of type '" "GDALArgDatasetValueHS *""'"); 
   53033             :   }
   53034           1 :   arg2 = reinterpret_cast< GDALArgDatasetValueHS * >(argp2);
   53035           1 :   {
   53036           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53037           1 :     if ( bLocalUseExceptions ) {
   53038           1 :       pushErrorHandler();
   53039             :     }
   53040           1 :     {
   53041           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53042           1 :       result = (bool)GDALAlgorithmArgHS_SetAsDatasetValue(arg1,arg2);
   53043           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53044             :     }
   53045           1 :     if ( bLocalUseExceptions ) {
   53046           1 :       popErrorHandler();
   53047             :     }
   53048             : #ifndef SED_HACKS
   53049             :     if ( bLocalUseExceptions ) {
   53050             :       CPLErr eclass = CPLGetLastErrorType();
   53051             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53052             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53053             :       }
   53054             :     }
   53055             : #endif
   53056             :   }
   53057           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53058           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53059             :   return resultobj;
   53060             : fail:
   53061             :   return NULL;
   53062             : }
   53063             : 
   53064             : 
   53065         278 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53066         278 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53067         278 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53068         278 :   char **arg2 = (char **) 0 ;
   53069         278 :   void *argp1 = 0 ;
   53070         278 :   int res1 = 0 ;
   53071         278 :   PyObject *swig_obj[2] ;
   53072         278 :   bool result;
   53073             :   
   53074         278 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsStringList", 2, 2, swig_obj)) SWIG_fail;
   53075         278 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53076         278 :   if (!SWIG_IsOK(res1)) {
   53077           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsStringList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53078             :   }
   53079         278 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53080         278 :   {
   53081             :     /* %typemap(in) char **dict */
   53082         278 :     arg2 = NULL;
   53083         278 :     if ( PySequence_Check( swig_obj[1] ) ) {
   53084         278 :       int bErr = FALSE;
   53085         278 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   53086         278 :       if ( bErr )
   53087             :       {
   53088           0 :         SWIG_fail;
   53089             :       }
   53090             :     }
   53091           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   53092           0 :       int bErr = FALSE;
   53093           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   53094           0 :       if ( bErr )
   53095             :       {
   53096           0 :         SWIG_fail;
   53097             :       }
   53098             :     }
   53099             :     else {
   53100           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   53101           0 :       SWIG_fail;
   53102             :     }
   53103             :   }
   53104         278 :   {
   53105         278 :     const int bLocalUseExceptions = GetUseExceptions();
   53106         278 :     if ( bLocalUseExceptions ) {
   53107         278 :       pushErrorHandler();
   53108             :     }
   53109         278 :     {
   53110         278 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53111         278 :       result = (bool)GDALAlgorithmArgHS_SetAsStringList(arg1,arg2);
   53112         278 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53113             :     }
   53114         278 :     if ( bLocalUseExceptions ) {
   53115         278 :       popErrorHandler();
   53116             :     }
   53117             : #ifndef SED_HACKS
   53118             :     if ( bLocalUseExceptions ) {
   53119             :       CPLErr eclass = CPLGetLastErrorType();
   53120             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53121             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53122             :       }
   53123             :     }
   53124             : #endif
   53125             :   }
   53126         278 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53127         278 :   {
   53128             :     /* %typemap(freearg) char **dict */
   53129         278 :     CSLDestroy( arg2 );
   53130             :   }
   53131         298 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53132             :   return resultobj;
   53133           0 : fail:
   53134           0 :   {
   53135             :     /* %typemap(freearg) char **dict */
   53136           0 :     CSLDestroy( arg2 );
   53137             :   }
   53138             :   return NULL;
   53139             : }
   53140             : 
   53141             : 
   53142          54 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53143          54 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53144          54 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53145          54 :   int arg2 ;
   53146          54 :   int *arg3 = (int *) 0 ;
   53147          54 :   void *argp1 = 0 ;
   53148          54 :   int res1 = 0 ;
   53149          54 :   PyObject *swig_obj[2] ;
   53150          54 :   bool result;
   53151             :   
   53152          54 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsIntegerList", 2, 2, swig_obj)) SWIG_fail;
   53153          54 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53154          54 :   if (!SWIG_IsOK(res1)) {
   53155           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsIntegerList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53156             :   }
   53157          54 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53158          54 :   {
   53159             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   53160          54 :     arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
   53161          54 :     if( arg2 < 0 ) {
   53162           2 :       SWIG_fail;
   53163             :     }
   53164             :   }
   53165          52 :   {
   53166          52 :     const int bLocalUseExceptions = GetUseExceptions();
   53167          52 :     if ( bLocalUseExceptions ) {
   53168          52 :       pushErrorHandler();
   53169             :     }
   53170          52 :     {
   53171          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53172          52 :       result = (bool)GDALAlgorithmArgHS_SetAsIntegerList(arg1,arg2,arg3);
   53173          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53174             :     }
   53175          52 :     if ( bLocalUseExceptions ) {
   53176          52 :       popErrorHandler();
   53177             :     }
   53178             : #ifndef SED_HACKS
   53179             :     if ( bLocalUseExceptions ) {
   53180             :       CPLErr eclass = CPLGetLastErrorType();
   53181             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53182             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53183             :       }
   53184             :     }
   53185             : #endif
   53186             :   }
   53187          52 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53188          52 :   {
   53189             :     /* %typemap(freearg) (int nList, int* pList) */
   53190          52 :     free(arg3);
   53191             :   }
   53192          56 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53193             :   return resultobj;
   53194           2 : fail:
   53195           2 :   {
   53196             :     /* %typemap(freearg) (int nList, int* pList) */
   53197           2 :     free(arg3);
   53198             :   }
   53199           2 :   return NULL;
   53200             : }
   53201             : 
   53202             : 
   53203         123 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53204         123 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53205         123 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53206         123 :   int arg2 ;
   53207         123 :   double *arg3 = (double *) 0 ;
   53208         123 :   void *argp1 = 0 ;
   53209         123 :   int res1 = 0 ;
   53210         123 :   PyObject *swig_obj[2] ;
   53211         123 :   bool result;
   53212             :   
   53213         123 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDoubleList", 2, 2, swig_obj)) SWIG_fail;
   53214         123 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53215         123 :   if (!SWIG_IsOK(res1)) {
   53216           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDoubleList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53217             :   }
   53218         123 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53219         123 :   {
   53220             :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   53221         123 :     arg3 = CreateCDoubleListFromSequence(swig_obj[1], &arg2);
   53222         123 :     if( arg2 < 0 ) {
   53223           2 :       SWIG_fail;
   53224             :     }
   53225             :   }
   53226         121 :   {
   53227         121 :     const int bLocalUseExceptions = GetUseExceptions();
   53228         121 :     if ( bLocalUseExceptions ) {
   53229         121 :       pushErrorHandler();
   53230             :     }
   53231         121 :     {
   53232         121 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53233         121 :       result = (bool)GDALAlgorithmArgHS_SetAsDoubleList(arg1,arg2,arg3);
   53234         121 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53235             :     }
   53236         121 :     if ( bLocalUseExceptions ) {
   53237         121 :       popErrorHandler();
   53238             :     }
   53239             : #ifndef SED_HACKS
   53240             :     if ( bLocalUseExceptions ) {
   53241             :       CPLErr eclass = CPLGetLastErrorType();
   53242             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53243             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53244             :       }
   53245             :     }
   53246             : #endif
   53247             :   }
   53248         121 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53249         121 :   {
   53250             :     /* %typemap(freearg) (int nList, double* pList) */
   53251         121 :     free(arg3);
   53252             :   }
   53253         125 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53254             :   return resultobj;
   53255           2 : fail:
   53256           2 :   {
   53257             :     /* %typemap(freearg) (int nList, double* pList) */
   53258           2 :     free(arg3);
   53259             :   }
   53260           2 :   return NULL;
   53261             : }
   53262             : 
   53263             : 
   53264           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53265           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53266           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53267           1 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   53268           1 :   void *argp1 = 0 ;
   53269           1 :   int res1 = 0 ;
   53270           1 :   void *argp2 = 0 ;
   53271           1 :   int res2 = 0 ;
   53272           1 :   PyObject *swig_obj[2] ;
   53273           1 :   bool result;
   53274             :   
   53275           1 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDataset", 2, 2, swig_obj)) SWIG_fail;
   53276           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53277           1 :   if (!SWIG_IsOK(res1)) {
   53278           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDataset" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53279             :   }
   53280           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53281           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   53282           1 :   if (!SWIG_IsOK(res2)) {
   53283           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetDataset" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   53284             :   }
   53285           1 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   53286           1 :   {
   53287           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53288           1 :     if ( bLocalUseExceptions ) {
   53289           1 :       pushErrorHandler();
   53290             :     }
   53291           1 :     {
   53292           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53293           1 :       result = (bool)GDALAlgorithmArgHS_SetDataset(arg1,arg2);
   53294           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53295             :     }
   53296           1 :     if ( bLocalUseExceptions ) {
   53297           1 :       popErrorHandler();
   53298             :     }
   53299             : #ifndef SED_HACKS
   53300             :     if ( bLocalUseExceptions ) {
   53301             :       CPLErr eclass = CPLGetLastErrorType();
   53302             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53303             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53304             :       }
   53305             :     }
   53306             : #endif
   53307             :   }
   53308           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53309           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53310             :   return resultobj;
   53311             : fail:
   53312             :   return NULL;
   53313             : }
   53314             : 
   53315             : 
   53316         143 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDatasets(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53317         143 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53318         143 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53319         143 :   int arg2 ;
   53320         143 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   53321         143 :   void *argp1 = 0 ;
   53322         143 :   int res1 = 0 ;
   53323         143 :   PyObject *swig_obj[2] ;
   53324         143 :   bool result;
   53325             :   
   53326         143 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDatasets", 2, 2, swig_obj)) SWIG_fail;
   53327         143 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53328         143 :   if (!SWIG_IsOK(res1)) {
   53329           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDatasets" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53330             :   }
   53331         143 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53332         143 :   {
   53333             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   53334         143 :     if ( !PySequence_Check(swig_obj[1]) ) {
   53335           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   53336           0 :       SWIG_fail;
   53337             :     }
   53338         143 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   53339         143 :     if( size > (Py_ssize_t)INT_MAX ) {
   53340           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   53341           0 :       SWIG_fail;
   53342             :     }
   53343         143 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   53344           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   53345           0 :       SWIG_fail;
   53346             :     }
   53347         143 :     arg2 = (int)size;
   53348         143 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   53349         143 :     if( !arg3) {
   53350           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   53351           0 :       SWIG_fail;
   53352             :     }
   53353             :     
   53354         309 :     for( int i = 0; i<arg2; i++ ) {
   53355         166 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   53356         166 :       GDALDatasetShadow* rawobjectpointer = NULL;
   53357         166 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   53358         166 :       if (!rawobjectpointer) {
   53359           0 :         Py_DECREF(o);
   53360           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   53361           0 :         SWIG_fail;
   53362             :       }
   53363         166 :       arg3[i] = rawobjectpointer;
   53364         166 :       Py_DECREF(o);
   53365             :       
   53366             :     }
   53367             :   }
   53368         143 :   {
   53369         143 :     const int bLocalUseExceptions = GetUseExceptions();
   53370         143 :     if ( bLocalUseExceptions ) {
   53371         143 :       pushErrorHandler();
   53372             :     }
   53373         143 :     {
   53374         143 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53375         143 :       result = (bool)GDALAlgorithmArgHS_SetDatasets(arg1,arg2,arg3);
   53376         143 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53377             :     }
   53378         143 :     if ( bLocalUseExceptions ) {
   53379         143 :       popErrorHandler();
   53380             :     }
   53381             : #ifndef SED_HACKS
   53382             :     if ( bLocalUseExceptions ) {
   53383             :       CPLErr eclass = CPLGetLastErrorType();
   53384             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53385             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53386             :       }
   53387             :     }
   53388             : #endif
   53389             :   }
   53390         143 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53391         143 :   {
   53392             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   53393         143 :     CPLFree( arg3 );
   53394             :   }
   53395         143 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53396             :   return resultobj;
   53397           0 : fail:
   53398           0 :   {
   53399             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   53400           0 :     CPLFree( arg3 );
   53401             :   }
   53402             :   return NULL;
   53403             : }
   53404             : 
   53405             : 
   53406          84 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDatasetNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53407          84 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53408          84 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53409          84 :   char **arg2 = (char **) 0 ;
   53410          84 :   void *argp1 = 0 ;
   53411          84 :   int res1 = 0 ;
   53412          84 :   PyObject *swig_obj[2] ;
   53413          84 :   bool result;
   53414             :   
   53415          84 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDatasetNames", 2, 2, swig_obj)) SWIG_fail;
   53416          84 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53417          84 :   if (!SWIG_IsOK(res1)) {
   53418           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDatasetNames" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53419             :   }
   53420          84 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53421          84 :   {
   53422             :     /* %typemap(in) char **dict */
   53423          84 :     arg2 = NULL;
   53424          84 :     if ( PySequence_Check( swig_obj[1] ) ) {
   53425          84 :       int bErr = FALSE;
   53426          84 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   53427          84 :       if ( bErr )
   53428             :       {
   53429           0 :         SWIG_fail;
   53430             :       }
   53431             :     }
   53432           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   53433           0 :       int bErr = FALSE;
   53434           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   53435           0 :       if ( bErr )
   53436             :       {
   53437           0 :         SWIG_fail;
   53438             :       }
   53439             :     }
   53440             :     else {
   53441           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   53442           0 :       SWIG_fail;
   53443             :     }
   53444             :   }
   53445          84 :   {
   53446          84 :     const int bLocalUseExceptions = GetUseExceptions();
   53447          84 :     if ( bLocalUseExceptions ) {
   53448          84 :       pushErrorHandler();
   53449             :     }
   53450          84 :     {
   53451          84 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53452          84 :       result = (bool)GDALAlgorithmArgHS_SetDatasetNames(arg1,arg2);
   53453          84 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53454             :     }
   53455          84 :     if ( bLocalUseExceptions ) {
   53456          84 :       popErrorHandler();
   53457             :     }
   53458             : #ifndef SED_HACKS
   53459             :     if ( bLocalUseExceptions ) {
   53460             :       CPLErr eclass = CPLGetLastErrorType();
   53461             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53462             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53463             :       }
   53464             :     }
   53465             : #endif
   53466             :   }
   53467          84 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53468          84 :   {
   53469             :     /* %typemap(freearg) char **dict */
   53470          84 :     CSLDestroy( arg2 );
   53471             :   }
   53472          84 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53473             :   return resultobj;
   53474           0 : fail:
   53475           0 :   {
   53476             :     /* %typemap(freearg) char **dict */
   53477           0 :     CSLDestroy( arg2 );
   53478             :   }
   53479             :   return NULL;
   53480             : }
   53481             : 
   53482             : 
   53483         276 : SWIGINTERN PyObject *AlgorithmArg_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53484         276 :   PyObject *obj;
   53485         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   53486         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_NewClientData(obj));
   53487         276 :   return SWIG_Py_Void();
   53488             : }
   53489             : 
   53490        3329 : SWIGINTERN PyObject *_wrap_delete_Algorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53491        3329 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53492        3329 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   53493        3329 :   void *argp1 = 0 ;
   53494        3329 :   int res1 = 0 ;
   53495        3329 :   PyObject *swig_obj[1] ;
   53496             :   
   53497        3329 :   if (!args) SWIG_fail;
   53498        3329 :   swig_obj[0] = args;
   53499        3329 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_DISOWN |  0 );
   53500        3329 :   if (!SWIG_IsOK(res1)) {
   53501           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Algorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   53502             :   }
   53503        3329 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   53504        3329 :   {
   53505        3329 :     const int bLocalUseExceptions = GetUseExceptions();
   53506        3329 :     if ( bLocalUseExceptions ) {
   53507        3326 :       pushErrorHandler();
   53508             :     }
   53509        3329 :     {
   53510        3329 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53511        3329 :       delete_GDALAlgorithmHS(arg1);
   53512        3329 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53513             :     }
   53514        3329 :     if ( bLocalUseExceptions ) {
   53515        3326 :       popErrorHandler();
   53516             :     }
   53517             : #ifndef SED_HACKS
   53518             :     if ( bLocalUseExceptions ) {
   53519             :       CPLErr eclass = CPLGetLastErrorType();
   53520             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53521             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53522             :       }
   53523             :     }
   53524             : #endif
   53525             :   }
   53526        3329 :   resultobj = SWIG_Py_Void();
   53527        3329 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53528             :   return resultobj;
   53529             : fail:
   53530             :   return NULL;
   53531             : }
   53532             : 
   53533             : 
   53534          32 : SWIGINTERN PyObject *_wrap_Algorithm_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53535          32 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53536          32 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   53537          32 :   void *argp1 = 0 ;
   53538          32 :   int res1 = 0 ;
   53539          32 :   PyObject *swig_obj[1] ;
   53540          32 :   char *result = 0 ;
   53541             :   
   53542          32 :   if (!args) SWIG_fail;
   53543          32 :   swig_obj[0] = args;
   53544          32 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   53545          32 :   if (!SWIG_IsOK(res1)) {
   53546           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetName" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   53547             :   }
   53548          32 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   53549          32 :   {
   53550          32 :     const int bLocalUseExceptions = GetUseExceptions();
   53551          32 :     if ( bLocalUseExceptions ) {
   53552          32 :       pushErrorHandler();
   53553             :     }
   53554          32 :     {
   53555          32 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53556          32 :       result = (char *)GDALAlgorithmHS_GetName(arg1);
   53557          32 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53558             :     }
   53559          32 :     if ( bLocalUseExceptions ) {
   53560          32 :       popErrorHandler();
   53561             :     }
   53562             : #ifndef SED_HACKS
   53563             :     if ( bLocalUseExceptions ) {
   53564             :       CPLErr eclass = CPLGetLastErrorType();
   53565             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53566             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53567             :       }
   53568             :     }
   53569             : #endif
   53570             :   }
   53571          32 :   resultobj = SWIG_FromCharPtr((const char *)result);
   53572          32 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53573             :   return resultobj;
   53574             : fail:
   53575             :   return NULL;
   53576             : }
   53577             : 
   53578             : 
   53579           1 : SWIGINTERN PyObject *_wrap_Algorithm_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53580           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53581           1 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   53582           1 :   void *argp1 = 0 ;
   53583           1 :   int res1 = 0 ;
   53584           1 :   PyObject *swig_obj[1] ;
   53585           1 :   char *result = 0 ;
   53586             :   
   53587           1 :   if (!args) SWIG_fail;
   53588           1 :   swig_obj[0] = args;
   53589           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   53590           1 :   if (!SWIG_IsOK(res1)) {
   53591           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetDescription" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   53592             :   }
   53593           1 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   53594           1 :   {
   53595           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53596           1 :     if ( bLocalUseExceptions ) {
   53597           1 :       pushErrorHandler();
   53598             :     }
   53599           1 :     {
   53600           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53601           1 :       result = (char *)GDALAlgorithmHS_GetDescription(arg1);
   53602           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53603             :     }
   53604           1 :     if ( bLocalUseExceptions ) {
   53605           1 :       popErrorHandler();
   53606             :     }
   53607             : #ifndef SED_HACKS
   53608             :     if ( bLocalUseExceptions ) {
   53609             :       CPLErr eclass = CPLGetLastErrorType();
   53610             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53611             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53612             :       }
   53613             :     }
   53614             : #endif
   53615             :   }
   53616           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   53617           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53618             :   return resultobj;
   53619             : fail:
   53620             :   return NULL;
   53621             : }
   53622             : 
   53623             : 
   53624           1 : SWIGINTERN PyObject *_wrap_Algorithm_GetLongDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53625           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53626           1 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   53627           1 :   void *argp1 = 0 ;
   53628           1 :   int res1 = 0 ;
   53629           1 :   PyObject *swig_obj[1] ;
   53630           1 :   char *result = 0 ;
   53631             :   
   53632           1 :   if (!args) SWIG_fail;
   53633           1 :   swig_obj[0] = args;
   53634           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   53635           1 :   if (!SWIG_IsOK(res1)) {
   53636           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetLongDescription" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   53637             :   }
   53638           1 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   53639           1 :   {
   53640           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53641           1 :     if ( bLocalUseExceptions ) {
   53642           1 :       pushErrorHandler();
   53643             :     }
   53644           1 :     {
   53645           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53646           1 :       result = (char *)GDALAlgorithmHS_GetLongDescription(arg1);
   53647           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53648             :     }
   53649           1 :     if ( bLocalUseExceptions ) {
   53650           1 :       popErrorHandler();
   53651             :     }
   53652             : #ifndef SED_HACKS
   53653             :     if ( bLocalUseExceptions ) {
   53654             :       CPLErr eclass = CPLGetLastErrorType();
   53655             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53656             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53657             :       }
   53658             :     }
   53659             : #endif
   53660             :   }
   53661           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   53662           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53663             :   return resultobj;
   53664             : fail:
   53665             :   return NULL;
   53666             : }
   53667             : 
   53668             : 
   53669           1 : SWIGINTERN PyObject *_wrap_Algorithm_GetHelpFullURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53670           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53671           1 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   53672           1 :   void *argp1 = 0 ;
   53673           1 :   int res1 = 0 ;
   53674           1 :   PyObject *swig_obj[1] ;
   53675           1 :   char *result = 0 ;
   53676             :   
   53677           1 :   if (!args) SWIG_fail;
   53678           1 :   swig_obj[0] = args;
   53679           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   53680           1 :   if (!SWIG_IsOK(res1)) {
   53681           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetHelpFullURL" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   53682             :   }
   53683           1 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   53684           1 :   {
   53685           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53686           1 :     if ( bLocalUseExceptions ) {
   53687           1 :       pushErrorHandler();
   53688             :     }
   53689           1 :     {
   53690           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53691           1 :       result = (char *)GDALAlgorithmHS_GetHelpFullURL(arg1);
   53692           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53693             :     }
   53694           1 :     if ( bLocalUseExceptions ) {
   53695           1 :       popErrorHandler();
   53696             :     }
   53697             : #ifndef SED_HACKS
   53698             :     if ( bLocalUseExceptions ) {
   53699             :       CPLErr eclass = CPLGetLastErrorType();
   53700             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53701             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53702             :       }
   53703             :     }
   53704             : #endif
   53705             :   }
   53706           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   53707           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53708             :   return resultobj;
   53709             : fail:
   53710             :   return NULL;
   53711             : }
   53712             : 
   53713             : 
   53714        1830 : SWIGINTERN PyObject *_wrap_Algorithm_HasSubAlgorithms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53715        1830 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53716        1830 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   53717        1830 :   void *argp1 = 0 ;
   53718        1830 :   int res1 = 0 ;
   53719        1830 :   PyObject *swig_obj[1] ;
   53720        1830 :   bool result;
   53721             :   
   53722        1830 :   if (!args) SWIG_fail;
   53723        1830 :   swig_obj[0] = args;
   53724        1830 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   53725        1830 :   if (!SWIG_IsOK(res1)) {
   53726           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_HasSubAlgorithms" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   53727             :   }
   53728        1830 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   53729        1830 :   {
   53730        1830 :     const int bLocalUseExceptions = GetUseExceptions();
   53731        1830 :     if ( bLocalUseExceptions ) {
   53732        1830 :       pushErrorHandler();
   53733             :     }
   53734        1830 :     {
   53735        1830 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53736        1830 :       result = (bool)GDALAlgorithmHS_HasSubAlgorithms(arg1);
   53737        1830 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53738             :     }
   53739        1830 :     if ( bLocalUseExceptions ) {
   53740        1830 :       popErrorHandler();
   53741             :     }
   53742             : #ifndef SED_HACKS
   53743             :     if ( bLocalUseExceptions ) {
   53744             :       CPLErr eclass = CPLGetLastErrorType();
   53745             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53746             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53747             :       }
   53748             :     }
   53749             : #endif
   53750             :   }
   53751        1830 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53752        1830 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53753             :   return resultobj;
   53754             : fail:
   53755             :   return NULL;
   53756             : }
   53757             : 
   53758             : 
   53759           6 : SWIGINTERN PyObject *_wrap_Algorithm_GetSubAlgorithmNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53760           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53761           6 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   53762           6 :   void *argp1 = 0 ;
   53763           6 :   int res1 = 0 ;
   53764           6 :   PyObject *swig_obj[1] ;
   53765           6 :   char **result = 0 ;
   53766             :   
   53767           6 :   if (!args) SWIG_fail;
   53768           6 :   swig_obj[0] = args;
   53769           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   53770           6 :   if (!SWIG_IsOK(res1)) {
   53771           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetSubAlgorithmNames" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   53772             :   }
   53773           6 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   53774           6 :   {
   53775           6 :     const int bLocalUseExceptions = GetUseExceptions();
   53776           6 :     if ( bLocalUseExceptions ) {
   53777           6 :       pushErrorHandler();
   53778             :     }
   53779           6 :     {
   53780           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53781           6 :       result = (char **)GDALAlgorithmHS_GetSubAlgorithmNames(arg1);
   53782           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53783             :     }
   53784           6 :     if ( bLocalUseExceptions ) {
   53785           6 :       popErrorHandler();
   53786             :     }
   53787             : #ifndef SED_HACKS
   53788             :     if ( bLocalUseExceptions ) {
   53789             :       CPLErr eclass = CPLGetLastErrorType();
   53790             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53791             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53792             :       }
   53793             :     }
   53794             : #endif
   53795             :   }
   53796           6 :   {
   53797             :     /* %typemap(out) char **CSL -> ( string ) */
   53798           6 :     bool bErr = false;
   53799           6 :     resultobj = CSLToList(result, &bErr);
   53800           6 :     CSLDestroy(result);
   53801           6 :     if( bErr ) {
   53802           0 :       SWIG_fail;
   53803             :     }
   53804             :   }
   53805           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53806             :   return resultobj;
   53807             : fail:
   53808             :   return NULL;
   53809             : }
   53810             : 
   53811             : 
   53812        1498 : SWIGINTERN PyObject *_wrap_Algorithm_InstantiateSubAlgorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53813        1498 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53814        1498 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   53815        1498 :   char *arg2 = (char *) 0 ;
   53816        1498 :   void *argp1 = 0 ;
   53817        1498 :   int res1 = 0 ;
   53818        1498 :   int res2 ;
   53819        1498 :   char *buf2 = 0 ;
   53820        1498 :   int alloc2 = 0 ;
   53821        1498 :   PyObject *swig_obj[2] ;
   53822        1498 :   GDALAlgorithmHS *result = 0 ;
   53823             :   
   53824        1498 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_InstantiateSubAlgorithm", 2, 2, swig_obj)) SWIG_fail;
   53825        1498 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   53826        1498 :   if (!SWIG_IsOK(res1)) {
   53827           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_InstantiateSubAlgorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   53828             :   }
   53829        1498 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   53830        1498 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   53831        1498 :   if (!SWIG_IsOK(res2)) {
   53832           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Algorithm_InstantiateSubAlgorithm" "', argument " "2"" of type '" "char const *""'");
   53833             :   }
   53834        1498 :   arg2 = reinterpret_cast< char * >(buf2);
   53835        1498 :   {
   53836        1498 :     if (!arg2) {
   53837           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   53838             :     }
   53839             :   }
   53840        1497 :   {
   53841        1497 :     const int bLocalUseExceptions = GetUseExceptions();
   53842        1497 :     if ( bLocalUseExceptions ) {
   53843        1497 :       pushErrorHandler();
   53844             :     }
   53845        1497 :     {
   53846        1497 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53847        1497 :       result = (GDALAlgorithmHS *)GDALAlgorithmHS_InstantiateSubAlgorithm(arg1,(char const *)arg2);
   53848        1497 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53849             :     }
   53850        1497 :     if ( bLocalUseExceptions ) {
   53851        1497 :       popErrorHandler();
   53852             :     }
   53853             : #ifndef SED_HACKS
   53854             :     if ( bLocalUseExceptions ) {
   53855             :       CPLErr eclass = CPLGetLastErrorType();
   53856             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53857             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53858             :       }
   53859             :     }
   53860             : #endif
   53861             :   }
   53862        1497 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
   53863        1497 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   53864        1498 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53865             :   return resultobj;
   53866           1 : fail:
   53867           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   53868             :   return NULL;
   53869             : }
   53870             : 
   53871             : 
   53872          47 : SWIGINTERN PyObject *_wrap_Algorithm_ParseCommandLineArguments(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53873          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53874          47 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   53875          47 :   char **arg2 = (char **) 0 ;
   53876          47 :   void *argp1 = 0 ;
   53877          47 :   int res1 = 0 ;
   53878          47 :   PyObject *swig_obj[2] ;
   53879          47 :   bool result;
   53880             :   
   53881          47 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_ParseCommandLineArguments", 2, 2, swig_obj)) SWIG_fail;
   53882          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   53883          47 :   if (!SWIG_IsOK(res1)) {
   53884           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_ParseCommandLineArguments" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   53885             :   }
   53886          47 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   53887          47 :   {
   53888             :     /* %typemap(in) char **dict */
   53889          47 :     arg2 = NULL;
   53890          47 :     if ( PySequence_Check( swig_obj[1] ) ) {
   53891          47 :       int bErr = FALSE;
   53892          47 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   53893          47 :       if ( bErr )
   53894             :       {
   53895           0 :         SWIG_fail;
   53896             :       }
   53897             :     }
   53898           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   53899           0 :       int bErr = FALSE;
   53900           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   53901           0 :       if ( bErr )
   53902             :       {
   53903           0 :         SWIG_fail;
   53904             :       }
   53905             :     }
   53906             :     else {
   53907           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   53908           0 :       SWIG_fail;
   53909             :     }
   53910             :   }
   53911          47 :   {
   53912          47 :     const int bLocalUseExceptions = GetUseExceptions();
   53913          47 :     if ( bLocalUseExceptions ) {
   53914          47 :       pushErrorHandler();
   53915             :     }
   53916          47 :     {
   53917          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53918          47 :       result = (bool)GDALAlgorithmHS_ParseCommandLineArguments(arg1,arg2);
   53919          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53920             :     }
   53921          47 :     if ( bLocalUseExceptions ) {
   53922          47 :       popErrorHandler();
   53923             :     }
   53924             : #ifndef SED_HACKS
   53925             :     if ( bLocalUseExceptions ) {
   53926             :       CPLErr eclass = CPLGetLastErrorType();
   53927             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53928             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53929             :       }
   53930             :     }
   53931             : #endif
   53932             :   }
   53933          47 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53934          47 :   {
   53935             :     /* %typemap(freearg) char **dict */
   53936          47 :     CSLDestroy( arg2 );
   53937             :   }
   53938          49 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53939             :   return resultobj;
   53940           0 : fail:
   53941           0 :   {
   53942             :     /* %typemap(freearg) char **dict */
   53943           0 :     CSLDestroy( arg2 );
   53944             :   }
   53945             :   return NULL;
   53946             : }
   53947             : 
   53948             : 
   53949         486 : SWIGINTERN PyObject *_wrap_Algorithm_GetActualAlgorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53950         486 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53951         486 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   53952         486 :   void *argp1 = 0 ;
   53953         486 :   int res1 = 0 ;
   53954         486 :   PyObject *swig_obj[1] ;
   53955         486 :   GDALAlgorithmHS *result = 0 ;
   53956             :   
   53957         486 :   if (!args) SWIG_fail;
   53958         486 :   swig_obj[0] = args;
   53959         486 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   53960         486 :   if (!SWIG_IsOK(res1)) {
   53961           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetActualAlgorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   53962             :   }
   53963         486 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   53964         486 :   {
   53965         486 :     const int bLocalUseExceptions = GetUseExceptions();
   53966         486 :     if ( bLocalUseExceptions ) {
   53967         486 :       pushErrorHandler();
   53968             :     }
   53969         486 :     {
   53970         486 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53971         486 :       result = (GDALAlgorithmHS *)GDALAlgorithmHS_GetActualAlgorithm(arg1);
   53972         486 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53973             :     }
   53974         486 :     if ( bLocalUseExceptions ) {
   53975         486 :       popErrorHandler();
   53976             :     }
   53977             : #ifndef SED_HACKS
   53978             :     if ( bLocalUseExceptions ) {
   53979             :       CPLErr eclass = CPLGetLastErrorType();
   53980             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53981             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53982             :       }
   53983             :     }
   53984             : #endif
   53985             :   }
   53986         486 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
   53987         486 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53988             :   return resultobj;
   53989             : fail:
   53990             :   return NULL;
   53991             : }
   53992             : 
   53993             : 
   53994        1081 : SWIGINTERN PyObject *_wrap_Algorithm_Run(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53995        1081 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53996        1081 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   53997        1081 :   GDALProgressFunc arg2 = (GDALProgressFunc) NULL ;
   53998        1081 :   void *arg3 = (void *) NULL ;
   53999        1081 :   void *argp1 = 0 ;
   54000        1081 :   int res1 = 0 ;
   54001        1081 :   PyObject *swig_obj[3] ;
   54002        1081 :   bool result;
   54003             :   
   54004             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   54005        1081 :   PyProgressData *psProgressInfo;
   54006        1081 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   54007        1081 :   psProgressInfo->nLastReported = -1;
   54008        1081 :   psProgressInfo->psPyCallback = NULL;
   54009        1081 :   psProgressInfo->psPyCallbackData = NULL;
   54010        1081 :   arg3 = psProgressInfo;
   54011        1081 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_Run", 1, 3, swig_obj)) SWIG_fail;
   54012        1081 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   54013        1081 :   if (!SWIG_IsOK(res1)) {
   54014           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_Run" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54015             :   }
   54016        1081 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54017        1081 :   if (swig_obj[1]) {
   54018         221 :     {
   54019             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   54020             :       /* callback_func typemap */
   54021             :       
   54022             :       /* In some cases 0 is passed instead of None. */
   54023             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   54024         221 :       if ( PyLong_Check(swig_obj[1]) || PyInt_Check(swig_obj[1]) )
   54025             :       {
   54026           0 :         if( PyLong_AsLong(swig_obj[1]) == 0 )
   54027             :         {
   54028           0 :           swig_obj[1] = Py_None;
   54029             :         }
   54030             :       }
   54031             :       
   54032         221 :       if (swig_obj[1] && swig_obj[1] != Py_None ) {
   54033          44 :         void* cbfunction = NULL;
   54034          44 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[1],
   54035             :             (void**)&cbfunction,
   54036             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   54037             :             SWIG_POINTER_EXCEPTION | 0 ));
   54038             :         
   54039          44 :         if ( cbfunction == GDALTermProgress ) {
   54040             :           arg2 = GDALTermProgress;
   54041             :         } else {
   54042          44 :           if (!PyCallable_Check(swig_obj[1])) {
   54043           0 :             PyErr_SetString( PyExc_RuntimeError,
   54044             :               "Object given is not a Python function" );
   54045           0 :             SWIG_fail;
   54046             :           }
   54047          44 :           psProgressInfo->psPyCallback = swig_obj[1];
   54048          44 :           arg2 = PyProgressProxy;
   54049             :         }
   54050             :         
   54051             :       }
   54052             :       
   54053             :     }
   54054             :   }
   54055        1081 :   if (swig_obj[2]) {
   54056           0 :     {
   54057             :       /* %typemap(in) ( void* callback_data=NULL)  */
   54058           0 :       psProgressInfo->psPyCallbackData = swig_obj[2] ;
   54059             :     }
   54060             :   }
   54061        1081 :   {
   54062        1081 :     const int bLocalUseExceptions = GetUseExceptions();
   54063        1081 :     if ( bLocalUseExceptions ) {
   54064        1079 :       pushErrorHandler();
   54065             :     }
   54066        1081 :     {
   54067        1081 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54068        1081 :       result = (bool)GDALAlgorithmHS_Run(arg1,arg2,arg3);
   54069        1081 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54070             :     }
   54071        1081 :     if ( bLocalUseExceptions ) {
   54072        1079 :       popErrorHandler();
   54073             :     }
   54074             : #ifndef SED_HACKS
   54075             :     if ( bLocalUseExceptions ) {
   54076             :       CPLErr eclass = CPLGetLastErrorType();
   54077             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54078             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54079             :       }
   54080             :     }
   54081             : #endif
   54082             :   }
   54083        1081 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54084        1081 :   {
   54085             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   54086             :     
   54087        1081 :     CPLFree(psProgressInfo);
   54088             :     
   54089             :   }
   54090        1705 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54091             :   return resultobj;
   54092           0 : fail:
   54093           0 :   {
   54094             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   54095             :     
   54096           0 :     CPLFree(psProgressInfo);
   54097             :     
   54098             :   }
   54099             :   return NULL;
   54100             : }
   54101             : 
   54102             : 
   54103         190 : SWIGINTERN PyObject *_wrap_Algorithm_Finalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54104         190 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54105         190 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   54106         190 :   void *argp1 = 0 ;
   54107         190 :   int res1 = 0 ;
   54108         190 :   PyObject *swig_obj[1] ;
   54109         190 :   bool result;
   54110             :   
   54111         190 :   if (!args) SWIG_fail;
   54112         190 :   swig_obj[0] = args;
   54113         190 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   54114         190 :   if (!SWIG_IsOK(res1)) {
   54115           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_Finalize" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54116             :   }
   54117         190 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54118         190 :   {
   54119         190 :     const int bLocalUseExceptions = GetUseExceptions();
   54120         190 :     if ( bLocalUseExceptions ) {
   54121         190 :       pushErrorHandler();
   54122             :     }
   54123         190 :     {
   54124         190 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54125         190 :       result = (bool)GDALAlgorithmHS_Finalize(arg1);
   54126         190 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54127             :     }
   54128         190 :     if ( bLocalUseExceptions ) {
   54129         190 :       popErrorHandler();
   54130             :     }
   54131             : #ifndef SED_HACKS
   54132             :     if ( bLocalUseExceptions ) {
   54133             :       CPLErr eclass = CPLGetLastErrorType();
   54134             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54135             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54136             :       }
   54137             :     }
   54138             : #endif
   54139             :   }
   54140         190 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54141         190 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54142             :   return resultobj;
   54143             : fail:
   54144             :   return NULL;
   54145             : }
   54146             : 
   54147             : 
   54148         238 : SWIGINTERN PyObject *_wrap_Algorithm_ParseRunAndFinalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54149         238 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54150         238 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   54151         238 :   char **arg2 = (char **) 0 ;
   54152         238 :   GDALProgressFunc arg3 = (GDALProgressFunc) NULL ;
   54153         238 :   void *arg4 = (void *) NULL ;
   54154         238 :   void *argp1 = 0 ;
   54155         238 :   int res1 = 0 ;
   54156         238 :   PyObject *swig_obj[4] ;
   54157         238 :   bool result;
   54158             :   
   54159             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   54160         238 :   PyProgressData *psProgressInfo;
   54161         238 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   54162         238 :   psProgressInfo->nLastReported = -1;
   54163         238 :   psProgressInfo->psPyCallback = NULL;
   54164         238 :   psProgressInfo->psPyCallbackData = NULL;
   54165         238 :   arg4 = psProgressInfo;
   54166         238 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_ParseRunAndFinalize", 2, 4, swig_obj)) SWIG_fail;
   54167         238 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   54168         238 :   if (!SWIG_IsOK(res1)) {
   54169           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_ParseRunAndFinalize" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54170             :   }
   54171         238 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54172         238 :   {
   54173             :     /* %typemap(in) char **dict */
   54174         238 :     arg2 = NULL;
   54175         238 :     if ( PySequence_Check( swig_obj[1] ) ) {
   54176         238 :       int bErr = FALSE;
   54177         238 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   54178         238 :       if ( bErr )
   54179             :       {
   54180           0 :         SWIG_fail;
   54181             :       }
   54182             :     }
   54183           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   54184           0 :       int bErr = FALSE;
   54185           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   54186           0 :       if ( bErr )
   54187             :       {
   54188           0 :         SWIG_fail;
   54189             :       }
   54190             :     }
   54191             :     else {
   54192           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   54193           0 :       SWIG_fail;
   54194             :     }
   54195             :   }
   54196         238 :   if (swig_obj[2]) {
   54197          11 :     {
   54198             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   54199             :       /* callback_func typemap */
   54200             :       
   54201             :       /* In some cases 0 is passed instead of None. */
   54202             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   54203          11 :       if ( PyLong_Check(swig_obj[2]) || PyInt_Check(swig_obj[2]) )
   54204             :       {
   54205           0 :         if( PyLong_AsLong(swig_obj[2]) == 0 )
   54206             :         {
   54207           0 :           swig_obj[2] = Py_None;
   54208             :         }
   54209             :       }
   54210             :       
   54211          11 :       if (swig_obj[2] && swig_obj[2] != Py_None ) {
   54212          11 :         void* cbfunction = NULL;
   54213          11 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[2],
   54214             :             (void**)&cbfunction,
   54215             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   54216             :             SWIG_POINTER_EXCEPTION | 0 ));
   54217             :         
   54218          11 :         if ( cbfunction == GDALTermProgress ) {
   54219             :           arg3 = GDALTermProgress;
   54220             :         } else {
   54221          11 :           if (!PyCallable_Check(swig_obj[2])) {
   54222           0 :             PyErr_SetString( PyExc_RuntimeError,
   54223             :               "Object given is not a Python function" );
   54224           0 :             SWIG_fail;
   54225             :           }
   54226          11 :           psProgressInfo->psPyCallback = swig_obj[2];
   54227          11 :           arg3 = PyProgressProxy;
   54228             :         }
   54229             :         
   54230             :       }
   54231             :       
   54232             :     }
   54233             :   }
   54234         238 :   if (swig_obj[3]) {
   54235           0 :     {
   54236             :       /* %typemap(in) ( void* callback_data=NULL)  */
   54237           0 :       psProgressInfo->psPyCallbackData = swig_obj[3] ;
   54238             :     }
   54239             :   }
   54240         238 :   {
   54241         238 :     const int bLocalUseExceptions = GetUseExceptions();
   54242         238 :     if ( bLocalUseExceptions ) {
   54243         238 :       pushErrorHandler();
   54244             :     }
   54245         238 :     {
   54246         238 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54247         238 :       result = (bool)GDALAlgorithmHS_ParseRunAndFinalize(arg1,arg2,arg3,arg4);
   54248         238 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54249             :     }
   54250         238 :     if ( bLocalUseExceptions ) {
   54251         238 :       popErrorHandler();
   54252             :     }
   54253             : #ifndef SED_HACKS
   54254             :     if ( bLocalUseExceptions ) {
   54255             :       CPLErr eclass = CPLGetLastErrorType();
   54256             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54257             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54258             :       }
   54259             :     }
   54260             : #endif
   54261             :   }
   54262         238 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54263         238 :   {
   54264             :     /* %typemap(freearg) char **dict */
   54265         238 :     CSLDestroy( arg2 );
   54266             :   }
   54267         238 :   {
   54268             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   54269             :     
   54270         238 :     CPLFree(psProgressInfo);
   54271             :     
   54272             :   }
   54273         396 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54274             :   return resultobj;
   54275           0 : fail:
   54276           0 :   {
   54277             :     /* %typemap(freearg) char **dict */
   54278           0 :     CSLDestroy( arg2 );
   54279             :   }
   54280           0 :   {
   54281             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   54282             :     
   54283           0 :     CPLFree(psProgressInfo);
   54284             :     
   54285             :   }
   54286             :   return NULL;
   54287             : }
   54288             : 
   54289             : 
   54290           3 : SWIGINTERN PyObject *_wrap_Algorithm_GetUsageAsJSON(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54291           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54292           3 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   54293           3 :   void *argp1 = 0 ;
   54294           3 :   int res1 = 0 ;
   54295           3 :   PyObject *swig_obj[1] ;
   54296           3 :   retStringAndCPLFree *result = 0 ;
   54297             :   
   54298           3 :   if (!args) SWIG_fail;
   54299           3 :   swig_obj[0] = args;
   54300           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   54301           3 :   if (!SWIG_IsOK(res1)) {
   54302           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetUsageAsJSON" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54303             :   }
   54304           3 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54305           3 :   {
   54306           3 :     const int bLocalUseExceptions = GetUseExceptions();
   54307           3 :     if ( bLocalUseExceptions ) {
   54308           3 :       pushErrorHandler();
   54309             :     }
   54310           3 :     {
   54311           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54312           3 :       result = (retStringAndCPLFree *)GDALAlgorithmHS_GetUsageAsJSON(arg1);
   54313           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54314             :     }
   54315           3 :     if ( bLocalUseExceptions ) {
   54316           3 :       popErrorHandler();
   54317             :     }
   54318             : #ifndef SED_HACKS
   54319             :     if ( bLocalUseExceptions ) {
   54320             :       CPLErr eclass = CPLGetLastErrorType();
   54321             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54322             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54323             :       }
   54324             :     }
   54325             : #endif
   54326             :   }
   54327           3 :   {
   54328             :     /* %typemap(out) (retStringAndCPLFree*) */
   54329           3 :     Py_XDECREF(resultobj);
   54330           3 :     if(result)
   54331             :     {
   54332           3 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   54333           3 :       CPLFree(result);
   54334             :     }
   54335             :     else
   54336             :     {
   54337           0 :       resultobj = Py_None;
   54338           0 :       Py_INCREF(resultobj);
   54339             :     }
   54340             :   }
   54341           3 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54342             :   return resultobj;
   54343             : fail:
   54344             :   return NULL;
   54345             : }
   54346             : 
   54347             : 
   54348          89 : SWIGINTERN PyObject *_wrap_Algorithm_GetArgNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54349          89 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54350          89 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   54351          89 :   void *argp1 = 0 ;
   54352          89 :   int res1 = 0 ;
   54353          89 :   PyObject *swig_obj[1] ;
   54354          89 :   char **result = 0 ;
   54355             :   
   54356          89 :   if (!args) SWIG_fail;
   54357          89 :   swig_obj[0] = args;
   54358          89 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   54359          89 :   if (!SWIG_IsOK(res1)) {
   54360           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetArgNames" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54361             :   }
   54362          89 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54363          89 :   {
   54364          89 :     const int bLocalUseExceptions = GetUseExceptions();
   54365          89 :     if ( bLocalUseExceptions ) {
   54366          89 :       pushErrorHandler();
   54367             :     }
   54368          89 :     {
   54369          89 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54370          89 :       result = (char **)GDALAlgorithmHS_GetArgNames(arg1);
   54371          89 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54372             :     }
   54373          89 :     if ( bLocalUseExceptions ) {
   54374          89 :       popErrorHandler();
   54375             :     }
   54376             : #ifndef SED_HACKS
   54377             :     if ( bLocalUseExceptions ) {
   54378             :       CPLErr eclass = CPLGetLastErrorType();
   54379             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54380             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54381             :       }
   54382             :     }
   54383             : #endif
   54384             :   }
   54385          89 :   {
   54386             :     /* %typemap(out) char **CSL -> ( string ) */
   54387          89 :     bool bErr = false;
   54388          89 :     resultobj = CSLToList(result, &bErr);
   54389          89 :     CSLDestroy(result);
   54390          89 :     if( bErr ) {
   54391           0 :       SWIG_fail;
   54392             :     }
   54393             :   }
   54394          89 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54395             :   return resultobj;
   54396             : fail:
   54397             :   return NULL;
   54398             : }
   54399             : 
   54400             : 
   54401        6303 : SWIGINTERN PyObject *_wrap_Algorithm_GetArg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54402        6303 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54403        6303 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   54404        6303 :   char *arg2 = (char *) 0 ;
   54405        6303 :   void *argp1 = 0 ;
   54406        6303 :   int res1 = 0 ;
   54407        6303 :   int res2 ;
   54408        6303 :   char *buf2 = 0 ;
   54409        6303 :   int alloc2 = 0 ;
   54410        6303 :   PyObject *swig_obj[2] ;
   54411        6303 :   GDALAlgorithmArgHS *result = 0 ;
   54412             :   
   54413        6303 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_GetArg", 2, 2, swig_obj)) SWIG_fail;
   54414        6303 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   54415        6303 :   if (!SWIG_IsOK(res1)) {
   54416           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetArg" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54417             :   }
   54418        6303 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54419        6303 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   54420        6303 :   if (!SWIG_IsOK(res2)) {
   54421           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Algorithm_GetArg" "', argument " "2"" of type '" "char const *""'");
   54422             :   }
   54423        6303 :   arg2 = reinterpret_cast< char * >(buf2);
   54424        6303 :   {
   54425        6303 :     if (!arg2) {
   54426           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   54427             :     }
   54428             :   }
   54429        6302 :   {
   54430        6302 :     const int bLocalUseExceptions = GetUseExceptions();
   54431        6302 :     if ( bLocalUseExceptions ) {
   54432        6302 :       pushErrorHandler();
   54433             :     }
   54434        6302 :     {
   54435        6302 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54436        6302 :       result = (GDALAlgorithmArgHS *)GDALAlgorithmHS_GetArg(arg1,(char const *)arg2);
   54437        6302 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54438             :     }
   54439        6302 :     if ( bLocalUseExceptions ) {
   54440        6302 :       popErrorHandler();
   54441             :     }
   54442             : #ifndef SED_HACKS
   54443             :     if ( bLocalUseExceptions ) {
   54444             :       CPLErr eclass = CPLGetLastErrorType();
   54445             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54446             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54447             :       }
   54448             :     }
   54449             : #endif
   54450             :   }
   54451        6302 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_POINTER_OWN |  0 );
   54452        6302 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   54453        6303 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54454             :   return resultobj;
   54455           1 : fail:
   54456           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   54457             :   return NULL;
   54458             : }
   54459             : 
   54460             : 
   54461         276 : SWIGINTERN PyObject *Algorithm_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54462         276 :   PyObject *obj;
   54463         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   54464         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmHS, SWIG_NewClientData(obj));
   54465         276 :   return SWIG_Py_Void();
   54466             : }
   54467             : 
   54468        1362 : SWIGINTERN PyObject *_wrap_delete_AlgorithmRegistry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54469        1362 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54470        1362 :   GDALAlgorithmRegistryHS *arg1 = (GDALAlgorithmRegistryHS *) 0 ;
   54471        1362 :   void *argp1 = 0 ;
   54472        1362 :   int res1 = 0 ;
   54473        1362 :   PyObject *swig_obj[1] ;
   54474             :   
   54475        1362 :   if (!args) SWIG_fail;
   54476        1362 :   swig_obj[0] = args;
   54477        1362 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_POINTER_DISOWN |  0 );
   54478        1362 :   if (!SWIG_IsOK(res1)) {
   54479           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AlgorithmRegistry" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
   54480             :   }
   54481        1362 :   arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
   54482        1362 :   {
   54483        1362 :     const int bLocalUseExceptions = GetUseExceptions();
   54484        1362 :     if ( bLocalUseExceptions ) {
   54485        1362 :       pushErrorHandler();
   54486             :     }
   54487        1362 :     {
   54488        1362 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54489        1362 :       delete_GDALAlgorithmRegistryHS(arg1);
   54490        1362 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54491             :     }
   54492        1362 :     if ( bLocalUseExceptions ) {
   54493        1362 :       popErrorHandler();
   54494             :     }
   54495             : #ifndef SED_HACKS
   54496             :     if ( bLocalUseExceptions ) {
   54497             :       CPLErr eclass = CPLGetLastErrorType();
   54498             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54499             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54500             :       }
   54501             :     }
   54502             : #endif
   54503             :   }
   54504        1362 :   resultobj = SWIG_Py_Void();
   54505        1362 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54506             :   return resultobj;
   54507             : fail:
   54508             :   return NULL;
   54509             : }
   54510             : 
   54511             : 
   54512           1 : SWIGINTERN PyObject *_wrap_AlgorithmRegistry_GetAlgNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54513           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54514           1 :   GDALAlgorithmRegistryHS *arg1 = (GDALAlgorithmRegistryHS *) 0 ;
   54515           1 :   void *argp1 = 0 ;
   54516           1 :   int res1 = 0 ;
   54517           1 :   PyObject *swig_obj[1] ;
   54518           1 :   char **result = 0 ;
   54519             :   
   54520           1 :   if (!args) SWIG_fail;
   54521           1 :   swig_obj[0] = args;
   54522           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, 0 |  0 );
   54523           1 :   if (!SWIG_IsOK(res1)) {
   54524           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmRegistry_GetAlgNames" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
   54525             :   }
   54526           1 :   arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
   54527           1 :   {
   54528           1 :     const int bLocalUseExceptions = GetUseExceptions();
   54529           1 :     if ( bLocalUseExceptions ) {
   54530           1 :       pushErrorHandler();
   54531             :     }
   54532           1 :     {
   54533           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54534           1 :       result = (char **)GDALAlgorithmRegistryHS_GetAlgNames(arg1);
   54535           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54536             :     }
   54537           1 :     if ( bLocalUseExceptions ) {
   54538           1 :       popErrorHandler();
   54539             :     }
   54540             : #ifndef SED_HACKS
   54541             :     if ( bLocalUseExceptions ) {
   54542             :       CPLErr eclass = CPLGetLastErrorType();
   54543             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54544             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54545             :       }
   54546             :     }
   54547             : #endif
   54548             :   }
   54549           1 :   {
   54550             :     /* %typemap(out) char **CSL -> ( string ) */
   54551           1 :     bool bErr = false;
   54552           1 :     resultobj = CSLToList(result, &bErr);
   54553           1 :     CSLDestroy(result);
   54554           1 :     if( bErr ) {
   54555           0 :       SWIG_fail;
   54556             :     }
   54557             :   }
   54558           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54559             :   return resultobj;
   54560             : fail:
   54561             :   return NULL;
   54562             : }
   54563             : 
   54564             : 
   54565        1364 : SWIGINTERN PyObject *_wrap_AlgorithmRegistry_InstantiateAlg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54566        1364 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54567        1364 :   GDALAlgorithmRegistryHS *arg1 = (GDALAlgorithmRegistryHS *) 0 ;
   54568        1364 :   char *arg2 = (char *) 0 ;
   54569        1364 :   void *argp1 = 0 ;
   54570        1364 :   int res1 = 0 ;
   54571        1364 :   int res2 ;
   54572        1364 :   char *buf2 = 0 ;
   54573        1364 :   int alloc2 = 0 ;
   54574        1364 :   PyObject *swig_obj[2] ;
   54575        1364 :   GDALAlgorithmHS *result = 0 ;
   54576             :   
   54577        1364 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmRegistry_InstantiateAlg", 2, 2, swig_obj)) SWIG_fail;
   54578        1364 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, 0 |  0 );
   54579        1364 :   if (!SWIG_IsOK(res1)) {
   54580           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmRegistry_InstantiateAlg" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
   54581             :   }
   54582        1364 :   arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
   54583        1364 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   54584        1364 :   if (!SWIG_IsOK(res2)) {
   54585           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmRegistry_InstantiateAlg" "', argument " "2"" of type '" "char const *""'");
   54586             :   }
   54587        1364 :   arg2 = reinterpret_cast< char * >(buf2);
   54588        1364 :   {
   54589        1364 :     if (!arg2) {
   54590           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   54591             :     }
   54592             :   }
   54593        1363 :   {
   54594        1363 :     const int bLocalUseExceptions = GetUseExceptions();
   54595        1363 :     if ( bLocalUseExceptions ) {
   54596        1363 :       pushErrorHandler();
   54597             :     }
   54598        1363 :     {
   54599        1363 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54600        1363 :       result = (GDALAlgorithmHS *)GDALAlgorithmRegistryHS_InstantiateAlg(arg1,(char const *)arg2);
   54601        1363 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54602             :     }
   54603        1363 :     if ( bLocalUseExceptions ) {
   54604        1363 :       popErrorHandler();
   54605             :     }
   54606             : #ifndef SED_HACKS
   54607             :     if ( bLocalUseExceptions ) {
   54608             :       CPLErr eclass = CPLGetLastErrorType();
   54609             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54610             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54611             :       }
   54612             :     }
   54613             : #endif
   54614             :   }
   54615        1363 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
   54616        1363 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   54617        1364 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54618             :   return resultobj;
   54619           1 : fail:
   54620           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   54621             :   return NULL;
   54622             : }
   54623             : 
   54624             : 
   54625         276 : SWIGINTERN PyObject *AlgorithmRegistry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54626         276 :   PyObject *obj;
   54627         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   54628         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_NewClientData(obj));
   54629         276 :   return SWIG_Py_Void();
   54630             : }
   54631             : 
   54632        1849 : SWIGINTERN PyObject *_wrap_delete_ArgDatasetValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54633        1849 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54634        1849 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   54635        1849 :   void *argp1 = 0 ;
   54636        1849 :   int res1 = 0 ;
   54637        1849 :   PyObject *swig_obj[1] ;
   54638             :   
   54639        1849 :   if (!args) SWIG_fail;
   54640        1849 :   swig_obj[0] = args;
   54641        1849 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_POINTER_DISOWN |  0 );
   54642        1849 :   if (!SWIG_IsOK(res1)) {
   54643           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArgDatasetValue" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   54644             :   }
   54645        1849 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   54646        1849 :   {
   54647        1849 :     const int bLocalUseExceptions = GetUseExceptions();
   54648        1849 :     if ( bLocalUseExceptions ) {
   54649        1849 :       pushErrorHandler();
   54650             :     }
   54651        1849 :     {
   54652        1849 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54653        1849 :       delete_GDALArgDatasetValueHS(arg1);
   54654        1849 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54655             :     }
   54656        1849 :     if ( bLocalUseExceptions ) {
   54657        1849 :       popErrorHandler();
   54658             :     }
   54659             : #ifndef SED_HACKS
   54660             :     if ( bLocalUseExceptions ) {
   54661             :       CPLErr eclass = CPLGetLastErrorType();
   54662             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54663             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54664             :       }
   54665             :     }
   54666             : #endif
   54667             :   }
   54668        1849 :   resultobj = SWIG_Py_Void();
   54669        1849 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54670             :   return resultobj;
   54671             : fail:
   54672             :   return NULL;
   54673             : }
   54674             : 
   54675             : 
   54676           2 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54677           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54678           2 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   54679           2 :   void *argp1 = 0 ;
   54680           2 :   int res1 = 0 ;
   54681           2 :   PyObject *swig_obj[1] ;
   54682           2 :   char *result = 0 ;
   54683             :   
   54684           2 :   if (!args) SWIG_fail;
   54685           2 :   swig_obj[0] = args;
   54686           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   54687           2 :   if (!SWIG_IsOK(res1)) {
   54688           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_GetName" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   54689             :   }
   54690           2 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   54691           2 :   {
   54692           2 :     const int bLocalUseExceptions = GetUseExceptions();
   54693           2 :     if ( bLocalUseExceptions ) {
   54694           2 :       pushErrorHandler();
   54695             :     }
   54696           2 :     {
   54697           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54698           2 :       result = (char *)GDALArgDatasetValueHS_GetName(arg1);
   54699           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54700             :     }
   54701           2 :     if ( bLocalUseExceptions ) {
   54702           2 :       popErrorHandler();
   54703             :     }
   54704             : #ifndef SED_HACKS
   54705             :     if ( bLocalUseExceptions ) {
   54706             :       CPLErr eclass = CPLGetLastErrorType();
   54707             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54708             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54709             :       }
   54710             :     }
   54711             : #endif
   54712             :   }
   54713           2 :   resultobj = SWIG_FromCharPtr((const char *)result);
   54714           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54715             :   return resultobj;
   54716             : fail:
   54717             :   return NULL;
   54718             : }
   54719             : 
   54720             : 
   54721         452 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_GetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54722         452 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54723         452 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   54724         452 :   void *argp1 = 0 ;
   54725         452 :   int res1 = 0 ;
   54726         452 :   PyObject *swig_obj[1] ;
   54727         452 :   GDALDatasetShadow *result = 0 ;
   54728             :   
   54729         452 :   if (!args) SWIG_fail;
   54730         452 :   swig_obj[0] = args;
   54731         452 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   54732         452 :   if (!SWIG_IsOK(res1)) {
   54733           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_GetDataset" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   54734             :   }
   54735         452 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   54736         452 :   {
   54737         452 :     const int bLocalUseExceptions = GetUseExceptions();
   54738         452 :     if ( bLocalUseExceptions ) {
   54739         452 :       pushErrorHandler();
   54740             :     }
   54741         452 :     {
   54742         452 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54743         452 :       result = (GDALDatasetShadow *)GDALArgDatasetValueHS_GetDataset(arg1);
   54744         452 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54745             :     }
   54746         452 :     if ( bLocalUseExceptions ) {
   54747         452 :       popErrorHandler();
   54748             :     }
   54749             : #ifndef SED_HACKS
   54750             :     if ( bLocalUseExceptions ) {
   54751             :       CPLErr eclass = CPLGetLastErrorType();
   54752             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54753             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54754             :       }
   54755             :     }
   54756             : #endif
   54757             :   }
   54758         452 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   54759         452 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54760             :   return resultobj;
   54761             : fail:
   54762             :   return NULL;
   54763             : }
   54764             : 
   54765             : 
   54766         984 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_SetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54767         984 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54768         984 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   54769         984 :   char *arg2 = (char *) 0 ;
   54770         984 :   void *argp1 = 0 ;
   54771         984 :   int res1 = 0 ;
   54772         984 :   int res2 ;
   54773         984 :   char *buf2 = 0 ;
   54774         984 :   int alloc2 = 0 ;
   54775         984 :   PyObject *swig_obj[2] ;
   54776             :   
   54777         984 :   if (!SWIG_Python_UnpackTuple(args, "ArgDatasetValue_SetName", 2, 2, swig_obj)) SWIG_fail;
   54778         984 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   54779         984 :   if (!SWIG_IsOK(res1)) {
   54780           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_SetName" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   54781             :   }
   54782         984 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   54783         984 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   54784         984 :   if (!SWIG_IsOK(res2)) {
   54785           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ArgDatasetValue_SetName" "', argument " "2"" of type '" "char const *""'");
   54786             :   }
   54787         984 :   arg2 = reinterpret_cast< char * >(buf2);
   54788         984 :   {
   54789         984 :     if (!arg2) {
   54790           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   54791             :     }
   54792             :   }
   54793         984 :   {
   54794         984 :     const int bLocalUseExceptions = GetUseExceptions();
   54795         984 :     if ( bLocalUseExceptions ) {
   54796         984 :       pushErrorHandler();
   54797             :     }
   54798         984 :     {
   54799         984 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54800         984 :       GDALArgDatasetValueHS_SetName(arg1,(char const *)arg2);
   54801         984 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54802             :     }
   54803         984 :     if ( bLocalUseExceptions ) {
   54804         984 :       popErrorHandler();
   54805             :     }
   54806             : #ifndef SED_HACKS
   54807             :     if ( bLocalUseExceptions ) {
   54808             :       CPLErr eclass = CPLGetLastErrorType();
   54809             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54810             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54811             :       }
   54812             :     }
   54813             : #endif
   54814             :   }
   54815         984 :   resultobj = SWIG_Py_Void();
   54816         984 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   54817         984 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54818             :   return resultobj;
   54819           0 : fail:
   54820           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   54821             :   return NULL;
   54822             : }
   54823             : 
   54824             : 
   54825         415 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_SetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54826         415 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54827         415 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   54828         415 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   54829         415 :   void *argp1 = 0 ;
   54830         415 :   int res1 = 0 ;
   54831         415 :   void *argp2 = 0 ;
   54832         415 :   int res2 = 0 ;
   54833         415 :   PyObject *swig_obj[2] ;
   54834             :   
   54835         415 :   if (!SWIG_Python_UnpackTuple(args, "ArgDatasetValue_SetDataset", 2, 2, swig_obj)) SWIG_fail;
   54836         415 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   54837         415 :   if (!SWIG_IsOK(res1)) {
   54838           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_SetDataset" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   54839             :   }
   54840         415 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   54841         415 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   54842         415 :   if (!SWIG_IsOK(res2)) {
   54843           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ArgDatasetValue_SetDataset" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   54844             :   }
   54845         415 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   54846         415 :   {
   54847         415 :     const int bLocalUseExceptions = GetUseExceptions();
   54848         415 :     if ( bLocalUseExceptions ) {
   54849         415 :       pushErrorHandler();
   54850             :     }
   54851         415 :     {
   54852         415 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54853         415 :       GDALArgDatasetValueHS_SetDataset(arg1,arg2);
   54854         415 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54855             :     }
   54856         415 :     if ( bLocalUseExceptions ) {
   54857         415 :       popErrorHandler();
   54858             :     }
   54859             : #ifndef SED_HACKS
   54860             :     if ( bLocalUseExceptions ) {
   54861             :       CPLErr eclass = CPLGetLastErrorType();
   54862             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54863             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54864             :       }
   54865             :     }
   54866             : #endif
   54867             :   }
   54868         415 :   resultobj = SWIG_Py_Void();
   54869         415 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54870             :   return resultobj;
   54871             : fail:
   54872             :   return NULL;
   54873             : }
   54874             : 
   54875             : 
   54876         276 : SWIGINTERN PyObject *ArgDatasetValue_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54877         276 :   PyObject *obj;
   54878         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   54879         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_NewClientData(obj));
   54880         276 :   return SWIG_Py_Void();
   54881             : }
   54882             : 
   54883           1 : SWIGINTERN PyObject *_wrap_ApplyGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54884           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54885           1 :   double *arg1 ;
   54886           1 :   double arg2 ;
   54887           1 :   double arg3 ;
   54888           1 :   double *arg4 = (double *) 0 ;
   54889           1 :   double *arg5 = (double *) 0 ;
   54890           1 :   double argin1[6] ;
   54891           1 :   double val2 ;
   54892           1 :   int ecode2 = 0 ;
   54893           1 :   double val3 ;
   54894           1 :   int ecode3 = 0 ;
   54895           1 :   double temp4 ;
   54896           1 :   int res4 = SWIG_TMPOBJ ;
   54897           1 :   double temp5 ;
   54898           1 :   int res5 = SWIG_TMPOBJ ;
   54899           1 :   PyObject *swig_obj[3] ;
   54900             :   
   54901           1 :   arg4 = &temp4;
   54902           1 :   arg5 = &temp5;
   54903           1 :   if (!SWIG_Python_UnpackTuple(args, "ApplyGeoTransform", 3, 3, swig_obj)) SWIG_fail;
   54904           1 :   {
   54905             :     /* %typemap(in) (double argin1[ANY]) */
   54906           1 :     arg1 = argin1;
   54907           1 :     if (! PySequence_Check(swig_obj[0]) ) {
   54908           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   54909           0 :       SWIG_fail;
   54910             :     }
   54911           1 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   54912           1 :     if ( seq_size != 6 ) {
   54913           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   54914           0 :       SWIG_fail;
   54915             :     }
   54916           7 :     for (unsigned int i=0; i<6; i++) {
   54917           6 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   54918           6 :       double val;
   54919           6 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   54920           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   54921           0 :         Py_DECREF(o);
   54922           0 :         SWIG_fail;
   54923             :       }
   54924           6 :       arg1[i] =  val;
   54925           6 :       Py_DECREF(o);
   54926             :     }
   54927             :   }
   54928           1 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   54929           1 :   if (!SWIG_IsOK(ecode2)) {
   54930           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApplyGeoTransform" "', argument " "2"" of type '" "double""'");
   54931             :   } 
   54932           1 :   arg2 = static_cast< double >(val2);
   54933           1 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   54934           1 :   if (!SWIG_IsOK(ecode3)) {
   54935           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApplyGeoTransform" "', argument " "3"" of type '" "double""'");
   54936             :   } 
   54937           1 :   arg3 = static_cast< double >(val3);
   54938           1 :   {
   54939           1 :     const int bLocalUseExceptions = GetUseExceptions();
   54940           1 :     if ( bLocalUseExceptions ) {
   54941           0 :       pushErrorHandler();
   54942             :     }
   54943           1 :     {
   54944           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54945           1 :       GDALApplyGeoTransform(arg1,arg2,arg3,arg4,arg5);
   54946           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54947             :     }
   54948           1 :     if ( bLocalUseExceptions ) {
   54949           0 :       popErrorHandler();
   54950             :     }
   54951             : #ifndef SED_HACKS
   54952             :     if ( bLocalUseExceptions ) {
   54953             :       CPLErr eclass = CPLGetLastErrorType();
   54954             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54955             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54956             :       }
   54957             :     }
   54958             : #endif
   54959             :   }
   54960           1 :   resultobj = SWIG_Py_Void();
   54961           1 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   54962           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   54963             :   } else {
   54964           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   54965           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   54966             :   }
   54967           1 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   54968           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   54969             :   } else {
   54970           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   54971           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   54972             :   }
   54973           1 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54974             :   return resultobj;
   54975             : fail:
   54976             :   return NULL;
   54977             : }
   54978             : 
   54979             : 
   54980          17 : SWIGINTERN PyObject *_wrap_InvGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54981          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54982          17 :   double *arg1 ;
   54983          17 :   double *arg2 ;
   54984          17 :   double argin1[6] ;
   54985          17 :   double argout2[6] ;
   54986          17 :   PyObject *swig_obj[1] ;
   54987          17 :   RETURN_NONE result;
   54988             :   
   54989          17 :   {
   54990             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   54991          17 :     memset(argout2, 0, sizeof(argout2));
   54992          17 :     arg2 = argout2;
   54993             :   }
   54994          17 :   if (!args) SWIG_fail;
   54995          17 :   swig_obj[0] = args;
   54996          17 :   {
   54997             :     /* %typemap(in) (double argin1[ANY]) */
   54998          17 :     arg1 = argin1;
   54999          17 :     if (! PySequence_Check(swig_obj[0]) ) {
   55000           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   55001           0 :       SWIG_fail;
   55002             :     }
   55003          17 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   55004          17 :     if ( seq_size != 6 ) {
   55005           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   55006           0 :       SWIG_fail;
   55007             :     }
   55008         119 :     for (unsigned int i=0; i<6; i++) {
   55009         102 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   55010         102 :       double val;
   55011         102 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   55012           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   55013           0 :         Py_DECREF(o);
   55014           0 :         SWIG_fail;
   55015             :       }
   55016         102 :       arg1[i] =  val;
   55017         102 :       Py_DECREF(o);
   55018             :     }
   55019             :   }
   55020          17 :   {
   55021          17 :     const int bLocalUseExceptions = GetUseExceptions();
   55022          17 :     if ( bLocalUseExceptions ) {
   55023           9 :       pushErrorHandler();
   55024             :     }
   55025          17 :     {
   55026          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55027          17 :       result = (RETURN_NONE)GDALInvGeoTransform(arg1,arg2);
   55028          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55029             :     }
   55030          17 :     if ( bLocalUseExceptions ) {
   55031           9 :       popErrorHandler();
   55032             :     }
   55033             : #ifndef SED_HACKS
   55034             :     if ( bLocalUseExceptions ) {
   55035             :       CPLErr eclass = CPLGetLastErrorType();
   55036             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55037             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55038             :       }
   55039             :     }
   55040             : #endif
   55041             :   }
   55042             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   55043          17 :   {
   55044             :     /* %typemap(argout) (double argout[ANY]) */
   55045          17 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   55046             : #if SWIG_VERSION >= 0x040300
   55047             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   55048             : #else
   55049          17 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   55050             : #endif
   55051             :   }
   55052          17 :   {
   55053             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   55054          17 :     if (result == 0 ) {
   55055           3 :       Py_XDECREF( resultobj );
   55056           3 :       resultobj = Py_None;
   55057           3 :       Py_INCREF(resultobj);
   55058             :     }
   55059          17 :     if (resultobj == 0) {
   55060           0 :       resultobj = Py_None;
   55061           0 :       Py_INCREF(resultobj);
   55062             :     }
   55063             :   }
   55064          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55065             :   return resultobj;
   55066             : fail:
   55067             :   return NULL;
   55068             : }
   55069             : 
   55070             : 
   55071          10 : SWIGINTERN PyObject *_wrap_ApplyHomography(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55072          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55073          10 :   double *arg1 ;
   55074          10 :   double arg2 ;
   55075          10 :   double arg3 ;
   55076          10 :   double *arg4 = (double *) 0 ;
   55077          10 :   double *arg5 = (double *) 0 ;
   55078          10 :   double argin1[9] ;
   55079          10 :   double val2 ;
   55080          10 :   int ecode2 = 0 ;
   55081          10 :   double val3 ;
   55082          10 :   int ecode3 = 0 ;
   55083          10 :   double temp4 ;
   55084          10 :   int res4 = SWIG_TMPOBJ ;
   55085          10 :   double temp5 ;
   55086          10 :   int res5 = SWIG_TMPOBJ ;
   55087          10 :   PyObject *swig_obj[3] ;
   55088          10 :   int result;
   55089             :   
   55090          10 :   arg4 = &temp4;
   55091          10 :   arg5 = &temp5;
   55092          10 :   if (!SWIG_Python_UnpackTuple(args, "ApplyHomography", 3, 3, swig_obj)) SWIG_fail;
   55093          10 :   {
   55094             :     /* %typemap(in) (double argin1[ANY]) */
   55095          10 :     arg1 = argin1;
   55096          10 :     if (! PySequence_Check(swig_obj[0]) ) {
   55097           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   55098           0 :       SWIG_fail;
   55099             :     }
   55100          10 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   55101          10 :     if ( seq_size != 9 ) {
   55102           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   55103           0 :       SWIG_fail;
   55104             :     }
   55105         100 :     for (unsigned int i=0; i<9; i++) {
   55106          90 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   55107          90 :       double val;
   55108          90 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   55109           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   55110           0 :         Py_DECREF(o);
   55111           0 :         SWIG_fail;
   55112             :       }
   55113          90 :       arg1[i] =  val;
   55114          90 :       Py_DECREF(o);
   55115             :     }
   55116             :   }
   55117          10 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   55118          10 :   if (!SWIG_IsOK(ecode2)) {
   55119           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApplyHomography" "', argument " "2"" of type '" "double""'");
   55120             :   } 
   55121          10 :   arg2 = static_cast< double >(val2);
   55122          10 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   55123          10 :   if (!SWIG_IsOK(ecode3)) {
   55124           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApplyHomography" "', argument " "3"" of type '" "double""'");
   55125             :   } 
   55126          10 :   arg3 = static_cast< double >(val3);
   55127          10 :   {
   55128          10 :     const int bLocalUseExceptions = GetUseExceptions();
   55129          10 :     if ( bLocalUseExceptions ) {
   55130          10 :       pushErrorHandler();
   55131             :     }
   55132          10 :     {
   55133          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55134          10 :       result = (int)GDALApplyHomography(arg1,arg2,arg3,arg4,arg5);
   55135          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55136             :     }
   55137          10 :     if ( bLocalUseExceptions ) {
   55138          10 :       popErrorHandler();
   55139             :     }
   55140             : #ifndef SED_HACKS
   55141             :     if ( bLocalUseExceptions ) {
   55142             :       CPLErr eclass = CPLGetLastErrorType();
   55143             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55144             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55145             :       }
   55146             :     }
   55147             : #endif
   55148             :   }
   55149          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   55150          10 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   55151          10 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   55152             :   } else {
   55153           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   55154           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   55155             :   }
   55156          10 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   55157          10 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   55158             :   } else {
   55159           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   55160           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   55161             :   }
   55162          10 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55163             :   return resultobj;
   55164             : fail:
   55165             :   return NULL;
   55166             : }
   55167             : 
   55168             : 
   55169           7 : SWIGINTERN PyObject *_wrap_InvHomography(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55170           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55171           7 :   double *arg1 ;
   55172           7 :   double *arg2 ;
   55173           7 :   double argin1[9] ;
   55174           7 :   double argout2[9] ;
   55175           7 :   PyObject *swig_obj[1] ;
   55176           7 :   RETURN_NONE result;
   55177             :   
   55178           7 :   {
   55179             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   55180           7 :     memset(argout2, 0, sizeof(argout2));
   55181           7 :     arg2 = argout2;
   55182             :   }
   55183           7 :   if (!args) SWIG_fail;
   55184           7 :   swig_obj[0] = args;
   55185           7 :   {
   55186             :     /* %typemap(in) (double argin1[ANY]) */
   55187           7 :     arg1 = argin1;
   55188           7 :     if (! PySequence_Check(swig_obj[0]) ) {
   55189           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   55190           0 :       SWIG_fail;
   55191             :     }
   55192           7 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   55193           7 :     if ( seq_size != 9 ) {
   55194           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   55195           0 :       SWIG_fail;
   55196             :     }
   55197          70 :     for (unsigned int i=0; i<9; i++) {
   55198          63 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   55199          63 :       double val;
   55200          63 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   55201           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   55202           0 :         Py_DECREF(o);
   55203           0 :         SWIG_fail;
   55204             :       }
   55205          63 :       arg1[i] =  val;
   55206          63 :       Py_DECREF(o);
   55207             :     }
   55208             :   }
   55209           7 :   {
   55210           7 :     const int bLocalUseExceptions = GetUseExceptions();
   55211           7 :     if ( bLocalUseExceptions ) {
   55212           7 :       pushErrorHandler();
   55213             :     }
   55214           7 :     {
   55215           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55216           7 :       result = (RETURN_NONE)GDALInvHomography(arg1,arg2);
   55217           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55218             :     }
   55219           7 :     if ( bLocalUseExceptions ) {
   55220           7 :       popErrorHandler();
   55221             :     }
   55222             : #ifndef SED_HACKS
   55223             :     if ( bLocalUseExceptions ) {
   55224             :       CPLErr eclass = CPLGetLastErrorType();
   55225             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55226             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55227             :       }
   55228             :     }
   55229             : #endif
   55230             :   }
   55231             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   55232           7 :   {
   55233             :     /* %typemap(argout) (double argout[ANY]) */
   55234           7 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 9 );
   55235             : #if SWIG_VERSION >= 0x040300
   55236             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   55237             : #else
   55238           7 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   55239             : #endif
   55240             :   }
   55241           7 :   {
   55242             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   55243           7 :     if (result == 0 ) {
   55244           3 :       Py_XDECREF( resultobj );
   55245           3 :       resultobj = Py_None;
   55246           3 :       Py_INCREF(resultobj);
   55247             :     }
   55248           7 :     if (resultobj == 0) {
   55249           0 :       resultobj = Py_None;
   55250           0 :       Py_INCREF(resultobj);
   55251             :     }
   55252             :   }
   55253          13 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55254             :   return resultobj;
   55255             : fail:
   55256             :   return NULL;
   55257             : }
   55258             : 
   55259             : 
   55260        3806 : SWIGINTERN PyObject *_wrap_VersionInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55261        3806 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55262        3806 :   char *arg1 = (char *) "VERSION_NUM" ;
   55263        3806 :   int res1 ;
   55264        3806 :   char *buf1 = 0 ;
   55265        3806 :   int alloc1 = 0 ;
   55266        3806 :   PyObject *swig_obj[1] ;
   55267        3806 :   char *result = 0 ;
   55268             :   
   55269        3806 :   if (!SWIG_Python_UnpackTuple(args, "VersionInfo", 0, 1, swig_obj)) SWIG_fail;
   55270        3806 :   if (swig_obj[0]) {
   55271        3806 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   55272        3806 :     if (!SWIG_IsOK(res1)) {
   55273           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VersionInfo" "', argument " "1"" of type '" "char const *""'");
   55274             :     }
   55275        3806 :     arg1 = reinterpret_cast< char * >(buf1);
   55276             :   }
   55277        3806 :   {
   55278        3806 :     const int bLocalUseExceptions = GetUseExceptions();
   55279        3806 :     if ( bLocalUseExceptions ) {
   55280        3187 :       pushErrorHandler();
   55281             :     }
   55282        3806 :     {
   55283        3806 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55284        3806 :       result = (char *)GDALVersionInfo((char const *)arg1);
   55285        3806 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55286             :     }
   55287        3806 :     if ( bLocalUseExceptions ) {
   55288        3187 :       popErrorHandler();
   55289             :     }
   55290             : #ifndef SED_HACKS
   55291             :     if ( bLocalUseExceptions ) {
   55292             :       CPLErr eclass = CPLGetLastErrorType();
   55293             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55294             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55295             :       }
   55296             :     }
   55297             : #endif
   55298             :   }
   55299        3806 :   resultobj = SWIG_FromCharPtr((const char *)result);
   55300        3806 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   55301        3806 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55302             :   return resultobj;
   55303           0 : fail:
   55304           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   55305             :   return NULL;
   55306             : }
   55307             : 
   55308             : 
   55309         273 : SWIGINTERN PyObject *_wrap_AllRegister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55310         273 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55311             :   
   55312         273 :   if (!SWIG_Python_UnpackTuple(args, "AllRegister", 0, 0, 0)) SWIG_fail;
   55313         273 :   {
   55314         273 :     const int bLocalUseExceptions = GetUseExceptions();
   55315         273 :     if ( bLocalUseExceptions ) {
   55316         224 :       pushErrorHandler();
   55317             :     }
   55318         273 :     {
   55319         273 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55320         273 :       GDALAllRegister();
   55321         273 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55322             :     }
   55323         273 :     if ( bLocalUseExceptions ) {
   55324         224 :       popErrorHandler();
   55325             :     }
   55326             : #ifndef SED_HACKS
   55327             :     if ( bLocalUseExceptions ) {
   55328             :       CPLErr eclass = CPLGetLastErrorType();
   55329             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55330             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55331             :       }
   55332             :     }
   55333             : #endif
   55334             :   }
   55335         273 :   resultobj = SWIG_Py_Void();
   55336         273 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55337             :   return resultobj;
   55338           0 : fail:
   55339           0 :   return NULL;
   55340             : }
   55341             : 
   55342             : 
   55343           0 : SWIGINTERN PyObject *_wrap_GDALDestroyDriverManager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55344           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55345             :   
   55346           0 :   if (!SWIG_Python_UnpackTuple(args, "GDALDestroyDriverManager", 0, 0, 0)) SWIG_fail;
   55347           0 :   {
   55348           0 :     const int bLocalUseExceptions = GetUseExceptions();
   55349           0 :     if ( bLocalUseExceptions ) {
   55350           0 :       pushErrorHandler();
   55351             :     }
   55352           0 :     {
   55353           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55354           0 :       GDALDestroyDriverManager();
   55355           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55356             :     }
   55357           0 :     if ( bLocalUseExceptions ) {
   55358           0 :       popErrorHandler();
   55359             :     }
   55360             : #ifndef SED_HACKS
   55361             :     if ( bLocalUseExceptions ) {
   55362             :       CPLErr eclass = CPLGetLastErrorType();
   55363             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55364             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55365             :       }
   55366             :     }
   55367             : #endif
   55368             :   }
   55369           0 :   resultobj = SWIG_Py_Void();
   55370           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55371             :   return resultobj;
   55372           0 : fail:
   55373           0 :   return NULL;
   55374             : }
   55375             : 
   55376             : 
   55377          56 : SWIGINTERN PyObject *_wrap_GetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55378          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55379          56 :   GIntBig result;
   55380             :   
   55381          56 :   if (!SWIG_Python_UnpackTuple(args, "GetCacheMax", 0, 0, 0)) SWIG_fail;
   55382          56 :   {
   55383          56 :     const int bLocalUseExceptions = GetUseExceptions();
   55384          56 :     if ( bLocalUseExceptions ) {
   55385          26 :       pushErrorHandler();
   55386             :     }
   55387          56 :     {
   55388          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55389          56 :       result = wrapper_GDALGetCacheMax();
   55390          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55391             :     }
   55392          56 :     if ( bLocalUseExceptions ) {
   55393          26 :       popErrorHandler();
   55394             :     }
   55395             : #ifndef SED_HACKS
   55396             :     if ( bLocalUseExceptions ) {
   55397             :       CPLErr eclass = CPLGetLastErrorType();
   55398             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55399             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55400             :       }
   55401             :     }
   55402             : #endif
   55403             :   }
   55404          56 :   {
   55405          56 :     resultobj = PyLong_FromLongLong(result);
   55406             :   }
   55407          56 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55408             :   return resultobj;
   55409           0 : fail:
   55410           0 :   return NULL;
   55411             : }
   55412             : 
   55413             : 
   55414           2 : SWIGINTERN PyObject *_wrap_GetCacheUsed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55415           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55416           2 :   GIntBig result;
   55417             :   
   55418           2 :   if (!SWIG_Python_UnpackTuple(args, "GetCacheUsed", 0, 0, 0)) SWIG_fail;
   55419           2 :   {
   55420           2 :     const int bLocalUseExceptions = GetUseExceptions();
   55421           2 :     if ( bLocalUseExceptions ) {
   55422           0 :       pushErrorHandler();
   55423             :     }
   55424           2 :     {
   55425           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55426           2 :       result = wrapper_GDALGetCacheUsed();
   55427           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55428             :     }
   55429           2 :     if ( bLocalUseExceptions ) {
   55430           0 :       popErrorHandler();
   55431             :     }
   55432             : #ifndef SED_HACKS
   55433             :     if ( bLocalUseExceptions ) {
   55434             :       CPLErr eclass = CPLGetLastErrorType();
   55435             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55436             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55437             :       }
   55438             :     }
   55439             : #endif
   55440             :   }
   55441           2 :   {
   55442           2 :     resultobj = PyLong_FromLongLong(result);
   55443             :   }
   55444           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55445             :   return resultobj;
   55446           0 : fail:
   55447           0 :   return NULL;
   55448             : }
   55449             : 
   55450             : 
   55451          76 : SWIGINTERN PyObject *_wrap_SetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55452          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55453          76 :   GIntBig arg1 ;
   55454          76 :   PyObject *swig_obj[1] ;
   55455             :   
   55456          76 :   if (!args) SWIG_fail;
   55457          76 :   swig_obj[0] = args;
   55458          76 :   {
   55459          76 :     arg1 = (GIntBig)PyLong_AsLongLong(swig_obj[0]);
   55460             :   }
   55461          76 :   {
   55462          76 :     const int bLocalUseExceptions = GetUseExceptions();
   55463          76 :     if ( bLocalUseExceptions ) {
   55464          20 :       pushErrorHandler();
   55465             :     }
   55466          76 :     {
   55467          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55468          76 :       wrapper_GDALSetCacheMax(arg1);
   55469          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55470             :     }
   55471          76 :     if ( bLocalUseExceptions ) {
   55472          20 :       popErrorHandler();
   55473             :     }
   55474             : #ifndef SED_HACKS
   55475             :     if ( bLocalUseExceptions ) {
   55476             :       CPLErr eclass = CPLGetLastErrorType();
   55477             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55478             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55479             :       }
   55480             :     }
   55481             : #endif
   55482             :   }
   55483          76 :   resultobj = SWIG_Py_Void();
   55484          76 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55485             :   return resultobj;
   55486           0 : fail:
   55487           0 :   return NULL;
   55488             : }
   55489             : 
   55490             : 
   55491          45 : SWIGINTERN PyObject *_wrap_GetDataTypeSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55492          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55493          45 :   GDALDataType arg1 ;
   55494          45 :   PyObject *swig_obj[1] ;
   55495          45 :   int result;
   55496             :   
   55497          45 :   if (!args) SWIG_fail;
   55498          45 :   swig_obj[0] = args;
   55499          45 :   {
   55500             :     // %typemap(in) GDALDataType
   55501          45 :     int val = 0;
   55502          45 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   55503          45 :     if (!SWIG_IsOK(ecode)) {
   55504           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   55505             :     }
   55506          45 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   55507             :     {
   55508           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   55509             :     }
   55510          45 :     arg1 = static_cast<GDALDataType>(val);
   55511             :   }
   55512          45 :   {
   55513          45 :     const int bLocalUseExceptions = GetUseExceptions();
   55514          45 :     if ( bLocalUseExceptions ) {
   55515          23 :       pushErrorHandler();
   55516             :     }
   55517          45 :     {
   55518          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55519          45 :       result = (int)GDALGetDataTypeSize(arg1);
   55520          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55521             :     }
   55522          45 :     if ( bLocalUseExceptions ) {
   55523          23 :       popErrorHandler();
   55524             :     }
   55525             : #ifndef SED_HACKS
   55526             :     if ( bLocalUseExceptions ) {
   55527             :       CPLErr eclass = CPLGetLastErrorType();
   55528             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55529             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55530             :       }
   55531             :     }
   55532             : #endif
   55533             :   }
   55534          45 :   resultobj = SWIG_From_int(static_cast< int >(result));
   55535          45 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55536             :   return resultobj;
   55537             : fail:
   55538             :   return NULL;
   55539             : }
   55540             : 
   55541             : 
   55542         201 : SWIGINTERN PyObject *_wrap_DataTypeIsComplex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55543         201 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55544         201 :   GDALDataType arg1 ;
   55545         201 :   PyObject *swig_obj[1] ;
   55546         201 :   int result;
   55547             :   
   55548         201 :   if (!args) SWIG_fail;
   55549         201 :   swig_obj[0] = args;
   55550         201 :   {
   55551             :     // %typemap(in) GDALDataType
   55552         201 :     int val = 0;
   55553         201 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   55554         201 :     if (!SWIG_IsOK(ecode)) {
   55555           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   55556             :     }
   55557         201 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   55558             :     {
   55559           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   55560             :     }
   55561         201 :     arg1 = static_cast<GDALDataType>(val);
   55562             :   }
   55563         201 :   {
   55564         201 :     const int bLocalUseExceptions = GetUseExceptions();
   55565         201 :     if ( bLocalUseExceptions ) {
   55566         143 :       pushErrorHandler();
   55567             :     }
   55568         201 :     {
   55569         201 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55570         201 :       result = (int)GDALDataTypeIsComplex(arg1);
   55571         201 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55572             :     }
   55573         201 :     if ( bLocalUseExceptions ) {
   55574         143 :       popErrorHandler();
   55575             :     }
   55576             : #ifndef SED_HACKS
   55577             :     if ( bLocalUseExceptions ) {
   55578             :       CPLErr eclass = CPLGetLastErrorType();
   55579             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55580             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55581             :       }
   55582             :     }
   55583             : #endif
   55584             :   }
   55585         201 :   resultobj = SWIG_From_int(static_cast< int >(result));
   55586         201 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55587             :   return resultobj;
   55588             : fail:
   55589             :   return NULL;
   55590             : }
   55591             : 
   55592             : 
   55593        3797 : SWIGINTERN PyObject *_wrap_GetDataTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55594        3797 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55595        3797 :   GDALDataType arg1 ;
   55596        3797 :   PyObject *swig_obj[1] ;
   55597        3797 :   char *result = 0 ;
   55598             :   
   55599        3797 :   if (!args) SWIG_fail;
   55600        3797 :   swig_obj[0] = args;
   55601        3797 :   {
   55602             :     // %typemap(in) GDALDataType
   55603        3797 :     int val = 0;
   55604        3797 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   55605        3797 :     if (!SWIG_IsOK(ecode)) {
   55606           1 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   55607             :     }
   55608        3796 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   55609             :     {
   55610           2 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   55611             :     }
   55612        3794 :     arg1 = static_cast<GDALDataType>(val);
   55613             :   }
   55614        3794 :   {
   55615        3794 :     const int bLocalUseExceptions = GetUseExceptions();
   55616        3794 :     if ( bLocalUseExceptions ) {
   55617         272 :       pushErrorHandler();
   55618             :     }
   55619        3794 :     {
   55620        3794 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55621        3794 :       result = (char *)GDALGetDataTypeName(arg1);
   55622        3794 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55623             :     }
   55624        3794 :     if ( bLocalUseExceptions ) {
   55625         272 :       popErrorHandler();
   55626             :     }
   55627             : #ifndef SED_HACKS
   55628             :     if ( bLocalUseExceptions ) {
   55629             :       CPLErr eclass = CPLGetLastErrorType();
   55630             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55631             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55632             :       }
   55633             :     }
   55634             : #endif
   55635             :   }
   55636        3794 :   resultobj = SWIG_FromCharPtr((const char *)result);
   55637        3797 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55638             :   return resultobj;
   55639             : fail:
   55640             :   return NULL;
   55641             : }
   55642             : 
   55643             : 
   55644         977 : SWIGINTERN PyObject *_wrap_GetDataTypeByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55645         977 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55646         977 :   char *arg1 = (char *) 0 ;
   55647         977 :   int res1 ;
   55648         977 :   char *buf1 = 0 ;
   55649         977 :   int alloc1 = 0 ;
   55650         977 :   PyObject *swig_obj[1] ;
   55651         977 :   GDALDataType result;
   55652             :   
   55653         977 :   if (!args) SWIG_fail;
   55654         977 :   swig_obj[0] = args;
   55655         977 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   55656         977 :   if (!SWIG_IsOK(res1)) {
   55657           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDataTypeByName" "', argument " "1"" of type '" "char const *""'");
   55658             :   }
   55659         977 :   arg1 = reinterpret_cast< char * >(buf1);
   55660         977 :   {
   55661         977 :     const int bLocalUseExceptions = GetUseExceptions();
   55662         977 :     if ( bLocalUseExceptions ) {
   55663          81 :       pushErrorHandler();
   55664             :     }
   55665         977 :     {
   55666         977 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55667         977 :       result = (GDALDataType)GDALGetDataTypeByName((char const *)arg1);
   55668         977 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55669             :     }
   55670         977 :     if ( bLocalUseExceptions ) {
   55671          81 :       popErrorHandler();
   55672             :     }
   55673             : #ifndef SED_HACKS
   55674             :     if ( bLocalUseExceptions ) {
   55675             :       CPLErr eclass = CPLGetLastErrorType();
   55676             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55677             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55678             :       }
   55679             :     }
   55680             : #endif
   55681             :   }
   55682         977 :   resultobj = SWIG_From_int(static_cast< int >(result));
   55683         977 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   55684         977 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55685             :   return resultobj;
   55686           0 : fail:
   55687           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   55688             :   return NULL;
   55689             : }
   55690             : 
   55691             : 
   55692          65 : SWIGINTERN PyObject *_wrap_DataTypeUnion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55693          65 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55694          65 :   GDALDataType arg1 ;
   55695          65 :   GDALDataType arg2 ;
   55696          65 :   PyObject *swig_obj[2] ;
   55697          65 :   GDALDataType result;
   55698             :   
   55699          65 :   if (!SWIG_Python_UnpackTuple(args, "DataTypeUnion", 2, 2, swig_obj)) SWIG_fail;
   55700          65 :   {
   55701             :     // %typemap(in) GDALDataType
   55702          65 :     int val = 0;
   55703          65 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   55704          65 :     if (!SWIG_IsOK(ecode)) {
   55705           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   55706             :     }
   55707          65 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   55708             :     {
   55709           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   55710             :     }
   55711          65 :     arg1 = static_cast<GDALDataType>(val);
   55712             :   }
   55713          65 :   {
   55714             :     // %typemap(in) GDALDataType
   55715          65 :     int val = 0;
   55716          65 :     int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   55717          65 :     if (!SWIG_IsOK(ecode)) {
   55718           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   55719             :     }
   55720          65 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   55721             :     {
   55722           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   55723             :     }
   55724          65 :     arg2 = static_cast<GDALDataType>(val);
   55725             :   }
   55726          65 :   {
   55727          65 :     const int bLocalUseExceptions = GetUseExceptions();
   55728          65 :     if ( bLocalUseExceptions ) {
   55729          64 :       pushErrorHandler();
   55730             :     }
   55731          65 :     {
   55732          65 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55733          65 :       result = (GDALDataType)GDALDataTypeUnion(arg1,arg2);
   55734          65 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55735             :     }
   55736          65 :     if ( bLocalUseExceptions ) {
   55737          64 :       popErrorHandler();
   55738             :     }
   55739             : #ifndef SED_HACKS
   55740             :     if ( bLocalUseExceptions ) {
   55741             :       CPLErr eclass = CPLGetLastErrorType();
   55742             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55743             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55744             :       }
   55745             :     }
   55746             : #endif
   55747             :   }
   55748          65 :   resultobj = SWIG_From_int(static_cast< int >(result));
   55749          65 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55750             :   return resultobj;
   55751             : fail:
   55752             :   return NULL;
   55753             : }
   55754             : 
   55755             : 
   55756          61 : SWIGINTERN PyObject *_wrap_GetColorInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55757          61 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55758          61 :   GDALColorInterp arg1 ;
   55759          61 :   int val1 ;
   55760          61 :   int ecode1 = 0 ;
   55761          61 :   PyObject *swig_obj[1] ;
   55762          61 :   char *result = 0 ;
   55763             :   
   55764          61 :   if (!args) SWIG_fail;
   55765          61 :   swig_obj[0] = args;
   55766          61 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   55767          61 :   if (!SWIG_IsOK(ecode1)) {
   55768           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetColorInterpretationName" "', argument " "1"" of type '" "GDALColorInterp""'");
   55769             :   } 
   55770          61 :   arg1 = static_cast< GDALColorInterp >(val1);
   55771          61 :   {
   55772          61 :     const int bLocalUseExceptions = GetUseExceptions();
   55773          61 :     if ( bLocalUseExceptions ) {
   55774           4 :       pushErrorHandler();
   55775             :     }
   55776          61 :     {
   55777          61 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55778          61 :       result = (char *)GDALGetColorInterpretationName(arg1);
   55779          61 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55780             :     }
   55781          61 :     if ( bLocalUseExceptions ) {
   55782           4 :       popErrorHandler();
   55783             :     }
   55784             : #ifndef SED_HACKS
   55785             :     if ( bLocalUseExceptions ) {
   55786             :       CPLErr eclass = CPLGetLastErrorType();
   55787             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55788             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55789             :       }
   55790             :     }
   55791             : #endif
   55792             :   }
   55793          61 :   resultobj = SWIG_FromCharPtr((const char *)result);
   55794          61 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55795             :   return resultobj;
   55796             : fail:
   55797             :   return NULL;
   55798             : }
   55799             : 
   55800             : 
   55801          41 : SWIGINTERN PyObject *_wrap_GetColorInterpretationByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55802          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55803          41 :   char *arg1 = (char *) 0 ;
   55804          41 :   int res1 ;
   55805          41 :   char *buf1 = 0 ;
   55806          41 :   int alloc1 = 0 ;
   55807          41 :   PyObject *swig_obj[1] ;
   55808          41 :   GDALColorInterp result;
   55809             :   
   55810          41 :   if (!args) SWIG_fail;
   55811          41 :   swig_obj[0] = args;
   55812          41 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   55813          41 :   if (!SWIG_IsOK(res1)) {
   55814           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetColorInterpretationByName" "', argument " "1"" of type '" "char const *""'");
   55815             :   }
   55816          41 :   arg1 = reinterpret_cast< char * >(buf1);
   55817          41 :   {
   55818          41 :     const int bLocalUseExceptions = GetUseExceptions();
   55819          41 :     if ( bLocalUseExceptions ) {
   55820           1 :       pushErrorHandler();
   55821             :     }
   55822          41 :     {
   55823          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55824          41 :       result = (GDALColorInterp)GDALGetColorInterpretationByName((char const *)arg1);
   55825          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55826             :     }
   55827          41 :     if ( bLocalUseExceptions ) {
   55828           1 :       popErrorHandler();
   55829             :     }
   55830             : #ifndef SED_HACKS
   55831             :     if ( bLocalUseExceptions ) {
   55832             :       CPLErr eclass = CPLGetLastErrorType();
   55833             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55834             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55835             :       }
   55836             :     }
   55837             : #endif
   55838             :   }
   55839          41 :   resultobj = SWIG_From_int(static_cast< int >(result));
   55840          41 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   55841          41 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55842             :   return resultobj;
   55843           0 : fail:
   55844           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   55845             :   return NULL;
   55846             : }
   55847             : 
   55848             : 
   55849           2 : SWIGINTERN PyObject *_wrap_GetPaletteInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55850           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55851           2 :   GDALPaletteInterp arg1 ;
   55852           2 :   int val1 ;
   55853           2 :   int ecode1 = 0 ;
   55854           2 :   PyObject *swig_obj[1] ;
   55855           2 :   char *result = 0 ;
   55856             :   
   55857           2 :   if (!args) SWIG_fail;
   55858           2 :   swig_obj[0] = args;
   55859           2 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   55860           2 :   if (!SWIG_IsOK(ecode1)) {
   55861           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetPaletteInterpretationName" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   55862             :   } 
   55863           2 :   arg1 = static_cast< GDALPaletteInterp >(val1);
   55864           2 :   {
   55865           2 :     const int bLocalUseExceptions = GetUseExceptions();
   55866           2 :     if ( bLocalUseExceptions ) {
   55867           0 :       pushErrorHandler();
   55868             :     }
   55869           2 :     {
   55870           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55871           2 :       result = (char *)GDALGetPaletteInterpretationName(arg1);
   55872           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55873             :     }
   55874           2 :     if ( bLocalUseExceptions ) {
   55875           0 :       popErrorHandler();
   55876             :     }
   55877             : #ifndef SED_HACKS
   55878             :     if ( bLocalUseExceptions ) {
   55879             :       CPLErr eclass = CPLGetLastErrorType();
   55880             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55881             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55882             :       }
   55883             :     }
   55884             : #endif
   55885             :   }
   55886           2 :   resultobj = SWIG_FromCharPtr((const char *)result);
   55887           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55888             :   return resultobj;
   55889             : fail:
   55890             :   return NULL;
   55891             : }
   55892             : 
   55893             : 
   55894         130 : SWIGINTERN PyObject *_wrap_DecToDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55895         130 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55896         130 :   double arg1 ;
   55897         130 :   char *arg2 = (char *) 0 ;
   55898         130 :   int arg3 = (int) 2 ;
   55899         130 :   double val1 ;
   55900         130 :   int ecode1 = 0 ;
   55901         130 :   int res2 ;
   55902         130 :   char *buf2 = 0 ;
   55903         130 :   int alloc2 = 0 ;
   55904         130 :   int val3 ;
   55905         130 :   int ecode3 = 0 ;
   55906         130 :   PyObject *swig_obj[3] ;
   55907         130 :   char *result = 0 ;
   55908             :   
   55909         130 :   if (!SWIG_Python_UnpackTuple(args, "DecToDMS", 2, 3, swig_obj)) SWIG_fail;
   55910         130 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   55911         130 :   if (!SWIG_IsOK(ecode1)) {
   55912           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToDMS" "', argument " "1"" of type '" "double""'");
   55913             :   } 
   55914         130 :   arg1 = static_cast< double >(val1);
   55915         130 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   55916         130 :   if (!SWIG_IsOK(res2)) {
   55917           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DecToDMS" "', argument " "2"" of type '" "char const *""'");
   55918             :   }
   55919         130 :   arg2 = reinterpret_cast< char * >(buf2);
   55920         130 :   if (swig_obj[2]) {
   55921         130 :     ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   55922         130 :     if (!SWIG_IsOK(ecode3)) {
   55923           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DecToDMS" "', argument " "3"" of type '" "int""'");
   55924             :     } 
   55925             :     arg3 = static_cast< int >(val3);
   55926             :   }
   55927         130 :   {
   55928         130 :     const int bLocalUseExceptions = GetUseExceptions();
   55929         130 :     if ( bLocalUseExceptions ) {
   55930           0 :       pushErrorHandler();
   55931             :     }
   55932         130 :     {
   55933         130 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55934         130 :       result = (char *)GDALDecToDMS(arg1,(char const *)arg2,arg3);
   55935         130 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55936             :     }
   55937         130 :     if ( bLocalUseExceptions ) {
   55938           0 :       popErrorHandler();
   55939             :     }
   55940             : #ifndef SED_HACKS
   55941             :     if ( bLocalUseExceptions ) {
   55942             :       CPLErr eclass = CPLGetLastErrorType();
   55943             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55944             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55945             :       }
   55946             :     }
   55947             : #endif
   55948             :   }
   55949         130 :   resultobj = SWIG_FromCharPtr((const char *)result);
   55950         130 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   55951         130 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55952             :   return resultobj;
   55953           0 : fail:
   55954           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   55955             :   return NULL;
   55956             : }
   55957             : 
   55958             : 
   55959           4 : SWIGINTERN PyObject *_wrap_PackedDMSToDec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55960           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55961           4 :   double arg1 ;
   55962           4 :   double val1 ;
   55963           4 :   int ecode1 = 0 ;
   55964           4 :   PyObject *swig_obj[1] ;
   55965           4 :   double result;
   55966             :   
   55967           4 :   if (!args) SWIG_fail;
   55968           4 :   swig_obj[0] = args;
   55969           4 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   55970           4 :   if (!SWIG_IsOK(ecode1)) {
   55971           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "PackedDMSToDec" "', argument " "1"" of type '" "double""'");
   55972             :   } 
   55973           4 :   arg1 = static_cast< double >(val1);
   55974           4 :   {
   55975           4 :     const int bLocalUseExceptions = GetUseExceptions();
   55976           4 :     if ( bLocalUseExceptions ) {
   55977           4 :       pushErrorHandler();
   55978             :     }
   55979           4 :     {
   55980           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55981           4 :       result = (double)GDALPackedDMSToDec(arg1);
   55982           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55983             :     }
   55984           4 :     if ( bLocalUseExceptions ) {
   55985           4 :       popErrorHandler();
   55986             :     }
   55987             : #ifndef SED_HACKS
   55988             :     if ( bLocalUseExceptions ) {
   55989             :       CPLErr eclass = CPLGetLastErrorType();
   55990             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55991             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55992             :       }
   55993             :     }
   55994             : #endif
   55995             :   }
   55996           4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   55997           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55998             :   return resultobj;
   55999             : fail:
   56000             :   return NULL;
   56001             : }
   56002             : 
   56003             : 
   56004           4 : SWIGINTERN PyObject *_wrap_DecToPackedDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56005           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56006           4 :   double arg1 ;
   56007           4 :   double val1 ;
   56008           4 :   int ecode1 = 0 ;
   56009           4 :   PyObject *swig_obj[1] ;
   56010           4 :   double result;
   56011             :   
   56012           4 :   if (!args) SWIG_fail;
   56013           4 :   swig_obj[0] = args;
   56014           4 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   56015           4 :   if (!SWIG_IsOK(ecode1)) {
   56016           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToPackedDMS" "', argument " "1"" of type '" "double""'");
   56017             :   } 
   56018           4 :   arg1 = static_cast< double >(val1);
   56019           4 :   {
   56020           4 :     const int bLocalUseExceptions = GetUseExceptions();
   56021           4 :     if ( bLocalUseExceptions ) {
   56022           4 :       pushErrorHandler();
   56023             :     }
   56024           4 :     {
   56025           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56026           4 :       result = (double)GDALDecToPackedDMS(arg1);
   56027           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56028             :     }
   56029           4 :     if ( bLocalUseExceptions ) {
   56030           4 :       popErrorHandler();
   56031             :     }
   56032             : #ifndef SED_HACKS
   56033             :     if ( bLocalUseExceptions ) {
   56034             :       CPLErr eclass = CPLGetLastErrorType();
   56035             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56036             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56037             :       }
   56038             :     }
   56039             : #endif
   56040             :   }
   56041           4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   56042           4 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56043             :   return resultobj;
   56044             : fail:
   56045             :   return NULL;
   56046             : }
   56047             : 
   56048             : 
   56049          49 : SWIGINTERN PyObject *_wrap_ParseXMLString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56050          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56051          49 :   char *arg1 = (char *) 0 ;
   56052          49 :   int res1 ;
   56053          49 :   char *buf1 = 0 ;
   56054          49 :   int alloc1 = 0 ;
   56055          49 :   PyObject *swig_obj[1] ;
   56056          49 :   CPLXMLNode *result = 0 ;
   56057             :   
   56058          49 :   if (!args) SWIG_fail;
   56059          49 :   swig_obj[0] = args;
   56060          49 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   56061          49 :   if (!SWIG_IsOK(res1)) {
   56062           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseXMLString" "', argument " "1"" of type '" "char *""'");
   56063             :   }
   56064          49 :   arg1 = reinterpret_cast< char * >(buf1);
   56065          49 :   {
   56066          49 :     const int bLocalUseExceptions = GetUseExceptions();
   56067          49 :     if ( bLocalUseExceptions ) {
   56068          24 :       pushErrorHandler();
   56069             :     }
   56070          49 :     {
   56071          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56072          49 :       result = (CPLXMLNode *)CPLParseXMLString(arg1);
   56073          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56074             :     }
   56075          49 :     if ( bLocalUseExceptions ) {
   56076          24 :       popErrorHandler();
   56077             :     }
   56078             : #ifndef SED_HACKS
   56079             :     if ( bLocalUseExceptions ) {
   56080             :       CPLErr eclass = CPLGetLastErrorType();
   56081             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56082             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56083             :       }
   56084             :     }
   56085             : #endif
   56086             :   }
   56087          49 :   {
   56088             :     /* %typemap(out) (CPLXMLNode*) */
   56089             :     
   56090          49 :     CPLXMLNode *psXMLTree = result;
   56091          49 :     int         bFakeRoot = FALSE;
   56092             :     
   56093          49 :     if( psXMLTree != NULL && psXMLTree->psNext != NULL )
   56094             :     {
   56095           3 :       CPLXMLNode *psFirst = psXMLTree;
   56096             :       
   56097             :       /* create a "pseudo" root if we have multiple elements */
   56098           3 :       psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
   56099           3 :       psXMLTree->psChild = psFirst;
   56100           3 :       bFakeRoot = TRUE;
   56101             :     }
   56102             :     
   56103          49 :     resultobj = XMLTreeToPyList( psXMLTree );
   56104             :     
   56105          49 :     if( bFakeRoot )
   56106             :     {
   56107           3 :       psXMLTree->psChild = NULL;
   56108           3 :       CPLDestroyXMLNode( psXMLTree );
   56109             :     }
   56110             :   }
   56111          49 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   56112          49 :   {
   56113             :     /* %typemap(ret) (CPLXMLNode*) */
   56114          49 :     if ( result ) CPLDestroyXMLNode( result );
   56115             :   }
   56116          75 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56117             :   return resultobj;
   56118           0 : fail:
   56119           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   56120             :   return NULL;
   56121             : }
   56122             : 
   56123             : 
   56124          13 : SWIGINTERN PyObject *_wrap_SerializeXMLTree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56125          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56126          13 :   CPLXMLNode *arg1 = (CPLXMLNode *) 0 ;
   56127          13 :   PyObject *swig_obj[1] ;
   56128          13 :   retStringAndCPLFree *result = 0 ;
   56129             :   
   56130          13 :   if (!args) SWIG_fail;
   56131          13 :   swig_obj[0] = args;
   56132          13 :   {
   56133             :     /* %typemap(python,in) (CPLXMLNode* xmlnode ) */
   56134          13 :     arg1 = PyListToXMLTree( swig_obj[0] );
   56135          13 :     if ( !arg1 ) SWIG_fail;
   56136             :   }
   56137          13 :   {
   56138          13 :     const int bLocalUseExceptions = GetUseExceptions();
   56139          13 :     if ( bLocalUseExceptions ) {
   56140           3 :       pushErrorHandler();
   56141             :     }
   56142          13 :     {
   56143          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56144          13 :       result = (retStringAndCPLFree *)CPLSerializeXMLTree(arg1);
   56145          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56146             :     }
   56147          13 :     if ( bLocalUseExceptions ) {
   56148           3 :       popErrorHandler();
   56149             :     }
   56150             : #ifndef SED_HACKS
   56151             :     if ( bLocalUseExceptions ) {
   56152             :       CPLErr eclass = CPLGetLastErrorType();
   56153             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56154             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56155             :       }
   56156             :     }
   56157             : #endif
   56158             :   }
   56159          13 :   {
   56160             :     /* %typemap(out) (retStringAndCPLFree*) */
   56161          13 :     Py_XDECREF(resultobj);
   56162          13 :     if(result)
   56163             :     {
   56164          13 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   56165          13 :       CPLFree(result);
   56166             :     }
   56167             :     else
   56168             :     {
   56169           0 :       resultobj = Py_None;
   56170           0 :       Py_INCREF(resultobj);
   56171             :     }
   56172             :   }
   56173          13 :   {
   56174             :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   56175          13 :     CPLDestroyXMLNode( arg1 );
   56176             :   }
   56177          13 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56178             :   return resultobj;
   56179           0 : fail:
   56180           0 :   {
   56181             :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   56182           0 :     CPLDestroyXMLNode( arg1 );
   56183             :   }
   56184             :   return NULL;
   56185             : }
   56186             : 
   56187             : 
   56188          30 : SWIGINTERN PyObject *_wrap_GetJPEG2000Structure(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56189          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56190          30 :   char *arg1 = (char *) 0 ;
   56191          30 :   char **arg2 = (char **) NULL ;
   56192          30 :   int res1 ;
   56193          30 :   char *buf1 = 0 ;
   56194          30 :   int alloc1 = 0 ;
   56195          30 :   PyObject *swig_obj[2] ;
   56196          30 :   CPLXMLNode *result = 0 ;
   56197             :   
   56198          30 :   if (!SWIG_Python_UnpackTuple(args, "GetJPEG2000Structure", 1, 2, swig_obj)) SWIG_fail;
   56199          30 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   56200          30 :   if (!SWIG_IsOK(res1)) {
   56201           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetJPEG2000Structure" "', argument " "1"" of type '" "char const *""'");
   56202             :   }
   56203          30 :   arg1 = reinterpret_cast< char * >(buf1);
   56204          30 :   if (swig_obj[1]) {
   56205          30 :     {
   56206             :       /* %typemap(in) char **dict */
   56207          30 :       arg2 = NULL;
   56208          30 :       if ( PySequence_Check( swig_obj[1] ) ) {
   56209          30 :         int bErr = FALSE;
   56210          30 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   56211          30 :         if ( bErr )
   56212             :         {
   56213           0 :           SWIG_fail;
   56214             :         }
   56215             :       }
   56216           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   56217           0 :         int bErr = FALSE;
   56218           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   56219           0 :         if ( bErr )
   56220             :         {
   56221           0 :           SWIG_fail;
   56222             :         }
   56223             :       }
   56224             :       else {
   56225           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   56226           0 :         SWIG_fail;
   56227             :       }
   56228             :     }
   56229             :   }
   56230          30 :   {
   56231          30 :     const int bLocalUseExceptions = GetUseExceptions();
   56232          30 :     if ( bLocalUseExceptions ) {
   56233           0 :       pushErrorHandler();
   56234             :     }
   56235          30 :     {
   56236          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56237          30 :       result = (CPLXMLNode *)GDALGetJPEG2000Structure((char const *)arg1,arg2);
   56238          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56239             :     }
   56240          30 :     if ( bLocalUseExceptions ) {
   56241           0 :       popErrorHandler();
   56242             :     }
   56243             : #ifndef SED_HACKS
   56244             :     if ( bLocalUseExceptions ) {
   56245             :       CPLErr eclass = CPLGetLastErrorType();
   56246             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56247             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56248             :       }
   56249             :     }
   56250             : #endif
   56251             :   }
   56252          30 :   {
   56253             :     /* %typemap(out) (CPLXMLNode*) */
   56254             :     
   56255          30 :     CPLXMLNode *psXMLTree = result;
   56256          30 :     int         bFakeRoot = FALSE;
   56257             :     
   56258          30 :     if( psXMLTree != NULL && psXMLTree->psNext != NULL )
   56259             :     {
   56260           0 :       CPLXMLNode *psFirst = psXMLTree;
   56261             :       
   56262             :       /* create a "pseudo" root if we have multiple elements */
   56263           0 :       psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
   56264           0 :       psXMLTree->psChild = psFirst;
   56265           0 :       bFakeRoot = TRUE;
   56266             :     }
   56267             :     
   56268          30 :     resultobj = XMLTreeToPyList( psXMLTree );
   56269             :     
   56270          30 :     if( bFakeRoot )
   56271             :     {
   56272           0 :       psXMLTree->psChild = NULL;
   56273           0 :       CPLDestroyXMLNode( psXMLTree );
   56274             :     }
   56275             :   }
   56276          30 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   56277          30 :   {
   56278             :     /* %typemap(freearg) char **dict */
   56279          30 :     CSLDestroy( arg2 );
   56280             :   }
   56281          30 :   {
   56282             :     /* %typemap(ret) (CPLXMLNode*) */
   56283          30 :     if ( result ) CPLDestroyXMLNode( result );
   56284             :   }
   56285          30 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56286             :   return resultobj;
   56287           0 : fail:
   56288           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   56289           0 :   {
   56290             :     /* %typemap(freearg) char **dict */
   56291           0 :     CSLDestroy( arg2 );
   56292             :   }
   56293             :   return NULL;
   56294             : }
   56295             : 
   56296             : 
   56297           9 : SWIGINTERN PyObject *_wrap_GetJPEG2000StructureAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56298           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56299           9 :   char *arg1 = (char *) 0 ;
   56300           9 :   char **arg2 = (char **) NULL ;
   56301           9 :   int res1 ;
   56302           9 :   char *buf1 = 0 ;
   56303           9 :   int alloc1 = 0 ;
   56304           9 :   PyObject *swig_obj[2] ;
   56305           9 :   retStringAndCPLFree *result = 0 ;
   56306             :   
   56307           9 :   if (!SWIG_Python_UnpackTuple(args, "GetJPEG2000StructureAsString", 1, 2, swig_obj)) SWIG_fail;
   56308           9 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   56309           9 :   if (!SWIG_IsOK(res1)) {
   56310           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetJPEG2000StructureAsString" "', argument " "1"" of type '" "char const *""'");
   56311             :   }
   56312           9 :   arg1 = reinterpret_cast< char * >(buf1);
   56313           9 :   if (swig_obj[1]) {
   56314           9 :     {
   56315             :       /* %typemap(in) char **dict */
   56316           9 :       arg2 = NULL;
   56317           9 :       if ( PySequence_Check( swig_obj[1] ) ) {
   56318           9 :         int bErr = FALSE;
   56319           9 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   56320           9 :         if ( bErr )
   56321             :         {
   56322           0 :           SWIG_fail;
   56323             :         }
   56324             :       }
   56325           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   56326           0 :         int bErr = FALSE;
   56327           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   56328           0 :         if ( bErr )
   56329             :         {
   56330           0 :           SWIG_fail;
   56331             :         }
   56332             :       }
   56333             :       else {
   56334           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   56335           0 :         SWIG_fail;
   56336             :       }
   56337             :     }
   56338             :   }
   56339           9 :   {
   56340           9 :     const int bLocalUseExceptions = GetUseExceptions();
   56341           9 :     if ( bLocalUseExceptions ) {
   56342           5 :       pushErrorHandler();
   56343             :     }
   56344           9 :     {
   56345           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56346           9 :       result = (retStringAndCPLFree *)GetJPEG2000StructureAsString((char const *)arg1,arg2);
   56347           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56348             :     }
   56349           9 :     if ( bLocalUseExceptions ) {
   56350           5 :       popErrorHandler();
   56351             :     }
   56352             : #ifndef SED_HACKS
   56353             :     if ( bLocalUseExceptions ) {
   56354             :       CPLErr eclass = CPLGetLastErrorType();
   56355             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56356             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56357             :       }
   56358             :     }
   56359             : #endif
   56360             :   }
   56361           9 :   {
   56362             :     /* %typemap(out) (retStringAndCPLFree*) */
   56363           9 :     Py_XDECREF(resultobj);
   56364           9 :     if(result)
   56365             :     {
   56366           9 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   56367           9 :       CPLFree(result);
   56368             :     }
   56369             :     else
   56370             :     {
   56371           0 :       resultobj = Py_None;
   56372           0 :       Py_INCREF(resultobj);
   56373             :     }
   56374             :   }
   56375           9 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   56376           9 :   {
   56377             :     /* %typemap(freearg) char **dict */
   56378           9 :     CSLDestroy( arg2 );
   56379             :   }
   56380          13 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56381             :   return resultobj;
   56382           0 : fail:
   56383           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   56384           0 :   {
   56385             :     /* %typemap(freearg) char **dict */
   56386           0 :     CSLDestroy( arg2 );
   56387             :   }
   56388             :   return NULL;
   56389             : }
   56390             : 
   56391             : 
   56392           6 : SWIGINTERN PyObject *_wrap_HasTriangulation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56393           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56394           6 :   int result;
   56395             :   
   56396           6 :   if (!SWIG_Python_UnpackTuple(args, "HasTriangulation", 0, 0, 0)) SWIG_fail;
   56397           6 :   {
   56398           6 :     const int bLocalUseExceptions = GetUseExceptions();
   56399           6 :     if ( bLocalUseExceptions ) {
   56400           6 :       pushErrorHandler();
   56401             :     }
   56402           6 :     {
   56403           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56404           6 :       result = (int)GDALHasTriangulation();
   56405           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56406             :     }
   56407           6 :     if ( bLocalUseExceptions ) {
   56408           6 :       popErrorHandler();
   56409             :     }
   56410             : #ifndef SED_HACKS
   56411             :     if ( bLocalUseExceptions ) {
   56412             :       CPLErr eclass = CPLGetLastErrorType();
   56413             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56414             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56415             :       }
   56416             :     }
   56417             : #endif
   56418             :   }
   56419           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   56420           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56421             :   return resultobj;
   56422           0 : fail:
   56423           0 :   return NULL;
   56424             : }
   56425             : 
   56426             : 
   56427         372 : SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56428         372 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56429         372 :   int result;
   56430             :   
   56431         372 :   if (!SWIG_Python_UnpackTuple(args, "GetDriverCount", 0, 0, 0)) SWIG_fail;
   56432         372 :   {
   56433         372 :     const int bLocalUseExceptions = GetUseExceptions();
   56434         372 :     if ( bLocalUseExceptions ) {
   56435         302 :       pushErrorHandler();
   56436             :     }
   56437         372 :     {
   56438         372 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56439         372 :       result = (int)GetDriverCount();
   56440         372 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56441             :     }
   56442         372 :     if ( bLocalUseExceptions ) {
   56443         302 :       popErrorHandler();
   56444             :     }
   56445             : #ifndef SED_HACKS
   56446             :     if ( bLocalUseExceptions ) {
   56447             :       CPLErr eclass = CPLGetLastErrorType();
   56448             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56449             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56450             :       }
   56451             :     }
   56452             : #endif
   56453             :   }
   56454         372 :   resultobj = SWIG_From_int(static_cast< int >(result));
   56455         372 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56456             :   return resultobj;
   56457           0 : fail:
   56458           0 :   return NULL;
   56459             : }
   56460             : 
   56461             : 
   56462       14412 : SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56463       14412 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56464       14412 :   char *arg1 = (char *) 0 ;
   56465       14412 :   int res1 ;
   56466       14412 :   char *buf1 = 0 ;
   56467       14412 :   int alloc1 = 0 ;
   56468       14412 :   PyObject *swig_obj[1] ;
   56469       14412 :   GDALDriverShadow *result = 0 ;
   56470             :   
   56471       14412 :   if (!args) SWIG_fail;
   56472       14412 :   swig_obj[0] = args;
   56473       14412 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   56474       14412 :   if (!SWIG_IsOK(res1)) {
   56475           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
   56476             :   }
   56477       14412 :   arg1 = reinterpret_cast< char * >(buf1);
   56478       14412 :   {
   56479       14412 :     if (!arg1) {
   56480           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   56481             :     }
   56482             :   }
   56483       14412 :   {
   56484       14412 :     const int bLocalUseExceptions = GetUseExceptions();
   56485       14412 :     if ( bLocalUseExceptions ) {
   56486        8487 :       pushErrorHandler();
   56487             :     }
   56488       14412 :     {
   56489       14412 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56490       14412 :       result = (GDALDriverShadow *)GetDriverByName((char const *)arg1);
   56491       14412 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56492             :     }
   56493       14412 :     if ( bLocalUseExceptions ) {
   56494        8487 :       popErrorHandler();
   56495             :     }
   56496             : #ifndef SED_HACKS
   56497             :     if ( bLocalUseExceptions ) {
   56498             :       CPLErr eclass = CPLGetLastErrorType();
   56499             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56500             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56501             :       }
   56502             :     }
   56503             : #endif
   56504             :   }
   56505       14412 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   56506       14412 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   56507       14412 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56508             :   return resultobj;
   56509           0 : fail:
   56510           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   56511             :   return NULL;
   56512             : }
   56513             : 
   56514             : 
   56515       80906 : SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56516       80906 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56517       80906 :   int arg1 ;
   56518       80906 :   int val1 ;
   56519       80906 :   int ecode1 = 0 ;
   56520       80906 :   PyObject *swig_obj[1] ;
   56521       80906 :   GDALDriverShadow *result = 0 ;
   56522             :   
   56523       80906 :   if (!args) SWIG_fail;
   56524       80906 :   swig_obj[0] = args;
   56525       80906 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   56526       80906 :   if (!SWIG_IsOK(ecode1)) {
   56527           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
   56528             :   } 
   56529       80906 :   arg1 = static_cast< int >(val1);
   56530       80906 :   {
   56531       80906 :     const int bLocalUseExceptions = GetUseExceptions();
   56532       80906 :     if ( bLocalUseExceptions ) {
   56533       66494 :       pushErrorHandler();
   56534             :     }
   56535       80906 :     {
   56536       80906 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56537       80906 :       result = (GDALDriverShadow *)GetDriver(arg1);
   56538       80906 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56539             :     }
   56540       80906 :     if ( bLocalUseExceptions ) {
   56541       66494 :       popErrorHandler();
   56542             :     }
   56543             : #ifndef SED_HACKS
   56544             :     if ( bLocalUseExceptions ) {
   56545             :       CPLErr eclass = CPLGetLastErrorType();
   56546             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56547             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56548             :       }
   56549             :     }
   56550             : #endif
   56551             :   }
   56552       80906 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   56553       80906 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56554             :   return resultobj;
   56555             : fail:
   56556             :   return NULL;
   56557             : }
   56558             : 
   56559             : 
   56560       23111 : SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56561       23111 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56562       23111 :   char *arg1 = (char *) 0 ;
   56563       23111 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   56564       23111 :   int bToFree1 = 0 ;
   56565       23111 :   PyObject *swig_obj[2] ;
   56566       23111 :   GDALDatasetShadow *result = 0 ;
   56567             :   
   56568       23111 :   if (!SWIG_Python_UnpackTuple(args, "Open", 1, 2, swig_obj)) SWIG_fail;
   56569       23111 :   {
   56570             :     /* %typemap(in) (const char *utf8_path) */
   56571       23111 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   56572             :     {
   56573       22630 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   56574             :     }
   56575             :     else
   56576             :     {
   56577         481 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   56578             :       
   56579             :     }
   56580       23111 :     if (arg1 == NULL)
   56581             :     {
   56582           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   56583           1 :       SWIG_fail;
   56584             :     }
   56585             :   }
   56586       23110 :   if (swig_obj[1]) {
   56587        1521 :     {
   56588             :       // %typemap(in) GDALAccess
   56589        1521 :       int val = 0;
   56590        1521 :       int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   56591        1521 :       if (!SWIG_IsOK(ecode)) {
   56592           1 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALAccess");
   56593             :       }
   56594        1520 :       if( val != GA_ReadOnly && val != GA_Update )
   56595             :       {
   56596           1 :         SWIG_exception_fail(SWIG_ValueError, "invalid value for GDALAccess");
   56597             :       }
   56598             :       arg2 = static_cast<GDALAccess>(val);
   56599             :     }
   56600             :   }
   56601       23108 :   {
   56602       23108 :     if (!arg1) {
   56603       23108 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   56604             :     }
   56605             :   }
   56606       23108 :   {
   56607       23108 :     const int bLocalUseExceptions = GetUseExceptions();
   56608       23108 :     if ( bLocalUseExceptions ) {
   56609       11419 :       pushErrorHandler();
   56610             :     }
   56611       23108 :     {
   56612       23108 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56613       23108 :       result = (GDALDatasetShadow *)Open((char const *)arg1,arg2);
   56614       23108 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56615             :     }
   56616       23108 :     if ( bLocalUseExceptions ) {
   56617       11419 :       popErrorHandler();
   56618             :     }
   56619             : #ifndef SED_HACKS
   56620             :     if( result == NULL && bLocalUseExceptions ) {
   56621             :       CPLErr eclass = CPLGetLastErrorType();
   56622             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56623             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56624             :       }
   56625             :     }
   56626             : #endif
   56627       23108 :     if( result != NULL && bLocalUseExceptions ) {
   56628             : #ifdef SED_HACKS
   56629       11141 :       bLocalUseExceptionsCode = FALSE;
   56630             : #endif
   56631             :     }
   56632             :   }
   56633       23108 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   56634       23108 :   {
   56635             :     /* %typemap(freearg) (const char *utf8_path) */
   56636       23108 :     GDALPythonFreeCStr(arg1, bToFree1);
   56637             :   }
   56638       23663 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56639             :   return resultobj;
   56640           3 : fail:
   56641           3 :   {
   56642             :     /* %typemap(freearg) (const char *utf8_path) */
   56643       23113 :     GDALPythonFreeCStr(arg1, bToFree1);
   56644             :   }
   56645             :   return NULL;
   56646             : }
   56647             : 
   56648             : 
   56649        6495 : SWIGINTERN PyObject *_wrap_OpenEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   56650        6495 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56651        6495 :   char *arg1 = (char *) 0 ;
   56652        6495 :   unsigned int arg2 = (unsigned int) 0 ;
   56653        6495 :   char **arg3 = (char **) NULL ;
   56654        6495 :   char **arg4 = (char **) NULL ;
   56655        6495 :   char **arg5 = (char **) NULL ;
   56656        6495 :   int bToFree1 = 0 ;
   56657        6495 :   unsigned int val2 ;
   56658        6495 :   int ecode2 = 0 ;
   56659        6495 :   PyObject * obj0 = 0 ;
   56660        6495 :   PyObject * obj1 = 0 ;
   56661        6495 :   PyObject * obj2 = 0 ;
   56662        6495 :   PyObject * obj3 = 0 ;
   56663        6495 :   PyObject * obj4 = 0 ;
   56664        6495 :   char * kwnames[] = {
   56665             :     (char *)"utf8_path",  (char *)"nOpenFlags",  (char *)"allowed_drivers",  (char *)"open_options",  (char *)"sibling_files",  NULL 
   56666             :   };
   56667        6495 :   GDALDatasetShadow *result = 0 ;
   56668             :   
   56669        6495 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:OpenEx", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   56670        6495 :   {
   56671             :     /* %typemap(in) (const char *utf8_path) */
   56672        6495 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   56673             :     {
   56674        5756 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   56675             :     }
   56676             :     else
   56677             :     {
   56678         739 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   56679             :       
   56680             :     }
   56681        6495 :     if (arg1 == NULL)
   56682             :     {
   56683           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   56684           0 :       SWIG_fail;
   56685             :     }
   56686             :   }
   56687        6495 :   if (obj1) {
   56688        3857 :     ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
   56689        3857 :     if (!SWIG_IsOK(ecode2)) {
   56690           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenEx" "', argument " "2"" of type '" "unsigned int""'");
   56691             :     } 
   56692             :     arg2 = static_cast< unsigned int >(val2);
   56693             :   }
   56694        6495 :   if (obj2) {
   56695        1922 :     {
   56696             :       /* %typemap(in) char **dict */
   56697        1922 :       arg3 = NULL;
   56698        1922 :       if ( PySequence_Check( obj2 ) ) {
   56699        1922 :         int bErr = FALSE;
   56700        1922 :         arg3 = CSLFromPySequence(obj2, &bErr);
   56701        1922 :         if ( bErr )
   56702             :         {
   56703           0 :           SWIG_fail;
   56704             :         }
   56705             :       }
   56706           0 :       else if ( PyMapping_Check( obj2 ) ) {
   56707           0 :         int bErr = FALSE;
   56708           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   56709           0 :         if ( bErr )
   56710             :         {
   56711           0 :           SWIG_fail;
   56712             :         }
   56713             :       }
   56714             :       else {
   56715           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   56716           0 :         SWIG_fail;
   56717             :       }
   56718             :     }
   56719             :   }
   56720        6495 :   if (obj3) {
   56721        2600 :     {
   56722             :       /* %typemap(in) char **dict */
   56723        2600 :       arg4 = NULL;
   56724        2600 :       if ( PySequence_Check( obj3 ) ) {
   56725        2417 :         int bErr = FALSE;
   56726        2417 :         arg4 = CSLFromPySequence(obj3, &bErr);
   56727        2417 :         if ( bErr )
   56728             :         {
   56729           0 :           SWIG_fail;
   56730             :         }
   56731             :       }
   56732         183 :       else if ( PyMapping_Check( obj3 ) ) {
   56733         183 :         int bErr = FALSE;
   56734         183 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   56735         183 :         if ( bErr )
   56736             :         {
   56737           0 :           SWIG_fail;
   56738             :         }
   56739             :       }
   56740             :       else {
   56741           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   56742           0 :         SWIG_fail;
   56743             :       }
   56744             :     }
   56745             :   }
   56746        6495 :   if (obj4) {
   56747           0 :     {
   56748             :       /* %typemap(in) char **dict */
   56749           0 :       arg5 = NULL;
   56750           0 :       if ( PySequence_Check( obj4 ) ) {
   56751           0 :         int bErr = FALSE;
   56752           0 :         arg5 = CSLFromPySequence(obj4, &bErr);
   56753           0 :         if ( bErr )
   56754             :         {
   56755           0 :           SWIG_fail;
   56756             :         }
   56757             :       }
   56758           0 :       else if ( PyMapping_Check( obj4 ) ) {
   56759           0 :         int bErr = FALSE;
   56760           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   56761           0 :         if ( bErr )
   56762             :         {
   56763           0 :           SWIG_fail;
   56764             :         }
   56765             :       }
   56766             :       else {
   56767           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   56768           0 :         SWIG_fail;
   56769             :       }
   56770             :     }
   56771             :   }
   56772        6495 :   {
   56773        6495 :     if (!arg1) {
   56774        6495 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   56775             :     }
   56776             :   }
   56777        6495 :   {
   56778        6495 :     const int bLocalUseExceptions = GetUseExceptions();
   56779        6495 :     if ( bLocalUseExceptions ) {
   56780        2854 :       pushErrorHandler();
   56781             :     }
   56782        6495 :     {
   56783        6495 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56784        6495 :       result = (GDALDatasetShadow *)OpenEx((char const *)arg1,arg2,arg3,arg4,arg5);
   56785        6495 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56786             :     }
   56787        6495 :     if ( bLocalUseExceptions ) {
   56788        2854 :       popErrorHandler();
   56789             :     }
   56790             : #ifndef SED_HACKS
   56791             :     if( result == NULL && bLocalUseExceptions ) {
   56792             :       CPLErr eclass = CPLGetLastErrorType();
   56793             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56794             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56795             :       }
   56796             :     }
   56797             : #endif
   56798        6495 :     if( result != NULL && bLocalUseExceptions ) {
   56799             : #ifdef SED_HACKS
   56800        2489 :       bLocalUseExceptionsCode = FALSE;
   56801             : #endif
   56802             :     }
   56803             :   }
   56804        6495 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   56805        6495 :   {
   56806             :     /* %typemap(freearg) (const char *utf8_path) */
   56807        6495 :     GDALPythonFreeCStr(arg1, bToFree1);
   56808             :   }
   56809        6495 :   {
   56810             :     /* %typemap(freearg) char **dict */
   56811        6495 :     CSLDestroy( arg3 );
   56812             :   }
   56813        6495 :   {
   56814             :     /* %typemap(freearg) char **dict */
   56815        6495 :     CSLDestroy( arg4 );
   56816             :   }
   56817        6495 :   {
   56818             :     /* %typemap(freearg) char **dict */
   56819        6495 :     CSLDestroy( arg5 );
   56820             :   }
   56821        7225 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56822             :   return resultobj;
   56823           0 : fail:
   56824           0 :   {
   56825             :     /* %typemap(freearg) (const char *utf8_path) */
   56826           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   56827             :   }
   56828           0 :   {
   56829             :     /* %typemap(freearg) char **dict */
   56830           0 :     CSLDestroy( arg3 );
   56831             :   }
   56832           0 :   {
   56833             :     /* %typemap(freearg) char **dict */
   56834           0 :     CSLDestroy( arg4 );
   56835             :   }
   56836           0 :   {
   56837             :     /* %typemap(freearg) char **dict */
   56838           0 :     CSLDestroy( arg5 );
   56839             :   }
   56840             :   return NULL;
   56841             : }
   56842             : 
   56843             : 
   56844        5053 : SWIGINTERN PyObject *_wrap_OpenShared(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56845        5053 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56846        5053 :   char *arg1 = (char *) 0 ;
   56847        5053 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   56848        5053 :   int bToFree1 = 0 ;
   56849        5053 :   PyObject *swig_obj[2] ;
   56850        5053 :   GDALDatasetShadow *result = 0 ;
   56851             :   
   56852        5053 :   if (!SWIG_Python_UnpackTuple(args, "OpenShared", 1, 2, swig_obj)) SWIG_fail;
   56853        5053 :   {
   56854             :     /* %typemap(in) (const char *utf8_path) */
   56855        5053 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   56856             :     {
   56857        5053 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   56858             :     }
   56859             :     else
   56860             :     {
   56861           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   56862             :       
   56863             :     }
   56864        5053 :     if (arg1 == NULL)
   56865             :     {
   56866           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   56867           0 :       SWIG_fail;
   56868             :     }
   56869             :   }
   56870        5053 :   if (swig_obj[1]) {
   56871          50 :     {
   56872             :       // %typemap(in) GDALAccess
   56873          50 :       int val = 0;
   56874          50 :       int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   56875          50 :       if (!SWIG_IsOK(ecode)) {
   56876           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALAccess");
   56877             :       }
   56878          50 :       if( val != GA_ReadOnly && val != GA_Update )
   56879             :       {
   56880           0 :         SWIG_exception_fail(SWIG_ValueError, "invalid value for GDALAccess");
   56881             :       }
   56882             :       arg2 = static_cast<GDALAccess>(val);
   56883             :     }
   56884             :   }
   56885        5053 :   {
   56886        5053 :     if (!arg1) {
   56887        5053 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   56888             :     }
   56889             :   }
   56890        5053 :   {
   56891        5053 :     const int bLocalUseExceptions = GetUseExceptions();
   56892        5053 :     if ( bLocalUseExceptions ) {
   56893          51 :       pushErrorHandler();
   56894             :     }
   56895        5053 :     {
   56896        5053 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56897        5053 :       result = (GDALDatasetShadow *)OpenShared((char const *)arg1,arg2);
   56898        5053 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56899             :     }
   56900        5053 :     if ( bLocalUseExceptions ) {
   56901          51 :       popErrorHandler();
   56902             :     }
   56903             : #ifndef SED_HACKS
   56904             :     if( result == NULL && bLocalUseExceptions ) {
   56905             :       CPLErr eclass = CPLGetLastErrorType();
   56906             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56907             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56908             :       }
   56909             :     }
   56910             : #endif
   56911        5053 :     if( result != NULL && bLocalUseExceptions ) {
   56912             : #ifdef SED_HACKS
   56913          51 :       bLocalUseExceptionsCode = FALSE;
   56914             : #endif
   56915             :     }
   56916             :   }
   56917        5053 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   56918        5053 :   {
   56919             :     /* %typemap(freearg) (const char *utf8_path) */
   56920        5053 :     GDALPythonFreeCStr(arg1, bToFree1);
   56921             :   }
   56922        5053 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56923             :   return resultobj;
   56924           0 : fail:
   56925           0 :   {
   56926             :     /* %typemap(freearg) (const char *utf8_path) */
   56927        5053 :     GDALPythonFreeCStr(arg1, bToFree1);
   56928             :   }
   56929             :   return NULL;
   56930             : }
   56931             : 
   56932             : 
   56933          11 : SWIGINTERN PyObject *_wrap_IdentifyDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56934          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56935          11 :   char *arg1 = (char *) 0 ;
   56936          11 :   char **arg2 = (char **) NULL ;
   56937          11 :   int bToFree1 = 0 ;
   56938          11 :   PyObject *swig_obj[2] ;
   56939          11 :   GDALDriverShadow *result = 0 ;
   56940             :   
   56941          11 :   if (!SWIG_Python_UnpackTuple(args, "IdentifyDriver", 1, 2, swig_obj)) SWIG_fail;
   56942          11 :   {
   56943             :     /* %typemap(in) (const char *utf8_path) */
   56944          11 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   56945             :     {
   56946          11 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   56947             :     }
   56948             :     else
   56949             :     {
   56950           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   56951             :       
   56952             :     }
   56953          11 :     if (arg1 == NULL)
   56954             :     {
   56955           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   56956           0 :       SWIG_fail;
   56957             :     }
   56958             :   }
   56959          11 :   if (swig_obj[1]) {
   56960           2 :     {
   56961             :       /* %typemap(in) char **dict */
   56962           2 :       arg2 = NULL;
   56963           2 :       if ( PySequence_Check( swig_obj[1] ) ) {
   56964           2 :         int bErr = FALSE;
   56965           2 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   56966           2 :         if ( bErr )
   56967             :         {
   56968           0 :           SWIG_fail;
   56969             :         }
   56970             :       }
   56971           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   56972           0 :         int bErr = FALSE;
   56973           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   56974           0 :         if ( bErr )
   56975             :         {
   56976           0 :           SWIG_fail;
   56977             :         }
   56978             :       }
   56979             :       else {
   56980           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   56981           0 :         SWIG_fail;
   56982             :       }
   56983             :     }
   56984             :   }
   56985          11 :   {
   56986          11 :     if (!arg1) {
   56987          11 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   56988             :     }
   56989             :   }
   56990          11 :   {
   56991          11 :     const int bLocalUseExceptions = GetUseExceptions();
   56992          11 :     if ( bLocalUseExceptions ) {
   56993           6 :       pushErrorHandler();
   56994             :     }
   56995          11 :     {
   56996          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56997          11 :       result = (GDALDriverShadow *)IdentifyDriver((char const *)arg1,arg2);
   56998          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56999             :     }
   57000          11 :     if ( bLocalUseExceptions ) {
   57001           6 :       popErrorHandler();
   57002             :     }
   57003             : #ifndef SED_HACKS
   57004             :     if ( bLocalUseExceptions ) {
   57005             :       CPLErr eclass = CPLGetLastErrorType();
   57006             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57007             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57008             :       }
   57009             :     }
   57010             : #endif
   57011             :   }
   57012          11 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   57013          11 :   {
   57014             :     /* %typemap(freearg) (const char *utf8_path) */
   57015          11 :     GDALPythonFreeCStr(arg1, bToFree1);
   57016             :   }
   57017          11 :   {
   57018             :     /* %typemap(freearg) char **dict */
   57019          11 :     CSLDestroy( arg2 );
   57020             :   }
   57021          11 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57022             :   return resultobj;
   57023           0 : fail:
   57024           0 :   {
   57025             :     /* %typemap(freearg) (const char *utf8_path) */
   57026           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   57027             :   }
   57028           0 :   {
   57029             :     /* %typemap(freearg) char **dict */
   57030           0 :     CSLDestroy( arg2 );
   57031             :   }
   57032             :   return NULL;
   57033             : }
   57034             : 
   57035             : 
   57036          50 : SWIGINTERN PyObject *_wrap_IdentifyDriverEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   57037          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57038          50 :   char *arg1 = (char *) 0 ;
   57039          50 :   unsigned int arg2 = (unsigned int) 0 ;
   57040          50 :   char **arg3 = (char **) NULL ;
   57041          50 :   char **arg4 = (char **) NULL ;
   57042          50 :   int bToFree1 = 0 ;
   57043          50 :   unsigned int val2 ;
   57044          50 :   int ecode2 = 0 ;
   57045          50 :   PyObject * obj0 = 0 ;
   57046          50 :   PyObject * obj1 = 0 ;
   57047          50 :   PyObject * obj2 = 0 ;
   57048          50 :   PyObject * obj3 = 0 ;
   57049          50 :   char * kwnames[] = {
   57050             :     (char *)"utf8_path",  (char *)"nIdentifyFlags",  (char *)"allowed_drivers",  (char *)"sibling_files",  NULL 
   57051             :   };
   57052          50 :   GDALDriverShadow *result = 0 ;
   57053             :   
   57054          50 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOO:IdentifyDriverEx", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   57055          50 :   {
   57056             :     /* %typemap(in) (const char *utf8_path) */
   57057          50 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   57058             :     {
   57059          50 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   57060             :     }
   57061             :     else
   57062             :     {
   57063           0 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   57064             :       
   57065             :     }
   57066          50 :     if (arg1 == NULL)
   57067             :     {
   57068           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   57069           0 :       SWIG_fail;
   57070             :     }
   57071             :   }
   57072          50 :   if (obj1) {
   57073           3 :     ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
   57074           3 :     if (!SWIG_IsOK(ecode2)) {
   57075           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IdentifyDriverEx" "', argument " "2"" of type '" "unsigned int""'");
   57076             :     } 
   57077             :     arg2 = static_cast< unsigned int >(val2);
   57078             :   }
   57079          50 :   if (obj2) {
   57080          41 :     {
   57081             :       /* %typemap(in) char **dict */
   57082          41 :       arg3 = NULL;
   57083          41 :       if ( PySequence_Check( obj2 ) ) {
   57084          41 :         int bErr = FALSE;
   57085          41 :         arg3 = CSLFromPySequence(obj2, &bErr);
   57086          41 :         if ( bErr )
   57087             :         {
   57088           0 :           SWIG_fail;
   57089             :         }
   57090             :       }
   57091           0 :       else if ( PyMapping_Check( obj2 ) ) {
   57092           0 :         int bErr = FALSE;
   57093           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   57094           0 :         if ( bErr )
   57095             :         {
   57096           0 :           SWIG_fail;
   57097             :         }
   57098             :       }
   57099             :       else {
   57100           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   57101           0 :         SWIG_fail;
   57102             :       }
   57103             :     }
   57104             :   }
   57105          50 :   if (obj3) {
   57106           2 :     {
   57107             :       /* %typemap(in) char **dict */
   57108           2 :       arg4 = NULL;
   57109           2 :       if ( PySequence_Check( obj3 ) ) {
   57110           2 :         int bErr = FALSE;
   57111           2 :         arg4 = CSLFromPySequence(obj3, &bErr);
   57112           2 :         if ( bErr )
   57113             :         {
   57114           0 :           SWIG_fail;
   57115             :         }
   57116             :       }
   57117           0 :       else if ( PyMapping_Check( obj3 ) ) {
   57118           0 :         int bErr = FALSE;
   57119           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   57120           0 :         if ( bErr )
   57121             :         {
   57122           0 :           SWIG_fail;
   57123             :         }
   57124             :       }
   57125             :       else {
   57126           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   57127           0 :         SWIG_fail;
   57128             :       }
   57129             :     }
   57130             :   }
   57131          50 :   {
   57132          50 :     if (!arg1) {
   57133          50 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   57134             :     }
   57135             :   }
   57136          50 :   {
   57137          50 :     const int bLocalUseExceptions = GetUseExceptions();
   57138          50 :     if ( bLocalUseExceptions ) {
   57139          45 :       pushErrorHandler();
   57140             :     }
   57141          50 :     {
   57142          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57143          50 :       result = (GDALDriverShadow *)IdentifyDriverEx((char const *)arg1,arg2,arg3,arg4);
   57144          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57145             :     }
   57146          50 :     if ( bLocalUseExceptions ) {
   57147          45 :       popErrorHandler();
   57148             :     }
   57149             : #ifndef SED_HACKS
   57150             :     if ( bLocalUseExceptions ) {
   57151             :       CPLErr eclass = CPLGetLastErrorType();
   57152             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57153             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57154             :       }
   57155             :     }
   57156             : #endif
   57157             :   }
   57158          50 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   57159          50 :   {
   57160             :     /* %typemap(freearg) (const char *utf8_path) */
   57161          50 :     GDALPythonFreeCStr(arg1, bToFree1);
   57162             :   }
   57163          50 :   {
   57164             :     /* %typemap(freearg) char **dict */
   57165          50 :     CSLDestroy( arg3 );
   57166             :   }
   57167          50 :   {
   57168             :     /* %typemap(freearg) char **dict */
   57169          50 :     CSLDestroy( arg4 );
   57170             :   }
   57171          50 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57172             :   return resultobj;
   57173           0 : fail:
   57174           0 :   {
   57175             :     /* %typemap(freearg) (const char *utf8_path) */
   57176           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   57177             :   }
   57178           0 :   {
   57179             :     /* %typemap(freearg) char **dict */
   57180           0 :     CSLDestroy( arg3 );
   57181             :   }
   57182           0 :   {
   57183             :     /* %typemap(freearg) char **dict */
   57184           0 :     CSLDestroy( arg4 );
   57185             :   }
   57186             :   return NULL;
   57187             : }
   57188             : 
   57189             : 
   57190         193 : SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57191         193 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57192         193 :   char **arg1 = (char **) 0 ;
   57193         193 :   int arg2 = (int) 0 ;
   57194         193 :   int val2 ;
   57195         193 :   int ecode2 = 0 ;
   57196         193 :   PyObject *swig_obj[2] ;
   57197         193 :   char **result = 0 ;
   57198             :   
   57199         193 :   if (!SWIG_Python_UnpackTuple(args, "GeneralCmdLineProcessor", 1, 2, swig_obj)) SWIG_fail;
   57200         193 :   {
   57201             :     /* %typemap(in) char **dict */
   57202         193 :     arg1 = NULL;
   57203         193 :     if ( PySequence_Check( swig_obj[0] ) ) {
   57204         193 :       int bErr = FALSE;
   57205         193 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   57206         193 :       if ( bErr )
   57207             :       {
   57208           0 :         SWIG_fail;
   57209             :       }
   57210             :     }
   57211           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   57212           0 :       int bErr = FALSE;
   57213           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   57214           0 :       if ( bErr )
   57215             :       {
   57216           0 :         SWIG_fail;
   57217             :       }
   57218             :     }
   57219             :     else {
   57220           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   57221           0 :       SWIG_fail;
   57222             :     }
   57223             :   }
   57224         193 :   if (swig_obj[1]) {
   57225           0 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   57226           0 :     if (!SWIG_IsOK(ecode2)) {
   57227           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
   57228             :     } 
   57229             :     arg2 = static_cast< int >(val2);
   57230             :   }
   57231         193 :   {
   57232         193 :     const int bLocalUseExceptions = GetUseExceptions();
   57233         193 :     if ( bLocalUseExceptions ) {
   57234         104 :       pushErrorHandler();
   57235             :     }
   57236         193 :     {
   57237         193 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57238         193 :       result = (char **)GeneralCmdLineProcessor(arg1,arg2);
   57239         193 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57240             :     }
   57241         193 :     if ( bLocalUseExceptions ) {
   57242         104 :       popErrorHandler();
   57243             :     }
   57244             : #ifndef SED_HACKS
   57245             :     if ( bLocalUseExceptions ) {
   57246             :       CPLErr eclass = CPLGetLastErrorType();
   57247             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57248             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57249             :       }
   57250             :     }
   57251             : #endif
   57252             :   }
   57253         193 :   {
   57254             :     /* %typemap(out) char **CSL -> ( string ) */
   57255         193 :     bool bErr = false;
   57256         193 :     resultobj = CSLToList(result, &bErr);
   57257         193 :     CSLDestroy(result);
   57258         193 :     if( bErr ) {
   57259           0 :       SWIG_fail;
   57260             :     }
   57261             :   }
   57262         193 :   {
   57263             :     /* %typemap(freearg) char **dict */
   57264         193 :     CSLDestroy( arg1 );
   57265             :   }
   57266         193 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57267             :   return resultobj;
   57268           0 : fail:
   57269           0 :   {
   57270             :     /* %typemap(freearg) char **dict */
   57271           0 :     CSLDestroy( arg1 );
   57272             :   }
   57273             :   return NULL;
   57274             : }
   57275             : 
   57276             : 
   57277          52 : SWIGINTERN PyObject *_wrap_new_GDALInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57278          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57279          52 :   char **arg1 = (char **) 0 ;
   57280          52 :   PyObject *swig_obj[1] ;
   57281          52 :   GDALInfoOptions *result = 0 ;
   57282             :   
   57283          52 :   if (!args) SWIG_fail;
   57284          52 :   swig_obj[0] = args;
   57285          52 :   {
   57286             :     /* %typemap(in) char **dict */
   57287          52 :     arg1 = NULL;
   57288          52 :     if ( PySequence_Check( swig_obj[0] ) ) {
   57289          52 :       int bErr = FALSE;
   57290          52 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   57291          52 :       if ( bErr )
   57292             :       {
   57293           0 :         SWIG_fail;
   57294             :       }
   57295             :     }
   57296           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   57297           0 :       int bErr = FALSE;
   57298           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   57299           0 :       if ( bErr )
   57300             :       {
   57301           0 :         SWIG_fail;
   57302             :       }
   57303             :     }
   57304             :     else {
   57305           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   57306           0 :       SWIG_fail;
   57307             :     }
   57308             :   }
   57309          52 :   {
   57310          52 :     const int bLocalUseExceptions = GetUseExceptions();
   57311          52 :     if ( bLocalUseExceptions ) {
   57312          45 :       pushErrorHandler();
   57313             :     }
   57314          52 :     {
   57315          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57316          52 :       result = (GDALInfoOptions *)new_GDALInfoOptions(arg1);
   57317          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57318             :     }
   57319          52 :     if ( bLocalUseExceptions ) {
   57320          45 :       popErrorHandler();
   57321             :     }
   57322             : #ifndef SED_HACKS
   57323             :     if ( bLocalUseExceptions ) {
   57324             :       CPLErr eclass = CPLGetLastErrorType();
   57325             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57326             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57327             :       }
   57328             :     }
   57329             : #endif
   57330             :   }
   57331          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALInfoOptions, SWIG_POINTER_NEW |  0 );
   57332          52 :   {
   57333             :     /* %typemap(freearg) char **dict */
   57334          52 :     CSLDestroy( arg1 );
   57335             :   }
   57336          52 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57337             :   return resultobj;
   57338           0 : fail:
   57339           0 :   {
   57340             :     /* %typemap(freearg) char **dict */
   57341           0 :     CSLDestroy( arg1 );
   57342             :   }
   57343             :   return NULL;
   57344             : }
   57345             : 
   57346             : 
   57347          52 : SWIGINTERN PyObject *_wrap_delete_GDALInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57348          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57349          52 :   GDALInfoOptions *arg1 = (GDALInfoOptions *) 0 ;
   57350          52 :   void *argp1 = 0 ;
   57351          52 :   int res1 = 0 ;
   57352          52 :   PyObject *swig_obj[1] ;
   57353             :   
   57354          52 :   if (!args) SWIG_fail;
   57355          52 :   swig_obj[0] = args;
   57356          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALInfoOptions, SWIG_POINTER_DISOWN |  0 );
   57357          52 :   if (!SWIG_IsOK(res1)) {
   57358           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALInfoOptions" "', argument " "1"" of type '" "GDALInfoOptions *""'"); 
   57359             :   }
   57360          52 :   arg1 = reinterpret_cast< GDALInfoOptions * >(argp1);
   57361          52 :   {
   57362          52 :     const int bLocalUseExceptions = GetUseExceptions();
   57363          52 :     if ( bLocalUseExceptions ) {
   57364          45 :       pushErrorHandler();
   57365             :     }
   57366          52 :     {
   57367          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57368          52 :       delete_GDALInfoOptions(arg1);
   57369          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57370             :     }
   57371          52 :     if ( bLocalUseExceptions ) {
   57372          45 :       popErrorHandler();
   57373             :     }
   57374             : #ifndef SED_HACKS
   57375             :     if ( bLocalUseExceptions ) {
   57376             :       CPLErr eclass = CPLGetLastErrorType();
   57377             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57378             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57379             :       }
   57380             :     }
   57381             : #endif
   57382             :   }
   57383          52 :   resultobj = SWIG_Py_Void();
   57384          52 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57385             :   return resultobj;
   57386             : fail:
   57387             :   return NULL;
   57388             : }
   57389             : 
   57390             : 
   57391         276 : SWIGINTERN PyObject *GDALInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57392         276 :   PyObject *obj;
   57393         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   57394         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALInfoOptions, SWIG_NewClientData(obj));
   57395         276 :   return SWIG_Py_Void();
   57396             : }
   57397             : 
   57398          52 : SWIGINTERN PyObject *GDALInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57399          52 :   return SWIG_Python_InitShadowInstance(args);
   57400             : }
   57401             : 
   57402          52 : SWIGINTERN PyObject *_wrap_InfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57403          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57404          52 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   57405          52 :   GDALInfoOptions *arg2 = (GDALInfoOptions *) 0 ;
   57406          52 :   void *argp1 = 0 ;
   57407          52 :   int res1 = 0 ;
   57408          52 :   void *argp2 = 0 ;
   57409          52 :   int res2 = 0 ;
   57410          52 :   PyObject *swig_obj[2] ;
   57411          52 :   retStringAndCPLFree *result = 0 ;
   57412             :   
   57413          52 :   if (!SWIG_Python_UnpackTuple(args, "InfoInternal", 2, 2, swig_obj)) SWIG_fail;
   57414          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   57415          52 :   if (!SWIG_IsOK(res1)) {
   57416           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   57417             :   }
   57418          52 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   57419          52 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALInfoOptions, 0 |  0 );
   57420          52 :   if (!SWIG_IsOK(res2)) {
   57421           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InfoInternal" "', argument " "2"" of type '" "GDALInfoOptions *""'"); 
   57422             :   }
   57423          52 :   arg2 = reinterpret_cast< GDALInfoOptions * >(argp2);
   57424          52 :   {
   57425          52 :     const int bLocalUseExceptions = GetUseExceptions();
   57426          52 :     if ( bLocalUseExceptions ) {
   57427          45 :       pushErrorHandler();
   57428             :     }
   57429          52 :     {
   57430          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57431          52 :       result = (retStringAndCPLFree *)GDALInfo(arg1,arg2);
   57432          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57433             :     }
   57434          52 :     if ( bLocalUseExceptions ) {
   57435          45 :       popErrorHandler();
   57436             :     }
   57437             : #ifndef SED_HACKS
   57438             :     if ( bLocalUseExceptions ) {
   57439             :       CPLErr eclass = CPLGetLastErrorType();
   57440             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57441             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57442             :       }
   57443             :     }
   57444             : #endif
   57445             :   }
   57446          52 :   {
   57447             :     /* %typemap(out) (retStringAndCPLFree*) */
   57448          52 :     Py_XDECREF(resultobj);
   57449          52 :     if(result)
   57450             :     {
   57451          52 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   57452          52 :       CPLFree(result);
   57453             :     }
   57454             :     else
   57455             :     {
   57456           0 :       resultobj = Py_None;
   57457           0 :       Py_INCREF(resultobj);
   57458             :     }
   57459             :   }
   57460          52 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57461             :   return resultobj;
   57462             : fail:
   57463             :   return NULL;
   57464             : }
   57465             : 
   57466             : 
   57467          36 : SWIGINTERN PyObject *_wrap_new_GDALVectorInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57468          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57469          36 :   char **arg1 = (char **) 0 ;
   57470          36 :   PyObject *swig_obj[1] ;
   57471          36 :   GDALVectorInfoOptions *result = 0 ;
   57472             :   
   57473          36 :   if (!args) SWIG_fail;
   57474          36 :   swig_obj[0] = args;
   57475          36 :   {
   57476             :     /* %typemap(in) char **dict */
   57477          36 :     arg1 = NULL;
   57478          36 :     if ( PySequence_Check( swig_obj[0] ) ) {
   57479          36 :       int bErr = FALSE;
   57480          36 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   57481          36 :       if ( bErr )
   57482             :       {
   57483           0 :         SWIG_fail;
   57484             :       }
   57485             :     }
   57486           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   57487           0 :       int bErr = FALSE;
   57488           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   57489           0 :       if ( bErr )
   57490             :       {
   57491           0 :         SWIG_fail;
   57492             :       }
   57493             :     }
   57494             :     else {
   57495           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   57496           0 :       SWIG_fail;
   57497             :     }
   57498             :   }
   57499          36 :   {
   57500          36 :     const int bLocalUseExceptions = GetUseExceptions();
   57501          36 :     if ( bLocalUseExceptions ) {
   57502          35 :       pushErrorHandler();
   57503             :     }
   57504          36 :     {
   57505          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57506          36 :       result = (GDALVectorInfoOptions *)new_GDALVectorInfoOptions(arg1);
   57507          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57508             :     }
   57509          36 :     if ( bLocalUseExceptions ) {
   57510          35 :       popErrorHandler();
   57511             :     }
   57512             : #ifndef SED_HACKS
   57513             :     if ( bLocalUseExceptions ) {
   57514             :       CPLErr eclass = CPLGetLastErrorType();
   57515             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57516             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57517             :       }
   57518             :     }
   57519             : #endif
   57520             :   }
   57521          36 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALVectorInfoOptions, SWIG_POINTER_NEW |  0 );
   57522          36 :   {
   57523             :     /* %typemap(freearg) char **dict */
   57524          36 :     CSLDestroy( arg1 );
   57525             :   }
   57526          36 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57527             :   return resultobj;
   57528           0 : fail:
   57529           0 :   {
   57530             :     /* %typemap(freearg) char **dict */
   57531           0 :     CSLDestroy( arg1 );
   57532             :   }
   57533             :   return NULL;
   57534             : }
   57535             : 
   57536             : 
   57537          36 : SWIGINTERN PyObject *_wrap_delete_GDALVectorInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57538          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57539          36 :   GDALVectorInfoOptions *arg1 = (GDALVectorInfoOptions *) 0 ;
   57540          36 :   void *argp1 = 0 ;
   57541          36 :   int res1 = 0 ;
   57542          36 :   PyObject *swig_obj[1] ;
   57543             :   
   57544          36 :   if (!args) SWIG_fail;
   57545          36 :   swig_obj[0] = args;
   57546          36 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALVectorInfoOptions, SWIG_POINTER_DISOWN |  0 );
   57547          36 :   if (!SWIG_IsOK(res1)) {
   57548           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALVectorInfoOptions" "', argument " "1"" of type '" "GDALVectorInfoOptions *""'"); 
   57549             :   }
   57550          36 :   arg1 = reinterpret_cast< GDALVectorInfoOptions * >(argp1);
   57551          36 :   {
   57552          36 :     const int bLocalUseExceptions = GetUseExceptions();
   57553          36 :     if ( bLocalUseExceptions ) {
   57554          35 :       pushErrorHandler();
   57555             :     }
   57556          36 :     {
   57557          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57558          36 :       delete_GDALVectorInfoOptions(arg1);
   57559          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57560             :     }
   57561          36 :     if ( bLocalUseExceptions ) {
   57562          35 :       popErrorHandler();
   57563             :     }
   57564             : #ifndef SED_HACKS
   57565             :     if ( bLocalUseExceptions ) {
   57566             :       CPLErr eclass = CPLGetLastErrorType();
   57567             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57568             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57569             :       }
   57570             :     }
   57571             : #endif
   57572             :   }
   57573          36 :   resultobj = SWIG_Py_Void();
   57574          36 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57575             :   return resultobj;
   57576             : fail:
   57577             :   return NULL;
   57578             : }
   57579             : 
   57580             : 
   57581         276 : SWIGINTERN PyObject *GDALVectorInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57582         276 :   PyObject *obj;
   57583         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   57584         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALVectorInfoOptions, SWIG_NewClientData(obj));
   57585         276 :   return SWIG_Py_Void();
   57586             : }
   57587             : 
   57588          36 : SWIGINTERN PyObject *GDALVectorInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57589          36 :   return SWIG_Python_InitShadowInstance(args);
   57590             : }
   57591             : 
   57592          36 : SWIGINTERN PyObject *_wrap_VectorInfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57593          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57594          36 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   57595          36 :   GDALVectorInfoOptions *arg2 = (GDALVectorInfoOptions *) 0 ;
   57596          36 :   void *argp1 = 0 ;
   57597          36 :   int res1 = 0 ;
   57598          36 :   void *argp2 = 0 ;
   57599          36 :   int res2 = 0 ;
   57600          36 :   PyObject *swig_obj[2] ;
   57601          36 :   retStringAndCPLFree *result = 0 ;
   57602             :   
   57603          36 :   if (!SWIG_Python_UnpackTuple(args, "VectorInfoInternal", 2, 2, swig_obj)) SWIG_fail;
   57604          36 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   57605          36 :   if (!SWIG_IsOK(res1)) {
   57606           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorInfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   57607             :   }
   57608          36 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   57609          36 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALVectorInfoOptions, 0 |  0 );
   57610          36 :   if (!SWIG_IsOK(res2)) {
   57611           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorInfoInternal" "', argument " "2"" of type '" "GDALVectorInfoOptions *""'"); 
   57612             :   }
   57613          36 :   arg2 = reinterpret_cast< GDALVectorInfoOptions * >(argp2);
   57614          36 :   {
   57615          36 :     const int bLocalUseExceptions = GetUseExceptions();
   57616          36 :     if ( bLocalUseExceptions ) {
   57617          35 :       pushErrorHandler();
   57618             :     }
   57619          36 :     {
   57620          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57621          36 :       result = (retStringAndCPLFree *)GDALVectorInfo(arg1,arg2);
   57622          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57623             :     }
   57624          36 :     if ( bLocalUseExceptions ) {
   57625          35 :       popErrorHandler();
   57626             :     }
   57627             : #ifndef SED_HACKS
   57628             :     if ( bLocalUseExceptions ) {
   57629             :       CPLErr eclass = CPLGetLastErrorType();
   57630             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57631             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57632             :       }
   57633             :     }
   57634             : #endif
   57635             :   }
   57636          36 :   {
   57637             :     /* %typemap(out) (retStringAndCPLFree*) */
   57638          36 :     Py_XDECREF(resultobj);
   57639          36 :     if(result)
   57640             :     {
   57641          35 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   57642          35 :       CPLFree(result);
   57643             :     }
   57644             :     else
   57645             :     {
   57646           1 :       resultobj = Py_None;
   57647           1 :       Py_INCREF(resultobj);
   57648             :     }
   57649             :   }
   57650          38 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57651             :   return resultobj;
   57652             : fail:
   57653             :   return NULL;
   57654             : }
   57655             : 
   57656             : 
   57657          27 : SWIGINTERN PyObject *_wrap_new_GDALMultiDimInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57658          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57659          27 :   char **arg1 = (char **) 0 ;
   57660          27 :   PyObject *swig_obj[1] ;
   57661          27 :   GDALMultiDimInfoOptions *result = 0 ;
   57662             :   
   57663          27 :   if (!args) SWIG_fail;
   57664          27 :   swig_obj[0] = args;
   57665          27 :   {
   57666             :     /* %typemap(in) char **dict */
   57667          27 :     arg1 = NULL;
   57668          27 :     if ( PySequence_Check( swig_obj[0] ) ) {
   57669          27 :       int bErr = FALSE;
   57670          27 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   57671          27 :       if ( bErr )
   57672             :       {
   57673           0 :         SWIG_fail;
   57674             :       }
   57675             :     }
   57676           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   57677           0 :       int bErr = FALSE;
   57678           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   57679           0 :       if ( bErr )
   57680             :       {
   57681           0 :         SWIG_fail;
   57682             :       }
   57683             :     }
   57684             :     else {
   57685           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   57686           0 :       SWIG_fail;
   57687             :     }
   57688             :   }
   57689          27 :   {
   57690          27 :     const int bLocalUseExceptions = GetUseExceptions();
   57691          27 :     if ( bLocalUseExceptions ) {
   57692          21 :       pushErrorHandler();
   57693             :     }
   57694          27 :     {
   57695          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57696          27 :       result = (GDALMultiDimInfoOptions *)new_GDALMultiDimInfoOptions(arg1);
   57697          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57698             :     }
   57699          27 :     if ( bLocalUseExceptions ) {
   57700          21 :       popErrorHandler();
   57701             :     }
   57702             : #ifndef SED_HACKS
   57703             :     if ( bLocalUseExceptions ) {
   57704             :       CPLErr eclass = CPLGetLastErrorType();
   57705             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57706             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57707             :       }
   57708             :     }
   57709             : #endif
   57710             :   }
   57711          27 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_POINTER_NEW |  0 );
   57712          27 :   {
   57713             :     /* %typemap(freearg) char **dict */
   57714          27 :     CSLDestroy( arg1 );
   57715             :   }
   57716          27 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57717             :   return resultobj;
   57718           0 : fail:
   57719           0 :   {
   57720             :     /* %typemap(freearg) char **dict */
   57721           0 :     CSLDestroy( arg1 );
   57722             :   }
   57723             :   return NULL;
   57724             : }
   57725             : 
   57726             : 
   57727          27 : SWIGINTERN PyObject *_wrap_delete_GDALMultiDimInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57728          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57729          27 :   GDALMultiDimInfoOptions *arg1 = (GDALMultiDimInfoOptions *) 0 ;
   57730          27 :   void *argp1 = 0 ;
   57731          27 :   int res1 = 0 ;
   57732          27 :   PyObject *swig_obj[1] ;
   57733             :   
   57734          27 :   if (!args) SWIG_fail;
   57735          27 :   swig_obj[0] = args;
   57736          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_POINTER_DISOWN |  0 );
   57737          27 :   if (!SWIG_IsOK(res1)) {
   57738           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALMultiDimInfoOptions" "', argument " "1"" of type '" "GDALMultiDimInfoOptions *""'"); 
   57739             :   }
   57740          27 :   arg1 = reinterpret_cast< GDALMultiDimInfoOptions * >(argp1);
   57741          27 :   {
   57742          27 :     const int bLocalUseExceptions = GetUseExceptions();
   57743          27 :     if ( bLocalUseExceptions ) {
   57744          21 :       pushErrorHandler();
   57745             :     }
   57746          27 :     {
   57747          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57748          27 :       delete_GDALMultiDimInfoOptions(arg1);
   57749          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57750             :     }
   57751          27 :     if ( bLocalUseExceptions ) {
   57752          21 :       popErrorHandler();
   57753             :     }
   57754             : #ifndef SED_HACKS
   57755             :     if ( bLocalUseExceptions ) {
   57756             :       CPLErr eclass = CPLGetLastErrorType();
   57757             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57758             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57759             :       }
   57760             :     }
   57761             : #endif
   57762             :   }
   57763          27 :   resultobj = SWIG_Py_Void();
   57764          27 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57765             :   return resultobj;
   57766             : fail:
   57767             :   return NULL;
   57768             : }
   57769             : 
   57770             : 
   57771         276 : SWIGINTERN PyObject *GDALMultiDimInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57772         276 :   PyObject *obj;
   57773         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   57774         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_NewClientData(obj));
   57775         276 :   return SWIG_Py_Void();
   57776             : }
   57777             : 
   57778          27 : SWIGINTERN PyObject *GDALMultiDimInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57779          27 :   return SWIG_Python_InitShadowInstance(args);
   57780             : }
   57781             : 
   57782          26 : SWIGINTERN PyObject *_wrap_MultiDimInfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57783          26 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57784          26 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   57785          26 :   GDALMultiDimInfoOptions *arg2 = (GDALMultiDimInfoOptions *) 0 ;
   57786          26 :   void *argp1 = 0 ;
   57787          26 :   int res1 = 0 ;
   57788          26 :   void *argp2 = 0 ;
   57789          26 :   int res2 = 0 ;
   57790          26 :   PyObject *swig_obj[2] ;
   57791          26 :   retStringAndCPLFree *result = 0 ;
   57792             :   
   57793          26 :   if (!SWIG_Python_UnpackTuple(args, "MultiDimInfoInternal", 2, 2, swig_obj)) SWIG_fail;
   57794          26 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   57795          26 :   if (!SWIG_IsOK(res1)) {
   57796           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiDimInfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   57797             :   }
   57798          26 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   57799          26 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALMultiDimInfoOptions, 0 |  0 );
   57800          26 :   if (!SWIG_IsOK(res2)) {
   57801           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiDimInfoInternal" "', argument " "2"" of type '" "GDALMultiDimInfoOptions *""'"); 
   57802             :   }
   57803          26 :   arg2 = reinterpret_cast< GDALMultiDimInfoOptions * >(argp2);
   57804          26 :   {
   57805          26 :     const int bLocalUseExceptions = GetUseExceptions();
   57806          26 :     if ( bLocalUseExceptions ) {
   57807          20 :       pushErrorHandler();
   57808             :     }
   57809          26 :     {
   57810          26 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57811          26 :       result = (retStringAndCPLFree *)GDALMultiDimInfo(arg1,arg2);
   57812          26 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57813             :     }
   57814          26 :     if ( bLocalUseExceptions ) {
   57815          20 :       popErrorHandler();
   57816             :     }
   57817             : #ifndef SED_HACKS
   57818             :     if ( bLocalUseExceptions ) {
   57819             :       CPLErr eclass = CPLGetLastErrorType();
   57820             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57821             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57822             :       }
   57823             :     }
   57824             : #endif
   57825             :   }
   57826          26 :   {
   57827             :     /* %typemap(out) (retStringAndCPLFree*) */
   57828          26 :     Py_XDECREF(resultobj);
   57829          26 :     if(result)
   57830             :     {
   57831          25 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   57832          25 :       CPLFree(result);
   57833             :     }
   57834             :     else
   57835             :     {
   57836           1 :       resultobj = Py_None;
   57837           1 :       Py_INCREF(resultobj);
   57838             :     }
   57839             :   }
   57840          26 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57841             :   return resultobj;
   57842             : fail:
   57843             :   return NULL;
   57844             : }
   57845             : 
   57846             : 
   57847        1984 : SWIGINTERN PyObject *_wrap_new_GDALTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57848        1984 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57849        1984 :   char **arg1 = (char **) 0 ;
   57850        1984 :   PyObject *swig_obj[1] ;
   57851        1984 :   GDALTranslateOptions *result = 0 ;
   57852             :   
   57853        1984 :   if (!args) SWIG_fail;
   57854        1984 :   swig_obj[0] = args;
   57855        1984 :   {
   57856             :     /* %typemap(in) char **dict */
   57857        1984 :     arg1 = NULL;
   57858        1984 :     if ( PySequence_Check( swig_obj[0] ) ) {
   57859        1984 :       int bErr = FALSE;
   57860        1984 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   57861        1984 :       if ( bErr )
   57862             :       {
   57863           0 :         SWIG_fail;
   57864             :       }
   57865             :     }
   57866           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   57867           0 :       int bErr = FALSE;
   57868           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   57869           0 :       if ( bErr )
   57870             :       {
   57871           0 :         SWIG_fail;
   57872             :       }
   57873             :     }
   57874             :     else {
   57875           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   57876           0 :       SWIG_fail;
   57877             :     }
   57878             :   }
   57879        1984 :   {
   57880        1984 :     const int bLocalUseExceptions = GetUseExceptions();
   57881        1984 :     if ( bLocalUseExceptions ) {
   57882         854 :       pushErrorHandler();
   57883             :     }
   57884        1984 :     {
   57885        1984 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57886        1984 :       result = (GDALTranslateOptions *)new_GDALTranslateOptions(arg1);
   57887        1984 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57888             :     }
   57889        1984 :     if ( bLocalUseExceptions ) {
   57890         854 :       popErrorHandler();
   57891             :     }
   57892             : #ifndef SED_HACKS
   57893             :     if ( bLocalUseExceptions ) {
   57894             :       CPLErr eclass = CPLGetLastErrorType();
   57895             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57896             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57897             :       }
   57898             :     }
   57899             : #endif
   57900             :   }
   57901        1984 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTranslateOptions, SWIG_POINTER_NEW |  0 );
   57902        1984 :   {
   57903             :     /* %typemap(freearg) char **dict */
   57904        1984 :     CSLDestroy( arg1 );
   57905             :   }
   57906        1992 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57907             :   return resultobj;
   57908           0 : fail:
   57909           0 :   {
   57910             :     /* %typemap(freearg) char **dict */
   57911           0 :     CSLDestroy( arg1 );
   57912             :   }
   57913             :   return NULL;
   57914             : }
   57915             : 
   57916             : 
   57917        1980 : SWIGINTERN PyObject *_wrap_delete_GDALTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57918        1980 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57919        1980 :   GDALTranslateOptions *arg1 = (GDALTranslateOptions *) 0 ;
   57920        1980 :   void *argp1 = 0 ;
   57921        1980 :   int res1 = 0 ;
   57922        1980 :   PyObject *swig_obj[1] ;
   57923             :   
   57924        1980 :   if (!args) SWIG_fail;
   57925        1980 :   swig_obj[0] = args;
   57926        1980 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   57927        1980 :   if (!SWIG_IsOK(res1)) {
   57928           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTranslateOptions" "', argument " "1"" of type '" "GDALTranslateOptions *""'"); 
   57929             :   }
   57930        1980 :   arg1 = reinterpret_cast< GDALTranslateOptions * >(argp1);
   57931        1980 :   {
   57932        1980 :     const int bLocalUseExceptions = GetUseExceptions();
   57933        1980 :     if ( bLocalUseExceptions ) {
   57934         850 :       pushErrorHandler();
   57935             :     }
   57936        1980 :     {
   57937        1980 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57938        1980 :       delete_GDALTranslateOptions(arg1);
   57939        1980 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57940             :     }
   57941        1980 :     if ( bLocalUseExceptions ) {
   57942         850 :       popErrorHandler();
   57943             :     }
   57944             : #ifndef SED_HACKS
   57945             :     if ( bLocalUseExceptions ) {
   57946             :       CPLErr eclass = CPLGetLastErrorType();
   57947             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57948             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57949             :       }
   57950             :     }
   57951             : #endif
   57952             :   }
   57953        1980 :   resultobj = SWIG_Py_Void();
   57954        1980 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57955             :   return resultobj;
   57956             : fail:
   57957             :   return NULL;
   57958             : }
   57959             : 
   57960             : 
   57961         276 : SWIGINTERN PyObject *GDALTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57962         276 :   PyObject *obj;
   57963         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   57964         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTranslateOptions, SWIG_NewClientData(obj));
   57965         276 :   return SWIG_Py_Void();
   57966             : }
   57967             : 
   57968        1980 : SWIGINTERN PyObject *GDALTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57969        1980 :   return SWIG_Python_InitShadowInstance(args);
   57970             : }
   57971             : 
   57972        1983 : SWIGINTERN PyObject *_wrap_TranslateInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57973        1983 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57974        1983 :   char *arg1 = (char *) 0 ;
   57975        1983 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   57976        1983 :   GDALTranslateOptions *arg3 = (GDALTranslateOptions *) 0 ;
   57977        1983 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   57978        1983 :   void *arg5 = (void *) NULL ;
   57979        1983 :   int bToFree1 = 0 ;
   57980        1983 :   void *argp2 = 0 ;
   57981        1983 :   int res2 = 0 ;
   57982        1983 :   void *argp3 = 0 ;
   57983        1983 :   int res3 = 0 ;
   57984        1983 :   PyObject *swig_obj[5] ;
   57985        1983 :   GDALDatasetShadow *result = 0 ;
   57986             :   
   57987             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   57988        1983 :   PyProgressData *psProgressInfo;
   57989        1983 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   57990        1983 :   psProgressInfo->nLastReported = -1;
   57991        1983 :   psProgressInfo->psPyCallback = NULL;
   57992        1983 :   psProgressInfo->psPyCallbackData = NULL;
   57993        1983 :   arg5 = psProgressInfo;
   57994        1983 :   if (!SWIG_Python_UnpackTuple(args, "TranslateInternal", 3, 5, swig_obj)) SWIG_fail;
   57995        1983 :   {
   57996             :     /* %typemap(in) (const char *utf8_path) */
   57997        1983 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   57998             :     {
   57999        1900 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   58000             :     }
   58001             :     else
   58002             :     {
   58003          83 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   58004             :       
   58005             :     }
   58006        1983 :     if (arg1 == NULL)
   58007             :     {
   58008           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58009           1 :       SWIG_fail;
   58010             :     }
   58011             :   }
   58012        1982 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   58013        1982 :   if (!SWIG_IsOK(res2)) {
   58014           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TranslateInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   58015             :   }
   58016        1982 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   58017        1982 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALTranslateOptions, 0 |  0 );
   58018        1982 :   if (!SWIG_IsOK(res3)) {
   58019           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TranslateInternal" "', argument " "3"" of type '" "GDALTranslateOptions *""'"); 
   58020             :   }
   58021        1982 :   arg3 = reinterpret_cast< GDALTranslateOptions * >(argp3);
   58022        1982 :   if (swig_obj[3]) {
   58023        1981 :     {
   58024             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   58025             :       /* callback_func typemap */
   58026             :       
   58027             :       /* In some cases 0 is passed instead of None. */
   58028             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   58029        1981 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   58030             :       {
   58031           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   58032             :         {
   58033           0 :           swig_obj[3] = Py_None;
   58034             :         }
   58035             :       }
   58036             :       
   58037        1981 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   58038           3 :         void* cbfunction = NULL;
   58039           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   58040             :             (void**)&cbfunction,
   58041             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   58042             :             SWIG_POINTER_EXCEPTION | 0 ));
   58043             :         
   58044           3 :         if ( cbfunction == GDALTermProgress ) {
   58045             :           arg4 = GDALTermProgress;
   58046             :         } else {
   58047           3 :           if (!PyCallable_Check(swig_obj[3])) {
   58048           0 :             PyErr_SetString( PyExc_RuntimeError,
   58049             :               "Object given is not a Python function" );
   58050           0 :             SWIG_fail;
   58051             :           }
   58052           3 :           psProgressInfo->psPyCallback = swig_obj[3];
   58053           3 :           arg4 = PyProgressProxy;
   58054             :         }
   58055             :         
   58056             :       }
   58057             :       
   58058             :     }
   58059             :   }
   58060        1982 :   if (swig_obj[4]) {
   58061        1980 :     {
   58062             :       /* %typemap(in) ( void* callback_data=NULL)  */
   58063        1980 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   58064             :     }
   58065             :   }
   58066        1982 :   {
   58067        1982 :     if (!arg1) {
   58068        1982 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58069             :     }
   58070             :   }
   58071        1982 :   {
   58072        1982 :     if (!arg2) {
   58073           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58074             :     }
   58075             :   }
   58076        1982 :   {
   58077        1982 :     const int bLocalUseExceptions = GetUseExceptions();
   58078        1982 :     if ( bLocalUseExceptions ) {
   58079         852 :       pushErrorHandler();
   58080             :     }
   58081        1982 :     {
   58082        1982 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58083        1982 :       result = (GDALDatasetShadow *)wrapper_GDALTranslate((char const *)arg1,arg2,arg3,arg4,arg5);
   58084        1982 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58085             :     }
   58086        1982 :     if ( bLocalUseExceptions ) {
   58087         852 :       popErrorHandler();
   58088             :     }
   58089             : #ifndef SED_HACKS
   58090             :     if ( bLocalUseExceptions ) {
   58091             :       CPLErr eclass = CPLGetLastErrorType();
   58092             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58093             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58094             :       }
   58095             :     }
   58096             : #endif
   58097             :   }
   58098        1982 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   58099        1982 :   {
   58100             :     /* %typemap(freearg) (const char *utf8_path) */
   58101        1982 :     GDALPythonFreeCStr(arg1, bToFree1);
   58102             :   }
   58103        1982 :   {
   58104             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   58105             :     
   58106        1982 :     CPLFree(psProgressInfo);
   58107             :     
   58108             :   }
   58109        2021 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58110             :   return resultobj;
   58111           1 : fail:
   58112           1 :   {
   58113             :     /* %typemap(freearg) (const char *utf8_path) */
   58114           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   58115             :   }
   58116           1 :   {
   58117             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   58118             :     
   58119           1 :     CPLFree(psProgressInfo);
   58120             :     
   58121             :   }
   58122             :   return NULL;
   58123             : }
   58124             : 
   58125             : 
   58126         769 : SWIGINTERN PyObject *_wrap_new_GDALWarpAppOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58127         769 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58128         769 :   char **arg1 = (char **) 0 ;
   58129         769 :   PyObject *swig_obj[1] ;
   58130         769 :   GDALWarpAppOptions *result = 0 ;
   58131             :   
   58132         769 :   if (!args) SWIG_fail;
   58133         769 :   swig_obj[0] = args;
   58134         769 :   {
   58135             :     /* %typemap(in) char **dict */
   58136         769 :     arg1 = NULL;
   58137         769 :     if ( PySequence_Check( swig_obj[0] ) ) {
   58138         769 :       int bErr = FALSE;
   58139         769 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   58140         769 :       if ( bErr )
   58141             :       {
   58142           0 :         SWIG_fail;
   58143             :       }
   58144             :     }
   58145           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   58146           0 :       int bErr = FALSE;
   58147           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   58148           0 :       if ( bErr )
   58149             :       {
   58150           0 :         SWIG_fail;
   58151             :       }
   58152             :     }
   58153             :     else {
   58154           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58155           0 :       SWIG_fail;
   58156             :     }
   58157             :   }
   58158         769 :   {
   58159         769 :     const int bLocalUseExceptions = GetUseExceptions();
   58160         769 :     if ( bLocalUseExceptions ) {
   58161         745 :       pushErrorHandler();
   58162             :     }
   58163         769 :     {
   58164         769 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58165         769 :       result = (GDALWarpAppOptions *)new_GDALWarpAppOptions(arg1);
   58166         769 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58167             :     }
   58168         769 :     if ( bLocalUseExceptions ) {
   58169         745 :       popErrorHandler();
   58170             :     }
   58171             : #ifndef SED_HACKS
   58172             :     if ( bLocalUseExceptions ) {
   58173             :       CPLErr eclass = CPLGetLastErrorType();
   58174             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58175             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58176             :       }
   58177             :     }
   58178             : #endif
   58179             :   }
   58180         769 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALWarpAppOptions, SWIG_POINTER_NEW |  0 );
   58181         769 :   {
   58182             :     /* %typemap(freearg) char **dict */
   58183         769 :     CSLDestroy( arg1 );
   58184             :   }
   58185         773 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58186             :   return resultobj;
   58187           0 : fail:
   58188           0 :   {
   58189             :     /* %typemap(freearg) char **dict */
   58190           0 :     CSLDestroy( arg1 );
   58191             :   }
   58192             :   return NULL;
   58193             : }
   58194             : 
   58195             : 
   58196         767 : SWIGINTERN PyObject *_wrap_delete_GDALWarpAppOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58197         767 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58198         767 :   GDALWarpAppOptions *arg1 = (GDALWarpAppOptions *) 0 ;
   58199         767 :   void *argp1 = 0 ;
   58200         767 :   int res1 = 0 ;
   58201         767 :   PyObject *swig_obj[1] ;
   58202             :   
   58203         767 :   if (!args) SWIG_fail;
   58204         767 :   swig_obj[0] = args;
   58205         767 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALWarpAppOptions, SWIG_POINTER_DISOWN |  0 );
   58206         767 :   if (!SWIG_IsOK(res1)) {
   58207           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALWarpAppOptions" "', argument " "1"" of type '" "GDALWarpAppOptions *""'"); 
   58208             :   }
   58209         767 :   arg1 = reinterpret_cast< GDALWarpAppOptions * >(argp1);
   58210         767 :   {
   58211         767 :     const int bLocalUseExceptions = GetUseExceptions();
   58212         767 :     if ( bLocalUseExceptions ) {
   58213         743 :       pushErrorHandler();
   58214             :     }
   58215         767 :     {
   58216         767 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58217         767 :       delete_GDALWarpAppOptions(arg1);
   58218         767 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58219             :     }
   58220         767 :     if ( bLocalUseExceptions ) {
   58221         743 :       popErrorHandler();
   58222             :     }
   58223             : #ifndef SED_HACKS
   58224             :     if ( bLocalUseExceptions ) {
   58225             :       CPLErr eclass = CPLGetLastErrorType();
   58226             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58227             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58228             :       }
   58229             :     }
   58230             : #endif
   58231             :   }
   58232         767 :   resultobj = SWIG_Py_Void();
   58233         767 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58234             :   return resultobj;
   58235             : fail:
   58236             :   return NULL;
   58237             : }
   58238             : 
   58239             : 
   58240         276 : SWIGINTERN PyObject *GDALWarpAppOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58241         276 :   PyObject *obj;
   58242         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   58243         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALWarpAppOptions, SWIG_NewClientData(obj));
   58244         276 :   return SWIG_Py_Void();
   58245             : }
   58246             : 
   58247         767 : SWIGINTERN PyObject *GDALWarpAppOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58248         767 :   return SWIG_Python_InitShadowInstance(args);
   58249             : }
   58250             : 
   58251          87 : SWIGINTERN PyObject *_wrap_wrapper_GDALWarpDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58252          87 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58253          87 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   58254          87 :   int arg2 ;
   58255          87 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   58256          87 :   GDALWarpAppOptions *arg4 = (GDALWarpAppOptions *) 0 ;
   58257          87 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   58258          87 :   void *arg6 = (void *) NULL ;
   58259          87 :   void *argp1 = 0 ;
   58260          87 :   int res1 = 0 ;
   58261          87 :   void *argp4 = 0 ;
   58262          87 :   int res4 = 0 ;
   58263          87 :   PyObject *swig_obj[5] ;
   58264          87 :   int result;
   58265             :   
   58266             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   58267          87 :   PyProgressData *psProgressInfo;
   58268          87 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   58269          87 :   psProgressInfo->nLastReported = -1;
   58270          87 :   psProgressInfo->psPyCallback = NULL;
   58271          87 :   psProgressInfo->psPyCallbackData = NULL;
   58272          87 :   arg6 = psProgressInfo;
   58273          87 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALWarpDestDS", 3, 5, swig_obj)) SWIG_fail;
   58274          87 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   58275          87 :   if (!SWIG_IsOK(res1)) {
   58276           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALWarpDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   58277             :   }
   58278          87 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   58279          87 :   {
   58280             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   58281          87 :     if ( !PySequence_Check(swig_obj[1]) ) {
   58282           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   58283           0 :       SWIG_fail;
   58284             :     }
   58285          87 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   58286          87 :     if( size > (Py_ssize_t)INT_MAX ) {
   58287           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   58288           0 :       SWIG_fail;
   58289             :     }
   58290          87 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   58291           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   58292           0 :       SWIG_fail;
   58293             :     }
   58294          87 :     arg2 = (int)size;
   58295          87 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   58296          87 :     if( !arg3) {
   58297           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   58298           0 :       SWIG_fail;
   58299             :     }
   58300             :     
   58301         172 :     for( int i = 0; i<arg2; i++ ) {
   58302          85 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   58303          85 :       GDALDatasetShadow* rawobjectpointer = NULL;
   58304          85 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   58305          85 :       if (!rawobjectpointer) {
   58306           0 :         Py_DECREF(o);
   58307           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   58308           0 :         SWIG_fail;
   58309             :       }
   58310          85 :       arg3[i] = rawobjectpointer;
   58311          85 :       Py_DECREF(o);
   58312             :       
   58313             :     }
   58314             :   }
   58315          87 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALWarpAppOptions, 0 |  0 );
   58316          87 :   if (!SWIG_IsOK(res4)) {
   58317           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALWarpDestDS" "', argument " "4"" of type '" "GDALWarpAppOptions *""'"); 
   58318             :   }
   58319          87 :   arg4 = reinterpret_cast< GDALWarpAppOptions * >(argp4);
   58320          87 :   if (swig_obj[3]) {
   58321          86 :     {
   58322             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   58323             :       /* callback_func typemap */
   58324             :       
   58325             :       /* In some cases 0 is passed instead of None. */
   58326             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   58327          86 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   58328             :       {
   58329           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   58330             :         {
   58331           0 :           swig_obj[3] = Py_None;
   58332             :         }
   58333             :       }
   58334             :       
   58335          86 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   58336           1 :         void* cbfunction = NULL;
   58337           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   58338             :             (void**)&cbfunction,
   58339             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   58340             :             SWIG_POINTER_EXCEPTION | 0 ));
   58341             :         
   58342           1 :         if ( cbfunction == GDALTermProgress ) {
   58343             :           arg5 = GDALTermProgress;
   58344             :         } else {
   58345           1 :           if (!PyCallable_Check(swig_obj[3])) {
   58346           0 :             PyErr_SetString( PyExc_RuntimeError,
   58347             :               "Object given is not a Python function" );
   58348           0 :             SWIG_fail;
   58349             :           }
   58350           1 :           psProgressInfo->psPyCallback = swig_obj[3];
   58351           1 :           arg5 = PyProgressProxy;
   58352             :         }
   58353             :         
   58354             :       }
   58355             :       
   58356             :     }
   58357             :   }
   58358          87 :   if (swig_obj[4]) {
   58359          85 :     {
   58360             :       /* %typemap(in) ( void* callback_data=NULL)  */
   58361          85 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   58362             :     }
   58363             :   }
   58364          87 :   {
   58365          87 :     if (!arg1) {
   58366           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58367             :     }
   58368             :   }
   58369          86 :   {
   58370          86 :     const int bLocalUseExceptions = GetUseExceptions();
   58371          86 :     if ( bLocalUseExceptions ) {
   58372          86 :       pushErrorHandler();
   58373             :     }
   58374          86 :     {
   58375          86 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58376          86 :       result = (int)wrapper_GDALWarpDestDS(arg1,arg2,arg3,arg4,arg5,arg6);
   58377          86 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58378             :     }
   58379          86 :     if ( bLocalUseExceptions ) {
   58380          86 :       popErrorHandler();
   58381             :     }
   58382             : #ifndef SED_HACKS
   58383             :     if ( bLocalUseExceptions ) {
   58384             :       CPLErr eclass = CPLGetLastErrorType();
   58385             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58386             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58387             :       }
   58388             :     }
   58389             : #endif
   58390             :   }
   58391          86 :   resultobj = SWIG_From_int(static_cast< int >(result));
   58392          86 :   {
   58393             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   58394          86 :     CPLFree( arg3 );
   58395             :   }
   58396          86 :   {
   58397             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   58398             :     
   58399          86 :     CPLFree(psProgressInfo);
   58400             :     
   58401             :   }
   58402          91 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58403             :   return resultobj;
   58404           1 : fail:
   58405           1 :   {
   58406             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   58407           1 :     CPLFree( arg3 );
   58408             :   }
   58409           1 :   {
   58410             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   58411             :     
   58412           1 :     CPLFree(psProgressInfo);
   58413             :     
   58414             :   }
   58415             :   return NULL;
   58416             : }
   58417             : 
   58418             : 
   58419         685 : SWIGINTERN PyObject *_wrap_wrapper_GDALWarpDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58420         685 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58421         685 :   char *arg1 = (char *) 0 ;
   58422         685 :   int arg2 ;
   58423         685 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   58424         685 :   GDALWarpAppOptions *arg4 = (GDALWarpAppOptions *) 0 ;
   58425         685 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   58426         685 :   void *arg6 = (void *) NULL ;
   58427         685 :   int bToFree1 = 0 ;
   58428         685 :   void *argp4 = 0 ;
   58429         685 :   int res4 = 0 ;
   58430         685 :   PyObject *swig_obj[5] ;
   58431         685 :   GDALDatasetShadow *result = 0 ;
   58432             :   
   58433             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   58434         685 :   PyProgressData *psProgressInfo;
   58435         685 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   58436         685 :   psProgressInfo->nLastReported = -1;
   58437         685 :   psProgressInfo->psPyCallback = NULL;
   58438         685 :   psProgressInfo->psPyCallbackData = NULL;
   58439         685 :   arg6 = psProgressInfo;
   58440         685 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALWarpDestName", 3, 5, swig_obj)) SWIG_fail;
   58441         685 :   {
   58442             :     /* %typemap(in) (const char *utf8_path) */
   58443         685 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   58444             :     {
   58445         639 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   58446             :     }
   58447             :     else
   58448             :     {
   58449          46 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   58450             :       
   58451             :     }
   58452         685 :     if (arg1 == NULL)
   58453             :     {
   58454           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58455           1 :       SWIG_fail;
   58456             :     }
   58457             :   }
   58458         684 :   {
   58459             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   58460         684 :     if ( !PySequence_Check(swig_obj[1]) ) {
   58461           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   58462           0 :       SWIG_fail;
   58463             :     }
   58464         684 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   58465         684 :     if( size > (Py_ssize_t)INT_MAX ) {
   58466           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   58467           0 :       SWIG_fail;
   58468             :     }
   58469         684 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   58470           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   58471           0 :       SWIG_fail;
   58472             :     }
   58473         684 :     arg2 = (int)size;
   58474         684 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   58475         684 :     if( !arg3) {
   58476           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   58477           0 :       SWIG_fail;
   58478             :     }
   58479             :     
   58480        1386 :     for( int i = 0; i<arg2; i++ ) {
   58481         702 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   58482         702 :       GDALDatasetShadow* rawobjectpointer = NULL;
   58483         702 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   58484         702 :       if (!rawobjectpointer) {
   58485           0 :         Py_DECREF(o);
   58486           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   58487           0 :         SWIG_fail;
   58488             :       }
   58489         702 :       arg3[i] = rawobjectpointer;
   58490         702 :       Py_DECREF(o);
   58491             :       
   58492             :     }
   58493             :   }
   58494         684 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALWarpAppOptions, 0 |  0 );
   58495         684 :   if (!SWIG_IsOK(res4)) {
   58496           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALWarpDestName" "', argument " "4"" of type '" "GDALWarpAppOptions *""'"); 
   58497             :   }
   58498         684 :   arg4 = reinterpret_cast< GDALWarpAppOptions * >(argp4);
   58499         684 :   if (swig_obj[3]) {
   58500         683 :     {
   58501             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   58502             :       /* callback_func typemap */
   58503             :       
   58504             :       /* In some cases 0 is passed instead of None. */
   58505             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   58506         683 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   58507             :       {
   58508           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   58509             :         {
   58510           0 :           swig_obj[3] = Py_None;
   58511             :         }
   58512             :       }
   58513             :       
   58514         683 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   58515           2 :         void* cbfunction = NULL;
   58516           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   58517             :             (void**)&cbfunction,
   58518             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   58519             :             SWIG_POINTER_EXCEPTION | 0 ));
   58520             :         
   58521           2 :         if ( cbfunction == GDALTermProgress ) {
   58522             :           arg5 = GDALTermProgress;
   58523             :         } else {
   58524           2 :           if (!PyCallable_Check(swig_obj[3])) {
   58525           0 :             PyErr_SetString( PyExc_RuntimeError,
   58526             :               "Object given is not a Python function" );
   58527           0 :             SWIG_fail;
   58528             :           }
   58529           2 :           psProgressInfo->psPyCallback = swig_obj[3];
   58530           2 :           arg5 = PyProgressProxy;
   58531             :         }
   58532             :         
   58533             :       }
   58534             :       
   58535             :     }
   58536             :   }
   58537         684 :   if (swig_obj[4]) {
   58538         682 :     {
   58539             :       /* %typemap(in) ( void* callback_data=NULL)  */
   58540         682 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   58541             :     }
   58542             :   }
   58543         684 :   {
   58544         684 :     if (!arg1) {
   58545         684 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58546             :     }
   58547             :   }
   58548         684 :   {
   58549         684 :     const int bLocalUseExceptions = GetUseExceptions();
   58550         684 :     if ( bLocalUseExceptions ) {
   58551         660 :       pushErrorHandler();
   58552             :     }
   58553         684 :     {
   58554         684 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58555         684 :       result = (GDALDatasetShadow *)wrapper_GDALWarpDestName((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   58556         684 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58557             :     }
   58558         684 :     if ( bLocalUseExceptions ) {
   58559         660 :       popErrorHandler();
   58560             :     }
   58561             : #ifndef SED_HACKS
   58562             :     if ( bLocalUseExceptions ) {
   58563             :       CPLErr eclass = CPLGetLastErrorType();
   58564             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58565             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58566             :       }
   58567             :     }
   58568             : #endif
   58569             :   }
   58570         684 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   58571         684 :   {
   58572             :     /* %typemap(freearg) (const char *utf8_path) */
   58573         684 :     GDALPythonFreeCStr(arg1, bToFree1);
   58574             :   }
   58575         684 :   {
   58576             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   58577         684 :     CPLFree( arg3 );
   58578             :   }
   58579         684 :   {
   58580             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   58581             :     
   58582         684 :     CPLFree(psProgressInfo);
   58583             :     
   58584             :   }
   58585         765 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58586             :   return resultobj;
   58587           1 : fail:
   58588           1 :   {
   58589             :     /* %typemap(freearg) (const char *utf8_path) */
   58590           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   58591             :   }
   58592           1 :   {
   58593             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   58594           1 :     CPLFree( arg3 );
   58595             :   }
   58596           1 :   {
   58597             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   58598             :     
   58599           1 :     CPLFree(psProgressInfo);
   58600             :     
   58601             :   }
   58602             :   return NULL;
   58603             : }
   58604             : 
   58605             : 
   58606         639 : SWIGINTERN PyObject *_wrap_new_GDALVectorTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58607         639 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58608         639 :   char **arg1 = (char **) 0 ;
   58609         639 :   PyObject *swig_obj[1] ;
   58610         639 :   GDALVectorTranslateOptions *result = 0 ;
   58611             :   
   58612         639 :   if (!args) SWIG_fail;
   58613         639 :   swig_obj[0] = args;
   58614         639 :   {
   58615             :     /* %typemap(in) char **dict */
   58616         639 :     arg1 = NULL;
   58617         639 :     if ( PySequence_Check( swig_obj[0] ) ) {
   58618         639 :       int bErr = FALSE;
   58619         639 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   58620         639 :       if ( bErr )
   58621             :       {
   58622           0 :         SWIG_fail;
   58623             :       }
   58624             :     }
   58625           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   58626           0 :       int bErr = FALSE;
   58627           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   58628           0 :       if ( bErr )
   58629             :       {
   58630           0 :         SWIG_fail;
   58631             :       }
   58632             :     }
   58633             :     else {
   58634           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58635           0 :       SWIG_fail;
   58636             :     }
   58637             :   }
   58638         639 :   {
   58639         639 :     const int bLocalUseExceptions = GetUseExceptions();
   58640         639 :     if ( bLocalUseExceptions ) {
   58641         487 :       pushErrorHandler();
   58642             :     }
   58643         639 :     {
   58644         639 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58645         639 :       result = (GDALVectorTranslateOptions *)new_GDALVectorTranslateOptions(arg1);
   58646         639 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58647             :     }
   58648         639 :     if ( bLocalUseExceptions ) {
   58649         487 :       popErrorHandler();
   58650             :     }
   58651             : #ifndef SED_HACKS
   58652             :     if ( bLocalUseExceptions ) {
   58653             :       CPLErr eclass = CPLGetLastErrorType();
   58654             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58655             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58656             :       }
   58657             :     }
   58658             : #endif
   58659             :   }
   58660         639 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_POINTER_NEW |  0 );
   58661         639 :   {
   58662             :     /* %typemap(freearg) char **dict */
   58663         639 :     CSLDestroy( arg1 );
   58664             :   }
   58665         693 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58666             :   return resultobj;
   58667           0 : fail:
   58668           0 :   {
   58669             :     /* %typemap(freearg) char **dict */
   58670           0 :     CSLDestroy( arg1 );
   58671             :   }
   58672             :   return NULL;
   58673             : }
   58674             : 
   58675             : 
   58676         612 : SWIGINTERN PyObject *_wrap_delete_GDALVectorTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58677         612 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58678         612 :   GDALVectorTranslateOptions *arg1 = (GDALVectorTranslateOptions *) 0 ;
   58679         612 :   void *argp1 = 0 ;
   58680         612 :   int res1 = 0 ;
   58681         612 :   PyObject *swig_obj[1] ;
   58682             :   
   58683         612 :   if (!args) SWIG_fail;
   58684         612 :   swig_obj[0] = args;
   58685         612 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   58686         612 :   if (!SWIG_IsOK(res1)) {
   58687           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALVectorTranslateOptions" "', argument " "1"" of type '" "GDALVectorTranslateOptions *""'"); 
   58688             :   }
   58689         612 :   arg1 = reinterpret_cast< GDALVectorTranslateOptions * >(argp1);
   58690         612 :   {
   58691         612 :     const int bLocalUseExceptions = GetUseExceptions();
   58692         612 :     if ( bLocalUseExceptions ) {
   58693         460 :       pushErrorHandler();
   58694             :     }
   58695         612 :     {
   58696         612 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58697         612 :       delete_GDALVectorTranslateOptions(arg1);
   58698         612 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58699             :     }
   58700         612 :     if ( bLocalUseExceptions ) {
   58701         460 :       popErrorHandler();
   58702             :     }
   58703             : #ifndef SED_HACKS
   58704             :     if ( bLocalUseExceptions ) {
   58705             :       CPLErr eclass = CPLGetLastErrorType();
   58706             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58707             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58708             :       }
   58709             :     }
   58710             : #endif
   58711             :   }
   58712         612 :   resultobj = SWIG_Py_Void();
   58713         612 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58714             :   return resultobj;
   58715             : fail:
   58716             :   return NULL;
   58717             : }
   58718             : 
   58719             : 
   58720         276 : SWIGINTERN PyObject *GDALVectorTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58721         276 :   PyObject *obj;
   58722         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   58723         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_NewClientData(obj));
   58724         276 :   return SWIG_Py_Void();
   58725             : }
   58726             : 
   58727         612 : SWIGINTERN PyObject *GDALVectorTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58728         612 :   return SWIG_Python_InitShadowInstance(args);
   58729             : }
   58730             : 
   58731          12 : SWIGINTERN PyObject *_wrap_wrapper_GDALVectorTranslateDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58732          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58733          12 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   58734          12 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   58735          12 :   GDALVectorTranslateOptions *arg3 = (GDALVectorTranslateOptions *) 0 ;
   58736          12 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   58737          12 :   void *arg5 = (void *) NULL ;
   58738          12 :   void *argp1 = 0 ;
   58739          12 :   int res1 = 0 ;
   58740          12 :   void *argp2 = 0 ;
   58741          12 :   int res2 = 0 ;
   58742          12 :   void *argp3 = 0 ;
   58743          12 :   int res3 = 0 ;
   58744          12 :   PyObject *swig_obj[5] ;
   58745          12 :   int result;
   58746             :   
   58747             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   58748          12 :   PyProgressData *psProgressInfo;
   58749          12 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   58750          12 :   psProgressInfo->nLastReported = -1;
   58751          12 :   psProgressInfo->psPyCallback = NULL;
   58752          12 :   psProgressInfo->psPyCallbackData = NULL;
   58753          12 :   arg5 = psProgressInfo;
   58754          12 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALVectorTranslateDestDS", 3, 5, swig_obj)) SWIG_fail;
   58755          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   58756          12 :   if (!SWIG_IsOK(res1)) {
   58757           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   58758             :   }
   58759          12 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   58760          12 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   58761          12 :   if (!SWIG_IsOK(res2)) {
   58762           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   58763             :   }
   58764          12 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   58765          12 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALVectorTranslateOptions, 0 |  0 );
   58766          12 :   if (!SWIG_IsOK(res3)) {
   58767           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "3"" of type '" "GDALVectorTranslateOptions *""'"); 
   58768             :   }
   58769          12 :   arg3 = reinterpret_cast< GDALVectorTranslateOptions * >(argp3);
   58770          12 :   if (swig_obj[3]) {
   58771          12 :     {
   58772             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   58773             :       /* callback_func typemap */
   58774             :       
   58775             :       /* In some cases 0 is passed instead of None. */
   58776             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   58777          12 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   58778             :       {
   58779           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   58780             :         {
   58781           0 :           swig_obj[3] = Py_None;
   58782             :         }
   58783             :       }
   58784             :       
   58785          12 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   58786           0 :         void* cbfunction = NULL;
   58787           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   58788             :             (void**)&cbfunction,
   58789             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   58790             :             SWIG_POINTER_EXCEPTION | 0 ));
   58791             :         
   58792           0 :         if ( cbfunction == GDALTermProgress ) {
   58793             :           arg4 = GDALTermProgress;
   58794             :         } else {
   58795           0 :           if (!PyCallable_Check(swig_obj[3])) {
   58796           0 :             PyErr_SetString( PyExc_RuntimeError,
   58797             :               "Object given is not a Python function" );
   58798           0 :             SWIG_fail;
   58799             :           }
   58800           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   58801           0 :           arg4 = PyProgressProxy;
   58802             :         }
   58803             :         
   58804             :       }
   58805             :       
   58806             :     }
   58807             :   }
   58808          12 :   if (swig_obj[4]) {
   58809          12 :     {
   58810             :       /* %typemap(in) ( void* callback_data=NULL)  */
   58811          12 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   58812             :     }
   58813             :   }
   58814          12 :   {
   58815          12 :     const int bLocalUseExceptions = GetUseExceptions();
   58816          12 :     if ( bLocalUseExceptions ) {
   58817          11 :       pushErrorHandler();
   58818             :     }
   58819          12 :     {
   58820          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58821          12 :       result = (int)wrapper_GDALVectorTranslateDestDS(arg1,arg2,arg3,arg4,arg5);
   58822          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58823             :     }
   58824          12 :     if ( bLocalUseExceptions ) {
   58825          11 :       popErrorHandler();
   58826             :     }
   58827             : #ifndef SED_HACKS
   58828             :     if ( bLocalUseExceptions ) {
   58829             :       CPLErr eclass = CPLGetLastErrorType();
   58830             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58831             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58832             :       }
   58833             :     }
   58834             : #endif
   58835             :   }
   58836          12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   58837          12 :   {
   58838             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   58839             :     
   58840          12 :     CPLFree(psProgressInfo);
   58841             :     
   58842             :   }
   58843          14 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58844             :   return resultobj;
   58845           0 : fail:
   58846           0 :   {
   58847             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   58848             :     
   58849           0 :     CPLFree(psProgressInfo);
   58850             :     
   58851             :   }
   58852             :   return NULL;
   58853             : }
   58854             : 
   58855             : 
   58856         589 : SWIGINTERN PyObject *_wrap_wrapper_GDALVectorTranslateDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58857         589 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58858         589 :   char *arg1 = (char *) 0 ;
   58859         589 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   58860         589 :   GDALVectorTranslateOptions *arg3 = (GDALVectorTranslateOptions *) 0 ;
   58861         589 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   58862         589 :   void *arg5 = (void *) NULL ;
   58863         589 :   int bToFree1 = 0 ;
   58864         589 :   void *argp2 = 0 ;
   58865         589 :   int res2 = 0 ;
   58866         589 :   void *argp3 = 0 ;
   58867         589 :   int res3 = 0 ;
   58868         589 :   PyObject *swig_obj[5] ;
   58869         589 :   GDALDatasetShadow *result = 0 ;
   58870             :   
   58871             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   58872         589 :   PyProgressData *psProgressInfo;
   58873         589 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   58874         589 :   psProgressInfo->nLastReported = -1;
   58875         589 :   psProgressInfo->psPyCallback = NULL;
   58876         589 :   psProgressInfo->psPyCallbackData = NULL;
   58877         589 :   arg5 = psProgressInfo;
   58878         589 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALVectorTranslateDestName", 3, 5, swig_obj)) SWIG_fail;
   58879         589 :   {
   58880             :     /* %typemap(in) (const char *utf8_path) */
   58881         589 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   58882             :     {
   58883         478 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   58884             :     }
   58885             :     else
   58886             :     {
   58887         111 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   58888             :       
   58889             :     }
   58890         589 :     if (arg1 == NULL)
   58891             :     {
   58892           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58893           1 :       SWIG_fail;
   58894             :     }
   58895             :   }
   58896         588 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   58897         588 :   if (!SWIG_IsOK(res2)) {
   58898           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALVectorTranslateDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   58899             :   }
   58900         588 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   58901         588 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALVectorTranslateOptions, 0 |  0 );
   58902         588 :   if (!SWIG_IsOK(res3)) {
   58903           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALVectorTranslateDestName" "', argument " "3"" of type '" "GDALVectorTranslateOptions *""'"); 
   58904             :   }
   58905         588 :   arg3 = reinterpret_cast< GDALVectorTranslateOptions * >(argp3);
   58906         588 :   if (swig_obj[3]) {
   58907         588 :     {
   58908             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   58909             :       /* callback_func typemap */
   58910             :       
   58911             :       /* In some cases 0 is passed instead of None. */
   58912             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   58913         588 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   58914             :       {
   58915           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   58916             :         {
   58917           0 :           swig_obj[3] = Py_None;
   58918             :         }
   58919             :       }
   58920             :       
   58921         588 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   58922           3 :         void* cbfunction = NULL;
   58923           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   58924             :             (void**)&cbfunction,
   58925             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   58926             :             SWIG_POINTER_EXCEPTION | 0 ));
   58927             :         
   58928           3 :         if ( cbfunction == GDALTermProgress ) {
   58929             :           arg4 = GDALTermProgress;
   58930             :         } else {
   58931           3 :           if (!PyCallable_Check(swig_obj[3])) {
   58932           0 :             PyErr_SetString( PyExc_RuntimeError,
   58933             :               "Object given is not a Python function" );
   58934           0 :             SWIG_fail;
   58935             :           }
   58936           3 :           psProgressInfo->psPyCallback = swig_obj[3];
   58937           3 :           arg4 = PyProgressProxy;
   58938             :         }
   58939             :         
   58940             :       }
   58941             :       
   58942             :     }
   58943             :   }
   58944         588 :   if (swig_obj[4]) {
   58945         588 :     {
   58946             :       /* %typemap(in) ( void* callback_data=NULL)  */
   58947         588 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   58948             :     }
   58949             :   }
   58950         588 :   {
   58951         588 :     if (!arg1) {
   58952         588 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58953             :     }
   58954             :   }
   58955         588 :   {
   58956         588 :     const int bLocalUseExceptions = GetUseExceptions();
   58957         588 :     if ( bLocalUseExceptions ) {
   58958         437 :       pushErrorHandler();
   58959             :     }
   58960         588 :     {
   58961         588 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58962         588 :       result = (GDALDatasetShadow *)wrapper_GDALVectorTranslateDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   58963         588 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58964             :     }
   58965         588 :     if ( bLocalUseExceptions ) {
   58966         437 :       popErrorHandler();
   58967             :     }
   58968             : #ifndef SED_HACKS
   58969             :     if ( bLocalUseExceptions ) {
   58970             :       CPLErr eclass = CPLGetLastErrorType();
   58971             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58972             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58973             :       }
   58974             :     }
   58975             : #endif
   58976             :   }
   58977         588 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   58978         588 :   {
   58979             :     /* %typemap(freearg) (const char *utf8_path) */
   58980         588 :     GDALPythonFreeCStr(arg1, bToFree1);
   58981             :   }
   58982         588 :   {
   58983             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   58984             :     
   58985         588 :     CPLFree(psProgressInfo);
   58986             :     
   58987             :   }
   58988         621 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58989             :   return resultobj;
   58990           1 : fail:
   58991           1 :   {
   58992             :     /* %typemap(freearg) (const char *utf8_path) */
   58993           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   58994             :   }
   58995           1 :   {
   58996             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   58997             :     
   58998           1 :     CPLFree(psProgressInfo);
   58999             :     
   59000             :   }
   59001             :   return NULL;
   59002             : }
   59003             : 
   59004             : 
   59005          81 : SWIGINTERN PyObject *_wrap_new_GDALDEMProcessingOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59006          81 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59007          81 :   char **arg1 = (char **) 0 ;
   59008          81 :   PyObject *swig_obj[1] ;
   59009          81 :   GDALDEMProcessingOptions *result = 0 ;
   59010             :   
   59011          81 :   if (!args) SWIG_fail;
   59012          81 :   swig_obj[0] = args;
   59013          81 :   {
   59014             :     /* %typemap(in) char **dict */
   59015          81 :     arg1 = NULL;
   59016          81 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59017          81 :       int bErr = FALSE;
   59018          81 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59019          81 :       if ( bErr )
   59020             :       {
   59021           0 :         SWIG_fail;
   59022             :       }
   59023             :     }
   59024           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59025           0 :       int bErr = FALSE;
   59026           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59027           0 :       if ( bErr )
   59028             :       {
   59029           0 :         SWIG_fail;
   59030             :       }
   59031             :     }
   59032             :     else {
   59033           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59034           0 :       SWIG_fail;
   59035             :     }
   59036             :   }
   59037          81 :   {
   59038          81 :     const int bLocalUseExceptions = GetUseExceptions();
   59039          81 :     if ( bLocalUseExceptions ) {
   59040          81 :       pushErrorHandler();
   59041             :     }
   59042          81 :     {
   59043          81 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59044          81 :       result = (GDALDEMProcessingOptions *)new_GDALDEMProcessingOptions(arg1);
   59045          81 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59046             :     }
   59047          81 :     if ( bLocalUseExceptions ) {
   59048          81 :       popErrorHandler();
   59049             :     }
   59050             : #ifndef SED_HACKS
   59051             :     if ( bLocalUseExceptions ) {
   59052             :       CPLErr eclass = CPLGetLastErrorType();
   59053             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59054             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59055             :       }
   59056             :     }
   59057             : #endif
   59058             :   }
   59059          81 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_POINTER_NEW |  0 );
   59060          81 :   {
   59061             :     /* %typemap(freearg) char **dict */
   59062          81 :     CSLDestroy( arg1 );
   59063             :   }
   59064          89 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59065             :   return resultobj;
   59066           0 : fail:
   59067           0 :   {
   59068             :     /* %typemap(freearg) char **dict */
   59069           0 :     CSLDestroy( arg1 );
   59070             :   }
   59071             :   return NULL;
   59072             : }
   59073             : 
   59074             : 
   59075          77 : SWIGINTERN PyObject *_wrap_delete_GDALDEMProcessingOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59076          77 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59077          77 :   GDALDEMProcessingOptions *arg1 = (GDALDEMProcessingOptions *) 0 ;
   59078          77 :   void *argp1 = 0 ;
   59079          77 :   int res1 = 0 ;
   59080          77 :   PyObject *swig_obj[1] ;
   59081             :   
   59082          77 :   if (!args) SWIG_fail;
   59083          77 :   swig_obj[0] = args;
   59084          77 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_POINTER_DISOWN |  0 );
   59085          77 :   if (!SWIG_IsOK(res1)) {
   59086           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALDEMProcessingOptions" "', argument " "1"" of type '" "GDALDEMProcessingOptions *""'"); 
   59087             :   }
   59088          77 :   arg1 = reinterpret_cast< GDALDEMProcessingOptions * >(argp1);
   59089          77 :   {
   59090          77 :     const int bLocalUseExceptions = GetUseExceptions();
   59091          77 :     if ( bLocalUseExceptions ) {
   59092          77 :       pushErrorHandler();
   59093             :     }
   59094          77 :     {
   59095          77 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59096          77 :       delete_GDALDEMProcessingOptions(arg1);
   59097          77 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59098             :     }
   59099          77 :     if ( bLocalUseExceptions ) {
   59100          77 :       popErrorHandler();
   59101             :     }
   59102             : #ifndef SED_HACKS
   59103             :     if ( bLocalUseExceptions ) {
   59104             :       CPLErr eclass = CPLGetLastErrorType();
   59105             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59106             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59107             :       }
   59108             :     }
   59109             : #endif
   59110             :   }
   59111          77 :   resultobj = SWIG_Py_Void();
   59112          77 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59113             :   return resultobj;
   59114             : fail:
   59115             :   return NULL;
   59116             : }
   59117             : 
   59118             : 
   59119         276 : SWIGINTERN PyObject *GDALDEMProcessingOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59120         276 :   PyObject *obj;
   59121         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59122         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_NewClientData(obj));
   59123         276 :   return SWIG_Py_Void();
   59124             : }
   59125             : 
   59126          77 : SWIGINTERN PyObject *GDALDEMProcessingOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59127          77 :   return SWIG_Python_InitShadowInstance(args);
   59128             : }
   59129             : 
   59130          77 : SWIGINTERN PyObject *_wrap_DEMProcessingInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59131          77 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59132          77 :   char *arg1 = (char *) 0 ;
   59133          77 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   59134          77 :   char *arg3 = (char *) 0 ;
   59135          77 :   char *arg4 = (char *) 0 ;
   59136          77 :   GDALDEMProcessingOptions *arg5 = (GDALDEMProcessingOptions *) 0 ;
   59137          77 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   59138          77 :   void *arg7 = (void *) NULL ;
   59139          77 :   int bToFree1 = 0 ;
   59140          77 :   void *argp2 = 0 ;
   59141          77 :   int res2 = 0 ;
   59142          77 :   int res3 ;
   59143          77 :   char *buf3 = 0 ;
   59144          77 :   int alloc3 = 0 ;
   59145          77 :   int res4 ;
   59146          77 :   char *buf4 = 0 ;
   59147          77 :   int alloc4 = 0 ;
   59148          77 :   void *argp5 = 0 ;
   59149          77 :   int res5 = 0 ;
   59150          77 :   PyObject *swig_obj[7] ;
   59151          77 :   GDALDatasetShadow *result = 0 ;
   59152             :   
   59153             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   59154          77 :   PyProgressData *psProgressInfo;
   59155          77 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   59156          77 :   psProgressInfo->nLastReported = -1;
   59157          77 :   psProgressInfo->psPyCallback = NULL;
   59158          77 :   psProgressInfo->psPyCallbackData = NULL;
   59159          77 :   arg7 = psProgressInfo;
   59160          77 :   if (!SWIG_Python_UnpackTuple(args, "DEMProcessingInternal", 5, 7, swig_obj)) SWIG_fail;
   59161          77 :   {
   59162             :     /* %typemap(in) (const char *utf8_path) */
   59163          77 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   59164             :     {
   59165          76 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   59166             :     }
   59167             :     else
   59168             :     {
   59169           1 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   59170             :       
   59171             :     }
   59172          77 :     if (arg1 == NULL)
   59173             :     {
   59174           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   59175           0 :       SWIG_fail;
   59176             :     }
   59177             :   }
   59178          77 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59179          77 :   if (!SWIG_IsOK(res2)) {
   59180           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DEMProcessingInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   59181             :   }
   59182          77 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   59183          77 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   59184          77 :   if (!SWIG_IsOK(res3)) {
   59185           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DEMProcessingInternal" "', argument " "3"" of type '" "char const *""'");
   59186             :   }
   59187          77 :   arg3 = reinterpret_cast< char * >(buf3);
   59188          77 :   res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
   59189          77 :   if (!SWIG_IsOK(res4)) {
   59190           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DEMProcessingInternal" "', argument " "4"" of type '" "char const *""'");
   59191             :   }
   59192          77 :   arg4 = reinterpret_cast< char * >(buf4);
   59193          77 :   res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_GDALDEMProcessingOptions, 0 |  0 );
   59194          77 :   if (!SWIG_IsOK(res5)) {
   59195           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DEMProcessingInternal" "', argument " "5"" of type '" "GDALDEMProcessingOptions *""'"); 
   59196             :   }
   59197          77 :   arg5 = reinterpret_cast< GDALDEMProcessingOptions * >(argp5);
   59198          77 :   if (swig_obj[5]) {
   59199          77 :     {
   59200             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   59201             :       /* callback_func typemap */
   59202             :       
   59203             :       /* In some cases 0 is passed instead of None. */
   59204             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   59205          77 :       if ( PyLong_Check(swig_obj[5]) || PyInt_Check(swig_obj[5]) )
   59206             :       {
   59207           0 :         if( PyLong_AsLong(swig_obj[5]) == 0 )
   59208             :         {
   59209           0 :           swig_obj[5] = Py_None;
   59210             :         }
   59211             :       }
   59212             :       
   59213          77 :       if (swig_obj[5] && swig_obj[5] != Py_None ) {
   59214           0 :         void* cbfunction = NULL;
   59215           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[5],
   59216             :             (void**)&cbfunction,
   59217             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   59218             :             SWIG_POINTER_EXCEPTION | 0 ));
   59219             :         
   59220           0 :         if ( cbfunction == GDALTermProgress ) {
   59221             :           arg6 = GDALTermProgress;
   59222             :         } else {
   59223           0 :           if (!PyCallable_Check(swig_obj[5])) {
   59224           0 :             PyErr_SetString( PyExc_RuntimeError,
   59225             :               "Object given is not a Python function" );
   59226           0 :             SWIG_fail;
   59227             :           }
   59228           0 :           psProgressInfo->psPyCallback = swig_obj[5];
   59229           0 :           arg6 = PyProgressProxy;
   59230             :         }
   59231             :         
   59232             :       }
   59233             :       
   59234             :     }
   59235             :   }
   59236          77 :   if (swig_obj[6]) {
   59237          77 :     {
   59238             :       /* %typemap(in) ( void* callback_data=NULL)  */
   59239          77 :       psProgressInfo->psPyCallbackData = swig_obj[6] ;
   59240             :     }
   59241             :   }
   59242          77 :   {
   59243          77 :     if (!arg1) {
   59244          77 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59245             :     }
   59246             :   }
   59247          77 :   {
   59248          77 :     if (!arg2) {
   59249           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59250             :     }
   59251             :   }
   59252          77 :   {
   59253          77 :     if (!arg3) {
   59254           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59255             :     }
   59256             :   }
   59257          77 :   {
   59258          77 :     const int bLocalUseExceptions = GetUseExceptions();
   59259          77 :     if ( bLocalUseExceptions ) {
   59260          77 :       pushErrorHandler();
   59261             :     }
   59262          77 :     {
   59263          77 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59264          77 :       result = (GDALDatasetShadow *)wrapper_GDALDEMProcessing((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7);
   59265          77 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59266             :     }
   59267          77 :     if ( bLocalUseExceptions ) {
   59268          77 :       popErrorHandler();
   59269             :     }
   59270             : #ifndef SED_HACKS
   59271             :     if ( bLocalUseExceptions ) {
   59272             :       CPLErr eclass = CPLGetLastErrorType();
   59273             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59274             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59275             :       }
   59276             :     }
   59277             : #endif
   59278             :   }
   59279          77 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   59280          77 :   {
   59281             :     /* %typemap(freearg) (const char *utf8_path) */
   59282          77 :     GDALPythonFreeCStr(arg1, bToFree1);
   59283             :   }
   59284          77 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   59285          77 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   59286          77 :   {
   59287             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59288             :     
   59289          77 :     CPLFree(psProgressInfo);
   59290             :     
   59291             :   }
   59292          77 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59293             :   return resultobj;
   59294           0 : fail:
   59295           0 :   {
   59296             :     /* %typemap(freearg) (const char *utf8_path) */
   59297           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   59298             :   }
   59299           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   59300           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   59301           0 :   {
   59302             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59303             :     
   59304           0 :     CPLFree(psProgressInfo);
   59305             :     
   59306             :   }
   59307             :   return NULL;
   59308             : }
   59309             : 
   59310             : 
   59311          45 : SWIGINTERN PyObject *_wrap_new_GDALNearblackOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59312          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59313          45 :   char **arg1 = (char **) 0 ;
   59314          45 :   PyObject *swig_obj[1] ;
   59315          45 :   GDALNearblackOptions *result = 0 ;
   59316             :   
   59317          45 :   if (!args) SWIG_fail;
   59318          45 :   swig_obj[0] = args;
   59319          45 :   {
   59320             :     /* %typemap(in) char **dict */
   59321          45 :     arg1 = NULL;
   59322          45 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59323          45 :       int bErr = FALSE;
   59324          45 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59325          45 :       if ( bErr )
   59326             :       {
   59327           0 :         SWIG_fail;
   59328             :       }
   59329             :     }
   59330           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59331           0 :       int bErr = FALSE;
   59332           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59333           0 :       if ( bErr )
   59334             :       {
   59335           0 :         SWIG_fail;
   59336             :       }
   59337             :     }
   59338             :     else {
   59339           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59340           0 :       SWIG_fail;
   59341             :     }
   59342             :   }
   59343          45 :   {
   59344          45 :     const int bLocalUseExceptions = GetUseExceptions();
   59345          45 :     if ( bLocalUseExceptions ) {
   59346          45 :       pushErrorHandler();
   59347             :     }
   59348          45 :     {
   59349          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59350          45 :       result = (GDALNearblackOptions *)new_GDALNearblackOptions(arg1);
   59351          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59352             :     }
   59353          45 :     if ( bLocalUseExceptions ) {
   59354          45 :       popErrorHandler();
   59355             :     }
   59356             : #ifndef SED_HACKS
   59357             :     if ( bLocalUseExceptions ) {
   59358             :       CPLErr eclass = CPLGetLastErrorType();
   59359             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59360             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59361             :       }
   59362             :     }
   59363             : #endif
   59364             :   }
   59365          45 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALNearblackOptions, SWIG_POINTER_NEW |  0 );
   59366          45 :   {
   59367             :     /* %typemap(freearg) char **dict */
   59368          45 :     CSLDestroy( arg1 );
   59369             :   }
   59370          45 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59371             :   return resultobj;
   59372           0 : fail:
   59373           0 :   {
   59374             :     /* %typemap(freearg) char **dict */
   59375           0 :     CSLDestroy( arg1 );
   59376             :   }
   59377             :   return NULL;
   59378             : }
   59379             : 
   59380             : 
   59381          45 : SWIGINTERN PyObject *_wrap_delete_GDALNearblackOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59382          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59383          45 :   GDALNearblackOptions *arg1 = (GDALNearblackOptions *) 0 ;
   59384          45 :   void *argp1 = 0 ;
   59385          45 :   int res1 = 0 ;
   59386          45 :   PyObject *swig_obj[1] ;
   59387             :   
   59388          45 :   if (!args) SWIG_fail;
   59389          45 :   swig_obj[0] = args;
   59390          45 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALNearblackOptions, SWIG_POINTER_DISOWN |  0 );
   59391          45 :   if (!SWIG_IsOK(res1)) {
   59392           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALNearblackOptions" "', argument " "1"" of type '" "GDALNearblackOptions *""'"); 
   59393             :   }
   59394          45 :   arg1 = reinterpret_cast< GDALNearblackOptions * >(argp1);
   59395          45 :   {
   59396          45 :     const int bLocalUseExceptions = GetUseExceptions();
   59397          45 :     if ( bLocalUseExceptions ) {
   59398          45 :       pushErrorHandler();
   59399             :     }
   59400          45 :     {
   59401          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59402          45 :       delete_GDALNearblackOptions(arg1);
   59403          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59404             :     }
   59405          45 :     if ( bLocalUseExceptions ) {
   59406          45 :       popErrorHandler();
   59407             :     }
   59408             : #ifndef SED_HACKS
   59409             :     if ( bLocalUseExceptions ) {
   59410             :       CPLErr eclass = CPLGetLastErrorType();
   59411             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59412             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59413             :       }
   59414             :     }
   59415             : #endif
   59416             :   }
   59417          45 :   resultobj = SWIG_Py_Void();
   59418          45 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59419             :   return resultobj;
   59420             : fail:
   59421             :   return NULL;
   59422             : }
   59423             : 
   59424             : 
   59425         276 : SWIGINTERN PyObject *GDALNearblackOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59426         276 :   PyObject *obj;
   59427         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59428         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALNearblackOptions, SWIG_NewClientData(obj));
   59429         276 :   return SWIG_Py_Void();
   59430             : }
   59431             : 
   59432          45 : SWIGINTERN PyObject *GDALNearblackOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59433          45 :   return SWIG_Python_InitShadowInstance(args);
   59434             : }
   59435             : 
   59436           2 : SWIGINTERN PyObject *_wrap_wrapper_GDALNearblackDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59437           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59438           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   59439           2 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   59440           2 :   GDALNearblackOptions *arg3 = (GDALNearblackOptions *) 0 ;
   59441           2 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   59442           2 :   void *arg5 = (void *) NULL ;
   59443           2 :   void *argp1 = 0 ;
   59444           2 :   int res1 = 0 ;
   59445           2 :   void *argp2 = 0 ;
   59446           2 :   int res2 = 0 ;
   59447           2 :   void *argp3 = 0 ;
   59448           2 :   int res3 = 0 ;
   59449           2 :   PyObject *swig_obj[5] ;
   59450           2 :   int result;
   59451             :   
   59452             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   59453           2 :   PyProgressData *psProgressInfo;
   59454           2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   59455           2 :   psProgressInfo->nLastReported = -1;
   59456           2 :   psProgressInfo->psPyCallback = NULL;
   59457           2 :   psProgressInfo->psPyCallbackData = NULL;
   59458           2 :   arg5 = psProgressInfo;
   59459           2 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALNearblackDestDS", 3, 5, swig_obj)) SWIG_fail;
   59460           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59461           2 :   if (!SWIG_IsOK(res1)) {
   59462           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   59463             :   }
   59464           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   59465           2 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59466           2 :   if (!SWIG_IsOK(res2)) {
   59467           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   59468             :   }
   59469           2 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   59470           2 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALNearblackOptions, 0 |  0 );
   59471           2 :   if (!SWIG_IsOK(res3)) {
   59472           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "3"" of type '" "GDALNearblackOptions *""'"); 
   59473             :   }
   59474           2 :   arg3 = reinterpret_cast< GDALNearblackOptions * >(argp3);
   59475           2 :   if (swig_obj[3]) {
   59476           2 :     {
   59477             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   59478             :       /* callback_func typemap */
   59479             :       
   59480             :       /* In some cases 0 is passed instead of None. */
   59481             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   59482           2 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   59483             :       {
   59484           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   59485             :         {
   59486           0 :           swig_obj[3] = Py_None;
   59487             :         }
   59488             :       }
   59489             :       
   59490           2 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   59491           0 :         void* cbfunction = NULL;
   59492           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   59493             :             (void**)&cbfunction,
   59494             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   59495             :             SWIG_POINTER_EXCEPTION | 0 ));
   59496             :         
   59497           0 :         if ( cbfunction == GDALTermProgress ) {
   59498             :           arg4 = GDALTermProgress;
   59499             :         } else {
   59500           0 :           if (!PyCallable_Check(swig_obj[3])) {
   59501           0 :             PyErr_SetString( PyExc_RuntimeError,
   59502             :               "Object given is not a Python function" );
   59503           0 :             SWIG_fail;
   59504             :           }
   59505           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   59506           0 :           arg4 = PyProgressProxy;
   59507             :         }
   59508             :         
   59509             :       }
   59510             :       
   59511             :     }
   59512             :   }
   59513           2 :   if (swig_obj[4]) {
   59514           2 :     {
   59515             :       /* %typemap(in) ( void* callback_data=NULL)  */
   59516           2 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   59517             :     }
   59518             :   }
   59519           2 :   {
   59520           2 :     const int bLocalUseExceptions = GetUseExceptions();
   59521           2 :     if ( bLocalUseExceptions ) {
   59522           2 :       pushErrorHandler();
   59523             :     }
   59524           2 :     {
   59525           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59526           2 :       result = (int)wrapper_GDALNearblackDestDS(arg1,arg2,arg3,arg4,arg5);
   59527           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59528             :     }
   59529           2 :     if ( bLocalUseExceptions ) {
   59530           2 :       popErrorHandler();
   59531             :     }
   59532             : #ifndef SED_HACKS
   59533             :     if ( bLocalUseExceptions ) {
   59534             :       CPLErr eclass = CPLGetLastErrorType();
   59535             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59536             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59537             :       }
   59538             :     }
   59539             : #endif
   59540             :   }
   59541           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   59542           2 :   {
   59543             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59544             :     
   59545           2 :     CPLFree(psProgressInfo);
   59546             :     
   59547             :   }
   59548           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59549             :   return resultobj;
   59550           0 : fail:
   59551           0 :   {
   59552             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59553             :     
   59554           0 :     CPLFree(psProgressInfo);
   59555             :     
   59556             :   }
   59557             :   return NULL;
   59558             : }
   59559             : 
   59560             : 
   59561          43 : SWIGINTERN PyObject *_wrap_wrapper_GDALNearblackDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59562          43 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59563          43 :   char *arg1 = (char *) 0 ;
   59564          43 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   59565          43 :   GDALNearblackOptions *arg3 = (GDALNearblackOptions *) 0 ;
   59566          43 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   59567          43 :   void *arg5 = (void *) NULL ;
   59568          43 :   int bToFree1 = 0 ;
   59569          43 :   void *argp2 = 0 ;
   59570          43 :   int res2 = 0 ;
   59571          43 :   void *argp3 = 0 ;
   59572          43 :   int res3 = 0 ;
   59573          43 :   PyObject *swig_obj[5] ;
   59574          43 :   GDALDatasetShadow *result = 0 ;
   59575             :   
   59576             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   59577          43 :   PyProgressData *psProgressInfo;
   59578          43 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   59579          43 :   psProgressInfo->nLastReported = -1;
   59580          43 :   psProgressInfo->psPyCallback = NULL;
   59581          43 :   psProgressInfo->psPyCallbackData = NULL;
   59582          43 :   arg5 = psProgressInfo;
   59583          43 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALNearblackDestName", 3, 5, swig_obj)) SWIG_fail;
   59584          43 :   {
   59585             :     /* %typemap(in) (const char *utf8_path) */
   59586          43 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   59587             :     {
   59588          41 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   59589             :     }
   59590             :     else
   59591             :     {
   59592           2 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   59593             :       
   59594             :     }
   59595          43 :     if (arg1 == NULL)
   59596             :     {
   59597           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   59598           0 :       SWIG_fail;
   59599             :     }
   59600             :   }
   59601          43 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59602          43 :   if (!SWIG_IsOK(res2)) {
   59603           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALNearblackDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   59604             :   }
   59605          43 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   59606          43 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALNearblackOptions, 0 |  0 );
   59607          43 :   if (!SWIG_IsOK(res3)) {
   59608           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALNearblackDestName" "', argument " "3"" of type '" "GDALNearblackOptions *""'"); 
   59609             :   }
   59610          43 :   arg3 = reinterpret_cast< GDALNearblackOptions * >(argp3);
   59611          43 :   if (swig_obj[3]) {
   59612          43 :     {
   59613             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   59614             :       /* callback_func typemap */
   59615             :       
   59616             :       /* In some cases 0 is passed instead of None. */
   59617             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   59618          43 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   59619             :       {
   59620           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   59621             :         {
   59622           0 :           swig_obj[3] = Py_None;
   59623             :         }
   59624             :       }
   59625             :       
   59626          43 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   59627           0 :         void* cbfunction = NULL;
   59628           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   59629             :             (void**)&cbfunction,
   59630             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   59631             :             SWIG_POINTER_EXCEPTION | 0 ));
   59632             :         
   59633           0 :         if ( cbfunction == GDALTermProgress ) {
   59634             :           arg4 = GDALTermProgress;
   59635             :         } else {
   59636           0 :           if (!PyCallable_Check(swig_obj[3])) {
   59637           0 :             PyErr_SetString( PyExc_RuntimeError,
   59638             :               "Object given is not a Python function" );
   59639           0 :             SWIG_fail;
   59640             :           }
   59641           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   59642           0 :           arg4 = PyProgressProxy;
   59643             :         }
   59644             :         
   59645             :       }
   59646             :       
   59647             :     }
   59648             :   }
   59649          43 :   if (swig_obj[4]) {
   59650          43 :     {
   59651             :       /* %typemap(in) ( void* callback_data=NULL)  */
   59652          43 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   59653             :     }
   59654             :   }
   59655          43 :   {
   59656          43 :     if (!arg1) {
   59657          43 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59658             :     }
   59659             :   }
   59660          43 :   {
   59661          43 :     const int bLocalUseExceptions = GetUseExceptions();
   59662          43 :     if ( bLocalUseExceptions ) {
   59663          43 :       pushErrorHandler();
   59664             :     }
   59665          43 :     {
   59666          43 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59667          43 :       result = (GDALDatasetShadow *)wrapper_GDALNearblackDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   59668          43 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59669             :     }
   59670          43 :     if ( bLocalUseExceptions ) {
   59671          43 :       popErrorHandler();
   59672             :     }
   59673             : #ifndef SED_HACKS
   59674             :     if ( bLocalUseExceptions ) {
   59675             :       CPLErr eclass = CPLGetLastErrorType();
   59676             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59677             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59678             :       }
   59679             :     }
   59680             : #endif
   59681             :   }
   59682          43 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   59683          43 :   {
   59684             :     /* %typemap(freearg) (const char *utf8_path) */
   59685          43 :     GDALPythonFreeCStr(arg1, bToFree1);
   59686             :   }
   59687          43 :   {
   59688             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59689             :     
   59690          43 :     CPLFree(psProgressInfo);
   59691             :     
   59692             :   }
   59693          43 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59694             :   return resultobj;
   59695           0 : fail:
   59696           0 :   {
   59697             :     /* %typemap(freearg) (const char *utf8_path) */
   59698           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   59699             :   }
   59700           0 :   {
   59701             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59702             :     
   59703           0 :     CPLFree(psProgressInfo);
   59704             :     
   59705             :   }
   59706             :   return NULL;
   59707             : }
   59708             : 
   59709             : 
   59710          52 : SWIGINTERN PyObject *_wrap_new_GDALGridOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59711          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59712          52 :   char **arg1 = (char **) 0 ;
   59713          52 :   PyObject *swig_obj[1] ;
   59714          52 :   GDALGridOptions *result = 0 ;
   59715             :   
   59716          52 :   if (!args) SWIG_fail;
   59717          52 :   swig_obj[0] = args;
   59718          52 :   {
   59719             :     /* %typemap(in) char **dict */
   59720          52 :     arg1 = NULL;
   59721          52 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59722          52 :       int bErr = FALSE;
   59723          52 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59724          52 :       if ( bErr )
   59725             :       {
   59726           0 :         SWIG_fail;
   59727             :       }
   59728             :     }
   59729           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59730           0 :       int bErr = FALSE;
   59731           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59732           0 :       if ( bErr )
   59733             :       {
   59734           0 :         SWIG_fail;
   59735             :       }
   59736             :     }
   59737             :     else {
   59738           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59739           0 :       SWIG_fail;
   59740             :     }
   59741             :   }
   59742          52 :   {
   59743          52 :     const int bLocalUseExceptions = GetUseExceptions();
   59744          52 :     if ( bLocalUseExceptions ) {
   59745          51 :       pushErrorHandler();
   59746             :     }
   59747          52 :     {
   59748          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59749          52 :       result = (GDALGridOptions *)new_GDALGridOptions(arg1);
   59750          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59751             :     }
   59752          52 :     if ( bLocalUseExceptions ) {
   59753          51 :       popErrorHandler();
   59754             :     }
   59755             : #ifndef SED_HACKS
   59756             :     if ( bLocalUseExceptions ) {
   59757             :       CPLErr eclass = CPLGetLastErrorType();
   59758             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59759             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59760             :       }
   59761             :     }
   59762             : #endif
   59763             :   }
   59764          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGridOptions, SWIG_POINTER_NEW |  0 );
   59765          52 :   {
   59766             :     /* %typemap(freearg) char **dict */
   59767          52 :     CSLDestroy( arg1 );
   59768             :   }
   59769          52 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59770             :   return resultobj;
   59771           0 : fail:
   59772           0 :   {
   59773             :     /* %typemap(freearg) char **dict */
   59774           0 :     CSLDestroy( arg1 );
   59775             :   }
   59776             :   return NULL;
   59777             : }
   59778             : 
   59779             : 
   59780          52 : SWIGINTERN PyObject *_wrap_delete_GDALGridOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59781          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59782          52 :   GDALGridOptions *arg1 = (GDALGridOptions *) 0 ;
   59783          52 :   void *argp1 = 0 ;
   59784          52 :   int res1 = 0 ;
   59785          52 :   PyObject *swig_obj[1] ;
   59786             :   
   59787          52 :   if (!args) SWIG_fail;
   59788          52 :   swig_obj[0] = args;
   59789          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGridOptions, SWIG_POINTER_DISOWN |  0 );
   59790          52 :   if (!SWIG_IsOK(res1)) {
   59791           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALGridOptions" "', argument " "1"" of type '" "GDALGridOptions *""'"); 
   59792             :   }
   59793          52 :   arg1 = reinterpret_cast< GDALGridOptions * >(argp1);
   59794          52 :   {
   59795          52 :     const int bLocalUseExceptions = GetUseExceptions();
   59796          52 :     if ( bLocalUseExceptions ) {
   59797          51 :       pushErrorHandler();
   59798             :     }
   59799          52 :     {
   59800          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59801          52 :       delete_GDALGridOptions(arg1);
   59802          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59803             :     }
   59804          52 :     if ( bLocalUseExceptions ) {
   59805          51 :       popErrorHandler();
   59806             :     }
   59807             : #ifndef SED_HACKS
   59808             :     if ( bLocalUseExceptions ) {
   59809             :       CPLErr eclass = CPLGetLastErrorType();
   59810             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59811             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59812             :       }
   59813             :     }
   59814             : #endif
   59815             :   }
   59816          52 :   resultobj = SWIG_Py_Void();
   59817          52 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59818             :   return resultobj;
   59819             : fail:
   59820             :   return NULL;
   59821             : }
   59822             : 
   59823             : 
   59824         276 : SWIGINTERN PyObject *GDALGridOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59825         276 :   PyObject *obj;
   59826         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59827         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALGridOptions, SWIG_NewClientData(obj));
   59828         276 :   return SWIG_Py_Void();
   59829             : }
   59830             : 
   59831          52 : SWIGINTERN PyObject *GDALGridOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59832          52 :   return SWIG_Python_InitShadowInstance(args);
   59833             : }
   59834             : 
   59835          52 : SWIGINTERN PyObject *_wrap_GridInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59836          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59837          52 :   char *arg1 = (char *) 0 ;
   59838          52 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   59839          52 :   GDALGridOptions *arg3 = (GDALGridOptions *) 0 ;
   59840          52 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   59841          52 :   void *arg5 = (void *) NULL ;
   59842          52 :   int bToFree1 = 0 ;
   59843          52 :   void *argp2 = 0 ;
   59844          52 :   int res2 = 0 ;
   59845          52 :   void *argp3 = 0 ;
   59846          52 :   int res3 = 0 ;
   59847          52 :   PyObject *swig_obj[5] ;
   59848          52 :   GDALDatasetShadow *result = 0 ;
   59849             :   
   59850             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   59851          52 :   PyProgressData *psProgressInfo;
   59852          52 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   59853          52 :   psProgressInfo->nLastReported = -1;
   59854          52 :   psProgressInfo->psPyCallback = NULL;
   59855          52 :   psProgressInfo->psPyCallbackData = NULL;
   59856          52 :   arg5 = psProgressInfo;
   59857          52 :   if (!SWIG_Python_UnpackTuple(args, "GridInternal", 3, 5, swig_obj)) SWIG_fail;
   59858          52 :   {
   59859             :     /* %typemap(in) (const char *utf8_path) */
   59860          52 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   59861             :     {
   59862          52 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   59863             :     }
   59864             :     else
   59865             :     {
   59866           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   59867             :       
   59868             :     }
   59869          52 :     if (arg1 == NULL)
   59870             :     {
   59871           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   59872           0 :       SWIG_fail;
   59873             :     }
   59874             :   }
   59875          52 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59876          52 :   if (!SWIG_IsOK(res2)) {
   59877           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   59878             :   }
   59879          52 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   59880          52 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALGridOptions, 0 |  0 );
   59881          52 :   if (!SWIG_IsOK(res3)) {
   59882           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridInternal" "', argument " "3"" of type '" "GDALGridOptions *""'"); 
   59883             :   }
   59884          52 :   arg3 = reinterpret_cast< GDALGridOptions * >(argp3);
   59885          52 :   if (swig_obj[3]) {
   59886          52 :     {
   59887             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   59888             :       /* callback_func typemap */
   59889             :       
   59890             :       /* In some cases 0 is passed instead of None. */
   59891             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   59892          52 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   59893             :       {
   59894           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   59895             :         {
   59896           0 :           swig_obj[3] = Py_None;
   59897             :         }
   59898             :       }
   59899             :       
   59900          52 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   59901           0 :         void* cbfunction = NULL;
   59902           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   59903             :             (void**)&cbfunction,
   59904             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   59905             :             SWIG_POINTER_EXCEPTION | 0 ));
   59906             :         
   59907           0 :         if ( cbfunction == GDALTermProgress ) {
   59908             :           arg4 = GDALTermProgress;
   59909             :         } else {
   59910           0 :           if (!PyCallable_Check(swig_obj[3])) {
   59911           0 :             PyErr_SetString( PyExc_RuntimeError,
   59912             :               "Object given is not a Python function" );
   59913           0 :             SWIG_fail;
   59914             :           }
   59915           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   59916           0 :           arg4 = PyProgressProxy;
   59917             :         }
   59918             :         
   59919             :       }
   59920             :       
   59921             :     }
   59922             :   }
   59923          52 :   if (swig_obj[4]) {
   59924          52 :     {
   59925             :       /* %typemap(in) ( void* callback_data=NULL)  */
   59926          52 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   59927             :     }
   59928             :   }
   59929          52 :   {
   59930          52 :     if (!arg1) {
   59931          52 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59932             :     }
   59933             :   }
   59934          52 :   {
   59935          52 :     if (!arg2) {
   59936           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59937             :     }
   59938             :   }
   59939          52 :   {
   59940          52 :     const int bLocalUseExceptions = GetUseExceptions();
   59941          52 :     if ( bLocalUseExceptions ) {
   59942          51 :       pushErrorHandler();
   59943             :     }
   59944          52 :     {
   59945          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59946          52 :       result = (GDALDatasetShadow *)wrapper_GDALGrid((char const *)arg1,arg2,arg3,arg4,arg5);
   59947          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59948             :     }
   59949          52 :     if ( bLocalUseExceptions ) {
   59950          51 :       popErrorHandler();
   59951             :     }
   59952             : #ifndef SED_HACKS
   59953             :     if ( bLocalUseExceptions ) {
   59954             :       CPLErr eclass = CPLGetLastErrorType();
   59955             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59956             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59957             :       }
   59958             :     }
   59959             : #endif
   59960             :   }
   59961          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   59962          52 :   {
   59963             :     /* %typemap(freearg) (const char *utf8_path) */
   59964          52 :     GDALPythonFreeCStr(arg1, bToFree1);
   59965             :   }
   59966          52 :   {
   59967             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59968             :     
   59969          52 :     CPLFree(psProgressInfo);
   59970             :     
   59971             :   }
   59972          58 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59973             :   return resultobj;
   59974           0 : fail:
   59975           0 :   {
   59976             :     /* %typemap(freearg) (const char *utf8_path) */
   59977           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   59978             :   }
   59979           0 :   {
   59980             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59981             :     
   59982           0 :     CPLFree(psProgressInfo);
   59983             :     
   59984             :   }
   59985             :   return NULL;
   59986             : }
   59987             : 
   59988             : 
   59989          12 : SWIGINTERN PyObject *_wrap_new_GDALContourOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59990          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59991          12 :   char **arg1 = (char **) 0 ;
   59992          12 :   PyObject *swig_obj[1] ;
   59993          12 :   GDALContourOptions *result = 0 ;
   59994             :   
   59995          12 :   if (!args) SWIG_fail;
   59996          12 :   swig_obj[0] = args;
   59997          12 :   {
   59998             :     /* %typemap(in) char **dict */
   59999          12 :     arg1 = NULL;
   60000          12 :     if ( PySequence_Check( swig_obj[0] ) ) {
   60001          12 :       int bErr = FALSE;
   60002          12 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   60003          12 :       if ( bErr )
   60004             :       {
   60005           0 :         SWIG_fail;
   60006             :       }
   60007             :     }
   60008           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   60009           0 :       int bErr = FALSE;
   60010           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   60011           0 :       if ( bErr )
   60012             :       {
   60013           0 :         SWIG_fail;
   60014             :       }
   60015             :     }
   60016             :     else {
   60017           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   60018           0 :       SWIG_fail;
   60019             :     }
   60020             :   }
   60021          12 :   {
   60022          12 :     const int bLocalUseExceptions = GetUseExceptions();
   60023          12 :     if ( bLocalUseExceptions ) {
   60024          12 :       pushErrorHandler();
   60025             :     }
   60026          12 :     {
   60027          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60028          12 :       result = (GDALContourOptions *)new_GDALContourOptions(arg1);
   60029          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60030             :     }
   60031          12 :     if ( bLocalUseExceptions ) {
   60032          12 :       popErrorHandler();
   60033             :     }
   60034             : #ifndef SED_HACKS
   60035             :     if ( bLocalUseExceptions ) {
   60036             :       CPLErr eclass = CPLGetLastErrorType();
   60037             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60038             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60039             :       }
   60040             :     }
   60041             : #endif
   60042             :   }
   60043          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALContourOptions, SWIG_POINTER_NEW |  0 );
   60044          12 :   {
   60045             :     /* %typemap(freearg) char **dict */
   60046          12 :     CSLDestroy( arg1 );
   60047             :   }
   60048          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60049             :   return resultobj;
   60050           0 : fail:
   60051           0 :   {
   60052             :     /* %typemap(freearg) char **dict */
   60053           0 :     CSLDestroy( arg1 );
   60054             :   }
   60055             :   return NULL;
   60056             : }
   60057             : 
   60058             : 
   60059          12 : SWIGINTERN PyObject *_wrap_delete_GDALContourOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60060          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60061          12 :   GDALContourOptions *arg1 = (GDALContourOptions *) 0 ;
   60062          12 :   void *argp1 = 0 ;
   60063          12 :   int res1 = 0 ;
   60064          12 :   PyObject *swig_obj[1] ;
   60065             :   
   60066          12 :   if (!args) SWIG_fail;
   60067          12 :   swig_obj[0] = args;
   60068          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALContourOptions, SWIG_POINTER_DISOWN |  0 );
   60069          12 :   if (!SWIG_IsOK(res1)) {
   60070           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALContourOptions" "', argument " "1"" of type '" "GDALContourOptions *""'"); 
   60071             :   }
   60072          12 :   arg1 = reinterpret_cast< GDALContourOptions * >(argp1);
   60073          12 :   {
   60074          12 :     const int bLocalUseExceptions = GetUseExceptions();
   60075          12 :     if ( bLocalUseExceptions ) {
   60076          12 :       pushErrorHandler();
   60077             :     }
   60078          12 :     {
   60079          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60080          12 :       delete_GDALContourOptions(arg1);
   60081          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60082             :     }
   60083          12 :     if ( bLocalUseExceptions ) {
   60084          12 :       popErrorHandler();
   60085             :     }
   60086             : #ifndef SED_HACKS
   60087             :     if ( bLocalUseExceptions ) {
   60088             :       CPLErr eclass = CPLGetLastErrorType();
   60089             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60090             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60091             :       }
   60092             :     }
   60093             : #endif
   60094             :   }
   60095          12 :   resultobj = SWIG_Py_Void();
   60096          12 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60097             :   return resultobj;
   60098             : fail:
   60099             :   return NULL;
   60100             : }
   60101             : 
   60102             : 
   60103         276 : SWIGINTERN PyObject *GDALContourOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60104         276 :   PyObject *obj;
   60105         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   60106         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALContourOptions, SWIG_NewClientData(obj));
   60107         276 :   return SWIG_Py_Void();
   60108             : }
   60109             : 
   60110          12 : SWIGINTERN PyObject *GDALContourOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60111          12 :   return SWIG_Python_InitShadowInstance(args);
   60112             : }
   60113             : 
   60114           6 : SWIGINTERN PyObject *_wrap_wrapper_GDALContourDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60115           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60116           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   60117           6 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   60118           6 :   GDALContourOptions *arg3 = (GDALContourOptions *) 0 ;
   60119           6 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   60120           6 :   void *arg5 = (void *) NULL ;
   60121           6 :   void *argp1 = 0 ;
   60122           6 :   int res1 = 0 ;
   60123           6 :   void *argp2 = 0 ;
   60124           6 :   int res2 = 0 ;
   60125           6 :   void *argp3 = 0 ;
   60126           6 :   int res3 = 0 ;
   60127           6 :   PyObject *swig_obj[5] ;
   60128           6 :   int result;
   60129             :   
   60130             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60131           6 :   PyProgressData *psProgressInfo;
   60132           6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60133           6 :   psProgressInfo->nLastReported = -1;
   60134           6 :   psProgressInfo->psPyCallback = NULL;
   60135           6 :   psProgressInfo->psPyCallbackData = NULL;
   60136           6 :   arg5 = psProgressInfo;
   60137           6 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALContourDestDS", 3, 5, swig_obj)) SWIG_fail;
   60138           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60139           6 :   if (!SWIG_IsOK(res1)) {
   60140           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALContourDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   60141             :   }
   60142           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   60143           6 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60144           6 :   if (!SWIG_IsOK(res2)) {
   60145           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALContourDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60146             :   }
   60147           6 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60148           6 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALContourOptions, 0 |  0 );
   60149           6 :   if (!SWIG_IsOK(res3)) {
   60150           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALContourDestDS" "', argument " "3"" of type '" "GDALContourOptions *""'"); 
   60151             :   }
   60152           6 :   arg3 = reinterpret_cast< GDALContourOptions * >(argp3);
   60153           6 :   if (swig_obj[3]) {
   60154           6 :     {
   60155             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60156             :       /* callback_func typemap */
   60157             :       
   60158             :       /* In some cases 0 is passed instead of None. */
   60159             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60160           6 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60161             :       {
   60162           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60163             :         {
   60164           0 :           swig_obj[3] = Py_None;
   60165             :         }
   60166             :       }
   60167             :       
   60168           6 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60169           0 :         void* cbfunction = NULL;
   60170           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60171             :             (void**)&cbfunction,
   60172             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60173             :             SWIG_POINTER_EXCEPTION | 0 ));
   60174             :         
   60175           0 :         if ( cbfunction == GDALTermProgress ) {
   60176             :           arg4 = GDALTermProgress;
   60177             :         } else {
   60178           0 :           if (!PyCallable_Check(swig_obj[3])) {
   60179           0 :             PyErr_SetString( PyExc_RuntimeError,
   60180             :               "Object given is not a Python function" );
   60181           0 :             SWIG_fail;
   60182             :           }
   60183           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   60184           0 :           arg4 = PyProgressProxy;
   60185             :         }
   60186             :         
   60187             :       }
   60188             :       
   60189             :     }
   60190             :   }
   60191           6 :   if (swig_obj[4]) {
   60192           6 :     {
   60193             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60194           6 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60195             :     }
   60196             :   }
   60197           6 :   {
   60198           6 :     const int bLocalUseExceptions = GetUseExceptions();
   60199           6 :     if ( bLocalUseExceptions ) {
   60200           6 :       pushErrorHandler();
   60201             :     }
   60202           6 :     {
   60203           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60204           6 :       result = (int)wrapper_GDALContourDestDS(arg1,arg2,arg3,arg4,arg5);
   60205           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60206             :     }
   60207           6 :     if ( bLocalUseExceptions ) {
   60208           6 :       popErrorHandler();
   60209             :     }
   60210             : #ifndef SED_HACKS
   60211             :     if ( bLocalUseExceptions ) {
   60212             :       CPLErr eclass = CPLGetLastErrorType();
   60213             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60214             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60215             :       }
   60216             :     }
   60217             : #endif
   60218             :   }
   60219           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   60220           6 :   {
   60221             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60222             :     
   60223           6 :     CPLFree(psProgressInfo);
   60224             :     
   60225             :   }
   60226           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60227             :   return resultobj;
   60228           0 : fail:
   60229           0 :   {
   60230             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60231             :     
   60232           0 :     CPLFree(psProgressInfo);
   60233             :     
   60234             :   }
   60235             :   return NULL;
   60236             : }
   60237             : 
   60238             : 
   60239           6 : SWIGINTERN PyObject *_wrap_wrapper_GDALContourDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60240           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60241           6 :   char *arg1 = (char *) 0 ;
   60242           6 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   60243           6 :   GDALContourOptions *arg3 = (GDALContourOptions *) 0 ;
   60244           6 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   60245           6 :   void *arg5 = (void *) NULL ;
   60246           6 :   int bToFree1 = 0 ;
   60247           6 :   void *argp2 = 0 ;
   60248           6 :   int res2 = 0 ;
   60249           6 :   void *argp3 = 0 ;
   60250           6 :   int res3 = 0 ;
   60251           6 :   PyObject *swig_obj[5] ;
   60252           6 :   GDALDatasetShadow *result = 0 ;
   60253             :   
   60254             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60255           6 :   PyProgressData *psProgressInfo;
   60256           6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60257           6 :   psProgressInfo->nLastReported = -1;
   60258           6 :   psProgressInfo->psPyCallback = NULL;
   60259           6 :   psProgressInfo->psPyCallbackData = NULL;
   60260           6 :   arg5 = psProgressInfo;
   60261           6 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALContourDestName", 3, 5, swig_obj)) SWIG_fail;
   60262           6 :   {
   60263             :     /* %typemap(in) (const char *utf8_path) */
   60264           6 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   60265             :     {
   60266           6 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   60267             :     }
   60268             :     else
   60269             :     {
   60270           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   60271             :       
   60272             :     }
   60273           6 :     if (arg1 == NULL)
   60274             :     {
   60275           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   60276           0 :       SWIG_fail;
   60277             :     }
   60278             :   }
   60279           6 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60280           6 :   if (!SWIG_IsOK(res2)) {
   60281           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALContourDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60282             :   }
   60283           6 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60284           6 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALContourOptions, 0 |  0 );
   60285           6 :   if (!SWIG_IsOK(res3)) {
   60286           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALContourDestName" "', argument " "3"" of type '" "GDALContourOptions *""'"); 
   60287             :   }
   60288           6 :   arg3 = reinterpret_cast< GDALContourOptions * >(argp3);
   60289           6 :   if (swig_obj[3]) {
   60290           6 :     {
   60291             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60292             :       /* callback_func typemap */
   60293             :       
   60294             :       /* In some cases 0 is passed instead of None. */
   60295             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60296           6 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60297             :       {
   60298           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60299             :         {
   60300           0 :           swig_obj[3] = Py_None;
   60301             :         }
   60302             :       }
   60303             :       
   60304           6 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60305           0 :         void* cbfunction = NULL;
   60306           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60307             :             (void**)&cbfunction,
   60308             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60309             :             SWIG_POINTER_EXCEPTION | 0 ));
   60310             :         
   60311           0 :         if ( cbfunction == GDALTermProgress ) {
   60312             :           arg4 = GDALTermProgress;
   60313             :         } else {
   60314           0 :           if (!PyCallable_Check(swig_obj[3])) {
   60315           0 :             PyErr_SetString( PyExc_RuntimeError,
   60316             :               "Object given is not a Python function" );
   60317           0 :             SWIG_fail;
   60318             :           }
   60319           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   60320           0 :           arg4 = PyProgressProxy;
   60321             :         }
   60322             :         
   60323             :       }
   60324             :       
   60325             :     }
   60326             :   }
   60327           6 :   if (swig_obj[4]) {
   60328           6 :     {
   60329             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60330           6 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60331             :     }
   60332             :   }
   60333           6 :   {
   60334           6 :     if (!arg1) {
   60335           6 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   60336             :     }
   60337             :   }
   60338           6 :   {
   60339           6 :     const int bLocalUseExceptions = GetUseExceptions();
   60340           6 :     if ( bLocalUseExceptions ) {
   60341           6 :       pushErrorHandler();
   60342             :     }
   60343           6 :     {
   60344           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60345           6 :       result = (GDALDatasetShadow *)wrapper_GDALContourDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   60346           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60347             :     }
   60348           6 :     if ( bLocalUseExceptions ) {
   60349           6 :       popErrorHandler();
   60350             :     }
   60351             : #ifndef SED_HACKS
   60352             :     if ( bLocalUseExceptions ) {
   60353             :       CPLErr eclass = CPLGetLastErrorType();
   60354             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60355             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60356             :       }
   60357             :     }
   60358             : #endif
   60359             :   }
   60360           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   60361           6 :   {
   60362             :     /* %typemap(freearg) (const char *utf8_path) */
   60363           6 :     GDALPythonFreeCStr(arg1, bToFree1);
   60364             :   }
   60365           6 :   {
   60366             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60367             :     
   60368           6 :     CPLFree(psProgressInfo);
   60369             :     
   60370             :   }
   60371           6 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60372             :   return resultobj;
   60373           0 : fail:
   60374           0 :   {
   60375             :     /* %typemap(freearg) (const char *utf8_path) */
   60376           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   60377             :   }
   60378           0 :   {
   60379             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60380             :     
   60381           0 :     CPLFree(psProgressInfo);
   60382             :     
   60383             :   }
   60384             :   return NULL;
   60385             : }
   60386             : 
   60387             : 
   60388          20 : SWIGINTERN PyObject *_wrap_new_GDALRasterizeOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60389          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60390          20 :   char **arg1 = (char **) 0 ;
   60391          20 :   PyObject *swig_obj[1] ;
   60392          20 :   GDALRasterizeOptions *result = 0 ;
   60393             :   
   60394          20 :   if (!args) SWIG_fail;
   60395          20 :   swig_obj[0] = args;
   60396          20 :   {
   60397             :     /* %typemap(in) char **dict */
   60398          20 :     arg1 = NULL;
   60399          20 :     if ( PySequence_Check( swig_obj[0] ) ) {
   60400          20 :       int bErr = FALSE;
   60401          20 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   60402          20 :       if ( bErr )
   60403             :       {
   60404           0 :         SWIG_fail;
   60405             :       }
   60406             :     }
   60407           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   60408           0 :       int bErr = FALSE;
   60409           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   60410           0 :       if ( bErr )
   60411             :       {
   60412           0 :         SWIG_fail;
   60413             :       }
   60414             :     }
   60415             :     else {
   60416           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   60417           0 :       SWIG_fail;
   60418             :     }
   60419             :   }
   60420          20 :   {
   60421          20 :     const int bLocalUseExceptions = GetUseExceptions();
   60422          20 :     if ( bLocalUseExceptions ) {
   60423          20 :       pushErrorHandler();
   60424             :     }
   60425          20 :     {
   60426          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60427          20 :       result = (GDALRasterizeOptions *)new_GDALRasterizeOptions(arg1);
   60428          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60429             :     }
   60430          20 :     if ( bLocalUseExceptions ) {
   60431          20 :       popErrorHandler();
   60432             :     }
   60433             : #ifndef SED_HACKS
   60434             :     if ( bLocalUseExceptions ) {
   60435             :       CPLErr eclass = CPLGetLastErrorType();
   60436             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60437             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60438             :       }
   60439             :     }
   60440             : #endif
   60441             :   }
   60442          20 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterizeOptions, SWIG_POINTER_NEW |  0 );
   60443          20 :   {
   60444             :     /* %typemap(freearg) char **dict */
   60445          20 :     CSLDestroy( arg1 );
   60446             :   }
   60447          20 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60448             :   return resultobj;
   60449           0 : fail:
   60450           0 :   {
   60451             :     /* %typemap(freearg) char **dict */
   60452           0 :     CSLDestroy( arg1 );
   60453             :   }
   60454             :   return NULL;
   60455             : }
   60456             : 
   60457             : 
   60458          20 : SWIGINTERN PyObject *_wrap_delete_GDALRasterizeOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60459          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60460          20 :   GDALRasterizeOptions *arg1 = (GDALRasterizeOptions *) 0 ;
   60461          20 :   void *argp1 = 0 ;
   60462          20 :   int res1 = 0 ;
   60463          20 :   PyObject *swig_obj[1] ;
   60464             :   
   60465          20 :   if (!args) SWIG_fail;
   60466          20 :   swig_obj[0] = args;
   60467          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterizeOptions, SWIG_POINTER_DISOWN |  0 );
   60468          20 :   if (!SWIG_IsOK(res1)) {
   60469           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALRasterizeOptions" "', argument " "1"" of type '" "GDALRasterizeOptions *""'"); 
   60470             :   }
   60471          20 :   arg1 = reinterpret_cast< GDALRasterizeOptions * >(argp1);
   60472          20 :   {
   60473          20 :     const int bLocalUseExceptions = GetUseExceptions();
   60474          20 :     if ( bLocalUseExceptions ) {
   60475          20 :       pushErrorHandler();
   60476             :     }
   60477          20 :     {
   60478          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60479          20 :       delete_GDALRasterizeOptions(arg1);
   60480          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60481             :     }
   60482          20 :     if ( bLocalUseExceptions ) {
   60483          20 :       popErrorHandler();
   60484             :     }
   60485             : #ifndef SED_HACKS
   60486             :     if ( bLocalUseExceptions ) {
   60487             :       CPLErr eclass = CPLGetLastErrorType();
   60488             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60489             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60490             :       }
   60491             :     }
   60492             : #endif
   60493             :   }
   60494          20 :   resultobj = SWIG_Py_Void();
   60495          20 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60496             :   return resultobj;
   60497             : fail:
   60498             :   return NULL;
   60499             : }
   60500             : 
   60501             : 
   60502         276 : SWIGINTERN PyObject *GDALRasterizeOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60503         276 :   PyObject *obj;
   60504         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   60505         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterizeOptions, SWIG_NewClientData(obj));
   60506         276 :   return SWIG_Py_Void();
   60507             : }
   60508             : 
   60509          20 : SWIGINTERN PyObject *GDALRasterizeOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60510          20 :   return SWIG_Python_InitShadowInstance(args);
   60511             : }
   60512             : 
   60513          13 : SWIGINTERN PyObject *_wrap_wrapper_GDALRasterizeDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60514          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60515          13 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   60516          13 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   60517          13 :   GDALRasterizeOptions *arg3 = (GDALRasterizeOptions *) 0 ;
   60518          13 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   60519          13 :   void *arg5 = (void *) NULL ;
   60520          13 :   void *argp1 = 0 ;
   60521          13 :   int res1 = 0 ;
   60522          13 :   void *argp2 = 0 ;
   60523          13 :   int res2 = 0 ;
   60524          13 :   void *argp3 = 0 ;
   60525          13 :   int res3 = 0 ;
   60526          13 :   PyObject *swig_obj[5] ;
   60527          13 :   int result;
   60528             :   
   60529             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60530          13 :   PyProgressData *psProgressInfo;
   60531          13 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60532          13 :   psProgressInfo->nLastReported = -1;
   60533          13 :   psProgressInfo->psPyCallback = NULL;
   60534          13 :   psProgressInfo->psPyCallbackData = NULL;
   60535          13 :   arg5 = psProgressInfo;
   60536          13 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALRasterizeDestDS", 3, 5, swig_obj)) SWIG_fail;
   60537          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60538          13 :   if (!SWIG_IsOK(res1)) {
   60539           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   60540             :   }
   60541          13 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   60542          13 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60543          13 :   if (!SWIG_IsOK(res2)) {
   60544           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60545             :   }
   60546          13 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60547          13 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterizeOptions, 0 |  0 );
   60548          13 :   if (!SWIG_IsOK(res3)) {
   60549           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "3"" of type '" "GDALRasterizeOptions *""'"); 
   60550             :   }
   60551          13 :   arg3 = reinterpret_cast< GDALRasterizeOptions * >(argp3);
   60552          13 :   if (swig_obj[3]) {
   60553          13 :     {
   60554             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60555             :       /* callback_func typemap */
   60556             :       
   60557             :       /* In some cases 0 is passed instead of None. */
   60558             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60559          13 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60560             :       {
   60561           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60562             :         {
   60563           0 :           swig_obj[3] = Py_None;
   60564             :         }
   60565             :       }
   60566             :       
   60567          13 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60568           0 :         void* cbfunction = NULL;
   60569           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60570             :             (void**)&cbfunction,
   60571             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60572             :             SWIG_POINTER_EXCEPTION | 0 ));
   60573             :         
   60574           0 :         if ( cbfunction == GDALTermProgress ) {
   60575             :           arg4 = GDALTermProgress;
   60576             :         } else {
   60577           0 :           if (!PyCallable_Check(swig_obj[3])) {
   60578           0 :             PyErr_SetString( PyExc_RuntimeError,
   60579             :               "Object given is not a Python function" );
   60580           0 :             SWIG_fail;
   60581             :           }
   60582           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   60583           0 :           arg4 = PyProgressProxy;
   60584             :         }
   60585             :         
   60586             :       }
   60587             :       
   60588             :     }
   60589             :   }
   60590          13 :   if (swig_obj[4]) {
   60591          13 :     {
   60592             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60593          13 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60594             :     }
   60595             :   }
   60596          13 :   {
   60597          13 :     const int bLocalUseExceptions = GetUseExceptions();
   60598          13 :     if ( bLocalUseExceptions ) {
   60599          13 :       pushErrorHandler();
   60600             :     }
   60601          13 :     {
   60602          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60603          13 :       result = (int)wrapper_GDALRasterizeDestDS(arg1,arg2,arg3,arg4,arg5);
   60604          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60605             :     }
   60606          13 :     if ( bLocalUseExceptions ) {
   60607          13 :       popErrorHandler();
   60608             :     }
   60609             : #ifndef SED_HACKS
   60610             :     if ( bLocalUseExceptions ) {
   60611             :       CPLErr eclass = CPLGetLastErrorType();
   60612             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60613             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60614             :       }
   60615             :     }
   60616             : #endif
   60617             :   }
   60618          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   60619          13 :   {
   60620             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60621             :     
   60622          13 :     CPLFree(psProgressInfo);
   60623             :     
   60624             :   }
   60625          13 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60626             :   return resultobj;
   60627           0 : fail:
   60628           0 :   {
   60629             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60630             :     
   60631           0 :     CPLFree(psProgressInfo);
   60632             :     
   60633             :   }
   60634             :   return NULL;
   60635             : }
   60636             : 
   60637             : 
   60638           7 : SWIGINTERN PyObject *_wrap_wrapper_GDALRasterizeDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60639           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60640           7 :   char *arg1 = (char *) 0 ;
   60641           7 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   60642           7 :   GDALRasterizeOptions *arg3 = (GDALRasterizeOptions *) 0 ;
   60643           7 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   60644           7 :   void *arg5 = (void *) NULL ;
   60645           7 :   int bToFree1 = 0 ;
   60646           7 :   void *argp2 = 0 ;
   60647           7 :   int res2 = 0 ;
   60648           7 :   void *argp3 = 0 ;
   60649           7 :   int res3 = 0 ;
   60650           7 :   PyObject *swig_obj[5] ;
   60651           7 :   GDALDatasetShadow *result = 0 ;
   60652             :   
   60653             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60654           7 :   PyProgressData *psProgressInfo;
   60655           7 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60656           7 :   psProgressInfo->nLastReported = -1;
   60657           7 :   psProgressInfo->psPyCallback = NULL;
   60658           7 :   psProgressInfo->psPyCallbackData = NULL;
   60659           7 :   arg5 = psProgressInfo;
   60660           7 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALRasterizeDestName", 3, 5, swig_obj)) SWIG_fail;
   60661           7 :   {
   60662             :     /* %typemap(in) (const char *utf8_path) */
   60663           7 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   60664             :     {
   60665           6 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   60666             :     }
   60667             :     else
   60668             :     {
   60669           1 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   60670             :       
   60671             :     }
   60672           7 :     if (arg1 == NULL)
   60673             :     {
   60674           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   60675           0 :       SWIG_fail;
   60676             :     }
   60677             :   }
   60678           7 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60679           7 :   if (!SWIG_IsOK(res2)) {
   60680           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALRasterizeDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60681             :   }
   60682           7 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60683           7 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterizeOptions, 0 |  0 );
   60684           7 :   if (!SWIG_IsOK(res3)) {
   60685           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALRasterizeDestName" "', argument " "3"" of type '" "GDALRasterizeOptions *""'"); 
   60686             :   }
   60687           7 :   arg3 = reinterpret_cast< GDALRasterizeOptions * >(argp3);
   60688           7 :   if (swig_obj[3]) {
   60689           7 :     {
   60690             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60691             :       /* callback_func typemap */
   60692             :       
   60693             :       /* In some cases 0 is passed instead of None. */
   60694             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60695           7 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60696             :       {
   60697           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60698             :         {
   60699           0 :           swig_obj[3] = Py_None;
   60700             :         }
   60701             :       }
   60702             :       
   60703           7 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60704           0 :         void* cbfunction = NULL;
   60705           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60706             :             (void**)&cbfunction,
   60707             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60708             :             SWIG_POINTER_EXCEPTION | 0 ));
   60709             :         
   60710           0 :         if ( cbfunction == GDALTermProgress ) {
   60711             :           arg4 = GDALTermProgress;
   60712             :         } else {
   60713           0 :           if (!PyCallable_Check(swig_obj[3])) {
   60714           0 :             PyErr_SetString( PyExc_RuntimeError,
   60715             :               "Object given is not a Python function" );
   60716           0 :             SWIG_fail;
   60717             :           }
   60718           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   60719           0 :           arg4 = PyProgressProxy;
   60720             :         }
   60721             :         
   60722             :       }
   60723             :       
   60724             :     }
   60725             :   }
   60726           7 :   if (swig_obj[4]) {
   60727           7 :     {
   60728             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60729           7 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60730             :     }
   60731             :   }
   60732           7 :   {
   60733           7 :     if (!arg1) {
   60734           7 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   60735             :     }
   60736             :   }
   60737           7 :   {
   60738           7 :     const int bLocalUseExceptions = GetUseExceptions();
   60739           7 :     if ( bLocalUseExceptions ) {
   60740           7 :       pushErrorHandler();
   60741             :     }
   60742           7 :     {
   60743           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60744           7 :       result = (GDALDatasetShadow *)wrapper_GDALRasterizeDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   60745           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60746             :     }
   60747           7 :     if ( bLocalUseExceptions ) {
   60748           7 :       popErrorHandler();
   60749             :     }
   60750             : #ifndef SED_HACKS
   60751             :     if ( bLocalUseExceptions ) {
   60752             :       CPLErr eclass = CPLGetLastErrorType();
   60753             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60754             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60755             :       }
   60756             :     }
   60757             : #endif
   60758             :   }
   60759           7 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   60760           7 :   {
   60761             :     /* %typemap(freearg) (const char *utf8_path) */
   60762           7 :     GDALPythonFreeCStr(arg1, bToFree1);
   60763             :   }
   60764           7 :   {
   60765             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60766             :     
   60767           7 :     CPLFree(psProgressInfo);
   60768             :     
   60769             :   }
   60770          17 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60771             :   return resultobj;
   60772           0 : fail:
   60773           0 :   {
   60774             :     /* %typemap(freearg) (const char *utf8_path) */
   60775           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   60776             :   }
   60777           0 :   {
   60778             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60779             :     
   60780           0 :     CPLFree(psProgressInfo);
   60781             :     
   60782             :   }
   60783             :   return NULL;
   60784             : }
   60785             : 
   60786             : 
   60787          39 : SWIGINTERN PyObject *_wrap_new_GDALFootprintOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60788          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60789          39 :   char **arg1 = (char **) 0 ;
   60790          39 :   PyObject *swig_obj[1] ;
   60791          39 :   GDALFootprintOptions *result = 0 ;
   60792             :   
   60793          39 :   if (!args) SWIG_fail;
   60794          39 :   swig_obj[0] = args;
   60795          39 :   {
   60796             :     /* %typemap(in) char **dict */
   60797          39 :     arg1 = NULL;
   60798          39 :     if ( PySequence_Check( swig_obj[0] ) ) {
   60799          39 :       int bErr = FALSE;
   60800          39 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   60801          39 :       if ( bErr )
   60802             :       {
   60803           0 :         SWIG_fail;
   60804             :       }
   60805             :     }
   60806           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   60807           0 :       int bErr = FALSE;
   60808           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   60809           0 :       if ( bErr )
   60810             :       {
   60811           0 :         SWIG_fail;
   60812             :       }
   60813             :     }
   60814             :     else {
   60815           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   60816           0 :       SWIG_fail;
   60817             :     }
   60818             :   }
   60819          39 :   {
   60820          39 :     const int bLocalUseExceptions = GetUseExceptions();
   60821          39 :     if ( bLocalUseExceptions ) {
   60822          39 :       pushErrorHandler();
   60823             :     }
   60824          39 :     {
   60825          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60826          39 :       result = (GDALFootprintOptions *)new_GDALFootprintOptions(arg1);
   60827          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60828             :     }
   60829          39 :     if ( bLocalUseExceptions ) {
   60830          39 :       popErrorHandler();
   60831             :     }
   60832             : #ifndef SED_HACKS
   60833             :     if ( bLocalUseExceptions ) {
   60834             :       CPLErr eclass = CPLGetLastErrorType();
   60835             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60836             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60837             :       }
   60838             :     }
   60839             : #endif
   60840             :   }
   60841          39 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALFootprintOptions, SWIG_POINTER_NEW |  0 );
   60842          39 :   {
   60843             :     /* %typemap(freearg) char **dict */
   60844          39 :     CSLDestroy( arg1 );
   60845             :   }
   60846          43 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60847             :   return resultobj;
   60848           0 : fail:
   60849           0 :   {
   60850             :     /* %typemap(freearg) char **dict */
   60851           0 :     CSLDestroy( arg1 );
   60852             :   }
   60853             :   return NULL;
   60854             : }
   60855             : 
   60856             : 
   60857          37 : SWIGINTERN PyObject *_wrap_delete_GDALFootprintOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60858          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60859          37 :   GDALFootprintOptions *arg1 = (GDALFootprintOptions *) 0 ;
   60860          37 :   void *argp1 = 0 ;
   60861          37 :   int res1 = 0 ;
   60862          37 :   PyObject *swig_obj[1] ;
   60863             :   
   60864          37 :   if (!args) SWIG_fail;
   60865          37 :   swig_obj[0] = args;
   60866          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALFootprintOptions, SWIG_POINTER_DISOWN |  0 );
   60867          37 :   if (!SWIG_IsOK(res1)) {
   60868           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALFootprintOptions" "', argument " "1"" of type '" "GDALFootprintOptions *""'"); 
   60869             :   }
   60870          37 :   arg1 = reinterpret_cast< GDALFootprintOptions * >(argp1);
   60871          37 :   {
   60872          37 :     const int bLocalUseExceptions = GetUseExceptions();
   60873          37 :     if ( bLocalUseExceptions ) {
   60874          37 :       pushErrorHandler();
   60875             :     }
   60876          37 :     {
   60877          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60878          37 :       delete_GDALFootprintOptions(arg1);
   60879          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60880             :     }
   60881          37 :     if ( bLocalUseExceptions ) {
   60882          37 :       popErrorHandler();
   60883             :     }
   60884             : #ifndef SED_HACKS
   60885             :     if ( bLocalUseExceptions ) {
   60886             :       CPLErr eclass = CPLGetLastErrorType();
   60887             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60888             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60889             :       }
   60890             :     }
   60891             : #endif
   60892             :   }
   60893          37 :   resultobj = SWIG_Py_Void();
   60894          37 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60895             :   return resultobj;
   60896             : fail:
   60897             :   return NULL;
   60898             : }
   60899             : 
   60900             : 
   60901         276 : SWIGINTERN PyObject *GDALFootprintOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60902         276 :   PyObject *obj;
   60903         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   60904         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALFootprintOptions, SWIG_NewClientData(obj));
   60905         276 :   return SWIG_Py_Void();
   60906             : }
   60907             : 
   60908          37 : SWIGINTERN PyObject *GDALFootprintOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60909          37 :   return SWIG_Python_InitShadowInstance(args);
   60910             : }
   60911             : 
   60912           3 : SWIGINTERN PyObject *_wrap_wrapper_GDALFootprintDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60913           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60914           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   60915           3 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   60916           3 :   GDALFootprintOptions *arg3 = (GDALFootprintOptions *) 0 ;
   60917           3 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   60918           3 :   void *arg5 = (void *) NULL ;
   60919           3 :   void *argp1 = 0 ;
   60920           3 :   int res1 = 0 ;
   60921           3 :   void *argp2 = 0 ;
   60922           3 :   int res2 = 0 ;
   60923           3 :   void *argp3 = 0 ;
   60924           3 :   int res3 = 0 ;
   60925           3 :   PyObject *swig_obj[5] ;
   60926           3 :   int result;
   60927             :   
   60928             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60929           3 :   PyProgressData *psProgressInfo;
   60930           3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60931           3 :   psProgressInfo->nLastReported = -1;
   60932           3 :   psProgressInfo->psPyCallback = NULL;
   60933           3 :   psProgressInfo->psPyCallbackData = NULL;
   60934           3 :   arg5 = psProgressInfo;
   60935           3 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALFootprintDestDS", 3, 5, swig_obj)) SWIG_fail;
   60936           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60937           3 :   if (!SWIG_IsOK(res1)) {
   60938           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   60939             :   }
   60940           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   60941           3 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60942           3 :   if (!SWIG_IsOK(res2)) {
   60943           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60944             :   }
   60945           3 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60946           3 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALFootprintOptions, 0 |  0 );
   60947           3 :   if (!SWIG_IsOK(res3)) {
   60948           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "3"" of type '" "GDALFootprintOptions *""'"); 
   60949             :   }
   60950           3 :   arg3 = reinterpret_cast< GDALFootprintOptions * >(argp3);
   60951           3 :   if (swig_obj[3]) {
   60952           3 :     {
   60953             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60954             :       /* callback_func typemap */
   60955             :       
   60956             :       /* In some cases 0 is passed instead of None. */
   60957             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60958           3 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60959             :       {
   60960           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60961             :         {
   60962           0 :           swig_obj[3] = Py_None;
   60963             :         }
   60964             :       }
   60965             :       
   60966           3 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60967           0 :         void* cbfunction = NULL;
   60968           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60969             :             (void**)&cbfunction,
   60970             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60971             :             SWIG_POINTER_EXCEPTION | 0 ));
   60972             :         
   60973           0 :         if ( cbfunction == GDALTermProgress ) {
   60974             :           arg4 = GDALTermProgress;
   60975             :         } else {
   60976           0 :           if (!PyCallable_Check(swig_obj[3])) {
   60977           0 :             PyErr_SetString( PyExc_RuntimeError,
   60978             :               "Object given is not a Python function" );
   60979           0 :             SWIG_fail;
   60980             :           }
   60981           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   60982           0 :           arg4 = PyProgressProxy;
   60983             :         }
   60984             :         
   60985             :       }
   60986             :       
   60987             :     }
   60988             :   }
   60989           3 :   if (swig_obj[4]) {
   60990           3 :     {
   60991             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60992           3 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60993             :     }
   60994             :   }
   60995           3 :   {
   60996           3 :     const int bLocalUseExceptions = GetUseExceptions();
   60997           3 :     if ( bLocalUseExceptions ) {
   60998           3 :       pushErrorHandler();
   60999             :     }
   61000           3 :     {
   61001           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61002           3 :       result = (int)wrapper_GDALFootprintDestDS(arg1,arg2,arg3,arg4,arg5);
   61003           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61004             :     }
   61005           3 :     if ( bLocalUseExceptions ) {
   61006           3 :       popErrorHandler();
   61007             :     }
   61008             : #ifndef SED_HACKS
   61009             :     if ( bLocalUseExceptions ) {
   61010             :       CPLErr eclass = CPLGetLastErrorType();
   61011             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61012             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61013             :       }
   61014             :     }
   61015             : #endif
   61016             :   }
   61017           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   61018           3 :   {
   61019             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61020             :     
   61021           3 :     CPLFree(psProgressInfo);
   61022             :     
   61023             :   }
   61024           7 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   61025             :   return resultobj;
   61026           0 : fail:
   61027           0 :   {
   61028             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61029             :     
   61030           0 :     CPLFree(psProgressInfo);
   61031             :     
   61032             :   }
   61033             :   return NULL;
   61034             : }
   61035             : 
   61036             : 
   61037          34 : SWIGINTERN PyObject *_wrap_wrapper_GDALFootprintDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61038          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61039          34 :   char *arg1 = (char *) 0 ;
   61040          34 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   61041          34 :   GDALFootprintOptions *arg3 = (GDALFootprintOptions *) 0 ;
   61042          34 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61043          34 :   void *arg5 = (void *) NULL ;
   61044          34 :   int bToFree1 = 0 ;
   61045          34 :   void *argp2 = 0 ;
   61046          34 :   int res2 = 0 ;
   61047          34 :   void *argp3 = 0 ;
   61048          34 :   int res3 = 0 ;
   61049          34 :   PyObject *swig_obj[5] ;
   61050          34 :   GDALDatasetShadow *result = 0 ;
   61051             :   
   61052             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61053          34 :   PyProgressData *psProgressInfo;
   61054          34 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61055          34 :   psProgressInfo->nLastReported = -1;
   61056          34 :   psProgressInfo->psPyCallback = NULL;
   61057          34 :   psProgressInfo->psPyCallbackData = NULL;
   61058          34 :   arg5 = psProgressInfo;
   61059          34 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALFootprintDestName", 3, 5, swig_obj)) SWIG_fail;
   61060          34 :   {
   61061             :     /* %typemap(in) (const char *utf8_path) */
   61062          34 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   61063             :     {
   61064          33 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   61065             :     }
   61066             :     else
   61067             :     {
   61068           1 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   61069             :       
   61070             :     }
   61071          34 :     if (arg1 == NULL)
   61072             :     {
   61073           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   61074           0 :       SWIG_fail;
   61075             :     }
   61076             :   }
   61077          34 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61078          34 :   if (!SWIG_IsOK(res2)) {
   61079           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALFootprintDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   61080             :   }
   61081          34 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   61082          34 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALFootprintOptions, 0 |  0 );
   61083          34 :   if (!SWIG_IsOK(res3)) {
   61084           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALFootprintDestName" "', argument " "3"" of type '" "GDALFootprintOptions *""'"); 
   61085             :   }
   61086          34 :   arg3 = reinterpret_cast< GDALFootprintOptions * >(argp3);
   61087          34 :   if (swig_obj[3]) {
   61088          34 :     {
   61089             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61090             :       /* callback_func typemap */
   61091             :       
   61092             :       /* In some cases 0 is passed instead of None. */
   61093             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61094          34 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61095             :       {
   61096           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61097             :         {
   61098           0 :           swig_obj[3] = Py_None;
   61099             :         }
   61100             :       }
   61101             :       
   61102          34 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61103           0 :         void* cbfunction = NULL;
   61104           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61105             :             (void**)&cbfunction,
   61106             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61107             :             SWIG_POINTER_EXCEPTION | 0 ));
   61108             :         
   61109           0 :         if ( cbfunction == GDALTermProgress ) {
   61110             :           arg4 = GDALTermProgress;
   61111             :         } else {
   61112           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61113           0 :             PyErr_SetString( PyExc_RuntimeError,
   61114             :               "Object given is not a Python function" );
   61115           0 :             SWIG_fail;
   61116             :           }
   61117           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   61118           0 :           arg4 = PyProgressProxy;
   61119             :         }
   61120             :         
   61121             :       }
   61122             :       
   61123             :     }
   61124             :   }
   61125          34 :   if (swig_obj[4]) {
   61126          34 :     {
   61127             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61128          34 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61129             :     }
   61130             :   }
   61131          34 :   {
   61132          34 :     if (!arg1) {
   61133          34 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61134             :     }
   61135             :   }
   61136          34 :   {
   61137          34 :     const int bLocalUseExceptions = GetUseExceptions();
   61138          34 :     if ( bLocalUseExceptions ) {
   61139          34 :       pushErrorHandler();
   61140             :     }
   61141          34 :     {
   61142          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61143          34 :       result = (GDALDatasetShadow *)wrapper_GDALFootprintDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   61144          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61145             :     }
   61146          34 :     if ( bLocalUseExceptions ) {
   61147          34 :       popErrorHandler();
   61148             :     }
   61149             : #ifndef SED_HACKS
   61150             :     if ( bLocalUseExceptions ) {
   61151             :       CPLErr eclass = CPLGetLastErrorType();
   61152             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61153             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61154             :       }
   61155             :     }
   61156             : #endif
   61157             :   }
   61158          34 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   61159          34 :   {
   61160             :     /* %typemap(freearg) (const char *utf8_path) */
   61161          34 :     GDALPythonFreeCStr(arg1, bToFree1);
   61162             :   }
   61163          34 :   {
   61164             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61165             :     
   61166          34 :     CPLFree(psProgressInfo);
   61167             :     
   61168             :   }
   61169          54 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   61170             :   return resultobj;
   61171           0 : fail:
   61172           0 :   {
   61173             :     /* %typemap(freearg) (const char *utf8_path) */
   61174           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   61175             :   }
   61176           0 :   {
   61177             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61178             :     
   61179           0 :     CPLFree(psProgressInfo);
   61180             :     
   61181             :   }
   61182             :   return NULL;
   61183             : }
   61184             : 
   61185             : 
   61186         170 : SWIGINTERN PyObject *_wrap_new_GDALBuildVRTOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61187         170 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61188         170 :   char **arg1 = (char **) 0 ;
   61189         170 :   PyObject *swig_obj[1] ;
   61190         170 :   GDALBuildVRTOptions *result = 0 ;
   61191             :   
   61192         170 :   if (!args) SWIG_fail;
   61193         170 :   swig_obj[0] = args;
   61194         170 :   {
   61195             :     /* %typemap(in) char **dict */
   61196         170 :     arg1 = NULL;
   61197         170 :     if ( PySequence_Check( swig_obj[0] ) ) {
   61198         170 :       int bErr = FALSE;
   61199         170 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   61200         170 :       if ( bErr )
   61201             :       {
   61202           0 :         SWIG_fail;
   61203             :       }
   61204             :     }
   61205           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   61206           0 :       int bErr = FALSE;
   61207           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   61208           0 :       if ( bErr )
   61209             :       {
   61210           0 :         SWIG_fail;
   61211             :       }
   61212             :     }
   61213             :     else {
   61214           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   61215           0 :       SWIG_fail;
   61216             :     }
   61217             :   }
   61218         170 :   {
   61219         170 :     const int bLocalUseExceptions = GetUseExceptions();
   61220         170 :     if ( bLocalUseExceptions ) {
   61221         143 :       pushErrorHandler();
   61222             :     }
   61223         170 :     {
   61224         170 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61225         170 :       result = (GDALBuildVRTOptions *)new_GDALBuildVRTOptions(arg1);
   61226         170 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61227             :     }
   61228         170 :     if ( bLocalUseExceptions ) {
   61229         143 :       popErrorHandler();
   61230             :     }
   61231             : #ifndef SED_HACKS
   61232             :     if ( bLocalUseExceptions ) {
   61233             :       CPLErr eclass = CPLGetLastErrorType();
   61234             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61235             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61236             :       }
   61237             :     }
   61238             : #endif
   61239             :   }
   61240         170 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALBuildVRTOptions, SWIG_POINTER_NEW |  0 );
   61241         170 :   {
   61242             :     /* %typemap(freearg) char **dict */
   61243         170 :     CSLDestroy( arg1 );
   61244             :   }
   61245         176 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   61246             :   return resultobj;
   61247           0 : fail:
   61248           0 :   {
   61249             :     /* %typemap(freearg) char **dict */
   61250           0 :     CSLDestroy( arg1 );
   61251             :   }
   61252             :   return NULL;
   61253             : }
   61254             : 
   61255             : 
   61256         167 : SWIGINTERN PyObject *_wrap_delete_GDALBuildVRTOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61257         167 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61258         167 :   GDALBuildVRTOptions *arg1 = (GDALBuildVRTOptions *) 0 ;
   61259         167 :   void *argp1 = 0 ;
   61260         167 :   int res1 = 0 ;
   61261         167 :   PyObject *swig_obj[1] ;
   61262             :   
   61263         167 :   if (!args) SWIG_fail;
   61264         167 :   swig_obj[0] = args;
   61265         167 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALBuildVRTOptions, SWIG_POINTER_DISOWN |  0 );
   61266         167 :   if (!SWIG_IsOK(res1)) {
   61267           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALBuildVRTOptions" "', argument " "1"" of type '" "GDALBuildVRTOptions *""'"); 
   61268             :   }
   61269         167 :   arg1 = reinterpret_cast< GDALBuildVRTOptions * >(argp1);
   61270         167 :   {
   61271         167 :     const int bLocalUseExceptions = GetUseExceptions();
   61272         167 :     if ( bLocalUseExceptions ) {
   61273         140 :       pushErrorHandler();
   61274             :     }
   61275         167 :     {
   61276         167 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61277         167 :       delete_GDALBuildVRTOptions(arg1);
   61278         167 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61279             :     }
   61280         167 :     if ( bLocalUseExceptions ) {
   61281         140 :       popErrorHandler();
   61282             :     }
   61283             : #ifndef SED_HACKS
   61284             :     if ( bLocalUseExceptions ) {
   61285             :       CPLErr eclass = CPLGetLastErrorType();
   61286             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61287             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61288             :       }
   61289             :     }
   61290             : #endif
   61291             :   }
   61292         167 :   resultobj = SWIG_Py_Void();
   61293         167 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   61294             :   return resultobj;
   61295             : fail:
   61296             :   return NULL;
   61297             : }
   61298             : 
   61299             : 
   61300         276 : SWIGINTERN PyObject *GDALBuildVRTOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61301         276 :   PyObject *obj;
   61302         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   61303         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALBuildVRTOptions, SWIG_NewClientData(obj));
   61304         276 :   return SWIG_Py_Void();
   61305             : }
   61306             : 
   61307         167 : SWIGINTERN PyObject *GDALBuildVRTOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61308         167 :   return SWIG_Python_InitShadowInstance(args);
   61309             : }
   61310             : 
   61311          68 : SWIGINTERN PyObject *_wrap_BuildVRTInternalObjects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61312          68 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61313          68 :   char *arg1 = (char *) 0 ;
   61314          68 :   int arg2 ;
   61315          68 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   61316          68 :   GDALBuildVRTOptions *arg4 = (GDALBuildVRTOptions *) 0 ;
   61317          68 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   61318          68 :   void *arg6 = (void *) NULL ;
   61319          68 :   int bToFree1 = 0 ;
   61320          68 :   void *argp4 = 0 ;
   61321          68 :   int res4 = 0 ;
   61322          68 :   PyObject *swig_obj[5] ;
   61323          68 :   GDALDatasetShadow *result = 0 ;
   61324             :   
   61325             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61326          68 :   PyProgressData *psProgressInfo;
   61327          68 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61328          68 :   psProgressInfo->nLastReported = -1;
   61329          68 :   psProgressInfo->psPyCallback = NULL;
   61330          68 :   psProgressInfo->psPyCallbackData = NULL;
   61331          68 :   arg6 = psProgressInfo;
   61332          68 :   if (!SWIG_Python_UnpackTuple(args, "BuildVRTInternalObjects", 3, 5, swig_obj)) SWIG_fail;
   61333          68 :   {
   61334             :     /* %typemap(in) (const char *utf8_path) */
   61335          68 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   61336             :     {
   61337          64 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   61338             :     }
   61339             :     else
   61340             :     {
   61341           4 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   61342             :       
   61343             :     }
   61344          68 :     if (arg1 == NULL)
   61345             :     {
   61346           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   61347           0 :       SWIG_fail;
   61348             :     }
   61349             :   }
   61350          68 :   {
   61351             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   61352          68 :     if ( !PySequence_Check(swig_obj[1]) ) {
   61353           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   61354           0 :       SWIG_fail;
   61355             :     }
   61356          68 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   61357          68 :     if( size > (Py_ssize_t)INT_MAX ) {
   61358           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   61359           0 :       SWIG_fail;
   61360             :     }
   61361          68 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   61362           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   61363           0 :       SWIG_fail;
   61364             :     }
   61365          68 :     arg2 = (int)size;
   61366          68 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   61367          68 :     if( !arg3) {
   61368           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   61369           0 :       SWIG_fail;
   61370             :     }
   61371             :     
   61372        1171 :     for( int i = 0; i<arg2; i++ ) {
   61373        1103 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   61374        1103 :       GDALDatasetShadow* rawobjectpointer = NULL;
   61375        1103 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   61376        1103 :       if (!rawobjectpointer) {
   61377           0 :         Py_DECREF(o);
   61378           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   61379           0 :         SWIG_fail;
   61380             :       }
   61381        1103 :       arg3[i] = rawobjectpointer;
   61382        1103 :       Py_DECREF(o);
   61383             :       
   61384             :     }
   61385             :   }
   61386          68 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALBuildVRTOptions, 0 |  0 );
   61387          68 :   if (!SWIG_IsOK(res4)) {
   61388           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BuildVRTInternalObjects" "', argument " "4"" of type '" "GDALBuildVRTOptions *""'"); 
   61389             :   }
   61390          68 :   arg4 = reinterpret_cast< GDALBuildVRTOptions * >(argp4);
   61391          68 :   if (swig_obj[3]) {
   61392          68 :     {
   61393             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61394             :       /* callback_func typemap */
   61395             :       
   61396             :       /* In some cases 0 is passed instead of None. */
   61397             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61398          68 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61399             :       {
   61400           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61401             :         {
   61402           0 :           swig_obj[3] = Py_None;
   61403             :         }
   61404             :       }
   61405             :       
   61406          68 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61407           0 :         void* cbfunction = NULL;
   61408           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61409             :             (void**)&cbfunction,
   61410             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61411             :             SWIG_POINTER_EXCEPTION | 0 ));
   61412             :         
   61413           0 :         if ( cbfunction == GDALTermProgress ) {
   61414             :           arg5 = GDALTermProgress;
   61415             :         } else {
   61416           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61417           0 :             PyErr_SetString( PyExc_RuntimeError,
   61418             :               "Object given is not a Python function" );
   61419           0 :             SWIG_fail;
   61420             :           }
   61421           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   61422           0 :           arg5 = PyProgressProxy;
   61423             :         }
   61424             :         
   61425             :       }
   61426             :       
   61427             :     }
   61428             :   }
   61429          68 :   if (swig_obj[4]) {
   61430          68 :     {
   61431             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61432          68 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61433             :     }
   61434             :   }
   61435          68 :   {
   61436          68 :     if (!arg1) {
   61437          68 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61438             :     }
   61439             :   }
   61440          68 :   {
   61441          68 :     const int bLocalUseExceptions = GetUseExceptions();
   61442          68 :     if ( bLocalUseExceptions ) {
   61443          55 :       pushErrorHandler();
   61444             :     }
   61445          68 :     {
   61446          68 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61447          68 :       result = (GDALDatasetShadow *)wrapper_GDALBuildVRT_objects((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   61448          68 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61449             :     }
   61450          68 :     if ( bLocalUseExceptions ) {
   61451          55 :       popErrorHandler();
   61452             :     }
   61453             : #ifndef SED_HACKS
   61454             :     if ( bLocalUseExceptions ) {
   61455             :       CPLErr eclass = CPLGetLastErrorType();
   61456             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61457             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61458             :       }
   61459             :     }
   61460             : #endif
   61461             :   }
   61462          68 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   61463          68 :   {
   61464             :     /* %typemap(freearg) (const char *utf8_path) */
   61465          68 :     GDALPythonFreeCStr(arg1, bToFree1);
   61466             :   }
   61467          68 :   {
   61468             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   61469          68 :     CPLFree( arg3 );
   61470             :   }
   61471          68 :   {
   61472             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61473             :     
   61474          68 :     CPLFree(psProgressInfo);
   61475             :     
   61476             :   }
   61477          68 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   61478             :   return resultobj;
   61479           0 : fail:
   61480           0 :   {
   61481             :     /* %typemap(freearg) (const char *utf8_path) */
   61482           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   61483             :   }
   61484           0 :   {
   61485             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   61486           0 :     CPLFree( arg3 );
   61487             :   }
   61488           0 :   {
   61489             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61490             :     
   61491           0 :     CPLFree(psProgressInfo);
   61492             :     
   61493             :   }
   61494             :   return NULL;
   61495             : }
   61496             : 
   61497             : 
   61498          99 : SWIGINTERN PyObject *_wrap_BuildVRTInternalNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61499          99 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61500          99 :   char *arg1 = (char *) 0 ;
   61501          99 :   char **arg2 = (char **) 0 ;
   61502          99 :   GDALBuildVRTOptions *arg3 = (GDALBuildVRTOptions *) 0 ;
   61503          99 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61504          99 :   void *arg5 = (void *) NULL ;
   61505          99 :   int bToFree1 = 0 ;
   61506          99 :   void *argp3 = 0 ;
   61507          99 :   int res3 = 0 ;
   61508          99 :   PyObject *swig_obj[5] ;
   61509          99 :   GDALDatasetShadow *result = 0 ;
   61510             :   
   61511             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61512          99 :   PyProgressData *psProgressInfo;
   61513          99 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61514          99 :   psProgressInfo->nLastReported = -1;
   61515          99 :   psProgressInfo->psPyCallback = NULL;
   61516          99 :   psProgressInfo->psPyCallbackData = NULL;
   61517          99 :   arg5 = psProgressInfo;
   61518          99 :   if (!SWIG_Python_UnpackTuple(args, "BuildVRTInternalNames", 3, 5, swig_obj)) SWIG_fail;
   61519          99 :   {
   61520             :     /* %typemap(in) (const char *utf8_path) */
   61521          99 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   61522             :     {
   61523          95 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   61524             :     }
   61525             :     else
   61526             :     {
   61527           4 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   61528             :       
   61529             :     }
   61530          99 :     if (arg1 == NULL)
   61531             :     {
   61532           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   61533           0 :       SWIG_fail;
   61534             :     }
   61535             :   }
   61536          99 :   {
   61537             :     /* %typemap(in) char **dict */
   61538          99 :     arg2 = NULL;
   61539          99 :     if ( PySequence_Check( swig_obj[1] ) ) {
   61540          99 :       int bErr = FALSE;
   61541          99 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   61542          99 :       if ( bErr )
   61543             :       {
   61544           0 :         SWIG_fail;
   61545             :       }
   61546             :     }
   61547           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   61548           0 :       int bErr = FALSE;
   61549           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   61550           0 :       if ( bErr )
   61551             :       {
   61552           0 :         SWIG_fail;
   61553             :       }
   61554             :     }
   61555             :     else {
   61556           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   61557           0 :       SWIG_fail;
   61558             :     }
   61559             :   }
   61560          99 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALBuildVRTOptions, 0 |  0 );
   61561          99 :   if (!SWIG_IsOK(res3)) {
   61562           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BuildVRTInternalNames" "', argument " "3"" of type '" "GDALBuildVRTOptions *""'"); 
   61563             :   }
   61564          99 :   arg3 = reinterpret_cast< GDALBuildVRTOptions * >(argp3);
   61565          99 :   if (swig_obj[3]) {
   61566          99 :     {
   61567             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61568             :       /* callback_func typemap */
   61569             :       
   61570             :       /* In some cases 0 is passed instead of None. */
   61571             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61572          99 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61573             :       {
   61574           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61575             :         {
   61576           0 :           swig_obj[3] = Py_None;
   61577             :         }
   61578             :       }
   61579             :       
   61580          99 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61581           1 :         void* cbfunction = NULL;
   61582           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61583             :             (void**)&cbfunction,
   61584             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61585             :             SWIG_POINTER_EXCEPTION | 0 ));
   61586             :         
   61587           1 :         if ( cbfunction == GDALTermProgress ) {
   61588             :           arg4 = GDALTermProgress;
   61589             :         } else {
   61590           1 :           if (!PyCallable_Check(swig_obj[3])) {
   61591           0 :             PyErr_SetString( PyExc_RuntimeError,
   61592             :               "Object given is not a Python function" );
   61593           0 :             SWIG_fail;
   61594             :           }
   61595           1 :           psProgressInfo->psPyCallback = swig_obj[3];
   61596           1 :           arg4 = PyProgressProxy;
   61597             :         }
   61598             :         
   61599             :       }
   61600             :       
   61601             :     }
   61602             :   }
   61603          99 :   if (swig_obj[4]) {
   61604          99 :     {
   61605             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61606          99 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61607             :     }
   61608             :   }
   61609          99 :   {
   61610          99 :     if (!arg1) {
   61611          99 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61612             :     }
   61613             :   }
   61614          99 :   {
   61615          99 :     const int bLocalUseExceptions = GetUseExceptions();
   61616          99 :     if ( bLocalUseExceptions ) {
   61617          85 :       pushErrorHandler();
   61618             :     }
   61619          99 :     {
   61620          99 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61621          99 :       result = (GDALDatasetShadow *)wrapper_GDALBuildVRT_names((char const *)arg1,arg2,arg3,arg4,arg5);
   61622          99 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61623             :     }
   61624          99 :     if ( bLocalUseExceptions ) {
   61625          85 :       popErrorHandler();
   61626             :     }
   61627             : #ifndef SED_HACKS
   61628             :     if ( bLocalUseExceptions ) {
   61629             :       CPLErr eclass = CPLGetLastErrorType();
   61630             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61631             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61632             :       }
   61633             :     }
   61634             : #endif
   61635             :   }
   61636          99 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   61637          99 :   {
   61638             :     /* %typemap(freearg) (const char *utf8_path) */
   61639          99 :     GDALPythonFreeCStr(arg1, bToFree1);
   61640             :   }
   61641          99 :   {
   61642             :     /* %typemap(freearg) char **dict */
   61643          99 :     CSLDestroy( arg2 );
   61644             :   }
   61645          99 :   {
   61646             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61647             :     
   61648          99 :     CPLFree(psProgressInfo);
   61649             :     
   61650             :   }
   61651         103 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   61652             :   return resultobj;
   61653           0 : fail:
   61654           0 :   {
   61655             :     /* %typemap(freearg) (const char *utf8_path) */
   61656           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   61657             :   }
   61658           0 :   {
   61659             :     /* %typemap(freearg) char **dict */
   61660           0 :     CSLDestroy( arg2 );
   61661             :   }
   61662           0 :   {
   61663             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61664             :     
   61665           0 :     CPLFree(psProgressInfo);
   61666             :     
   61667             :   }
   61668             :   return NULL;
   61669             : }
   61670             : 
   61671             : 
   61672          23 : SWIGINTERN PyObject *_wrap_new_GDALTileIndexOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61673          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61674          23 :   char **arg1 = (char **) 0 ;
   61675          23 :   PyObject *swig_obj[1] ;
   61676          23 :   GDALTileIndexOptions *result = 0 ;
   61677             :   
   61678          23 :   if (!args) SWIG_fail;
   61679          23 :   swig_obj[0] = args;
   61680          23 :   {
   61681             :     /* %typemap(in) char **dict */
   61682          23 :     arg1 = NULL;
   61683          23 :     if ( PySequence_Check( swig_obj[0] ) ) {
   61684          23 :       int bErr = FALSE;
   61685          23 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   61686          23 :       if ( bErr )
   61687             :       {
   61688           0 :         SWIG_fail;
   61689             :       }
   61690             :     }
   61691           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   61692           0 :       int bErr = FALSE;
   61693           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   61694           0 :       if ( bErr )
   61695             :       {
   61696           0 :         SWIG_fail;
   61697             :       }
   61698             :     }
   61699             :     else {
   61700           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   61701           0 :       SWIG_fail;
   61702             :     }
   61703             :   }
   61704          23 :   {
   61705          23 :     const int bLocalUseExceptions = GetUseExceptions();
   61706          23 :     if ( bLocalUseExceptions ) {
   61707          23 :       pushErrorHandler();
   61708             :     }
   61709          23 :     {
   61710          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61711          23 :       result = (GDALTileIndexOptions *)new_GDALTileIndexOptions(arg1);
   61712          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61713             :     }
   61714          23 :     if ( bLocalUseExceptions ) {
   61715          23 :       popErrorHandler();
   61716             :     }
   61717             : #ifndef SED_HACKS
   61718             :     if ( bLocalUseExceptions ) {
   61719             :       CPLErr eclass = CPLGetLastErrorType();
   61720             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61721             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61722             :       }
   61723             :     }
   61724             : #endif
   61725             :   }
   61726          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTileIndexOptions, SWIG_POINTER_NEW |  0 );
   61727          23 :   {
   61728             :     /* %typemap(freearg) char **dict */
   61729          23 :     CSLDestroy( arg1 );
   61730             :   }
   61731          23 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   61732             :   return resultobj;
   61733           0 : fail:
   61734           0 :   {
   61735             :     /* %typemap(freearg) char **dict */
   61736           0 :     CSLDestroy( arg1 );
   61737             :   }
   61738             :   return NULL;
   61739             : }
   61740             : 
   61741             : 
   61742          23 : SWIGINTERN PyObject *_wrap_delete_GDALTileIndexOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61743          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61744          23 :   GDALTileIndexOptions *arg1 = (GDALTileIndexOptions *) 0 ;
   61745          23 :   void *argp1 = 0 ;
   61746          23 :   int res1 = 0 ;
   61747          23 :   PyObject *swig_obj[1] ;
   61748             :   
   61749          23 :   if (!args) SWIG_fail;
   61750          23 :   swig_obj[0] = args;
   61751          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTileIndexOptions, SWIG_POINTER_DISOWN |  0 );
   61752          23 :   if (!SWIG_IsOK(res1)) {
   61753           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTileIndexOptions" "', argument " "1"" of type '" "GDALTileIndexOptions *""'"); 
   61754             :   }
   61755          23 :   arg1 = reinterpret_cast< GDALTileIndexOptions * >(argp1);
   61756          23 :   {
   61757          23 :     const int bLocalUseExceptions = GetUseExceptions();
   61758          23 :     if ( bLocalUseExceptions ) {
   61759          23 :       pushErrorHandler();
   61760             :     }
   61761          23 :     {
   61762          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61763          23 :       delete_GDALTileIndexOptions(arg1);
   61764          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61765             :     }
   61766          23 :     if ( bLocalUseExceptions ) {
   61767          23 :       popErrorHandler();
   61768             :     }
   61769             : #ifndef SED_HACKS
   61770             :     if ( bLocalUseExceptions ) {
   61771             :       CPLErr eclass = CPLGetLastErrorType();
   61772             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61773             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61774             :       }
   61775             :     }
   61776             : #endif
   61777             :   }
   61778          23 :   resultobj = SWIG_Py_Void();
   61779          23 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   61780             :   return resultobj;
   61781             : fail:
   61782             :   return NULL;
   61783             : }
   61784             : 
   61785             : 
   61786         276 : SWIGINTERN PyObject *GDALTileIndexOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61787         276 :   PyObject *obj;
   61788         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   61789         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTileIndexOptions, SWIG_NewClientData(obj));
   61790         276 :   return SWIG_Py_Void();
   61791             : }
   61792             : 
   61793          23 : SWIGINTERN PyObject *GDALTileIndexOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61794          23 :   return SWIG_Python_InitShadowInstance(args);
   61795             : }
   61796             : 
   61797          23 : SWIGINTERN PyObject *_wrap_TileIndexInternalNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61798          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61799          23 :   char *arg1 = (char *) 0 ;
   61800          23 :   char **arg2 = (char **) 0 ;
   61801          23 :   GDALTileIndexOptions *arg3 = (GDALTileIndexOptions *) 0 ;
   61802          23 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61803          23 :   void *arg5 = (void *) NULL ;
   61804          23 :   int bToFree1 = 0 ;
   61805          23 :   void *argp3 = 0 ;
   61806          23 :   int res3 = 0 ;
   61807          23 :   PyObject *swig_obj[5] ;
   61808          23 :   GDALDatasetShadow *result = 0 ;
   61809             :   
   61810             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61811          23 :   PyProgressData *psProgressInfo;
   61812          23 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61813          23 :   psProgressInfo->nLastReported = -1;
   61814          23 :   psProgressInfo->psPyCallback = NULL;
   61815          23 :   psProgressInfo->psPyCallbackData = NULL;
   61816          23 :   arg5 = psProgressInfo;
   61817          23 :   if (!SWIG_Python_UnpackTuple(args, "TileIndexInternalNames", 3, 5, swig_obj)) SWIG_fail;
   61818          23 :   {
   61819             :     /* %typemap(in) (const char *utf8_path) */
   61820          23 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   61821             :     {
   61822          23 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   61823             :     }
   61824             :     else
   61825             :     {
   61826           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   61827             :       
   61828             :     }
   61829          23 :     if (arg1 == NULL)
   61830             :     {
   61831           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   61832           0 :       SWIG_fail;
   61833             :     }
   61834             :   }
   61835          23 :   {
   61836             :     /* %typemap(in) char **dict */
   61837          23 :     arg2 = NULL;
   61838          23 :     if ( PySequence_Check( swig_obj[1] ) ) {
   61839          23 :       int bErr = FALSE;
   61840          23 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   61841          23 :       if ( bErr )
   61842             :       {
   61843           0 :         SWIG_fail;
   61844             :       }
   61845             :     }
   61846           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   61847           0 :       int bErr = FALSE;
   61848           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   61849           0 :       if ( bErr )
   61850             :       {
   61851           0 :         SWIG_fail;
   61852             :       }
   61853             :     }
   61854             :     else {
   61855           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   61856           0 :       SWIG_fail;
   61857             :     }
   61858             :   }
   61859          23 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALTileIndexOptions, 0 |  0 );
   61860          23 :   if (!SWIG_IsOK(res3)) {
   61861           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TileIndexInternalNames" "', argument " "3"" of type '" "GDALTileIndexOptions *""'"); 
   61862             :   }
   61863          23 :   arg3 = reinterpret_cast< GDALTileIndexOptions * >(argp3);
   61864          23 :   if (swig_obj[3]) {
   61865          23 :     {
   61866             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61867             :       /* callback_func typemap */
   61868             :       
   61869             :       /* In some cases 0 is passed instead of None. */
   61870             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61871          23 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61872             :       {
   61873           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61874             :         {
   61875           0 :           swig_obj[3] = Py_None;
   61876             :         }
   61877             :       }
   61878             :       
   61879          23 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61880           0 :         void* cbfunction = NULL;
   61881           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61882             :             (void**)&cbfunction,
   61883             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61884             :             SWIG_POINTER_EXCEPTION | 0 ));
   61885             :         
   61886           0 :         if ( cbfunction == GDALTermProgress ) {
   61887             :           arg4 = GDALTermProgress;
   61888             :         } else {
   61889           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61890           0 :             PyErr_SetString( PyExc_RuntimeError,
   61891             :               "Object given is not a Python function" );
   61892           0 :             SWIG_fail;
   61893             :           }
   61894           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   61895           0 :           arg4 = PyProgressProxy;
   61896             :         }
   61897             :         
   61898             :       }
   61899             :       
   61900             :     }
   61901             :   }
   61902          23 :   if (swig_obj[4]) {
   61903          23 :     {
   61904             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61905          23 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61906             :     }
   61907             :   }
   61908          23 :   {
   61909          23 :     if (!arg1) {
   61910          23 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61911             :     }
   61912             :   }
   61913          23 :   {
   61914          23 :     const int bLocalUseExceptions = GetUseExceptions();
   61915          23 :     if ( bLocalUseExceptions ) {
   61916          23 :       pushErrorHandler();
   61917             :     }
   61918          23 :     {
   61919          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61920          23 :       result = (GDALDatasetShadow *)wrapper_TileIndex_names((char const *)arg1,arg2,arg3,arg4,arg5);
   61921          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61922             :     }
   61923          23 :     if ( bLocalUseExceptions ) {
   61924          23 :       popErrorHandler();
   61925             :     }
   61926             : #ifndef SED_HACKS
   61927             :     if ( bLocalUseExceptions ) {
   61928             :       CPLErr eclass = CPLGetLastErrorType();
   61929             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61930             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61931             :       }
   61932             :     }
   61933             : #endif
   61934             :   }
   61935          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   61936          23 :   {
   61937             :     /* %typemap(freearg) (const char *utf8_path) */
   61938          23 :     GDALPythonFreeCStr(arg1, bToFree1);
   61939             :   }
   61940          23 :   {
   61941             :     /* %typemap(freearg) char **dict */
   61942          23 :     CSLDestroy( arg2 );
   61943             :   }
   61944          23 :   {
   61945             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61946             :     
   61947          23 :     CPLFree(psProgressInfo);
   61948             :     
   61949             :   }
   61950          25 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   61951             :   return resultobj;
   61952           0 : fail:
   61953           0 :   {
   61954             :     /* %typemap(freearg) (const char *utf8_path) */
   61955           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   61956             :   }
   61957           0 :   {
   61958             :     /* %typemap(freearg) char **dict */
   61959           0 :     CSLDestroy( arg2 );
   61960             :   }
   61961           0 :   {
   61962             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61963             :     
   61964           0 :     CPLFree(psProgressInfo);
   61965             :     
   61966             :   }
   61967             :   return NULL;
   61968             : }
   61969             : 
   61970             : 
   61971         104 : SWIGINTERN PyObject *_wrap_new_GDALMultiDimTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61972         104 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61973         104 :   char **arg1 = (char **) 0 ;
   61974         104 :   PyObject *swig_obj[1] ;
   61975         104 :   GDALMultiDimTranslateOptions *result = 0 ;
   61976             :   
   61977         104 :   if (!args) SWIG_fail;
   61978         104 :   swig_obj[0] = args;
   61979         104 :   {
   61980             :     /* %typemap(in) char **dict */
   61981         104 :     arg1 = NULL;
   61982         104 :     if ( PySequence_Check( swig_obj[0] ) ) {
   61983         104 :       int bErr = FALSE;
   61984         104 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   61985         104 :       if ( bErr )
   61986             :       {
   61987           0 :         SWIG_fail;
   61988             :       }
   61989             :     }
   61990           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   61991           0 :       int bErr = FALSE;
   61992           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   61993           0 :       if ( bErr )
   61994             :       {
   61995           0 :         SWIG_fail;
   61996             :       }
   61997             :     }
   61998             :     else {
   61999           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   62000           0 :       SWIG_fail;
   62001             :     }
   62002             :   }
   62003         104 :   {
   62004         104 :     const int bLocalUseExceptions = GetUseExceptions();
   62005         104 :     if ( bLocalUseExceptions ) {
   62006          25 :       pushErrorHandler();
   62007             :     }
   62008         104 :     {
   62009         104 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62010         104 :       result = (GDALMultiDimTranslateOptions *)new_GDALMultiDimTranslateOptions(arg1);
   62011         104 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62012             :     }
   62013         104 :     if ( bLocalUseExceptions ) {
   62014          25 :       popErrorHandler();
   62015             :     }
   62016             : #ifndef SED_HACKS
   62017             :     if ( bLocalUseExceptions ) {
   62018             :       CPLErr eclass = CPLGetLastErrorType();
   62019             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62020             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62021             :       }
   62022             :     }
   62023             : #endif
   62024             :   }
   62025         104 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_POINTER_NEW |  0 );
   62026         104 :   {
   62027             :     /* %typemap(freearg) char **dict */
   62028         104 :     CSLDestroy( arg1 );
   62029             :   }
   62030         104 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   62031             :   return resultobj;
   62032           0 : fail:
   62033           0 :   {
   62034             :     /* %typemap(freearg) char **dict */
   62035           0 :     CSLDestroy( arg1 );
   62036             :   }
   62037             :   return NULL;
   62038             : }
   62039             : 
   62040             : 
   62041         104 : SWIGINTERN PyObject *_wrap_delete_GDALMultiDimTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62042         104 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62043         104 :   GDALMultiDimTranslateOptions *arg1 = (GDALMultiDimTranslateOptions *) 0 ;
   62044         104 :   void *argp1 = 0 ;
   62045         104 :   int res1 = 0 ;
   62046         104 :   PyObject *swig_obj[1] ;
   62047             :   
   62048         104 :   if (!args) SWIG_fail;
   62049         104 :   swig_obj[0] = args;
   62050         104 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   62051         104 :   if (!SWIG_IsOK(res1)) {
   62052           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALMultiDimTranslateOptions" "', argument " "1"" of type '" "GDALMultiDimTranslateOptions *""'"); 
   62053             :   }
   62054         104 :   arg1 = reinterpret_cast< GDALMultiDimTranslateOptions * >(argp1);
   62055         104 :   {
   62056         104 :     const int bLocalUseExceptions = GetUseExceptions();
   62057         104 :     if ( bLocalUseExceptions ) {
   62058          25 :       pushErrorHandler();
   62059             :     }
   62060         104 :     {
   62061         104 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62062         104 :       delete_GDALMultiDimTranslateOptions(arg1);
   62063         104 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62064             :     }
   62065         104 :     if ( bLocalUseExceptions ) {
   62066          25 :       popErrorHandler();
   62067             :     }
   62068             : #ifndef SED_HACKS
   62069             :     if ( bLocalUseExceptions ) {
   62070             :       CPLErr eclass = CPLGetLastErrorType();
   62071             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62072             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62073             :       }
   62074             :     }
   62075             : #endif
   62076             :   }
   62077         104 :   resultobj = SWIG_Py_Void();
   62078         104 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   62079             :   return resultobj;
   62080             : fail:
   62081             :   return NULL;
   62082             : }
   62083             : 
   62084             : 
   62085         276 : SWIGINTERN PyObject *GDALMultiDimTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62086         276 :   PyObject *obj;
   62087         276 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   62088         276 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_NewClientData(obj));
   62089         276 :   return SWIG_Py_Void();
   62090             : }
   62091             : 
   62092         104 : SWIGINTERN PyObject *GDALMultiDimTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62093         104 :   return SWIG_Python_InitShadowInstance(args);
   62094             : }
   62095             : 
   62096         104 : SWIGINTERN PyObject *_wrap_wrapper_GDALMultiDimTranslateDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62097         104 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62098         104 :   char *arg1 = (char *) 0 ;
   62099         104 :   int arg2 ;
   62100         104 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   62101         104 :   GDALMultiDimTranslateOptions *arg4 = (GDALMultiDimTranslateOptions *) 0 ;
   62102         104 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   62103         104 :   void *arg6 = (void *) NULL ;
   62104         104 :   int bToFree1 = 0 ;
   62105         104 :   void *argp4 = 0 ;
   62106         104 :   int res4 = 0 ;
   62107         104 :   PyObject *swig_obj[5] ;
   62108         104 :   GDALDatasetShadow *result = 0 ;
   62109             :   
   62110             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62111         104 :   PyProgressData *psProgressInfo;
   62112         104 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62113         104 :   psProgressInfo->nLastReported = -1;
   62114         104 :   psProgressInfo->psPyCallback = NULL;
   62115         104 :   psProgressInfo->psPyCallbackData = NULL;
   62116         104 :   arg6 = psProgressInfo;
   62117         104 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALMultiDimTranslateDestName", 3, 5, swig_obj)) SWIG_fail;
   62118         104 :   {
   62119             :     /* %typemap(in) (const char *utf8_path) */
   62120         104 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   62121             :     {
   62122           7 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   62123             :     }
   62124             :     else
   62125             :     {
   62126          97 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   62127             :       
   62128             :     }
   62129         104 :     if (arg1 == NULL)
   62130             :     {
   62131           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   62132           0 :       SWIG_fail;
   62133             :     }
   62134             :   }
   62135         104 :   {
   62136             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   62137         104 :     if ( !PySequence_Check(swig_obj[1]) ) {
   62138           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   62139           0 :       SWIG_fail;
   62140             :     }
   62141         104 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   62142         104 :     if( size > (Py_ssize_t)INT_MAX ) {
   62143           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   62144           0 :       SWIG_fail;
   62145             :     }
   62146         104 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   62147           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   62148           0 :       SWIG_fail;
   62149             :     }
   62150         104 :     arg2 = (int)size;
   62151         104 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   62152         104 :     if( !arg3) {
   62153           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   62154           0 :       SWIG_fail;
   62155             :     }
   62156             :     
   62157         208 :     for( int i = 0; i<arg2; i++ ) {
   62158         104 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   62159         104 :       GDALDatasetShadow* rawobjectpointer = NULL;
   62160         104 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   62161         104 :       if (!rawobjectpointer) {
   62162           0 :         Py_DECREF(o);
   62163           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   62164           0 :         SWIG_fail;
   62165             :       }
   62166         104 :       arg3[i] = rawobjectpointer;
   62167         104 :       Py_DECREF(o);
   62168             :       
   62169             :     }
   62170             :   }
   62171         104 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALMultiDimTranslateOptions, 0 |  0 );
   62172         104 :   if (!SWIG_IsOK(res4)) {
   62173           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALMultiDimTranslateDestName" "', argument " "4"" of type '" "GDALMultiDimTranslateOptions *""'"); 
   62174             :   }
   62175         104 :   arg4 = reinterpret_cast< GDALMultiDimTranslateOptions * >(argp4);
   62176         104 :   if (swig_obj[3]) {
   62177         104 :     {
   62178             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62179             :       /* callback_func typemap */
   62180             :       
   62181             :       /* In some cases 0 is passed instead of None. */
   62182             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62183         104 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62184             :       {
   62185           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62186             :         {
   62187           0 :           swig_obj[3] = Py_None;
   62188             :         }
   62189             :       }
   62190             :       
   62191         104 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62192           0 :         void* cbfunction = NULL;
   62193           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62194             :             (void**)&cbfunction,
   62195             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62196             :             SWIG_POINTER_EXCEPTION | 0 ));
   62197             :         
   62198           0 :         if ( cbfunction == GDALTermProgress ) {
   62199             :           arg5 = GDALTermProgress;
   62200             :         } else {
   62201           0 :           if (!PyCallable_Check(swig_obj[3])) {
   62202           0 :             PyErr_SetString( PyExc_RuntimeError,
   62203             :               "Object given is not a Python function" );
   62204           0 :             SWIG_fail;
   62205             :           }
   62206           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62207           0 :           arg5 = PyProgressProxy;
   62208             :         }
   62209             :         
   62210             :       }
   62211             :       
   62212             :     }
   62213             :   }
   62214         104 :   if (swig_obj[4]) {
   62215         104 :     {
   62216             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62217         104 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62218             :     }
   62219             :   }
   62220         104 :   {
   62221         104 :     if (!arg1) {
   62222         104 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   62223             :     }
   62224             :   }
   62225         104 :   {
   62226         104 :     const int bLocalUseExceptions = GetUseExceptions();
   62227         104 :     if ( bLocalUseExceptions ) {
   62228          25 :       pushErrorHandler();
   62229             :     }
   62230         104 :     {
   62231         104 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62232         104 :       result = (GDALDatasetShadow *)wrapper_GDALMultiDimTranslateDestName((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   62233         104 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62234             :     }
   62235         104 :     if ( bLocalUseExceptions ) {
   62236          25 :       popErrorHandler();
   62237             :     }
   62238             : #ifndef SED_HACKS
   62239             :     if ( bLocalUseExceptions ) {
   62240             :       CPLErr eclass = CPLGetLastErrorType();
   62241             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62242             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62243             :       }
   62244             :     }
   62245             : #endif
   62246             :   }
   62247         104 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   62248         104 :   {
   62249             :     /* %typemap(freearg) (const char *utf8_path) */
   62250         104 :     GDALPythonFreeCStr(arg1, bToFree1);
   62251             :   }
   62252         104 :   {
   62253             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   62254         104 :     CPLFree( arg3 );
   62255             :   }
   62256         104 :   {
   62257             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62258             :     
   62259         104 :     CPLFree(psProgressInfo);
   62260             :     
   62261             :   }
   62262         122 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   62263             :   return resultobj;
   62264           0 : fail:
   62265           0 :   {
   62266             :     /* %typemap(freearg) (const char *utf8_path) */
   62267           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   62268             :   }
   62269           0 :   {
   62270             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   62271           0 :     CPLFree( arg3 );
   62272             :   }
   62273           0 :   {
   62274             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62275             :     
   62276           0 :     CPLFree(psProgressInfo);
   62277             :     
   62278             :   }
   62279             :   return NULL;
   62280             : }
   62281             : 
   62282             : 
   62283             : static PyMethodDef SwigMethods[] = {
   62284             :    { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
   62285             :    { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
   62286             :    { "_GetExceptionsLocal", _wrap__GetExceptionsLocal, METH_NOARGS, "_GetExceptionsLocal() -> int"},
   62287             :    { "_SetExceptionsLocal", _wrap__SetExceptionsLocal, METH_O, "_SetExceptionsLocal(int bVal)"},
   62288             :    { "_UseExceptions", _wrap__UseExceptions, METH_NOARGS, "_UseExceptions()"},
   62289             :    { "_DontUseExceptions", _wrap__DontUseExceptions, METH_NOARGS, "_DontUseExceptions()"},
   62290             :    { "_UserHasSpecifiedIfUsingExceptions", _wrap__UserHasSpecifiedIfUsingExceptions, METH_NOARGS, "_UserHasSpecifiedIfUsingExceptions() -> int"},
   62291             :    { "VSIFReadL", _wrap_VSIFReadL, METH_VARARGS, "VSIFReadL(unsigned int nMembSize, unsigned int nMembCount, VSILFILE fp) -> unsigned int"},
   62292             :    { "VSIGetMemFileBuffer_unsafe", _wrap_VSIGetMemFileBuffer_unsafe, METH_O, "VSIGetMemFileBuffer_unsafe(char const * utf8_path)"},
   62293             :    { "Debug", _wrap_Debug, METH_VARARGS, "Debug(char const * msg_class, char const * message)"},
   62294             :    { "SetErrorHandler", _wrap_SetErrorHandler, METH_VARARGS, "SetErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr"},
   62295             :    { "SetCurrentErrorHandlerCatchDebug", _wrap_SetCurrentErrorHandlerCatchDebug, METH_O, "SetCurrentErrorHandlerCatchDebug(int bCatchDebug)"},
   62296             :    { "PushErrorHandler", _wrap_PushErrorHandler, METH_VARARGS, "PushErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr"},
   62297             :    { "PopErrorHandler", _wrap_PopErrorHandler, METH_NOARGS, "PopErrorHandler()"},
   62298             :    { "Error", _wrap_Error, METH_VARARGS, "Error(CPLErr msg_class=CE_Failure, int err_code=0, char const * msg=\"error\")"},
   62299             :    { "GOA2GetAuthorizationURL", _wrap_GOA2GetAuthorizationURL, METH_O, "GOA2GetAuthorizationURL(char const * pszScope) -> retStringAndCPLFree *"},
   62300             :    { "GOA2GetRefreshToken", _wrap_GOA2GetRefreshToken, METH_VARARGS, "GOA2GetRefreshToken(char const * pszAuthToken, char const * pszScope) -> retStringAndCPLFree *"},
   62301             :    { "GOA2GetAccessToken", _wrap_GOA2GetAccessToken, METH_VARARGS, "GOA2GetAccessToken(char const * pszRefreshToken, char const * pszScope) -> retStringAndCPLFree *"},
   62302             :    { "ErrorReset", _wrap_ErrorReset, METH_NOARGS, "ErrorReset()"},
   62303             :    { "wrapper_EscapeString", (PyCFunction)(void(*)(void))_wrap_wrapper_EscapeString, METH_VARARGS|METH_KEYWORDS, "wrapper_EscapeString(int len, int scheme=CPLES_SQL) -> retStringAndCPLFree *"},
   62304             :    { "EscapeBinary", (PyCFunction)(void(*)(void))_wrap_EscapeBinary, METH_VARARGS|METH_KEYWORDS, "EscapeBinary(int len, int scheme=CPLES_SQL)"},
   62305             :    { "GetLastErrorNo", _wrap_GetLastErrorNo, METH_NOARGS, "GetLastErrorNo() -> int"},
   62306             :    { "GetLastErrorType", _wrap_GetLastErrorType, METH_NOARGS, "GetLastErrorType() -> int"},
   62307             :    { "GetLastErrorMsg", _wrap_GetLastErrorMsg, METH_NOARGS, "GetLastErrorMsg() -> char const *"},
   62308             :    { "GetErrorCounter", _wrap_GetErrorCounter, METH_NOARGS, "GetErrorCounter() -> unsigned int"},
   62309             :    { "VSIGetLastErrorNo", _wrap_VSIGetLastErrorNo, METH_NOARGS, "VSIGetLastErrorNo() -> int"},
   62310             :    { "VSIGetLastErrorMsg", _wrap_VSIGetLastErrorMsg, METH_NOARGS, "VSIGetLastErrorMsg() -> char const *"},
   62311             :    { "VSIErrorReset", _wrap_VSIErrorReset, METH_NOARGS, "VSIErrorReset()"},
   62312             :    { "PushFinderLocation", _wrap_PushFinderLocation, METH_O, "PushFinderLocation(char const * utf8_path)"},
   62313             :    { "PopFinderLocation", _wrap_PopFinderLocation, METH_NOARGS, "PopFinderLocation()"},
   62314             :    { "FinderClean", _wrap_FinderClean, METH_NOARGS, "FinderClean()"},
   62315             :    { "FindFile", _wrap_FindFile, METH_VARARGS, "FindFile(char const * pszClass, char const * utf8_path) -> char const *"},
   62316             :    { "ReadDir", _wrap_ReadDir, METH_VARARGS, "ReadDir(char const * utf8_path, int nMaxFiles=0) -> char **"},
   62317             :    { "ReadDirRecursive", _wrap_ReadDirRecursive, METH_O, "ReadDirRecursive(char const * utf8_path) -> char **"},
   62318             :    { "OpenDir", _wrap_OpenDir, METH_VARARGS, "OpenDir(char const * utf8_path, int nRecurseDepth=-1, char ** options=None) -> VSIDIR *"},
   62319             :    { "DirEntry_name_get", _wrap_DirEntry_name_get, METH_O, "DirEntry_name_get(DirEntry self) -> char *"},
   62320             :    { "DirEntry_mode_get", _wrap_DirEntry_mode_get, METH_O, "DirEntry_mode_get(DirEntry self) -> int"},
   62321             :    { "DirEntry_size_get", _wrap_DirEntry_size_get, METH_O, "DirEntry_size_get(DirEntry self) -> GIntBig"},
   62322             :    { "DirEntry_mtime_get", _wrap_DirEntry_mtime_get, METH_O, "DirEntry_mtime_get(DirEntry self) -> GIntBig"},
   62323             :    { "DirEntry_modeKnown_get", _wrap_DirEntry_modeKnown_get, METH_O, "DirEntry_modeKnown_get(DirEntry self) -> bool"},
   62324             :    { "DirEntry_sizeKnown_get", _wrap_DirEntry_sizeKnown_get, METH_O, "DirEntry_sizeKnown_get(DirEntry self) -> bool"},
   62325             :    { "DirEntry_mtimeKnown_get", _wrap_DirEntry_mtimeKnown_get, METH_O, "DirEntry_mtimeKnown_get(DirEntry self) -> bool"},
   62326             :    { "DirEntry_extra_get", _wrap_DirEntry_extra_get, METH_O, "DirEntry_extra_get(DirEntry self) -> char **"},
   62327             :    { "new_DirEntry", _wrap_new_DirEntry, METH_O, "new_DirEntry(DirEntry entryIn) -> DirEntry"},
   62328             :    { "delete_DirEntry", _wrap_delete_DirEntry, METH_O, "delete_DirEntry(DirEntry self)"},
   62329             :    { "DirEntry_IsDirectory", _wrap_DirEntry_IsDirectory, METH_O, "DirEntry_IsDirectory(DirEntry self) -> bool"},
   62330             :    { "DirEntry_swigregister", DirEntry_swigregister, METH_O, NULL},
   62331             :    { "DirEntry_swiginit", DirEntry_swiginit, METH_VARARGS, NULL},
   62332             :    { "GetNextDirEntry", _wrap_GetNextDirEntry, METH_O, "GetNextDirEntry(VSIDIR * dir) -> DirEntry"},
   62333             :    { "CloseDir", _wrap_CloseDir, METH_O, "CloseDir(VSIDIR * dir)"},
   62334             :    { "SetConfigOption", _wrap_SetConfigOption, METH_VARARGS, "\n"
   62335             :     "SetConfigOption(char const * pszKey, char const * pszValue)\n"
   62336             :     "\n"
   62337             :     "\n"
   62338             :     "Set the value of a configuration option for all threads.\n"
   62339             :     "See :cpp:func:`CPLSetConfigOption`.\n"
   62340             :     "\n"
   62341             :     "Parameters\n"
   62342             :     "----------\n"
   62343             :     "pszKey : str\n"
   62344             :     "    name of the configuration option\n"
   62345             :     "pszValue : str\n"
   62346             :     "    value of the configuration option\n"
   62347             :     "\n"
   62348             :     "See Also\n"
   62349             :     "--------\n"
   62350             :     ":py:func:`SetThreadLocalConfigOption`\n"
   62351             :     ":py:func:`config_option`\n"
   62352             :     ":py:func:`config_options`\n"
   62353             :     "\n"
   62354             :     "\n"
   62355             :     ""},
   62356             :    { "SetThreadLocalConfigOption", _wrap_SetThreadLocalConfigOption, METH_VARARGS, "\n"
   62357             :     "SetThreadLocalConfigOption(char const * pszKey, char const * pszValue)\n"
   62358             :     "\n"
   62359             :     "\n"
   62360             :     "Set the value of a configuration option for the current thread.\n"
   62361             :     "See :cpp:func:`CPLSetThreadLocalConfigOption`.\n"
   62362             :     "\n"
   62363             :     "Parameters\n"
   62364             :     "----------\n"
   62365             :     "pszKey : str\n"
   62366             :     "    name of the configuration option\n"
   62367             :     "pszValue : str\n"
   62368             :     "    value of the configuration option\n"
   62369             :     "\n"
   62370             :     "See Also\n"
   62371             :     "--------\n"
   62372             :     ":py:func:`SetConfigOption`\n"
   62373             :     ":py:func:`config_option`\n"
   62374             :     ":py:func:`config_options`\n"
   62375             :     "\n"
   62376             :     ""},
   62377             :    { "GetConfigOption", _wrap_GetConfigOption, METH_VARARGS, "\n"
   62378             :     "GetConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   62379             :     "\n"
   62380             :     "\n"
   62381             :     "Return the value of a configuration option.\n"
   62382             :     "See :cpp:func:`CPLGetConfigOption`.\n"
   62383             :     "\n"
   62384             :     "Parameters\n"
   62385             :     "----------\n"
   62386             :     "pszKey : str\n"
   62387             :     "    name of the configuration option\n"
   62388             :     "pszDefault : str, optional\n"
   62389             :     "    default value to return if the option has not been set\n"
   62390             :     "\n"
   62391             :     "Returns\n"
   62392             :     "-------\n"
   62393             :     "str\n"
   62394             :     "\n"
   62395             :     "See Also\n"
   62396             :     "--------\n"
   62397             :     ":py:func:`GetConfigOptions`\n"
   62398             :     ":py:func:`GetThreadLocalConfigOption`\n"
   62399             :     "\n"
   62400             :     ""},
   62401             :    { "GetGlobalConfigOption", _wrap_GetGlobalConfigOption, METH_VARARGS, "\n"
   62402             :     "GetGlobalConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   62403             :     "\n"
   62404             :     "\n"
   62405             :     "Return the value of a global (not thread-local) configuration option.\n"
   62406             :     "See :cpp:func:`CPLGetGlobalConfigOption`.\n"
   62407             :     "\n"
   62408             :     "Parameters\n"
   62409             :     "----------\n"
   62410             :     "pszKey : str\n"
   62411             :     "    name of the configuration option\n"
   62412             :     "pszDefault : str, optional\n"
   62413             :     "    default value to return if the option has not been set\n"
   62414             :     "\n"
   62415             :     "Returns\n"
   62416             :     "-------\n"
   62417             :     "str\n"
   62418             :     "\n"
   62419             :     ""},
   62420             :    { "GetThreadLocalConfigOption", _wrap_GetThreadLocalConfigOption, METH_VARARGS, "\n"
   62421             :     "GetThreadLocalConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   62422             :     "\n"
   62423             :     "\n"
   62424             :     "Return the value of a thread-local configuration option.\n"
   62425             :     "See :cpp:func:`CPLGetThreadLocalConfigOption`.\n"
   62426             :     "\n"
   62427             :     "Parameters\n"
   62428             :     "----------\n"
   62429             :     "pszKey : str\n"
   62430             :     "    name of the configuration option\n"
   62431             :     "pszDefault : str, optional\n"
   62432             :     "    default value to return if the option has not been set\n"
   62433             :     "\n"
   62434             :     "Returns\n"
   62435             :     "-------\n"
   62436             :     "str\n"
   62437             :     "\n"
   62438             :     "\n"
   62439             :     ""},
   62440             :    { "GetConfigOptions", _wrap_GetConfigOptions, METH_NOARGS, "\n"
   62441             :     "GetConfigOptions() -> char **\n"
   62442             :     "\n"
   62443             :     "\n"
   62444             :     "Return a dictionary of currently set configuration options.\n"
   62445             :     "See :cpp:func:`CPLGetConfigOptions`.\n"
   62446             :     "\n"
   62447             :     "Returns\n"
   62448             :     "-------\n"
   62449             :     "dict\n"
   62450             :     "\n"
   62451             :     "Examples\n"
   62452             :     "--------\n"
   62453             :     ">>> with gdal.config_options({'A': '3', 'B': '4'}):\n"
   62454             :     "...     gdal.SetConfigOption('C', '5')\n"
   62455             :     "...     gdal.GetConfigOptions()\n"
   62456             :     "...\n"
   62457             :     "{'C': '5', 'A': '3', 'B': '4'}\n"
   62458             :     "\n"
   62459             :     "See Also\n"
   62460             :     "--------\n"
   62461             :     ":py:func:`GetConfigOption`\n"
   62462             :     ":py:func:`GetGlobalConfigOptions`\n"
   62463             :     "\n"
   62464             :     ""},
   62465             :    { "SetPathSpecificOption", _wrap_SetPathSpecificOption, METH_VARARGS, "SetPathSpecificOption(char const * pszPathPrefix, char const * pszKey, char const * pszValue)"},
   62466             :    { "SetCredential", _wrap_SetCredential, METH_VARARGS, "SetCredential(char const * pszPathPrefix, char const * pszKey, char const * pszValue)"},
   62467             :    { "GetCredential", _wrap_GetCredential, METH_VARARGS, "GetCredential(char const * pszPathPrefix, char const * pszKey, char const * pszDefault=None) -> char const *"},
   62468             :    { "GetPathSpecificOption", _wrap_GetPathSpecificOption, METH_VARARGS, "GetPathSpecificOption(char const * pszPathPrefix, char const * pszKey, char const * pszDefault=None) -> char const *"},
   62469             :    { "ClearCredentials", _wrap_ClearCredentials, METH_VARARGS, "ClearCredentials(char const * pszPathPrefix=None)"},
   62470             :    { "ClearPathSpecificOptions", _wrap_ClearPathSpecificOptions, METH_VARARGS, "ClearPathSpecificOptions(char const * pszPathPrefix=None)"},
   62471             :    { "CPLBinaryToHex", _wrap_CPLBinaryToHex, METH_O, "CPLBinaryToHex(int nBytes) -> retStringAndCPLFree *"},
   62472             :    { "CPLHexToBinary", _wrap_CPLHexToBinary, METH_VARARGS, "CPLHexToBinary(char const * pszHex, int * pnBytes) -> GByte *"},
   62473             :    { "FileFromMemBuffer", _wrap_FileFromMemBuffer, METH_VARARGS, "FileFromMemBuffer(char const * utf8_path, GIntBig nBytes) -> VSI_RETVAL"},
   62474             :    { "Unlink", _wrap_Unlink, METH_O, "Unlink(char const * utf8_path) -> VSI_RETVAL"},
   62475             :    { "UnlinkBatch", _wrap_UnlinkBatch, METH_O, "UnlinkBatch(char ** files) -> bool"},
   62476             :    { "HasThreadSupport", _wrap_HasThreadSupport, METH_NOARGS, "HasThreadSupport() -> int"},
   62477             :    { "Mkdir", _wrap_Mkdir, METH_VARARGS, "Mkdir(char const * utf8_path, int mode) -> VSI_RETVAL"},
   62478             :    { "Rmdir", _wrap_Rmdir, METH_O, "Rmdir(char const * utf8_path) -> VSI_RETVAL"},
   62479             :    { "MkdirRecursive", _wrap_MkdirRecursive, METH_VARARGS, "MkdirRecursive(char const * utf8_path, int mode) -> VSI_RETVAL"},
   62480             :    { "RmdirRecursive", _wrap_RmdirRecursive, METH_O, "RmdirRecursive(char const * utf8_path) -> VSI_RETVAL"},
   62481             :    { "Rename", _wrap_Rename, METH_VARARGS, "Rename(char const * old_path, char const * new_path) -> VSI_RETVAL"},
   62482             :    { "Move", (PyCFunction)(void(*)(void))_wrap_Move, METH_VARARGS|METH_KEYWORDS, "Move(char const * old_path, char const * new_path, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> VSI_RETVAL"},
   62483             :    { "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"},
   62484             :    { "AbortPendingUploads", _wrap_AbortPendingUploads, METH_O, "AbortPendingUploads(char const * utf8_path) -> bool"},
   62485             :    { "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"},
   62486             :    { "CopyFileRestartable", _wrap_CopyFileRestartable, METH_VARARGS, "CopyFileRestartable(char const * pszSource, char const * pszTarget, char const * pszInputPayload, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None)"},
   62487             :    { "MoveFile", _wrap_MoveFile, METH_VARARGS, "MoveFile(char const * pszSource, char const * pszTarget) -> int"},
   62488             :    { "GetActualURL", _wrap_GetActualURL, METH_O, "GetActualURL(char const * utf8_path) -> char const *"},
   62489             :    { "GetSignedURL", _wrap_GetSignedURL, METH_VARARGS, "GetSignedURL(char const * utf8_path, char ** options=None) -> retStringAndCPLFree *"},
   62490             :    { "GetFileSystemsPrefixes", _wrap_GetFileSystemsPrefixes, METH_NOARGS, "GetFileSystemsPrefixes() -> char **"},
   62491             :    { "GetFileSystemOptions", _wrap_GetFileSystemOptions, METH_O, "GetFileSystemOptions(char const * utf8_path) -> char const *"},
   62492             :    { "VSILFILE_swigregister", VSILFILE_swigregister, METH_O, NULL},
   62493             :    { "StatBuf_mode_get", _wrap_StatBuf_mode_get, METH_O, "StatBuf_mode_get(StatBuf self) -> int"},
   62494             :    { "StatBuf_size_get", _wrap_StatBuf_size_get, METH_O, "StatBuf_size_get(StatBuf self) -> GIntBig"},
   62495             :    { "StatBuf_mtime_get", _wrap_StatBuf_mtime_get, METH_O, "StatBuf_mtime_get(StatBuf self) -> GIntBig"},
   62496             :    { "new_StatBuf", _wrap_new_StatBuf, METH_O, "new_StatBuf(StatBuf psStatBuf) -> StatBuf"},
   62497             :    { "delete_StatBuf", _wrap_delete_StatBuf, METH_O, "delete_StatBuf(StatBuf self)"},
   62498             :    { "StatBuf_IsDirectory", _wrap_StatBuf_IsDirectory, METH_O, "StatBuf_IsDirectory(StatBuf self) -> int"},
   62499             :    { "StatBuf_swigregister", StatBuf_swigregister, METH_O, NULL},
   62500             :    { "StatBuf_swiginit", StatBuf_swiginit, METH_VARARGS, NULL},
   62501             :    { "VSIStatL", _wrap_VSIStatL, METH_VARARGS, "VSIStatL(char const * utf8_path, int nFlags=0) -> int"},
   62502             :    { "GetFileMetadata", _wrap_GetFileMetadata, METH_VARARGS, "GetFileMetadata(char const * utf8_path, char const * domain, char ** options=None) -> char **"},
   62503             :    { "SetFileMetadata", _wrap_SetFileMetadata, METH_VARARGS, "SetFileMetadata(char const * utf8_path, char ** metadata, char const * domain, char ** options=None) -> bool"},
   62504             :    { "VSIFOpenL", _wrap_VSIFOpenL, METH_VARARGS, "VSIFOpenL(char const * utf8_path, char const * pszMode) -> VSILFILE"},
   62505             :    { "VSIFOpenExL", _wrap_VSIFOpenExL, METH_VARARGS, "VSIFOpenExL(char const * utf8_path, char const * pszMode, int bSetError=FALSE, char ** options=None) -> VSILFILE"},
   62506             :    { "VSIFEofL", _wrap_VSIFEofL, METH_O, "VSIFEofL(VSILFILE fp) -> int"},
   62507             :    { "VSIFErrorL", _wrap_VSIFErrorL, METH_O, "VSIFErrorL(VSILFILE fp) -> int"},
   62508             :    { "VSIFClearErrL", _wrap_VSIFClearErrL, METH_O, "VSIFClearErrL(VSILFILE fp)"},
   62509             :    { "VSIFFlushL", _wrap_VSIFFlushL, METH_O, "VSIFFlushL(VSILFILE fp) -> int"},
   62510             :    { "VSIFCloseL", _wrap_VSIFCloseL, METH_O, "VSIFCloseL(VSILFILE fp) -> VSI_RETVAL"},
   62511             :    { "VSIFSeekL", _wrap_VSIFSeekL, METH_VARARGS, "VSIFSeekL(VSILFILE fp, GIntBig offset, int whence) -> int"},
   62512             :    { "VSIFTellL", _wrap_VSIFTellL, METH_O, "VSIFTellL(VSILFILE fp) -> GIntBig"},
   62513             :    { "VSIFTruncateL", _wrap_VSIFTruncateL, METH_VARARGS, "VSIFTruncateL(VSILFILE fp, GIntBig length) -> int"},
   62514             :    { "VSISupportsSparseFiles", _wrap_VSISupportsSparseFiles, METH_O, "VSISupportsSparseFiles(char const * utf8_path) -> int"},
   62515             :    { "VSIFGetRangeStatusL", _wrap_VSIFGetRangeStatusL, METH_VARARGS, "VSIFGetRangeStatusL(VSILFILE fp, GIntBig offset, GIntBig length) -> int"},
   62516             :    { "VSIFWriteL", _wrap_VSIFWriteL, METH_VARARGS, "VSIFWriteL(int nLen, int size, int memb, VSILFILE fp) -> int"},
   62517             :    { "CPLReadLineL", _wrap_CPLReadLineL, METH_O, "CPLReadLineL(VSILFILE fp) -> char const *"},
   62518             :    { "VSICurlClearCache", _wrap_VSICurlClearCache, METH_NOARGS, "VSICurlClearCache()"},
   62519             :    { "VSICurlPartialClearCache", _wrap_VSICurlPartialClearCache, METH_O, "VSICurlPartialClearCache(char const * utf8_path)"},
   62520             :    { "NetworkStatsReset", _wrap_NetworkStatsReset, METH_NOARGS, "NetworkStatsReset()"},
   62521             :    { "NetworkStatsGetAsSerializedJSON", _wrap_NetworkStatsGetAsSerializedJSON, METH_VARARGS, "NetworkStatsGetAsSerializedJSON(char ** options=None) -> retStringAndCPLFree *"},
   62522             :    { "ParseCommandLine", _wrap_ParseCommandLine, METH_O, "ParseCommandLine(char const * utf8_path) -> char **"},
   62523             :    { "GetNumCPUs", _wrap_GetNumCPUs, METH_NOARGS, "\n"
   62524             :     "GetNumCPUs() -> int\n"
   62525             :     "\n"
   62526             :     "\n"
   62527             :     "Return the number of processors detected by GDAL.\n"
   62528             :     "\n"
   62529             :     "Returns\n"
   62530             :     "-------\n"
   62531             :     "int\n"
   62532             :     "\n"
   62533             :     ""},
   62534             :    { "GetUsablePhysicalRAM", _wrap_GetUsablePhysicalRAM, METH_NOARGS, "GetUsablePhysicalRAM() -> GIntBig"},
   62535             :    { "MultipartUploadGetCapabilities", _wrap_MultipartUploadGetCapabilities, METH_O, "MultipartUploadGetCapabilities(char const * pszFilename)"},
   62536             :    { "MultipartUploadStart", _wrap_MultipartUploadStart, METH_VARARGS, "MultipartUploadStart(char const * pszFilename, char ** options=None) -> retStringAndCPLFree *"},
   62537             :    { "MultipartUploadAddPart", _wrap_MultipartUploadAddPart, METH_VARARGS, "MultipartUploadAddPart(char const * pszFilename, char const * pszUploadId, int nPartNumber, GUIntBig nFileOffset, size_t nDataLength, char ** options=None) -> retStringAndCPLFree *"},
   62538             :    { "MultipartUploadEnd", _wrap_MultipartUploadEnd, METH_VARARGS, "MultipartUploadEnd(char const * pszFilename, char const * pszUploadId, char ** partIds, GUIntBig nTotalSize, char ** options=None) -> bool"},
   62539             :    { "MultipartUploadAbort", _wrap_MultipartUploadAbort, METH_VARARGS, "MultipartUploadAbort(char const * pszFilename, char const * pszUploadId, char ** options=None) -> bool"},
   62540             :    { "MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_O, "MajorObject_GetDescription(MajorObject self) -> char const *"},
   62541             :    { "MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, "MajorObject_SetDescription(MajorObject self, char const * pszNewDesc)"},
   62542             :    { "MajorObject_GetMetadataDomainList", _wrap_MajorObject_GetMetadataDomainList, METH_O, "MajorObject_GetMetadataDomainList(MajorObject self) -> char **"},
   62543             :    { "MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, "MajorObject_GetMetadata_Dict(MajorObject self, char const * pszDomain=\"\") -> char **"},
   62544             :    { "MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, "MajorObject_GetMetadata_List(MajorObject self, char const * pszDomain=\"\") -> char **"},
   62545             :    { "MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, "\n"
   62546             :     "MajorObject_SetMetadata(MajorObject self, char ** papszMetadata, char const * pszDomain=\"\") -> CPLErr\n"
   62547             :     "MajorObject_SetMetadata(MajorObject self, char * pszMetadataString, char const * pszDomain=\"\") -> CPLErr\n"
   62548             :     ""},
   62549             :    { "MajorObject_GetMetadataItem", _wrap_MajorObject_GetMetadataItem, METH_VARARGS, "MajorObject_GetMetadataItem(MajorObject self, char const * pszName, char const * pszDomain=\"\") -> char const *"},
   62550             :    { "MajorObject_SetMetadataItem", _wrap_MajorObject_SetMetadataItem, METH_VARARGS, "MajorObject_SetMetadataItem(MajorObject self, char const * pszName, char const * pszValue, char const * pszDomain=\"\") -> CPLErr"},
   62551             :    { "MajorObject_swigregister", MajorObject_swigregister, METH_O, NULL},
   62552             :    { "Driver_ShortName_get", _wrap_Driver_ShortName_get, METH_O, "\n"
   62553             :     "Driver_ShortName_get(Driver self) -> char const *\n"
   62554             :     "\n"
   62555             :     "The short name of a :py:class:`Driver` that can be passed to\n"
   62556             :     ":py:func:`GetDriverByName`.\n"
   62557             :     "See :cpp:func:`GDALGetDriverShortName`.\n"
   62558             :     "\n"
   62559             :     ""},
   62560             :    { "Driver_LongName_get", _wrap_Driver_LongName_get, METH_O, "\n"
   62561             :     "Driver_LongName_get(Driver self) -> char const *\n"
   62562             :     "\n"
   62563             :     "The long name of the driver.\n"
   62564             :     "See :cpp:func:`GDALGetDriverLongName`.\n"
   62565             :     "\n"
   62566             :     ""},
   62567             :    { "Driver_HelpTopic_get", _wrap_Driver_HelpTopic_get, METH_O, "\n"
   62568             :     "Driver_HelpTopic_get(Driver self) -> char const *\n"
   62569             :     "\n"
   62570             :     "The URL for driver documentation, relative to the GDAL documentation directory.\n"
   62571             :     "See :cpp:func:`GDALGetDriverHelpTopic`.\n"
   62572             :     "\n"
   62573             :     ""},
   62574             :    { "Driver_Create", (PyCFunction)(void(*)(void))_wrap_Driver_Create, METH_VARARGS|METH_KEYWORDS, "\n"
   62575             :     "Driver_Create(Driver self, char const * utf8_path, int xsize, int ysize, int bands=1, GDALDataType eType=GDT_Byte, char ** options=None) -> Dataset\n"
   62576             :     "\n"
   62577             :     "\n"
   62578             :     "Create a new :py:class:`Dataset` with this driver.\n"
   62579             :     "See :cpp:func:`GDALDriver::Create`.\n"
   62580             :     "\n"
   62581             :     "Parameters\n"
   62582             :     "----------\n"
   62583             :     "utf8_path : str\n"
   62584             :     "   Path of the dataset to create.\n"
   62585             :     "xsize : int\n"
   62586             :     "   Width of created raster in pixels. Set to zero for vector datasets.\n"
   62587             :     "ysize : int\n"
   62588             :     "   Height of created raster in pixels. Set to zero for vector datasets.\n"
   62589             :     "bands : int, default = 1\n"
   62590             :     "    Number of bands. Set to zero for vector datasets.\n"
   62591             :     "eType : int/NumPy dtype, default = :py:const:`GDT_Byte`\n"
   62592             :     "    Raster data type. Set to :py:const:`GDT_Unknown` for vector datasets.\n"
   62593             :     "options : list/dict\n"
   62594             :     "    List of driver-specific options\n"
   62595             :     "\n"
   62596             :     "Returns\n"
   62597             :     "-------\n"
   62598             :     "Dataset\n"
   62599             :     "\n"
   62600             :     "Examples\n"
   62601             :     "--------\n"
   62602             :     ">>> with gdal.GetDriverByName('GTiff').Create('test.tif', 12, 4, 2, gdal.GDT_Float32, {'COMPRESS': 'DEFLATE'}) as ds:\n"
   62603             :     "...     print(gdal.Info(ds))\n"
   62604             :     "...\n"
   62605             :     "Driver: GTiff/GeoTIFF\n"
   62606             :     "Files: test.tif\n"
   62607             :     "Size is 12, 4\n"
   62608             :     "Image Structure Metadata:\n"
   62609             :     "  INTERLEAVE=PIXEL\n"
   62610             :     "Corner Coordinates:\n"
   62611             :     "Upper Left  (    0.0,    0.0)\n"
   62612             :     "Lower Left  (    0.0,    4.0)\n"
   62613             :     "Upper Right (   12.0,    0.0)\n"
   62614             :     "Lower Right (   12.0,    4.0)\n"
   62615             :     "Center      (    6.0,    2.0)\n"
   62616             :     "Band 1 Block=12x4 Type=Float32, ColorInterp=Gray\n"
   62617             :     "Band 2 Block=12x4 Type=Float32, ColorInterp=Undefined\n"
   62618             :     "\n"
   62619             :     ">>> with gdal.GetDriverByName('ESRI Shapefile').Create('test.shp', 0, 0, 0, gdal.GDT_Unknown) as ds:\n"
   62620             :     "...     print(gdal.VectorInfo(ds))\n"
   62621             :     "...\n"
   62622             :     "INFO: Open of `test.shp'\n"
   62623             :     "      using driver `ESRI Shapefile' successful.\n"
   62624             :     "\n"
   62625             :     ""},
   62626             :    { "Driver_CreateVector", (PyCFunction)(void(*)(void))_wrap_Driver_CreateVector, METH_VARARGS|METH_KEYWORDS, "\n"
   62627             :     "Driver_CreateVector(Driver self, char const * utf8_path, char ** options=None) -> Dataset\n"
   62628             :     "\n"
   62629             :     "\n"
   62630             :     "Create a new vector :py:class:`Dataset` with this driver.\n"
   62631             :     "This method is an alias for ``Create(name, 0, 0, 0, gdal.GDT_Unknown)``.\n"
   62632             :     "\n"
   62633             :     "Parameters\n"
   62634             :     "----------\n"
   62635             :     "utf8_path : str\n"
   62636             :     "   Path of the dataset to create.\n"
   62637             :     "\n"
   62638             :     "Returns\n"
   62639             :     "-------\n"
   62640             :     "Dataset\n"
   62641             :     "\n"
   62642             :     "Examples\n"
   62643             :     "--------\n"
   62644             :     ">>> with gdal.GetDriverByName('ESRI Shapefile').CreateVector('test.shp') as ds:\n"
   62645             :     "...     print(ds.GetLayerCount())\n"
   62646             :     "... \n"
   62647             :     "0\n"
   62648             :     "\n"
   62649             :     "\n"
   62650             :     ""},
   62651             :    { "Driver_CreateMultiDimensional", (PyCFunction)(void(*)(void))_wrap_Driver_CreateMultiDimensional, METH_VARARGS|METH_KEYWORDS, "\n"
   62652             :     "Driver_CreateMultiDimensional(Driver self, char const * utf8_path, char ** root_group_options=None, char ** options=None) -> Dataset\n"
   62653             :     "\n"
   62654             :     "\n"
   62655             :     "Create a new multidimensional dataset.\n"
   62656             :     "See :cpp:func:`GDALDriver::CreateMultiDimensional`.\n"
   62657             :     "\n"
   62658             :     "Parameters\n"
   62659             :     "----------\n"
   62660             :     "utf8_path : str\n"
   62661             :     "   Path of the dataset to create.\n"
   62662             :     "root_group_options : dict/list\n"
   62663             :     "   Driver-specific options regarding the creation of the\n"
   62664             :     "   root group.\n"
   62665             :     "options : list/dict\n"
   62666             :     "   List of driver-specific options regarding the creation\n"
   62667             :     "   of the Dataset.\n"
   62668             :     "\n"
   62669             :     "Returns\n"
   62670             :     "-------\n"
   62671             :     "Dataset\n"
   62672             :     "\n"
   62673             :     "Examples\n"
   62674             :     "--------\n"
   62675             :     ">>> with gdal.GetDriverByName('netCDF').CreateMultiDimensional('test.nc') as ds:\n"
   62676             :     "...     gdal.MultiDimInfo(ds)\n"
   62677             :     "...\n"
   62678             :     "{'type': 'group', 'driver': 'netCDF', 'name': '/', 'attributes': {'Conventions': 'CF-1.6'}, 'structural_info': {'NC_FORMAT': 'NETCDF4'}}\n"
   62679             :     "\n"
   62680             :     "\n"
   62681             :     ""},
   62682             :    { "Driver_CreateCopy", (PyCFunction)(void(*)(void))_wrap_Driver_CreateCopy, METH_VARARGS|METH_KEYWORDS, "\n"
   62683             :     "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"
   62684             :     "\n"
   62685             :     "\n"
   62686             :     "Create a copy of a :py:class:`Dataset`.\n"
   62687             :     "See :cpp:func:`GDALDriver::CreateCopy`.\n"
   62688             :     "\n"
   62689             :     "Parameters\n"
   62690             :     "----------\n"
   62691             :     "utf8_path : str\n"
   62692             :     "   Path of the dataset to create.\n"
   62693             :     "src : Dataset\n"
   62694             :     "   The Dataset being duplicated.\n"
   62695             :     "strict : bool, default=1\n"
   62696             :     "   Indicates whether the copy must be strictly equivalent or if\n"
   62697             :     "   it may be adapted as needed for the output format.\n"
   62698             :     "options : list/dict\n"
   62699             :     "   List of driver-specific options\n"
   62700             :     "callback : function, optional\n"
   62701             :     "   A progress callback function\n"
   62702             :     "callback_data: optional\n"
   62703             :     "   Optional data to be passed to callback function\n"
   62704             :     "\n"
   62705             :     "Returns\n"
   62706             :     "-------\n"
   62707             :     "Dataset\n"
   62708             :     "\n"
   62709             :     ""},
   62710             :    { "Driver_Delete", _wrap_Driver_Delete, METH_VARARGS, "\n"
   62711             :     "Driver_Delete(Driver self, char const * utf8_path) -> CPLErr\n"
   62712             :     "\n"
   62713             :     "Delete a :py:class:`Dataset`.\n"
   62714             :     "See :cpp:func:`GDALDriver::Delete`.\n"
   62715             :     "\n"
   62716             :     "Parameters\n"
   62717             :     "----------\n"
   62718             :     "utf8_path : str\n"
   62719             :     "   Path of the dataset to delete.\n"
   62720             :     "\n"
   62721             :     "Returns\n"
   62722             :     "-------\n"
   62723             :     "int:\n"
   62724             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   62725             :     "\n"
   62726             :     ""},
   62727             :    { "Driver_Rename", _wrap_Driver_Rename, METH_VARARGS, "\n"
   62728             :     "Driver_Rename(Driver self, char const * newName, char const * oldName) -> CPLErr\n"
   62729             :     "\n"
   62730             :     "Rename a :py:class:`Dataset`.\n"
   62731             :     "See :cpp:func:`GDALDriver::Rename`.\n"
   62732             :     "\n"
   62733             :     "Parameters\n"
   62734             :     "----------\n"
   62735             :     "newName : str\n"
   62736             :     "    new path for the dataset\n"
   62737             :     "oldName : str\n"
   62738             :     "    old path for the dataset\n"
   62739             :     "\n"
   62740             :     "Returns\n"
   62741             :     "-------\n"
   62742             :     "int:\n"
   62743             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   62744             :     "\n"
   62745             :     ""},
   62746             :    { "Driver_CopyFiles", _wrap_Driver_CopyFiles, METH_VARARGS, "\n"
   62747             :     "Driver_CopyFiles(Driver self, char const * newName, char const * oldName) -> CPLErr\n"
   62748             :     "\n"
   62749             :     "Copy all the files associated with a :py:class:`Dataset`.\n"
   62750             :     "\n"
   62751             :     "Parameters\n"
   62752             :     "----------\n"
   62753             :     "newName : str\n"
   62754             :     "    new path for the dataset\n"
   62755             :     "oldName : str\n"
   62756             :     "    old path for the dataset\n"
   62757             :     "\n"
   62758             :     "Returns\n"
   62759             :     "-------\n"
   62760             :     "int:\n"
   62761             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   62762             :     "\n"
   62763             :     ""},
   62764             :    { "Driver_HasOpenOption", _wrap_Driver_HasOpenOption, METH_VARARGS, "Driver_HasOpenOption(Driver self, char const * openOptionName) -> bool"},
   62765             :    { "Driver_TestCapability", _wrap_Driver_TestCapability, METH_VARARGS, "Driver_TestCapability(Driver self, char const * cap) -> bool"},
   62766             :    { "Driver_Register", _wrap_Driver_Register, METH_O, "\n"
   62767             :     "Driver_Register(Driver self) -> int\n"
   62768             :     "\n"
   62769             :     "Register the driver for use.\n"
   62770             :     "See :cpp:func:`GDALDriverManager::RegisterDriver`.\n"
   62771             :     "\n"
   62772             :     ""},
   62773             :    { "Driver_Deregister", _wrap_Driver_Deregister, METH_O, "\n"
   62774             :     "Driver_Deregister(Driver self)\n"
   62775             :     "\n"
   62776             :     "Deregister the driver.\n"
   62777             :     "See :cpp:func:`GDALDriverManager::DeregisterDriver`.\n"
   62778             :     "\n"
   62779             :     ""},
   62780             :    { "Driver_swigregister", Driver_swigregister, METH_O, NULL},
   62781             :    { "ColorEntry_c1_set", _wrap_ColorEntry_c1_set, METH_VARARGS, "ColorEntry_c1_set(ColorEntry self, short c1)"},
   62782             :    { "ColorEntry_c1_get", _wrap_ColorEntry_c1_get, METH_O, "ColorEntry_c1_get(ColorEntry self) -> short"},
   62783             :    { "ColorEntry_c2_set", _wrap_ColorEntry_c2_set, METH_VARARGS, "ColorEntry_c2_set(ColorEntry self, short c2)"},
   62784             :    { "ColorEntry_c2_get", _wrap_ColorEntry_c2_get, METH_O, "ColorEntry_c2_get(ColorEntry self) -> short"},
   62785             :    { "ColorEntry_c3_set", _wrap_ColorEntry_c3_set, METH_VARARGS, "ColorEntry_c3_set(ColorEntry self, short c3)"},
   62786             :    { "ColorEntry_c3_get", _wrap_ColorEntry_c3_get, METH_O, "ColorEntry_c3_get(ColorEntry self) -> short"},
   62787             :    { "ColorEntry_c4_set", _wrap_ColorEntry_c4_set, METH_VARARGS, "ColorEntry_c4_set(ColorEntry self, short c4)"},
   62788             :    { "ColorEntry_c4_get", _wrap_ColorEntry_c4_get, METH_O, "ColorEntry_c4_get(ColorEntry self) -> short"},
   62789             :    { "ColorEntry_swigregister", ColorEntry_swigregister, METH_O, NULL},
   62790             :    { "GCP_GCPX_set", _wrap_GCP_GCPX_set, METH_VARARGS, "GCP_GCPX_set(GCP self, double GCPX)"},
   62791             :    { "GCP_GCPX_get", _wrap_GCP_GCPX_get, METH_O, "GCP_GCPX_get(GCP self) -> double"},
   62792             :    { "GCP_GCPY_set", _wrap_GCP_GCPY_set, METH_VARARGS, "GCP_GCPY_set(GCP self, double GCPY)"},
   62793             :    { "GCP_GCPY_get", _wrap_GCP_GCPY_get, METH_O, "GCP_GCPY_get(GCP self) -> double"},
   62794             :    { "GCP_GCPZ_set", _wrap_GCP_GCPZ_set, METH_VARARGS, "GCP_GCPZ_set(GCP self, double GCPZ)"},
   62795             :    { "GCP_GCPZ_get", _wrap_GCP_GCPZ_get, METH_O, "GCP_GCPZ_get(GCP self) -> double"},
   62796             :    { "GCP_GCPPixel_set", _wrap_GCP_GCPPixel_set, METH_VARARGS, "GCP_GCPPixel_set(GCP self, double GCPPixel)"},
   62797             :    { "GCP_GCPPixel_get", _wrap_GCP_GCPPixel_get, METH_O, "GCP_GCPPixel_get(GCP self) -> double"},
   62798             :    { "GCP_GCPLine_set", _wrap_GCP_GCPLine_set, METH_VARARGS, "GCP_GCPLine_set(GCP self, double GCPLine)"},
   62799             :    { "GCP_GCPLine_get", _wrap_GCP_GCPLine_get, METH_O, "GCP_GCPLine_get(GCP self) -> double"},
   62800             :    { "GCP_Info_set", _wrap_GCP_Info_set, METH_VARARGS, "GCP_Info_set(GCP self, char * Info)"},
   62801             :    { "GCP_Info_get", _wrap_GCP_Info_get, METH_O, "GCP_Info_get(GCP self) -> char *"},
   62802             :    { "GCP_Id_set", _wrap_GCP_Id_set, METH_VARARGS, "GCP_Id_set(GCP self, char * Id)"},
   62803             :    { "GCP_Id_get", _wrap_GCP_Id_get, METH_O, "GCP_Id_get(GCP self) -> char *"},
   62804             :    { "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"},
   62805             :    { "delete_GCP", _wrap_delete_GCP, METH_O, "delete_GCP(GCP self)"},
   62806             :    { "GCP_swigregister", GCP_swigregister, METH_O, NULL},
   62807             :    { "GCP_swiginit", GCP_swiginit, METH_VARARGS, NULL},
   62808             :    { "GDAL_GCP_GCPX_get", _wrap_GDAL_GCP_GCPX_get, METH_O, "GDAL_GCP_GCPX_get(GCP gcp) -> double"},
   62809             :    { "GDAL_GCP_GCPX_set", _wrap_GDAL_GCP_GCPX_set, METH_VARARGS, "GDAL_GCP_GCPX_set(GCP gcp, double dfGCPX)"},
   62810             :    { "GDAL_GCP_GCPY_get", _wrap_GDAL_GCP_GCPY_get, METH_O, "GDAL_GCP_GCPY_get(GCP gcp) -> double"},
   62811             :    { "GDAL_GCP_GCPY_set", _wrap_GDAL_GCP_GCPY_set, METH_VARARGS, "GDAL_GCP_GCPY_set(GCP gcp, double dfGCPY)"},
   62812             :    { "GDAL_GCP_GCPZ_get", _wrap_GDAL_GCP_GCPZ_get, METH_O, "GDAL_GCP_GCPZ_get(GCP gcp) -> double"},
   62813             :    { "GDAL_GCP_GCPZ_set", _wrap_GDAL_GCP_GCPZ_set, METH_VARARGS, "GDAL_GCP_GCPZ_set(GCP gcp, double dfGCPZ)"},
   62814             :    { "GDAL_GCP_GCPPixel_get", _wrap_GDAL_GCP_GCPPixel_get, METH_O, "GDAL_GCP_GCPPixel_get(GCP gcp) -> double"},
   62815             :    { "GDAL_GCP_GCPPixel_set", _wrap_GDAL_GCP_GCPPixel_set, METH_VARARGS, "GDAL_GCP_GCPPixel_set(GCP gcp, double dfGCPPixel)"},
   62816             :    { "GDAL_GCP_GCPLine_get", _wrap_GDAL_GCP_GCPLine_get, METH_O, "GDAL_GCP_GCPLine_get(GCP gcp) -> double"},
   62817             :    { "GDAL_GCP_GCPLine_set", _wrap_GDAL_GCP_GCPLine_set, METH_VARARGS, "GDAL_GCP_GCPLine_set(GCP gcp, double dfGCPLine)"},
   62818             :    { "GDAL_GCP_Info_get", _wrap_GDAL_GCP_Info_get, METH_O, "GDAL_GCP_Info_get(GCP gcp) -> char const *"},
   62819             :    { "GDAL_GCP_Info_set", _wrap_GDAL_GCP_Info_set, METH_VARARGS, "GDAL_GCP_Info_set(GCP gcp, char const * pszInfo)"},
   62820             :    { "GDAL_GCP_Id_get", _wrap_GDAL_GCP_Id_get, METH_O, "GDAL_GCP_Id_get(GCP gcp) -> char const *"},
   62821             :    { "GDAL_GCP_Id_set", _wrap_GDAL_GCP_Id_set, METH_VARARGS, "GDAL_GCP_Id_set(GCP gcp, char const * pszId)"},
   62822             :    { "GCPsToGeoTransform", _wrap_GCPsToGeoTransform, METH_VARARGS, "GCPsToGeoTransform(int nGCPs, int bApproxOK=1) -> RETURN_NONE"},
   62823             :    { "GCPsToHomography", _wrap_GCPsToHomography, METH_O, "GCPsToHomography(int nGCPs) -> RETURN_NONE"},
   62824             :    { "delete_VirtualMem", _wrap_delete_VirtualMem, METH_O, "delete_VirtualMem(VirtualMem self)"},
   62825             :    { "VirtualMem_GetAddr", _wrap_VirtualMem_GetAddr, METH_O, "VirtualMem_GetAddr(VirtualMem self)"},
   62826             :    { "VirtualMem_Pin", _wrap_VirtualMem_Pin, METH_VARARGS, "VirtualMem_Pin(VirtualMem self, size_t start_offset=0, size_t nsize=0, int bWriteOp=0)"},
   62827             :    { "VirtualMem_swigregister", VirtualMem_swigregister, METH_O, NULL},
   62828             :    { "delete_AsyncReader", _wrap_delete_AsyncReader, METH_O, "delete_AsyncReader(AsyncReader self)"},
   62829             :    { "AsyncReader_GetNextUpdatedRegion", _wrap_AsyncReader_GetNextUpdatedRegion, METH_VARARGS, "AsyncReader_GetNextUpdatedRegion(AsyncReader self, double timeout) -> GDALAsyncStatusType"},
   62830             :    { "AsyncReader_GetBuffer", _wrap_AsyncReader_GetBuffer, METH_O, "AsyncReader_GetBuffer(AsyncReader self)"},
   62831             :    { "AsyncReader_LockBuffer", _wrap_AsyncReader_LockBuffer, METH_VARARGS, "AsyncReader_LockBuffer(AsyncReader self, double timeout) -> int"},
   62832             :    { "AsyncReader_UnlockBuffer", _wrap_AsyncReader_UnlockBuffer, METH_O, "AsyncReader_UnlockBuffer(AsyncReader self)"},
   62833             :    { "AsyncReader_swigregister", AsyncReader_swigregister, METH_O, NULL},
   62834             :    { "Dataset_RasterXSize_get", _wrap_Dataset_RasterXSize_get, METH_O, "\n"
   62835             :     "Dataset_RasterXSize_get(Dataset self) -> int\n"
   62836             :     "\n"
   62837             :     "\n"
   62838             :     "Raster width in pixels. See :cpp:func:`GDALGetRasterXSize`.\n"
   62839             :     "\n"
   62840             :     "\n"
   62841             :     ""},
   62842             :    { "Dataset_RasterYSize_get", _wrap_Dataset_RasterYSize_get, METH_O, "\n"
   62843             :     "Dataset_RasterYSize_get(Dataset self) -> int\n"
   62844             :     "\n"
   62845             :     "\n"
   62846             :     "Raster height in pixels. See :cpp:func:`GDALGetRasterYSize`.\n"
   62847             :     "\n"
   62848             :     "\n"
   62849             :     ""},
   62850             :    { "Dataset_RasterCount_get", _wrap_Dataset_RasterCount_get, METH_O, "\n"
   62851             :     "Dataset_RasterCount_get(Dataset self) -> int\n"
   62852             :     "\n"
   62853             :     "\n"
   62854             :     "The number of bands in this dataset.\n"
   62855             :     "\n"
   62856             :     "\n"
   62857             :     ""},
   62858             :    { "delete_Dataset", _wrap_delete_Dataset, METH_O, "delete_Dataset(Dataset self)"},
   62859             :    { "Dataset_Close", _wrap_Dataset_Close, METH_O, "\n"
   62860             :     "Dataset_Close(Dataset self) -> CPLErr\n"
   62861             :     "\n"
   62862             :     "Closes opened dataset and releases allocated resources.\n"
   62863             :     "\n"
   62864             :     "This method can be used to force the dataset to close\n"
   62865             :     "when one more references to the dataset are still\n"
   62866             :     "reachable. If :py:meth:`Close` is never called, the dataset will\n"
   62867             :     "be closed automatically during garbage collection.\n"
   62868             :     "\n"
   62869             :     "In most cases, it is preferable to open or create a dataset\n"
   62870             :     "using a context manager instead of calling :py:meth:`Close`\n"
   62871             :     "directly.\n"
   62872             :     "\n"
   62873             :     "\n"
   62874             :     ""},
   62875             :    { "Dataset_GetDriver", _wrap_Dataset_GetDriver, METH_O, "\n"
   62876             :     "Dataset_GetDriver(Dataset self) -> Driver\n"
   62877             :     "\n"
   62878             :     "\n"
   62879             :     "Fetch the driver used to open or create this :py:class:`Dataset`.\n"
   62880             :     "\n"
   62881             :     "\n"
   62882             :     ""},
   62883             :    { "Dataset_GetRasterBand", _wrap_Dataset_GetRasterBand, METH_VARARGS, "\n"
   62884             :     "Dataset_GetRasterBand(Dataset self, int nBand) -> Band\n"
   62885             :     "\n"
   62886             :     "\n"
   62887             :     "Fetch a :py:class:`Band` band from a :py:class:`Dataset`. See :cpp:func:`GDALGetRasterBand`.\n"
   62888             :     "\n"
   62889             :     "Parameters\n"
   62890             :     "-----------\n"
   62891             :     "nBand : int\n"
   62892             :     "    the index of the band to fetch, from 1 to :py:attr:`RasterCount`\n"
   62893             :     "\n"
   62894             :     "Returns\n"
   62895             :     "--------\n"
   62896             :     "Band:\n"
   62897             :     "    the :py:class:`Band`, or ``None`` on error.\n"
   62898             :     "\n"
   62899             :     "\n"
   62900             :     ""},
   62901             :    { "Dataset_IsThreadSafe", _wrap_Dataset_IsThreadSafe, METH_VARARGS, "Dataset_IsThreadSafe(Dataset self, int nScopeFlags) -> bool"},
   62902             :    { "Dataset_GetThreadSafeDataset", _wrap_Dataset_GetThreadSafeDataset, METH_VARARGS, "Dataset_GetThreadSafeDataset(Dataset self, int nScopeFlags) -> Dataset"},
   62903             :    { "Dataset_GetRootGroup", _wrap_Dataset_GetRootGroup, METH_O, "\n"
   62904             :     "Dataset_GetRootGroup(Dataset self) -> Group\n"
   62905             :     "\n"
   62906             :     "\n"
   62907             :     "Return the root :py:class:`Group` of this dataset.\n"
   62908             :     "Only value for multidimensional datasets.\n"
   62909             :     "\n"
   62910             :     "Returns\n"
   62911             :     "-------\n"
   62912             :     "Group\n"
   62913             :     "\n"
   62914             :     "\n"
   62915             :     ""},
   62916             :    { "Dataset_GetProjection", _wrap_Dataset_GetProjection, METH_O, "\n"
   62917             :     "Dataset_GetProjection(Dataset self) -> char const *\n"
   62918             :     "\n"
   62919             :     "\n"
   62920             :     "Return a WKT representation of the dataset spatial reference.\n"
   62921             :     "Equivalent to :py:meth:`GetProjectionRef`.\n"
   62922             :     "\n"
   62923             :     "Returns\n"
   62924             :     "-------\n"
   62925             :     "str\n"
   62926             :     "\n"
   62927             :     "\n"
   62928             :     ""},
   62929             :    { "Dataset_GetProjectionRef", _wrap_Dataset_GetProjectionRef, METH_O, "\n"
   62930             :     "Dataset_GetProjectionRef(Dataset self) -> char const *\n"
   62931             :     "\n"
   62932             :     "\n"
   62933             :     "Return a WKT representation of the dataset spatial reference.\n"
   62934             :     "\n"
   62935             :     "Returns\n"
   62936             :     "-------\n"
   62937             :     "str\n"
   62938             :     "\n"
   62939             :     "\n"
   62940             :     ""},
   62941             :    { "Dataset_GetRefCount", _wrap_Dataset_GetRefCount, METH_O, "Dataset_GetRefCount(Dataset self) -> int"},
   62942             :    { "Dataset_GetSummaryRefCount", _wrap_Dataset_GetSummaryRefCount, METH_O, "Dataset_GetSummaryRefCount(Dataset self) -> int"},
   62943             :    { "Dataset_GetSpatialRef", _wrap_Dataset_GetSpatialRef, METH_O, "\n"
   62944             :     "Dataset_GetSpatialRef(Dataset self) -> SpatialReference\n"
   62945             :     "\n"
   62946             :     "\n"
   62947             :     "Fetch the spatial reference for this dataset.\n"
   62948             :     "\n"
   62949             :     "Returns\n"
   62950             :     "--------\n"
   62951             :     "osr.SpatialReference\n"
   62952             :     "\n"
   62953             :     "\n"
   62954             :     ""},
   62955             :    { "Dataset_SetProjection", _wrap_Dataset_SetProjection, METH_VARARGS, "\n"
   62956             :     "Dataset_SetProjection(Dataset self, char const * prj) -> CPLErr\n"
   62957             :     "\n"
   62958             :     "\n"
   62959             :     "Set the spatial reference system for this dataset.\n"
   62960             :     "\n"
   62961             :     "See :cpp:func:`GDALDataset::SetProjection`.\n"
   62962             :     "\n"
   62963             :     "Parameters\n"
   62964             :     "----------\n"
   62965             :     "prj:\n"
   62966             :     "   The projection string in OGC WKT or PROJ.4 format\n"
   62967             :     "\n"
   62968             :     "Returns\n"
   62969             :     "-------\n"
   62970             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   62971             :     "\n"
   62972             :     "\n"
   62973             :     ""},
   62974             :    { "Dataset_SetSpatialRef", _wrap_Dataset_SetSpatialRef, METH_VARARGS, "\n"
   62975             :     "Dataset_SetSpatialRef(Dataset self, SpatialReference srs) -> CPLErr\n"
   62976             :     "\n"
   62977             :     "\n"
   62978             :     "Set the spatial reference system for this dataset.\n"
   62979             :     "\n"
   62980             :     "Parameters\n"
   62981             :     "----------\n"
   62982             :     "srs : SpatialReference\n"
   62983             :     "\n"
   62984             :     "Returns\n"
   62985             :     "-------\n"
   62986             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   62987             :     "\n"
   62988             :     "\n"
   62989             :     ""},
   62990             :    { "Dataset_GetGeoTransform", (PyCFunction)(void(*)(void))_wrap_Dataset_GetGeoTransform, METH_VARARGS|METH_KEYWORDS, "\n"
   62991             :     "Dataset_GetGeoTransform(Dataset self, int * can_return_null=None)\n"
   62992             :     "\n"
   62993             :     "\n"
   62994             :     "Fetch the affine transformation coefficients.\n"
   62995             :     "\n"
   62996             :     "See :cpp:func:`GDALGetGeoTransform`.\n"
   62997             :     "\n"
   62998             :     "Parameters\n"
   62999             :     "-----------\n"
   63000             :     "can_return_null : bool, default=False\n"
   63001             :     "    if ``True``, return ``None`` instead of the default transformation\n"
   63002             :     "    if the transformation for this :py:class:`Dataset` has not been defined.\n"
   63003             :     "\n"
   63004             :     "Returns\n"
   63005             :     "-------\n"
   63006             :     "tuple:\n"
   63007             :     "    a 6-member tuple representing the transformation coefficients\n"
   63008             :     "\n"
   63009             :     "\n"
   63010             :     "\n"
   63011             :     ""},
   63012             :    { "Dataset_SetGeoTransform", _wrap_Dataset_SetGeoTransform, METH_VARARGS, "\n"
   63013             :     "Dataset_SetGeoTransform(Dataset self, double [6] argin) -> CPLErr\n"
   63014             :     "\n"
   63015             :     "\n"
   63016             :     "Set the affine transformation coefficients.\n"
   63017             :     "\n"
   63018             :     "See :py:meth:`GetGeoTransform` for details on the meaning of the coefficients.\n"
   63019             :     "\n"
   63020             :     "Parameters\n"
   63021             :     "----------\n"
   63022             :     "argin : tuple\n"
   63023             :     "\n"
   63024             :     "Returns\n"
   63025             :     "-------\n"
   63026             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   63027             :     "\n"
   63028             :     "\n"
   63029             :     ""},
   63030             :    { "Dataset_BuildOverviews", (PyCFunction)(void(*)(void))_wrap_Dataset_BuildOverviews, METH_VARARGS|METH_KEYWORDS, "\n"
   63031             :     "Dataset_BuildOverviews(Dataset self, char const * resampling=\"NEAREST\", int overviewlist=0, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> int\n"
   63032             :     "\n"
   63033             :     "\n"
   63034             :     "Build raster overview(s) for all bands.\n"
   63035             :     "\n"
   63036             :     "See :cpp:func:`GDALDataset::BuildOverviews`\n"
   63037             :     "\n"
   63038             :     "Parameters\n"
   63039             :     "----------\n"
   63040             :     "resampling : str, optional\n"
   63041             :     "             The resampling method to use. See :cpp:func:`GDALDataset::BuildOveriews`.\n"
   63042             :     "overviewlist : list\n"
   63043             :     "             A list of overview levels (decimation factors) to build, or an\n"
   63044             :     "             empty list to clear existing overviews.\n"
   63045             :     "callback : function, optional\n"
   63046             :     "             A progress callback function\n"
   63047             :     "callback_data: optional\n"
   63048             :     "             Optional data to be passed to callback function\n"
   63049             :     "options : dict/list, optional\n"
   63050             :     "             A dict or list of key=value options\n"
   63051             :     "\n"
   63052             :     "Returns\n"
   63053             :     "-------\n"
   63054             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   63055             :     "\n"
   63056             :     "Examples\n"
   63057             :     "--------\n"
   63058             :     ">>> import numpy as np\n"
   63059             :     ">>> ds = gdal.GetDriverByName('GTiff').Create('test.tif', 12, 12)\n"
   63060             :     ">>> ds.GetRasterBand(1).WriteArray(np.arange(12*12).reshape((12, 12)))\n"
   63061             :     "0\n"
   63062             :     ">>> ds.BuildOverviews('AVERAGE', [2, 4])\n"
   63063             :     "0\n"
   63064             :     ">>> ds.GetRasterBand(1).GetOverviewCount()\n"
   63065             :     "2\n"
   63066             :     ">>> ds.BuildOverviews(overviewlist=[])\n"
   63067             :     "0\n"
   63068             :     ">>> ds.GetRasterBand(1).GetOverviewCount()\n"
   63069             :     "0\n"
   63070             :     "\n"
   63071             :     ""},
   63072             :    { "Dataset_GetGCPCount", _wrap_Dataset_GetGCPCount, METH_O, "\n"
   63073             :     "Dataset_GetGCPCount(Dataset self) -> int\n"
   63074             :     "\n"
   63075             :     "\n"
   63076             :     "Get number of GCPs. See :cpp:func:`GDALGetGCPCount`.\n"
   63077             :     "\n"
   63078             :     "Returns\n"
   63079             :     "--------\n"
   63080             :     "int\n"
   63081             :     "\n"
   63082             :     "\n"
   63083             :     ""},
   63084             :    { "Dataset_GetGCPProjection", _wrap_Dataset_GetGCPProjection, METH_O, "\n"
   63085             :     "Dataset_GetGCPProjection(Dataset self) -> char const *\n"
   63086             :     "\n"
   63087             :     "\n"
   63088             :     "Return a WKT representation of the GCP spatial reference.\n"
   63089             :     "\n"
   63090             :     "Returns\n"
   63091             :     "--------\n"
   63092             :     "string\n"
   63093             :     "\n"
   63094             :     "\n"
   63095             :     ""},
   63096             :    { "Dataset_GetGCPSpatialRef", _wrap_Dataset_GetGCPSpatialRef, METH_O, "\n"
   63097             :     "Dataset_GetGCPSpatialRef(Dataset self) -> SpatialReference\n"
   63098             :     "\n"
   63099             :     "\n"
   63100             :     "Get output spatial reference system for GCPs.\n"
   63101             :     "\n"
   63102             :     "See :cpp:func:`GDALGetGCPSpatialRef`\n"
   63103             :     "\n"
   63104             :     "\n"
   63105             :     ""},
   63106             :    { "Dataset_GetGCPs", _wrap_Dataset_GetGCPs, METH_O, "\n"
   63107             :     "Dataset_GetGCPs(Dataset self)\n"
   63108             :     "\n"
   63109             :     "\n"
   63110             :     "Get the GCPs. See :cpp:func:`GDALGetGCPs`.\n"
   63111             :     "\n"
   63112             :     "Returns\n"
   63113             :     "--------\n"
   63114             :     "tuple\n"
   63115             :     "    a tuple of :py:class:`GCP` objects.\n"
   63116             :     "\n"
   63117             :     "\n"
   63118             :     ""},
   63119             :    { "Dataset__SetGCPs", _wrap_Dataset__SetGCPs, METH_VARARGS, "\n"
   63120             :     "Dataset__SetGCPs(Dataset self, int nGCPs, char const * pszGCPProjection) -> CPLErr\n"
   63121             :     "\n"
   63122             :     "\n"
   63123             :     ""},
   63124             :    { "Dataset__SetGCPs2", _wrap_Dataset__SetGCPs2, METH_VARARGS, "Dataset__SetGCPs2(Dataset self, int nGCPs, SpatialReference hSRS) -> CPLErr"},
   63125             :    { "Dataset_FlushCache", _wrap_Dataset_FlushCache, METH_O, "\n"
   63126             :     "Dataset_FlushCache(Dataset self) -> CPLErr\n"
   63127             :     "\n"
   63128             :     "\n"
   63129             :     "Flush all write-cached data to disk.\n"
   63130             :     "\n"
   63131             :     "See :cpp:func:`GDALDataset::FlushCache`.\n"
   63132             :     "\n"
   63133             :     "Returns\n"
   63134             :     "-------\n"
   63135             :     "int\n"
   63136             :     "    `gdal.CE_None` in case of success\n"
   63137             :     "\n"
   63138             :     ""},
   63139             :    { "Dataset_AddBand", (PyCFunction)(void(*)(void))_wrap_Dataset_AddBand, METH_VARARGS|METH_KEYWORDS, "\n"
   63140             :     "Dataset_AddBand(Dataset self, GDALDataType datatype=GDT_Byte, char ** options=None) -> CPLErr\n"
   63141             :     "\n"
   63142             :     "\n"
   63143             :     "Adds a band to a :py:class:`Dataset`.\n"
   63144             :     "\n"
   63145             :     "Not supported by all drivers.\n"
   63146             :     "\n"
   63147             :     "Parameters\n"
   63148             :     "-----------\n"
   63149             :     "datatype: int\n"
   63150             :     "    the data type of the pixels in the new band\n"
   63151             :     "options: dict/list\n"
   63152             :     "    an optional dict or list of format-specific ``NAME=VALUE`` option strings.\n"
   63153             :     "\n"
   63154             :     "Returns\n"
   63155             :     "-------\n"
   63156             :     "int:\n"
   63157             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   63158             :     "\n"
   63159             :     "Examples\n"
   63160             :     "--------\n"
   63161             :     ">>> ds=gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   63162             :     ">>> ds.RasterCount\n"
   63163             :     "1\n"
   63164             :     ">>> ds.AddBand(gdal.GDT_Float32)\n"
   63165             :     "0\n"
   63166             :     ">>> ds.RasterCount\n"
   63167             :     "2\n"
   63168             :     "\n"
   63169             :     ""},
   63170             :    { "Dataset_CreateMaskBand", _wrap_Dataset_CreateMaskBand, METH_VARARGS, "\n"
   63171             :     "Dataset_CreateMaskBand(Dataset self, int nFlags) -> CPLErr\n"
   63172             :     "\n"
   63173             :     "\n"
   63174             :     "Adds a mask band to the dataset.\n"
   63175             :     "\n"
   63176             :     "See :cpp:func:`GDALDataset::CreateMaskBand`.\n"
   63177             :     "\n"
   63178             :     "Parameters\n"
   63179             :     "----------\n"
   63180             :     "flags : int\n"
   63181             :     "\n"
   63182             :     "Returns\n"
   63183             :     "-------\n"
   63184             :     "int\n"
   63185             :     "    :py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   63186             :     "\n"
   63187             :     "\n"
   63188             :     ""},
   63189             :    { "Dataset_GetFileList", _wrap_Dataset_GetFileList, METH_O, "\n"
   63190             :     "Dataset_GetFileList(Dataset self) -> char **\n"
   63191             :     "\n"
   63192             :     "\n"
   63193             :     "Returns a list of files believed to be part of this dataset.\n"
   63194             :     "See :cpp:func:`GDALGetFileList`.\n"
   63195             :     "\n"
   63196             :     "\n"
   63197             :     ""},
   63198             :    { "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"},
   63199             :    { "Dataset_AdviseRead", _wrap_Dataset_AdviseRead, METH_VARARGS, "\n"
   63200             :     "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"
   63201             :     "\n"
   63202             :     "\n"
   63203             :     "Advise driver of upcoming read requests.\n"
   63204             :     "\n"
   63205             :     "See :cpp:func:`GDALDataset::AdviseRead`.\n"
   63206             :     "\n"
   63207             :     "\n"
   63208             :     ""},
   63209             :    { "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"},
   63210             :    { "Dataset_EndAsyncReader", _wrap_Dataset_EndAsyncReader, METH_VARARGS, "Dataset_EndAsyncReader(Dataset self, AsyncReader ario)"},
   63211             :    { "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"},
   63212             :    { "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"},
   63213             :    { "Dataset_CreateLayer", (PyCFunction)(void(*)(void))_wrap_Dataset_CreateLayer, METH_VARARGS|METH_KEYWORDS, "\n"
   63214             :     "Dataset_CreateLayer(Dataset self, char const * name, SpatialReference srs=None, OGRwkbGeometryType geom_type=wkbUnknown, char ** options=None) -> Layer\n"
   63215             :     "\n"
   63216             :     "\n"
   63217             :     "Create a new layer in a vector Dataset.\n"
   63218             :     "\n"
   63219             :     "Parameters\n"
   63220             :     "----------\n"
   63221             :     "name : string\n"
   63222             :     "       the name for the new layer.  This should ideally not\n"
   63223             :     "       match any existing layer on the datasource.\n"
   63224             :     "srs : osr.SpatialReference, default=None\n"
   63225             :     "      the coordinate system to use for the new layer, or ``None`` if\n"
   63226             :     "      no coordinate system is available.\n"
   63227             :     "geom_type : int, default = :py:const:`ogr.wkbUnknown`\n"
   63228             :     "      geometry type for the layer.  Use :py:const:`ogr.wkbUnknown` if there\n"
   63229             :     "      are no constraints on the types geometry to be written.\n"
   63230             :     "options : dict/list, optional\n"
   63231             :     "      Driver-specific dict or list of name=value options\n"
   63232             :     "\n"
   63233             :     "Returns\n"
   63234             :     "-------\n"
   63235             :     "ogr.Layer or ``None`` on failure.\n"
   63236             :     "\n"
   63237             :     "\n"
   63238             :     "Examples\n"
   63239             :     "--------\n"
   63240             :     ">>> ds = gdal.GetDriverByName('GPKG').Create('test.gpkg', 0, 0)\n"
   63241             :     ">>> ds.GetLayerCount()\n"
   63242             :     "0\n"
   63243             :     ">>> lyr = ds.CreateLayer('poly', geom_type=ogr.wkbPolygon)\n"
   63244             :     ">>> ds.GetLayerCount()\n"
   63245             :     "1\n"
   63246             :     "\n"
   63247             :     "\n"
   63248             :     ""},
   63249             :    { "Dataset_CreateLayerFromGeomFieldDefn", _wrap_Dataset_CreateLayerFromGeomFieldDefn, METH_VARARGS, "Dataset_CreateLayerFromGeomFieldDefn(Dataset self, char const * name, GeomFieldDefn geom_field, char ** options=None) -> Layer"},
   63250             :    { "Dataset_CopyLayer", (PyCFunction)(void(*)(void))_wrap_Dataset_CopyLayer, METH_VARARGS|METH_KEYWORDS, "\n"
   63251             :     "Dataset_CopyLayer(Dataset self, Layer src_layer, char const * new_name, char ** options=None) -> Layer\n"
   63252             :     "\n"
   63253             :     "\n"
   63254             :     "Duplicate an existing :py:class:`ogr.Layer`.\n"
   63255             :     "\n"
   63256             :     "See :cpp:func:`GDALDAtaset::CopyLayer`.\n"
   63257             :     "\n"
   63258             :     "Parameters\n"
   63259             :     "----------\n"
   63260             :     "src_layer : ogr.Layer\n"
   63261             :     "            source layer\n"
   63262             :     "new_name : str\n"
   63263             :     "           name of the layer to create\n"
   63264             :     "options : dict/list\n"
   63265             :     "          a dict or list of name=value driver-specific creation options\n"
   63266             :     "\n"
   63267             :     "Returns\n"
   63268             :     "-------\n"
   63269             :     "ogr.Layer, or ``None`` if an error occurs\n"
   63270             :     "\n"
   63271             :     ""},
   63272             :    { "Dataset_DeleteLayer", _wrap_Dataset_DeleteLayer, METH_VARARGS, "Dataset_DeleteLayer(Dataset self, int index) -> OGRErr"},
   63273             :    { "Dataset_IsLayerPrivate", _wrap_Dataset_IsLayerPrivate, METH_VARARGS, "\n"
   63274             :     "Dataset_IsLayerPrivate(Dataset self, int index) -> bool\n"
   63275             :     "\n"
   63276             :     "\n"
   63277             :     "Parameters\n"
   63278             :     "----------\n"
   63279             :     "index : int\n"
   63280             :     "        Index o layer to check\n"
   63281             :     "\n"
   63282             :     "Returns\n"
   63283             :     "-------\n"
   63284             :     "bool\n"
   63285             :     "     ``True`` if the layer is a private or system table, ``False`` otherwise\n"
   63286             :     "\n"
   63287             :     "\n"
   63288             :     "\n"
   63289             :     ""},
   63290             :    { "Dataset_GetNextFeature", (PyCFunction)(void(*)(void))_wrap_Dataset_GetNextFeature, METH_VARARGS|METH_KEYWORDS, "\n"
   63291             :     "Dataset_GetNextFeature(Dataset self, bool include_layer=True, bool include_pct=False, GDALProgressFunc callback=0, void * callback_data=None) -> Feature\n"
   63292             :     "\n"
   63293             :     "\n"
   63294             :     "Fetch the next available feature from this dataset.\n"
   63295             :     "\n"
   63296             :     "This method is intended for the few drivers where\n"
   63297             :     ":py:meth:`OGRLayer.GetNextFeature` is not efficient, but in general\n"
   63298             :     ":py:meth:`OGRLayer.GetNextFeature` is a more natural API.\n"
   63299             :     "\n"
   63300             :     "See :cpp:func:`GDALDataset::GetNextFeature`.\n"
   63301             :     "\n"
   63302             :     "Returns\n"
   63303             :     "-------\n"
   63304             :     "ogr.Feature\n"
   63305             :     "\n"
   63306             :     "\n"
   63307             :     ""},
   63308             :    { "Dataset_TestCapability", _wrap_Dataset_TestCapability, METH_VARARGS, "\n"
   63309             :     "Dataset_TestCapability(Dataset self, char const * cap) -> bool\n"
   63310             :     "\n"
   63311             :     "\n"
   63312             :     "Test if a capability is available.\n"
   63313             :     "\n"
   63314             :     "Parameters\n"
   63315             :     "----------\n"
   63316             :     "cap : str\n"
   63317             :     "   Name of the capability (e.g., :py:const:`ogr.ODsCTransactions`)\n"
   63318             :     "\n"
   63319             :     "Returns\n"
   63320             :     "-------\n"
   63321             :     "bool\n"
   63322             :     "    ``True`` if the capability is available, ``False`` if invalid or unavailable\n"
   63323             :     "\n"
   63324             :     "Examples\n"
   63325             :     "--------\n"
   63326             :     ">>> ds = gdal.GetDriverByName('ESRI Shapefile').Create('test.shp', 0, 0, 0, gdal.GDT_Unknown)\n"
   63327             :     ">>> ds.TestCapability(ogr.ODsCTransactions)\n"
   63328             :     "False\n"
   63329             :     ">>> ds.TestCapability(ogr.ODsCMeasuredGeometries)\n"
   63330             :     "True\n"
   63331             :     ">>> ds.TestCapability(gdal.GDsCAddRelationship)\n"
   63332             :     "False\n"
   63333             :     "\n"
   63334             :     "\n"
   63335             :     ""},
   63336             :    { "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"},
   63337             :    { "Dataset_ReleaseResultSet", _wrap_Dataset_ReleaseResultSet, METH_VARARGS, "Dataset_ReleaseResultSet(Dataset self, Layer layer)"},
   63338             :    { "Dataset_GetStyleTable", _wrap_Dataset_GetStyleTable, METH_O, "\n"
   63339             :     "Dataset_GetStyleTable(Dataset self) -> StyleTable\n"
   63340             :     "\n"
   63341             :     "\n"
   63342             :     "Returns dataset style table.\n"
   63343             :     "\n"
   63344             :     "Returns\n"
   63345             :     "-------\n"
   63346             :     "ogr.StyleTable\n"
   63347             :     "\n"
   63348             :     "\n"
   63349             :     ""},
   63350             :    { "Dataset_SetStyleTable", _wrap_Dataset_SetStyleTable, METH_VARARGS, "\n"
   63351             :     "Dataset_SetStyleTable(Dataset self, StyleTable table)\n"
   63352             :     "\n"
   63353             :     "\n"
   63354             :     "Set dataset style table\n"
   63355             :     "\n"
   63356             :     "Parameters\n"
   63357             :     "----------\n"
   63358             :     "table : ogr.StyleTable\n"
   63359             :     "\n"
   63360             :     ""},
   63361             :    { "Dataset_GetLayerByIndex", _wrap_Dataset_GetLayerByIndex, METH_VARARGS, "\n"
   63362             :     "Dataset_GetLayerByIndex(Dataset self, int index=0) -> Layer\n"
   63363             :     "\n"
   63364             :     "\n"
   63365             :     "Fetch a layer by index.\n"
   63366             :     "\n"
   63367             :     "Parameters\n"
   63368             :     "----------\n"
   63369             :     "index : int\n"
   63370             :     "    A layer number between 0 and ``GetLayerCount() - 1``\n"
   63371             :     "\n"
   63372             :     "Returns\n"
   63373             :     "-------\n"
   63374             :     "ogr.Layer\n"
   63375             :     "\n"
   63376             :     "\n"
   63377             :     ""},
   63378             :    { "Dataset_GetLayerByName", _wrap_Dataset_GetLayerByName, METH_VARARGS, "Dataset_GetLayerByName(Dataset self, char const * layer_name) -> Layer"},
   63379             :    { "Dataset_ResetReading", _wrap_Dataset_ResetReading, METH_O, "\n"
   63380             :     "Dataset_ResetReading(Dataset self)\n"
   63381             :     "\n"
   63382             :     "\n"
   63383             :     "Reset feature reading to start on the first feature.\n"
   63384             :     "\n"
   63385             :     "This affects :py:meth:`GetNextFeature`.\n"
   63386             :     "\n"
   63387             :     "Depending on drivers, this may also have the side effect of calling\n"
   63388             :     ":py:meth:`OGRLayer.ResetReading` on the layers of this dataset.\n"
   63389             :     "\n"
   63390             :     "\n"
   63391             :     ""},
   63392             :    { "Dataset_GetLayerCount", _wrap_Dataset_GetLayerCount, METH_O, "\n"
   63393             :     "Dataset_GetLayerCount(Dataset self) -> int\n"
   63394             :     "\n"
   63395             :     "\n"
   63396             :     "Get the number of layers in this dataset.\n"
   63397             :     "\n"
   63398             :     "Returns\n"
   63399             :     "-------\n"
   63400             :     "int\n"
   63401             :     "\n"
   63402             :     "\n"
   63403             :     ""},
   63404             :    { "Dataset_AbortSQL", _wrap_Dataset_AbortSQL, METH_O, "\n"
   63405             :     "Dataset_AbortSQL(Dataset self) -> OGRErr\n"
   63406             :     "\n"
   63407             :     "\n"
   63408             :     "Abort any SQL statement running in the data store.\n"
   63409             :     "\n"
   63410             :     "Not implemented by all drivers. See :cpp:func:`GDALDataset::AbortSQL`.\n"
   63411             :     "\n"
   63412             :     "Returns\n"
   63413             :     "-------\n"
   63414             :     ":py:const:`ogr.OGRERR_NONE` on success or :py:const:`ogr.OGRERR_UNSUPPORTED_OPERATION` if AbortSQL is not supported for this dataset.\n"
   63415             :     "\n"
   63416             :     ""},
   63417             :    { "Dataset_StartTransaction", (PyCFunction)(void(*)(void))_wrap_Dataset_StartTransaction, METH_VARARGS|METH_KEYWORDS, "\n"
   63418             :     "Dataset_StartTransaction(Dataset self, int force=FALSE) -> OGRErr\n"
   63419             :     "\n"
   63420             :     "\n"
   63421             :     "Creates a transaction. See :cpp:func:`GDALDataset::StartTransaction`.\n"
   63422             :     "\n"
   63423             :     "Returns\n"
   63424             :     "-------\n"
   63425             :     "int\n"
   63426             :     "    If starting the transaction fails, will return\n"
   63427             :     "    :py:const:`ogr.OGRERR_FAILURE`. Datasources which do not support transactions will\n"
   63428             :     "    always return :py:const:`OGRERR_UNSUPPORTED_OPERATION`.\n"
   63429             :     "\n"
   63430             :     "\n"
   63431             :     ""},
   63432             :    { "Dataset_CommitTransaction", _wrap_Dataset_CommitTransaction, METH_O, "\n"
   63433             :     "Dataset_CommitTransaction(Dataset self) -> OGRErr\n"
   63434             :     "\n"
   63435             :     "Commits a transaction, for `Datasets` that support transactions.\n"
   63436             :     "\n"
   63437             :     "See :cpp:func:`GDALDataset::CommitTransaction`.\n"
   63438             :     "\n"
   63439             :     ""},
   63440             :    { "Dataset_RollbackTransaction", _wrap_Dataset_RollbackTransaction, METH_O, "\n"
   63441             :     "Dataset_RollbackTransaction(Dataset self) -> OGRErr\n"
   63442             :     "\n"
   63443             :     "\n"
   63444             :     "Roll back a Dataset to its state before the start of the current transaction.\n"
   63445             :     "\n"
   63446             :     "For datasets that support transactions.\n"
   63447             :     "\n"
   63448             :     "Returns\n"
   63449             :     "-------\n"
   63450             :     "int\n"
   63451             :     "    If no transaction is active, or the rollback fails, will return\n"
   63452             :     "    :py:const:`OGRERR_FAILURE`. Datasources which do not support transactions will\n"
   63453             :     "    always return :py:const:`OGRERR_UNSUPPORTED_OPERATION`.\n"
   63454             :     "\n"
   63455             :     "\n"
   63456             :     ""},
   63457             :    { "Dataset_ClearStatistics", _wrap_Dataset_ClearStatistics, METH_O, "\n"
   63458             :     "Dataset_ClearStatistics(Dataset self)\n"
   63459             :     "\n"
   63460             :     "\n"
   63461             :     "Clear statistics\n"
   63462             :     "\n"
   63463             :     "See :cpp:func:`GDALDatset::ClearStatistics`.\n"
   63464             :     "\n"
   63465             :     "\n"
   63466             :     ""},
   63467             :    { "Dataset_GetFieldDomainNames", _wrap_Dataset_GetFieldDomainNames, METH_VARARGS, "\n"
   63468             :     "Dataset_GetFieldDomainNames(Dataset self, char ** options=None) -> char **\n"
   63469             :     "\n"
   63470             :     "\n"
   63471             :     "Get a list of the names of all field domains stored in the dataset.\n"
   63472             :     "\n"
   63473             :     "Parameters\n"
   63474             :     "----------\n"
   63475             :     "options: dict/list, optional\n"
   63476             :     "         Driver-specific options determining how attributes should\n"
   63477             :     "         be retrieved.\n"
   63478             :     "\n"
   63479             :     "Returns\n"
   63480             :     "-------\n"
   63481             :     "list, or ``None`` if no field domains are stored in the dataset.\n"
   63482             :     "\n"
   63483             :     ""},
   63484             :    { "Dataset_GetFieldDomain", _wrap_Dataset_GetFieldDomain, METH_VARARGS, "\n"
   63485             :     "Dataset_GetFieldDomain(Dataset self, char const * name) -> FieldDomain\n"
   63486             :     "\n"
   63487             :     "\n"
   63488             :     "Get a field domain from its name.\n"
   63489             :     "\n"
   63490             :     "Parameters\n"
   63491             :     "----------\n"
   63492             :     "name: str\n"
   63493             :     "      The name of the field domain\n"
   63494             :     "\n"
   63495             :     "Returns\n"
   63496             :     "-------\n"
   63497             :     "ogr.FieldDomain, or ``None`` if it is not found.\n"
   63498             :     "\n"
   63499             :     ""},
   63500             :    { "Dataset_AddFieldDomain", _wrap_Dataset_AddFieldDomain, METH_VARARGS, "\n"
   63501             :     "Dataset_AddFieldDomain(Dataset self, FieldDomain fieldDomain) -> bool\n"
   63502             :     "\n"
   63503             :     "\n"
   63504             :     "Add a :py:class:`ogr.FieldDomain` to the dataset.\n"
   63505             :     "\n"
   63506             :     "Only a few drivers support this operation. See :cpp:func:`GDALDataset::AddFieldDomain`.\n"
   63507             :     "\n"
   63508             :     "Parameters\n"
   63509             :     "----------\n"
   63510             :     "fieldDomain : ogr.FieldDomain\n"
   63511             :     "              The field domain to add\n"
   63512             :     "\n"
   63513             :     "Returns\n"
   63514             :     "--------\n"
   63515             :     "bool:\n"
   63516             :     "    ``True`` if the field domain was added, ``False`` in case of error.\n"
   63517             :     "\n"
   63518             :     "\n"
   63519             :     "\n"
   63520             :     ""},
   63521             :    { "Dataset_DeleteFieldDomain", _wrap_Dataset_DeleteFieldDomain, METH_VARARGS, "\n"
   63522             :     "Dataset_DeleteFieldDomain(Dataset self, char const * name) -> bool\n"
   63523             :     "\n"
   63524             :     "\n"
   63525             :     "Removes a field domain from the Dataset.\n"
   63526             :     "\n"
   63527             :     "Parameters\n"
   63528             :     "----------\n"
   63529             :     "name : str\n"
   63530             :     "       Name of the field domain to delete\n"
   63531             :     "\n"
   63532             :     "Returns\n"
   63533             :     "-------\n"
   63534             :     "bool\n"
   63535             :     "     ``True`` if the field domain was removed, otherwise ``False``.\n"
   63536             :     "\n"
   63537             :     "\n"
   63538             :     ""},
   63539             :    { "Dataset_UpdateFieldDomain", _wrap_Dataset_UpdateFieldDomain, METH_VARARGS, "\n"
   63540             :     "Dataset_UpdateFieldDomain(Dataset self, FieldDomain fieldDomain) -> bool\n"
   63541             :     "\n"
   63542             :     "\n"
   63543             :     "Update an existing field domain by replacing its definition.\n"
   63544             :     "\n"
   63545             :     "The existing field domain with matching name will be replaced.\n"
   63546             :     "\n"
   63547             :     "Requires the :py:const:`ogr.ODsCUpdateFieldDomain` datasset capability.\n"
   63548             :     "\n"
   63549             :     "Parameters\n"
   63550             :     "----------\n"
   63551             :     "fieldDomain : ogr.FieldDomain\n"
   63552             :     "    Updated field domain.\n"
   63553             :     "\n"
   63554             :     "Returns\n"
   63555             :     "-------\n"
   63556             :     "bool\n"
   63557             :     "    ``True`` in case of success\n"
   63558             :     "\n"
   63559             :     "\n"
   63560             :     ""},
   63561             :    { "Dataset_GetRelationshipNames", _wrap_Dataset_GetRelationshipNames, METH_VARARGS, "\n"
   63562             :     "Dataset_GetRelationshipNames(Dataset self, char ** options=None) -> char **\n"
   63563             :     "\n"
   63564             :     "\n"
   63565             :     "Get a list of the names of all relationships stored in the dataset.\n"
   63566             :     "\n"
   63567             :     "Parameters\n"
   63568             :     "----------\n"
   63569             :     "options : dict/list, optional\n"
   63570             :     "    driver-specific options determining how the relationships should be retrieved\n"
   63571             :     "\n"
   63572             :     "\n"
   63573             :     ""},
   63574             :    { "Dataset_GetRelationship", _wrap_Dataset_GetRelationship, METH_VARARGS, "\n"
   63575             :     "Dataset_GetRelationship(Dataset self, char const * name) -> Relationship\n"
   63576             :     "\n"
   63577             :     "\n"
   63578             :     "Get a relationship from its name.\n"
   63579             :     "\n"
   63580             :     "Returns\n"
   63581             :     "-------\n"
   63582             :     "Relationship, or ``None`` if not found.\n"
   63583             :     "\n"
   63584             :     ""},
   63585             :    { "Dataset_AddRelationship", _wrap_Dataset_AddRelationship, METH_VARARGS, "\n"
   63586             :     "Dataset_AddRelationship(Dataset self, Relationship relationship) -> bool\n"
   63587             :     "\n"
   63588             :     "\n"
   63589             :     "Add a :py:class:`Relationship` to the dataset.\n"
   63590             :     "\n"
   63591             :     "See :cpp:func:`GDALDataset::AddRelationship`.\n"
   63592             :     "\n"
   63593             :     "Parameters\n"
   63594             :     "----------\n"
   63595             :     "relationship : Relationship\n"
   63596             :     "               The relationship to add\n"
   63597             :     "\n"
   63598             :     "Returns\n"
   63599             :     "-------\n"
   63600             :     "bool:\n"
   63601             :     "    ``True`` if the field domain was added, ``False`` in case of error.\n"
   63602             :     "\n"
   63603             :     "\n"
   63604             :     ""},
   63605             :    { "Dataset_DeleteRelationship", _wrap_Dataset_DeleteRelationship, METH_VARARGS, "\n"
   63606             :     "Dataset_DeleteRelationship(Dataset self, char const * name) -> bool\n"
   63607             :     "\n"
   63608             :     "\n"
   63609             :     "Removes a relationship from the Dataset.\n"
   63610             :     "\n"
   63611             :     "Parameters\n"
   63612             :     "----------\n"
   63613             :     "name : str\n"
   63614             :     "       Name of the relationship to remove.\n"
   63615             :     "\n"
   63616             :     "Returns\n"
   63617             :     "-------\n"
   63618             :     "bool\n"
   63619             :     "     ``True`` if the relationship  was removed, otherwise ``False``.\n"
   63620             :     "\n"
   63621             :     "\n"
   63622             :     "\n"
   63623             :     ""},
   63624             :    { "Dataset_UpdateRelationship", _wrap_Dataset_UpdateRelationship, METH_VARARGS, "\n"
   63625             :     "Dataset_UpdateRelationship(Dataset self, Relationship relationship) -> bool\n"
   63626             :     "\n"
   63627             :     "\n"
   63628             :     "Update an existing relationship by replacing its definition.\n"
   63629             :     "\n"
   63630             :     "The existing relationship with matching name will be replaced.\n"
   63631             :     "\n"
   63632             :     "Requires the :py:const:`gdal.GDsCUpdateFieldDomain` dataset capability.\n"
   63633             :     "\n"
   63634             :     "Parameters\n"
   63635             :     "----------\n"
   63636             :     "relationship : Relationship\n"
   63637             :     "    Updated relationship\n"
   63638             :     "\n"
   63639             :     "Returns\n"
   63640             :     "-------\n"
   63641             :     "bool\n"
   63642             :     "    ``True`` in case of success\n"
   63643             :     "\n"
   63644             :     "\n"
   63645             :     ""},
   63646             :    { "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"},
   63647             :    { "Dataset_swigregister", Dataset_swigregister, METH_O, NULL},
   63648             :    { "new_RasterAttributeTable", _wrap_new_RasterAttributeTable, METH_NOARGS, "new_RasterAttributeTable() -> RasterAttributeTable"},
   63649             :    { "delete_RasterAttributeTable", _wrap_delete_RasterAttributeTable, METH_O, "delete_RasterAttributeTable(RasterAttributeTable self)"},
   63650             :    { "RasterAttributeTable_Clone", _wrap_RasterAttributeTable_Clone, METH_O, "RasterAttributeTable_Clone(RasterAttributeTable self) -> RasterAttributeTable"},
   63651             :    { "RasterAttributeTable_GetColumnCount", _wrap_RasterAttributeTable_GetColumnCount, METH_O, "RasterAttributeTable_GetColumnCount(RasterAttributeTable self) -> int"},
   63652             :    { "RasterAttributeTable_GetNameOfCol", _wrap_RasterAttributeTable_GetNameOfCol, METH_VARARGS, "RasterAttributeTable_GetNameOfCol(RasterAttributeTable self, int iCol) -> char const *"},
   63653             :    { "RasterAttributeTable_GetUsageOfCol", _wrap_RasterAttributeTable_GetUsageOfCol, METH_VARARGS, "RasterAttributeTable_GetUsageOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldUsage"},
   63654             :    { "RasterAttributeTable_GetTypeOfCol", _wrap_RasterAttributeTable_GetTypeOfCol, METH_VARARGS, "RasterAttributeTable_GetTypeOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldType"},
   63655             :    { "RasterAttributeTable_GetColOfUsage", _wrap_RasterAttributeTable_GetColOfUsage, METH_VARARGS, "RasterAttributeTable_GetColOfUsage(RasterAttributeTable self, GDALRATFieldUsage eUsage) -> int"},
   63656             :    { "RasterAttributeTable_GetRowCount", _wrap_RasterAttributeTable_GetRowCount, METH_O, "RasterAttributeTable_GetRowCount(RasterAttributeTable self) -> int"},
   63657             :    { "RasterAttributeTable_GetValueAsString", _wrap_RasterAttributeTable_GetValueAsString, METH_VARARGS, "RasterAttributeTable_GetValueAsString(RasterAttributeTable self, int iRow, int iCol) -> char const *"},
   63658             :    { "RasterAttributeTable_GetValueAsInt", _wrap_RasterAttributeTable_GetValueAsInt, METH_VARARGS, "RasterAttributeTable_GetValueAsInt(RasterAttributeTable self, int iRow, int iCol) -> int"},
   63659             :    { "RasterAttributeTable_GetValueAsDouble", _wrap_RasterAttributeTable_GetValueAsDouble, METH_VARARGS, "RasterAttributeTable_GetValueAsDouble(RasterAttributeTable self, int iRow, int iCol) -> double"},
   63660             :    { "RasterAttributeTable_ReadValuesIOAsString", _wrap_RasterAttributeTable_ReadValuesIOAsString, METH_VARARGS, "RasterAttributeTable_ReadValuesIOAsString(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr"},
   63661             :    { "RasterAttributeTable_ReadValuesIOAsInteger", _wrap_RasterAttributeTable_ReadValuesIOAsInteger, METH_VARARGS, "RasterAttributeTable_ReadValuesIOAsInteger(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr"},
   63662             :    { "RasterAttributeTable_ReadValuesIOAsDouble", _wrap_RasterAttributeTable_ReadValuesIOAsDouble, METH_VARARGS, "RasterAttributeTable_ReadValuesIOAsDouble(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr"},
   63663             :    { "RasterAttributeTable_SetValueAsString", _wrap_RasterAttributeTable_SetValueAsString, METH_VARARGS, "RasterAttributeTable_SetValueAsString(RasterAttributeTable self, int iRow, int iCol, char const * pszValue)"},
   63664             :    { "RasterAttributeTable_SetValueAsInt", _wrap_RasterAttributeTable_SetValueAsInt, METH_VARARGS, "RasterAttributeTable_SetValueAsInt(RasterAttributeTable self, int iRow, int iCol, int nValue)"},
   63665             :    { "RasterAttributeTable_SetValueAsDouble", _wrap_RasterAttributeTable_SetValueAsDouble, METH_VARARGS, "RasterAttributeTable_SetValueAsDouble(RasterAttributeTable self, int iRow, int iCol, double dfValue)"},
   63666             :    { "RasterAttributeTable_SetRowCount", _wrap_RasterAttributeTable_SetRowCount, METH_VARARGS, "RasterAttributeTable_SetRowCount(RasterAttributeTable self, int nCount)"},
   63667             :    { "RasterAttributeTable_CreateColumn", _wrap_RasterAttributeTable_CreateColumn, METH_VARARGS, "RasterAttributeTable_CreateColumn(RasterAttributeTable self, char const * pszName, GDALRATFieldType eType, GDALRATFieldUsage eUsage) -> int"},
   63668             :    { "RasterAttributeTable_GetLinearBinning", _wrap_RasterAttributeTable_GetLinearBinning, METH_O, "RasterAttributeTable_GetLinearBinning(RasterAttributeTable self) -> bool"},
   63669             :    { "RasterAttributeTable_SetLinearBinning", _wrap_RasterAttributeTable_SetLinearBinning, METH_VARARGS, "RasterAttributeTable_SetLinearBinning(RasterAttributeTable self, double dfRow0Min, double dfBinSize) -> int"},
   63670             :    { "RasterAttributeTable_GetRowOfValue", _wrap_RasterAttributeTable_GetRowOfValue, METH_VARARGS, "RasterAttributeTable_GetRowOfValue(RasterAttributeTable self, double dfValue) -> int"},
   63671             :    { "RasterAttributeTable_ChangesAreWrittenToFile", _wrap_RasterAttributeTable_ChangesAreWrittenToFile, METH_O, "RasterAttributeTable_ChangesAreWrittenToFile(RasterAttributeTable self) -> int"},
   63672             :    { "RasterAttributeTable_DumpReadable", _wrap_RasterAttributeTable_DumpReadable, METH_O, "RasterAttributeTable_DumpReadable(RasterAttributeTable self)"},
   63673             :    { "RasterAttributeTable_SetTableType", _wrap_RasterAttributeTable_SetTableType, METH_VARARGS, "RasterAttributeTable_SetTableType(RasterAttributeTable self, GDALRATTableType eTableType)"},
   63674             :    { "RasterAttributeTable_GetTableType", _wrap_RasterAttributeTable_GetTableType, METH_O, "RasterAttributeTable_GetTableType(RasterAttributeTable self) -> GDALRATTableType"},
   63675             :    { "RasterAttributeTable_RemoveStatistics", _wrap_RasterAttributeTable_RemoveStatistics, METH_O, "RasterAttributeTable_RemoveStatistics(RasterAttributeTable self)"},
   63676             :    { "RasterAttributeTable_swigregister", RasterAttributeTable_swigregister, METH_O, NULL},
   63677             :    { "RasterAttributeTable_swiginit", RasterAttributeTable_swiginit, METH_VARARGS, NULL},
   63678             :    { "delete_Group", _wrap_delete_Group, METH_O, "delete_Group(Group self)"},
   63679             :    { "Group_GetName", _wrap_Group_GetName, METH_O, "Group_GetName(Group self) -> char const *"},
   63680             :    { "Group_GetFullName", _wrap_Group_GetFullName, METH_O, "Group_GetFullName(Group self) -> char const *"},
   63681             :    { "Group_GetMDArrayNames", _wrap_Group_GetMDArrayNames, METH_VARARGS, "Group_GetMDArrayNames(Group self, char ** options=None) -> char **"},
   63682             :    { "Group_GetMDArrayFullNamesRecursive", _wrap_Group_GetMDArrayFullNamesRecursive, METH_VARARGS, "Group_GetMDArrayFullNamesRecursive(Group self, char ** groupOptions=None, char ** arrayOptions=None) -> char **"},
   63683             :    { "Group_OpenMDArray", _wrap_Group_OpenMDArray, METH_VARARGS, "Group_OpenMDArray(Group self, char const * name, char ** options=None) -> MDArray"},
   63684             :    { "Group_OpenMDArrayFromFullname", _wrap_Group_OpenMDArrayFromFullname, METH_VARARGS, "Group_OpenMDArrayFromFullname(Group self, char const * name, char ** options=None) -> MDArray"},
   63685             :    { "Group_ResolveMDArray", _wrap_Group_ResolveMDArray, METH_VARARGS, "Group_ResolveMDArray(Group self, char const * name, char const * starting_point, char ** options=None) -> MDArray"},
   63686             :    { "Group_GetGroupNames", _wrap_Group_GetGroupNames, METH_VARARGS, "Group_GetGroupNames(Group self, char ** options=None) -> char **"},
   63687             :    { "Group_OpenGroup", _wrap_Group_OpenGroup, METH_VARARGS, "Group_OpenGroup(Group self, char const * name, char ** options=None) -> Group"},
   63688             :    { "Group_OpenGroupFromFullname", _wrap_Group_OpenGroupFromFullname, METH_VARARGS, "Group_OpenGroupFromFullname(Group self, char const * name, char ** options=None) -> Group"},
   63689             :    { "Group_GetVectorLayerNames", _wrap_Group_GetVectorLayerNames, METH_VARARGS, "Group_GetVectorLayerNames(Group self, char ** options=None) -> char **"},
   63690             :    { "Group_OpenVectorLayer", _wrap_Group_OpenVectorLayer, METH_VARARGS, "Group_OpenVectorLayer(Group self, char const * name, char ** options=None) -> Layer"},
   63691             :    { "Group_GetDimensions", _wrap_Group_GetDimensions, METH_VARARGS, "Group_GetDimensions(Group self, char ** options=None)"},
   63692             :    { "Group_GetAttribute", _wrap_Group_GetAttribute, METH_VARARGS, "Group_GetAttribute(Group self, char const * name) -> Attribute"},
   63693             :    { "Group_GetAttributes", _wrap_Group_GetAttributes, METH_VARARGS, "Group_GetAttributes(Group self, char ** options=None)"},
   63694             :    { "Group_GetStructuralInfo", _wrap_Group_GetStructuralInfo, METH_O, "Group_GetStructuralInfo(Group self) -> char **"},
   63695             :    { "Group_CreateGroup", (PyCFunction)(void(*)(void))_wrap_Group_CreateGroup, METH_VARARGS|METH_KEYWORDS, "Group_CreateGroup(Group self, char const * name, char ** options=None) -> Group"},
   63696             :    { "Group_DeleteGroup", _wrap_Group_DeleteGroup, METH_VARARGS, "Group_DeleteGroup(Group self, char const * name, char ** options=None) -> CPLErr"},
   63697             :    { "Group_CreateDimension", (PyCFunction)(void(*)(void))_wrap_Group_CreateDimension, METH_VARARGS|METH_KEYWORDS, "\n"
   63698             :     "Group_CreateDimension(Group self, char const * name, char const * dim_type, char const * direction, GUIntBig size, char ** options=None) -> Dimension\n"
   63699             :     "\n"
   63700             :     "\n"
   63701             :     "Create a dimension within a :py:class:`Group`.\n"
   63702             :     "\n"
   63703             :     "See :cpp:func:`GDALGroup::CreateDimension`.\n"
   63704             :     "\n"
   63705             :     "Parameters\n"
   63706             :     "----------\n"
   63707             :     "name : str\n"
   63708             :     "    Dimension name\n"
   63709             :     "dim_type : str\n"
   63710             :     "    Dimension type (might be empty, and ignored by drivers)\n"
   63711             :     "direction: str\n"
   63712             :     "    Dimension direction (might be empty, and ignored by drivers)\n"
   63713             :     "size : int\n"
   63714             :     "    Number of values indexed by this dimension. Should be > 0\n"
   63715             :     "options: dict/list\n"
   63716             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   63717             :     "\n"
   63718             :     "Returns\n"
   63719             :     "-------\n"
   63720             :     "\n"
   63721             :     "Dimension:\n"
   63722             :     "    the new :py:class:`Dimension` or ``None`` on failure.\n"
   63723             :     "\n"
   63724             :     "Examples\n"
   63725             :     "--------\n"
   63726             :     "\n"
   63727             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   63728             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   63729             :     ">>> rg = mem_ds.GetRootGroup()\n"
   63730             :     ">>> dim_band = rg.CreateDimension('band', None, None, 3)\n"
   63731             :     ">>> dim_x = rg.CreateDimension('X', None, None, 2)\n"
   63732             :     ">>> dim_x.GetFullName()\n"
   63733             :     "'/X'\n"
   63734             :     ">>> lat = rg.CreateDimension('latitude', gdal.DIM_TYPE_HORIZONTAL_X, None, 2)\n"
   63735             :     ">>> lat.GetType()\n"
   63736             :     "'HORIZONTAL_X'\n"
   63737             :     "\n"
   63738             :     ""},
   63739             :    { "Group_CreateMDArray", _wrap_Group_CreateMDArray, METH_VARARGS, "\n"
   63740             :     "Group_CreateMDArray(Group self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> MDArray\n"
   63741             :     "\n"
   63742             :     "\n"
   63743             :     "Create a multidimensional array within a group.\n"
   63744             :     "\n"
   63745             :     "It is recommended that the GDALDimension objects passed in ``dimensions``\n"
   63746             :     "belong to this group, either by retrieving them with :py:meth:`GetDimensions`\n"
   63747             :     "or creating a new one with :py:meth:`CreateDimension`.\n"
   63748             :     "\n"
   63749             :     "See :cpp:func:`GDALGroup::CreateMDArray`.\n"
   63750             :     "\n"
   63751             :     "Parameters\n"
   63752             :     "----------\n"
   63753             :     "name : str\n"
   63754             :     "    name\n"
   63755             :     "dimensions : list\n"
   63756             :     "    List of dimensions, ordered from the slowest varying\n"
   63757             :     "    dimension first to the fastest varying dimension last.\n"
   63758             :     "    Might be empty for a scalar array (if supported by driver)\n"
   63759             :     "data_type: :py:class:`ExtendedDataType`\n"
   63760             :     "    Array data type\n"
   63761             :     "options: dict/list\n"
   63762             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   63763             :     "\n"
   63764             :     "Returns\n"
   63765             :     "-------\n"
   63766             :     "\n"
   63767             :     "MDArray:\n"
   63768             :     "    the new :py:class:`MDArray` or ``None`` on failure.\n"
   63769             :     "\n"
   63770             :     "Examples\n"
   63771             :     "--------\n"
   63772             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   63773             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   63774             :     ">>> rg = mem_ds.GetRootGroup()\n"
   63775             :     ">>> dimX = rg.CreateDimension('X', None, None, 3)\n"
   63776             :     ">>> ar = rg.CreateMDArray('ar', [dimX], gdal.ExtendedDataType.Create(gdal.GDT_Byte))\n"
   63777             :     "\n"
   63778             :     "\n"
   63779             :     ""},
   63780             :    { "Group_DeleteMDArray", _wrap_Group_DeleteMDArray, METH_VARARGS, "Group_DeleteMDArray(Group self, char const * name, char ** options=None) -> CPLErr"},
   63781             :    { "Group_CreateAttribute", _wrap_Group_CreateAttribute, METH_VARARGS, "\n"
   63782             :     "Group_CreateAttribute(Group self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> Attribute\n"
   63783             :     "\n"
   63784             :     "\n"
   63785             :     "Create an attribute within a :py:class:`MDArray` or :py:class:`Group`.\n"
   63786             :     "\n"
   63787             :     "See :cpp:func:`GDALIHasAttribute::CreateAttribute`.\n"
   63788             :     "\n"
   63789             :     "Parameters\n"
   63790             :     "----------\n"
   63791             :     "name : str\n"
   63792             :     "    name\n"
   63793             :     "dimensions : list\n"
   63794             :     "    List of dimensions, ordered from the slowest varying\n"
   63795             :     "    dimension first to the fastest varying dimension last.\n"
   63796             :     "    Might be empty for a scalar array (if supported by driver)\n"
   63797             :     "data_type: :py:class:`ExtendedDataType`\n"
   63798             :     "    Attribute data type\n"
   63799             :     "options: dict/list\n"
   63800             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   63801             :     "\n"
   63802             :     "Returns\n"
   63803             :     "-------\n"
   63804             :     "\n"
   63805             :     "Attribute:\n"
   63806             :     "    the new :py:class:`Attribute` or ``None`` on failure.\n"
   63807             :     "\n"
   63808             :     "Examples\n"
   63809             :     "--------\n"
   63810             :     "\n"
   63811             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   63812             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   63813             :     ">>> rg = mem_ds.GetRootGroup()\n"
   63814             :     ">>> dim = rg.CreateDimension('dim', None, None, 2)\n"
   63815             :     ">>> ar = rg.CreateMDArray('ar_double', [dim], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   63816             :     ">>> numeric_attr = ar.CreateAttribute('numeric_attr', [], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   63817             :     ">>> string_attr = ar.CreateAttribute('string_attr', [], gdal.ExtendedDataType.CreateString())\n"
   63818             :     "\n"
   63819             :     "\n"
   63820             :     ""},
   63821             :    { "Group_DeleteAttribute", _wrap_Group_DeleteAttribute, METH_VARARGS, "Group_DeleteAttribute(Group self, char const * name, char ** options=None) -> CPLErr"},
   63822             :    { "Group_Rename", _wrap_Group_Rename, METH_VARARGS, "Group_Rename(Group self, char const * newName) -> CPLErr"},
   63823             :    { "Group_SubsetDimensionFromSelection", _wrap_Group_SubsetDimensionFromSelection, METH_VARARGS, "Group_SubsetDimensionFromSelection(Group self, char const * selection, char ** options=None) -> Group"},
   63824             :    { "Group_GetDataTypeCount", _wrap_Group_GetDataTypeCount, METH_O, "Group_GetDataTypeCount(Group self) -> size_t"},
   63825             :    { "Group_GetDataType", _wrap_Group_GetDataType, METH_VARARGS, "Group_GetDataType(Group self, size_t idx) -> ExtendedDataType"},
   63826             :    { "Group_swigregister", Group_swigregister, METH_O, NULL},
   63827             :    { "Statistics_min_get", _wrap_Statistics_min_get, METH_O, "Statistics_min_get(Statistics self) -> double"},
   63828             :    { "Statistics_max_get", _wrap_Statistics_max_get, METH_O, "Statistics_max_get(Statistics self) -> double"},
   63829             :    { "Statistics_mean_get", _wrap_Statistics_mean_get, METH_O, "Statistics_mean_get(Statistics self) -> double"},
   63830             :    { "Statistics_std_dev_get", _wrap_Statistics_std_dev_get, METH_O, "Statistics_std_dev_get(Statistics self) -> double"},
   63831             :    { "Statistics_valid_count_get", _wrap_Statistics_valid_count_get, METH_O, "Statistics_valid_count_get(Statistics self) -> GIntBig"},
   63832             :    { "delete_Statistics", _wrap_delete_Statistics, METH_O, "delete_Statistics(Statistics self)"},
   63833             :    { "new_Statistics", _wrap_new_Statistics, METH_NOARGS, "new_Statistics() -> Statistics"},
   63834             :    { "Statistics_swigregister", Statistics_swigregister, METH_O, NULL},
   63835             :    { "Statistics_swiginit", Statistics_swiginit, METH_VARARGS, NULL},
   63836             :    { "delete_MDArray", _wrap_delete_MDArray, METH_O, "delete_MDArray(MDArray self)"},
   63837             :    { "MDArray_GetName", _wrap_MDArray_GetName, METH_O, "MDArray_GetName(MDArray self) -> char const *"},
   63838             :    { "MDArray_GetFullName", _wrap_MDArray_GetFullName, METH_O, "MDArray_GetFullName(MDArray self) -> char const *"},
   63839             :    { "MDArray_GetTotalElementsCount", _wrap_MDArray_GetTotalElementsCount, METH_O, "MDArray_GetTotalElementsCount(MDArray self) -> GUIntBig"},
   63840             :    { "MDArray_GetDimensionCount", _wrap_MDArray_GetDimensionCount, METH_O, "MDArray_GetDimensionCount(MDArray self) -> size_t"},
   63841             :    { "MDArray_GetDimensions", _wrap_MDArray_GetDimensions, METH_O, "MDArray_GetDimensions(MDArray self)"},
   63842             :    { "MDArray_GetCoordinateVariables", _wrap_MDArray_GetCoordinateVariables, METH_O, "MDArray_GetCoordinateVariables(MDArray self)"},
   63843             :    { "MDArray_GetBlockSize", _wrap_MDArray_GetBlockSize, METH_O, "MDArray_GetBlockSize(MDArray self)"},
   63844             :    { "MDArray_GetProcessingChunkSize", _wrap_MDArray_GetProcessingChunkSize, METH_VARARGS, "MDArray_GetProcessingChunkSize(MDArray self, size_t nMaxChunkMemory)"},
   63845             :    { "MDArray_GetDataType", _wrap_MDArray_GetDataType, METH_O, "MDArray_GetDataType(MDArray self) -> ExtendedDataType"},
   63846             :    { "MDArray_GetStructuralInfo", _wrap_MDArray_GetStructuralInfo, METH_O, "MDArray_GetStructuralInfo(MDArray self) -> char **"},
   63847             :    { "MDArray_Resize", _wrap_MDArray_Resize, METH_VARARGS, "MDArray_Resize(MDArray self, int newDimensions, char ** options=None) -> CPLErr"},
   63848             :    { "MDArray_Read", _wrap_MDArray_Read, METH_VARARGS, "MDArray_Read(MDArray self, int nDims1, int nDims2, int nDims3, int nDims4, ExtendedDataType buffer_datatype) -> CPLErr"},
   63849             :    { "MDArray_WriteStringArray", _wrap_MDArray_WriteStringArray, METH_VARARGS, "MDArray_WriteStringArray(MDArray self, int nDims1, int nDims2, int nDims3, ExtendedDataType buffer_datatype, char ** options) -> CPLErr"},
   63850             :    { "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"},
   63851             :    { "MDArray_AdviseRead", _wrap_MDArray_AdviseRead, METH_VARARGS, "MDArray_AdviseRead(MDArray self, int nDims1, int nDims2, char ** options=None) -> CPLErr"},
   63852             :    { "MDArray_GetAttribute", _wrap_MDArray_GetAttribute, METH_VARARGS, "MDArray_GetAttribute(MDArray self, char const * name) -> Attribute"},
   63853             :    { "MDArray_GetAttributes", _wrap_MDArray_GetAttributes, METH_VARARGS, "MDArray_GetAttributes(MDArray self, char ** options=None)"},
   63854             :    { "MDArray_CreateAttribute", _wrap_MDArray_CreateAttribute, METH_VARARGS, "\n"
   63855             :     "MDArray_CreateAttribute(MDArray self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> Attribute\n"
   63856             :     "\n"
   63857             :     "\n"
   63858             :     "Create an attribute within a :py:class:`MDArray` or :py:class:`Group`.\n"
   63859             :     "\n"
   63860             :     "See :cpp:func:`GDALIHasAttribute::CreateAttribute`.\n"
   63861             :     "\n"
   63862             :     "Parameters\n"
   63863             :     "----------\n"
   63864             :     "name : str\n"
   63865             :     "    name\n"
   63866             :     "dimensions : list\n"
   63867             :     "    List of dimensions, ordered from the slowest varying\n"
   63868             :     "    dimension first to the fastest varying dimension last.\n"
   63869             :     "    Might be empty for a scalar array (if supported by driver)\n"
   63870             :     "data_type: :py:class:`ExtendedDataType`\n"
   63871             :     "    Attribute data type\n"
   63872             :     "options: dict/list\n"
   63873             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   63874             :     "\n"
   63875             :     "Returns\n"
   63876             :     "-------\n"
   63877             :     "\n"
   63878             :     "Attribute:\n"
   63879             :     "    the new :py:class:`Attribute` or ``None`` on failure.\n"
   63880             :     "\n"
   63881             :     "Examples\n"
   63882             :     "--------\n"
   63883             :     "\n"
   63884             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   63885             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   63886             :     ">>> rg = mem_ds.GetRootGroup()\n"
   63887             :     ">>> dim = rg.CreateDimension('dim', None, None, 2)\n"
   63888             :     ">>> ar = rg.CreateMDArray('ar_double', [dim], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   63889             :     ">>> numeric_attr = ar.CreateAttribute('numeric_attr', [], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   63890             :     ">>> string_attr = ar.CreateAttribute('string_attr', [], gdal.ExtendedDataType.CreateString())\n"
   63891             :     "\n"
   63892             :     "\n"
   63893             :     ""},
   63894             :    { "MDArray_DeleteAttribute", _wrap_MDArray_DeleteAttribute, METH_VARARGS, "MDArray_DeleteAttribute(MDArray self, char const * name, char ** options=None) -> CPLErr"},
   63895             :    { "MDArray_GetNoDataValueAsRaw", _wrap_MDArray_GetNoDataValueAsRaw, METH_O, "MDArray_GetNoDataValueAsRaw(MDArray self) -> CPLErr"},
   63896             :    { "MDArray_GetNoDataValueAsDouble", _wrap_MDArray_GetNoDataValueAsDouble, METH_O, "MDArray_GetNoDataValueAsDouble(MDArray self)"},
   63897             :    { "MDArray_GetNoDataValueAsInt64", _wrap_MDArray_GetNoDataValueAsInt64, METH_O, "MDArray_GetNoDataValueAsInt64(MDArray self)"},
   63898             :    { "MDArray_GetNoDataValueAsUInt64", _wrap_MDArray_GetNoDataValueAsUInt64, METH_O, "MDArray_GetNoDataValueAsUInt64(MDArray self)"},
   63899             :    { "MDArray_GetNoDataValueAsString", _wrap_MDArray_GetNoDataValueAsString, METH_O, "MDArray_GetNoDataValueAsString(MDArray self) -> retStringAndCPLFree *"},
   63900             :    { "MDArray_SetNoDataValueDouble", _wrap_MDArray_SetNoDataValueDouble, METH_VARARGS, "MDArray_SetNoDataValueDouble(MDArray self, double d) -> CPLErr"},
   63901             :    { "MDArray_SetNoDataValueInt64", _wrap_MDArray_SetNoDataValueInt64, METH_VARARGS, "MDArray_SetNoDataValueInt64(MDArray self, GIntBig v) -> CPLErr"},
   63902             :    { "MDArray_SetNoDataValueUInt64", _wrap_MDArray_SetNoDataValueUInt64, METH_VARARGS, "MDArray_SetNoDataValueUInt64(MDArray self, GUIntBig v) -> CPLErr"},
   63903             :    { "MDArray_SetNoDataValueString", _wrap_MDArray_SetNoDataValueString, METH_VARARGS, "MDArray_SetNoDataValueString(MDArray self, char const * nodata) -> CPLErr"},
   63904             :    { "MDArray_SetNoDataValueRaw", _wrap_MDArray_SetNoDataValueRaw, METH_VARARGS, "MDArray_SetNoDataValueRaw(MDArray self, GIntBig nLen) -> CPLErr"},
   63905             :    { "MDArray_DeleteNoDataValue", _wrap_MDArray_DeleteNoDataValue, METH_O, "MDArray_DeleteNoDataValue(MDArray self) -> CPLErr"},
   63906             :    { "MDArray_GetOffset", _wrap_MDArray_GetOffset, METH_O, "MDArray_GetOffset(MDArray self)"},
   63907             :    { "MDArray_GetOffsetStorageType", _wrap_MDArray_GetOffsetStorageType, METH_O, "MDArray_GetOffsetStorageType(MDArray self) -> GDALDataType"},
   63908             :    { "MDArray_GetScale", _wrap_MDArray_GetScale, METH_O, "MDArray_GetScale(MDArray self)"},
   63909             :    { "MDArray_GetScaleStorageType", _wrap_MDArray_GetScaleStorageType, METH_O, "MDArray_GetScaleStorageType(MDArray self) -> GDALDataType"},
   63910             :    { "MDArray_SetOffset", (PyCFunction)(void(*)(void))_wrap_MDArray_SetOffset, METH_VARARGS|METH_KEYWORDS, "MDArray_SetOffset(MDArray self, double val, GDALDataType storageType=GDT_Unknown) -> CPLErr"},
   63911             :    { "MDArray_SetScale", (PyCFunction)(void(*)(void))_wrap_MDArray_SetScale, METH_VARARGS|METH_KEYWORDS, "MDArray_SetScale(MDArray self, double val, GDALDataType storageType=GDT_Unknown) -> CPLErr"},
   63912             :    { "MDArray_SetUnit", _wrap_MDArray_SetUnit, METH_VARARGS, "MDArray_SetUnit(MDArray self, char const * unit) -> CPLErr"},
   63913             :    { "MDArray_GetUnit", _wrap_MDArray_GetUnit, METH_O, "MDArray_GetUnit(MDArray self) -> char const *"},
   63914             :    { "MDArray_SetSpatialRef", _wrap_MDArray_SetSpatialRef, METH_VARARGS, "MDArray_SetSpatialRef(MDArray self, SpatialReference srs) -> OGRErr"},
   63915             :    { "MDArray_GetSpatialRef", _wrap_MDArray_GetSpatialRef, METH_O, "MDArray_GetSpatialRef(MDArray self) -> SpatialReference"},
   63916             :    { "MDArray_GetView", _wrap_MDArray_GetView, METH_VARARGS, "MDArray_GetView(MDArray self, char const * viewExpr) -> MDArray"},
   63917             :    { "MDArray_Transpose", _wrap_MDArray_Transpose, METH_VARARGS, "MDArray_Transpose(MDArray self, int axisMap) -> MDArray"},
   63918             :    { "MDArray_GetUnscaled", _wrap_MDArray_GetUnscaled, METH_O, "MDArray_GetUnscaled(MDArray self) -> MDArray"},
   63919             :    { "MDArray_GetMask", _wrap_MDArray_GetMask, METH_VARARGS, "MDArray_GetMask(MDArray self, char ** options=None) -> MDArray"},
   63920             :    { "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"},
   63921             :    { "MDArray_AsClassicDataset", _wrap_MDArray_AsClassicDataset, METH_VARARGS, "MDArray_AsClassicDataset(MDArray self, size_t iXDim, size_t iYDim, Group hRootGroup=None, char ** options=None) -> Dataset"},
   63922             :    { "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"},
   63923             :    { "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"},
   63924             :    { "MDArray_GetResampled", _wrap_MDArray_GetResampled, METH_VARARGS, "MDArray_GetResampled(MDArray self, int nDimensions, GDALRIOResampleAlg resample_alg, OSRSpatialReferenceShadow ** srs, char ** options=None) -> MDArray"},
   63925             :    { "MDArray_GetMeshGrid", _wrap_MDArray_GetMeshGrid, METH_VARARGS, "MDArray_GetMeshGrid(int nInputArrays, char ** options=None)"},
   63926             :    { "MDArray_Cache", _wrap_MDArray_Cache, METH_VARARGS, "MDArray_Cache(MDArray self, char ** options=None) -> bool"},
   63927             :    { "MDArray_Rename", _wrap_MDArray_Rename, METH_VARARGS, "MDArray_Rename(MDArray self, char const * newName) -> CPLErr"},
   63928             :    { "MDArray_swigregister", MDArray_swigregister, METH_O, NULL},
   63929             :    { "delete_Attribute", _wrap_delete_Attribute, METH_O, "delete_Attribute(Attribute self)"},
   63930             :    { "Attribute_GetName", _wrap_Attribute_GetName, METH_O, "Attribute_GetName(Attribute self) -> char const *"},
   63931             :    { "Attribute_GetFullName", _wrap_Attribute_GetFullName, METH_O, "Attribute_GetFullName(Attribute self) -> char const *"},
   63932             :    { "Attribute_GetTotalElementsCount", _wrap_Attribute_GetTotalElementsCount, METH_O, "Attribute_GetTotalElementsCount(Attribute self) -> GUIntBig"},
   63933             :    { "Attribute_GetDimensionCount", _wrap_Attribute_GetDimensionCount, METH_O, "Attribute_GetDimensionCount(Attribute self) -> size_t"},
   63934             :    { "Attribute_GetDimensionsSize", _wrap_Attribute_GetDimensionsSize, METH_O, "Attribute_GetDimensionsSize(Attribute self)"},
   63935             :    { "Attribute_GetDataType", _wrap_Attribute_GetDataType, METH_O, "Attribute_GetDataType(Attribute self) -> ExtendedDataType"},
   63936             :    { "Attribute_ReadAsRaw", _wrap_Attribute_ReadAsRaw, METH_O, "Attribute_ReadAsRaw(Attribute self) -> CPLErr"},
   63937             :    { "Attribute_ReadAsString", _wrap_Attribute_ReadAsString, METH_O, "Attribute_ReadAsString(Attribute self) -> char const *"},
   63938             :    { "Attribute_ReadAsInt", _wrap_Attribute_ReadAsInt, METH_O, "Attribute_ReadAsInt(Attribute self) -> int"},
   63939             :    { "Attribute_ReadAsInt64", _wrap_Attribute_ReadAsInt64, METH_O, "Attribute_ReadAsInt64(Attribute self) -> long long"},
   63940             :    { "Attribute_ReadAsDouble", _wrap_Attribute_ReadAsDouble, METH_O, "Attribute_ReadAsDouble(Attribute self) -> double"},
   63941             :    { "Attribute_ReadAsStringArray", _wrap_Attribute_ReadAsStringArray, METH_O, "Attribute_ReadAsStringArray(Attribute self) -> char **"},
   63942             :    { "Attribute_ReadAsIntArray", _wrap_Attribute_ReadAsIntArray, METH_O, "Attribute_ReadAsIntArray(Attribute self)"},
   63943             :    { "Attribute_ReadAsInt64Array", _wrap_Attribute_ReadAsInt64Array, METH_O, "Attribute_ReadAsInt64Array(Attribute self)"},
   63944             :    { "Attribute_ReadAsDoubleArray", _wrap_Attribute_ReadAsDoubleArray, METH_O, "Attribute_ReadAsDoubleArray(Attribute self)"},
   63945             :    { "Attribute_WriteRaw", _wrap_Attribute_WriteRaw, METH_VARARGS, "Attribute_WriteRaw(Attribute self, GIntBig nLen) -> CPLErr"},
   63946             :    { "Attribute_WriteString", _wrap_Attribute_WriteString, METH_VARARGS, "Attribute_WriteString(Attribute self, char const * val) -> CPLErr"},
   63947             :    { "Attribute_WriteStringArray", _wrap_Attribute_WriteStringArray, METH_VARARGS, "Attribute_WriteStringArray(Attribute self, char ** vals) -> CPLErr"},
   63948             :    { "Attribute_WriteInt", _wrap_Attribute_WriteInt, METH_VARARGS, "Attribute_WriteInt(Attribute self, int val) -> CPLErr"},
   63949             :    { "Attribute_WriteInt64", _wrap_Attribute_WriteInt64, METH_VARARGS, "Attribute_WriteInt64(Attribute self, long long val) -> CPLErr"},
   63950             :    { "Attribute_WriteDouble", _wrap_Attribute_WriteDouble, METH_VARARGS, "Attribute_WriteDouble(Attribute self, double val) -> CPLErr"},
   63951             :    { "Attribute_WriteIntArray", _wrap_Attribute_WriteIntArray, METH_VARARGS, "Attribute_WriteIntArray(Attribute self, int nList) -> CPLErr"},
   63952             :    { "Attribute_WriteInt64Array", _wrap_Attribute_WriteInt64Array, METH_VARARGS, "Attribute_WriteInt64Array(Attribute self, int nList) -> CPLErr"},
   63953             :    { "Attribute_WriteDoubleArray", _wrap_Attribute_WriteDoubleArray, METH_VARARGS, "Attribute_WriteDoubleArray(Attribute self, int nList) -> CPLErr"},
   63954             :    { "Attribute_Rename", _wrap_Attribute_Rename, METH_VARARGS, "Attribute_Rename(Attribute self, char const * newName) -> CPLErr"},
   63955             :    { "Attribute_swigregister", Attribute_swigregister, METH_O, NULL},
   63956             :    { "delete_Dimension", _wrap_delete_Dimension, METH_O, "delete_Dimension(Dimension self)"},
   63957             :    { "Dimension_GetName", _wrap_Dimension_GetName, METH_O, "Dimension_GetName(Dimension self) -> char const *"},
   63958             :    { "Dimension_GetFullName", _wrap_Dimension_GetFullName, METH_O, "Dimension_GetFullName(Dimension self) -> char const *"},
   63959             :    { "Dimension_GetType", _wrap_Dimension_GetType, METH_O, "Dimension_GetType(Dimension self) -> char const *"},
   63960             :    { "Dimension_GetDirection", _wrap_Dimension_GetDirection, METH_O, "Dimension_GetDirection(Dimension self) -> char const *"},
   63961             :    { "Dimension_GetSize", _wrap_Dimension_GetSize, METH_O, "Dimension_GetSize(Dimension self) -> GUIntBig"},
   63962             :    { "Dimension_GetIndexingVariable", _wrap_Dimension_GetIndexingVariable, METH_O, "Dimension_GetIndexingVariable(Dimension self) -> MDArray"},
   63963             :    { "Dimension_SetIndexingVariable", _wrap_Dimension_SetIndexingVariable, METH_VARARGS, "Dimension_SetIndexingVariable(Dimension self, MDArray array) -> bool"},
   63964             :    { "Dimension_Rename", _wrap_Dimension_Rename, METH_VARARGS, "Dimension_Rename(Dimension self, char const * newName) -> CPLErr"},
   63965             :    { "Dimension_swigregister", Dimension_swigregister, METH_O, NULL},
   63966             :    { "delete_ExtendedDataType", _wrap_delete_ExtendedDataType, METH_O, "delete_ExtendedDataType(ExtendedDataType self)"},
   63967             :    { "ExtendedDataType_Create", _wrap_ExtendedDataType_Create, METH_O, "ExtendedDataType_Create(GDALDataType dt) -> ExtendedDataType"},
   63968             :    { "ExtendedDataType_CreateString", _wrap_ExtendedDataType_CreateString, METH_VARARGS, "ExtendedDataType_CreateString(size_t nMaxStringLength=0, GDALExtendedDataTypeSubType eSubType=GEDTST_NONE) -> ExtendedDataType"},
   63969             :    { "ExtendedDataType_CreateCompound", _wrap_ExtendedDataType_CreateCompound, METH_VARARGS, "ExtendedDataType_CreateCompound(char const * name, size_t nTotalSize, int nComps) -> ExtendedDataType"},
   63970             :    { "ExtendedDataType_GetName", _wrap_ExtendedDataType_GetName, METH_O, "ExtendedDataType_GetName(ExtendedDataType self) -> char const *"},
   63971             :    { "ExtendedDataType_GetClass", _wrap_ExtendedDataType_GetClass, METH_O, "ExtendedDataType_GetClass(ExtendedDataType self) -> GDALExtendedDataTypeClass"},
   63972             :    { "ExtendedDataType_GetNumericDataType", _wrap_ExtendedDataType_GetNumericDataType, METH_O, "ExtendedDataType_GetNumericDataType(ExtendedDataType self) -> GDALDataType"},
   63973             :    { "ExtendedDataType_GetSize", _wrap_ExtendedDataType_GetSize, METH_O, "ExtendedDataType_GetSize(ExtendedDataType self) -> size_t"},
   63974             :    { "ExtendedDataType_GetMaxStringLength", _wrap_ExtendedDataType_GetMaxStringLength, METH_O, "ExtendedDataType_GetMaxStringLength(ExtendedDataType self) -> size_t"},
   63975             :    { "ExtendedDataType_GetSubType", _wrap_ExtendedDataType_GetSubType, METH_O, "ExtendedDataType_GetSubType(ExtendedDataType self) -> GDALExtendedDataTypeSubType"},
   63976             :    { "ExtendedDataType_GetRAT", _wrap_ExtendedDataType_GetRAT, METH_O, "ExtendedDataType_GetRAT(ExtendedDataType self) -> RasterAttributeTable"},
   63977             :    { "ExtendedDataType_GetComponents", _wrap_ExtendedDataType_GetComponents, METH_O, "ExtendedDataType_GetComponents(ExtendedDataType self)"},
   63978             :    { "ExtendedDataType_CanConvertTo", _wrap_ExtendedDataType_CanConvertTo, METH_VARARGS, "ExtendedDataType_CanConvertTo(ExtendedDataType self, ExtendedDataType other) -> bool"},
   63979             :    { "ExtendedDataType_Equals", _wrap_ExtendedDataType_Equals, METH_VARARGS, "ExtendedDataType_Equals(ExtendedDataType self, ExtendedDataType other) -> bool"},
   63980             :    { "ExtendedDataType_swigregister", ExtendedDataType_swigregister, METH_O, NULL},
   63981             :    { "delete_EDTComponent", _wrap_delete_EDTComponent, METH_O, "delete_EDTComponent(EDTComponent self)"},
   63982             :    { "EDTComponent_Create", _wrap_EDTComponent_Create, METH_VARARGS, "EDTComponent_Create(char const * name, size_t offset, ExtendedDataType type) -> EDTComponent"},
   63983             :    { "EDTComponent_GetName", _wrap_EDTComponent_GetName, METH_O, "EDTComponent_GetName(EDTComponent self) -> char const *"},
   63984             :    { "EDTComponent_GetOffset", _wrap_EDTComponent_GetOffset, METH_O, "EDTComponent_GetOffset(EDTComponent self) -> size_t"},
   63985             :    { "EDTComponent_GetType", _wrap_EDTComponent_GetType, METH_O, "EDTComponent_GetType(EDTComponent self) -> ExtendedDataType"},
   63986             :    { "EDTComponent_swigregister", EDTComponent_swigregister, METH_O, NULL},
   63987             :    { "CreateRasterAttributeTableFromMDArrays", _wrap_CreateRasterAttributeTableFromMDArrays, METH_VARARGS, "CreateRasterAttributeTableFromMDArrays(GDALRATTableType eTableType, int nArrays, int nUsages=0) -> RasterAttributeTable"},
   63988             :    { "Band_XSize_get", _wrap_Band_XSize_get, METH_O, "Band_XSize_get(Band self) -> int"},
   63989             :    { "Band_YSize_get", _wrap_Band_YSize_get, METH_O, "Band_YSize_get(Band self) -> int"},
   63990             :    { "Band_DataType_get", _wrap_Band_DataType_get, METH_O, "Band_DataType_get(Band self) -> GDALDataType"},
   63991             :    { "Band_GetDataset", _wrap_Band_GetDataset, METH_O, "\n"
   63992             :     "Band_GetDataset(Band self) -> Dataset\n"
   63993             :     "\n"
   63994             :     "\n"
   63995             :     "Fetch the :py:class:`Dataset` associated with this Band.\n"
   63996             :     "See :cpp:func:`GDALRasterBand::GetDataset`.\n"
   63997             :     "\n"
   63998             :     ""},
   63999             :    { "Band_GetBand", _wrap_Band_GetBand, METH_O, "\n"
   64000             :     "Band_GetBand(Band self) -> int\n"
   64001             :     "\n"
   64002             :     "\n"
   64003             :     "Return the index of this band.\n"
   64004             :     "See :cpp:func:`GDALRasterBand::GetBand`.\n"
   64005             :     "\n"
   64006             :     "Returns\n"
   64007             :     "-------\n"
   64008             :     "int\n"
   64009             :     "    the (1-based) index of this band\n"
   64010             :     "\n"
   64011             :     ""},
   64012             :    { "Band_GetBlockSize", _wrap_Band_GetBlockSize, METH_O, "\n"
   64013             :     "Band_GetBlockSize(Band self)\n"
   64014             :     "\n"
   64015             :     "\n"
   64016             :     "Fetch the natural block size of this band.\n"
   64017             :     "See :cpp:func:`GDALRasterBand::GetBlockSize`.\n"
   64018             :     "\n"
   64019             :     "Returns\n"
   64020             :     "-------\n"
   64021             :     "list\n"
   64022             :     "    list with the x and y dimensions of a block\n"
   64023             :     "\n"
   64024             :     ""},
   64025             :    { "Band_GetActualBlockSize", _wrap_Band_GetActualBlockSize, METH_VARARGS, "\n"
   64026             :     "Band_GetActualBlockSize(Band self, int nXBlockOff, int nYBlockOff)\n"
   64027             :     "\n"
   64028             :     "\n"
   64029             :     "Fetch the actual block size for a given block offset.\n"
   64030             :     "See :cpp:func:`GDALRasterBand::GetActualBlockSize`.\n"
   64031             :     "\n"
   64032             :     "Parameters\n"
   64033             :     "----------\n"
   64034             :     "nXBlockOff : int\n"
   64035             :     "    the horizontal block offset for which to calculate the\n"
   64036             :     "    number of valid pixels, with zero indicating the left most block, 1 the next\n"
   64037             :     "    block and so forth.\n"
   64038             :     "nYBlockOff : int\n"
   64039             :     "    the vertical block offset, with zero indicating\n"
   64040             :     "    the top most block, 1 the next block and so forth.\n"
   64041             :     "\n"
   64042             :     "Returns\n"
   64043             :     "-------\n"
   64044             :     "tuple\n"
   64045             :     "    tuple with the x and y dimensions of the block\n"
   64046             :     "\n"
   64047             :     ""},
   64048             :    { "Band_GetColorInterpretation", _wrap_Band_GetColorInterpretation, METH_O, "\n"
   64049             :     "Band_GetColorInterpretation(Band self) -> GDALColorInterp\n"
   64050             :     "\n"
   64051             :     "\n"
   64052             :     "Get the :cpp:enum:`GDALColorInterp` value for this band.\n"
   64053             :     "See :cpp:func:`GDALRasterBand::GetColorInterpretation`.\n"
   64054             :     "\n"
   64055             :     "Returns\n"
   64056             :     "-------\n"
   64057             :     "int\n"
   64058             :     "\n"
   64059             :     ""},
   64060             :    { "Band_GetRasterColorInterpretation", _wrap_Band_GetRasterColorInterpretation, METH_O, "\n"
   64061             :     "Band_GetRasterColorInterpretation(Band self) -> GDALColorInterp\n"
   64062             :     "\n"
   64063             :     "\n"
   64064             :     "Return the color interpretation code for this band.\n"
   64065             :     "See :cpp:func:`GDALRasterBand::GetColorInterpretation`.\n"
   64066             :     "\n"
   64067             :     "Returns\n"
   64068             :     "-------\n"
   64069             :     "int\n"
   64070             :     "    The color interpretation code (default :py:const:`gdal.GCI_Undefined`)\n"
   64071             :     "\n"
   64072             :     "\n"
   64073             :     ""},
   64074             :    { "Band_SetColorInterpretation", _wrap_Band_SetColorInterpretation, METH_VARARGS, "\n"
   64075             :     "Band_SetColorInterpretation(Band self, GDALColorInterp val) -> CPLErr\n"
   64076             :     "\n"
   64077             :     "\n"
   64078             :     "Set color interpretation of the band\n"
   64079             :     "See :cpp:func:`GDALRasterBand::SetColorInterpretation`.\n"
   64080             :     "\n"
   64081             :     "Parameters\n"
   64082             :     "----------\n"
   64083             :     "val : int\n"
   64084             :     "    A color interpretation code such as :py:const:`gdal.GCI_RedBand`\n"
   64085             :     "\n"
   64086             :     "Returns\n"
   64087             :     "-------\n"
   64088             :     "int:\n"
   64089             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64090             :     "\n"
   64091             :     ""},
   64092             :    { "Band_SetRasterColorInterpretation", _wrap_Band_SetRasterColorInterpretation, METH_VARARGS, "\n"
   64093             :     "Band_SetRasterColorInterpretation(Band self, GDALColorInterp val) -> CPLErr\n"
   64094             :     "\n"
   64095             :     "Deprecated.  Alternate name for :py:meth:`SetColorInterpretation`.\n"
   64096             :     "\n"
   64097             :     ""},
   64098             :    { "Band_GetNoDataValue", _wrap_Band_GetNoDataValue, METH_O, "Band_GetNoDataValue(Band self)"},
   64099             :    { "Band_GetNoDataValueAsInt64", _wrap_Band_GetNoDataValueAsInt64, METH_O, "\n"
   64100             :     "Band_GetNoDataValueAsInt64(Band self)\n"
   64101             :     "\n"
   64102             :     "\n"
   64103             :     "Fetch the nodata value for this band.\n"
   64104             :     "See :cpp:func:`GDALRasterBand::GetNoDataValueAsInt64`.\n"
   64105             :     "\n"
   64106             :     "Returns\n"
   64107             :     "-------\n"
   64108             :     "int\n"
   64109             :     "    The nodata value, or ``None`` if it has not been set or\n"
   64110             :     "    the data type of this band is not :py:const:`gdal.GDT_Int64`.\n"
   64111             :     "\n"
   64112             :     "\n"
   64113             :     ""},
   64114             :    { "Band_GetNoDataValueAsUInt64", _wrap_Band_GetNoDataValueAsUInt64, METH_O, "\n"
   64115             :     "Band_GetNoDataValueAsUInt64(Band self)\n"
   64116             :     "\n"
   64117             :     "\n"
   64118             :     "Fetch the nodata value for this band.\n"
   64119             :     "See :cpp:func:`GDALRasterBand::GetNoDataValueAsUInt64`.\n"
   64120             :     "\n"
   64121             :     "Returns\n"
   64122             :     "-------\n"
   64123             :     "int\n"
   64124             :     "    The nodata value, or ``None`` if it has not been set or\n"
   64125             :     "    the data type of this band is not :py:const:`gdal.GDT_UInt64`.\n"
   64126             :     "\n"
   64127             :     "\n"
   64128             :     ""},
   64129             :    { "Band_SetNoDataValue", _wrap_Band_SetNoDataValue, METH_VARARGS, "Band_SetNoDataValue(Band self, double d) -> CPLErr"},
   64130             :    { "Band_SetNoDataValueAsInt64", _wrap_Band_SetNoDataValueAsInt64, METH_VARARGS, "Band_SetNoDataValueAsInt64(Band self, GIntBig v) -> CPLErr"},
   64131             :    { "Band_SetNoDataValueAsUInt64", _wrap_Band_SetNoDataValueAsUInt64, METH_VARARGS, "Band_SetNoDataValueAsUInt64(Band self, GUIntBig v) -> CPLErr"},
   64132             :    { "Band_DeleteNoDataValue", _wrap_Band_DeleteNoDataValue, METH_O, "\n"
   64133             :     "Band_DeleteNoDataValue(Band self) -> CPLErr\n"
   64134             :     "\n"
   64135             :     "\n"
   64136             :     "Remove the nodata value for this band.\n"
   64137             :     "\n"
   64138             :     "Returns\n"
   64139             :     "-------\n"
   64140             :     "int:\n"
   64141             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64142             :     "\n"
   64143             :     "\n"
   64144             :     ""},
   64145             :    { "Band_GetUnitType", _wrap_Band_GetUnitType, METH_O, "\n"
   64146             :     "Band_GetUnitType(Band self) -> char const *\n"
   64147             :     "\n"
   64148             :     "\n"
   64149             :     "Return a name for the units of this raster's values.\n"
   64150             :     "See :cpp:func:`GDALRasterBand::GetUnitType`.\n"
   64151             :     "\n"
   64152             :     "Returns\n"
   64153             :     "-------\n"
   64154             :     "str\n"
   64155             :     "\n"
   64156             :     "Examples\n"
   64157             :     "--------\n"
   64158             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   64159             :     ">>> ds.GetRasterBand(1).SetUnitType('ft')\n"
   64160             :     "0\n"
   64161             :     ">>> ds.GetRasterBand(1).GetUnitType()\n"
   64162             :     "'ft'\n"
   64163             :     "\n"
   64164             :     ""},
   64165             :    { "Band_SetUnitType", _wrap_Band_SetUnitType, METH_VARARGS, "\n"
   64166             :     "Band_SetUnitType(Band self, char const * val) -> CPLErr\n"
   64167             :     "\n"
   64168             :     "\n"
   64169             :     "Set unit type.\n"
   64170             :     "See :cpp:func:`GDALRasterBand::SetUnitType`.\n"
   64171             :     "\n"
   64172             :     "Parameters\n"
   64173             :     "----------\n"
   64174             :     "val : str\n"
   64175             :     "\n"
   64176             :     "Returns\n"
   64177             :     "-------\n"
   64178             :     "int:\n"
   64179             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64180             :     "\n"
   64181             :     ""},
   64182             :    { "Band_GetRasterCategoryNames", _wrap_Band_GetRasterCategoryNames, METH_O, "\n"
   64183             :     "Band_GetRasterCategoryNames(Band self) -> char **\n"
   64184             :     "\n"
   64185             :     "\n"
   64186             :     "Fetch the list of category names for this band.\n"
   64187             :     "See :cpp:func:`GDALRasterBand::GetCategoryNames`.\n"
   64188             :     "\n"
   64189             :     "Returns\n"
   64190             :     "-------\n"
   64191             :     "list\n"
   64192             :     "    The list of names, or ``None`` if no names exist.\n"
   64193             :     "\n"
   64194             :     "\n"
   64195             :     ""},
   64196             :    { "Band_SetRasterCategoryNames", _wrap_Band_SetRasterCategoryNames, METH_VARARGS, "\n"
   64197             :     "Band_SetRasterCategoryNames(Band self, char ** names) -> CPLErr\n"
   64198             :     "\n"
   64199             :     "Deprecated.  Alternate name for :py:meth:`SetCategoryNames`.\n"
   64200             :     "\n"
   64201             :     ""},
   64202             :    { "Band_GetMinimum", _wrap_Band_GetMinimum, METH_O, "\n"
   64203             :     "Band_GetMinimum(Band self)\n"
   64204             :     "\n"
   64205             :     "\n"
   64206             :     "Fetch a previously stored maximum value for this band.\n"
   64207             :     "See :cpp:func:`GDALRasterBand::GetMinimum`.\n"
   64208             :     "\n"
   64209             :     "Returns\n"
   64210             :     "-------\n"
   64211             :     "float\n"
   64212             :     "    The stored minimum value, or ``None`` if no value\n"
   64213             :     "    has been stored.\n"
   64214             :     "\n"
   64215             :     "\n"
   64216             :     ""},
   64217             :    { "Band_GetMaximum", _wrap_Band_GetMaximum, METH_O, "\n"
   64218             :     "Band_GetMaximum(Band self)\n"
   64219             :     "\n"
   64220             :     "\n"
   64221             :     "Fetch a previously stored maximum value for this band.\n"
   64222             :     "See :cpp:func:`GDALRasterBand::GetMaximum`.\n"
   64223             :     "\n"
   64224             :     "Returns\n"
   64225             :     "-------\n"
   64226             :     "float\n"
   64227             :     "    The stored maximum value, or ``None`` if no value\n"
   64228             :     "    has been stored.\n"
   64229             :     "\n"
   64230             :     "\n"
   64231             :     ""},
   64232             :    { "Band_GetOffset", _wrap_Band_GetOffset, METH_O, "\n"
   64233             :     "Band_GetOffset(Band self)\n"
   64234             :     "\n"
   64235             :     "\n"
   64236             :     "Fetch the raster value offset.\n"
   64237             :     "See :cpp:func:`GDALRasterBand::GetOffset`.\n"
   64238             :     "\n"
   64239             :     "Returns\n"
   64240             :     "-------\n"
   64241             :     "double\n"
   64242             :     "    The offset value, or ``0.0``.\n"
   64243             :     "\n"
   64244             :     "\n"
   64245             :     ""},
   64246             :    { "Band_GetScale", _wrap_Band_GetScale, METH_O, "\n"
   64247             :     "Band_GetScale(Band self)\n"
   64248             :     "\n"
   64249             :     "\n"
   64250             :     "Fetch the band scale value.\n"
   64251             :     "See :cpp:func:`GDALRasterBand::GetScale`.\n"
   64252             :     "\n"
   64253             :     "Returns\n"
   64254             :     "-------\n"
   64255             :     "double\n"
   64256             :     "    The scale value, or ``1.0``.\n"
   64257             :     "\n"
   64258             :     ""},
   64259             :    { "Band_SetOffset", _wrap_Band_SetOffset, METH_VARARGS, "\n"
   64260             :     "Band_SetOffset(Band self, double val) -> CPLErr\n"
   64261             :     "\n"
   64262             :     "\n"
   64263             :     "Set scaling offset.\n"
   64264             :     "See :cpp:func:`GDALRasterBand::SetOffset`.\n"
   64265             :     "\n"
   64266             :     "Parameters\n"
   64267             :     "----------\n"
   64268             :     "val : float\n"
   64269             :     "\n"
   64270             :     "Returns\n"
   64271             :     "-------\n"
   64272             :     "int:\n"
   64273             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64274             :     "\n"
   64275             :     "See Also\n"
   64276             :     "--------\n"
   64277             :     ":py:meth:`SetScale`\n"
   64278             :     "\n"
   64279             :     ""},
   64280             :    { "Band_SetScale", _wrap_Band_SetScale, METH_VARARGS, "\n"
   64281             :     "Band_SetScale(Band self, double val) -> CPLErr\n"
   64282             :     "\n"
   64283             :     "Set scaling ratio.\n"
   64284             :     "See :cpp:func:`GDALRasterBand::SetScale`.\n"
   64285             :     "\n"
   64286             :     "Parameters\n"
   64287             :     "----------\n"
   64288             :     "val : float\n"
   64289             :     "\n"
   64290             :     "Returns\n"
   64291             :     "-------\n"
   64292             :     "int:\n"
   64293             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64294             :     "\n"
   64295             :     "See Also\n"
   64296             :     "--------\n"
   64297             :     ":py:meth:`SetOffset`\n"
   64298             :     "\n"
   64299             :     ""},
   64300             :    { "Band_GetStatistics", _wrap_Band_GetStatistics, METH_VARARGS, "\n"
   64301             :     "Band_GetStatistics(Band self, int approx_ok, int force) -> CPLErr\n"
   64302             :     "\n"
   64303             :     "\n"
   64304             :     "Return the minimum, maximum, mean, and standard deviation of all pixel values\n"
   64305             :     "in this band.\n"
   64306             :     "See :cpp:func:`GDALRasterBand::GetStatistics`\n"
   64307             :     "\n"
   64308             :     "Parameters\n"
   64309             :     "----------\n"
   64310             :     "approx_ok : bool\n"
   64311             :     "    If ``True``, allow overviews or a subset of image tiles to be used in\n"
   64312             :     "    computing the statistics.\n"
   64313             :     "force : bool\n"
   64314             :     "    If ``False``, only return a result if it can be obtained without scanning\n"
   64315             :     "    the image, i.e. from pre-existing metadata.\n"
   64316             :     "\n"
   64317             :     "Returns\n"
   64318             :     "-------\n"
   64319             :     "list\n"
   64320             :     "   a list with the min, max, mean, and standard deviation of values\n"
   64321             :     "   in the Band.\n"
   64322             :     "\n"
   64323             :     "See Also\n"
   64324             :     "--------\n"
   64325             :     ":py:meth:`ComputeBandStats`\n"
   64326             :     ":py:meth:`ComputeRasterMinMax`\n"
   64327             :     ":py:meth:`GetMaximum`\n"
   64328             :     ":py:meth:`GetMinimum`\n"
   64329             :     ":py:meth:`GetStatistics`\n"
   64330             :     "\n"
   64331             :     ""},
   64332             :    { "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"},
   64333             :    { "Band_SetStatistics", _wrap_Band_SetStatistics, METH_VARARGS, "\n"
   64334             :     "Band_SetStatistics(Band self, double min, double max, double mean, double stddev) -> CPLErr\n"
   64335             :     "\n"
   64336             :     "\n"
   64337             :     "Set statistics on band.\n"
   64338             :     "See :cpp:func:`GDALRasterBand::SetStatistics`.\n"
   64339             :     "\n"
   64340             :     "Parameters\n"
   64341             :     "----------\n"
   64342             :     "min : float\n"
   64343             :     "max : float\n"
   64344             :     "mean : float\n"
   64345             :     "stdev : float\n"
   64346             :     "\n"
   64347             :     "Returns\n"
   64348             :     "-------\n"
   64349             :     "int:\n"
   64350             :     "   :py:const:`CE_None` on apparent success or :py:const:`CE_Failure` on\n"
   64351             :     "   failure.  This method cannot detect whether metadata will be properly saved and\n"
   64352             :     "   so may return :py:const:`gdal.`CE_None` even if the statistics will never be\n"
   64353             :     "   saved.\n"
   64354             :     "\n"
   64355             :     "See Also\n"
   64356             :     "--------\n"
   64357             :     ":py:meth:`ComputeBandStats`\n"
   64358             :     ":py:meth:`ComputeRasterMinMax`\n"
   64359             :     ":py:meth:`ComputeStatistics`\n"
   64360             :     ":py:meth:`GetMaximum`\n"
   64361             :     ":py:meth:`GetMinimum`\n"
   64362             :     ":py:meth:`GetStatistics`\n"
   64363             :     "\n"
   64364             :     ""},
   64365             :    { "Band_GetOverviewCount", _wrap_Band_GetOverviewCount, METH_O, "\n"
   64366             :     "Band_GetOverviewCount(Band self) -> int\n"
   64367             :     "\n"
   64368             :     "\n"
   64369             :     "Return the number of overview layers available.\n"
   64370             :     "See :cpp:func:`GDALRasterBand::GetOverviewCount`.\n"
   64371             :     "\n"
   64372             :     "Returns\n"
   64373             :     "-------\n"
   64374             :     "int\n"
   64375             :     "\n"
   64376             :     "\n"
   64377             :     ""},
   64378             :    { "Band_GetOverview", _wrap_Band_GetOverview, METH_VARARGS, "\n"
   64379             :     "Band_GetOverview(Band self, int i) -> Band\n"
   64380             :     "\n"
   64381             :     "\n"
   64382             :     "Fetch a raster overview.\n"
   64383             :     "See :cpp:func:`GDALRasterBand::GetOverview`.\n"
   64384             :     "\n"
   64385             :     "Parameters\n"
   64386             :     "----------\n"
   64387             :     "i : int\n"
   64388             :     "    Overview index between 0 and ``GetOverviewCount() - 1``.\n"
   64389             :     "\n"
   64390             :     "Returns\n"
   64391             :     "-------\n"
   64392             :     "Band\n"
   64393             :     "\n"
   64394             :     "\n"
   64395             :     ""},
   64396             :    { "Band_GetSampleOverview", _wrap_Band_GetSampleOverview, METH_VARARGS, "Band_GetSampleOverview(Band self, GUIntBig nDesiredSamples) -> Band"},
   64397             :    { "Band_Checksum", (PyCFunction)(void(*)(void))_wrap_Band_Checksum, METH_VARARGS|METH_KEYWORDS, "\n"
   64398             :     "Band_Checksum(Band self, int xoff=0, int yoff=0, int * xsize=None, int * ysize=None) -> int\n"
   64399             :     "\n"
   64400             :     "\n"
   64401             :     "Computes a checksum from a region of a RasterBand.\n"
   64402             :     "See :cpp:func:`GDALChecksumImage`.\n"
   64403             :     "\n"
   64404             :     "Parameters\n"
   64405             :     "----------\n"
   64406             :     "xoff : int, default=0\n"
   64407             :     "   The pixel offset to left side of the region of the band to\n"
   64408             :     "   be read. This would be zero to start from the left side.\n"
   64409             :     "yoff : int, default=0\n"
   64410             :     "   The line offset to top side of the region of the band to\n"
   64411             :     "   be read. This would be zero to start from the top side.\n"
   64412             :     "xsize : int, optional\n"
   64413             :     "     The number of pixels to read in the x direction. By default,\n"
   64414             :     "     equal to the number of columns in the raster.\n"
   64415             :     "ysize : int, optional\n"
   64416             :     "     The number of rows to read in the y direction. By default,\n"
   64417             :     "     equal to the number of bands in the raster.\n"
   64418             :     "\n"
   64419             :     "Returns\n"
   64420             :     "-------\n"
   64421             :     "int\n"
   64422             :     "    checksum value, or -1 in case of error\n"
   64423             :     "\n"
   64424             :     "\n"
   64425             :     ""},
   64426             :    { "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)"},
   64427             :    { "Band_ComputeBandStats", _wrap_Band_ComputeBandStats, METH_VARARGS, "\n"
   64428             :     "Band_ComputeBandStats(Band self, int samplestep=1)\n"
   64429             :     "\n"
   64430             :     "\n"
   64431             :     "Computes the mean and standard deviation of values in this Band.\n"
   64432             :     "See :cpp:func:`GDALComputeBandStats`.\n"
   64433             :     "\n"
   64434             :     "Parameters\n"
   64435             :     "----------\n"
   64436             :     "samplestep : int, default=1\n"
   64437             :     "    Step between scanlines used to compute statistics.\n"
   64438             :     "\n"
   64439             :     "Returns\n"
   64440             :     "-------\n"
   64441             :     "tuple\n"
   64442             :     "    tuple of length 2 with value of mean and standard deviation\n"
   64443             :     "\n"
   64444             :     "See Also\n"
   64445             :     "--------\n"
   64446             :     ":py:meth:`ComputeRasterMinMax`\n"
   64447             :     ":py:meth:`ComputeStatistics`\n"
   64448             :     ":py:meth:`GetMaximum`\n"
   64449             :     ":py:meth:`GetMinimum`\n"
   64450             :     ":py:meth:`GetStatistics`\n"
   64451             :     ":py:meth:`SetStatistics`\n"
   64452             :     "\n"
   64453             :     ""},
   64454             :    { "Band_Fill", _wrap_Band_Fill, METH_VARARGS, "\n"
   64455             :     "Band_Fill(Band self, double real_fill, double imag_fill=0.0) -> CPLErr\n"
   64456             :     "\n"
   64457             :     "\n"
   64458             :     "Fill this band with a constant value.\n"
   64459             :     "See :cpp:func:`GDALRasterBand::Fill`.\n"
   64460             :     "\n"
   64461             :     "Parameters\n"
   64462             :     "----------\n"
   64463             :     "real_fill : float\n"
   64464             :     "    real component of the fill value\n"
   64465             :     "imag_fill : float, default = 0.0\n"
   64466             :     "    imaginary component of the fill value\n"
   64467             :     "\n"
   64468             :     "Returns\n"
   64469             :     "-------\n"
   64470             :     "int:\n"
   64471             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64472             :     "\n"
   64473             :     "\n"
   64474             :     ""},
   64475             :    { "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"},
   64476             :    { "Band_FlushCache", _wrap_Band_FlushCache, METH_O, "\n"
   64477             :     "Band_FlushCache(Band self)\n"
   64478             :     "\n"
   64479             :     "\n"
   64480             :     "Flush raster data cache.\n"
   64481             :     "See :cpp:func:`GDALRasterBand::FlushCache`.\n"
   64482             :     "\n"
   64483             :     ""},
   64484             :    { "Band_GetRasterColorTable", _wrap_Band_GetRasterColorTable, METH_O, "\n"
   64485             :     "Band_GetRasterColorTable(Band self) -> ColorTable\n"
   64486             :     "\n"
   64487             :     "\n"
   64488             :     "Fetch the color table associated with this band.\n"
   64489             :     "See :cpp:func:`GDALRasterBand::GetColorTable`.\n"
   64490             :     "\n"
   64491             :     "Returns\n"
   64492             :     "-------\n"
   64493             :     "ColorTable\n"
   64494             :     "    The :py:class:`ColorTable`, or ``None`` if it has not been defined.\n"
   64495             :     "\n"
   64496             :     ""},
   64497             :    { "Band_GetColorTable", _wrap_Band_GetColorTable, METH_O, "\n"
   64498             :     "Band_GetColorTable(Band self) -> ColorTable\n"
   64499             :     "\n"
   64500             :     "\n"
   64501             :     "Get the color table associated with this band.\n"
   64502             :     "See :cpp:func:`GDALRasterBand::GetColorTable`.\n"
   64503             :     "\n"
   64504             :     "Returns\n"
   64505             :     "-------\n"
   64506             :     "ColorTable or ``None``\n"
   64507             :     "\n"
   64508             :     ""},
   64509             :    { "Band_SetRasterColorTable", _wrap_Band_SetRasterColorTable, METH_VARARGS, "\n"
   64510             :     "Band_SetRasterColorTable(Band self, ColorTable arg) -> int\n"
   64511             :     "\n"
   64512             :     "Deprecated. Alternate name for :py:meth:`SetColorTable`.\n"
   64513             :     "\n"
   64514             :     ""},
   64515             :    { "Band_SetColorTable", _wrap_Band_SetColorTable, METH_VARARGS, "\n"
   64516             :     "Band_SetColorTable(Band self, ColorTable arg) -> int\n"
   64517             :     "\n"
   64518             :     "\n"
   64519             :     "Set the raster color table.\n"
   64520             :     "See :cpp:func:`GDALRasterBand::SetColorTable`.\n"
   64521             :     "\n"
   64522             :     "Parameters\n"
   64523             :     "----------\n"
   64524             :     "arg : ColorTable\n"
   64525             :     "\n"
   64526             :     "Returns\n"
   64527             :     "-------\n"
   64528             :     "int:\n"
   64529             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64530             :     "\n"
   64531             :     ""},
   64532             :    { "Band_GetDefaultRAT", _wrap_Band_GetDefaultRAT, METH_O, "Band_GetDefaultRAT(Band self) -> RasterAttributeTable"},
   64533             :    { "Band_SetDefaultRAT", _wrap_Band_SetDefaultRAT, METH_VARARGS, "Band_SetDefaultRAT(Band self, RasterAttributeTable table) -> int"},
   64534             :    { "Band_GetMaskBand", _wrap_Band_GetMaskBand, METH_O, "\n"
   64535             :     "Band_GetMaskBand(Band self) -> Band\n"
   64536             :     "\n"
   64537             :     "\n"
   64538             :     "Return the mask band associated with this band.\n"
   64539             :     "See :cpp:func:`GDALRasterBand::GetMaskBand`.\n"
   64540             :     "\n"
   64541             :     "Returns\n"
   64542             :     "-------\n"
   64543             :     "Band\n"
   64544             :     "\n"
   64545             :     "\n"
   64546             :     ""},
   64547             :    { "Band_GetMaskFlags", _wrap_Band_GetMaskFlags, METH_O, "\n"
   64548             :     "Band_GetMaskFlags(Band self) -> int\n"
   64549             :     "\n"
   64550             :     "\n"
   64551             :     "Return the status flags of the mask band.\n"
   64552             :     "See :cpp:func:`GDALRasterBand::GetMaskFlags`.\n"
   64553             :     "\n"
   64554             :     "Returns\n"
   64555             :     "-------\n"
   64556             :     "int\n"
   64557             :     "\n"
   64558             :     "Examples\n"
   64559             :     "--------\n"
   64560             :     ">>> import numpy as np\n"
   64561             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   64562             :     ">>> band = ds.GetRasterBand(1)\n"
   64563             :     ">>> band.GetMaskFlags() == gdal.GMF_ALL_VALID\n"
   64564             :     "True\n"
   64565             :     ">>> band.SetNoDataValue(22)\n"
   64566             :     "0\n"
   64567             :     ">>> band.WriteArray(np.array([[22]]))\n"
   64568             :     "0\n"
   64569             :     ">>> band.GetMaskBand().ReadAsArray(win_xsize=2,win_ysize=2)\n"
   64570             :     "array([[  0, 255],\n"
   64571             :     "       [255, 255]], dtype=uint8)\n"
   64572             :     ">>> band.GetMaskFlags() == gdal.GMF_NODATA\n"
   64573             :     "True\n"
   64574             :     "\n"
   64575             :     "\n"
   64576             :     ""},
   64577             :    { "Band_CreateMaskBand", _wrap_Band_CreateMaskBand, METH_VARARGS, "\n"
   64578             :     "Band_CreateMaskBand(Band self, int nFlags) -> CPLErr\n"
   64579             :     "\n"
   64580             :     "\n"
   64581             :     "Add a mask band to the current band.\n"
   64582             :     "See :cpp:func:`GDALRasterBand::CreateMaskBand`.\n"
   64583             :     "\n"
   64584             :     "Parameters\n"
   64585             :     "----------\n"
   64586             :     "nFlags : int\n"
   64587             :     "\n"
   64588             :     "Returns\n"
   64589             :     "-------\n"
   64590             :     "int:\n"
   64591             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64592             :     "\n"
   64593             :     "\n"
   64594             :     ""},
   64595             :    { "Band_IsMaskBand", _wrap_Band_IsMaskBand, METH_O, "\n"
   64596             :     "Band_IsMaskBand(Band self) -> bool\n"
   64597             :     "\n"
   64598             :     "\n"
   64599             :     "Returns whether the band is a mask band.\n"
   64600             :     "See :cpp:func:`GDALRasterBand::IsMaskBand`.\n"
   64601             :     "\n"
   64602             :     "Returns\n"
   64603             :     "-------\n"
   64604             :     "bool\n"
   64605             :     "\n"
   64606             :     ""},
   64607             :    { "Band_GetHistogram", (PyCFunction)(void(*)(void))_wrap_Band_GetHistogram, METH_VARARGS|METH_KEYWORDS, "\n"
   64608             :     "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"
   64609             :     "\n"
   64610             :     "\n"
   64611             :     "Compute raster histogram.\n"
   64612             :     "See :cpp:func:`GDALRasterBand::GetHistogram`.\n"
   64613             :     "\n"
   64614             :     "Parameters\n"
   64615             :     "----------\n"
   64616             :     "min : float, default=-0.05\n"
   64617             :     "    the lower bound of the histogram\n"
   64618             :     "max : float, default=255.5\n"
   64619             :     "    the upper bound of the histogram\n"
   64620             :     "buckets : int, default=256\n"
   64621             :     "    the number of buckets int he histogram\n"
   64622             :     "include_out_of_range : bool, default=False\n"
   64623             :     "    if ``True``, add out-of-range values into the first and last buckets\n"
   64624             :     "approx_ok : bool, default=True\n"
   64625             :     "    if ``True``, compute an approximate histogram by using subsampling or overviews\n"
   64626             :     "callback : function, optional\n"
   64627             :     "             A progress callback function\n"
   64628             :     "callback_data: optional\n"
   64629             :     "             Optional data to be passed to callback function\n"
   64630             :     "\n"
   64631             :     "Returns\n"
   64632             :     "-------\n"
   64633             :     "list\n"
   64634             :     "    list with length equal to ``buckets``. If ``approx_ok`` is ``False``, each\n"
   64635             :     "    the value of each list item will equal the number of pixels in that bucket.\n"
   64636             :     "\n"
   64637             :     "Examples\n"
   64638             :     "--------\n"
   64639             :     ">>> import numpy as np\n"
   64640             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10, eType=gdal.GDT_Float32)\n"
   64641             :     ">>> ds.WriteArray(np.random.normal(size=100).reshape(10, 10))\n"
   64642             :     "0\n"
   64643             :     ">>> ds.GetRasterBand(1).GetHistogram(min=-3.5, max=3.5, buckets=13, approx_ok=False)\n"
   64644             :     "[0, 0, 3, 9, 13, 12, 25, 22, 9, 6, 0, 1, 0]  # random\n"
   64645             :     "\n"
   64646             :     ""},
   64647             :    { "Band_GetDefaultHistogram", (PyCFunction)(void(*)(void))_wrap_Band_GetDefaultHistogram, METH_VARARGS|METH_KEYWORDS, "\n"
   64648             :     "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"
   64649             :     "\n"
   64650             :     "\n"
   64651             :     "Fetch the default histogram for this band.\n"
   64652             :     "See :cpp:func:`GDALRasterBand::GetDefaultHistogram`.\n"
   64653             :     "\n"
   64654             :     "Returns\n"
   64655             :     "-------\n"
   64656             :     "list\n"
   64657             :     "    List with the following four elements:\n"
   64658             :     "    - lower bound of histogram\n"
   64659             :     "    - upper bound of histogram\n"
   64660             :     "    - number of buckets in histogram\n"
   64661             :     "    - tuple with counts for each bucket\n"
   64662             :     "\n"
   64663             :     ""},
   64664             :    { "Band_SetDefaultHistogram", _wrap_Band_SetDefaultHistogram, METH_VARARGS, "\n"
   64665             :     "Band_SetDefaultHistogram(Band self, double min, double max, int buckets_in) -> CPLErr\n"
   64666             :     "\n"
   64667             :     "\n"
   64668             :     "Set default histogram.\n"
   64669             :     "See :cpp:func:`GDALRasterBand::SetDefaultHistogram`.\n"
   64670             :     "\n"
   64671             :     "Parameters\n"
   64672             :     "----------\n"
   64673             :     "min : float\n"
   64674             :     "    minimum value\n"
   64675             :     "max : float\n"
   64676             :     "    maximum value\n"
   64677             :     "buckets_in : list\n"
   64678             :     "    list of pixel counts for each bucket\n"
   64679             :     "\n"
   64680             :     "Returns\n"
   64681             :     "-------\n"
   64682             :     "int:\n"
   64683             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64684             :     "\n"
   64685             :     "See Also\n"
   64686             :     "--------\n"
   64687             :     ":py:meth:`SetHistogram`\n"
   64688             :     "\n"
   64689             :     ""},
   64690             :    { "Band_HasArbitraryOverviews", _wrap_Band_HasArbitraryOverviews, METH_O, "\n"
   64691             :     "Band_HasArbitraryOverviews(Band self) -> bool\n"
   64692             :     "\n"
   64693             :     "\n"
   64694             :     "Check for arbitrary overviews.\n"
   64695             :     "See :cpp:func:`GDALRasterBand::HasArbitraryOverviews`.\n"
   64696             :     "\n"
   64697             :     "Returns\n"
   64698             :     "-------\n"
   64699             :     "bool\n"
   64700             :     "\n"
   64701             :     ""},
   64702             :    { "Band_GetCategoryNames", _wrap_Band_GetCategoryNames, METH_O, "\n"
   64703             :     "Band_GetCategoryNames(Band self) -> char **\n"
   64704             :     "\n"
   64705             :     "\n"
   64706             :     "Fetch the list of category names for this raster.\n"
   64707             :     "See :cpp:func:`GDALRasterBand::GetCategoryNames`.\n"
   64708             :     "\n"
   64709             :     "Returns\n"
   64710             :     "-------\n"
   64711             :     "list\n"
   64712             :     "    A list of category names, or ``None``\n"
   64713             :     "\n"
   64714             :     ""},
   64715             :    { "Band_SetCategoryNames", _wrap_Band_SetCategoryNames, METH_VARARGS, "\n"
   64716             :     "Band_SetCategoryNames(Band self, char ** papszCategoryNames) -> CPLErr\n"
   64717             :     "\n"
   64718             :     "\n"
   64719             :     "Set the category names for this band.\n"
   64720             :     "See :cpp:func:`GDALRasterBand::SetCategoryNames`.\n"
   64721             :     "\n"
   64722             :     "Parameters\n"
   64723             :     "----------\n"
   64724             :     "papszCategoryNames : list\n"
   64725             :     "\n"
   64726             :     "Returns\n"
   64727             :     "-------\n"
   64728             :     "int:\n"
   64729             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64730             :     "\n"
   64731             :     ""},
   64732             :    { "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"},
   64733             :    { "Band_GetVirtualMemAuto", (PyCFunction)(void(*)(void))_wrap_Band_GetVirtualMemAuto, METH_VARARGS|METH_KEYWORDS, "Band_GetVirtualMemAuto(Band self, GDALRWFlag eRWFlag, char ** options=None) -> VirtualMem"},
   64734             :    { "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"},
   64735             :    { "Band_GetDataCoverageStatus", _wrap_Band_GetDataCoverageStatus, METH_VARARGS, "\n"
   64736             :     "Band_GetDataCoverageStatus(Band self, int nXOff, int nYOff, int nXSize, int nYSize, int nMaskFlagStop=0) -> int\n"
   64737             :     "\n"
   64738             :     "\n"
   64739             :     "Determine whether a sub-window of the Band contains only data, only empty blocks, or a mix of both.\n"
   64740             :     "See :cpp:func:`GDALRasterBand::GetDataCoverageStatus`.\n"
   64741             :     "\n"
   64742             :     "Parameters\n"
   64743             :     "----------\n"
   64744             :     "nXOff : int\n"
   64745             :     "nYOff : int\n"
   64746             :     "nXSize : int\n"
   64747             :     "nYSize : int\n"
   64748             :     "nMaskFlagStop : int, default=0\n"
   64749             :     "\n"
   64750             :     "Returns\n"
   64751             :     "-------\n"
   64752             :     "list\n"
   64753             :     "    First value represents a bitwise-or value of the following constants\n"
   64754             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_DATA`\n"
   64755             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_EMPTY`\n"
   64756             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED`\n"
   64757             :     "    Second value represents the approximate percentage in [0, 100] of pixels in the window that have valid values\n"
   64758             :     "\n"
   64759             :     "Examples\n"
   64760             :     "--------\n"
   64761             :     ">>> import numpy as np\n"
   64762             :     ">>> # Create a raster with four blocks\n"
   64763             :     ">>> ds = gdal.GetDriverByName('GTiff').Create('test.tif', 64, 64, options = {'SPARSE_OK':True, 'TILED':True, 'BLOCKXSIZE':32, 'BLOCKYSIZE':32})\n"
   64764             :     ">>> band = ds.GetRasterBand(1)\n"
   64765             :     ">>> # Write some data to upper-left block\n"
   64766             :     ">>> band.WriteArray(np.array([[1, 2], [3, 4]]))\n"
   64767             :     "0\n"
   64768             :     ">>> # Check status of upper-left block\n"
   64769             :     ">>> flags, pct = band.GetDataCoverageStatus(0, 0, 32, 32)\n"
   64770             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA\n"
   64771             :     "True\n"
   64772             :     ">>> pct\n"
   64773             :     "100.0\n"
   64774             :     ">>> # Check status of upper-right block\n"
   64775             :     ">>> flags, pct = band.GetDataCoverageStatus(32, 0, 32, 32)\n"
   64776             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY\n"
   64777             :     "True\n"
   64778             :     ">>> pct\n"
   64779             :     "0.0\n"
   64780             :     ">>> # Check status of window touching all four blocks\n"
   64781             :     ">>> flags, pct = band.GetDataCoverageStatus(16, 16, 32, 32)\n"
   64782             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA | gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY\n"
   64783             :     "True\n"
   64784             :     ">>> pct\n"
   64785             :     "25.0\n"
   64786             :     "\n"
   64787             :     ""},
   64788             :    { "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"},
   64789             :    { "Band_InterpolateAtPoint", _wrap_Band_InterpolateAtPoint, METH_VARARGS, "Band_InterpolateAtPoint(Band self, double pixel, double line, GDALRIOResampleAlg interpolation) -> CPLErr"},
   64790             :    { "Band_InterpolateAtGeolocation", _wrap_Band_InterpolateAtGeolocation, METH_VARARGS, "Band_InterpolateAtGeolocation(Band self, double geolocX, double geolocY, SpatialReference srs, GDALRIOResampleAlg interpolation, char ** transformerOptions=None) -> CPLErr"},
   64791             :    { "Band_ComputeMinMaxLocation", _wrap_Band_ComputeMinMaxLocation, METH_O, "Band_ComputeMinMaxLocation(Band self) -> CPLErr"},
   64792             :    { "Band_AsMDArray", _wrap_Band_AsMDArray, METH_O, "Band_AsMDArray(Band self) -> MDArray"},
   64793             :    { "Band__EnablePixelTypeSignedByteWarning", _wrap_Band__EnablePixelTypeSignedByteWarning, METH_VARARGS, "Band__EnablePixelTypeSignedByteWarning(Band self, bool b)"},
   64794             :    { "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"},
   64795             :    { "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"},
   64796             :    { "Band_swigregister", Band_swigregister, METH_O, NULL},
   64797             :    { "new_ColorTable", (PyCFunction)(void(*)(void))_wrap_new_ColorTable, METH_VARARGS|METH_KEYWORDS, "new_ColorTable(GDALPaletteInterp palette=GPI_RGB) -> ColorTable"},
   64798             :    { "delete_ColorTable", _wrap_delete_ColorTable, METH_O, "delete_ColorTable(ColorTable self)"},
   64799             :    { "ColorTable_Clone", _wrap_ColorTable_Clone, METH_O, "ColorTable_Clone(ColorTable self) -> ColorTable"},
   64800             :    { "ColorTable_GetPaletteInterpretation", _wrap_ColorTable_GetPaletteInterpretation, METH_O, "ColorTable_GetPaletteInterpretation(ColorTable self) -> GDALPaletteInterp"},
   64801             :    { "ColorTable_GetCount", _wrap_ColorTable_GetCount, METH_O, "ColorTable_GetCount(ColorTable self) -> int"},
   64802             :    { "ColorTable_GetColorEntry", _wrap_ColorTable_GetColorEntry, METH_VARARGS, "ColorTable_GetColorEntry(ColorTable self, int entry) -> ColorEntry"},
   64803             :    { "ColorTable_GetColorEntryAsRGB", _wrap_ColorTable_GetColorEntryAsRGB, METH_VARARGS, "ColorTable_GetColorEntryAsRGB(ColorTable self, int entry, ColorEntry centry) -> int"},
   64804             :    { "ColorTable_SetColorEntry", _wrap_ColorTable_SetColorEntry, METH_VARARGS, "ColorTable_SetColorEntry(ColorTable self, int entry, ColorEntry centry)"},
   64805             :    { "ColorTable_CreateColorRamp", _wrap_ColorTable_CreateColorRamp, METH_VARARGS, "ColorTable_CreateColorRamp(ColorTable self, int nStartIndex, ColorEntry startcolor, int nEndIndex, ColorEntry endcolor)"},
   64806             :    { "ColorTable_swigregister", ColorTable_swigregister, METH_O, NULL},
   64807             :    { "ColorTable_swiginit", ColorTable_swiginit, METH_VARARGS, NULL},
   64808             :    { "delete_SubdatasetInfo", _wrap_delete_SubdatasetInfo, METH_O, "delete_SubdatasetInfo(SubdatasetInfo self)"},
   64809             :    { "SubdatasetInfo_GetPathComponent", _wrap_SubdatasetInfo_GetPathComponent, METH_O, "SubdatasetInfo_GetPathComponent(SubdatasetInfo self) -> retStringAndCPLFree *"},
   64810             :    { "SubdatasetInfo_GetSubdatasetComponent", _wrap_SubdatasetInfo_GetSubdatasetComponent, METH_O, "SubdatasetInfo_GetSubdatasetComponent(SubdatasetInfo self) -> retStringAndCPLFree *"},
   64811             :    { "SubdatasetInfo_ModifyPathComponent", _wrap_SubdatasetInfo_ModifyPathComponent, METH_VARARGS, "SubdatasetInfo_ModifyPathComponent(SubdatasetInfo self, char const * pszNewFileName) -> retStringAndCPLFree *"},
   64812             :    { "SubdatasetInfo_swigregister", SubdatasetInfo_swigregister, METH_O, NULL},
   64813             :    { "GetSubdatasetInfo", _wrap_GetSubdatasetInfo, METH_O, "GetSubdatasetInfo(char const * pszFileName) -> GDALSubdatasetInfoShadow *"},
   64814             :    { "new_Relationship", _wrap_new_Relationship, METH_VARARGS, "new_Relationship(char const * name, char const * leftTableName, char const * rightTableName, GDALRelationshipCardinality cardinality) -> Relationship"},
   64815             :    { "delete_Relationship", _wrap_delete_Relationship, METH_O, "delete_Relationship(Relationship self)"},
   64816             :    { "Relationship_GetName", _wrap_Relationship_GetName, METH_O, "Relationship_GetName(Relationship self) -> char const *"},
   64817             :    { "Relationship_GetCardinality", _wrap_Relationship_GetCardinality, METH_O, "Relationship_GetCardinality(Relationship self) -> GDALRelationshipCardinality"},
   64818             :    { "Relationship_GetLeftTableName", _wrap_Relationship_GetLeftTableName, METH_O, "Relationship_GetLeftTableName(Relationship self) -> char const *"},
   64819             :    { "Relationship_GetRightTableName", _wrap_Relationship_GetRightTableName, METH_O, "Relationship_GetRightTableName(Relationship self) -> char const *"},
   64820             :    { "Relationship_GetMappingTableName", _wrap_Relationship_GetMappingTableName, METH_O, "Relationship_GetMappingTableName(Relationship self) -> char const *"},
   64821             :    { "Relationship_SetMappingTableName", _wrap_Relationship_SetMappingTableName, METH_VARARGS, "Relationship_SetMappingTableName(Relationship self, char const * pszName)"},
   64822             :    { "Relationship_GetLeftTableFields", _wrap_Relationship_GetLeftTableFields, METH_O, "Relationship_GetLeftTableFields(Relationship self) -> char **"},
   64823             :    { "Relationship_GetRightTableFields", _wrap_Relationship_GetRightTableFields, METH_O, "Relationship_GetRightTableFields(Relationship self) -> char **"},
   64824             :    { "Relationship_SetLeftTableFields", _wrap_Relationship_SetLeftTableFields, METH_VARARGS, "Relationship_SetLeftTableFields(Relationship self, char ** pFields)"},
   64825             :    { "Relationship_SetRightTableFields", _wrap_Relationship_SetRightTableFields, METH_VARARGS, "Relationship_SetRightTableFields(Relationship self, char ** pFields)"},
   64826             :    { "Relationship_GetLeftMappingTableFields", _wrap_Relationship_GetLeftMappingTableFields, METH_O, "Relationship_GetLeftMappingTableFields(Relationship self) -> char **"},
   64827             :    { "Relationship_GetRightMappingTableFields", _wrap_Relationship_GetRightMappingTableFields, METH_O, "Relationship_GetRightMappingTableFields(Relationship self) -> char **"},
   64828             :    { "Relationship_SetLeftMappingTableFields", _wrap_Relationship_SetLeftMappingTableFields, METH_VARARGS, "Relationship_SetLeftMappingTableFields(Relationship self, char ** pFields)"},
   64829             :    { "Relationship_SetRightMappingTableFields", _wrap_Relationship_SetRightMappingTableFields, METH_VARARGS, "Relationship_SetRightMappingTableFields(Relationship self, char ** pFields)"},
   64830             :    { "Relationship_GetType", _wrap_Relationship_GetType, METH_O, "Relationship_GetType(Relationship self) -> GDALRelationshipType"},
   64831             :    { "Relationship_SetType", _wrap_Relationship_SetType, METH_VARARGS, "Relationship_SetType(Relationship self, GDALRelationshipType type)"},
   64832             :    { "Relationship_GetForwardPathLabel", _wrap_Relationship_GetForwardPathLabel, METH_O, "Relationship_GetForwardPathLabel(Relationship self) -> char const *"},
   64833             :    { "Relationship_SetForwardPathLabel", _wrap_Relationship_SetForwardPathLabel, METH_VARARGS, "Relationship_SetForwardPathLabel(Relationship self, char const * pszLabel)"},
   64834             :    { "Relationship_GetBackwardPathLabel", _wrap_Relationship_GetBackwardPathLabel, METH_O, "Relationship_GetBackwardPathLabel(Relationship self) -> char const *"},
   64835             :    { "Relationship_SetBackwardPathLabel", _wrap_Relationship_SetBackwardPathLabel, METH_VARARGS, "Relationship_SetBackwardPathLabel(Relationship self, char const * pszLabel)"},
   64836             :    { "Relationship_GetRelatedTableType", _wrap_Relationship_GetRelatedTableType, METH_O, "Relationship_GetRelatedTableType(Relationship self) -> char const *"},
   64837             :    { "Relationship_SetRelatedTableType", _wrap_Relationship_SetRelatedTableType, METH_VARARGS, "Relationship_SetRelatedTableType(Relationship self, char const * pszType)"},
   64838             :    { "Relationship_swigregister", Relationship_swigregister, METH_O, NULL},
   64839             :    { "Relationship_swiginit", Relationship_swiginit, METH_VARARGS, NULL},
   64840             :    { "TermProgress_nocb", (PyCFunction)(void(*)(void))_wrap_TermProgress_nocb, METH_VARARGS|METH_KEYWORDS, "TermProgress_nocb(double dfProgress, char const * pszMessage=None, void * pData=None) -> int"},
   64841             :    { "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"},
   64842             :    { "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"},
   64843             :    { "ReprojectImage", (PyCFunction)(void(*)(void))_wrap_ReprojectImage, METH_VARARGS|METH_KEYWORDS, "\n"
   64844             :     "ReprojectImage(Dataset src_ds, Dataset dst_ds, char const * src_wkt=None, char const * dst_wkt=None, GDALResampleAlg eResampleAlg=GRA_NearestNeighbour, double WarpMemoryLimit=0.0, double maxerror=0.0, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> CPLErr\n"
   64845             :     "\n"
   64846             :     "\n"
   64847             :     "Reproject image.\n"
   64848             :     "\n"
   64849             :     "See :cpp:func:`GDALReprojectImage`.\n"
   64850             :     "\n"
   64851             :     "Consider using :py:func:`osgeo.gdal.Warp` and :py:func:`osgeo.gdal.WarpOptions` instead\n"
   64852             :     "\n"
   64853             :     ""},
   64854             :    { "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"},
   64855             :    { "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"},
   64856             :    { "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"},
   64857             :    { "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"},
   64858             :    { "FillNodata", (PyCFunction)(void(*)(void))_wrap_FillNodata, METH_VARARGS|METH_KEYWORDS, "\n"
   64859             :     "FillNodata(Band targetBand, Band maskBand, double maxSearchDist, int smoothingIterations, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int\n"
   64860             :     "\n"
   64861             :     "\n"
   64862             :     "Fill selected raster regions by interpolation from the edges.\n"
   64863             :     "\n"
   64864             :     "This algorithm will interpolate values for all designated\n"
   64865             :     "nodata pixels (marked by zeros in ``maskBand``). For each pixel\n"
   64866             :     "a four direction conic search is done to find values to interpolate\n"
   64867             :     "from (using inverse distance weighting by default). Once all values are\n"
   64868             :     "interpolated, zero or more smoothing iterations (3x3 average\n"
   64869             :     "filters on interpolated pixels) are applied to smooth out\n"
   64870             :     "artifacts.\n"
   64871             :     "\n"
   64872             :     "This algorithm is generally suitable for interpolating missing\n"
   64873             :     "regions of fairly continuously varying rasters (such as elevation\n"
   64874             :     "models for instance). It is also suitable for filling small holes\n"
   64875             :     "and cracks in more irregularly varying images (like airphotos). It\n"
   64876             :     "is generally not so great for interpolating a raster from sparse\n"
   64877             :     "point data. See :py:func:`Grid` for that case.\n"
   64878             :     "\n"
   64879             :     "See :cpp:func:`GDALFillNodata`.\n"
   64880             :     "\n"
   64881             :     "Parameters\n"
   64882             :     "----------\n"
   64883             :     "targetBand : Band\n"
   64884             :     "    Band containing values to fill. Will be modified in-place.\n"
   64885             :     "maskBand : Band\n"
   64886             :     "    Mask band with a value of 0 indicating values that should be filled.\n"
   64887             :     "    If not specified, the mask band associated with ``targetBand`` will be used.\n"
   64888             :     "maxSearchDist : float\n"
   64889             :     "    the maximum number of pixels to search in all directions to find values to interpolate from.\n"
   64890             :     "smoothingIterations : int\n"
   64891             :     "    the number of 3x3 smoothing filter passes to run (0 or more)\n"
   64892             :     "options : dict/list, optional\n"
   64893             :     "    A dict or list of name=value options. Available options are\n"
   64894             :     "    described in :cpp:func:`GDALFillNodata`.\n"
   64895             :     "callback : function, optional\n"
   64896             :     "   A progress callback function\n"
   64897             :     "callback_data: optional\n"
   64898             :     "   Optional data to be passed to callback function\n"
   64899             :     "\n"
   64900             :     "Returns\n"
   64901             :     "-------\n"
   64902             :     "int\n"
   64903             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64904             :     "\n"
   64905             :     "Examples\n"
   64906             :     "--------\n"
   64907             :     ">>> import numpy as np\n"
   64908             :     ">>> data = np.array([[1, 2], [9, 9], [9, 9], [3, 4]], dtype=np.float32)\n"
   64909             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 2, 4, eType=gdal.GDT_Float32)\n"
   64910             :     ">>> ds.WriteArray(data)\n"
   64911             :     "0\n"
   64912             :     ">>> mask = data != 9  # replace pixels with value = 9\n"
   64913             :     ">>> mask_ds = gdal.GetDriverByName('MEM').Create('', 2, 4, eType=gdal.GDT_Byte)\n"
   64914             :     ">>> mask_ds.WriteArray(mask)\n"
   64915             :     "0\n"
   64916             :     ">>> gdal.FillNodata(ds.GetRasterBand(1), mask_ds.GetRasterBand(1), 5, 0)\n"
   64917             :     "0\n"
   64918             :     ">>> ds.ReadAsArray()\n"
   64919             :     "array([[1.       , 2.       ],\n"
   64920             :     "       [2.1485982, 2.6666667],\n"
   64921             :     "       [2.721169 , 3.3333333],\n"
   64922             :     "       [3.       , 4.       ]], dtype=float32)\n"
   64923             :     ">>> gdal.FillNodata(ds.GetRasterBand(1), mask_ds.GetRasterBand(1), 5, 0, {'INTERPOLATION':'NEAREST'})\n"
   64924             :     "0\n"
   64925             :     ">>> ds.ReadAsArray()\n"
   64926             :     "array([[1., 2.],\n"
   64927             :     "       [1., 2.],\n"
   64928             :     "       [3., 4.],\n"
   64929             :     "       [3., 4.]], dtype=float32)\n"
   64930             :     "\n"
   64931             :     "\n"
   64932             :     ""},
   64933             :    { "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"},
   64934             :    { "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"},
   64935             :    { "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"},
   64936             :    { "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"},
   64937             :    { "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"},
   64938             :    { "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"},
   64939             :    { "IsLineOfSightVisible", (PyCFunction)(void(*)(void))_wrap_IsLineOfSightVisible, METH_VARARGS|METH_KEYWORDS, "\n"
   64940             :     "IsLineOfSightVisible(Band band, int xA, int yA, double zA, int xB, int yB, double zB, char ** options=None)\n"
   64941             :     "\n"
   64942             :     "\n"
   64943             :     "Check Line of Sight between two points.\n"
   64944             :     "Both input coordinates must be within the raster coordinate bounds.\n"
   64945             :     "\n"
   64946             :     " See :cpp:func:`GDALIsLineOfSightVisible`.\n"
   64947             :     "\n"
   64948             :     ".. versionadded:: 3.9\n"
   64949             :     "\n"
   64950             :     "Parameters\n"
   64951             :     "----------\n"
   64952             :     "band : gdal.RasterBand\n"
   64953             :     "    The band to read the DEM data from. This must NOT be null.\n"
   64954             :     "xA : int\n"
   64955             :     "    The X location (raster column) of the first point to check on the raster.\n"
   64956             :     "yA : int\n"
   64957             :     "    The Y location (raster row) of the first point to check on the raster.\n"
   64958             :     "zA : float\n"
   64959             :     "    The Z location (height) of the first point to check.\n"
   64960             :     "xB : int\n"
   64961             :     "    The X location (raster column) of the second point to check on the raster.\n"
   64962             :     "yB : int\n"
   64963             :     "    The Y location (raster row) of the second point to check on the raster.\n"
   64964             :     "zB : float\n"
   64965             :     "    The Z location (height) of the second point to check.\n"
   64966             :     "options : dict/list, optional\n"
   64967             :     "    A dict or list of name=value of options for the line of sight algorithm (currently ignored).\n"
   64968             :     "\n"
   64969             :     "Returns\n"
   64970             :     "-------\n"
   64971             :     "collections.namedtuple(is_visible: bool, col_intersection: int, row_intersection: int)\n"
   64972             :     "    is_visible is True if the two points are within Line of Sight.\n"
   64973             :     "    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"
   64974             :     "    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"
   64975             :     "\n"
   64976             :     ""},
   64977             :    { "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"},
   64978             :    { "CreatePansharpenedVRT", _wrap_CreatePansharpenedVRT, METH_VARARGS, "CreatePansharpenedVRT(char const * pszXML, Band panchroBand, int nInputSpectralBands) -> Dataset"},
   64979             :    { "GetTranformerOptionList", _wrap_GetTranformerOptionList, METH_NOARGS, "GetTranformerOptionList() -> char const *"},
   64980             :    { "delete_GDALTransformerInfoShadow", _wrap_delete_GDALTransformerInfoShadow, METH_O, "delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow self)"},
   64981             :    { "GDALTransformerInfoShadow_TransformPoint", _wrap_GDALTransformerInfoShadow_TransformPoint, METH_VARARGS, "\n"
   64982             :     "GDALTransformerInfoShadow_TransformPoint(GDALTransformerInfoShadow self, int bDstToSrc, double [3] inout) -> int\n"
   64983             :     "GDALTransformerInfoShadow_TransformPoint(GDALTransformerInfoShadow self, int bDstToSrc, double x, double y, double z=0.0) -> int\n"
   64984             :     ""},
   64985             :    { "GDALTransformerInfoShadow_TransformPoints", _wrap_GDALTransformerInfoShadow_TransformPoints, METH_VARARGS, "GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow self, int bDstToSrc, int nCount) -> int"},
   64986             :    { "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"},
   64987             :    { "GDALTransformerInfoShadow_swigregister", GDALTransformerInfoShadow_swigregister, METH_O, NULL},
   64988             :    { "Transformer", _wrap_Transformer, METH_VARARGS, "Transformer(Dataset src, Dataset dst, char ** options) -> GDALTransformerInfoShadow"},
   64989             :    { "WarpGetOptionList", _wrap_WarpGetOptionList, METH_NOARGS, "WarpGetOptionList() -> char const *"},
   64990             :    { "SuggestedWarpOutputRes_width_get", _wrap_SuggestedWarpOutputRes_width_get, METH_O, "SuggestedWarpOutputRes_width_get(SuggestedWarpOutputRes self) -> int"},
   64991             :    { "SuggestedWarpOutputRes_height_get", _wrap_SuggestedWarpOutputRes_height_get, METH_O, "SuggestedWarpOutputRes_height_get(SuggestedWarpOutputRes self) -> int"},
   64992             :    { "SuggestedWarpOutputRes_xmin_get", _wrap_SuggestedWarpOutputRes_xmin_get, METH_O, "SuggestedWarpOutputRes_xmin_get(SuggestedWarpOutputRes self) -> double"},
   64993             :    { "SuggestedWarpOutputRes_ymin_get", _wrap_SuggestedWarpOutputRes_ymin_get, METH_O, "SuggestedWarpOutputRes_ymin_get(SuggestedWarpOutputRes self) -> double"},
   64994             :    { "SuggestedWarpOutputRes_xmax_get", _wrap_SuggestedWarpOutputRes_xmax_get, METH_O, "SuggestedWarpOutputRes_xmax_get(SuggestedWarpOutputRes self) -> double"},
   64995             :    { "SuggestedWarpOutputRes_ymax_get", _wrap_SuggestedWarpOutputRes_ymax_get, METH_O, "SuggestedWarpOutputRes_ymax_get(SuggestedWarpOutputRes self) -> double"},
   64996             :    { "delete_SuggestedWarpOutputRes", _wrap_delete_SuggestedWarpOutputRes, METH_O, "delete_SuggestedWarpOutputRes(SuggestedWarpOutputRes self)"},
   64997             :    { "SuggestedWarpOutputRes_GetGeotransform", _wrap_SuggestedWarpOutputRes_GetGeotransform, METH_O, "SuggestedWarpOutputRes_GetGeotransform(SuggestedWarpOutputRes self)"},
   64998             :    { "SuggestedWarpOutputRes_swigregister", SuggestedWarpOutputRes_swigregister, METH_O, NULL},
   64999             :    { "SuggestedWarpOutputFromTransformer", _wrap_SuggestedWarpOutputFromTransformer, METH_VARARGS, "SuggestedWarpOutputFromTransformer(Dataset src, GDALTransformerInfoShadow transformer) -> SuggestedWarpOutputRes"},
   65000             :    { "SuggestedWarpOutputFromOptions", _wrap_SuggestedWarpOutputFromOptions, METH_VARARGS, "SuggestedWarpOutputFromOptions(Dataset src, char ** options) -> SuggestedWarpOutputRes"},
   65001             :    { "_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"},
   65002             :    { "GetGlobalAlgorithmRegistry", _wrap_GetGlobalAlgorithmRegistry, METH_NOARGS, "GetGlobalAlgorithmRegistry() -> AlgorithmRegistry"},
   65003             :    { "AlgorithmArgTypeIsList", _wrap_AlgorithmArgTypeIsList, METH_O, "AlgorithmArgTypeIsList(GDALAlgorithmArgType type) -> bool"},
   65004             :    { "AlgorithmArgTypeName", _wrap_AlgorithmArgTypeName, METH_O, "AlgorithmArgTypeName(GDALAlgorithmArgType type) -> char const *"},
   65005             :    { "delete_AlgorithmArg", _wrap_delete_AlgorithmArg, METH_O, "delete_AlgorithmArg(AlgorithmArg self)"},
   65006             :    { "AlgorithmArg_GetName", _wrap_AlgorithmArg_GetName, METH_O, "AlgorithmArg_GetName(AlgorithmArg self) -> char const *"},
   65007             :    { "AlgorithmArg_GetType", _wrap_AlgorithmArg_GetType, METH_O, "AlgorithmArg_GetType(AlgorithmArg self) -> GDALAlgorithmArgType"},
   65008             :    { "AlgorithmArg_GetDescription", _wrap_AlgorithmArg_GetDescription, METH_O, "AlgorithmArg_GetDescription(AlgorithmArg self) -> char const *"},
   65009             :    { "AlgorithmArg_GetShortName", _wrap_AlgorithmArg_GetShortName, METH_O, "AlgorithmArg_GetShortName(AlgorithmArg self) -> char const *"},
   65010             :    { "AlgorithmArg_GetAliases", _wrap_AlgorithmArg_GetAliases, METH_O, "AlgorithmArg_GetAliases(AlgorithmArg self) -> char **"},
   65011             :    { "AlgorithmArg_GetMetaVar", _wrap_AlgorithmArg_GetMetaVar, METH_O, "AlgorithmArg_GetMetaVar(AlgorithmArg self) -> char const *"},
   65012             :    { "AlgorithmArg_GetCategory", _wrap_AlgorithmArg_GetCategory, METH_O, "AlgorithmArg_GetCategory(AlgorithmArg self) -> char const *"},
   65013             :    { "AlgorithmArg_IsPositional", _wrap_AlgorithmArg_IsPositional, METH_O, "AlgorithmArg_IsPositional(AlgorithmArg self) -> bool"},
   65014             :    { "AlgorithmArg_IsRequired", _wrap_AlgorithmArg_IsRequired, METH_O, "AlgorithmArg_IsRequired(AlgorithmArg self) -> bool"},
   65015             :    { "AlgorithmArg_GetMinCount", _wrap_AlgorithmArg_GetMinCount, METH_O, "AlgorithmArg_GetMinCount(AlgorithmArg self) -> int"},
   65016             :    { "AlgorithmArg_GetMaxCount", _wrap_AlgorithmArg_GetMaxCount, METH_O, "AlgorithmArg_GetMaxCount(AlgorithmArg self) -> int"},
   65017             :    { "AlgorithmArg_GetPackedValuesAllowed", _wrap_AlgorithmArg_GetPackedValuesAllowed, METH_O, "AlgorithmArg_GetPackedValuesAllowed(AlgorithmArg self) -> bool"},
   65018             :    { "AlgorithmArg_GetRepeatedArgAllowed", _wrap_AlgorithmArg_GetRepeatedArgAllowed, METH_O, "AlgorithmArg_GetRepeatedArgAllowed(AlgorithmArg self) -> bool"},
   65019             :    { "AlgorithmArg_GetChoices", _wrap_AlgorithmArg_GetChoices, METH_O, "AlgorithmArg_GetChoices(AlgorithmArg self) -> char **"},
   65020             :    { "AlgorithmArg_GetMetadataItem", _wrap_AlgorithmArg_GetMetadataItem, METH_VARARGS, "AlgorithmArg_GetMetadataItem(AlgorithmArg self, char const * item) -> char **"},
   65021             :    { "AlgorithmArg_IsExplicitlySet", _wrap_AlgorithmArg_IsExplicitlySet, METH_O, "AlgorithmArg_IsExplicitlySet(AlgorithmArg self) -> bool"},
   65022             :    { "AlgorithmArg_HasDefaultValue", _wrap_AlgorithmArg_HasDefaultValue, METH_O, "AlgorithmArg_HasDefaultValue(AlgorithmArg self) -> bool"},
   65023             :    { "AlgorithmArg_IsHiddenForCLI", _wrap_AlgorithmArg_IsHiddenForCLI, METH_O, "AlgorithmArg_IsHiddenForCLI(AlgorithmArg self) -> bool"},
   65024             :    { "AlgorithmArg_IsOnlyForCLI", _wrap_AlgorithmArg_IsOnlyForCLI, METH_O, "AlgorithmArg_IsOnlyForCLI(AlgorithmArg self) -> bool"},
   65025             :    { "AlgorithmArg_IsInput", _wrap_AlgorithmArg_IsInput, METH_O, "AlgorithmArg_IsInput(AlgorithmArg self) -> bool"},
   65026             :    { "AlgorithmArg_IsOutput", _wrap_AlgorithmArg_IsOutput, METH_O, "AlgorithmArg_IsOutput(AlgorithmArg self) -> bool"},
   65027             :    { "AlgorithmArg_GetDatasetType", _wrap_AlgorithmArg_GetDatasetType, METH_O, "AlgorithmArg_GetDatasetType(AlgorithmArg self) -> int"},
   65028             :    { "AlgorithmArg_GetDatasetInputFlags", _wrap_AlgorithmArg_GetDatasetInputFlags, METH_O, "AlgorithmArg_GetDatasetInputFlags(AlgorithmArg self) -> int"},
   65029             :    { "AlgorithmArg_GetDatasetOutputFlags", _wrap_AlgorithmArg_GetDatasetOutputFlags, METH_O, "AlgorithmArg_GetDatasetOutputFlags(AlgorithmArg self) -> int"},
   65030             :    { "AlgorithmArg_GetMutualExclusionGroup", _wrap_AlgorithmArg_GetMutualExclusionGroup, METH_O, "AlgorithmArg_GetMutualExclusionGroup(AlgorithmArg self) -> char const *"},
   65031             :    { "AlgorithmArg_GetAsBoolean", _wrap_AlgorithmArg_GetAsBoolean, METH_O, "AlgorithmArg_GetAsBoolean(AlgorithmArg self) -> bool"},
   65032             :    { "AlgorithmArg_GetAsString", _wrap_AlgorithmArg_GetAsString, METH_O, "AlgorithmArg_GetAsString(AlgorithmArg self) -> char const *"},
   65033             :    { "AlgorithmArg_GetAsInteger", _wrap_AlgorithmArg_GetAsInteger, METH_O, "AlgorithmArg_GetAsInteger(AlgorithmArg self) -> int"},
   65034             :    { "AlgorithmArg_GetAsDouble", _wrap_AlgorithmArg_GetAsDouble, METH_O, "AlgorithmArg_GetAsDouble(AlgorithmArg self) -> double"},
   65035             :    { "AlgorithmArg_GetAsDatasetValue", _wrap_AlgorithmArg_GetAsDatasetValue, METH_O, "AlgorithmArg_GetAsDatasetValue(AlgorithmArg self) -> ArgDatasetValue"},
   65036             :    { "AlgorithmArg_GetAsStringList", _wrap_AlgorithmArg_GetAsStringList, METH_O, "AlgorithmArg_GetAsStringList(AlgorithmArg self) -> char **"},
   65037             :    { "AlgorithmArg_GetAsIntegerList", _wrap_AlgorithmArg_GetAsIntegerList, METH_O, "AlgorithmArg_GetAsIntegerList(AlgorithmArg self)"},
   65038             :    { "AlgorithmArg_GetAsDoubleList", _wrap_AlgorithmArg_GetAsDoubleList, METH_O, "AlgorithmArg_GetAsDoubleList(AlgorithmArg self)"},
   65039             :    { "AlgorithmArg_SetAsBoolean", _wrap_AlgorithmArg_SetAsBoolean, METH_VARARGS, "AlgorithmArg_SetAsBoolean(AlgorithmArg self, bool value) -> bool"},
   65040             :    { "AlgorithmArg_SetAsString", _wrap_AlgorithmArg_SetAsString, METH_VARARGS, "AlgorithmArg_SetAsString(AlgorithmArg self, char const * value) -> bool"},
   65041             :    { "AlgorithmArg_SetAsInteger", _wrap_AlgorithmArg_SetAsInteger, METH_VARARGS, "AlgorithmArg_SetAsInteger(AlgorithmArg self, int value) -> bool"},
   65042             :    { "AlgorithmArg_SetAsDouble", _wrap_AlgorithmArg_SetAsDouble, METH_VARARGS, "AlgorithmArg_SetAsDouble(AlgorithmArg self, double value) -> bool"},
   65043             :    { "AlgorithmArg_SetAsDatasetValue", _wrap_AlgorithmArg_SetAsDatasetValue, METH_VARARGS, "AlgorithmArg_SetAsDatasetValue(AlgorithmArg self, ArgDatasetValue value) -> bool"},
   65044             :    { "AlgorithmArg_SetAsStringList", _wrap_AlgorithmArg_SetAsStringList, METH_VARARGS, "AlgorithmArg_SetAsStringList(AlgorithmArg self, char ** value) -> bool"},
   65045             :    { "AlgorithmArg_SetAsIntegerList", _wrap_AlgorithmArg_SetAsIntegerList, METH_VARARGS, "AlgorithmArg_SetAsIntegerList(AlgorithmArg self, int nList) -> bool"},
   65046             :    { "AlgorithmArg_SetAsDoubleList", _wrap_AlgorithmArg_SetAsDoubleList, METH_VARARGS, "AlgorithmArg_SetAsDoubleList(AlgorithmArg self, int nList) -> bool"},
   65047             :    { "AlgorithmArg_SetDataset", _wrap_AlgorithmArg_SetDataset, METH_VARARGS, "AlgorithmArg_SetDataset(AlgorithmArg self, Dataset ds) -> bool"},
   65048             :    { "AlgorithmArg_SetDatasets", _wrap_AlgorithmArg_SetDatasets, METH_VARARGS, "AlgorithmArg_SetDatasets(AlgorithmArg self, int object_list_count) -> bool"},
   65049             :    { "AlgorithmArg_SetDatasetNames", _wrap_AlgorithmArg_SetDatasetNames, METH_VARARGS, "AlgorithmArg_SetDatasetNames(AlgorithmArg self, char ** names) -> bool"},
   65050             :    { "AlgorithmArg_swigregister", AlgorithmArg_swigregister, METH_O, NULL},
   65051             :    { "delete_Algorithm", _wrap_delete_Algorithm, METH_O, "delete_Algorithm(Algorithm self)"},
   65052             :    { "Algorithm_GetName", _wrap_Algorithm_GetName, METH_O, "Algorithm_GetName(Algorithm self) -> char const *"},
   65053             :    { "Algorithm_GetDescription", _wrap_Algorithm_GetDescription, METH_O, "Algorithm_GetDescription(Algorithm self) -> char const *"},
   65054             :    { "Algorithm_GetLongDescription", _wrap_Algorithm_GetLongDescription, METH_O, "Algorithm_GetLongDescription(Algorithm self) -> char const *"},
   65055             :    { "Algorithm_GetHelpFullURL", _wrap_Algorithm_GetHelpFullURL, METH_O, "Algorithm_GetHelpFullURL(Algorithm self) -> char const *"},
   65056             :    { "Algorithm_HasSubAlgorithms", _wrap_Algorithm_HasSubAlgorithms, METH_O, "Algorithm_HasSubAlgorithms(Algorithm self) -> bool"},
   65057             :    { "Algorithm_GetSubAlgorithmNames", _wrap_Algorithm_GetSubAlgorithmNames, METH_O, "Algorithm_GetSubAlgorithmNames(Algorithm self) -> char **"},
   65058             :    { "Algorithm_InstantiateSubAlgorithm", _wrap_Algorithm_InstantiateSubAlgorithm, METH_VARARGS, "Algorithm_InstantiateSubAlgorithm(Algorithm self, char const * algName) -> Algorithm"},
   65059             :    { "Algorithm_ParseCommandLineArguments", _wrap_Algorithm_ParseCommandLineArguments, METH_VARARGS, "Algorithm_ParseCommandLineArguments(Algorithm self, char ** args) -> bool"},
   65060             :    { "Algorithm_GetActualAlgorithm", _wrap_Algorithm_GetActualAlgorithm, METH_O, "Algorithm_GetActualAlgorithm(Algorithm self) -> Algorithm"},
   65061             :    { "Algorithm_Run", _wrap_Algorithm_Run, METH_VARARGS, "Algorithm_Run(Algorithm self, GDALProgressFunc callback=0, void * callback_data=None) -> bool"},
   65062             :    { "Algorithm_Finalize", _wrap_Algorithm_Finalize, METH_O, "Algorithm_Finalize(Algorithm self) -> bool"},
   65063             :    { "Algorithm_ParseRunAndFinalize", _wrap_Algorithm_ParseRunAndFinalize, METH_VARARGS, "Algorithm_ParseRunAndFinalize(Algorithm self, char ** args, GDALProgressFunc callback=0, void * callback_data=None) -> bool"},
   65064             :    { "Algorithm_GetUsageAsJSON", _wrap_Algorithm_GetUsageAsJSON, METH_O, "Algorithm_GetUsageAsJSON(Algorithm self) -> retStringAndCPLFree *"},
   65065             :    { "Algorithm_GetArgNames", _wrap_Algorithm_GetArgNames, METH_O, "Algorithm_GetArgNames(Algorithm self) -> char **"},
   65066             :    { "Algorithm_GetArg", _wrap_Algorithm_GetArg, METH_VARARGS, "Algorithm_GetArg(Algorithm self, char const * argName) -> AlgorithmArg"},
   65067             :    { "Algorithm_swigregister", Algorithm_swigregister, METH_O, NULL},
   65068             :    { "delete_AlgorithmRegistry", _wrap_delete_AlgorithmRegistry, METH_O, "delete_AlgorithmRegistry(AlgorithmRegistry self)"},
   65069             :    { "AlgorithmRegistry_GetAlgNames", _wrap_AlgorithmRegistry_GetAlgNames, METH_O, "AlgorithmRegistry_GetAlgNames(AlgorithmRegistry self) -> char **"},
   65070             :    { "AlgorithmRegistry_InstantiateAlg", _wrap_AlgorithmRegistry_InstantiateAlg, METH_VARARGS, "AlgorithmRegistry_InstantiateAlg(AlgorithmRegistry self, char const * algName) -> Algorithm"},
   65071             :    { "AlgorithmRegistry_swigregister", AlgorithmRegistry_swigregister, METH_O, NULL},
   65072             :    { "delete_ArgDatasetValue", _wrap_delete_ArgDatasetValue, METH_O, "delete_ArgDatasetValue(ArgDatasetValue self)"},
   65073             :    { "ArgDatasetValue_GetName", _wrap_ArgDatasetValue_GetName, METH_O, "ArgDatasetValue_GetName(ArgDatasetValue self) -> char const *"},
   65074             :    { "ArgDatasetValue_GetDataset", _wrap_ArgDatasetValue_GetDataset, METH_O, "ArgDatasetValue_GetDataset(ArgDatasetValue self) -> Dataset"},
   65075             :    { "ArgDatasetValue_SetName", _wrap_ArgDatasetValue_SetName, METH_VARARGS, "ArgDatasetValue_SetName(ArgDatasetValue self, char const * name)"},
   65076             :    { "ArgDatasetValue_SetDataset", _wrap_ArgDatasetValue_SetDataset, METH_VARARGS, "ArgDatasetValue_SetDataset(ArgDatasetValue self, Dataset ds)"},
   65077             :    { "ArgDatasetValue_swigregister", ArgDatasetValue_swigregister, METH_O, NULL},
   65078             :    { "ApplyGeoTransform", _wrap_ApplyGeoTransform, METH_VARARGS, "\n"
   65079             :     "ApplyGeoTransform(double [6] padfGeoTransform, double dfPixel, double dfLine)\n"
   65080             :     "\n"
   65081             :     "\n"
   65082             :     "Apply a geotransform to convert a (col, row) location\n"
   65083             :     "into a georeferenced (x, y) coordinate. To perform the\n"
   65084             :     "inverse transformation, see :py:func:`InvGeoTransform`.\n"
   65085             :     "\n"
   65086             :     "See :cpp:func:`ApplyGeoTransform`.\n"
   65087             :     "\n"
   65088             :     "Parameters\n"
   65089             :     "----------\n"
   65090             :     "gt : tuple\n"
   65091             :     "   Geotransform array, as described in :ref:`geotransforms_tut`.\n"
   65092             :     "dfPixel : float\n"
   65093             :     "   (Fractional) column in image coordinates (0.0 at the left edge of the image)\n"
   65094             :     "dfLine : float\n"
   65095             :     "   (Fractional) row in image coordinates (0.0 at the top of the image)\n"
   65096             :     "\n"
   65097             :     "Returns\n"
   65098             :     "-------\n"
   65099             :     "List\n"
   65100             :     "   x, y values corresponding to the input location\n"
   65101             :     "\n"
   65102             :     "Examples\n"
   65103             :     "--------\n"
   65104             :     ">>> ds = gdal.Open('byte.tif')\n"
   65105             :     ">>> gt = ds.GetGeoTransform()\n"
   65106             :     ">>> gdal.ApplyGeoTransform(gt, 5, 7)\n"
   65107             :     "[441020.0, 3750900.0]\n"
   65108             :     "\n"
   65109             :     "\n"
   65110             :     ""},
   65111             :    { "InvGeoTransform", _wrap_InvGeoTransform, METH_O, "\n"
   65112             :     "InvGeoTransform(double [6] gt_in) -> RETURN_NONE\n"
   65113             :     "\n"
   65114             :     "\n"
   65115             :     "Invert a geotransform array so that it represents a conversion\n"
   65116             :     "from georeferenced (x, y) coordinates to image (col, row) coordinates.\n"
   65117             :     "\n"
   65118             :     "Parameters\n"
   65119             :     "----------\n"
   65120             :     "gt : tuple\n"
   65121             :     "   Geotransform array, as described in :ref:`geotransforms_tut`.\n"
   65122             :     "\n"
   65123             :     "Returns\n"
   65124             :     "-------\n"
   65125             :     "tuple\n"
   65126             :     "   Geotransform array representing the inverse transformation\n"
   65127             :     "\n"
   65128             :     "Examples\n"
   65129             :     "--------\n"
   65130             :     ">>> ds = gdal.Open('byte.tif')\n"
   65131             :     ">>> inv_gt = gdal.InvGeoTransform(ds.GetGeoTransform())\n"
   65132             :     ">>> inv_gt\n"
   65133             :     "(-7345.333333333333, 0.016666666666666666, 0.0, 62522.0, 0.0, -0.016666666666666666)\n"
   65134             :     ">>> gdal.ApplyGeoTransform(inv_gt, 441020, 3750900)\n"
   65135             :     "[5.0, 7.0]\n"
   65136             :     "\n"
   65137             :     "\n"
   65138             :     ""},
   65139             :    { "ApplyHomography", _wrap_ApplyHomography, METH_VARARGS, "ApplyHomography(double [9] padfHomography, double dfPixel, double dfLine) -> int"},
   65140             :    { "InvHomography", _wrap_InvHomography, METH_O, "InvHomography(double [9] h_in) -> RETURN_NONE"},
   65141             :    { "VersionInfo", _wrap_VersionInfo, METH_VARARGS, "VersionInfo(char const * request=\"VERSION_NUM\") -> char const *"},
   65142             :    { "AllRegister", _wrap_AllRegister, METH_NOARGS, "\n"
   65143             :     "AllRegister()\n"
   65144             :     "\n"
   65145             :     "\n"
   65146             :     "Register all known configured GDAL drivers.\n"
   65147             :     "Automatically called when the :py:mod:`gdal` module is loaded.\n"
   65148             :     "Does not need to be called in user code unless a driver was\n"
   65149             :     "deregistered and needs to be re-registered.\n"
   65150             :     "See :cpp:func:`GDALAllRegister`.\n"
   65151             :     "\n"
   65152             :     "See Also\n"
   65153             :     "--------\n"
   65154             :     ":py:func:`Driver.Register`\n"
   65155             :     "\n"
   65156             :     ""},
   65157             :    { "GDALDestroyDriverManager", _wrap_GDALDestroyDriverManager, METH_NOARGS, "GDALDestroyDriverManager()"},
   65158             :    { "GetCacheMax", _wrap_GetCacheMax, METH_NOARGS, "\n"
   65159             :     "GetCacheMax() -> GIntBig\n"
   65160             :     "\n"
   65161             :     "\n"
   65162             :     "Get the maximum size of the block cache.\n"
   65163             :     "See :cpp:func:`GDALGetCacheMax`.\n"
   65164             :     "\n"
   65165             :     "Returns\n"
   65166             :     "-------\n"
   65167             :     "int\n"
   65168             :     "    maximum cache size in bytes\n"
   65169             :     "\n"
   65170             :     ""},
   65171             :    { "GetCacheUsed", _wrap_GetCacheUsed, METH_NOARGS, "\n"
   65172             :     "GetCacheUsed() -> GIntBig\n"
   65173             :     "\n"
   65174             :     "\n"
   65175             :     "Get the number of bytes in used by the block cache.\n"
   65176             :     "See :cpp:func:`GDALGetCacheUsed`.\n"
   65177             :     "\n"
   65178             :     "Returns\n"
   65179             :     "-------\n"
   65180             :     "int\n"
   65181             :     "    cache size in bytes\n"
   65182             :     "\n"
   65183             :     ""},
   65184             :    { "SetCacheMax", _wrap_SetCacheMax, METH_O, "\n"
   65185             :     "SetCacheMax(GIntBig nBytes)\n"
   65186             :     "\n"
   65187             :     "\n"
   65188             :     "Set the maximum size of the block cache.\n"
   65189             :     "See :cpp:func:`GDALSetCacheMax`.\n"
   65190             :     "\n"
   65191             :     "Parameters\n"
   65192             :     "----------\n"
   65193             :     "nBytes: int\n"
   65194             :     "    Cache size in bytes\n"
   65195             :     "\n"
   65196             :     "See Also\n"
   65197             :     "--------\n"
   65198             :     ":config:`GDAL_CACHEMAX`\n"
   65199             :     "\n"
   65200             :     ""},
   65201             :    { "GetDataTypeSize", _wrap_GetDataTypeSize, METH_O, "\n"
   65202             :     "GetDataTypeSize(GDALDataType eDataType) -> int\n"
   65203             :     "\n"
   65204             :     "\n"
   65205             :     "Return the size of the data type in bits.\n"
   65206             :     "\n"
   65207             :     "Parameters\n"
   65208             :     "----------\n"
   65209             :     "eDataType : int\n"
   65210             :     "    data type code\n"
   65211             :     "\n"
   65212             :     "Returns\n"
   65213             :     "-------\n"
   65214             :     "int\n"
   65215             :     "\n"
   65216             :     "Examples\n"
   65217             :     "--------\n"
   65218             :     ">>> gdal.GetDataTypeSize(gdal.GDT_Byte)\n"
   65219             :     "8\n"
   65220             :     ">>> gdal.GetDataTypeSize(gdal.GDT_Int32)\n"
   65221             :     "32\n"
   65222             :     "\n"
   65223             :     ""},
   65224             :    { "DataTypeIsComplex", _wrap_DataTypeIsComplex, METH_O, "DataTypeIsComplex(GDALDataType eDataType) -> int"},
   65225             :    { "GetDataTypeName", _wrap_GetDataTypeName, METH_O, "\n"
   65226             :     "GetDataTypeName(GDALDataType eDataType) -> char const *\n"
   65227             :     "\n"
   65228             :     "\n"
   65229             :     "Return the name of the data type.\n"
   65230             :     "\n"
   65231             :     "Parameters\n"
   65232             :     "----------\n"
   65233             :     "eDataType : int\n"
   65234             :     "    data type code\n"
   65235             :     "\n"
   65236             :     "Returns\n"
   65237             :     "-------\n"
   65238             :     "str\n"
   65239             :     "\n"
   65240             :     "Examples\n"
   65241             :     "--------\n"
   65242             :     ">>> gdal.GetDataTypeName(gdal.GDT_Int16)\n"
   65243             :     "'Int16'\n"
   65244             :     ">>> gdal.GetDataTypeName(gdal.GDT_Float64)\n"
   65245             :     "'Float64'\n"
   65246             :     "\n"
   65247             :     ""},
   65248             :    { "GetDataTypeByName", _wrap_GetDataTypeByName, METH_O, "\n"
   65249             :     "GetDataTypeByName(char const * pszDataTypeName) -> GDALDataType\n"
   65250             :     "\n"
   65251             :     "\n"
   65252             :     "Return the data type for a given name.\n"
   65253             :     "\n"
   65254             :     "Parameters\n"
   65255             :     "----------\n"
   65256             :     "pszDataTypeName : str\n"
   65257             :     "    data type name\n"
   65258             :     "\n"
   65259             :     "Returns\n"
   65260             :     "-------\n"
   65261             :     "int\n"
   65262             :     "    data type code\n"
   65263             :     "\n"
   65264             :     "Examples\n"
   65265             :     "--------\n"
   65266             :     ">>> gdal.GetDataTypeByName('Int16') == gdal.GDT_Int16\n"
   65267             :     "True\n"
   65268             :     "\n"
   65269             :     "\n"
   65270             :     ""},
   65271             :    { "DataTypeUnion", _wrap_DataTypeUnion, METH_VARARGS, "DataTypeUnion(GDALDataType a, GDALDataType b) -> GDALDataType"},
   65272             :    { "GetColorInterpretationName", _wrap_GetColorInterpretationName, METH_O, "GetColorInterpretationName(GDALColorInterp eColorInterp) -> char const *"},
   65273             :    { "GetColorInterpretationByName", _wrap_GetColorInterpretationByName, METH_O, "GetColorInterpretationByName(char const * pszColorInterpName) -> GDALColorInterp"},
   65274             :    { "GetPaletteInterpretationName", _wrap_GetPaletteInterpretationName, METH_O, "GetPaletteInterpretationName(GDALPaletteInterp ePaletteInterp) -> char const *"},
   65275             :    { "DecToDMS", _wrap_DecToDMS, METH_VARARGS, "DecToDMS(double arg1, char const * arg2, int arg3=2) -> char const *"},
   65276             :    { "PackedDMSToDec", _wrap_PackedDMSToDec, METH_O, "PackedDMSToDec(double dfPacked) -> double"},
   65277             :    { "DecToPackedDMS", _wrap_DecToPackedDMS, METH_O, "DecToPackedDMS(double dfDec) -> double"},
   65278             :    { "ParseXMLString", _wrap_ParseXMLString, METH_O, "ParseXMLString(char * pszXMLString) -> CPLXMLNode *"},
   65279             :    { "SerializeXMLTree", _wrap_SerializeXMLTree, METH_O, "SerializeXMLTree(CPLXMLNode * xmlnode) -> retStringAndCPLFree *"},
   65280             :    { "GetJPEG2000Structure", _wrap_GetJPEG2000Structure, METH_VARARGS, "GetJPEG2000Structure(char const * pszFilename, char ** options=None) -> CPLXMLNode *"},
   65281             :    { "GetJPEG2000StructureAsString", _wrap_GetJPEG2000StructureAsString, METH_VARARGS, "GetJPEG2000StructureAsString(char const * pszFilename, char ** options=None) -> retStringAndCPLFree *"},
   65282             :    { "HasTriangulation", _wrap_HasTriangulation, METH_NOARGS, "HasTriangulation() -> int"},
   65283             :    { "GetDriverCount", _wrap_GetDriverCount, METH_NOARGS, "\n"
   65284             :     "GetDriverCount() -> int\n"
   65285             :     "\n"
   65286             :     "\n"
   65287             :     "Return the number of registered drivers.\n"
   65288             :     "See :cpp:func:`GDALGetDriverCount`.\n"
   65289             :     "\n"
   65290             :     "Examples\n"
   65291             :     "--------\n"
   65292             :     ">>> gdal.GetDriverCount()\n"
   65293             :     "227\n"
   65294             :     ">>> gdal.GetDriverByName('ESRI Shapefile').Deregister()\n"
   65295             :     ">>> gdal.GetDriverCount()\n"
   65296             :     "226\n"
   65297             :     "\n"
   65298             :     "\n"
   65299             :     ""},
   65300             :    { "GetDriverByName", _wrap_GetDriverByName, METH_O, "GetDriverByName(char const * name) -> Driver"},
   65301             :    { "GetDriver", _wrap_GetDriver, METH_O, "GetDriver(int i) -> Driver"},
   65302             :    { "Open", _wrap_Open, METH_VARARGS, "\n"
   65303             :     "Open(char const * utf8_path, GDALAccess eAccess=GA_ReadOnly) -> Dataset\n"
   65304             :     "\n"
   65305             :     "\n"
   65306             :     "Opens a raster file as a :py:class:`Dataset` using default options.\n"
   65307             :     "See :cpp:func:`GDALOpen`.\n"
   65308             :     "For more control over how the file is opened, use :py:func:`OpenEx`.\n"
   65309             :     "\n"
   65310             :     "Parameters\n"
   65311             :     "----------\n"
   65312             :     "utf8_path : str\n"
   65313             :     "    name of the file to open\n"
   65314             :     "eAccess : int, default = :py:const:`gdal.GA_ReadOnly`\n"
   65315             :     "\n"
   65316             :     "Returns\n"
   65317             :     "-------\n"
   65318             :     "Dataset, or ``None`` on failure\n"
   65319             :     "\n"
   65320             :     "See Also\n"
   65321             :     "--------\n"
   65322             :     ":py:func:`OpenEx`\n"
   65323             :     ":py:func:`OpenShared`\n"
   65324             :     "\n"
   65325             :     "\n"
   65326             :     ""},
   65327             :    { "OpenEx", (PyCFunction)(void(*)(void))_wrap_OpenEx, METH_VARARGS|METH_KEYWORDS, "\n"
   65328             :     "OpenEx(char const * utf8_path, unsigned int nOpenFlags=0, char ** allowed_drivers=None, char ** open_options=None, char ** sibling_files=None) -> Dataset\n"
   65329             :     "\n"
   65330             :     "\n"
   65331             :     "Open a raster or vector file as a :py:class:`Dataset`.\n"
   65332             :     "See :cpp:func:`GDALOpenEx`.\n"
   65333             :     "\n"
   65334             :     "Parameters\n"
   65335             :     "----------\n"
   65336             :     "utf8_path : str\n"
   65337             :     "    name of the file to open\n"
   65338             :     "flags : int\n"
   65339             :     "        Flags controlling how the Dataset is opened. Multiple ``gdal.OF_XXX`` flags\n"
   65340             :     "        may be combined using the ``|`` operator. See :cpp:func:`GDALOpenEx`.\n"
   65341             :     "allowed_drivers : list, optional\n"
   65342             :     "        A list of the names of drivers that may attempt to open the dataset.\n"
   65343             :     "open_options : dict/list, optional\n"
   65344             :     "        A dict or list of name=value driver-specific opening options.\n"
   65345             :     "sibling_files: list, optional\n"
   65346             :     "        A list of filenames that are auxiliary to the main filename\n"
   65347             :     "\n"
   65348             :     "Returns\n"
   65349             :     "-------\n"
   65350             :     "Dataset, or ``None`` on failure.\n"
   65351             :     "\n"
   65352             :     "See Also\n"
   65353             :     "--------\n"
   65354             :     ":py:func:`Open`\n"
   65355             :     ":py:func:`OpenShared`\n"
   65356             :     "\n"
   65357             :     "\n"
   65358             :     ""},
   65359             :    { "OpenShared", _wrap_OpenShared, METH_VARARGS, "\n"
   65360             :     "OpenShared(char const * utf8_path, GDALAccess eAccess=GA_ReadOnly) -> Dataset\n"
   65361             :     "\n"
   65362             :     "\n"
   65363             :     "Open a raster file as a :py:class:`Dataset`. If the file has already been\n"
   65364             :     "opened in the current thread, return a reference to the already-opened\n"
   65365             :     ":py:class:`Dataset`.  See :cpp:func:`GDALOpenShared`.\n"
   65366             :     "\n"
   65367             :     "Parameters\n"
   65368             :     "----------\n"
   65369             :     "utf8_path : str\n"
   65370             :     "    name of the file to open\n"
   65371             :     "eAccess : int, default = :py:const:`gdal.GA_ReadOnly`\n"
   65372             :     "\n"
   65373             :     "Returns\n"
   65374             :     "-------\n"
   65375             :     "Dataset, or ``None`` on failure\n"
   65376             :     "\n"
   65377             :     "See Also\n"
   65378             :     "--------\n"
   65379             :     ":py:func:`Open`\n"
   65380             :     ":py:func:`OpenEx`\n"
   65381             :     "\n"
   65382             :     "\n"
   65383             :     ""},
   65384             :    { "IdentifyDriver", _wrap_IdentifyDriver, METH_VARARGS, "IdentifyDriver(char const * utf8_path, char ** papszSiblings=None) -> Driver"},
   65385             :    { "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"},
   65386             :    { "GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, "GeneralCmdLineProcessor(char ** papszArgv, int nOptions=0) -> char **"},
   65387             :    { "new_GDALInfoOptions", _wrap_new_GDALInfoOptions, METH_O, "new_GDALInfoOptions(char ** options) -> GDALInfoOptions"},
   65388             :    { "delete_GDALInfoOptions", _wrap_delete_GDALInfoOptions, METH_O, "delete_GDALInfoOptions(GDALInfoOptions self)"},
   65389             :    { "GDALInfoOptions_swigregister", GDALInfoOptions_swigregister, METH_O, NULL},
   65390             :    { "GDALInfoOptions_swiginit", GDALInfoOptions_swiginit, METH_VARARGS, NULL},
   65391             :    { "InfoInternal", _wrap_InfoInternal, METH_VARARGS, "InfoInternal(Dataset hDataset, GDALInfoOptions infoOptions) -> retStringAndCPLFree *"},
   65392             :    { "new_GDALVectorInfoOptions", _wrap_new_GDALVectorInfoOptions, METH_O, "new_GDALVectorInfoOptions(char ** options) -> GDALVectorInfoOptions"},
   65393             :    { "delete_GDALVectorInfoOptions", _wrap_delete_GDALVectorInfoOptions, METH_O, "delete_GDALVectorInfoOptions(GDALVectorInfoOptions self)"},
   65394             :    { "GDALVectorInfoOptions_swigregister", GDALVectorInfoOptions_swigregister, METH_O, NULL},
   65395             :    { "GDALVectorInfoOptions_swiginit", GDALVectorInfoOptions_swiginit, METH_VARARGS, NULL},
   65396             :    { "VectorInfoInternal", _wrap_VectorInfoInternal, METH_VARARGS, "VectorInfoInternal(Dataset hDataset, GDALVectorInfoOptions infoOptions) -> retStringAndCPLFree *"},
   65397             :    { "new_GDALMultiDimInfoOptions", _wrap_new_GDALMultiDimInfoOptions, METH_O, "new_GDALMultiDimInfoOptions(char ** options) -> GDALMultiDimInfoOptions"},
   65398             :    { "delete_GDALMultiDimInfoOptions", _wrap_delete_GDALMultiDimInfoOptions, METH_O, "delete_GDALMultiDimInfoOptions(GDALMultiDimInfoOptions self)"},
   65399             :    { "GDALMultiDimInfoOptions_swigregister", GDALMultiDimInfoOptions_swigregister, METH_O, NULL},
   65400             :    { "GDALMultiDimInfoOptions_swiginit", GDALMultiDimInfoOptions_swiginit, METH_VARARGS, NULL},
   65401             :    { "MultiDimInfoInternal", _wrap_MultiDimInfoInternal, METH_VARARGS, "MultiDimInfoInternal(Dataset hDataset, GDALMultiDimInfoOptions infoOptions) -> retStringAndCPLFree *"},
   65402             :    { "new_GDALTranslateOptions", _wrap_new_GDALTranslateOptions, METH_O, "new_GDALTranslateOptions(char ** options) -> GDALTranslateOptions"},
   65403             :    { "delete_GDALTranslateOptions", _wrap_delete_GDALTranslateOptions, METH_O, "delete_GDALTranslateOptions(GDALTranslateOptions self)"},
   65404             :    { "GDALTranslateOptions_swigregister", GDALTranslateOptions_swigregister, METH_O, NULL},
   65405             :    { "GDALTranslateOptions_swiginit", GDALTranslateOptions_swiginit, METH_VARARGS, NULL},
   65406             :    { "TranslateInternal", _wrap_TranslateInternal, METH_VARARGS, "TranslateInternal(char const * dest, Dataset dataset, GDALTranslateOptions translateOptions, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   65407             :    { "new_GDALWarpAppOptions", _wrap_new_GDALWarpAppOptions, METH_O, "new_GDALWarpAppOptions(char ** options) -> GDALWarpAppOptions"},
   65408             :    { "delete_GDALWarpAppOptions", _wrap_delete_GDALWarpAppOptions, METH_O, "delete_GDALWarpAppOptions(GDALWarpAppOptions self)"},
   65409             :    { "GDALWarpAppOptions_swigregister", GDALWarpAppOptions_swigregister, METH_O, NULL},
   65410             :    { "GDALWarpAppOptions_swiginit", GDALWarpAppOptions_swiginit, METH_VARARGS, NULL},
   65411             :    { "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"},
   65412             :    { "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"},
   65413             :    { "new_GDALVectorTranslateOptions", _wrap_new_GDALVectorTranslateOptions, METH_O, "new_GDALVectorTranslateOptions(char ** options) -> GDALVectorTranslateOptions"},
   65414             :    { "delete_GDALVectorTranslateOptions", _wrap_delete_GDALVectorTranslateOptions, METH_O, "delete_GDALVectorTranslateOptions(GDALVectorTranslateOptions self)"},
   65415             :    { "GDALVectorTranslateOptions_swigregister", GDALVectorTranslateOptions_swigregister, METH_O, NULL},
   65416             :    { "GDALVectorTranslateOptions_swiginit", GDALVectorTranslateOptions_swiginit, METH_VARARGS, NULL},
   65417             :    { "wrapper_GDALVectorTranslateDestDS", _wrap_wrapper_GDALVectorTranslateDestDS, METH_VARARGS, "wrapper_GDALVectorTranslateDestDS(Dataset dstDS, Dataset srcDS, GDALVectorTranslateOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   65418             :    { "wrapper_GDALVectorTranslateDestName", _wrap_wrapper_GDALVectorTranslateDestName, METH_VARARGS, "wrapper_GDALVectorTranslateDestName(char const * dest, Dataset srcDS, GDALVectorTranslateOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   65419             :    { "new_GDALDEMProcessingOptions", _wrap_new_GDALDEMProcessingOptions, METH_O, "new_GDALDEMProcessingOptions(char ** options) -> GDALDEMProcessingOptions"},
   65420             :    { "delete_GDALDEMProcessingOptions", _wrap_delete_GDALDEMProcessingOptions, METH_O, "delete_GDALDEMProcessingOptions(GDALDEMProcessingOptions self)"},
   65421             :    { "GDALDEMProcessingOptions_swigregister", GDALDEMProcessingOptions_swigregister, METH_O, NULL},
   65422             :    { "GDALDEMProcessingOptions_swiginit", GDALDEMProcessingOptions_swiginit, METH_VARARGS, NULL},
   65423             :    { "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"},
   65424             :    { "new_GDALNearblackOptions", _wrap_new_GDALNearblackOptions, METH_O, "new_GDALNearblackOptions(char ** options) -> GDALNearblackOptions"},
   65425             :    { "delete_GDALNearblackOptions", _wrap_delete_GDALNearblackOptions, METH_O, "delete_GDALNearblackOptions(GDALNearblackOptions self)"},
   65426             :    { "GDALNearblackOptions_swigregister", GDALNearblackOptions_swigregister, METH_O, NULL},
   65427             :    { "GDALNearblackOptions_swiginit", GDALNearblackOptions_swiginit, METH_VARARGS, NULL},
   65428             :    { "wrapper_GDALNearblackDestDS", _wrap_wrapper_GDALNearblackDestDS, METH_VARARGS, "wrapper_GDALNearblackDestDS(Dataset dstDS, Dataset srcDS, GDALNearblackOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   65429             :    { "wrapper_GDALNearblackDestName", _wrap_wrapper_GDALNearblackDestName, METH_VARARGS, "wrapper_GDALNearblackDestName(char const * dest, Dataset srcDS, GDALNearblackOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   65430             :    { "new_GDALGridOptions", _wrap_new_GDALGridOptions, METH_O, "new_GDALGridOptions(char ** options) -> GDALGridOptions"},
   65431             :    { "delete_GDALGridOptions", _wrap_delete_GDALGridOptions, METH_O, "delete_GDALGridOptions(GDALGridOptions self)"},
   65432             :    { "GDALGridOptions_swigregister", GDALGridOptions_swigregister, METH_O, NULL},
   65433             :    { "GDALGridOptions_swiginit", GDALGridOptions_swiginit, METH_VARARGS, NULL},
   65434             :    { "GridInternal", _wrap_GridInternal, METH_VARARGS, "GridInternal(char const * dest, Dataset dataset, GDALGridOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   65435             :    { "new_GDALContourOptions", _wrap_new_GDALContourOptions, METH_O, "new_GDALContourOptions(char ** options) -> GDALContourOptions"},
   65436             :    { "delete_GDALContourOptions", _wrap_delete_GDALContourOptions, METH_O, "delete_GDALContourOptions(GDALContourOptions self)"},
   65437             :    { "GDALContourOptions_swigregister", GDALContourOptions_swigregister, METH_O, NULL},
   65438             :    { "GDALContourOptions_swiginit", GDALContourOptions_swiginit, METH_VARARGS, NULL},
   65439             :    { "wrapper_GDALContourDestDS", _wrap_wrapper_GDALContourDestDS, METH_VARARGS, "wrapper_GDALContourDestDS(Dataset dstDS, Dataset srcDS, GDALContourOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   65440             :    { "wrapper_GDALContourDestName", _wrap_wrapper_GDALContourDestName, METH_VARARGS, "wrapper_GDALContourDestName(char const * dest, Dataset srcDS, GDALContourOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   65441             :    { "new_GDALRasterizeOptions", _wrap_new_GDALRasterizeOptions, METH_O, "new_GDALRasterizeOptions(char ** options) -> GDALRasterizeOptions"},
   65442             :    { "delete_GDALRasterizeOptions", _wrap_delete_GDALRasterizeOptions, METH_O, "delete_GDALRasterizeOptions(GDALRasterizeOptions self)"},
   65443             :    { "GDALRasterizeOptions_swigregister", GDALRasterizeOptions_swigregister, METH_O, NULL},
   65444             :    { "GDALRasterizeOptions_swiginit", GDALRasterizeOptions_swiginit, METH_VARARGS, NULL},
   65445             :    { "wrapper_GDALRasterizeDestDS", _wrap_wrapper_GDALRasterizeDestDS, METH_VARARGS, "wrapper_GDALRasterizeDestDS(Dataset dstDS, Dataset srcDS, GDALRasterizeOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   65446             :    { "wrapper_GDALRasterizeDestName", _wrap_wrapper_GDALRasterizeDestName, METH_VARARGS, "wrapper_GDALRasterizeDestName(char const * dest, Dataset srcDS, GDALRasterizeOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   65447             :    { "new_GDALFootprintOptions", _wrap_new_GDALFootprintOptions, METH_O, "new_GDALFootprintOptions(char ** options) -> GDALFootprintOptions"},
   65448             :    { "delete_GDALFootprintOptions", _wrap_delete_GDALFootprintOptions, METH_O, "delete_GDALFootprintOptions(GDALFootprintOptions self)"},
   65449             :    { "GDALFootprintOptions_swigregister", GDALFootprintOptions_swigregister, METH_O, NULL},
   65450             :    { "GDALFootprintOptions_swiginit", GDALFootprintOptions_swiginit, METH_VARARGS, NULL},
   65451             :    { "wrapper_GDALFootprintDestDS", _wrap_wrapper_GDALFootprintDestDS, METH_VARARGS, "wrapper_GDALFootprintDestDS(Dataset dstDS, Dataset srcDS, GDALFootprintOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   65452             :    { "wrapper_GDALFootprintDestName", _wrap_wrapper_GDALFootprintDestName, METH_VARARGS, "wrapper_GDALFootprintDestName(char const * dest, Dataset srcDS, GDALFootprintOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   65453             :    { "new_GDALBuildVRTOptions", _wrap_new_GDALBuildVRTOptions, METH_O, "new_GDALBuildVRTOptions(char ** options) -> GDALBuildVRTOptions"},
   65454             :    { "delete_GDALBuildVRTOptions", _wrap_delete_GDALBuildVRTOptions, METH_O, "delete_GDALBuildVRTOptions(GDALBuildVRTOptions self)"},
   65455             :    { "GDALBuildVRTOptions_swigregister", GDALBuildVRTOptions_swigregister, METH_O, NULL},
   65456             :    { "GDALBuildVRTOptions_swiginit", GDALBuildVRTOptions_swiginit, METH_VARARGS, NULL},
   65457             :    { "BuildVRTInternalObjects", _wrap_BuildVRTInternalObjects, METH_VARARGS, "BuildVRTInternalObjects(char const * dest, int object_list_count, GDALBuildVRTOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   65458             :    { "BuildVRTInternalNames", _wrap_BuildVRTInternalNames, METH_VARARGS, "BuildVRTInternalNames(char const * dest, char ** source_filenames, GDALBuildVRTOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   65459             :    { "new_GDALTileIndexOptions", _wrap_new_GDALTileIndexOptions, METH_O, "new_GDALTileIndexOptions(char ** options) -> GDALTileIndexOptions"},
   65460             :    { "delete_GDALTileIndexOptions", _wrap_delete_GDALTileIndexOptions, METH_O, "delete_GDALTileIndexOptions(GDALTileIndexOptions self)"},
   65461             :    { "GDALTileIndexOptions_swigregister", GDALTileIndexOptions_swigregister, METH_O, NULL},
   65462             :    { "GDALTileIndexOptions_swiginit", GDALTileIndexOptions_swiginit, METH_VARARGS, NULL},
   65463             :    { "TileIndexInternalNames", _wrap_TileIndexInternalNames, METH_VARARGS, "TileIndexInternalNames(char const * dest, char ** source_filenames, GDALTileIndexOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   65464             :    { "new_GDALMultiDimTranslateOptions", _wrap_new_GDALMultiDimTranslateOptions, METH_O, "new_GDALMultiDimTranslateOptions(char ** options) -> GDALMultiDimTranslateOptions"},
   65465             :    { "delete_GDALMultiDimTranslateOptions", _wrap_delete_GDALMultiDimTranslateOptions, METH_O, "delete_GDALMultiDimTranslateOptions(GDALMultiDimTranslateOptions self)"},
   65466             :    { "GDALMultiDimTranslateOptions_swigregister", GDALMultiDimTranslateOptions_swigregister, METH_O, NULL},
   65467             :    { "GDALMultiDimTranslateOptions_swiginit", GDALMultiDimTranslateOptions_swiginit, METH_VARARGS, NULL},
   65468             :    { "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"},
   65469             :    { NULL, NULL, 0, NULL }
   65470             : };
   65471             : 
   65472             : static PyMethodDef SwigMethods_proxydocs[] = {
   65473             :    { NULL, NULL, 0, NULL }
   65474             : };
   65475             : 
   65476             : 
   65477             : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
   65478             : 
   65479       53819 : static void *_p_GDALDriverShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   65480       53819 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDriverShadow *) x));
   65481             : }
   65482         967 : static void *_p_OGRLayerShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   65483         967 :     return (void *)((GDALMajorObjectShadow *)  ((OGRLayerShadow *) x));
   65484             : }
   65485        6384 : static void *_p_GDALDatasetShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   65486        6384 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDatasetShadow *) x));
   65487             : }
   65488        6677 : static void *_p_GDALRasterBandShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   65489        6677 :     return (void *)((GDALMajorObjectShadow *)  ((GDALRasterBandShadow *) x));
   65490             : }
   65491             : static swig_type_info _swigt__p_CPLErrorHandler = {"_p_CPLErrorHandler", "CPLErrorHandler *", 0, 0, (void*)0, 0};
   65492             : static swig_type_info _swigt__p_CPLVirtualMemShadow = {"_p_CPLVirtualMemShadow", "CPLVirtualMemShadow *", 0, 0, (void*)0, 0};
   65493             : static swig_type_info _swigt__p_CPLXMLNode = {"_p_CPLXMLNode", "CPLXMLNode *", 0, 0, (void*)0, 0};
   65494             : static swig_type_info _swigt__p_DirEntry = {"_p_DirEntry", "DirEntry *", 0, 0, (void*)0, 0};
   65495             : static swig_type_info _swigt__p_GByte = {"_p_GByte", "GByte *", 0, 0, (void*)0, 0};
   65496             : static swig_type_info _swigt__p_GDALAlgorithmArgHS = {"_p_GDALAlgorithmArgHS", "GDALAlgorithmArgHS *", 0, 0, (void*)0, 0};
   65497             : static swig_type_info _swigt__p_GDALAlgorithmHS = {"_p_GDALAlgorithmHS", "GDALAlgorithmHS *", 0, 0, (void*)0, 0};
   65498             : static swig_type_info _swigt__p_GDALAlgorithmRegistryHS = {"_p_GDALAlgorithmRegistryHS", "GDALAlgorithmRegistryHS *", 0, 0, (void*)0, 0};
   65499             : static swig_type_info _swigt__p_GDALArgDatasetValueHS = {"_p_GDALArgDatasetValueHS", "GDALArgDatasetValueHS *", 0, 0, (void*)0, 0};
   65500             : static swig_type_info _swigt__p_GDALAsyncReaderShadow = {"_p_GDALAsyncReaderShadow", "GDALAsyncReaderShadow *", 0, 0, (void*)0, 0};
   65501             : static swig_type_info _swigt__p_GDALAttributeHS = {"_p_GDALAttributeHS", "GDALAttributeHS *", 0, 0, (void*)0, 0};
   65502             : static swig_type_info _swigt__p_GDALBuildVRTOptions = {"_p_GDALBuildVRTOptions", "GDALBuildVRTOptions *", 0, 0, (void*)0, 0};
   65503             : static swig_type_info _swigt__p_GDALColorEntry = {"_p_GDALColorEntry", "GDALColorEntry *", 0, 0, (void*)0, 0};
   65504             : static swig_type_info _swigt__p_GDALColorTableShadow = {"_p_GDALColorTableShadow", "GDALColorTableShadow *", 0, 0, (void*)0, 0};
   65505             : static swig_type_info _swigt__p_GDALContourOptions = {"_p_GDALContourOptions", "GDALContourOptions *", 0, 0, (void*)0, 0};
   65506             : static swig_type_info _swigt__p_GDALDEMProcessingOptions = {"_p_GDALDEMProcessingOptions", "GDALDEMProcessingOptions *", 0, 0, (void*)0, 0};
   65507             : static swig_type_info _swigt__p_GDALDatasetShadow = {"_p_GDALDatasetShadow", "GDALDatasetShadow *", 0, 0, (void*)0, 0};
   65508             : static swig_type_info _swigt__p_GDALDimensionHS = {"_p_GDALDimensionHS", "GDALDimensionHS *", 0, 0, (void*)0, 0};
   65509             : static swig_type_info _swigt__p_GDALDriverShadow = {"_p_GDALDriverShadow", "GDALDriverShadow *", 0, 0, (void*)0, 0};
   65510             : static swig_type_info _swigt__p_GDALEDTComponentHS = {"_p_GDALEDTComponentHS", "GDALEDTComponentHS *", 0, 0, (void*)0, 0};
   65511             : static swig_type_info _swigt__p_GDALExtendedDataTypeClass = {"_p_GDALExtendedDataTypeClass", "enum GDALExtendedDataTypeClass *|GDALExtendedDataTypeClass *", 0, 0, (void*)0, 0};
   65512             : static swig_type_info _swigt__p_GDALExtendedDataTypeHS = {"_p_GDALExtendedDataTypeHS", "GDALExtendedDataTypeHS *", 0, 0, (void*)0, 0};
   65513             : static swig_type_info _swigt__p_GDALExtendedDataTypeSubType = {"_p_GDALExtendedDataTypeSubType", "enum GDALExtendedDataTypeSubType *|GDALExtendedDataTypeSubType *", 0, 0, (void*)0, 0};
   65514             : static swig_type_info _swigt__p_GDALFootprintOptions = {"_p_GDALFootprintOptions", "GDALFootprintOptions *", 0, 0, (void*)0, 0};
   65515             : static swig_type_info _swigt__p_GDALGridOptions = {"_p_GDALGridOptions", "GDALGridOptions *", 0, 0, (void*)0, 0};
   65516             : static swig_type_info _swigt__p_GDALGroupHS = {"_p_GDALGroupHS", "GDALGroupHS *", 0, 0, (void*)0, 0};
   65517             : static swig_type_info _swigt__p_GDALInfoOptions = {"_p_GDALInfoOptions", "GDALInfoOptions *", 0, 0, (void*)0, 0};
   65518             : static swig_type_info _swigt__p_GDALMDArrayHS = {"_p_GDALMDArrayHS", "GDALMDArrayHS *", 0, 0, (void*)0, 0};
   65519             : static swig_type_info _swigt__p_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, (void*)0, 0};
   65520             : static swig_type_info _swigt__p_GDALMultiDimInfoOptions = {"_p_GDALMultiDimInfoOptions", "GDALMultiDimInfoOptions *", 0, 0, (void*)0, 0};
   65521             : static swig_type_info _swigt__p_GDALMultiDimTranslateOptions = {"_p_GDALMultiDimTranslateOptions", "GDALMultiDimTranslateOptions *", 0, 0, (void*)0, 0};
   65522             : static swig_type_info _swigt__p_GDALNearblackOptions = {"_p_GDALNearblackOptions", "GDALNearblackOptions *", 0, 0, (void*)0, 0};
   65523             : static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
   65524             : static swig_type_info _swigt__p_GDALRasterAttributeTableShadow = {"_p_GDALRasterAttributeTableShadow", "GDALRasterAttributeTableShadow *", 0, 0, (void*)0, 0};
   65525             : static swig_type_info _swigt__p_GDALRasterBandShadow = {"_p_GDALRasterBandShadow", "GDALRasterBandShadow *", 0, 0, (void*)0, 0};
   65526             : static swig_type_info _swigt__p_GDALRasterizeOptions = {"_p_GDALRasterizeOptions", "GDALRasterizeOptions *", 0, 0, (void*)0, 0};
   65527             : static swig_type_info _swigt__p_GDALRelationshipShadow = {"_p_GDALRelationshipShadow", "GDALRelationshipShadow *", 0, 0, (void*)0, 0};
   65528             : static swig_type_info _swigt__p_GDALSubdatasetInfo = {"_p_GDALSubdatasetInfo", "GDALSubdatasetInfo *|GDALSubdatasetInfoShadow *", 0, 0, (void*)0, 0};
   65529             : static swig_type_info _swigt__p_GDALTileIndexOptions = {"_p_GDALTileIndexOptions", "GDALTileIndexOptions *", 0, 0, (void*)0, 0};
   65530             : static swig_type_info _swigt__p_GDALTransformerInfoShadow = {"_p_GDALTransformerInfoShadow", "GDALTransformerInfoShadow *", 0, 0, (void*)0, 0};
   65531             : static swig_type_info _swigt__p_GDALTranslateOptions = {"_p_GDALTranslateOptions", "GDALTranslateOptions *", 0, 0, (void*)0, 0};
   65532             : static swig_type_info _swigt__p_GDALVectorInfoOptions = {"_p_GDALVectorInfoOptions", "GDALVectorInfoOptions *", 0, 0, (void*)0, 0};
   65533             : static swig_type_info _swigt__p_GDALVectorTranslateOptions = {"_p_GDALVectorTranslateOptions", "GDALVectorTranslateOptions *", 0, 0, (void*)0, 0};
   65534             : static swig_type_info _swigt__p_GDALViewshedMode = {"_p_GDALViewshedMode", "enum GDALViewshedMode *|GDALViewshedMode *", 0, 0, (void*)0, 0};
   65535             : static swig_type_info _swigt__p_GDALViewshedOutputType = {"_p_GDALViewshedOutputType", "enum GDALViewshedOutputType *|GDALViewshedOutputType *", 0, 0, (void*)0, 0};
   65536             : static swig_type_info _swigt__p_GDALWarpAppOptions = {"_p_GDALWarpAppOptions", "GDALWarpAppOptions *", 0, 0, (void*)0, 0};
   65537             : static swig_type_info _swigt__p_GDAL_GCP = {"_p_GDAL_GCP", "GDAL_GCP *", 0, 0, (void*)0, 0};
   65538             : static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
   65539             : static swig_type_info _swigt__p_GUIntBig = {"_p_GUIntBig", "GUIntBig *", 0, 0, (void*)0, 0};
   65540             : static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
   65541             : static swig_type_info _swigt__p_OGRFieldDomainShadow = {"_p_OGRFieldDomainShadow", "OGRFieldDomainShadow *", 0, 0, (void*)0, 0};
   65542             : static swig_type_info _swigt__p_OGRGeomFieldDefnShadow = {"_p_OGRGeomFieldDefnShadow", "OGRGeomFieldDefnShadow *", 0, 0, (void*)0, 0};
   65543             : static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)0, 0};
   65544             : static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
   65545             : static swig_type_info _swigt__p_OGRStyleTableShadow = {"_p_OGRStyleTableShadow", "OGRStyleTableShadow *", 0, 0, (void*)0, 0};
   65546             : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
   65547             : static swig_type_info _swigt__p_StatBuf = {"_p_StatBuf", "StatBuf *", 0, 0, (void*)0, 0};
   65548             : static swig_type_info _swigt__p_Statistics = {"_p_Statistics", "Statistics *", 0, 0, (void*)0, 0};
   65549             : static swig_type_info _swigt__p_SuggestedWarpOutputRes = {"_p_SuggestedWarpOutputRes", "SuggestedWarpOutputRes *", 0, 0, (void*)0, 0};
   65550             : static swig_type_info _swigt__p_VSIDIR = {"_p_VSIDIR", "VSIDIR *", 0, 0, (void*)0, 0};
   65551             : static swig_type_info _swigt__p_VSILFILE = {"_p_VSILFILE", "VSILFILE *", 0, 0, (void*)0, 0};
   65552             : static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0};
   65553             : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
   65554             : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
   65555             : 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};
   65556             : 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 *|GDALAlgorithmArgType *|GDALRATTableType *|GDALRelationshipCardinality *|OGRFieldDomainMergePolicy *|OGRFieldDomainSplitPolicy *", 0, 0, (void*)0, 0};
   65557             : static swig_type_info _swigt__p_long_long = {"_p_long_long", "long long *", 0, 0, (void*)0, 0};
   65558             : static swig_type_info _swigt__p_p_GByte = {"_p_p_GByte", "GByte **", 0, 0, (void*)0, 0};
   65559             : static swig_type_info _swigt__p_p_GDALDatasetShadow = {"_p_p_GDALDatasetShadow", "GDALDatasetShadow **", 0, 0, (void*)0, 0};
   65560             : static swig_type_info _swigt__p_p_GDALDimensionHS = {"_p_p_GDALDimensionHS", "GDALDimensionHS **", 0, 0, (void*)0, 0};
   65561             : static swig_type_info _swigt__p_p_GDALEDTComponentHS = {"_p_p_GDALEDTComponentHS", "GDALEDTComponentHS **", 0, 0, (void*)0, 0};
   65562             : static swig_type_info _swigt__p_p_GDALMDArrayHS = {"_p_p_GDALMDArrayHS", "GDALMDArrayHS **", 0, 0, (void*)0, 0};
   65563             : static swig_type_info _swigt__p_p_GDALRasterBandShadow = {"_p_p_GDALRasterBandShadow", "GDALRasterBandShadow **", 0, 0, (void*)0, 0};
   65564             : static swig_type_info _swigt__p_p_GDAL_GCP = {"_p_p_GDAL_GCP", "GDAL_GCP **", 0, 0, (void*)0, 0};
   65565             : static swig_type_info _swigt__p_p_GUIntBig = {"_p_p_GUIntBig", "GUIntBig **", 0, 0, (void*)0, 0};
   65566             : static swig_type_info _swigt__p_p_OGRLayerShadow = {"_p_p_OGRLayerShadow", "OGRLayerShadow **", 0, 0, (void*)0, 0};
   65567             : static swig_type_info _swigt__p_p_OSRSpatialReferenceShadow = {"_p_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow **", 0, 0, (void*)0, 0};
   65568             : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
   65569             : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
   65570             : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
   65571             : static swig_type_info _swigt__p_p_long_long = {"_p_p_long_long", "long long **", 0, 0, (void*)0, 0};
   65572             : static swig_type_info _swigt__p_p_p_GDALAttributeHS = {"_p_p_p_GDALAttributeHS", "GDALAttributeHS ***", 0, 0, (void*)0, 0};
   65573             : static swig_type_info _swigt__p_p_p_GDALDimensionHS = {"_p_p_p_GDALDimensionHS", "GDALDimensionHS ***", 0, 0, (void*)0, 0};
   65574             : static swig_type_info _swigt__p_p_p_GDALEDTComponentHS = {"_p_p_p_GDALEDTComponentHS", "GDALEDTComponentHS ***", 0, 0, (void*)0, 0};
   65575             : static swig_type_info _swigt__p_p_p_GDALMDArrayHS = {"_p_p_p_GDALMDArrayHS", "GDALMDArrayHS ***", 0, 0, (void*)0, 0};
   65576             : static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
   65577             : static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
   65578             : static swig_type_info _swigt__p_vsi_l_offset = {"_p_vsi_l_offset", "vsi_l_offset *", 0, 0, (void*)0, 0};
   65579             : 
   65580             : static swig_type_info *swig_type_initial[] = {
   65581             :   &_swigt__p_CPLErrorHandler,
   65582             :   &_swigt__p_CPLVirtualMemShadow,
   65583             :   &_swigt__p_CPLXMLNode,
   65584             :   &_swigt__p_DirEntry,
   65585             :   &_swigt__p_GByte,
   65586             :   &_swigt__p_GDALAlgorithmArgHS,
   65587             :   &_swigt__p_GDALAlgorithmHS,
   65588             :   &_swigt__p_GDALAlgorithmRegistryHS,
   65589             :   &_swigt__p_GDALArgDatasetValueHS,
   65590             :   &_swigt__p_GDALAsyncReaderShadow,
   65591             :   &_swigt__p_GDALAttributeHS,
   65592             :   &_swigt__p_GDALBuildVRTOptions,
   65593             :   &_swigt__p_GDALColorEntry,
   65594             :   &_swigt__p_GDALColorTableShadow,
   65595             :   &_swigt__p_GDALContourOptions,
   65596             :   &_swigt__p_GDALDEMProcessingOptions,
   65597             :   &_swigt__p_GDALDatasetShadow,
   65598             :   &_swigt__p_GDALDimensionHS,
   65599             :   &_swigt__p_GDALDriverShadow,
   65600             :   &_swigt__p_GDALEDTComponentHS,
   65601             :   &_swigt__p_GDALExtendedDataTypeClass,
   65602             :   &_swigt__p_GDALExtendedDataTypeHS,
   65603             :   &_swigt__p_GDALExtendedDataTypeSubType,
   65604             :   &_swigt__p_GDALFootprintOptions,
   65605             :   &_swigt__p_GDALGridOptions,
   65606             :   &_swigt__p_GDALGroupHS,
   65607             :   &_swigt__p_GDALInfoOptions,
   65608             :   &_swigt__p_GDALMDArrayHS,
   65609             :   &_swigt__p_GDALMajorObjectShadow,
   65610             :   &_swigt__p_GDALMultiDimInfoOptions,
   65611             :   &_swigt__p_GDALMultiDimTranslateOptions,
   65612             :   &_swigt__p_GDALNearblackOptions,
   65613             :   &_swigt__p_GDALProgressFunc,
   65614             :   &_swigt__p_GDALRasterAttributeTableShadow,
   65615             :   &_swigt__p_GDALRasterBandShadow,
   65616             :   &_swigt__p_GDALRasterizeOptions,
   65617             :   &_swigt__p_GDALRelationshipShadow,
   65618             :   &_swigt__p_GDALSubdatasetInfo,
   65619             :   &_swigt__p_GDALTileIndexOptions,
   65620             :   &_swigt__p_GDALTransformerInfoShadow,
   65621             :   &_swigt__p_GDALTranslateOptions,
   65622             :   &_swigt__p_GDALVectorInfoOptions,
   65623             :   &_swigt__p_GDALVectorTranslateOptions,
   65624             :   &_swigt__p_GDALViewshedMode,
   65625             :   &_swigt__p_GDALViewshedOutputType,
   65626             :   &_swigt__p_GDALWarpAppOptions,
   65627             :   &_swigt__p_GDAL_GCP,
   65628             :   &_swigt__p_GIntBig,
   65629             :   &_swigt__p_GUIntBig,
   65630             :   &_swigt__p_OGRFeatureShadow,
   65631             :   &_swigt__p_OGRFieldDomainShadow,
   65632             :   &_swigt__p_OGRGeomFieldDefnShadow,
   65633             :   &_swigt__p_OGRGeometryShadow,
   65634             :   &_swigt__p_OGRLayerShadow,
   65635             :   &_swigt__p_OGRStyleTableShadow,
   65636             :   &_swigt__p_OSRSpatialReferenceShadow,
   65637             :   &_swigt__p_StatBuf,
   65638             :   &_swigt__p_Statistics,
   65639             :   &_swigt__p_SuggestedWarpOutputRes,
   65640             :   &_swigt__p_VSIDIR,
   65641             :   &_swigt__p_VSILFILE,
   65642             :   &_swigt__p_bool,
   65643             :   &_swigt__p_char,
   65644             :   &_swigt__p_double,
   65645             :   &_swigt__p_f_double_p_q_const__char_p_void__int,
   65646             :   &_swigt__p_int,
   65647             :   &_swigt__p_long_long,
   65648             :   &_swigt__p_p_GByte,
   65649             :   &_swigt__p_p_GDALDatasetShadow,
   65650             :   &_swigt__p_p_GDALDimensionHS,
   65651             :   &_swigt__p_p_GDALEDTComponentHS,
   65652             :   &_swigt__p_p_GDALMDArrayHS,
   65653             :   &_swigt__p_p_GDALRasterBandShadow,
   65654             :   &_swigt__p_p_GDAL_GCP,
   65655             :   &_swigt__p_p_GUIntBig,
   65656             :   &_swigt__p_p_OGRLayerShadow,
   65657             :   &_swigt__p_p_OSRSpatialReferenceShadow,
   65658             :   &_swigt__p_p_char,
   65659             :   &_swigt__p_p_double,
   65660             :   &_swigt__p_p_int,
   65661             :   &_swigt__p_p_long_long,
   65662             :   &_swigt__p_p_p_GDALAttributeHS,
   65663             :   &_swigt__p_p_p_GDALDimensionHS,
   65664             :   &_swigt__p_p_p_GDALEDTComponentHS,
   65665             :   &_swigt__p_p_p_GDALMDArrayHS,
   65666             :   &_swigt__p_p_void,
   65667             :   &_swigt__p_size_t,
   65668             :   &_swigt__p_vsi_l_offset,
   65669             : };
   65670             : 
   65671             : static swig_cast_info _swigc__p_CPLErrorHandler[] = {  {&_swigt__p_CPLErrorHandler, 0, 0, 0},{0, 0, 0, 0}};
   65672             : static swig_cast_info _swigc__p_CPLVirtualMemShadow[] = {  {&_swigt__p_CPLVirtualMemShadow, 0, 0, 0},{0, 0, 0, 0}};
   65673             : static swig_cast_info _swigc__p_CPLXMLNode[] = {  {&_swigt__p_CPLXMLNode, 0, 0, 0},{0, 0, 0, 0}};
   65674             : static swig_cast_info _swigc__p_DirEntry[] = {  {&_swigt__p_DirEntry, 0, 0, 0},{0, 0, 0, 0}};
   65675             : static swig_cast_info _swigc__p_GByte[] = {  {&_swigt__p_GByte, 0, 0, 0},{0, 0, 0, 0}};
   65676             : static swig_cast_info _swigc__p_GDALAlgorithmArgHS[] = {  {&_swigt__p_GDALAlgorithmArgHS, 0, 0, 0},{0, 0, 0, 0}};
   65677             : static swig_cast_info _swigc__p_GDALAlgorithmHS[] = {  {&_swigt__p_GDALAlgorithmHS, 0, 0, 0},{0, 0, 0, 0}};
   65678             : static swig_cast_info _swigc__p_GDALAlgorithmRegistryHS[] = {  {&_swigt__p_GDALAlgorithmRegistryHS, 0, 0, 0},{0, 0, 0, 0}};
   65679             : static swig_cast_info _swigc__p_GDALArgDatasetValueHS[] = {  {&_swigt__p_GDALArgDatasetValueHS, 0, 0, 0},{0, 0, 0, 0}};
   65680             : static swig_cast_info _swigc__p_GDALAsyncReaderShadow[] = {  {&_swigt__p_GDALAsyncReaderShadow, 0, 0, 0},{0, 0, 0, 0}};
   65681             : static swig_cast_info _swigc__p_GDALAttributeHS[] = {  {&_swigt__p_GDALAttributeHS, 0, 0, 0},{0, 0, 0, 0}};
   65682             : static swig_cast_info _swigc__p_GDALBuildVRTOptions[] = {  {&_swigt__p_GDALBuildVRTOptions, 0, 0, 0},{0, 0, 0, 0}};
   65683             : static swig_cast_info _swigc__p_GDALColorEntry[] = {  {&_swigt__p_GDALColorEntry, 0, 0, 0},{0, 0, 0, 0}};
   65684             : static swig_cast_info _swigc__p_GDALColorTableShadow[] = {  {&_swigt__p_GDALColorTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   65685             : static swig_cast_info _swigc__p_GDALContourOptions[] = {  {&_swigt__p_GDALContourOptions, 0, 0, 0},{0, 0, 0, 0}};
   65686             : static swig_cast_info _swigc__p_GDALDEMProcessingOptions[] = {  {&_swigt__p_GDALDEMProcessingOptions, 0, 0, 0},{0, 0, 0, 0}};
   65687             : static swig_cast_info _swigc__p_GDALDatasetShadow[] = {  {&_swigt__p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
   65688             : static swig_cast_info _swigc__p_GDALDimensionHS[] = {  {&_swigt__p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   65689             : static swig_cast_info _swigc__p_GDALDriverShadow[] = {  {&_swigt__p_GDALDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
   65690             : static swig_cast_info _swigc__p_GDALEDTComponentHS[] = {  {&_swigt__p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   65691             : static swig_cast_info _swigc__p_GDALExtendedDataTypeClass[] = {  {&_swigt__p_GDALExtendedDataTypeClass, 0, 0, 0},{0, 0, 0, 0}};
   65692             : static swig_cast_info _swigc__p_GDALExtendedDataTypeHS[] = {  {&_swigt__p_GDALExtendedDataTypeHS, 0, 0, 0},{0, 0, 0, 0}};
   65693             : static swig_cast_info _swigc__p_GDALExtendedDataTypeSubType[] = {  {&_swigt__p_GDALExtendedDataTypeSubType, 0, 0, 0},{0, 0, 0, 0}};
   65694             : static swig_cast_info _swigc__p_GDALFootprintOptions[] = {  {&_swigt__p_GDALFootprintOptions, 0, 0, 0},{0, 0, 0, 0}};
   65695             : static swig_cast_info _swigc__p_GDALGridOptions[] = {  {&_swigt__p_GDALGridOptions, 0, 0, 0},{0, 0, 0, 0}};
   65696             : static swig_cast_info _swigc__p_GDALGroupHS[] = {  {&_swigt__p_GDALGroupHS, 0, 0, 0},{0, 0, 0, 0}};
   65697             : static swig_cast_info _swigc__p_GDALInfoOptions[] = {  {&_swigt__p_GDALInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   65698             : static swig_cast_info _swigc__p_GDALMDArrayHS[] = {  {&_swigt__p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   65699             : 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}};
   65700             : static swig_cast_info _swigc__p_GDALMultiDimInfoOptions[] = {  {&_swigt__p_GDALMultiDimInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   65701             : static swig_cast_info _swigc__p_GDALMultiDimTranslateOptions[] = {  {&_swigt__p_GDALMultiDimTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   65702             : static swig_cast_info _swigc__p_GDALNearblackOptions[] = {  {&_swigt__p_GDALNearblackOptions, 0, 0, 0},{0, 0, 0, 0}};
   65703             : static swig_cast_info _swigc__p_GDALProgressFunc[] = {  {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
   65704             : static swig_cast_info _swigc__p_GDALRasterAttributeTableShadow[] = {  {&_swigt__p_GDALRasterAttributeTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   65705             : static swig_cast_info _swigc__p_GDALRasterBandShadow[] = {  {&_swigt__p_GDALRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   65706             : static swig_cast_info _swigc__p_GDALRasterizeOptions[] = {  {&_swigt__p_GDALRasterizeOptions, 0, 0, 0},{0, 0, 0, 0}};
   65707             : static swig_cast_info _swigc__p_GDALRelationshipShadow[] = {  {&_swigt__p_GDALRelationshipShadow, 0, 0, 0},{0, 0, 0, 0}};
   65708             : static swig_cast_info _swigc__p_GDALSubdatasetInfo[] = {  {&_swigt__p_GDALSubdatasetInfo, 0, 0, 0},{0, 0, 0, 0}};
   65709             : static swig_cast_info _swigc__p_GDALTileIndexOptions[] = {  {&_swigt__p_GDALTileIndexOptions, 0, 0, 0},{0, 0, 0, 0}};
   65710             : static swig_cast_info _swigc__p_GDALTransformerInfoShadow[] = {  {&_swigt__p_GDALTransformerInfoShadow, 0, 0, 0},{0, 0, 0, 0}};
   65711             : static swig_cast_info _swigc__p_GDALTranslateOptions[] = {  {&_swigt__p_GDALTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   65712             : static swig_cast_info _swigc__p_GDALVectorInfoOptions[] = {  {&_swigt__p_GDALVectorInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   65713             : static swig_cast_info _swigc__p_GDALVectorTranslateOptions[] = {  {&_swigt__p_GDALVectorTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   65714             : static swig_cast_info _swigc__p_GDALViewshedMode[] = {  {&_swigt__p_GDALViewshedMode, 0, 0, 0},{0, 0, 0, 0}};
   65715             : static swig_cast_info _swigc__p_GDALViewshedOutputType[] = {  {&_swigt__p_GDALViewshedOutputType, 0, 0, 0},{0, 0, 0, 0}};
   65716             : static swig_cast_info _swigc__p_GDALWarpAppOptions[] = {  {&_swigt__p_GDALWarpAppOptions, 0, 0, 0},{0, 0, 0, 0}};
   65717             : static swig_cast_info _swigc__p_GDAL_GCP[] = {  {&_swigt__p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   65718             : static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
   65719             : static swig_cast_info _swigc__p_GUIntBig[] = {  {&_swigt__p_GUIntBig, 0, 0, 0},{0, 0, 0, 0}};
   65720             : static swig_cast_info _swigc__p_OGRFeatureShadow[] = {  {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
   65721             : static swig_cast_info _swigc__p_OGRFieldDomainShadow[] = {  {&_swigt__p_OGRFieldDomainShadow, 0, 0, 0},{0, 0, 0, 0}};
   65722             : static swig_cast_info _swigc__p_OGRGeomFieldDefnShadow[] = {  {&_swigt__p_OGRGeomFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
   65723             : static swig_cast_info _swigc__p_OGRGeometryShadow[] = {  {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
   65724             : static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   65725             : static swig_cast_info _swigc__p_OGRStyleTableShadow[] = {  {&_swigt__p_OGRStyleTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   65726             : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
   65727             : static swig_cast_info _swigc__p_StatBuf[] = {  {&_swigt__p_StatBuf, 0, 0, 0},{0, 0, 0, 0}};
   65728             : static swig_cast_info _swigc__p_Statistics[] = {  {&_swigt__p_Statistics, 0, 0, 0},{0, 0, 0, 0}};
   65729             : static swig_cast_info _swigc__p_SuggestedWarpOutputRes[] = {  {&_swigt__p_SuggestedWarpOutputRes, 0, 0, 0},{0, 0, 0, 0}};
   65730             : static swig_cast_info _swigc__p_VSIDIR[] = {  {&_swigt__p_VSIDIR, 0, 0, 0},{0, 0, 0, 0}};
   65731             : static swig_cast_info _swigc__p_VSILFILE[] = {  {&_swigt__p_VSILFILE, 0, 0, 0},{0, 0, 0, 0}};
   65732             : static swig_cast_info _swigc__p_bool[] = {  {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}};
   65733             : static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
   65734             : static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
   65735             : 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}};
   65736             : static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
   65737             : static swig_cast_info _swigc__p_long_long[] = {  {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
   65738             : static swig_cast_info _swigc__p_p_GByte[] = {  {&_swigt__p_p_GByte, 0, 0, 0},{0, 0, 0, 0}};
   65739             : static swig_cast_info _swigc__p_p_GDALDatasetShadow[] = {  {&_swigt__p_p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
   65740             : static swig_cast_info _swigc__p_p_GDALDimensionHS[] = {  {&_swigt__p_p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   65741             : static swig_cast_info _swigc__p_p_GDALEDTComponentHS[] = {  {&_swigt__p_p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   65742             : static swig_cast_info _swigc__p_p_GDALMDArrayHS[] = {  {&_swigt__p_p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   65743             : static swig_cast_info _swigc__p_p_GDALRasterBandShadow[] = {  {&_swigt__p_p_GDALRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   65744             : static swig_cast_info _swigc__p_p_GDAL_GCP[] = {  {&_swigt__p_p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   65745             : static swig_cast_info _swigc__p_p_GUIntBig[] = {  {&_swigt__p_p_GUIntBig, 0, 0, 0},{0, 0, 0, 0}};
   65746             : static swig_cast_info _swigc__p_p_OGRLayerShadow[] = {  {&_swigt__p_p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   65747             : static swig_cast_info _swigc__p_p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
   65748             : static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
   65749             : static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
   65750             : static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
   65751             : static swig_cast_info _swigc__p_p_long_long[] = {  {&_swigt__p_p_long_long, 0, 0, 0},{0, 0, 0, 0}};
   65752             : static swig_cast_info _swigc__p_p_p_GDALAttributeHS[] = {  {&_swigt__p_p_p_GDALAttributeHS, 0, 0, 0},{0, 0, 0, 0}};
   65753             : static swig_cast_info _swigc__p_p_p_GDALDimensionHS[] = {  {&_swigt__p_p_p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   65754             : static swig_cast_info _swigc__p_p_p_GDALEDTComponentHS[] = {  {&_swigt__p_p_p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   65755             : static swig_cast_info _swigc__p_p_p_GDALMDArrayHS[] = {  {&_swigt__p_p_p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   65756             : static swig_cast_info _swigc__p_p_void[] = {  {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
   65757             : static swig_cast_info _swigc__p_size_t[] = {  {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
   65758             : static swig_cast_info _swigc__p_vsi_l_offset[] = {  {&_swigt__p_vsi_l_offset, 0, 0, 0},{0, 0, 0, 0}};
   65759             : 
   65760             : static swig_cast_info *swig_cast_initial[] = {
   65761             :   _swigc__p_CPLErrorHandler,
   65762             :   _swigc__p_CPLVirtualMemShadow,
   65763             :   _swigc__p_CPLXMLNode,
   65764             :   _swigc__p_DirEntry,
   65765             :   _swigc__p_GByte,
   65766             :   _swigc__p_GDALAlgorithmArgHS,
   65767             :   _swigc__p_GDALAlgorithmHS,
   65768             :   _swigc__p_GDALAlgorithmRegistryHS,
   65769             :   _swigc__p_GDALArgDatasetValueHS,
   65770             :   _swigc__p_GDALAsyncReaderShadow,
   65771             :   _swigc__p_GDALAttributeHS,
   65772             :   _swigc__p_GDALBuildVRTOptions,
   65773             :   _swigc__p_GDALColorEntry,
   65774             :   _swigc__p_GDALColorTableShadow,
   65775             :   _swigc__p_GDALContourOptions,
   65776             :   _swigc__p_GDALDEMProcessingOptions,
   65777             :   _swigc__p_GDALDatasetShadow,
   65778             :   _swigc__p_GDALDimensionHS,
   65779             :   _swigc__p_GDALDriverShadow,
   65780             :   _swigc__p_GDALEDTComponentHS,
   65781             :   _swigc__p_GDALExtendedDataTypeClass,
   65782             :   _swigc__p_GDALExtendedDataTypeHS,
   65783             :   _swigc__p_GDALExtendedDataTypeSubType,
   65784             :   _swigc__p_GDALFootprintOptions,
   65785             :   _swigc__p_GDALGridOptions,
   65786             :   _swigc__p_GDALGroupHS,
   65787             :   _swigc__p_GDALInfoOptions,
   65788             :   _swigc__p_GDALMDArrayHS,
   65789             :   _swigc__p_GDALMajorObjectShadow,
   65790             :   _swigc__p_GDALMultiDimInfoOptions,
   65791             :   _swigc__p_GDALMultiDimTranslateOptions,
   65792             :   _swigc__p_GDALNearblackOptions,
   65793             :   _swigc__p_GDALProgressFunc,
   65794             :   _swigc__p_GDALRasterAttributeTableShadow,
   65795             :   _swigc__p_GDALRasterBandShadow,
   65796             :   _swigc__p_GDALRasterizeOptions,
   65797             :   _swigc__p_GDALRelationshipShadow,
   65798             :   _swigc__p_GDALSubdatasetInfo,
   65799             :   _swigc__p_GDALTileIndexOptions,
   65800             :   _swigc__p_GDALTransformerInfoShadow,
   65801             :   _swigc__p_GDALTranslateOptions,
   65802             :   _swigc__p_GDALVectorInfoOptions,
   65803             :   _swigc__p_GDALVectorTranslateOptions,
   65804             :   _swigc__p_GDALViewshedMode,
   65805             :   _swigc__p_GDALViewshedOutputType,
   65806             :   _swigc__p_GDALWarpAppOptions,
   65807             :   _swigc__p_GDAL_GCP,
   65808             :   _swigc__p_GIntBig,
   65809             :   _swigc__p_GUIntBig,
   65810             :   _swigc__p_OGRFeatureShadow,
   65811             :   _swigc__p_OGRFieldDomainShadow,
   65812             :   _swigc__p_OGRGeomFieldDefnShadow,
   65813             :   _swigc__p_OGRGeometryShadow,
   65814             :   _swigc__p_OGRLayerShadow,
   65815             :   _swigc__p_OGRStyleTableShadow,
   65816             :   _swigc__p_OSRSpatialReferenceShadow,
   65817             :   _swigc__p_StatBuf,
   65818             :   _swigc__p_Statistics,
   65819             :   _swigc__p_SuggestedWarpOutputRes,
   65820             :   _swigc__p_VSIDIR,
   65821             :   _swigc__p_VSILFILE,
   65822             :   _swigc__p_bool,
   65823             :   _swigc__p_char,
   65824             :   _swigc__p_double,
   65825             :   _swigc__p_f_double_p_q_const__char_p_void__int,
   65826             :   _swigc__p_int,
   65827             :   _swigc__p_long_long,
   65828             :   _swigc__p_p_GByte,
   65829             :   _swigc__p_p_GDALDatasetShadow,
   65830             :   _swigc__p_p_GDALDimensionHS,
   65831             :   _swigc__p_p_GDALEDTComponentHS,
   65832             :   _swigc__p_p_GDALMDArrayHS,
   65833             :   _swigc__p_p_GDALRasterBandShadow,
   65834             :   _swigc__p_p_GDAL_GCP,
   65835             :   _swigc__p_p_GUIntBig,
   65836             :   _swigc__p_p_OGRLayerShadow,
   65837             :   _swigc__p_p_OSRSpatialReferenceShadow,
   65838             :   _swigc__p_p_char,
   65839             :   _swigc__p_p_double,
   65840             :   _swigc__p_p_int,
   65841             :   _swigc__p_p_long_long,
   65842             :   _swigc__p_p_p_GDALAttributeHS,
   65843             :   _swigc__p_p_p_GDALDimensionHS,
   65844             :   _swigc__p_p_p_GDALEDTComponentHS,
   65845             :   _swigc__p_p_p_GDALMDArrayHS,
   65846             :   _swigc__p_p_void,
   65847             :   _swigc__p_size_t,
   65848             :   _swigc__p_vsi_l_offset,
   65849             : };
   65850             : 
   65851             : 
   65852             : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
   65853             : 
   65854             : static swig_const_info swig_const_table[] = {
   65855             : { SWIG_PY_POINTER, "TermProgress", 0, 0, (void *)((int (*)(double,char const *,void *))(GDALTermProgress)), &SWIGTYPE_p_f_double_p_q_const__char_p_void__int },
   65856             : {0, 0, 0, 0.0, 0, 0}};
   65857             : 
   65858             : #ifdef __cplusplus
   65859             : }
   65860             : #endif
   65861             : /* -----------------------------------------------------------------------------
   65862             :  * Type initialization:
   65863             :  * This problem is tough by the requirement that no dynamic
   65864             :  * memory is used. Also, since swig_type_info structures store pointers to
   65865             :  * swig_cast_info structures and swig_cast_info structures store pointers back
   65866             :  * to swig_type_info structures, we need some lookup code at initialization.
   65867             :  * The idea is that swig generates all the structures that are needed.
   65868             :  * The runtime then collects these partially filled structures.
   65869             :  * The SWIG_InitializeModule function takes these initial arrays out of
   65870             :  * swig_module, and does all the lookup, filling in the swig_module.types
   65871             :  * array with the correct data and linking the correct swig_cast_info
   65872             :  * structures together.
   65873             :  *
   65874             :  * The generated swig_type_info structures are assigned statically to an initial
   65875             :  * array. We just loop through that array, and handle each type individually.
   65876             :  * First we lookup if this type has been already loaded, and if so, use the
   65877             :  * loaded structure instead of the generated one. Then we have to fill in the
   65878             :  * cast linked list. The cast data is initially stored in something like a
   65879             :  * two-dimensional array. Each row corresponds to a type (there are the same
   65880             :  * number of rows as there are in the swig_type_initial array). Each entry in
   65881             :  * a column is one of the swig_cast_info structures for that type.
   65882             :  * The cast_initial array is actually an array of arrays, because each row has
   65883             :  * a variable number of columns. So to actually build the cast linked list,
   65884             :  * we find the array of casts associated with the type, and loop through it
   65885             :  * adding the casts to the list. The one last trick we need to do is making
   65886             :  * sure the type pointer in the swig_cast_info struct is correct.
   65887             :  *
   65888             :  * First off, we lookup the cast->type name to see if it is already loaded.
   65889             :  * There are three cases to handle:
   65890             :  *  1) If the cast->type has already been loaded AND the type we are adding
   65891             :  *     casting info to has not been loaded (it is in this module), THEN we
   65892             :  *     replace the cast->type pointer with the type pointer that has already
   65893             :  *     been loaded.
   65894             :  *  2) If BOTH types (the one we are adding casting info to, and the
   65895             :  *     cast->type) are loaded, THEN the cast info has already been loaded by
   65896             :  *     the previous module so we just ignore it.
   65897             :  *  3) Finally, if cast->type has not already been loaded, then we add that
   65898             :  *     swig_cast_info to the linked list (because the cast->type) pointer will
   65899             :  *     be correct.
   65900             :  * ----------------------------------------------------------------------------- */
   65901             : 
   65902             : #ifdef __cplusplus
   65903             : extern "C" {
   65904             : #if 0
   65905             : } /* c-mode */
   65906             : #endif
   65907             : #endif
   65908             : 
   65909             : #if 0
   65910             : #define SWIGRUNTIME_DEBUG
   65911             : #endif
   65912             : 
   65913             : 
   65914             : SWIGRUNTIME void
   65915             : SWIG_InitializeModule(void *clientdata) {
   65916             :   size_t i;
   65917             :   swig_module_info *module_head, *iter;
   65918             :   int init;
   65919             :   
   65920             :   /* check to see if the circular list has been setup, if not, set it up */
   65921             :   if (swig_module.next==0) {
   65922             :     /* Initialize the swig_module */
   65923             :     swig_module.type_initial = swig_type_initial;
   65924             :     swig_module.cast_initial = swig_cast_initial;
   65925             :     swig_module.next = &swig_module;
   65926             :     init = 1;
   65927             :   } else {
   65928             :     init = 0;
   65929             :   }
   65930             :   
   65931             :   /* Try and load any already created modules */
   65932             :   module_head = SWIG_GetModule(clientdata);
   65933             :   if (!module_head) {
   65934             :     /* This is the first module loaded for this interpreter */
   65935             :     /* so set the swig module into the interpreter */
   65936             :     SWIG_SetModule(clientdata, &swig_module);
   65937             :   } else {
   65938             :     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
   65939             :     iter=module_head;
   65940             :     do {
   65941             :       if (iter==&swig_module) {
   65942             :         /* Our module is already in the list, so there's nothing more to do. */
   65943             :         return;
   65944             :       }
   65945             :       iter=iter->next;
   65946             :     } while (iter!= module_head);
   65947             :     
   65948             :     /* otherwise we must add our module into the list */
   65949             :     swig_module.next = module_head->next;
   65950             :     module_head->next = &swig_module;
   65951             :   }
   65952             :   
   65953             :   /* When multiple interpreters are used, a module could have already been initialized in
   65954             :        a different interpreter, but not yet have a pointer in this interpreter.
   65955             :        In this case, we do not want to continue adding types... everything should be
   65956             :        set up already */
   65957             :   if (init == 0) return;
   65958             :   
   65959             :   /* Now work on filling in swig_module.types */
   65960             : #ifdef SWIGRUNTIME_DEBUG
   65961             :   printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
   65962             : #endif
   65963             :   for (i = 0; i < swig_module.size; ++i) {
   65964             :     swig_type_info *type = 0;
   65965             :     swig_type_info *ret;
   65966             :     swig_cast_info *cast;
   65967             :     
   65968             : #ifdef SWIGRUNTIME_DEBUG
   65969             :     printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
   65970             : #endif
   65971             :     
   65972             :     /* if there is another module already loaded */
   65973             :     if (swig_module.next != &swig_module) {
   65974             :       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
   65975             :     }
   65976             :     if (type) {
   65977             :       /* Overwrite clientdata field */
   65978             : #ifdef SWIGRUNTIME_DEBUG
   65979             :       printf("SWIG_InitializeModule: found type %s\n", type->name);
   65980             : #endif
   65981             :       if (swig_module.type_initial[i]->clientdata) {
   65982             :         type->clientdata = swig_module.type_initial[i]->clientdata;
   65983             : #ifdef SWIGRUNTIME_DEBUG
   65984             :         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
   65985             : #endif
   65986             :       }
   65987             :     } else {
   65988             :       type = swig_module.type_initial[i];
   65989             :     }
   65990             :     
   65991             :     /* Insert casting types */
   65992             :     cast = swig_module.cast_initial[i];
   65993             :     while (cast->type) {
   65994             :       /* Don't need to add information already in the list */
   65995             :       ret = 0;
   65996             : #ifdef SWIGRUNTIME_DEBUG
   65997             :       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
   65998             : #endif
   65999             :       if (swig_module.next != &swig_module) {
   66000             :         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
   66001             : #ifdef SWIGRUNTIME_DEBUG
   66002             :         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
   66003             : #endif
   66004             :       }
   66005             :       if (ret) {
   66006             :         if (type == swig_module.type_initial[i]) {
   66007             : #ifdef SWIGRUNTIME_DEBUG
   66008             :           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
   66009             : #endif
   66010             :           cast->type = ret;
   66011             :           ret = 0;
   66012             :         } else {
   66013             :           /* Check for casting already in the list */
   66014             :           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
   66015             : #ifdef SWIGRUNTIME_DEBUG
   66016             :           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
   66017             : #endif
   66018             :           if (!ocast) ret = 0;
   66019             :         }
   66020             :       }
   66021             :       
   66022             :       if (!ret) {
   66023             : #ifdef SWIGRUNTIME_DEBUG
   66024             :         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
   66025             : #endif
   66026             :         if (type->cast) {
   66027             :           type->cast->prev = cast;
   66028             :           cast->next = type->cast;
   66029             :         }
   66030             :         type->cast = cast;
   66031             :       }
   66032             :       cast++;
   66033             :     }
   66034             :     /* Set entry in modules->types array equal to the type */
   66035             :     swig_module.types[i] = type;
   66036             :   }
   66037             :   swig_module.types[i] = 0;
   66038             :   
   66039             : #ifdef SWIGRUNTIME_DEBUG
   66040             :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   66041             :   for (i = 0; i < swig_module.size; ++i) {
   66042             :     int j = 0;
   66043             :     swig_cast_info *cast = swig_module.cast_initial[i];
   66044             :     printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
   66045             :     while (cast->type) {
   66046             :       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
   66047             :       cast++;
   66048             :       ++j;
   66049             :     }
   66050             :     printf("---- Total casts: %d\n",j);
   66051             :   }
   66052             :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   66053             : #endif
   66054             : }
   66055             : 
   66056             : /* This function will propagate the clientdata field of type to
   66057             : * any new swig_type_info structures that have been added into the list
   66058             : * of equivalent types.  It is like calling
   66059             : * SWIG_TypeClientData(type, clientdata) a second time.
   66060             : */
   66061             : SWIGRUNTIME void
   66062             : SWIG_PropagateClientData(void) {
   66063             :   size_t i;
   66064             :   swig_cast_info *equiv;
   66065             :   static int init_run = 0;
   66066             :   
   66067             :   if (init_run) return;
   66068             :   init_run = 1;
   66069             :   
   66070             :   for (i = 0; i < swig_module.size; i++) {
   66071             :     if (swig_module.types[i]->clientdata) {
   66072             :       equiv = swig_module.types[i]->cast;
   66073             :       while (equiv) {
   66074             :         if (!equiv->converter) {
   66075             :           if (equiv->type && !equiv->type->clientdata)
   66076             :           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
   66077             :         }
   66078             :         equiv = equiv->next;
   66079             :       }
   66080             :     }
   66081             :   }
   66082             : }
   66083             : 
   66084             : #ifdef __cplusplus
   66085             : #if 0
   66086             : {
   66087             :   /* c-mode */
   66088             : #endif
   66089             : }
   66090             : #endif
   66091             : 
   66092             : 
   66093             : 
   66094             : #ifdef __cplusplus
   66095             : extern "C" {
   66096             : #endif
   66097             :   
   66098             :   /* Python-specific SWIG API */
   66099             : #define SWIG_newvarlink()                             SWIG_Python_newvarlink()
   66100             : #define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
   66101             : #define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
   66102             :   
   66103             :   /* -----------------------------------------------------------------------------
   66104             :    * global variable support code.
   66105             :    * ----------------------------------------------------------------------------- */
   66106             :   
   66107             :   typedef struct swig_globalvar {
   66108             :     char       *name;                  /* Name of global variable */
   66109             :     PyObject *(*get_attr)(void);       /* Return the current value */
   66110             :     int       (*set_attr)(PyObject *); /* Set the value */
   66111             :     struct swig_globalvar *next;
   66112             :   } swig_globalvar;
   66113             :   
   66114             :   typedef struct swig_varlinkobject {
   66115             :     PyObject_HEAD
   66116             :     swig_globalvar *vars;
   66117             :   } swig_varlinkobject;
   66118             :   
   66119             :   SWIGINTERN PyObject *
   66120             :   swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
   66121             : #if PY_VERSION_HEX >= 0x03000000
   66122             :     return PyUnicode_InternFromString("<Swig global variables>");
   66123             : #else
   66124             :     return PyString_FromString("<Swig global variables>");
   66125             : #endif
   66126             :   }
   66127             :   
   66128             :   SWIGINTERN PyObject *
   66129             :   swig_varlink_str(swig_varlinkobject *v) {
   66130             : #if PY_VERSION_HEX >= 0x03000000
   66131             :     PyObject *str = PyUnicode_InternFromString("(");
   66132             :     PyObject *tail;
   66133             :     PyObject *joined;
   66134             :     swig_globalvar *var;
   66135             :     for (var = v->vars; var; var=var->next) {
   66136             :       tail = PyUnicode_FromString(var->name);
   66137             :       joined = PyUnicode_Concat(str, tail);
   66138             :       Py_DecRef(str);
   66139             :       Py_DecRef(tail);
   66140             :       str = joined;
   66141             :       if (var->next) {
   66142             :         tail = PyUnicode_InternFromString(", ");
   66143             :         joined = PyUnicode_Concat(str, tail);
   66144             :         Py_DecRef(str);
   66145             :         Py_DecRef(tail);
   66146             :         str = joined;
   66147             :       }
   66148             :     }
   66149             :     tail = PyUnicode_InternFromString(")");
   66150             :     joined = PyUnicode_Concat(str, tail);
   66151             :     Py_DecRef(str);
   66152             :     Py_DecRef(tail);
   66153             :     str = joined;
   66154             : #else
   66155             :     PyObject *str = PyString_FromString("(");
   66156             :     swig_globalvar *var;
   66157             :     for (var = v->vars; var; var=var->next) {
   66158             :       PyString_ConcatAndDel(&str,PyString_FromString(var->name));
   66159             :       if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
   66160             :     }
   66161             :     PyString_ConcatAndDel(&str,PyString_FromString(")"));
   66162             : #endif
   66163             :     return str;
   66164             :   }
   66165             :   
   66166             :   SWIGINTERN void
   66167             :   swig_varlink_dealloc(swig_varlinkobject *v) {
   66168             :     swig_globalvar *var = v->vars;
   66169             :     while (var) {
   66170             :       swig_globalvar *n = var->next;
   66171             :       free(var->name);
   66172             :       free(var);
   66173             :       var = n;
   66174             :     }
   66175             :   }
   66176             :   
   66177             :   SWIGINTERN PyObject *
   66178             :   swig_varlink_getattr(swig_varlinkobject *v, char *n) {
   66179             :     PyObject *res = NULL;
   66180             :     swig_globalvar *var = v->vars;
   66181             :     while (var) {
   66182             :       if (strcmp(var->name,n) == 0) {
   66183             :         res = (*var->get_attr)();
   66184             :         break;
   66185             :       }
   66186             :       var = var->next;
   66187             :     }
   66188             :     if (res == NULL && !PyErr_Occurred()) {
   66189             :       PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
   66190             :     }
   66191             :     return res;
   66192             :   }
   66193             :   
   66194             :   SWIGINTERN int
   66195             :   swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
   66196             :     int res = 1;
   66197             :     swig_globalvar *var = v->vars;
   66198             :     while (var) {
   66199             :       if (strcmp(var->name,n) == 0) {
   66200             :         res = (*var->set_attr)(p);
   66201             :         break;
   66202             :       }
   66203             :       var = var->next;
   66204             :     }
   66205             :     if (res == 1 && !PyErr_Occurred()) {
   66206             :       PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
   66207             :     }
   66208             :     return res;
   66209             :   }
   66210             :   
   66211             :   SWIGINTERN PyTypeObject*
   66212             :   swig_varlink_type(void) {
   66213             :     static char varlink__doc__[] = "Swig var link object";
   66214             :     static PyTypeObject varlink_type;
   66215             :     static int type_init = 0;
   66216             :     if (!type_init) {
   66217             :       const PyTypeObject tmp = {
   66218             : #if PY_VERSION_HEX >= 0x03000000
   66219             :         PyVarObject_HEAD_INIT(NULL, 0)
   66220             : #else
   66221             :         PyObject_HEAD_INIT(NULL)
   66222             :         0,                                  /* ob_size */
   66223             : #endif
   66224             :         "swigvarlink",                      /* tp_name */
   66225             :         sizeof(swig_varlinkobject),         /* tp_basicsize */
   66226             :         0,                                  /* tp_itemsize */
   66227             :         (destructor) swig_varlink_dealloc,  /* tp_dealloc */
   66228             :         0,                                  /* tp_print */
   66229             :         (getattrfunc) swig_varlink_getattr, /* tp_getattr */
   66230             :         (setattrfunc) swig_varlink_setattr, /* tp_setattr */
   66231             :         0,                                  /* tp_compare */
   66232             :         (reprfunc) swig_varlink_repr,       /* tp_repr */
   66233             :         0,                                  /* tp_as_number */
   66234             :         0,                                  /* tp_as_sequence */
   66235             :         0,                                  /* tp_as_mapping */
   66236             :         0,                                  /* tp_hash */
   66237             :         0,                                  /* tp_call */
   66238             :         (reprfunc) swig_varlink_str,        /* tp_str */
   66239             :         0,                                  /* tp_getattro */
   66240             :         0,                                  /* tp_setattro */
   66241             :         0,                                  /* tp_as_buffer */
   66242             :         0,                                  /* tp_flags */
   66243             :         varlink__doc__,                     /* tp_doc */
   66244             :         0,                                  /* tp_traverse */
   66245             :         0,                                  /* tp_clear */
   66246             :         0,                                  /* tp_richcompare */
   66247             :         0,                                  /* tp_weaklistoffset */
   66248             :         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
   66249             :         0,                                  /* tp_del */
   66250             :         0,                                  /* tp_version_tag */
   66251             : #if PY_VERSION_HEX >= 0x03040000
   66252             :         0,                                  /* tp_finalize */
   66253             : #endif
   66254             : #ifdef COUNT_ALLOCS
   66255             :         0,                                  /* tp_allocs */
   66256             :         0,                                  /* tp_frees */
   66257             :         0,                                  /* tp_maxalloc */
   66258             :         0,                                  /* tp_prev */
   66259             :         0                                   /* tp_next */
   66260             : #endif
   66261             :       };
   66262             :       varlink_type = tmp;
   66263             :       type_init = 1;
   66264             :       if (PyType_Ready(&varlink_type) < 0)
   66265             :       return NULL;
   66266             :     }
   66267             :     return &varlink_type;
   66268             :   }
   66269             :   
   66270             :   /* Create a variable linking object for use later */
   66271             :   SWIGINTERN PyObject *
   66272             :   SWIG_Python_newvarlink(void) {
   66273             :     swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
   66274             :     if (result) {
   66275             :       result->vars = 0;
   66276             :     }
   66277             :     return ((PyObject*) result);
   66278             :   }
   66279             :   
   66280             :   SWIGINTERN void 
   66281             :   SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
   66282             :     swig_varlinkobject *v = (swig_varlinkobject *) p;
   66283             :     swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
   66284             :     if (gv) {
   66285             :       size_t size = strlen(name)+1;
   66286             :       gv->name = (char *)malloc(size);
   66287             :       if (gv->name) {
   66288             :         memcpy(gv->name, name, size);
   66289             :         gv->get_attr = get_attr;
   66290             :         gv->set_attr = set_attr;
   66291             :         gv->next = v->vars;
   66292             :       }
   66293             :     }
   66294             :     v->vars = gv;
   66295             :   }
   66296             :   
   66297             :   SWIGINTERN PyObject *
   66298             :   SWIG_globals(void) {
   66299             :     static PyObject *globals = 0;
   66300             :     if (!globals) {
   66301             :       globals = SWIG_newvarlink();
   66302             :     }
   66303             :     return globals;
   66304             :   }
   66305             :   
   66306             :   /* -----------------------------------------------------------------------------
   66307             :    * constants/methods manipulation
   66308             :    * ----------------------------------------------------------------------------- */
   66309             :   
   66310             :   /* Install Constants */
   66311             :   SWIGINTERN void
   66312         276 :   SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
   66313         276 :     PyObject *obj = 0;
   66314         276 :     size_t i;
   66315         552 :     for (i = 0; constants[i].type; ++i) {
   66316         276 :       switch(constants[i].type) {
   66317         276 :       case SWIG_PY_POINTER:
   66318         276 :         obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
   66319         276 :         break;
   66320           0 :       case SWIG_PY_BINARY:
   66321           0 :         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
   66322             :         break;
   66323             :       default:
   66324             :         obj = 0;
   66325             :         break;
   66326             :       }
   66327         276 :       if (obj) {
   66328         276 :         PyDict_SetItemString(d, constants[i].name, obj);
   66329         276 :         Py_DECREF(obj);
   66330             :       }
   66331             :     }
   66332         276 :   }
   66333             :   
   66334             :   /* -----------------------------------------------------------------------------*/
   66335             :   /* Fix SwigMethods to carry the callback ptrs when needed */
   66336             :   /* -----------------------------------------------------------------------------*/
   66337             :   
   66338             :   SWIGINTERN void
   66339         276 :   SWIG_Python_FixMethods(PyMethodDef *methods,
   66340             :     swig_const_info *const_table,
   66341             :     swig_type_info **types,
   66342             :     swig_type_info **types_initial) {
   66343         276 :     size_t i;
   66344      218316 :     for (i = 0; methods[i].ml_name; ++i) {
   66345      218040 :       const char *c = methods[i].ml_doc;
   66346      218040 :       if (!c) continue;
   66347      199824 :       c = strstr(c, "swig_ptr: ");
   66348      199824 :       if (c) {
   66349           0 :         int j;
   66350           0 :         swig_const_info *ci = 0;
   66351           0 :         const char *name = c + 10;
   66352           0 :         for (j = 0; const_table[j].type; ++j) {
   66353           0 :           if (strncmp(const_table[j].name, name, 
   66354             :               strlen(const_table[j].name)) == 0) {
   66355             :             ci = &(const_table[j]);
   66356             :             break;
   66357             :           }
   66358             :         }
   66359           0 :         if (ci) {
   66360      218040 :           void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
   66361           0 :           if (ptr) {
   66362           0 :             size_t shift = (ci->ptype) - types;
   66363           0 :             swig_type_info *ty = types_initial[shift];
   66364           0 :             size_t ldoc = (c - methods[i].ml_doc);
   66365           0 :             size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
   66366           0 :             char *ndoc = (char*)malloc(ldoc + lptr + 10);
   66367           0 :             if (ndoc) {
   66368           0 :               char *buff = ndoc;
   66369           0 :               memcpy(buff, methods[i].ml_doc, ldoc);
   66370           0 :               buff += ldoc;
   66371           0 :               memcpy(buff, "swig_ptr: ", 10);
   66372           0 :               buff += 10;
   66373           0 :               SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
   66374           0 :               methods[i].ml_doc = ndoc;
   66375             :             }
   66376             :           }
   66377             :         }
   66378             :       }
   66379             :     }
   66380         276 :   } 
   66381             :   
   66382             :   /* -----------------------------------------------------------------------------
   66383             :    * Method creation and docstring support functions
   66384             :    * ----------------------------------------------------------------------------- */
   66385             :   
   66386             :   /* -----------------------------------------------------------------------------
   66387             :    * Function to find the method definition with the correct docstring for the
   66388             :    * proxy module as opposed to the low-level API
   66389             :    * ----------------------------------------------------------------------------- */
   66390             :   
   66391           0 :   SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
   66392             :     /* Find the function in the modified method table */
   66393           0 :     size_t offset = 0;
   66394           0 :     int found = 0;
   66395           0 :     while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
   66396           0 :       if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
   66397             :         found = 1;
   66398             :         break;
   66399             :       }
   66400           0 :       offset++;
   66401             :     }
   66402             :     /* Use the copy with the modified docstring if available */
   66403           0 :     return found ? &SwigMethods_proxydocs[offset] : NULL;
   66404             :   }
   66405             :   
   66406             :   /* -----------------------------------------------------------------------------
   66407             :    * Wrapper of PyInstanceMethod_New() used in Python 3
   66408             :    * It is exported to the generated module, used for -fastproxy
   66409             :    * ----------------------------------------------------------------------------- */
   66410             :   
   66411           0 :   SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
   66412           0 :     if (PyCFunction_Check(func)) {
   66413           0 :       PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
   66414           0 :       PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
   66415           0 :       if (ml)
   66416           0 :       func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
   66417             :     }
   66418             : #if PY_VERSION_HEX >= 0x03000000
   66419           0 :     return PyInstanceMethod_New(func);
   66420             : #else
   66421             :     return PyMethod_New(func, NULL, NULL);
   66422             : #endif
   66423             :   }
   66424             :   
   66425             :   /* -----------------------------------------------------------------------------
   66426             :    * Wrapper of PyStaticMethod_New()
   66427             :    * It is exported to the generated module, used for -fastproxy
   66428             :    * ----------------------------------------------------------------------------- */
   66429             :   
   66430             :   SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
   66431             :     if (PyCFunction_Check(func)) {
   66432             :       PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
   66433             :       PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
   66434             :       if (ml)
   66435             :       func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
   66436             :     }
   66437             :     return PyStaticMethod_New(func);
   66438             :   }
   66439             :   
   66440             : #ifdef __cplusplus
   66441             : }
   66442             : #endif
   66443             : 
   66444             : /* -----------------------------------------------------------------------------*
   66445             :  *  Partial Init method
   66446             :  * -----------------------------------------------------------------------------*/
   66447             : 
   66448             : #ifdef __cplusplus
   66449             : extern "C"
   66450             : #endif
   66451             : 
   66452             : SWIGEXPORT 
   66453             : #if PY_VERSION_HEX >= 0x03000000
   66454             : PyObject*
   66455             : #else
   66456             : void
   66457             : #endif
   66458         276 : SWIG_init(void) {
   66459         276 :   PyObject *m, *d, *md, *globals;
   66460             :   
   66461             : #if PY_VERSION_HEX >= 0x03000000
   66462         276 :   static struct PyModuleDef SWIG_module = {
   66463             :     PyModuleDef_HEAD_INIT,
   66464             :     SWIG_name,
   66465             :     NULL,
   66466             :     -1,
   66467             :     SwigMethods,
   66468             :     NULL,
   66469             :     NULL,
   66470             :     NULL,
   66471             :     NULL
   66472             :   };
   66473             : #endif
   66474             :   
   66475             : #if defined(SWIGPYTHON_BUILTIN)
   66476             :   static SwigPyClientData SwigPyObject_clientdata = {
   66477             :     0, 0, 0, 0, 0, 0, 0
   66478             :   };
   66479             :   static PyGetSetDef this_getset_def = {
   66480             :     (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
   66481             :   };
   66482             :   static SwigPyGetSet thisown_getset_closure = {
   66483             :     SwigPyObject_own,
   66484             :     SwigPyObject_own
   66485             :   };
   66486             :   static PyGetSetDef thisown_getset_def = {
   66487             :     (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
   66488             :   };
   66489             :   PyTypeObject *builtin_pytype;
   66490             :   int builtin_base_count;
   66491             :   swig_type_info *builtin_basetype;
   66492             :   PyObject *tuple;
   66493             :   PyGetSetDescrObject *static_getset;
   66494             :   PyTypeObject *metatype;
   66495             :   PyTypeObject *swigpyobject;
   66496             :   SwigPyClientData *cd;
   66497             :   PyObject *public_interface, *public_symbol;
   66498             :   PyObject *this_descr;
   66499             :   PyObject *thisown_descr;
   66500             :   PyObject *self = 0;
   66501             :   int i;
   66502             :   
   66503             :   (void)builtin_pytype;
   66504             :   (void)builtin_base_count;
   66505             :   (void)builtin_basetype;
   66506             :   (void)tuple;
   66507             :   (void)static_getset;
   66508             :   (void)self;
   66509             :   
   66510             :   /* Metaclass is used to implement static member variables */
   66511             :   metatype = SwigPyObjectType();
   66512             :   assert(metatype);
   66513             : #endif
   66514             :   
   66515         276 :   (void)globals;
   66516             :   
   66517             :   /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
   66518         276 :   SWIG_This();
   66519         276 :   SWIG_Python_TypeCache();
   66520         276 :   SwigPyPacked_type();
   66521             : #ifndef SWIGPYTHON_BUILTIN
   66522         276 :   SwigPyObject_type();
   66523             : #endif
   66524             :   
   66525             :   /* Fix SwigMethods to carry the callback ptrs when needed */
   66526         276 :   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   66527             :   
   66528             : #if PY_VERSION_HEX >= 0x03000000
   66529         276 :   m = PyModule_Create(&SWIG_module);
   66530             : #else
   66531             :   m = Py_InitModule(SWIG_name, SwigMethods);
   66532             : #endif
   66533             :   
   66534         276 :   md = d = PyModule_GetDict(m);
   66535         276 :   (void)md;
   66536             :   
   66537         276 :   SWIG_InitializeModule(0);
   66538             :   
   66539             : #ifdef SWIGPYTHON_BUILTIN
   66540             :   swigpyobject = SwigPyObject_TypeOnce();
   66541             :   
   66542             :   SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
   66543             :   assert(SwigPyObject_stype);
   66544             :   cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
   66545             :   if (!cd) {
   66546             :     SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
   66547             :     SwigPyObject_clientdata.pytype = swigpyobject;
   66548             :   } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
   66549             :     PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
   66550             : # if PY_VERSION_HEX >= 0x03000000
   66551             :     return NULL;
   66552             : # else
   66553             :     return;
   66554             : # endif
   66555             :   }
   66556             :   
   66557             :   /* All objects have a 'this' attribute */
   66558             :   this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
   66559             :   (void)this_descr;
   66560             :   
   66561             :   /* All objects have a 'thisown' attribute */
   66562             :   thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
   66563             :   (void)thisown_descr;
   66564             :   
   66565             :   public_interface = PyList_New(0);
   66566             :   public_symbol = 0;
   66567             :   (void)public_symbol;
   66568             :   
   66569             :   PyDict_SetItemString(md, "__all__", public_interface);
   66570             :   Py_DECREF(public_interface);
   66571             :   for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
   66572             :   SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
   66573             :   for (i = 0; swig_const_table[i].name != 0; ++i)
   66574             :   SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
   66575             : #endif
   66576             :   
   66577         276 :   SWIG_InstallConstants(d,swig_const_table);
   66578             :   
   66579             :   
   66580             :   /* gdal_python.i %init code */
   66581         276 :   if ( GDALGetDriverCount() == 0 ) {
   66582         276 :     GDALAllRegister();
   66583             :   }
   66584             :   // Will be turned on for GDAL 4.0
   66585             :   // UseExceptions();
   66586             :   
   66587             :   
   66588         276 :   SWIG_Python_SetConstant(d, "VSI_STAT_EXISTS_FLAG",SWIG_From_int(static_cast< int >(0x1)));
   66589         276 :   SWIG_Python_SetConstant(d, "VSI_STAT_NATURE_FLAG",SWIG_From_int(static_cast< int >(0x2)));
   66590         276 :   SWIG_Python_SetConstant(d, "VSI_STAT_SIZE_FLAG",SWIG_From_int(static_cast< int >(0x4)));
   66591         276 :   SWIG_Python_SetConstant(d, "VSI_STAT_SET_ERROR_FLAG",SWIG_From_int(static_cast< int >(0x8)));
   66592         276 :   SWIG_Python_SetConstant(d, "VSI_STAT_CACHE_ONLY",SWIG_From_int(static_cast< int >(0x10)));
   66593         276 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_UNKNOWN",SWIG_From_int(static_cast< int >(0)));
   66594         276 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_DATA",SWIG_From_int(static_cast< int >(1)));
   66595         276 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_HOLE",SWIG_From_int(static_cast< int >(2)));
   66596         276 :   SWIG_Python_SetConstant(d, "GEDTST_NONE",SWIG_From_int(static_cast< int >(GEDTST_NONE)));
   66597         276 :   SWIG_Python_SetConstant(d, "GEDTST_JSON",SWIG_From_int(static_cast< int >(GEDTST_JSON)));
   66598         276 :   SWIG_Python_SetConstant(d, "GEDTC_NUMERIC",SWIG_From_int(static_cast< int >(GEDTC_NUMERIC)));
   66599         276 :   SWIG_Python_SetConstant(d, "GEDTC_STRING",SWIG_From_int(static_cast< int >(GEDTC_STRING)));
   66600         276 :   SWIG_Python_SetConstant(d, "GEDTC_COMPOUND",SWIG_From_int(static_cast< int >(GEDTC_COMPOUND)));
   66601             :   
   66602         276 :   SWIG_Python_SetConstant(d, "GVM_Diagonal",SWIG_From_int(static_cast< int >(GVM_Diagonal)));
   66603         276 :   SWIG_Python_SetConstant(d, "GVM_Edge",SWIG_From_int(static_cast< int >(GVM_Edge)));
   66604         276 :   SWIG_Python_SetConstant(d, "GVM_Max",SWIG_From_int(static_cast< int >(GVM_Max)));
   66605         276 :   SWIG_Python_SetConstant(d, "GVM_Min",SWIG_From_int(static_cast< int >(GVM_Min)));
   66606         276 :   SWIG_Python_SetConstant(d, "GVOT_NORMAL",SWIG_From_int(static_cast< int >(GVOT_NORMAL)));
   66607         276 :   SWIG_Python_SetConstant(d, "GVOT_MIN_TARGET_HEIGHT_FROM_DEM",SWIG_From_int(static_cast< int >(GVOT_MIN_TARGET_HEIGHT_FROM_DEM)));
   66608         276 :   SWIG_Python_SetConstant(d, "GVOT_MIN_TARGET_HEIGHT_FROM_GROUND",SWIG_From_int(static_cast< int >(GVOT_MIN_TARGET_HEIGHT_FROM_GROUND)));
   66609             :   
   66610             :   /* Initialize threading */
   66611         276 :   SWIG_PYTHON_INITIALIZE_THREADS;
   66612             : #if PY_VERSION_HEX >= 0x03000000
   66613         276 :   return m;
   66614             : #else
   66615             :   return;
   66616             : #endif
   66617             : }
   66618             : 

Generated by: LCOV version 1.14