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: 28170 35582 79.2 %
Date: 2025-09-10 17:48:50 Functions: 1009 1098 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       68293 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
     449       68293 :   if (ty) {
     450       68293 :     swig_cast_info *iter = ty->cast;
     451       72234 :     while (iter) {
     452       72233 :       if (strcmp(iter->type->name, c) == 0) {
     453       68292 :         if (iter == ty->cast)
     454             :           return iter;
     455             :         /* Move iter to the top of the linked list */
     456        2820 :         iter->prev->next = iter->next;
     457        2820 :         if (iter->next)
     458        2707 :           iter->next->prev = iter->prev;
     459        2820 :         iter->next = ty->cast;
     460        2820 :         iter->prev = 0;
     461        2820 :         if (ty->cast) ty->cast->prev = iter;
     462        2820 :         ty->cast = iter;
     463        2820 :         return iter;
     464             :       }
     465        3941 :       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       68292 : SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
     503       68292 :   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      376541 : 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      376541 :   if (!type) return NULL;
     539      376541 :   if (type->str != NULL) {
     540             :     const char *last_name = type->str;
     541             :     const char *s;
     542     8661790 :     for (s = type->str; *s; s++)
     543     8285250 :       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       12188 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
     571       12188 :   SWIG_TypeClientData(ti, clientdata);
     572       12188 :   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          53 : SWIG_MangledTypeQueryModule(swig_module_info *start,
     585             :                             swig_module_info *end,
     586             :                 const char *name) {
     587          53 :   swig_module_info *iter = start;
     588          53 :   do {
     589          53 :     if (iter->size) {
     590          53 :       size_t l = 0;
     591          53 :       size_t r = iter->size - 1;
     592         265 :       do {
     593             :   /* since l+r >= 0, we can (>> 1) instead (/ 2) */
     594         265 :   size_t i = (l + r) >> 1;
     595         265 :   const char *iname = iter->types[i]->name;
     596         265 :   if (iname) {
     597         265 :     int compare = strcmp(name, iname);
     598         265 :     if (compare == 0) {
     599          53 :       return iter->types[i];
     600         212 :     } else if (compare < 0) {
     601          53 :       if (i) {
     602          53 :         r = i - 1;
     603             :       } else {
     604             :         break;
     605             :       }
     606         159 :     } else if (compare > 0) {
     607         159 :       l = i + 1;
     608             :     }
     609             :   } else {
     610             :     break; /* should never happen */
     611             :   }
     612         212 :       } 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          53 : 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          53 :   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
     634          53 :   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         330 : SWIG_Python_str_FromChar(const char *c)
     839             : {
     840             : #if PY_VERSION_HEX >= 0x03000000
     841         330 :   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        2472 : SWIG_Python_ErrorType(int code) {
     868        2472 :   PyObject* type = 0;
     869          26 :   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        2278 :   case SWIG_RuntimeError:
     877        2278 :     type = PyExc_RuntimeError;
     878           0 :     break;
     879           0 :   case SWIG_IndexError:
     880           0 :     type = PyExc_IndexError;
     881           0 :     break;
     882          26 :   case SWIG_TypeError:
     883          26 :     type = PyExc_TypeError;
     884          26 :     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         168 :   case SWIG_ValueError:
     895         168 :     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        2278 :   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      842918 :          SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
     987       31388 :          ~SWIG_Python_Thread_Block() { end(); }
     988             :        };
     989             :        class SWIG_Python_Thread_Allow {
     990             :          bool status;
     991             :          PyThreadState *save;
     992             :        public:
     993     7979410 :          void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
     994     7979410 :          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        2475 : SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
    1143        2475 :   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    1144        2475 :   PyErr_SetString(errtype, msg);
    1145        2475 :   SWIG_PYTHON_THREAD_END_BLOCK;
    1146        2475 : }
    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       10526 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
    1173       10526 :   PyDict_SetItemString(d, name, obj);
    1174       10526 :   Py_DECREF(obj);                            
    1175       10526 : }
    1176             : 
    1177             : #endif
    1178             : 
    1179             : /* Append a value to the result obj */
    1180             : 
    1181             : SWIGINTERN PyObject*
    1182      430402 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
    1183      430402 :   if (!result) {
    1184             :     result = obj;
    1185      430090 :   } else if (result == Py_None) {
    1186      417498 :     Py_DECREF(result);
    1187             :     result = obj;
    1188             :   } else {
    1189       12592 :     if (!PyList_Check(result)) {
    1190       11840 :       PyObject *o2 = result;
    1191       11840 :       result = PyList_New(1);
    1192       11840 :       PyList_SetItem(result, 0, o2);
    1193             :     }
    1194       12592 :     PyList_Append(result,obj);
    1195       12592 :     Py_DECREF(obj);
    1196             :   }
    1197      430402 :   return result;
    1198             : }
    1199             : 
    1200             : /* Unpack the argument tuple */
    1201             : 
    1202             : SWIGINTERN Py_ssize_t
    1203     1477170 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
    1204             : {
    1205     1477170 :   if (!args) {
    1206      116672 :     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     1360500 :   if (!PyTuple_Check(args)) {
    1215       12188 :     if (min <= 1 && max >= 1) {
    1216       12188 :       Py_ssize_t i;
    1217       12188 :       objs[0] = args;
    1218       12188 :       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     1348310 :     Py_ssize_t l = PyTuple_GET_SIZE(args);
    1227     1348310 :     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     1348310 :     } 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     4789830 :       for (i = 0; i < l; ++i) {
    1238     3441520 :   objs[i] = PyTuple_GET_ITEM(args, i);
    1239             :       }
    1240     1743540 :       for (; l < max; ++l) {
    1241      395230 :   objs[l] = 0;
    1242             :       }
    1243     1348310 :       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      697137 : SWIG_Py_Void(void)
    1282             : {
    1283      697137 :   PyObject *none = Py_None;
    1284           0 :   Py_INCREF(none);
    1285       99615 :   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       12188 : SwigPyClientData_New(PyObject* obj)
    1320             : {
    1321       12188 :   if (!obj) {
    1322             :     return 0;
    1323             :   } else {
    1324       12188 :     SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    1325             :     /* the klass element */
    1326       12188 :     data->klass = obj;
    1327       12188 :     Py_INCREF(data->klass);
    1328             :     /* the newraw method and newargs arguments used to create a new raw instance */
    1329       12188 :     if (PyClass_Check(obj)) {
    1330       12188 :       data->newraw = 0;
    1331       12188 :       data->newargs = obj;
    1332       12188 :       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       12188 :     data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
    1346       12188 :     if (PyErr_Occurred()) {
    1347        1385 :       PyErr_Clear();
    1348        1385 :       data->destroy = 0;
    1349             :     }
    1350       12188 :     if (data->destroy) {
    1351       10803 :       int flags;
    1352       10803 :       Py_INCREF(data->destroy);
    1353       10803 :       flags = PyCFunction_GET_FLAGS(data->destroy);
    1354       10803 :       data->delargs = !(flags & (METH_O));
    1355             :     } else {
    1356        1385 :       data->delargs = 0;
    1357             :     }
    1358       12188 :     data->implicitconv = 0;
    1359       12188 :     data->pytype = 0;
    1360       12188 :     return data;
    1361             :   }
    1362             : }
    1363             : 
    1364             : SWIGRUNTIME void 
    1365       14127 : SwigPyClientData_Del(SwigPyClientData *data) {
    1366       14127 :   Py_XDECREF(data->newraw);
    1367       14127 :   Py_XDECREF(data->newargs);
    1368       14127 :   Py_XDECREF(data->destroy);
    1369       14127 : }
    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      376541 : SwigPyObject_repr(SwigPyObject *v)
    1443             : {
    1444      376541 :   const char *name = SWIG_TypePrettyName(v->ty);
    1445      376541 :   PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
    1446      376541 :   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      376541 :   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     8561240 : SwigPyObject_type(void) {
    1506     8561240 :   static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
    1507     8561240 :   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      604569 : SwigPyObject_dealloc(PyObject *v)
    1529             : {
    1530      604569 :   SwigPyObject *sobj = (SwigPyObject *) v;
    1531      604569 :   PyObject *next = sobj->next;
    1532      604569 :   if (sobj->own == SWIG_POINTER_OWN) {
    1533       95731 :     swig_type_info *ty = sobj->ty;
    1534       95731 :     SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    1535       95731 :     PyObject *destroy = data ? data->destroy : 0;
    1536       95731 :     if (destroy) {
    1537             :       /* destroy is always a VARARGS method */
    1538       95731 :       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       95731 :       PyObject *type = NULL, *value = NULL, *traceback = NULL;
    1548       95731 :       PyErr_Fetch(&type, &value, &traceback);
    1549             : 
    1550       95731 :       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       95731 :         PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
    1557       95731 :         PyObject *mself = PyCFunction_GET_SELF(destroy);
    1558       95731 :         res = ((*meth)(mself, v));
    1559             :       }
    1560       95731 :       if (!res)
    1561           0 :         PyErr_WriteUnraisable(destroy);
    1562             : 
    1563       95731 :       PyErr_Restore(type, value, traceback);
    1564             : 
    1565      191462 :       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      604569 :   Py_XDECREF(next);
    1575      604569 :   PyObject_DEL(v);
    1576      604569 : }
    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        6127 : SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    1605             : {
    1606        6127 :   SwigPyObject *sobj = (SwigPyObject *)v;
    1607        6127 :   sobj->own = 0;
    1608        6127 :   return SWIG_Py_Void();
    1609             : }
    1610             : 
    1611             : SWIGINTERN PyObject*
    1612         541 : SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    1613             : {
    1614         541 :   SwigPyObject *sobj = (SwigPyObject *)v;
    1615         541 :   sobj->own = SWIG_POINTER_OWN;
    1616         541 :   return SWIG_Py_Void();
    1617             : }
    1618             : 
    1619             : SWIGINTERN PyObject*
    1620       10048 : SwigPyObject_own(PyObject *v, PyObject *args)
    1621             : {
    1622       10048 :   PyObject *val = 0;
    1623       10048 :   if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
    1624             :     return NULL;
    1625             :   } else {
    1626       10048 :     SwigPyObject *sobj = (SwigPyObject *)v;
    1627       10048 :     PyObject *obj = PyBool_FromLong(sobj->own);
    1628       10048 :     if (val) {
    1629        6668 :       if (PyObject_IsTrue(val)) {
    1630         541 :         SwigPyObject_acquire(v,args);
    1631             :       } else {
    1632        6127 :         SwigPyObject_disown(v,args);
    1633             :       }
    1634             :     } 
    1635       10048 :     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         277 : SwigPyObject_TypeOnce(void) {
    1652         277 :   static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
    1653             : 
    1654         277 :   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         277 :   static PyTypeObject swigpyobject_type;
    1699         277 :   static int type_init = 0;
    1700         277 :   if (!type_init) {
    1701         277 :     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         277 :     swigpyobject_type = tmp;
    1770         277 :     type_init = 1;
    1771         277 :     if (PyType_Ready(&swigpyobject_type) < 0)
    1772           0 :       return NULL;
    1773             :   }
    1774             :   return &swigpyobject_type;
    1775             : }
    1776             : 
    1777             : SWIGRUNTIME PyObject *
    1778      604642 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
    1779             : {
    1780      604642 :   SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
    1781      604642 :   if (sobj) {
    1782      604642 :     sobj->ptr  = ptr;
    1783      604642 :     sobj->ty   = ty;
    1784      604642 :     sobj->own  = own;
    1785      604642 :     sobj->next = 0;
    1786             :   }
    1787      604642 :   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         277 : SwigPyPacked_type(void) {
    1836         277 :   static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
    1837         277 :   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         277 : SwigPyPacked_TypeOnce(void) {
    1858         277 :   static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
    1859         277 :   static PyTypeObject swigpypacked_type;
    1860         277 :   static int type_init = 0;
    1861         277 :   if (!type_init) {
    1862         277 :     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         277 :     swigpypacked_type = tmp;
    1931         277 :     type_init = 1;
    1932         277 :     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     3634210 : SWIG_This(void)
    1978             : {
    1979     3634210 :   if (Swig_This_global == NULL)
    1980         277 :     Swig_This_global = SWIG_Python_str_FromChar("this");
    1981     3634210 :   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     3728740 : SWIG_Python_GetSwigThis(PyObject *pyobj) 
    1993             : {
    1994     3728760 :   PyObject *obj;
    1995             : 
    1996     3728760 :   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     3629330 :   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     3629330 :   obj = PyObject_GetAttr(pyobj,SWIG_This());
    2039     3629330 :   if (obj) {
    2040     3622920 :     Py_DECREF(obj);
    2041             :   } else {
    2042        6411 :     if (PyErr_Occurred()) PyErr_Clear();
    2043        6411 :     return 0;
    2044             :   }
    2045             : #endif
    2046     3622920 :   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     3744360 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
    2074     3744360 :   int res;
    2075     3744360 :   SwigPyObject *sobj;
    2076     3744360 :   int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
    2077             : 
    2078     3744360 :   if (!obj)
    2079             :     return SWIG_ERROR;
    2080     3744360 :   if (obj == Py_None && !implicit_conv) {
    2081       19946 :     if (ptr)
    2082       19946 :       *ptr = 0;
    2083       39892 :     return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
    2084             :   }
    2085             : 
    2086     3724410 :   res = SWIG_ERROR;
    2087             : 
    2088     3724410 :   sobj = SWIG_Python_GetSwigThis(obj);
    2089     3724410 :   if (own)
    2090           0 :     *own = 0;
    2091     3724410 :   while (sobj) {
    2092     3722330 :     void *vptr = sobj->ptr;
    2093     3722330 :     if (ty) {
    2094     3722330 :       swig_type_info *to = sobj->ty;
    2095     3722330 :       if (to == ty) {
    2096             :         /* no type cast needed */
    2097     3654040 :         if (ptr) *ptr = vptr;
    2098             :         break;
    2099             :       } else {
    2100       68293 :         swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
    2101       68293 :         if (!tc) {
    2102           1 :           sobj = (SwigPyObject *)sobj->next;
    2103             :         } else {
    2104       68292 :           if (ptr) {
    2105       68292 :             int newmemory = 0;
    2106       68292 :             *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
    2107       68292 :             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     3724410 :   if (sobj) {
    2122     3722330 :     if (own)
    2123           0 :       *own = *own | sobj->own;
    2124     3722330 :     if (flags & SWIG_POINTER_DISOWN) {
    2125      102056 :       sobj->own = 0;
    2126             :     }
    2127             :     res = SWIG_OK;
    2128             :   } else {
    2129        2083 :     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        4329 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
    2281             : {
    2282        4329 :  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        4329 :  dict = PyObject_GetAttrString(inst, "__dict__");
    2296        4329 :  PyDict_SetItem(dict, SWIG_This(), swig_this);
    2297        4329 :  Py_DECREF(dict);
    2298        4329 : } 
    2299             : 
    2300             : 
    2301             : SWIGINTERN PyObject *
    2302        4329 : SWIG_Python_InitShadowInstance(PyObject *args) {
    2303        4329 :   PyObject *obj[2];
    2304        4329 :   if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
    2305             :     return NULL;
    2306             :   } else {
    2307        4329 :     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
    2308        4329 :     if (sthis) {
    2309           0 :       SwigPyObject_append((PyObject*) sthis, obj[1]);
    2310             :     } else {
    2311        4329 :       SWIG_Python_SetSwigThis(obj[0], obj[1]);
    2312             :     }
    2313        4329 :     return SWIG_Py_Void();
    2314             :   }
    2315             : }
    2316             : 
    2317             : /* Create a new pointer object */
    2318             : 
    2319             : SWIGRUNTIME PyObject *
    2320      622735 : SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
    2321      622735 :   SwigPyClientData *clientdata;
    2322      622735 :   PyObject * robj;
    2323      622735 :   int own;
    2324             : 
    2325      622735 :   if (!ptr)
    2326       18093 :     return SWIG_Py_Void();
    2327             : 
    2328      604642 :   clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
    2329      604642 :   own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
    2330      604642 :   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      604642 :   assert(!(flags & SWIG_BUILTIN_TP_INIT));
    2361             : 
    2362      604642 :   robj = SwigPyObject_New(ptr, type, own);
    2363      604642 :   if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    2364      600003 :     PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    2365      600003 :     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         277 : SWIG_Python_DestroyModule(PyObject *obj)
    2406             : {
    2407         277 :   swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
    2408         277 :   swig_type_info **types = swig_module->types;
    2409         277 :   size_t i;
    2410       25761 :   for (i =0; i < swig_module->size; ++i) {
    2411       25484 :     swig_type_info *ty = types[i];
    2412       25484 :     if (ty->owndata) {
    2413       14127 :       SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
    2414       14127 :       if (data) SwigPyClientData_Del(data);
    2415             :     }
    2416             :   }
    2417         277 :   Py_DECREF(SWIG_This());
    2418         277 :   Swig_This_global = NULL;
    2419         277 : }
    2420             : 
    2421             : SWIGRUNTIME void
    2422         277 : SWIG_Python_SetModule(swig_module_info *swig_module) {
    2423             : #if PY_VERSION_HEX >= 0x03000000
    2424             :  /* Add a dummy module object into sys.modules */
    2425         277 :   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         277 :   PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
    2431         277 :   if (pointer && module) {
    2432         277 :     PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
    2433             :   } else {
    2434           0 :     Py_XDECREF(pointer);
    2435             :   }
    2436         277 : }
    2437             : 
    2438             : /* The python cached type query */
    2439             : SWIGRUNTIME PyObject *
    2440         330 : SWIG_Python_TypeCache(void) {
    2441         330 :   static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
    2442         330 :   return cache;
    2443             : }
    2444             : 
    2445             : SWIGRUNTIME swig_type_info *
    2446          53 : SWIG_Python_TypeQuery(const char *type)
    2447             : {
    2448          53 :   PyObject *cache = SWIG_Python_TypeCache();
    2449          53 :   PyObject *key = SWIG_Python_str_FromChar(type); 
    2450          53 :   PyObject *obj = PyDict_GetItem(cache, key);
    2451          53 :   swig_type_info *descriptor;
    2452          53 :   if (obj) {
    2453           0 :     descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
    2454             :   } else {
    2455          53 :     swig_module_info *swig_module = SWIG_GetModule(0);
    2456          53 :     descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
    2457          53 :     if (descriptor) {
    2458          53 :       obj = PyCapsule_New((void*) descriptor, NULL, NULL);
    2459          53 :       PyDict_SetItem(cache, key, obj);
    2460          53 :       Py_DECREF(obj);
    2461             :     }
    2462             :   }
    2463          53 :   Py_DECREF(key);
    2464          53 :   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_GDALComputedRasterBandShadow swig_types[14]
    2680             : #define SWIGTYPE_p_GDALContourOptions swig_types[15]
    2681             : #define SWIGTYPE_p_GDALDEMProcessingOptions swig_types[16]
    2682             : #define SWIGTYPE_p_GDALDatasetShadow swig_types[17]
    2683             : #define SWIGTYPE_p_GDALDimensionHS swig_types[18]
    2684             : #define SWIGTYPE_p_GDALDriverShadow swig_types[19]
    2685             : #define SWIGTYPE_p_GDALEDTComponentHS swig_types[20]
    2686             : #define SWIGTYPE_p_GDALExtendedDataTypeClass swig_types[21]
    2687             : #define SWIGTYPE_p_GDALExtendedDataTypeHS swig_types[22]
    2688             : #define SWIGTYPE_p_GDALExtendedDataTypeSubType swig_types[23]
    2689             : #define SWIGTYPE_p_GDALFootprintOptions swig_types[24]
    2690             : #define SWIGTYPE_p_GDALGridOptions swig_types[25]
    2691             : #define SWIGTYPE_p_GDALGroupHS swig_types[26]
    2692             : #define SWIGTYPE_p_GDALInfoOptions swig_types[27]
    2693             : #define SWIGTYPE_p_GDALMDArrayHS swig_types[28]
    2694             : #define SWIGTYPE_p_GDALMajorObjectShadow swig_types[29]
    2695             : #define SWIGTYPE_p_GDALMultiDimInfoOptions swig_types[30]
    2696             : #define SWIGTYPE_p_GDALMultiDimTranslateOptions swig_types[31]
    2697             : #define SWIGTYPE_p_GDALNearblackOptions swig_types[32]
    2698             : #define SWIGTYPE_p_GDALProgressFunc swig_types[33]
    2699             : #define SWIGTYPE_p_GDALRasterAlgebraBinaryOperation swig_types[34]
    2700             : #define SWIGTYPE_p_GDALRasterAlgebraUnaryOperation swig_types[35]
    2701             : #define SWIGTYPE_p_GDALRasterAttributeTableShadow swig_types[36]
    2702             : #define SWIGTYPE_p_GDALRasterBandShadow swig_types[37]
    2703             : #define SWIGTYPE_p_GDALRasterizeOptions swig_types[38]
    2704             : #define SWIGTYPE_p_GDALRelationshipShadow swig_types[39]
    2705             : #define SWIGTYPE_p_GDALSubdatasetInfo swig_types[40]
    2706             : #define SWIGTYPE_p_GDALTileIndexOptions swig_types[41]
    2707             : #define SWIGTYPE_p_GDALTransformerInfoShadow swig_types[42]
    2708             : #define SWIGTYPE_p_GDALTranslateOptions swig_types[43]
    2709             : #define SWIGTYPE_p_GDALVectorInfoOptions swig_types[44]
    2710             : #define SWIGTYPE_p_GDALVectorTranslateOptions swig_types[45]
    2711             : #define SWIGTYPE_p_GDALViewshedMode swig_types[46]
    2712             : #define SWIGTYPE_p_GDALViewshedOutputType swig_types[47]
    2713             : #define SWIGTYPE_p_GDALWarpAppOptions swig_types[48]
    2714             : #define SWIGTYPE_p_GDAL_GCP swig_types[49]
    2715             : #define SWIGTYPE_p_GIntBig swig_types[50]
    2716             : #define SWIGTYPE_p_GUIntBig swig_types[51]
    2717             : #define SWIGTYPE_p_OGRFeatureShadow swig_types[52]
    2718             : #define SWIGTYPE_p_OGRFieldDomainShadow swig_types[53]
    2719             : #define SWIGTYPE_p_OGRGeomFieldDefnShadow swig_types[54]
    2720             : #define SWIGTYPE_p_OGRGeometryShadow swig_types[55]
    2721             : #define SWIGTYPE_p_OGRLayerShadow swig_types[56]
    2722             : #define SWIGTYPE_p_OGRStyleTableShadow swig_types[57]
    2723             : #define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[58]
    2724             : #define SWIGTYPE_p_StatBuf swig_types[59]
    2725             : #define SWIGTYPE_p_Statistics swig_types[60]
    2726             : #define SWIGTYPE_p_SuggestedWarpOutputRes swig_types[61]
    2727             : #define SWIGTYPE_p_VSIDIR swig_types[62]
    2728             : #define SWIGTYPE_p_VSILFILE swig_types[63]
    2729             : #define SWIGTYPE_p_bool swig_types[64]
    2730             : #define SWIGTYPE_p_char swig_types[65]
    2731             : #define SWIGTYPE_p_double swig_types[66]
    2732             : #define SWIGTYPE_p_f_double_p_q_const__char_p_void__int swig_types[67]
    2733             : #define SWIGTYPE_p_int swig_types[68]
    2734             : #define SWIGTYPE_p_long_long swig_types[69]
    2735             : #define SWIGTYPE_p_p_GByte swig_types[70]
    2736             : #define SWIGTYPE_p_p_GDALComputedRasterBandShadow swig_types[71]
    2737             : #define SWIGTYPE_p_p_GDALDatasetShadow swig_types[72]
    2738             : #define SWIGTYPE_p_p_GDALDimensionHS swig_types[73]
    2739             : #define SWIGTYPE_p_p_GDALEDTComponentHS swig_types[74]
    2740             : #define SWIGTYPE_p_p_GDALMDArrayHS swig_types[75]
    2741             : #define SWIGTYPE_p_p_GDALRasterBandShadow swig_types[76]
    2742             : #define SWIGTYPE_p_p_GDAL_GCP swig_types[77]
    2743             : #define SWIGTYPE_p_p_GUIntBig swig_types[78]
    2744             : #define SWIGTYPE_p_p_OGRLayerShadow swig_types[79]
    2745             : #define SWIGTYPE_p_p_OSRSpatialReferenceShadow swig_types[80]
    2746             : #define SWIGTYPE_p_p_char swig_types[81]
    2747             : #define SWIGTYPE_p_p_double swig_types[82]
    2748             : #define SWIGTYPE_p_p_int swig_types[83]
    2749             : #define SWIGTYPE_p_p_long_long swig_types[84]
    2750             : #define SWIGTYPE_p_p_p_GDALAttributeHS swig_types[85]
    2751             : #define SWIGTYPE_p_p_p_GDALDimensionHS swig_types[86]
    2752             : #define SWIGTYPE_p_p_p_GDALEDTComponentHS swig_types[87]
    2753             : #define SWIGTYPE_p_p_p_GDALMDArrayHS swig_types[88]
    2754             : #define SWIGTYPE_p_p_void swig_types[89]
    2755             : #define SWIGTYPE_p_size_t swig_types[90]
    2756             : #define SWIGTYPE_p_vsi_l_offset swig_types[91]
    2757             : static swig_type_info *swig_types[93];
    2758             : static swig_module_info swig_module = {swig_types, 92, 0, 0, 0, 0};
    2759             : #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
    2760             : #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
    2761             : 
    2762             : /* -------- TYPES TABLE (END) -------- */
    2763             : 
    2764             : #ifdef SWIG_TypeQuery
    2765             : # undef SWIG_TypeQuery
    2766             : #endif
    2767             : #define SWIG_TypeQuery SWIG_Python_TypeQuery
    2768             : 
    2769             : /*-----------------------------------------------
    2770             :               @(target):= _gdal.so
    2771             :   ------------------------------------------------*/
    2772             : #if PY_VERSION_HEX >= 0x03000000
    2773             : #  define SWIG_init    PyInit__gdal
    2774             : 
    2775             : #else
    2776             : #  define SWIG_init    init_gdal
    2777             : 
    2778             : #endif
    2779             : #define SWIG_name    "_gdal"
    2780             : 
    2781             : #define SWIGVERSION 0x040001 
    2782             : #define SWIG_VERSION SWIGVERSION
    2783             : 
    2784             : 
    2785             : #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
    2786             : #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 
    2787             : 
    2788             : 
    2789             : #include <stdexcept>
    2790             : 
    2791             : 
    2792             : namespace swig {
    2793             :   class SwigPtr_PyObject {
    2794             :   protected:
    2795             :     PyObject *_obj;
    2796             : 
    2797             :   public:
    2798             :     SwigPtr_PyObject() :_obj(0)
    2799             :     {
    2800             :     }
    2801             : 
    2802             :     SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
    2803             :     {
    2804             :       SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2805             :       Py_XINCREF(_obj);      
    2806             :       SWIG_PYTHON_THREAD_END_BLOCK;
    2807             :     }
    2808             :     
    2809             :     SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
    2810             :     {
    2811             :       if (initial_ref) {
    2812             :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2813             :         Py_XINCREF(_obj);
    2814             :         SWIG_PYTHON_THREAD_END_BLOCK;
    2815             :       }
    2816             :     }
    2817             :     
    2818             :     SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
    2819             :     {
    2820             :       SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2821             :       Py_XINCREF(item._obj);
    2822             :       Py_XDECREF(_obj);
    2823             :       _obj = item._obj;
    2824             :       SWIG_PYTHON_THREAD_END_BLOCK;
    2825             :       return *this;      
    2826             :     }
    2827             :     
    2828             :     ~SwigPtr_PyObject() 
    2829             :     {
    2830             :       SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2831             :       Py_XDECREF(_obj);
    2832             :       SWIG_PYTHON_THREAD_END_BLOCK;
    2833             :     }
    2834             :     
    2835             :     operator PyObject *() const
    2836             :     {
    2837             :       return _obj;
    2838             :     }
    2839             : 
    2840             :     PyObject *operator->() const
    2841             :     {
    2842             :       return _obj;
    2843             :     }
    2844             :   };
    2845             : }
    2846             : 
    2847             : 
    2848             : namespace swig {
    2849             :   struct SwigVar_PyObject : SwigPtr_PyObject {
    2850             :     SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
    2851             :     
    2852             :     SwigVar_PyObject & operator = (PyObject* obj)
    2853             :     {
    2854             :       Py_XDECREF(_obj);
    2855             :       _obj = obj;
    2856             :       return *this;      
    2857             :     }
    2858             :   };
    2859             : }
    2860             : 
    2861             : 
    2862             : #include <iostream>
    2863             : #include <vector>
    2864             : using namespace std;
    2865             : 
    2866             : #define CPL_SUPRESS_CPLUSPLUS
    2867             : 
    2868             : // Suppress deprecation warning for GDALApplyVerticalShiftGrid
    2869             : #define CPL_WARN_DEPRECATED_GDALApplyVerticalShiftGrid(x)
    2870             : 
    2871             : #include "cpl_port.h"
    2872             : #include "cpl_string.h"
    2873             : #include "cpl_multiproc.h"
    2874             : #include "cpl_http.h"
    2875             : #include "cpl_vsi_error.h"
    2876             : 
    2877             : #include "gdal.h"
    2878             : #include "gdal_alg.h"
    2879             : 
    2880             : #include "gdalwarper.h"
    2881             : #include "ogr_srs_api.h"
    2882             : 
    2883             : // From gdal_priv.h
    2884             : void CPL_DLL GDALEnablePixelTypeSignedByteWarning(GDALRasterBandH hBand, bool b);
    2885             : 
    2886             : typedef void GDALMajorObjectShadow;
    2887             : typedef void GDALDriverShadow;
    2888             : typedef void GDALDatasetShadow;
    2889             : typedef void GDALRasterBandShadow;
    2890             : typedef void GDALComputedRasterBandShadow;
    2891             : typedef void GDALColorTableShadow;
    2892             : typedef void GDALRasterAttributeTableShadow;
    2893             : typedef void GDALSubdatasetInfoShadow;
    2894             : typedef void GDALTransformerInfoShadow;
    2895             : typedef void GDALAsyncReaderShadow;
    2896             : typedef void GDALRelationshipShadow;
    2897             : 
    2898             : typedef GDALExtendedDataTypeHS GDALExtendedDataTypeHS;
    2899             : typedef GDALEDTComponentHS GDALEDTComponentHS;
    2900             : typedef GDALGroupHS GDALGroupHS;
    2901             : typedef GDALMDArrayHS GDALMDArrayHS;
    2902             : typedef GDALAttributeHS GDALAttributeHS;
    2903             : typedef GDALDimensionHS GDALDimensionHS;
    2904             : 
    2905             : 
    2906             : 
    2907             : #ifdef DEBUG
    2908             : typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
    2909             : typedef struct OGRLayerHS OGRLayerShadow;
    2910             : typedef struct OGRFeatureHS OGRFeatureShadow;
    2911             : typedef struct OGRGeometryHS OGRGeometryShadow;
    2912             : #else
    2913             : typedef void OSRSpatialReferenceShadow;
    2914             : typedef void OGRLayerShadow;
    2915             : typedef void OGRFeatureShadow;
    2916             : typedef void OGRGeometryShadow;
    2917             : #endif
    2918             : 
    2919             : typedef struct OGRStyleTableHS OGRStyleTableShadow;
    2920             : typedef struct OGRFieldDomainHS OGRFieldDomainShadow;
    2921             : typedef struct OGRGeomFieldDefnHS OGRGeomFieldDefnShadow;
    2922             : 
    2923             : 
    2924             : /* use this to not return the int returned by GDAL */
    2925             : typedef int RETURN_NONE;
    2926             : /* return value that is used for VSI methods that return -1 on error (and set errno) */
    2927             : typedef int VSI_RETVAL;
    2928             : 
    2929             : 
    2930             : SWIGINTERNINLINE PyObject*
    2931     2550500 :   SWIG_From_int  (int value)
    2932             : {
    2933     2550500 :   return PyInt_FromLong((long) value);
    2934             : }
    2935             : 
    2936             : 
    2937          65 : static int getAlignment(GDALDataType ntype)
    2938             : {
    2939          65 :     switch(ntype)
    2940             :     {
    2941             :         case GDT_Unknown:
    2942             :             break; // shouldn't happen
    2943             :         case GDT_Byte:
    2944             :         case GDT_Int8:
    2945             :             return 1;
    2946             :         case GDT_Int16:
    2947             :         case GDT_UInt16:
    2948             :         case GDT_Float16:
    2949             :             return 2;
    2950             :         case GDT_Int32:
    2951             :         case GDT_UInt32:
    2952             :         case GDT_Float32:
    2953             :             return 4;
    2954             :         case GDT_Float64:
    2955             :         case GDT_Int64:
    2956             :         case GDT_UInt64:
    2957             :             return 8;
    2958             :         case GDT_CInt16:
    2959             :         case GDT_CFloat16:
    2960             :             return 2;
    2961             :         case GDT_CInt32:
    2962             :         case GDT_CFloat32:
    2963             :             return 4;
    2964             :         case GDT_CFloat64:
    2965             :             return 8;
    2966             :         case GDT_TypeCount:
    2967             :             break; // shouldn't happen
    2968             :     }
    2969             :     // shouldn't happen
    2970             :     CPLAssert(false);
    2971             :     return 1;
    2972             : }
    2973             : 
    2974      186895 : static bool readraster_acquirebuffer(void** buf,
    2975             :                                      void*& inputOutputBuf,
    2976             :                                      size_t buf_size,
    2977             :                                      GDALDataType ntype,
    2978             :                                      int l_bUseExceptions,
    2979             :                                      char*& data,
    2980             :                                      Py_buffer& view)
    2981             : {
    2982      373790 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2983             : 
    2984      186895 :     if( inputOutputBuf == Py_None )
    2985      186755 :         inputOutputBuf = NULL;
    2986             : 
    2987      186895 :     if( inputOutputBuf )
    2988             :     {
    2989          75 :         if (PyObject_GetBuffer( (PyObject*)inputOutputBuf, &view,
    2990             :                                 PyBUF_SIMPLE | PyBUF_WRITABLE) == 0)
    2991             :         {
    2992          69 :             if( static_cast<GUIntBig>(view.len) < buf_size )
    2993             :             {
    2994           4 :                 PyBuffer_Release(&view);
    2995           4 :                 SWIG_PYTHON_THREAD_END_BLOCK;
    2996           4 :                 CPLError(CE_Failure, CPLE_AppDefined,
    2997             :                     "buf_obj length is " CPL_FRMT_GUIB " bytes. "
    2998             :                     "It should be at least " CPL_FRMT_GUIB,
    2999           4 :                     static_cast<GUIntBig>(view.len),
    3000             :                     static_cast<GUIntBig>(buf_size));
    3001             :                 return false;
    3002             :             }
    3003          65 :             data = (char*)view.buf;
    3004         124 :             if( (reinterpret_cast<uintptr_t>(data) % getAlignment(ntype)) != 0 )
    3005             :             {
    3006          29 :                 PyBuffer_Release(&view);
    3007          29 :                 SWIG_PYTHON_THREAD_END_BLOCK;
    3008          29 :                 CPLError(CE_Failure, CPLE_AppDefined,
    3009             :                          "buffer has not the appropriate alignment");
    3010             :                 return false;
    3011             :             }
    3012             :         }
    3013             :         else
    3014             :         {
    3015           6 :             PyErr_Clear();
    3016           6 :             SWIG_PYTHON_THREAD_END_BLOCK;
    3017           6 :             CPLError(CE_Failure, CPLE_AppDefined,
    3018             :                      "buf_obj is not a simple writable buffer");
    3019             :             return false;
    3020             :         }
    3021             :     }
    3022             :     else
    3023             :     {
    3024      186820 :         *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    3025      186820 :         if (*buf == NULL)
    3026             :         {
    3027           0 :             *buf = Py_None;
    3028           0 :             if( !l_bUseExceptions )
    3029             :             {
    3030           0 :                 PyErr_Clear();
    3031             :             }
    3032           0 :             SWIG_PYTHON_THREAD_END_BLOCK;
    3033           0 :             CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    3034             :             return false;
    3035             :         }
    3036      186820 :         data = PyByteArray_AsString( (PyObject *)*buf );
    3037             :     }
    3038      186856 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3039             :     return true;
    3040             : }
    3041             : 
    3042      186856 : static void readraster_releasebuffer(CPLErr eErr,
    3043             :                                      void** buf,
    3044             :                                      void* inputOutputBuf,
    3045             :                                      Py_buffer& view)
    3046             : {
    3047      186856 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3048             : 
    3049      186856 :     if( inputOutputBuf )
    3050          36 :         PyBuffer_Release(&view);
    3051             : 
    3052      186856 :     if (eErr == CE_Failure)
    3053             :     {
    3054        1333 :         if( inputOutputBuf == NULL )
    3055        1333 :             Py_DECREF((PyObject*)*buf);
    3056        1333 :         *buf = NULL;
    3057             :     }
    3058      185523 :     else if( inputOutputBuf )
    3059             :     {
    3060          36 :         *buf = inputOutputBuf;
    3061          36 :         Py_INCREF((PyObject*)*buf);
    3062             :     }
    3063             : 
    3064      186856 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3065      186856 : }
    3066             : 
    3067             : 
    3068             : 
    3069             : #define MODULE_NAME           "gdal"
    3070             : 
    3071             : 
    3072             : #include "cpl_string.h"
    3073             : #include "cpl_conv.h"
    3074             : 
    3075             : static int bUseExceptions=0;
    3076             : static int bUserHasSpecifiedIfUsingExceptions = FALSE;
    3077             : static thread_local int bUseExceptionsLocal = -1;
    3078             : 
    3079     3007200 : struct PythonBindingErrorHandlerContext
    3080             : {
    3081             :     std::string     osInitialMsg{};
    3082             :     std::string     osFailureMsg{};
    3083             :     CPLErrorNum     nLastCode = CPLE_None;
    3084             :     bool            bMemoryError = false;
    3085             : };
    3086             : 
    3087             : static void CPL_STDCALL
    3088       22428 : PythonBindingErrorHandler(CPLErr eclass, CPLErrorNum err_no, const char *msg )
    3089             : {
    3090       22428 :   PythonBindingErrorHandlerContext* ctxt = static_cast<
    3091       22428 :       PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
    3092             : 
    3093             :   /*
    3094             :   ** Generally we want to suppress error reporting if we have exceptions
    3095             :   ** enabled as the error message will be in the exception thrown in
    3096             :   ** Python.
    3097             :   */
    3098             : 
    3099             :   /* If the error class is CE_Fatal, we want to have a message issued
    3100             :      because the CPL support code does an abort() before any exception
    3101             :      can be generated */
    3102       22428 :   if (eclass == CE_Fatal ) {
    3103           0 :     CPLCallPreviousHandler(eclass, err_no, msg );
    3104             :   }
    3105             : 
    3106             :   /*
    3107             :   ** We do not want to interfere with non-failure messages since
    3108             :   ** they won't be translated into exceptions.
    3109             :   */
    3110       22428 :   else if (eclass != CE_Failure ) {
    3111       19787 :     CPLCallPreviousHandler(eclass, err_no, msg );
    3112             :   }
    3113             :   else {
    3114        2641 :     ctxt->nLastCode = err_no;
    3115        2641 :     try
    3116             :     {
    3117        2641 :         if( ctxt->osFailureMsg.empty() ) {
    3118        2328 :           ctxt->osFailureMsg = msg;
    3119        2328 :           ctxt->osInitialMsg = ctxt->osFailureMsg;
    3120             :         } else {
    3121         313 :           if( ctxt->osFailureMsg.size() < 10000 ) {
    3122         626 :             std::string osTmp(msg);
    3123         313 :             osTmp += "\nMay be caused by: ";
    3124         313 :             osTmp += ctxt->osFailureMsg;
    3125         313 :             ctxt->osFailureMsg = std::move(osTmp);
    3126         313 :             ctxt->osInitialMsg = ctxt->osFailureMsg;
    3127             :           }
    3128             :           else
    3129             :           {
    3130           0 :             std::string osTmp(msg);
    3131           0 :             osTmp += "\n[...]\nMay be caused by: ";
    3132           0 :             osTmp += ctxt->osInitialMsg;
    3133           0 :             ctxt->osFailureMsg = std::move(osTmp);
    3134             :           }
    3135             :         }
    3136             :     }
    3137           0 :     catch( const std::exception& )
    3138             :     {
    3139           0 :         ctxt->bMemoryError = true;
    3140             :     }
    3141             :   }
    3142       22428 : }
    3143             : 
    3144             : 
    3145             : 
    3146             : 
    3147             : static
    3148     8233010 : int GetUseExceptions() {
    3149     5919700 :   return bUseExceptionsLocal >= 0 ? bUseExceptionsLocal : bUseExceptions;
    3150             : }
    3151             : 
    3152       11390 : static int _GetExceptionsLocal()
    3153             : {
    3154       11390 :   return bUseExceptionsLocal;
    3155             : }
    3156             : 
    3157       22780 : static void _SetExceptionsLocal(int bVal)
    3158             : {
    3159       22780 :   bUseExceptionsLocal = bVal;
    3160             : }
    3161             : 
    3162             : static
    3163          29 : void _UseExceptions() {
    3164          29 :   CPLErrorReset();
    3165          29 :   bUserHasSpecifiedIfUsingExceptions = TRUE;
    3166          29 :   if( !bUseExceptions )
    3167             :   {
    3168          26 :     bUseExceptions = 1;
    3169             :   }
    3170             : }
    3171             : 
    3172             : static
    3173           5 : void _DontUseExceptions() {
    3174           5 :   CPLErrorReset();
    3175           5 :   bUserHasSpecifiedIfUsingExceptions = TRUE;
    3176           5 :   if( bUseExceptions )
    3177             :   {
    3178           0 :     bUseExceptions = 0;
    3179             :   }
    3180             : }
    3181             : 
    3182       58158 : static int _UserHasSpecifiedIfUsingExceptions()
    3183             : {
    3184        1597 :     return bUserHasSpecifiedIfUsingExceptions || bUseExceptionsLocal >= 0;
    3185             : }
    3186             : 
    3187             : 
    3188             : 
    3189             : #include <limits.h>
    3190             : #if !defined(SWIG_NO_LLONG_MAX)
    3191             : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
    3192             : #   define LLONG_MAX __LONG_LONG_MAX__
    3193             : #   define LLONG_MIN (-LLONG_MAX - 1LL)
    3194             : #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
    3195             : # endif
    3196             : #endif
    3197             : 
    3198             : 
    3199             : SWIGINTERN int
    3200     1057620 : SWIG_AsVal_double (PyObject *obj, double *val)
    3201             : {
    3202     1057620 :   int res = SWIG_TypeError;
    3203     1057620 :   if (PyFloat_Check(obj)) {
    3204       40395 :     if (val) *val = PyFloat_AsDouble(obj);
    3205       40395 :     return SWIG_OK;
    3206             : #if PY_VERSION_HEX < 0x03000000
    3207             :   } else if (PyInt_Check(obj)) {
    3208             :     if (val) *val = (double) PyInt_AsLong(obj);
    3209             :     return SWIG_OK;
    3210             : #endif
    3211     1017230 :   } else if (PyLong_Check(obj)) {
    3212     1017230 :     double v = PyLong_AsDouble(obj);
    3213     1017230 :     if (!PyErr_Occurred()) {
    3214     1017230 :       if (val) *val = v;
    3215     1017230 :       return SWIG_OK;
    3216             :     } else {
    3217           0 :       PyErr_Clear();
    3218             :     }
    3219             :   }
    3220             : #ifdef SWIG_PYTHON_CAST_MODE
    3221             :   {
    3222             :     int dispatch = 0;
    3223             :     double d = PyFloat_AsDouble(obj);
    3224             :     if (!PyErr_Occurred()) {
    3225             :       if (val) *val = d;
    3226             :       return SWIG_AddCast(SWIG_OK);
    3227             :     } else {
    3228             :       PyErr_Clear();
    3229             :     }
    3230             :     if (!dispatch) {
    3231             :       long v = PyLong_AsLong(obj);
    3232             :       if (!PyErr_Occurred()) {
    3233             :   if (val) *val = v;
    3234             :   return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
    3235             :       } else {
    3236             :   PyErr_Clear();
    3237             :       }
    3238             :     }
    3239             :   }
    3240             : #endif
    3241             :   return res;
    3242             : }
    3243             : 
    3244             : 
    3245             : #include <float.h>
    3246             : 
    3247             : 
    3248             : #include <math.h>
    3249             : 
    3250             : 
    3251             : SWIGINTERNINLINE int
    3252             : SWIG_CanCastAsInteger(double *d, double min, double max) {
    3253             :   double x = *d;
    3254             :   if ((min <= x && x <= max)) {
    3255             :    double fx = floor(x);
    3256             :    double cx = ceil(x);
    3257             :    double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
    3258             :    if ((errno == EDOM) || (errno == ERANGE)) {
    3259             :      errno = 0;
    3260             :    } else {
    3261             :      double summ, reps, diff;
    3262             :      if (rd < x) {
    3263             :        diff = x - rd;
    3264             :      } else if (rd > x) {
    3265             :        diff = rd - x;
    3266             :      } else {
    3267             :        return 1;
    3268             :      }
    3269             :      summ = rd + x;
    3270             :      reps = diff/summ;
    3271             :      if (reps < 8*DBL_EPSILON) {
    3272             :        *d = rd;
    3273             :        return 1;
    3274             :      }
    3275             :    }
    3276             :   }
    3277             :   return 0;
    3278             : }
    3279             : 
    3280             : 
    3281             : SWIGINTERN int
    3282     2629450 : SWIG_AsVal_long (PyObject *obj, long* val)
    3283             : {
    3284             : #if PY_VERSION_HEX < 0x03000000
    3285             :   if (PyInt_Check(obj)) {
    3286             :     if (val) *val = PyInt_AsLong(obj);
    3287             :     return SWIG_OK;
    3288             :   } else
    3289             : #endif
    3290     2629450 :   if (PyLong_Check(obj)) {
    3291     2629440 :     long v = PyLong_AsLong(obj);
    3292     2629440 :     if (!PyErr_Occurred()) {
    3293     2629440 :       if (val) *val = v;
    3294     2629440 :       return SWIG_OK;
    3295             :     } else {
    3296           0 :       PyErr_Clear();
    3297           0 :       return SWIG_OverflowError;
    3298             :     }
    3299             :   }
    3300             : #ifdef SWIG_PYTHON_CAST_MODE
    3301             :   {
    3302             :     int dispatch = 0;
    3303             :     long v = PyInt_AsLong(obj);
    3304             :     if (!PyErr_Occurred()) {
    3305             :       if (val) *val = v;
    3306             :       return SWIG_AddCast(SWIG_OK);
    3307             :     } else {
    3308             :       PyErr_Clear();
    3309             :     }
    3310             :     if (!dispatch) {
    3311             :       double d;
    3312             :       int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
    3313             :       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
    3314             :   if (val) *val = (long)(d);
    3315             :   return res;
    3316             :       }
    3317             :     }
    3318             :   }
    3319             : #endif
    3320             :   return SWIG_TypeError;
    3321             : }
    3322             : 
    3323             : 
    3324             : SWIGINTERN int
    3325     2620770 : SWIG_AsVal_int (PyObject * obj, int *val)
    3326             : {
    3327     2620770 :   long v;
    3328     5241540 :   int res = SWIG_AsVal_long (obj, &v);
    3329     2620770 :   if (SWIG_IsOK(res)) {
    3330     2620770 :     if ((v < INT_MIN || v > INT_MAX)) {
    3331             :       return SWIG_OverflowError;
    3332             :     } else {
    3333     2612080 :       if (val) *val = static_cast< int >(v);
    3334             :     }
    3335             :   }  
    3336             :   return res;
    3337             : }
    3338             : 
    3339             : 
    3340             : /* Completely unrelated: just to avoid Coverity warnings */
    3341             : 
    3342             : static int bReturnSame = 1;
    3343             : 
    3344           0 : void NeverCallMePlease() {
    3345           0 :     bReturnSame = 0;
    3346           0 : }
    3347             : 
    3348             : /* Some SWIG code generates dead code, which Coverity warns about */
    3349     4517690 : template<class T> static T ReturnSame(T x)
    3350             : {
    3351     4517690 :     if( bReturnSame )
    3352             :         return x;
    3353             :     return 0;
    3354             : }
    3355             : 
    3356     3007200 : static void pushErrorHandler()
    3357             : {
    3358     3007200 :     CPLErrorReset();
    3359     3007200 :     PythonBindingErrorHandlerContext* ctxt = new PythonBindingErrorHandlerContext();
    3360     3007200 :     CPLPushErrorHandlerEx(PythonBindingErrorHandler, ctxt);
    3361     3007200 : }
    3362             : 
    3363     3007200 : static void popErrorHandler()
    3364             : {
    3365     3007200 :     PythonBindingErrorHandlerContext* ctxt = static_cast<
    3366     3007200 :       PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
    3367     3007200 :     CPLPopErrorHandler();
    3368     3007200 :     if( ctxt->bMemoryError )
    3369             :     {
    3370           0 :         CPLErrorSetState(
    3371             :           CE_Failure, CPLE_OutOfMemory, "Out of memory");
    3372             :     }
    3373     3007200 :     else if( !ctxt->osFailureMsg.empty() )
    3374             :     {
    3375        2342 :       CPLErrorSetState(
    3376        2328 :           CPLGetLastErrorType() == CE_Failure ? CE_Failure: CE_Warning,
    3377             :           ctxt->nLastCode, ctxt->osFailureMsg.c_str());
    3378             :     }
    3379     3007200 :     delete ctxt;
    3380     3007200 : }
    3381             : 
    3382             : 
    3383             : 
    3384             : 
    3385             : /* Return a PyObject* from a NULL terminated C String */
    3386             : static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
    3387      115435 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
    3388             : {
    3389      115435 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    3390    16788300 :   while(*pszIter != 0)
    3391             :   {
    3392    16673000 :     if (*pszIter > 127)
    3393             :     {
    3394         110 :         PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "strict");
    3395         110 :         if (pyObj != NULL && !PyErr_Occurred())
    3396             :             return pyObj;
    3397           1 :         PyErr_Clear();
    3398           1 :         return PyBytes_FromString(pszStr);
    3399             :     }
    3400    16672900 :     pszIter ++;
    3401             :   }
    3402      115325 :   return PyUnicode_FromString(pszStr);
    3403             : }
    3404             : 
    3405             : /* Return a NULL terminated c String from a PyObject */
    3406             : /* Result must be freed with GDALPythonFreeCStr */
    3407             : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
    3408      103702 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
    3409             : {
    3410      103702 :   *pbToFree = 0;
    3411      103702 :   if (PyUnicode_Check(pyObject))
    3412             :   {
    3413      103700 :       char *pszStr;
    3414      103700 :       char *pszNewStr;
    3415      103700 :       Py_ssize_t nLen;
    3416      103700 :       PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
    3417      103700 :       if( pyUTF8Str == NULL )
    3418             :         return NULL;
    3419      103700 :       PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    3420      103700 :       pszNewStr = (char *) malloc(nLen+1);
    3421      103700 :       if( pszNewStr == NULL )
    3422             :       {
    3423           0 :           CPLError(CE_Failure, CPLE_OutOfMemory, "Failed to allocate %llu bytes",
    3424             :                    (unsigned long long)(nLen + 1));
    3425           0 :           Py_XDECREF(pyUTF8Str);
    3426           0 :           return NULL;
    3427             :       }
    3428      103700 :       memcpy(pszNewStr, pszStr, nLen+1);
    3429      103700 :       Py_XDECREF(pyUTF8Str);
    3430      103700 :       *pbToFree = 1;
    3431      103700 :       return pszNewStr;
    3432             :   }
    3433           2 :   else if( PyBytes_Check(pyObject) )
    3434             :   {
    3435           2 :       char* ret = PyBytes_AsString(pyObject);
    3436             : 
    3437             :       // Check if there are \0 bytes inside the string
    3438           2 :       const Py_ssize_t size = PyBytes_Size(pyObject);
    3439          24 :       for( Py_ssize_t i = 0; i < size; i++ )
    3440             :       {
    3441          23 :           if( ret[i] == 0 )
    3442             :           {
    3443           1 :               CPLError(CE_Failure, CPLE_AppDefined,
    3444             :                        "bytes object cast as string contains a zero-byte.");
    3445           1 :               return NULL;
    3446             :           }
    3447             :       }
    3448             : 
    3449             :       return ret;
    3450             :   }
    3451             :   else
    3452             :   {
    3453           0 :       CPLError(CE_Failure, CPLE_AppDefined,
    3454             :                "Passed object is neither of type string nor bytes");
    3455           0 :       return NULL;
    3456             :   }
    3457             : }
    3458             : 
    3459             : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
    3460       10900 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree)
    3461             : {
    3462       10900 :     PyObject* os = PyImport_ImportModule("os");
    3463       10900 :     if (os == NULL)
    3464             :     {
    3465             :         return NULL;
    3466             :     }
    3467             : 
    3468       10900 :     PyObject* pathLike = PyObject_GetAttrString(os, "PathLike");
    3469       10900 :     if (pathLike == NULL)
    3470             :     {
    3471           0 :         Py_DECREF(os);
    3472           0 :         return NULL;
    3473             :     }
    3474             : 
    3475       10900 :     if (!PyObject_IsInstance(pyObject, pathLike))
    3476             :     {
    3477           4 :         Py_DECREF(pathLike);
    3478           4 :         Py_DECREF(os);
    3479           4 :         return NULL;
    3480             :     }
    3481             : 
    3482       10896 :     PyObject* str = PyObject_Str(pyObject);
    3483       10896 :     char* ret = NULL;
    3484       10896 :     if (str != NULL)
    3485             :     {
    3486       10896 :         ret = GDALPythonObjectToCStr(str, pbToFree);
    3487       10896 :         Py_DECREF(str);
    3488             :     }
    3489             : 
    3490       10896 :     Py_DECREF(pathLike);
    3491       10896 :     Py_DECREF(os);
    3492             : 
    3493             :     return ret;
    3494             : }
    3495             : 
    3496             : 
    3497             : static void GDALPythonFreeCStr(void* ptr, int bToFree) CPL_UNUSED;
    3498      103706 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
    3499             : {
    3500      103706 :    if (bToFree)
    3501      103700 :        free(ptr);
    3502             : }
    3503             : 
    3504             : 
    3505             : 
    3506       27506 : unsigned int wrapper_VSIFReadL( void **buf, unsigned int nMembSize, unsigned int nMembCount, VSILFILE *fp)
    3507             : {
    3508       27506 :     size_t buf_size = static_cast<size_t>(nMembSize) * nMembCount;
    3509       27506 :     if( buf_size > 0xFFFFFFFFU )
    3510             :    {
    3511           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Too big request");
    3512           0 :         *buf = NULL;
    3513           0 :         return 0;
    3514             :     }
    3515             : 
    3516       27506 :     if (buf_size == 0)
    3517             :     {
    3518          12 :         *buf = NULL;
    3519          12 :         return 0;
    3520             :     }
    3521             : 
    3522       55000 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3523       27494 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    3524       27494 :     if (*buf == NULL)
    3525             :     {
    3526           0 :         *buf = Py_None;
    3527           0 :         if( !GetUseExceptions() )
    3528             :         {
    3529           0 :             PyErr_Clear();
    3530             :         }
    3531           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3532           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    3533             :         return 0;
    3534             :     }
    3535       27494 :     PyObject* o = (PyObject*) *buf;
    3536       27494 :     char *data = PyByteArray_AsString(o);
    3537       27494 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3538       27494 :     size_t nRet = (size_t)VSIFReadL( data, nMembSize, nMembCount, fp );
    3539       27494 :     if (nRet * (size_t)nMembSize < buf_size)
    3540             :     {
    3541       11147 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3542       11147 :         PyByteArray_Resize(o, nRet * nMembSize);
    3543       11147 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3544       11147 :         *buf = o;
    3545             :     }
    3546       27494 :     return static_cast<unsigned int>(nRet);
    3547             : }
    3548             : 
    3549             : 
    3550             : SWIGINTERN int
    3551       59171 : SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
    3552             : {
    3553             : #if PY_VERSION_HEX < 0x03000000
    3554             :   if (PyInt_Check(obj)) {
    3555             :     long v = PyInt_AsLong(obj);
    3556             :     if (v >= 0) {
    3557             :       if (val) *val = v;
    3558             :       return SWIG_OK;
    3559             :     } else {
    3560             :       return SWIG_OverflowError;
    3561             :     }
    3562             :   } else
    3563             : #endif
    3564       59171 :   if (PyLong_Check(obj)) {
    3565       59171 :     unsigned long v = PyLong_AsUnsignedLong(obj);
    3566       59171 :     if (!PyErr_Occurred()) {
    3567       59171 :       if (val) *val = v;
    3568       59171 :       return SWIG_OK;
    3569             :     } else {
    3570           0 :       PyErr_Clear();
    3571           0 :       return SWIG_OverflowError;
    3572             :     }
    3573             :   }
    3574             : #ifdef SWIG_PYTHON_CAST_MODE
    3575             :   {
    3576             :     int dispatch = 0;
    3577             :     unsigned long v = PyLong_AsUnsignedLong(obj);
    3578             :     if (!PyErr_Occurred()) {
    3579             :       if (val) *val = v;
    3580             :       return SWIG_AddCast(SWIG_OK);
    3581             :     } else {
    3582             :       PyErr_Clear();
    3583             :     }
    3584             :     if (!dispatch) {
    3585             :       double d;
    3586             :       int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
    3587             :       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
    3588             :   if (val) *val = (unsigned long)(d);
    3589             :   return res;
    3590             :       }
    3591             :     }
    3592             :   }
    3593             : #endif
    3594             :   return SWIG_TypeError;
    3595             : }
    3596             : 
    3597             : 
    3598             : SWIGINTERN int
    3599       58917 : SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
    3600             : {
    3601       58917 :   unsigned long v;
    3602      117834 :   int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
    3603       58917 :   if (SWIG_IsOK(res)) {
    3604       58917 :     if ((v > UINT_MAX)) {
    3605             :       return SWIG_OverflowError;
    3606             :     } else {
    3607       58917 :       if (val) *val = static_cast< unsigned int >(v);
    3608             :     }
    3609             :   }  
    3610             :   return res;
    3611             : }
    3612             : 
    3613             : 
    3614             : SWIGINTERNINLINE PyObject*
    3615       27506 :   SWIG_From_unsigned_SS_int  (unsigned int value)
    3616             : {
    3617       27506 :   return PyInt_FromSize_t((size_t) value);
    3618             : }
    3619             : 
    3620             : 
    3621           2 : void wrapper_VSIGetMemFileBuffer(const char *utf8_path, GByte **out, vsi_l_offset *length)
    3622             : {
    3623           2 :     *out = VSIGetMemFileBuffer(utf8_path, length, 0);
    3624           2 : }
    3625             : 
    3626             : 
    3627             : SWIGINTERN swig_type_info*
    3628        9959 : SWIG_pchar_descriptor(void)
    3629             : {
    3630        9959 :   static int init = 0;
    3631        9959 :   static swig_type_info* info = 0;
    3632        9959 :   if (!init) {
    3633          53 :     info = SWIG_TypeQuery("_p_char");
    3634          53 :     init = 1;
    3635             :   }
    3636        9959 :   return info;
    3637             : }
    3638             : 
    3639             : 
    3640             : SWIGINTERN int
    3641      582008 : SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
    3642             : {
    3643             : #if PY_VERSION_HEX>=0x03000000
    3644             : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3645             :   if (PyBytes_Check(obj))
    3646             : #else
    3647      582008 :   if (PyUnicode_Check(obj))
    3648             : #endif
    3649             : #else  
    3650             :   if (PyString_Check(obj))
    3651             : #endif
    3652             :   {
    3653      572049 :     char *cstr; Py_ssize_t len;
    3654      572049 :     int ret = SWIG_OK;
    3655             : #if PY_VERSION_HEX>=0x03000000
    3656             : #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3657      572049 :     if (!alloc && cptr) {
    3658             :         /* We can't allow converting without allocation, since the internal
    3659             :            representation of string in Python 3 is UCS-2/UCS-4 but we require
    3660             :            a UTF-8 representation.
    3661             :            TODO(bhy) More detailed explanation */
    3662             :         return SWIG_RuntimeError;
    3663             :     }
    3664      572049 :     obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
    3665      572049 :     if (!obj)
    3666             :       return SWIG_TypeError;
    3667      572049 :     if (alloc)
    3668      571913 :       *alloc = SWIG_NEWOBJ;
    3669             : #endif
    3670      572049 :     PyBytes_AsStringAndSize(obj, &cstr, &len);
    3671             : #else
    3672             :     PyString_AsStringAndSize(obj, &cstr, &len);
    3673             : #endif
    3674      572049 :     if (cptr) {
    3675      571913 :       if (alloc) {
    3676      571913 :   if (*alloc == SWIG_NEWOBJ) {
    3677      571913 :     *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
    3678      571913 :     *alloc = SWIG_NEWOBJ;
    3679             :   } else {
    3680           0 :     *cptr = cstr;
    3681           0 :     *alloc = SWIG_OLDOBJ;
    3682             :   }
    3683             :       } else {
    3684             : #if PY_VERSION_HEX>=0x03000000
    3685             : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3686             :   *cptr = PyBytes_AsString(obj);
    3687             : #else
    3688             :   assert(0); /* Should never reach here with Unicode strings in Python 3 */
    3689             : #endif
    3690             : #else
    3691             :   *cptr = SWIG_Python_str_AsChar(obj);
    3692             :         if (!*cptr)
    3693             :           ret = SWIG_TypeError;
    3694             : #endif
    3695             :       }
    3696             :     }
    3697      572049 :     if (psize) *psize = len + 1;
    3698             : #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3699      572049 :     Py_XDECREF(obj);
    3700             : #endif
    3701      572049 :     return ret;
    3702             :   } else {
    3703             : #if defined(SWIG_PYTHON_2_UNICODE)
    3704             : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3705             : #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
    3706             : #endif
    3707             : #if PY_VERSION_HEX<0x03000000
    3708             :     if (PyUnicode_Check(obj)) {
    3709             :       char *cstr; Py_ssize_t len;
    3710             :       if (!alloc && cptr) {
    3711             :         return SWIG_RuntimeError;
    3712             :       }
    3713             :       obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
    3714             :       if (!obj)
    3715             :         return SWIG_TypeError;
    3716             :       if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
    3717             :         if (cptr) {
    3718             :           if (alloc) *alloc = SWIG_NEWOBJ;
    3719             :           *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
    3720             :         }
    3721             :         if (psize) *psize = len + 1;
    3722             : 
    3723             :         Py_XDECREF(obj);
    3724             :         return SWIG_OK;
    3725             :       } else {
    3726             :         Py_XDECREF(obj);
    3727             :       }
    3728             :     }
    3729             : #endif
    3730             : #endif
    3731             : 
    3732        9959 :     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3733        9959 :     if (pchar_descriptor) {
    3734        9959 :       void* vptr = 0;
    3735        9959 :       if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
    3736        8154 :   if (cptr) *cptr = (char *) vptr;
    3737        8154 :   if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
    3738        8154 :   if (alloc) *alloc = SWIG_OLDOBJ;
    3739        8154 :   return SWIG_OK;
    3740             :       }
    3741             :     }
    3742             :   }
    3743             :   return SWIG_TypeError;
    3744             : }
    3745             : 
    3746             : 
    3747             : 
    3748             : 
    3749             : 
    3750             : 
    3751             : typedef struct {
    3752             :     PyObject *psPyCallback;
    3753             :     PyObject *psPyCallbackData;
    3754             :     int nLastReported;
    3755             : } PyProgressData;
    3756             : 
    3757             : /************************************************************************/
    3758             : /*                          PyProgressProxy()                           */
    3759             : /************************************************************************/
    3760             : 
    3761             : 
    3762             : static int CPL_STDCALL
    3763             : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData ) CPL_UNUSED;
    3764             : 
    3765             : static int CPL_STDCALL
    3766        7833 : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )
    3767             : 
    3768             : {
    3769        7833 :     PyProgressData *psInfo = (PyProgressData *) pData;
    3770        7833 :     PyObject *psArgs, *psResult;
    3771        7833 :     int      bContinue = TRUE;
    3772             : 
    3773        7833 :     if( dfComplete > 0 && psInfo->nLastReported == (int) (100.0 * dfComplete) )
    3774             :         return TRUE;
    3775             : 
    3776        3852 :     if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
    3777             :         return TRUE;
    3778             : 
    3779        3852 :     psInfo->nLastReported = (int) (100.0 * dfComplete);
    3780             : 
    3781        3852 :     if( pszMessage == NULL )
    3782         805 :         pszMessage = "";
    3783             : 
    3784       11685 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3785             : 
    3786        3852 :     if( psInfo->psPyCallbackData == NULL )
    3787        2665 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
    3788             :     else
    3789        1187 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage,
    3790             :                          psInfo->psPyCallbackData );
    3791             : 
    3792        3852 :     psResult = PyObject_CallObject( psInfo->psPyCallback, psArgs);
    3793        3852 :     Py_XDECREF(psArgs);
    3794             : 
    3795        3852 :     if( PyErr_Occurred() != NULL )
    3796             :     {
    3797           1 :         PyErr_Print();
    3798           1 :         PyErr_Clear();
    3799           1 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3800             :         return FALSE;
    3801             :     }
    3802             : 
    3803        3851 :     if( psResult == NULL )
    3804             :     {
    3805           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3806             :         return TRUE;
    3807             :     }
    3808             : 
    3809        3851 :     if( psResult == Py_None )
    3810             :     {
    3811          14 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3812             :         return TRUE;
    3813             :     }
    3814             : 
    3815        3837 :     if( !PyArg_Parse( psResult, "i", &bContinue ) )
    3816             :     {
    3817           1 :         PyErr_Clear();
    3818           1 :         CPLError(CE_Failure, CPLE_AppDefined, "bad progress return value");
    3819           1 :         Py_XDECREF(psResult);
    3820           1 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3821             :         return FALSE;
    3822             :     }
    3823             : 
    3824        3836 :     Py_XDECREF(psResult);
    3825        3836 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3826             : 
    3827        3836 :     return bContinue;
    3828             : }
    3829             : 
    3830             : 
    3831             : typedef char retStringAndCPLFree;
    3832             : 
    3833             : 
    3834         147 :   void Debug( const char *msg_class, const char *message ) {
    3835         147 :     CPLDebug( msg_class, "%s", message );
    3836         147 :   }
    3837             : 
    3838             : 
    3839           6 :   CPLErr SetErrorHandler( CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL )
    3840             :   {
    3841           6 :     if( pfnErrorHandler == NULL )
    3842             :     {
    3843           0 :         pfnErrorHandler = CPLDefaultErrorHandler;
    3844             :     }
    3845             : 
    3846           6 :     CPLSetErrorHandlerEx( pfnErrorHandler, user_data );
    3847             : 
    3848           6 :     return CE_None;
    3849             :   }
    3850             : 
    3851             : 
    3852             : extern "C" int CPL_DLL GDALIsInGlobalDestructor();
    3853             : 
    3854         795 : void CPL_STDCALL PyCPLErrorHandler(CPLErr eErrClass, CPLErrorNum err_no, const char* pszErrorMsg)
    3855             : {
    3856         795 :     if( GDALIsInGlobalDestructor() )
    3857             :     {
    3858             :         // this is typically during Python interpreter shutdown, and ends up in a crash
    3859             :         // because error handling tries to do thread initialization.
    3860           0 :         return;
    3861             :     }
    3862             : 
    3863         795 :     void* user_data = CPLGetErrorHandlerUserData();
    3864         795 :     PyObject *psArgs;
    3865             : 
    3866        1590 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3867             : 
    3868         795 :     psArgs = Py_BuildValue("(iis)", eErrClass, err_no, pszErrorMsg );
    3869         795 :     PyObject_CallObject( (PyObject*)user_data, psArgs);
    3870         795 :     Py_XDECREF(psArgs);
    3871             : 
    3872         795 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3873             : }
    3874             : 
    3875             : 
    3876       30122 :   CPLErr PushErrorHandler( CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL )
    3877             :   {
    3878       30122 :     if( pfnErrorHandler == NULL )
    3879          76 :         CPLPushErrorHandler(CPLQuietErrorHandler);
    3880             :     else
    3881       30046 :         CPLPushErrorHandlerEx(pfnErrorHandler, user_data);
    3882       30122 :     return CE_None;
    3883             :   }
    3884             : 
    3885             : 
    3886       30117 :   void PopErrorHandler()
    3887             :   {
    3888       30117 :      void* user_data = CPLGetErrorHandlerUserData();
    3889       30117 :      if( user_data != NULL )
    3890             :      {
    3891        1540 :          Py_XDECREF((PyObject*)user_data);
    3892             :      }
    3893       30117 :      CPLPopErrorHandler();
    3894       30117 :   }
    3895             : 
    3896             : 
    3897          29 :   void Error( CPLErr msg_class = CE_Failure, int err_code = 0, const char* msg = "error" ) {
    3898          29 :     CPLError( msg_class, err_code, "%s", msg );
    3899          29 :   }
    3900             : 
    3901             : 
    3902         170 : retStringAndCPLFree* wrapper_EscapeString(int len, char *bin_string , int scheme=CPLES_SQL) {
    3903         170 :     return CPLEscapeString(bin_string, len, scheme);
    3904             : }
    3905             : 
    3906             : 
    3907             : static bool
    3908      347078 : GetBufferAsCharPtrIntSize( PyObject* input, int *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
    3909      347078 :   {
    3910      347078 :     if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    3911             :     {
    3912        6626 :       if( view->len > INT_MAX ) {
    3913           0 :         PyBuffer_Release(view);
    3914           0 :         PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
    3915           0 :         return false;
    3916             :       }
    3917        6626 :       *viewIsValid = true;
    3918        6626 :       *nLen = (int) view->len;
    3919        6626 :       *pBuf = (char*) view->buf;
    3920        6626 :       return true;
    3921             :     }
    3922             :     else
    3923             :     {
    3924      340452 :       PyErr_Clear();
    3925             :     }
    3926             :   }
    3927      340452 :   if (PyUnicode_Check(input))
    3928             :   {
    3929      340452 :     size_t safeLen = 0;
    3930      340452 :     int ret;
    3931      340452 :     try {
    3932      340452 :       ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
    3933             :     }
    3934           0 :     catch( const std::exception& )
    3935             :     {
    3936           0 :       PyErr_SetString(PyExc_MemoryError, "out of memory");
    3937           0 :       return false;
    3938             :     }
    3939      340452 :     if (!SWIG_IsOK(ret)) {
    3940           0 :       PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
    3941           0 :       return false;
    3942             :     }
    3943             : 
    3944      340452 :     if (safeLen) safeLen--;
    3945      340452 :     if( safeLen > INT_MAX ) {
    3946           0 :       PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
    3947           0 :       return false;
    3948             :     }
    3949      340452 :     *nLen = (int) safeLen;
    3950      340452 :     return true;
    3951             :   }
    3952             :   else
    3953             :   {
    3954           0 :     PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
    3955           0 :     return false;
    3956             :   }
    3957             : }
    3958             : 
    3959             : 
    3960          81 : void EscapeBinary(int len, char *bin_string, size_t *pnLenOut, char** pOut, int scheme=CPLES_SQL) {
    3961          81 :     *pOut = CPLEscapeString(bin_string, len, scheme);
    3962          81 :     *pnLenOut = *pOut ? strlen(*pOut) : 0;
    3963          81 : }
    3964             : 
    3965             : 
    3966             : SWIGINTERNINLINE PyObject *
    3967      199904 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
    3968             : {
    3969      199904 :   if (carray) {
    3970      141567 :     if (size > INT_MAX) {
    3971           0 :       swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3972           0 :       return pchar_descriptor ? 
    3973           0 :   SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    3974             :     } else {
    3975             : #if PY_VERSION_HEX >= 0x03000000
    3976             : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3977             :       return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
    3978             : #else
    3979      141567 :       return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
    3980             : #endif
    3981             : #else
    3982             :       return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
    3983             : #endif
    3984             :     }
    3985             :   } else {
    3986       58337 :     return SWIG_Py_Void();
    3987             :   }
    3988             : }
    3989             : 
    3990             : 
    3991             : SWIGINTERNINLINE PyObject * 
    3992      199904 : SWIG_FromCharPtr(const char *cptr)
    3993             : { 
    3994      199904 :   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
    3995             : }
    3996             : 
    3997             : 
    3998        3261 : char **wrapper_VSIReadDirEx( const char * utf8_path, int nMaxFiles = 0 )
    3999             : {
    4000        3261 :     return VSIReadDirEx(utf8_path, nMaxFiles);
    4001             : }
    4002             : 
    4003             : 
    4004        7308 : static PyObject* CSLToList( char** stringarray, bool *pbErr )
    4005             : {
    4006        7308 :   PyObject* res;
    4007        7308 :   if ( stringarray == NULL ) {
    4008        3640 :     res = Py_None;
    4009        3640 :     Py_INCREF( res );
    4010             :   }
    4011             :   else {
    4012        3668 :     int len = CSLCount( stringarray );
    4013        3668 :     res = PyList_New( len );
    4014        3668 :     if( !res ) {
    4015           0 :       *pbErr = true;
    4016           0 :       return res;
    4017             :     }
    4018       27740 :     for ( int i = 0; i < len; ++i ) {
    4019       24072 :       PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    4020       24072 :       PyList_SetItem(res, i, o );
    4021             :     }
    4022             :   }
    4023        7308 :   *pbErr = false;
    4024        7308 :   return res;
    4025             : }
    4026             : 
    4027             : 
    4028          35 : VSIDIR* wrapper_VSIOpenDir( const char * utf8_path,
    4029             :                             int nRecurseDepth = -1,
    4030             :                             char** options = NULL )
    4031             : {
    4032          35 :     return VSIOpenDir(utf8_path, nRecurseDepth, options);
    4033             : }
    4034             : 
    4035             : 
    4036             : /************************************************************************/
    4037             : /*                         CSLFromPySequence()                          */
    4038             : /************************************************************************/
    4039       18461 : static char **CSLFromPySequence( PyObject *pySeq, int *pbErr )
    4040             : 
    4041             : {
    4042       18461 :   *pbErr = FALSE;
    4043             :   /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    4044       18461 :   if ( ! PySequence_Check(pySeq) || PyUnicode_Check(pySeq) ) {
    4045           0 :     PyErr_SetString(PyExc_TypeError,"not a sequence");
    4046           0 :     *pbErr = TRUE;
    4047           0 :     return NULL;
    4048             :   }
    4049             : 
    4050       18461 :   Py_ssize_t size = PySequence_Size(pySeq);
    4051       18461 :   if( size > (Py_ssize_t)(INT_MAX - 1) ) {
    4052           0 :     PyErr_SetString(PyExc_TypeError, "too big sequence");
    4053           0 :     *pbErr = TRUE;
    4054           0 :     return NULL;
    4055             :   }
    4056       18461 :   if( size == 0 ) {
    4057             :     return NULL;
    4058             :   }
    4059       12884 :   char** papszRet = (char**) VSICalloc((int)size + 1, sizeof(char*));
    4060       12884 :   if( !papszRet ) {
    4061           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    4062           0 :     *pbErr = TRUE;
    4063           0 :     return NULL;
    4064             :   }
    4065      110601 :   for (int i = 0; i < (int)size; i++) {
    4066       97718 :     PyObject* pyObj = PySequence_GetItem(pySeq,i);
    4067       97718 :     if (PyUnicode_Check(pyObj))
    4068             :     {
    4069       97714 :       char *pszStr;
    4070       97714 :       Py_ssize_t nLen;
    4071       97714 :       PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    4072       97714 :       if( !pyUTF8Str )
    4073             :       {
    4074           0 :         Py_DECREF(pyObj);
    4075           0 :         PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
    4076           0 :         CSLDestroy(papszRet);
    4077           0 :         *pbErr = TRUE;
    4078           0 :         return NULL;
    4079             :       }
    4080       97714 :       PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    4081       97714 :       papszRet[i] = VSIStrdup(pszStr);
    4082      192514 :       Py_XDECREF(pyUTF8Str);
    4083             :     }
    4084           4 :     else if (PyBytes_Check(pyObj))
    4085           3 :       papszRet[i] = VSIStrdup(PyBytes_AsString(pyObj));
    4086             :     else
    4087             :     {
    4088           1 :         Py_DECREF(pyObj);
    4089           1 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    4090           1 :         CSLDestroy(papszRet);
    4091           1 :         *pbErr = TRUE;
    4092           1 :         return NULL;
    4093             :     }
    4094       97717 :     Py_DECREF(pyObj);
    4095       97717 :     if( !papszRet[i] )
    4096             :     {
    4097           0 :         PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    4098           0 :         CSLDestroy(papszRet);
    4099           0 :         *pbErr = TRUE;
    4100           0 :         return NULL;
    4101             :     }
    4102             :   }
    4103             :   return papszRet;
    4104             : }
    4105             : 
    4106             : 
    4107         462 : static char **CSLFromPyMapping( PyObject *pyObj, int *pbErr )
    4108             : 
    4109             : {
    4110         462 :     char** retCSL = NULL;
    4111         462 :     Py_ssize_t size = PyMapping_Length( pyObj );
    4112         462 :     if ( size > 0 && size == (int)size) {
    4113         275 :       PyObject *item_list = PyMapping_Items( pyObj );
    4114        1233 :       for( int i=0; i<(int)size; i++ ) {
    4115         961 :         PyObject *it = PySequence_GetItem( item_list, i );
    4116             : 
    4117         961 :         PyObject *k, *v;
    4118         961 :         if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
    4119           0 :           Py_DECREF(it);
    4120           0 :           Py_DECREF(item_list);
    4121           0 :           PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
    4122           0 :           CSLDestroy(retCSL);
    4123           0 :           *pbErr = TRUE;
    4124           3 :           return NULL;
    4125             :         }
    4126             : 
    4127         961 :         PyObject* kStr = PyObject_Str(k);
    4128         961 :         if( PyErr_Occurred() )
    4129             :         {
    4130           1 :             Py_DECREF(it);
    4131           1 :             Py_DECREF(item_list);
    4132           1 :             CSLDestroy(retCSL);
    4133           1 :             *pbErr = TRUE;
    4134           1 :             return NULL;
    4135             :         }
    4136             : 
    4137         960 :         PyObject* vStr;
    4138         960 :         if( PyBytes_Check(v) )
    4139             :         {
    4140           2 :             vStr = v;
    4141           2 :             Py_INCREF(vStr);
    4142             :         }
    4143             :         else
    4144             :         {
    4145         958 :             vStr = PyObject_Str(v);
    4146         958 :             if( PyErr_Occurred() )
    4147             :             {
    4148           1 :                 Py_DECREF(it);
    4149           1 :                 Py_DECREF(kStr);
    4150           1 :                 Py_DECREF(item_list);
    4151           1 :                 CSLDestroy(retCSL);
    4152           1 :                 *pbErr = TRUE;
    4153           1 :                 return NULL;
    4154             :             }
    4155             :         }
    4156             : 
    4157         959 :         int bFreeK, bFreeV;
    4158         959 :         char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
    4159         959 :         char* pszV = GDALPythonObjectToCStr(vStr, &bFreeV);
    4160         959 :         if( pszK == NULL || pszV == NULL )
    4161             :         {
    4162           1 :             GDALPythonFreeCStr(pszK, bFreeK);
    4163           1 :             GDALPythonFreeCStr(pszV, bFreeV);
    4164           1 :             Py_DECREF(kStr);
    4165           1 :             Py_DECREF(vStr);
    4166           1 :             Py_DECREF(it);
    4167           1 :             Py_DECREF(item_list);
    4168           1 :             PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
    4169           1 :             CSLDestroy(retCSL);
    4170           1 :             *pbErr = TRUE;
    4171           1 :             return NULL;
    4172             :         }
    4173         958 :         retCSL = CSLAddNameValue( retCSL, pszK, pszV );
    4174             : 
    4175         958 :         GDALPythonFreeCStr(pszK, bFreeK);
    4176         958 :         GDALPythonFreeCStr(pszV, bFreeV);
    4177         958 :         Py_DECREF(kStr);
    4178         958 :         Py_DECREF(vStr);
    4179         958 :         Py_DECREF(it);
    4180             :       }
    4181         272 :       Py_DECREF(item_list);
    4182             :     }
    4183         459 :     *pbErr = FALSE;
    4184         459 :     return retCSL;
    4185             : }
    4186             : 
    4187             : 
    4188             : typedef struct
    4189             : {
    4190             :     char*        name;
    4191             :     int          mode;
    4192             :     GIntBig      size;
    4193             :     GIntBig      mtime;
    4194             :     bool         modeKnown;
    4195             :     bool         sizeKnown;
    4196             :     bool         mtimeKnown;
    4197             :     char**       extra;
    4198             : } DirEntry;
    4199             : 
    4200             : 
    4201             : SWIGINTERNINLINE PyObject*
    4202       12476 :   SWIG_From_bool  (bool value)
    4203             : {
    4204       12476 :   return PyBool_FromLong(value ? 1 : 0);
    4205             : }
    4206             : 
    4207             : 
    4208             : /* Return a PyObject* from a C String */
    4209       90774 : static PyObject* GDALPythonObjectFromCStrAndSize(const char *pszStr, size_t nLen)
    4210             : {
    4211       90774 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    4212     1618060 :   for( size_t i = 0; i < nLen; ++i)
    4213             :   {
    4214     1527290 :     if (pszIter[i] > 127)
    4215             :     {
    4216           3 :         PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, nLen, "strict");
    4217           3 :         if (pyObj != NULL && !PyErr_Occurred())
    4218             :             return pyObj;
    4219           0 :         PyErr_Clear();
    4220           0 :         return PyBytes_FromStringAndSize(pszStr, nLen);
    4221             :     }
    4222             :   }
    4223       90771 :   return PyUnicode_FromStringAndSize(pszStr, nLen);
    4224             : }
    4225             : 
    4226             : 
    4227             : static PyObject*
    4228        7069 : GetCSLStringAsPyDict( char **stringarray, bool bFreeCSL ) {
    4229        7069 :   PyObject* dict = PyDict_New();
    4230        7069 :   if ( stringarray != NULL ) {
    4231       97580 :     for (char** iter = stringarray; *iter; ++iter ) {
    4232       91053 :       const char* pszSep = strchr( *iter, '=' );
    4233       91053 :       if ( pszSep != NULL) {
    4234       90774 :         const char* keyptr = *iter;
    4235       90774 :         const char* valptr = pszSep + 1;
    4236       90774 :         PyObject *nm = GDALPythonObjectFromCStrAndSize( keyptr, (size_t)(pszSep - keyptr) );
    4237       90774 :         PyObject *val = GDALPythonObjectFromCStr( valptr );
    4238       90774 :         PyDict_SetItem(dict, nm, val );
    4239       90774 :         Py_DECREF(nm);
    4240       91053 :         Py_DECREF(val);
    4241             :       }
    4242             :     }
    4243             :   }
    4244        7069 :   if( bFreeCSL )
    4245          41 :     CSLDestroy(stringarray);
    4246        7069 :   return dict;
    4247             : }
    4248             : 
    4249           0 : SWIGINTERN DirEntry *new_DirEntry(DirEntry const *entryIn){
    4250           0 :     DirEntry *self = (DirEntry*) CPLMalloc( sizeof( DirEntry ) );
    4251           0 :     self->name = CPLStrdup(entryIn->name);
    4252           0 :     self->mode = entryIn->mode;
    4253           0 :     self->size = entryIn->size;
    4254           0 :     self->mtime = entryIn->mtime;
    4255           0 :     self->modeKnown = entryIn->modeKnown;
    4256           0 :     self->sizeKnown = entryIn->sizeKnown;
    4257           0 :     self->mtimeKnown = entryIn->mtimeKnown;
    4258           0 :     self->extra = CSLDuplicate(entryIn->extra);
    4259           0 :     return self;
    4260             :   }
    4261          79 : SWIGINTERN void delete_DirEntry(DirEntry *self){
    4262          79 :     CPLFree(self->name);
    4263          79 :     CSLDestroy(self->extra);
    4264          79 :     CPLFree(self);
    4265          79 :   }
    4266           0 : SWIGINTERN bool DirEntry_IsDirectory(DirEntry *self){
    4267           0 :      return (self->mode & S_IFDIR) != 0;
    4268             :   }
    4269             : 
    4270         112 : DirEntry* wrapper_VSIGetNextDirEntry(VSIDIR* dir)
    4271             : {
    4272         112 :     const VSIDIREntry* vsiEntry = VSIGetNextDirEntry(dir);
    4273         112 :     if( vsiEntry == nullptr )
    4274             :     {
    4275             :         return nullptr;
    4276             :     }
    4277          79 :     DirEntry* entry = (DirEntry*) CPLMalloc( sizeof( DirEntry ) );
    4278          79 :     entry->name = CPLStrdup(vsiEntry->pszName);
    4279          79 :     entry->mode = vsiEntry->nMode;
    4280          79 :     entry->size = vsiEntry->nSize;
    4281          79 :     entry->mtime = vsiEntry->nMTime;
    4282          79 :     entry->modeKnown = vsiEntry->bModeKnown == TRUE;
    4283          79 :     entry->sizeKnown = vsiEntry->bSizeKnown == TRUE;
    4284          79 :     entry->mtimeKnown = vsiEntry->bMTimeKnown == TRUE;
    4285          79 :     entry->extra = CSLDuplicate(vsiEntry->papszExtra);
    4286          79 :     return entry;
    4287             : }
    4288             : 
    4289             : 
    4290       22233 : const char *wrapper_CPLGetConfigOption( const char * pszKey, const char * pszDefault = NULL )
    4291             : {
    4292       22233 :     return CPLGetConfigOption( pszKey, pszDefault );
    4293             : }
    4294        1923 : const char *wrapper_CPLGetGlobalConfigOption( const char * pszKey, const char * pszDefault = NULL )
    4295             : {
    4296        1923 :     return CPLGetGlobalConfigOption( pszKey, pszDefault );
    4297             : }
    4298        3014 : const char *wrapper_CPLGetThreadLocalConfigOption( const char * pszKey, const char * pszDefault = NULL )
    4299             : {
    4300        3014 :     return CPLGetThreadLocalConfigOption( pszKey, pszDefault );
    4301             : }
    4302             : 
    4303             : 
    4304           6 : char** wrapper_GetConfigOptions() {
    4305           6 :     char ** papszOpts = CPLGetConfigOptions();
    4306           6 :     char ** papszTLOpts = CPLGetThreadLocalConfigOptions();
    4307             : 
    4308           6 :     papszOpts = CSLMerge(papszOpts, papszTLOpts);
    4309             : 
    4310           6 :     CSLDestroy(papszTLOpts);
    4311             : 
    4312           6 :     return papszOpts;
    4313             : };
    4314             : 
    4315             : 
    4316          56 : void wrapper_VSISetCredential( const char* pszPathPrefix, const char * pszKey, const char * pszValue )
    4317             : {
    4318          56 :     VSISetPathSpecificOption(pszPathPrefix, pszKey, pszValue);
    4319          56 : }
    4320             : 
    4321           0 : const char *wrapper_VSIGetCredential( const char* pszPathPrefix, const char * pszKey, const char * pszDefault = NULL )
    4322             : {
    4323           0 :     return VSIGetPathSpecificOption( pszPathPrefix, pszKey, pszDefault );
    4324             : }
    4325             : 
    4326          10 : const char *wrapper_VSIGetPathSpecificOption( const char* pszPathPrefix, const char * pszKey, const char * pszDefault = NULL )
    4327             : {
    4328          10 :     return VSIGetPathSpecificOption( pszPathPrefix, pszKey, pszDefault );
    4329             : }
    4330             : 
    4331             : 
    4332           8 : void wrapper_VSIClearCredentials(const char * pszPathPrefix = NULL)
    4333             : {
    4334           8 :     VSIClearPathSpecificOptions( pszPathPrefix );
    4335           8 : }
    4336          10 : void wrapper_VSIClearPathSpecificOptions(const char * pszPathPrefix = NULL)
    4337             : {
    4338          10 :     VSIClearPathSpecificOptions( pszPathPrefix );
    4339          10 : }
    4340             : 
    4341             : 
    4342        3587 : VSI_RETVAL wrapper_VSIFileFromMemBuffer( const char* utf8_path, GIntBig nBytes, const char *pabyData)
    4343             : {
    4344        3587 :     const size_t nSize = static_cast<size_t>(nBytes);
    4345        3587 :     void* pabyDataDup = VSIMalloc(nSize);
    4346        3587 :     if (pabyDataDup == NULL)
    4347             :             return -1;
    4348        3587 :     memcpy(pabyDataDup, pabyData, nSize);
    4349        3587 :     VSILFILE *fp = VSIFileFromMemBuffer(utf8_path, (GByte*) pabyDataDup, nSize, TRUE);
    4350             : 
    4351        3587 :     if (fp == NULL) {
    4352           1 :         VSIFree(pabyDataDup);
    4353           1 :         return -1;
    4354             :     } else {
    4355        3586 :         VSIFCloseL(fp);
    4356        3586 :         return 0;
    4357             :     }
    4358             : }
    4359             : 
    4360             : 
    4361             : static bool
    4362      189686 : GetBufferAsCharPtrGIntBigSize( PyObject* input, GIntBig *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
    4363      189686 :   {
    4364      189686 :     if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    4365             :     {
    4366      180275 :       *viewIsValid = true;
    4367      180275 :       *nLen = view->len;
    4368      180275 :       *pBuf = (char*) view->buf;
    4369      180275 :       return true;
    4370             :     }
    4371             :     else
    4372             :     {
    4373        9411 :       PyErr_Clear();
    4374             :     }
    4375             :   }
    4376        9411 :   if (PyUnicode_Check(input))
    4377             :   {
    4378        9409 :     size_t safeLen = 0;
    4379        9409 :     int ret;
    4380        9409 :     try {
    4381        9409 :       ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
    4382             :     }
    4383           0 :     catch( const std::exception& )
    4384             :     {
    4385           0 :       PyErr_SetString(PyExc_MemoryError, "out of memory");
    4386           0 :       return false;
    4387             :     }
    4388        9409 :     if (!SWIG_IsOK(ret)) {
    4389           0 :       PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
    4390           0 :       return false;
    4391             :     }
    4392             : 
    4393        9409 :     if (safeLen) safeLen--;
    4394        9409 :     *nLen = (GIntBig)safeLen;
    4395        9409 :     return true;
    4396             :   }
    4397             :   else
    4398             :   {
    4399           2 :     PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
    4400           2 :     return false;
    4401             :   }
    4402             : }
    4403             : 
    4404             : 
    4405          11 : bool wrapper_VSIUnlinkBatch(char** files)
    4406             : {
    4407          11 :     int* success = VSIUnlinkBatch(files);
    4408          11 :     if( !success )
    4409             :         return false;
    4410          26 :     int bRet = true;
    4411          26 :     for( int i = 0; files && files[i]; i++ )
    4412             :     {
    4413          18 :         if( !success[i] ) {
    4414             :             bRet = false;
    4415             :             break;
    4416             :         }
    4417             :     }
    4418           9 :     VSIFree(success);
    4419           9 :     return bRet;
    4420             : }
    4421             : 
    4422             : 
    4423           0 : int wrapper_HasThreadSupport()
    4424             : {
    4425           0 :     return strcmp(CPLGetThreadingModel(), "stub") != 0;
    4426             : }
    4427             : 
    4428             : 
    4429           7 : VSI_RETVAL wrapper_VSIMove(const char * old_path, const char *new_path, char** options = NULL,
    4430             :                            GDALProgressFunc callback=NULL,
    4431             :                            void* callback_data=NULL)
    4432             : {
    4433           7 :     return VSIMove(old_path, new_path, options, callback, callback_data);
    4434             : }
    4435             : 
    4436             : 
    4437          42 : bool wrapper_VSISync(const char* pszSource,
    4438             :                      const char* pszTarget,
    4439             :                      char** options = NULL,
    4440             :                      GDALProgressFunc callback=NULL,
    4441             :                      void* callback_data=NULL)
    4442             : {
    4443          42 :     return VSISync( pszSource, pszTarget, options, callback, callback_data, nullptr );
    4444             : }
    4445             : 
    4446             : 
    4447          29 : int wrapper_VSICopyFile(const char* pszSource,
    4448             :                         const char* pszTarget,
    4449             :                         VSILFILE* fpSource = NULL,
    4450             :                         GIntBig nSourceSize = -1,
    4451             :                         char** options = NULL,
    4452             :                         GDALProgressFunc callback=NULL,
    4453             :                         void* callback_data=NULL)
    4454             : {
    4455          29 :     return VSICopyFile(
    4456             :         pszSource, pszTarget, fpSource,
    4457             :         nSourceSize < 0 ? static_cast<vsi_l_offset>(-1) : static_cast<vsi_l_offset>(nSourceSize),
    4458          29 :         options, callback, callback_data );
    4459             : }
    4460             : 
    4461             : 
    4462          20 : void CopyFileRestartable(const char* pszSource,
    4463             :                          const char* pszTarget,
    4464             :                          const char* pszInputPayload,
    4465             :                          int* pnRetCode,
    4466             :                          char** ppszOutputPayload,
    4467             :                          char** options = NULL,
    4468             :                          GDALProgressFunc callback=NULL,
    4469             :                          void* callback_data=NULL)
    4470             : {
    4471          20 :     *pnRetCode = VSICopyFileRestartable(pszSource, pszTarget, pszInputPayload,
    4472             :                                         ppszOutputPayload, options, callback,
    4473             :                                         callback_data);
    4474          20 : }
    4475             : 
    4476             : 
    4477             : 
    4478             : 
    4479           0 : int wrapper_MoveFile(const char* pszSource, const char* pszTarget)
    4480             : {
    4481           0 :     return CPLMoveFile(pszTarget, pszSource);
    4482             : }
    4483             : 
    4484             : 
    4485          23 : retStringAndCPLFree* wrapper_VSIGetSignedURL(const char * utf8_path, char** options = NULL )
    4486             : {
    4487          23 :     return VSIGetSignedURL( utf8_path, options );
    4488             : }
    4489             : 
    4490             : 
    4491             : typedef struct
    4492             : {
    4493             :   int     mode;
    4494             :   GIntBig size;
    4495             :   GIntBig mtime;
    4496             : } StatBuf;
    4497             : 
    4498        4833 : SWIGINTERN StatBuf *new_StatBuf(StatBuf *psStatBuf){
    4499        9666 :     StatBuf *self = (StatBuf*) CPLMalloc( sizeof( StatBuf ) );
    4500        4833 :     self->mode = psStatBuf->mode;
    4501        4833 :     self->size = psStatBuf->size;
    4502        4833 :     self->mtime = psStatBuf->mtime;
    4503        4833 :     return self;
    4504             :   }
    4505        4833 : SWIGINTERN void delete_StatBuf(StatBuf *self){
    4506        4833 :     CPLFree(self);
    4507        4833 :   }
    4508        2503 : SWIGINTERN int StatBuf_IsDirectory(StatBuf *self){
    4509        2503 :      return (self->mode & S_IFDIR) != 0;
    4510             :   }
    4511             : 
    4512        6357 : int wrapper_VSIStatL( const char * utf8_path, StatBuf *psStatBufOut, int nFlags = 0 )
    4513             : {
    4514        6357 :     VSIStatBufL sStat;
    4515        6357 :     memset(&sStat, 0, sizeof(sStat));
    4516        6357 :     memset(psStatBufOut, 0, sizeof(StatBuf));
    4517        6357 :     int nRet = VSIStatExL(utf8_path, &sStat, nFlags);
    4518        6357 :     psStatBufOut->mode = sStat.st_mode;
    4519        6357 :     psStatBufOut->size = (GIntBig)sStat.st_size;
    4520        6357 :     psStatBufOut->mtime = (GIntBig)sStat.st_mtime;
    4521        6357 :     return nRet;
    4522             : }
    4523             : 
    4524             : 
    4525        4592 : VSILFILE   *wrapper_VSIFOpenL( const char *utf8_path, const char *pszMode )
    4526             : {
    4527        4592 :     if (!pszMode) /* would lead to segfault */
    4528           0 :         pszMode = "r";
    4529        4592 :     return VSIFOpenL( utf8_path, pszMode );
    4530             : }
    4531             : 
    4532             : 
    4533         389 : VSILFILE   *wrapper_VSIFOpenExL( const char *utf8_path, const char *pszMode, int bSetError = FALSE, char** options = NULL )
    4534             : {
    4535         389 :     if (!pszMode) /* would lead to segfault */
    4536           0 :         pszMode = "r";
    4537         389 :     return VSIFOpenEx2L( utf8_path, pszMode, bSetError, options );
    4538             : }
    4539             : 
    4540             : 
    4541             : 
    4542       65904 : int wrapper_VSIFSeekL( VSILFILE* fp, GIntBig offset, int whence) {
    4543             : 
    4544             : 
    4545             : 
    4546       65904 : if (offset < 0) {
    4547           3 :     switch (whence) {
    4548           1 :         case SEEK_END: VSIFSeekL(fp, 0, SEEK_END);
    4549           2 :         case SEEK_CUR:
    4550           2 :             offset = VSIFTellL(fp) + offset;
    4551           2 :             whence = SEEK_SET;
    4552           2 :             break;
    4553           1 :         default:
    4554           1 :             VSIError(VSIE_FileError, "Cannot use negative offset with SEEK_SET");
    4555           1 :             return -1;
    4556             :     }
    4557             : }
    4558             : 
    4559       65903 : return VSIFSeekL(fp, offset, whence);
    4560             : }
    4561             : 
    4562             : 
    4563      346827 : int wrapper_VSIFWriteL( int nLen, char *pBuf, int size, int memb, VSILFILE* fp)
    4564             : {
    4565      346827 :     if (nLen < static_cast<GIntBig>(size) * memb)
    4566             :     {
    4567           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Inconsistent buffer size with 'size' and 'memb' values");
    4568           0 :         return 0;
    4569             :     }
    4570      346827 :     return static_cast<int>(VSIFWriteL(pBuf, size, memb, fp));
    4571             : }
    4572             : 
    4573             : 
    4574           7 : void MultipartUploadGetCapabilities(
    4575             :     const char *pszFilename, int* pnRetCode, int *pbNonSequentialUploadSupported,
    4576             :     int *pbParallelUploadSupported, int *pbSupportsAbort, size_t *pnMinPartSize,
    4577             :     size_t *pnMaxPartSize, int *pnMaxPartCount)
    4578             : {
    4579           7 :     *pnRetCode = VSIMultipartUploadGetCapabilities(pszFilename,
    4580             :                         pbNonSequentialUploadSupported,
    4581             :                         pbParallelUploadSupported,
    4582             :                         pbSupportsAbort,
    4583             :                         pnMinPartSize,
    4584             :                         pnMaxPartSize,
    4585             :                         pnMaxPartCount);
    4586           7 : }
    4587             : 
    4588             : 
    4589           4 : retStringAndCPLFree* MultipartUploadStart(const char *pszFilename, char** options = NULL)
    4590             : {
    4591           4 :     return VSIMultipartUploadStart(pszFilename, options);
    4592             : }
    4593             : 
    4594             : 
    4595           5 : retStringAndCPLFree* MultipartUploadAddPart(const char *pszFilename,
    4596             :                              const char *pszUploadId,
    4597             :                              int nPartNumber,
    4598             :                              GUIntBig nFileOffset,
    4599             :                              size_t nDataLength, const char *pData,
    4600             :                              char** options = NULL)
    4601             : {
    4602           5 :     return VSIMultipartUploadAddPart(pszFilename, pszUploadId,
    4603             :                                      nPartNumber, nFileOffset,
    4604             :                                      pData, nDataLength,
    4605           5 :                                      options);
    4606             : }
    4607             : 
    4608             : 
    4609             : static bool
    4610           7 : GetBufferAsCharPtrSizetSize( PyObject* input, size_t *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
    4611           7 :   {
    4612           7 :     if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    4613             :     {
    4614           7 :       *viewIsValid = true;
    4615           7 :       *nLen = view->len;
    4616           7 :       *pBuf = (char*) view->buf;
    4617           7 :       return true;
    4618             :     }
    4619             :     else
    4620             :     {
    4621           0 :       PyErr_Clear();
    4622             :     }
    4623             :   }
    4624           0 :   if (PyUnicode_Check(input))
    4625             :   {
    4626           0 :     size_t safeLen = 0;
    4627           0 :     int ret;
    4628           0 :     try {
    4629           0 :       ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
    4630             :     }
    4631           0 :     catch( const std::exception& )
    4632             :     {
    4633           0 :       PyErr_SetString(PyExc_MemoryError, "out of memory");
    4634           0 :       return false;
    4635             :     }
    4636           0 :     if (!SWIG_IsOK(ret)) {
    4637           0 :       PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
    4638           0 :       return false;
    4639             :     }
    4640             : 
    4641           0 :     if (safeLen) safeLen--;
    4642           0 :     *nLen = safeLen;
    4643           0 :     return true;
    4644             :   }
    4645             :   else
    4646             :   {
    4647           0 :     PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
    4648           0 :     return false;
    4649             :   }
    4650             : }
    4651             : 
    4652             : 
    4653             : #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
    4654             : #  define SWIG_LONG_LONG_AVAILABLE
    4655             : #endif
    4656             : 
    4657             : 
    4658             : #ifdef SWIG_LONG_LONG_AVAILABLE
    4659             : SWIGINTERN int
    4660             : SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
    4661             : {
    4662             :   int res = SWIG_TypeError;
    4663             :   if (PyLong_Check(obj)) {
    4664             :     unsigned long long v = PyLong_AsUnsignedLongLong(obj);
    4665             :     if (!PyErr_Occurred()) {
    4666             :       if (val) *val = v;
    4667             :       return SWIG_OK;
    4668             :     } else {
    4669             :       PyErr_Clear();
    4670             :       res = SWIG_OverflowError;
    4671             :     }
    4672             :   } else {
    4673             :     unsigned long v;
    4674             :     res = SWIG_AsVal_unsigned_SS_long (obj,&v);
    4675             :     if (SWIG_IsOK(res)) {
    4676             :       if (val) *val = v;
    4677             :       return res;
    4678             :     }
    4679             :   }
    4680             : #ifdef SWIG_PYTHON_CAST_MODE
    4681             :   {
    4682             :     const double mant_max = 1LL << DBL_MANT_DIG;
    4683             :     double d;
    4684             :     res = SWIG_AsVal_double (obj,&d);
    4685             :     if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
    4686             :       return SWIG_OverflowError;
    4687             :     if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
    4688             :       if (val) *val = (unsigned long long)(d);
    4689             :       return SWIG_AddCast(res);
    4690             :     }
    4691             :     res = SWIG_TypeError;
    4692             :   }
    4693             : #endif
    4694             :   return res;
    4695             : }
    4696             : #endif
    4697             : 
    4698             : 
    4699             : SWIGINTERNINLINE int
    4700         254 : SWIG_AsVal_size_t (PyObject * obj, size_t *val)
    4701             : {
    4702         254 :   int res = SWIG_TypeError;
    4703             : #ifdef SWIG_LONG_LONG_AVAILABLE
    4704         254 :   if (sizeof(size_t) <= sizeof(unsigned long)) {
    4705             : #endif
    4706         254 :     unsigned long v;
    4707         508 :     res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
    4708         254 :     if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
    4709             : #ifdef SWIG_LONG_LONG_AVAILABLE
    4710             :   } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
    4711             :     unsigned long long v;
    4712             :     res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
    4713             :     if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
    4714             :   }
    4715             : #endif
    4716         254 :   return res;
    4717             : }
    4718             : 
    4719             : 
    4720           5 : bool MultipartUploadEnd(const char *pszFilename,
    4721             :                         const char *pszUploadId,
    4722             :                         char** partIds,
    4723             :                         GUIntBig nTotalSize,
    4724             :                         char** options = NULL)
    4725             : 
    4726             : {
    4727           5 :     return VSIMultipartUploadEnd(pszFilename, pszUploadId,
    4728           5 :                                  CSLCount(partIds), partIds,
    4729             :                                  nTotalSize,
    4730           5 :                                  options);
    4731             : }
    4732             : 
    4733             : 
    4734           6 : bool MultipartUploadAbort(const char *pszFilename,
    4735             :                           const char *pszUploadId,
    4736             :                           char** options = NULL)
    4737             : {
    4738           6 :     return VSIMultipartUploadAbort(pszFilename, pszUploadId, options);
    4739             : }
    4740             : 
    4741        2486 : SWIGINTERN char const *GDALMajorObjectShadow_GetDescription(GDALMajorObjectShadow *self){
    4742        2486 :     return GDALGetDescription( self );
    4743             :   }
    4744          44 : SWIGINTERN void GDALMajorObjectShadow_SetDescription(GDALMajorObjectShadow *self,char const *pszNewDesc){
    4745          44 :     GDALSetDescription( self, pszNewDesc );
    4746          44 :   }
    4747          75 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadataDomainList(GDALMajorObjectShadow *self){
    4748          75 :     return GDALGetMetadataDomainList( self );
    4749             :   }
    4750        7007 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_Dict(GDALMajorObjectShadow *self,char const *pszDomain=""){
    4751        7007 :     return GDALGetMetadata( self, pszDomain );
    4752             :   }
    4753         403 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_List(GDALMajorObjectShadow *self,char const *pszDomain=""){
    4754         403 :     return GDALGetMetadata( self, pszDomain );
    4755             :   }
    4756             : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_0(GDALMajorObjectShadow *self,char **papszMetadata,char const *pszDomain=""){
    4757             :     return GDALSetMetadata( self, papszMetadata, pszDomain );
    4758             :   }
    4759             : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_1(GDALMajorObjectShadow *self,char *pszMetadataString,char const *pszDomain=""){
    4760             :     char *tmpList[2];
    4761             :     tmpList[0] = pszMetadataString;
    4762             :     tmpList[1] = 0;
    4763             :     return GDALSetMetadata( self, tmpList, pszDomain );
    4764             :   }
    4765       57019 : SWIGINTERN char const *GDALMajorObjectShadow_GetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszDomain=""){
    4766       57019 :     return GDALGetMetadataItem( self, pszName, pszDomain);
    4767             :   }
    4768         484 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszValue,char const *pszDomain=""){
    4769         484 :     return GDALSetMetadataItem( self, pszName, pszValue, pszDomain);
    4770             :   }
    4771       17316 : SWIGINTERN GDALDatasetShadow *GDALDriverShadow_Create(GDALDriverShadow *self,char const *utf8_path,int xsize,int ysize,int bands=1,GDALDataType eType=GDT_Byte,char **options=0){
    4772             : 
    4773       34632 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate(    self,
    4774             :                                                                 utf8_path,
    4775             :                                                                 xsize,
    4776             :                                                                 ysize,
    4777             :                                                                 bands,
    4778             :                                                                 eType,
    4779             :                                                                 options );
    4780       17316 :     return ds;
    4781             :   }
    4782         153 : SWIGINTERN GDALDatasetShadow *GDALDriverShadow_CreateVector(GDALDriverShadow *self,char const *utf8_path,char **options=0){
    4783         306 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate(self, utf8_path, 0, 0, 0, GDT_Unknown, options);
    4784         153 :     return ds;
    4785             :   }
    4786         425 : SWIGINTERN GDALDatasetShadow *GDALDriverShadow_CreateMultiDimensional(GDALDriverShadow *self,char const *utf8_path,char **root_group_options=0,char **options=0){
    4787             : 
    4788         850 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreateMultiDimensional(    self,
    4789             :                                                                 utf8_path,
    4790             :                                                                 root_group_options,
    4791             :                                                                 options );
    4792         425 :     return ds;
    4793             :   }
    4794        3886 : 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){
    4795             : 
    4796        7772 :     GDALDatasetShadow *ds = (GDALDatasetShadow*) GDALCreateCopy(    self,
    4797             :                                                                     utf8_path,
    4798             :                                                                     src,
    4799             :                                                                     strict,
    4800             :                                                                     options,
    4801             :                                                                     callback,
    4802             :                                                                     callback_data );
    4803        3886 :     return ds;
    4804             :   }
    4805        2414 : SWIGINTERN CPLErr GDALDriverShadow_Delete(GDALDriverShadow *self,char const *utf8_path){
    4806        2414 :     return GDALDeleteDataset( self, utf8_path );
    4807             :   }
    4808         173 : SWIGINTERN CPLErr GDALDriverShadow_Rename(GDALDriverShadow *self,char const *newName,char const *oldName){
    4809         173 :     return GDALRenameDataset( self, newName, oldName );
    4810             :   }
    4811           3 : SWIGINTERN CPLErr GDALDriverShadow_CopyFiles(GDALDriverShadow *self,char const *newName,char const *oldName){
    4812           3 :     return GDALCopyDatasetFiles( self, newName, oldName );
    4813             :   }
    4814           2 : SWIGINTERN bool GDALDriverShadow_HasOpenOption(GDALDriverShadow *self,char const *openOptionName){
    4815           2 :     return GDALDriverHasOpenOption( self, openOptionName );
    4816             :   }
    4817           6 : SWIGINTERN bool GDALDriverShadow_TestCapability(GDALDriverShadow *self,char const *cap){
    4818             :     // TODO: should this also check DCAP entries in driver metadata?
    4819          12 :     return (OGR_Dr_TestCapability(self, cap) > 0);
    4820             :   }
    4821          93 : SWIGINTERN int GDALDriverShadow_Register(GDALDriverShadow *self){
    4822          93 :     return GDALRegisterDriver( self );
    4823             :   }
    4824          93 : SWIGINTERN void GDALDriverShadow_Deregister(GDALDriverShadow *self){
    4825          93 :     GDALDeregisterDriver( self );
    4826          93 :   }
    4827             : 
    4828       98602 : char const *GDALDriverShadow_ShortName_get( GDALDriverShadow *h ) {
    4829       98602 :   return GDALGetDriverShortName( h );
    4830             : }
    4831          17 : char const *GDALDriverShadow_LongName_get( GDALDriverShadow *h ) {
    4832          17 :   return GDALGetDriverLongName( h );
    4833             : }
    4834           0 : char const *GDALDriverShadow_HelpTopic_get( GDALDriverShadow *h ) {
    4835           0 :   return GDALGetDriverHelpTopic( h );
    4836             : }
    4837             : 
    4838             : 
    4839             : SWIGINTERN int
    4840           0 : SWIG_AsVal_short (PyObject * obj, short *val)
    4841             : {
    4842           0 :   long v;
    4843           0 :   int res = SWIG_AsVal_long (obj, &v);
    4844           0 :   if (SWIG_IsOK(res)) {
    4845           0 :     if ((v < SHRT_MIN || v > SHRT_MAX)) {
    4846             :       return SWIG_OverflowError;
    4847             :     } else {
    4848           0 :       if (val) *val = static_cast< short >(v);
    4849             :     }
    4850             :   }  
    4851             :   return res;
    4852             : }
    4853             : 
    4854             : 
    4855             :   #define SWIG_From_long   PyInt_FromLong 
    4856             : 
    4857             : 
    4858             : SWIGINTERNINLINE PyObject *
    4859           0 : SWIG_From_short  (short value)
    4860             : {    
    4861           0 :   return SWIG_From_long  (value);
    4862             : }
    4863             : 
    4864             : 
    4865             :   #define SWIG_From_double   PyFloat_FromDouble 
    4866             : 
    4867        3428 : 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=""){
    4868             : 
    4869        3428 :     GDAL_GCP *self = (GDAL_GCP*) CPLMalloc( sizeof( GDAL_GCP ) );
    4870        3428 :     self->dfGCPX = x;
    4871        3428 :     self->dfGCPY = y;
    4872        3428 :     self->dfGCPZ = z;
    4873        3428 :     self->dfGCPPixel = pixel;
    4874        3428 :     self->dfGCPLine = line;
    4875        3428 :     self->pszInfo =  CPLStrdup( (info == 0) ? "" : info );
    4876        3428 :     self->pszId = CPLStrdup( (id==0)? "" : id );
    4877        3428 :     return self;
    4878             :   }
    4879        3428 : SWIGINTERN void delete_GDAL_GCP(GDAL_GCP *self){
    4880        3428 :     if ( self->pszInfo )
    4881        3428 :       CPLFree( self->pszInfo );
    4882        3428 :     if ( self->pszId )
    4883        3428 :       CPLFree( self->pszId );
    4884        3428 :     CPLFree( self );
    4885        3428 :   }
    4886             : 
    4887             : 
    4888        2205 : double GDAL_GCP_GCPX_get( GDAL_GCP *gcp ) {
    4889        2205 :   return gcp->dfGCPX;
    4890             : }
    4891          92 : void GDAL_GCP_GCPX_set( GDAL_GCP *gcp, double dfGCPX ) {
    4892          92 :   gcp->dfGCPX = dfGCPX;
    4893          92 : }
    4894        2205 : double GDAL_GCP_GCPY_get( GDAL_GCP *gcp ) {
    4895        2205 :   return gcp->dfGCPY;
    4896             : }
    4897          92 : void GDAL_GCP_GCPY_set( GDAL_GCP *gcp, double dfGCPY ) {
    4898          92 :   gcp->dfGCPY = dfGCPY;
    4899          92 : }
    4900          42 : double GDAL_GCP_GCPZ_get( GDAL_GCP *gcp ) {
    4901          42 :   return gcp->dfGCPZ;
    4902             : }
    4903           0 : void GDAL_GCP_GCPZ_set( GDAL_GCP *gcp, double dfGCPZ ) {
    4904           0 :   gcp->dfGCPZ = dfGCPZ;
    4905           0 : }
    4906        8554 : double GDAL_GCP_GCPPixel_get( GDAL_GCP *gcp ) {
    4907        8554 :   return gcp->dfGCPPixel;
    4908             : }
    4909         100 : void GDAL_GCP_GCPPixel_set( GDAL_GCP *gcp, double dfGCPPixel ) {
    4910         100 :   gcp->dfGCPPixel = dfGCPPixel;
    4911         100 : }
    4912        8554 : double GDAL_GCP_GCPLine_get( GDAL_GCP *gcp ) {
    4913        8554 :   return gcp->dfGCPLine;
    4914             : }
    4915         100 : void GDAL_GCP_GCPLine_set( GDAL_GCP *gcp, double dfGCPLine ) {
    4916         100 :   gcp->dfGCPLine = dfGCPLine;
    4917         100 : }
    4918           9 : const char * GDAL_GCP_Info_get( GDAL_GCP *gcp ) {
    4919           9 :   return gcp->pszInfo;
    4920             : }
    4921           1 : void GDAL_GCP_Info_set( GDAL_GCP *gcp, const char * pszInfo ) {
    4922           1 :   if ( gcp->pszInfo )
    4923           1 :     CPLFree( gcp->pszInfo );
    4924           1 :   gcp->pszInfo = CPLStrdup(pszInfo);
    4925           1 : }
    4926           9 : const char * GDAL_GCP_Id_get( GDAL_GCP *gcp ) {
    4927           9 :   return gcp->pszId;
    4928             : }
    4929           1 : void GDAL_GCP_Id_set( GDAL_GCP *gcp, const char * pszId ) {
    4930           1 :   if ( gcp->pszId )
    4931           1 :     CPLFree( gcp->pszId );
    4932           1 :   gcp->pszId = CPLStrdup(pszId);
    4933           1 : }
    4934             : 
    4935             : 
    4936             : static PyObject *
    4937       14105 : CreateTupleFromDoubleArray( const double *first, size_t size ) {
    4938       14105 :   PyObject *out = PyTuple_New( size );
    4939       66578 :   for( unsigned int i=0; i<size; i++ ) {
    4940       52473 :     PyObject *val = PyFloat_FromDouble( *first );
    4941       52473 :     ++first;
    4942       52473 :     PyTuple_SetItem( out, i, val );
    4943             :   }
    4944       14105 :   return out;
    4945             : }
    4946             : 
    4947             : 
    4948             : #include "gdal.h"
    4949             : 
    4950             : typedef struct
    4951             : {
    4952             :     CPLVirtualMem *vmem;
    4953             :     int            bAuto;
    4954             :     GDALDataType   eBufType;
    4955             :     int            bIsBandSequential;
    4956             :     int            bReadOnly;
    4957             :     int            nBufXSize;
    4958             :     int            nBufYSize;
    4959             :     int            nBandCount;
    4960             :     GDALTileOrganization eTileOrganization;
    4961             :     int                  nTileXSize;
    4962             :     int                  nTileYSize;
    4963             :     int            nPixelSpace; /* if bAuto == TRUE */
    4964             :     GIntBig        nLineSpace; /* if bAuto == TRUE */
    4965             : } CPLVirtualMemShadow;
    4966             : 
    4967             : 
    4968           0 : SWIGINTERN void delete_CPLVirtualMemShadow(CPLVirtualMemShadow *self){
    4969           0 :         CPLVirtualMemFree( self->vmem );
    4970           0 :         free(self);
    4971             :     }
    4972           0 : SWIGINTERN void CPLVirtualMemShadow_GetAddr(CPLVirtualMemShadow *self,void **pptr,size_t *pnsize,GDALDataType *pdatatype,int *preadonly){
    4973           0 :         *pptr = CPLVirtualMemGetAddr( self->vmem );
    4974           0 :         *pnsize = CPLVirtualMemGetSize( self->vmem );
    4975           0 :         *pdatatype = self->eBufType;
    4976           0 :         *preadonly = self->bReadOnly;
    4977             :     }
    4978             : SWIGINTERN void CPLVirtualMemShadow_Pin(CPLVirtualMemShadow *self,size_t start_offset=0,size_t nsize=0,int bWriteOp=0){
    4979             :         if( nsize == 0 || start_offset + nsize >= CPLVirtualMemGetSize( self->vmem ) )
    4980             :             nsize = CPLVirtualMemGetSize( self->vmem ) - start_offset;
    4981             :         char* start_addr = (char*)CPLVirtualMemGetAddr( self->vmem ) + start_offset;
    4982             :         CPLVirtualMemPin(self->vmem, start_addr, nsize, bWriteOp);
    4983             :     }
    4984             : 
    4985             : /* Returned size is in bytes or 0 if an error occurred. */
    4986             : static
    4987      353033 : GIntBig ComputeDatasetRasterIOSize (int buf_xsize, int buf_ysize, int nPixelSize,
    4988             :                                 int nBands, int* bandMap, int nBandMapArrayLength,
    4989             :                                 GIntBig nPixelSpace, GIntBig nLineSpace, GIntBig nBandSpace,
    4990             :                                 int bSpacingShouldBeMultipleOfPixelSize )
    4991             : {
    4992      353033 :     if (buf_xsize <= 0 || buf_ysize <= 0)
    4993             :     {
    4994           2 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for buffer size");
    4995           2 :         return 0;
    4996             :     }
    4997             : 
    4998      353031 :     if (nPixelSpace < 0 || nLineSpace < 0 || nBandSpace < 0)
    4999             :     {
    5000           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for space arguments");
    5001           0 :         return 0;
    5002             :     }
    5003             : 
    5004      353031 :     if (nPixelSize == 0)
    5005             :     {
    5006           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    5007           1 :         return 0;
    5008             :     }
    5009             : 
    5010      353030 :     if( nPixelSpace == 0 )
    5011      351907 :         nPixelSpace = nPixelSize;
    5012        1123 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nPixelSpace % nPixelSize) != 0 )
    5013             :     {
    5014           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nPixelSpace should be a multiple of nPixelSize");
    5015           0 :         return 0;
    5016             :     }
    5017             : 
    5018      353030 :     if( nLineSpace == 0 )
    5019             :     {
    5020      352991 :         nLineSpace = nPixelSpace * buf_xsize;
    5021             :     }
    5022          39 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nLineSpace % nPixelSize) != 0 )
    5023             :     {
    5024           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    5025           0 :         return 0;
    5026             :     }
    5027             : 
    5028      353030 :     if( nBandSpace == 0 )
    5029             :     {
    5030      351929 :         nBandSpace = nLineSpace * buf_ysize;
    5031             :     }
    5032        1101 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nBandSpace % nPixelSize) != 0 )
    5033             :     {
    5034           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    5035           0 :         return 0;
    5036             :     }
    5037             : 
    5038      353030 :     if (nBands <= 0 || (bandMap != NULL && nBands > nBandMapArrayLength))
    5039             :     {
    5040           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Invalid band count");
    5041           0 :         return 0;
    5042             :     }
    5043             : 
    5044      353030 :     GIntBig nRet = (GIntBig)(buf_ysize - 1) * nLineSpace + (GIntBig)(buf_xsize - 1) * nPixelSpace + (GIntBig)(nBands - 1) * nBandSpace + nPixelSize;
    5045             : #if SIZEOF_VOIDP == 4
    5046             :     if (nRet > INT_MAX)
    5047             :     {
    5048             :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    5049             :         return 0;
    5050             :     }
    5051             : #endif
    5052             : 
    5053      353030 :     return nRet;
    5054             : }
    5055             : 
    5056             : 
    5057             : typedef struct
    5058             : {
    5059             :     GDALAsyncReaderH  hAsyncReader;
    5060             :     void             *pyObject;
    5061             : } GDALAsyncReaderWrapper;
    5062             : 
    5063             : typedef void* GDALAsyncReaderWrapperH;
    5064             : 
    5065           3 : static GDALAsyncReaderH AsyncReaderWrapperGetReader(GDALAsyncReaderWrapperH hWrapper)
    5066             : {
    5067           3 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    5068           3 :     if (psWrapper->hAsyncReader == NULL)
    5069             :     {
    5070           0 :         CPLError(CE_Failure, CPLE_AppDefined, "AsyncReader object is defunct");
    5071             :     }
    5072           3 :     return psWrapper->hAsyncReader;
    5073             : }
    5074             : 
    5075             : #if defined(SWIGPYTHON)
    5076           1 : static void* AsyncReaderWrapperGetPyObject(GDALAsyncReaderWrapperH hWrapper)
    5077             : {
    5078           1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    5079           1 :     return psWrapper->pyObject;
    5080             : }
    5081             : #endif
    5082             : 
    5083           1 : static void DeleteAsyncReaderWrapper(GDALAsyncReaderWrapperH hWrapper)
    5084             : {
    5085           1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    5086           1 :     if (psWrapper->hAsyncReader != NULL)
    5087             :     {
    5088           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    5089             :                  "Native AsyncReader object will leak. EndAsyncReader() should have been called before");
    5090             :     }
    5091           1 :     CPLFree(psWrapper);
    5092           1 : }
    5093             : 
    5094             : 
    5095             : 
    5096             : 
    5097           1 : static GDALAsyncReaderWrapper* CreateAsyncReaderWrapper(GDALAsyncReaderH  hAsyncReader,
    5098             :                                                         void             *pyObject)
    5099             : {
    5100           2 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper* )CPLMalloc(sizeof(GDALAsyncReaderWrapper));
    5101           1 :     psWrapper->hAsyncReader = hAsyncReader;
    5102           1 :     psWrapper->pyObject = pyObject;
    5103           1 :     Py_INCREF((PyObject*) psWrapper->pyObject);
    5104           1 :     return psWrapper;
    5105             : }
    5106             : 
    5107           1 : static void DisableAsyncReaderWrapper(GDALAsyncReaderWrapperH hWrapper)
    5108             : {
    5109           1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    5110           1 :     if (psWrapper->pyObject)
    5111             :     {
    5112           1 :         Py_XDECREF((PyObject*) psWrapper->pyObject);
    5113             :     }
    5114           1 :     psWrapper->pyObject = NULL;
    5115           1 :     psWrapper->hAsyncReader = NULL;
    5116           1 : }
    5117             : 
    5118           1 : SWIGINTERN void delete_GDALAsyncReaderShadow(GDALAsyncReaderShadow *self){
    5119           1 :         DeleteAsyncReaderWrapper(self);
    5120           1 :     }
    5121           1 : SWIGINTERN GDALAsyncStatusType GDALAsyncReaderShadow_GetNextUpdatedRegion(GDALAsyncReaderShadow *self,double timeout,int *xoff,int *yoff,int *buf_xsize,int *buf_ysize){
    5122           1 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    5123           1 :         if (hReader == NULL)
    5124             :         {
    5125           0 :             *xoff = 0;
    5126           0 :             *yoff = 0;
    5127           0 :             *buf_xsize = 0;
    5128           0 :             *buf_ysize = 0;
    5129           0 :             return GARIO_ERROR;
    5130             :         }
    5131           1 :         return GDALARGetNextUpdatedRegion(hReader, timeout, xoff, yoff, buf_xsize, buf_ysize );
    5132             :     }
    5133           1 : SWIGINTERN void GDALAsyncReaderShadow_GetBuffer(GDALAsyncReaderShadow *self,void **ppRetPyObject){
    5134           1 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    5135           1 :         if (hReader == NULL)
    5136             :         {
    5137           0 :             *ppRetPyObject = NULL;
    5138           0 :             return;
    5139             :         }
    5140           1 :         *ppRetPyObject = AsyncReaderWrapperGetPyObject(self);
    5141           1 :         Py_INCREF((PyObject*)*ppRetPyObject);
    5142             :     }
    5143           0 : SWIGINTERN int GDALAsyncReaderShadow_LockBuffer(GDALAsyncReaderShadow *self,double timeout){
    5144           0 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    5145           0 :         if (hReader == NULL)
    5146             :         {
    5147             :             return 0;
    5148             :         }
    5149           0 :         return GDALARLockBuffer(hReader,timeout);
    5150             :     }
    5151           0 : SWIGINTERN void GDALAsyncReaderShadow_UnlockBuffer(GDALAsyncReaderShadow *self){
    5152           0 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    5153           0 :         if (hReader == NULL)
    5154             :         {
    5155             :             return;
    5156             :         }
    5157           0 :         GDALARUnlockBuffer(hReader);
    5158             :     }
    5159       55723 : SWIGINTERN void delete_GDALDatasetShadow(GDALDatasetShadow *self){
    5160       55723 :     if ( GDALDereferenceDataset( self ) <= 0 ) {
    5161       48926 :       if( GDALClose(self) != CE_None )
    5162             :       {
    5163           5 :           if( CPLGetLastErrorType() == CE_None )
    5164           1 :               CPLError(CE_Failure, CPLE_AppDefined, "Error occurred in GDALClose()");
    5165             :       }
    5166             :     }
    5167       55723 :   }
    5168           4 : SWIGINTERN void GDALDatasetShadow_MarkSuppressOnClose(GDALDatasetShadow *self){
    5169           4 :     GDALDatasetMarkSuppressOnClose(self);
    5170           4 :   }
    5171        3763 : SWIGINTERN CPLErr GDALDatasetShadow_Close(GDALDatasetShadow *self){
    5172        3763 :      return GDALClose(self);
    5173             :   }
    5174          30 : SWIGINTERN CPLErr GDALDatasetShadow__RunCloseWithoutDestroying(GDALDatasetShadow *self){
    5175          30 :      CPLErr eErr = GDALDatasetRunCloseWithoutDestroying(self);
    5176          30 :      if (eErr != CE_None && CPLGetLastErrorType() == CE_None ) {
    5177           0 :        CPLError(CE_Failure, CPLE_AppDefined, "Error occurred in GDALDatasetRunCloseWithoutDestroying()");
    5178             :      }
    5179          30 :      return eErr;
    5180             :   }
    5181        1327 : SWIGINTERN GDALDriverShadow *GDALDatasetShadow_GetDriver(GDALDatasetShadow *self){
    5182        1327 :     return (GDALDriverShadow*) GDALGetDatasetDriver( self );
    5183             :   }
    5184      360028 : SWIGINTERN GDALRasterBandShadow *GDALDatasetShadow_GetRasterBand(GDALDatasetShadow *self,int nBand){
    5185      360028 :     return (GDALRasterBandShadow*) GDALGetRasterBand( self, nBand );
    5186             :   }
    5187           5 : SWIGINTERN bool GDALDatasetShadow_IsThreadSafe(GDALDatasetShadow *self,int nScopeFlags){
    5188           5 :       return GDALDatasetIsThreadSafe(self, nScopeFlags, nullptr);
    5189             :   }
    5190           8 : SWIGINTERN GDALDatasetShadow *GDALDatasetShadow_GetThreadSafeDataset(GDALDatasetShadow *self,int nScopeFlags){
    5191           8 :       return GDALGetThreadSafeDataset(self, nScopeFlags, nullptr);
    5192             :   }
    5193        1180 : SWIGINTERN GDALGroupHS *GDALDatasetShadow_GetRootGroup(GDALDatasetShadow *self){
    5194        1180 :     return GDALDatasetGetRootGroup(self);
    5195             :   }
    5196         454 : SWIGINTERN char const *GDALDatasetShadow_GetProjection(GDALDatasetShadow *self){
    5197         454 :     return GDALGetProjectionRef( self );
    5198             :   }
    5199         858 : SWIGINTERN char const *GDALDatasetShadow_GetProjectionRef(GDALDatasetShadow *self){
    5200         858 :     return GDALGetProjectionRef( self );
    5201             :   }
    5202        3788 : SWIGINTERN int GDALDatasetShadow_GetRefCount(GDALDatasetShadow *self){
    5203        3788 :     return OGR_DS_GetRefCount(self);
    5204             :   }
    5205           0 : SWIGINTERN int GDALDatasetShadow_GetSummaryRefCount(GDALDatasetShadow *self){
    5206           0 :     return OGR_DS_GetSummaryRefCount(self);
    5207             :   }
    5208        1229 : SWIGINTERN OSRSpatialReferenceShadow *GDALDatasetShadow_GetSpatialRef(GDALDatasetShadow *self){
    5209        1229 :     OGRSpatialReferenceH ref = GDALGetSpatialRef(self);
    5210        1229 :     if( ref )
    5211         809 :        ref = OSRClone( ref );
    5212        1229 :     return (OSRSpatialReferenceShadow*) ref;
    5213             :   }
    5214        1630 : SWIGINTERN CPLErr GDALDatasetShadow_SetProjection(GDALDatasetShadow *self,char const *prj){
    5215        1630 :     return GDALSetProjection( self, prj );
    5216             :   }
    5217         300 : SWIGINTERN CPLErr GDALDatasetShadow_SetSpatialRef(GDALDatasetShadow *self,OSRSpatialReferenceShadow *srs){
    5218         300 :      return GDALSetSpatialRef( self, (OGRSpatialReferenceH)srs );
    5219             :   }
    5220        3955 : SWIGINTERN void GDALDatasetShadow_GetGeoTransform(GDALDatasetShadow *self,double argout[6],int *isvalid,int *can_return_null=0){
    5221        3955 :     if (can_return_null && *can_return_null)
    5222             :     {
    5223         403 :         *isvalid = (GDALGetGeoTransform( self, argout ) == CE_None );
    5224             :     }
    5225             :     else
    5226             :     {
    5227        3552 :         *isvalid = TRUE;
    5228        3552 :         if ( GDALGetGeoTransform( self, argout ) != CE_None ) {
    5229          80 :             argout[0] = 0.0;
    5230          80 :             argout[1] = 1.0;
    5231          80 :             argout[2] = 0.0;
    5232          80 :             argout[3] = 0.0;
    5233          80 :             argout[4] = 0.0;
    5234          80 :             argout[5] = 1.0;
    5235             :         }
    5236             :     }
    5237        3955 :   }
    5238        2907 : SWIGINTERN CPLErr GDALDatasetShadow_SetGeoTransform(GDALDatasetShadow *self,double argin[6]){
    5239        2907 :     return GDALSetGeoTransform( self, argin );
    5240             :   }
    5241          10 : SWIGINTERN void GDALDatasetShadow_GetExtent(GDALDatasetShadow *self,double argout[4],int *isvalid,OSRSpatialReferenceShadow *srs=NULL){
    5242          20 :     CPLErr eErr = GDALGetExtent(self, (OGREnvelope*)argout, srs);
    5243          10 :     *isvalid = (eErr == CE_None);
    5244          10 :     return;
    5245             :   }
    5246           4 : SWIGINTERN void GDALDatasetShadow_GetExtentWGS84LongLat(GDALDatasetShadow *self,double argout[4],int *isvalid){
    5247           8 :     CPLErr eErr = GDALGetExtentWGS84LongLat(self, (OGREnvelope*)argout);
    5248           4 :     *isvalid = (eErr == CE_None);
    5249           4 :     return;
    5250             :   }
    5251             : 
    5252             : static int*
    5253      353884 : CreateCIntListFromSequence( PyObject* pySeq, int* pnSize ) {
    5254             :   /* check if is List */
    5255      353884 :   if ( !PySequence_Check(pySeq) ) {
    5256           1 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    5257           1 :     *pnSize = -1;
    5258           1 :     return NULL;
    5259             :   }
    5260      353883 :   Py_ssize_t size = PySequence_Size(pySeq);
    5261      353883 :   if( size > (Py_ssize_t)INT_MAX ) {
    5262           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    5263           0 :     *pnSize = -1;
    5264           0 :     return NULL;
    5265             :   }
    5266      353883 :   if( (size_t)size > SIZE_MAX / sizeof(int) ) {
    5267           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    5268           0 :     *pnSize = -1;
    5269           0 :     return NULL;
    5270             :   }
    5271      353883 :   *pnSize = (int)size;
    5272      353883 :   int* ret = (int*) malloc((*pnSize)*sizeof(int));
    5273      353883 :   if( !ret ) {
    5274           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    5275           0 :     *pnSize = -1;
    5276           0 :     return NULL;
    5277             :   }
    5278      797905 :   for( int i = 0; i<*pnSize; i++ ) {
    5279      444023 :     PyObject *o = PySequence_GetItem(pySeq,i);
    5280      444023 :     if ( !PyArg_Parse(o,"i",&ret[i]) ) {
    5281           1 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    5282           1 :         Py_DECREF(o);
    5283           1 :         free(ret);
    5284           1 :         *pnSize = -1;
    5285           1 :         return NULL;
    5286             :     }
    5287      444022 :     Py_DECREF(o);
    5288             :   }
    5289             :   return ret;
    5290             : }
    5291             : 
    5292         682 : 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){
    5293             : 
    5294         682 :     return GDALBuildOverviewsEx(  self,
    5295             :                                 resampling ? resampling : "NEAREST",
    5296             :                                 overviewlist,
    5297             :                                 pOverviews,
    5298             :                                 0,
    5299             :                                 0,
    5300             :                                 callback,
    5301             :                                 callback_data,
    5302         682 :                                 options);
    5303             :   }
    5304         117 : SWIGINTERN int GDALDatasetShadow_GetGCPCount(GDALDatasetShadow *self){
    5305         117 :     return GDALGetGCPCount( self );
    5306             :   }
    5307         454 : SWIGINTERN char const *GDALDatasetShadow_GetGCPProjection(GDALDatasetShadow *self){
    5308         454 :     return GDALGetGCPProjection( self );
    5309             :   }
    5310         426 : SWIGINTERN OSRSpatialReferenceShadow *GDALDatasetShadow_GetGCPSpatialRef(GDALDatasetShadow *self){
    5311         426 :     OGRSpatialReferenceH ref = GDALGetGCPSpatialRef(self);
    5312         426 :     if( ref )
    5313         217 :        ref = OSRClone( ref );
    5314         426 :     return (OSRSpatialReferenceShadow*) ref;
    5315             :   }
    5316         528 : SWIGINTERN void GDALDatasetShadow_GetGCPs(GDALDatasetShadow *self,int *nGCPs,GDAL_GCP const **pGCPs){
    5317        1056 :     *nGCPs = GDALGetGCPCount( self );
    5318         528 :     *pGCPs = GDALGetGCPs( self );
    5319             :   }
    5320          28 : SWIGINTERN CPLErr GDALDatasetShadow_SetGCPs(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,char const *pszGCPProjection){
    5321          28 :     return GDALSetGCPs( self, nGCPs, pGCPs, pszGCPProjection );
    5322             :   }
    5323           9 : SWIGINTERN CPLErr GDALDatasetShadow_SetGCPs2(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,OSRSpatialReferenceShadow *hSRS){
    5324           9 :     return GDALSetGCPs2( self, nGCPs, pGCPs, (OGRSpatialReferenceH)hSRS );
    5325             :   }
    5326        1623 : SWIGINTERN CPLErr GDALDatasetShadow_FlushCache(GDALDatasetShadow *self){
    5327        1623 :     return GDALFlushCache( self );
    5328             :   }
    5329          30 : SWIGINTERN CPLErr GDALDatasetShadow_AddBand(GDALDatasetShadow *self,GDALDataType datatype=GDT_Byte,char **options=0){
    5330          30 :     return GDALAddBand( self, datatype, options );
    5331             :   }
    5332          57 : SWIGINTERN CPLErr GDALDatasetShadow_CreateMaskBand(GDALDatasetShadow *self,int nFlags){
    5333          57 :       return GDALCreateDatasetMaskBand( self, nFlags );
    5334             :   }
    5335         460 : SWIGINTERN char **GDALDatasetShadow_GetFileList(GDALDatasetShadow *self){
    5336         460 :     return GDALGetFileList( self );
    5337             :   }
    5338      176460 : 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){
    5339      176460 :     CPLErr eErr;
    5340      176460 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    5341      176460 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    5342      176460 :     GDALDataType ntype;
    5343      176460 :     if ( buf_type != 0 ) {
    5344      176460 :       ntype = (GDALDataType) *buf_type;
    5345             :     } else {
    5346           0 :       int lastband = GDALGetRasterCount( self );
    5347           0 :       if (lastband <= 0)
    5348             :         return CE_Failure;
    5349           0 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    5350             :     }
    5351             : 
    5352      176460 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    5353      176460 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    5354      176460 :     GIntBig band_space = (buf_band_space == 0) ? 0 : *buf_band_space;
    5355             : 
    5356      176460 :     GIntBig min_buffer_size =
    5357      176460 :       ComputeDatasetRasterIOSize (nxsize, nysize, GDALGetDataTypeSizeBytes( ntype ),
    5358           0 :                                   band_list ? band_list : GDALGetRasterCount(self), pband_list, band_list,
    5359             :                                   pixel_space, line_space, band_space, FALSE);
    5360      176460 :     if (min_buffer_size == 0)
    5361             :         return CE_Failure;
    5362             : 
    5363      176459 :     if ( buf_len < min_buffer_size )
    5364             :     {
    5365           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    5366           1 :         return CE_Failure;
    5367             :     }
    5368             : 
    5369      176458 :     GDALRasterIOExtraArg* psExtraArg = NULL;
    5370             : 
    5371      176458 :     eErr = GDALDatasetRasterIOEx( self, GF_Write, xoff, yoff, xsize, ysize,
    5372             :                                   (void*) buf_string, nxsize, nysize, ntype,
    5373             :                                   band_list, pband_list, pixel_space, line_space, band_space, psExtraArg );
    5374             : 
    5375      176458 :     return eErr;
    5376             :   }
    5377           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){
    5378           1 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    5379           1 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    5380           1 :     GDALDataType ntype;
    5381           1 :     if ( buf_type != 0 ) {
    5382           0 :       ntype = (GDALDataType) *buf_type;
    5383             :     } else {
    5384           1 :       int lastband = GDALGetRasterCount( self );
    5385           1 :       if (lastband <= 0)
    5386             :         return CE_Failure;
    5387           1 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    5388             :     }
    5389           1 :     return GDALDatasetAdviseRead(self, xoff, yoff, xsize, ysize,
    5390             :                                  nxsize, nysize, ntype,
    5391           1 :                                  band_list, pband_list, options);
    5392             : }
    5393           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){
    5394             : 
    5395           2 :     if ((options != NULL) && (buf_xsize ==0) && (buf_ysize == 0))
    5396             :     {
    5397             :         // calculate an appropriate buffer size
    5398           0 :         const char* pszLevel = CSLFetchNameValue(options, "LEVEL");
    5399           0 :         if (pszLevel)
    5400             :         {
    5401             :             // round up
    5402           0 :             int nLevel = atoi(pszLevel);
    5403           0 :             if( nLevel < 0 || nLevel > 30 )
    5404             :             {
    5405           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Invalid LEVEL: %d", nLevel);
    5406             :             }
    5407             :             else
    5408             :             {
    5409           0 :                 int nRes = 1 << nLevel;
    5410           0 :                 buf_xsize = static_cast<int>(ceil(xSize / (1.0 * nRes)));
    5411           0 :                 buf_ysize = static_cast<int>(ceil(ySize / (1.0 * nRes)));
    5412             :             }
    5413             :         }
    5414             :     }
    5415             : 
    5416           2 :     int nxsize = (buf_xsize == 0) ? xSize : buf_xsize;
    5417           2 :     int nysize = (buf_ysize == 0) ? ySize : buf_ysize;
    5418             : 
    5419           2 :     GDALDataType ntype;
    5420           2 :     if (bufType != 0) {
    5421             :         ntype = (GDALDataType) bufType;
    5422             :     }
    5423             :     else {
    5424             :         ntype = GDT_Byte;
    5425             :     }
    5426             : 
    5427           2 :     int nBCount = (band_list) != 0 ? band_list : GDALGetRasterCount(self);
    5428           2 :     uint64_t nMinSize = (uint64_t)nxsize * nysize * nBCount * GDALGetDataTypeSizeBytes(ntype);
    5429           2 :     if (buf_string == NULL || buf_len < nMinSize)
    5430             :     {
    5431           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer is too small");
    5432           0 :         return NULL;
    5433             :     }
    5434             : 
    5435           2 :     bool myBandList = false;
    5436           2 :     int* pBandList;
    5437             : 
    5438           2 :     if (band_list != 0){
    5439             :         myBandList = false;
    5440             :         pBandList = pband_list;
    5441             :     }
    5442             :     else
    5443             :     {
    5444           0 :         myBandList = true;
    5445           0 :         pBandList = (int*)CPLMalloc(sizeof(int) * nBCount);
    5446           0 :         for (int i = 0; i < nBCount; ++i) {
    5447           0 :             pBandList[i] = i + 1;
    5448             :         }
    5449             :     }
    5450             : 
    5451           2 :     GDALAsyncReaderH hAsyncReader =
    5452           2 :             GDALBeginAsyncReader(self, xOff, yOff, xSize, ySize, (void*) buf_string, nxsize, nysize, ntype, nBCount, pBandList, nPixelSpace, nLineSpace,
    5453             :     nBandSpace, options);
    5454             : 
    5455           2 :     if ( myBandList ) {
    5456           0 :        CPLFree( pBandList );
    5457             :     }
    5458             : 
    5459           2 :     if (hAsyncReader)
    5460             :     {
    5461           1 :         return (GDALAsyncReaderShadow*) CreateAsyncReaderWrapper(hAsyncReader, pyObject);
    5462             :     }
    5463             :     else
    5464             :     {
    5465             :         return NULL;
    5466             :     }
    5467             : 
    5468             :   }
    5469           1 : SWIGINTERN void GDALDatasetShadow_EndAsyncReader(GDALDatasetShadow *self,GDALAsyncReaderShadow *ario){
    5470           1 :     if( ario == NULL ) return;
    5471           1 :     GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(ario);
    5472           1 :     if (hReader == NULL)
    5473             :     {
    5474             :         return;
    5475             :     }
    5476           1 :     GDALEndAsyncReader(self, hReader);
    5477           1 :     DisableAsyncReaderWrapper(ario);
    5478             :   }
    5479           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){
    5480           3 :         int nPixelSpace;
    5481           3 :         int nBandSpace;
    5482           3 :         if( bIsBandSequential != 0 && bIsBandSequential != 1 )
    5483             :             return NULL;
    5484           3 :         if( band_list == 0 )
    5485             :             return NULL;
    5486           3 :         if( bIsBandSequential || band_list == 1 )
    5487             :         {
    5488             :             nPixelSpace = 0;
    5489             :             nBandSpace = 0;
    5490             :         }
    5491             :         else
    5492             :         {
    5493           1 :             nBandSpace = GDALGetDataTypeSizeBytes(eBufType);
    5494           1 :             nPixelSpace = nBandSpace * band_list;
    5495             :         }
    5496           3 :         CPLVirtualMem* vmem = GDALDatasetGetVirtualMem( self,
    5497             :                                          eRWFlag,
    5498             :                                          nXOff, nYOff,
    5499             :                                          nXSize, nYSize,
    5500             :                                          nBufXSize, nBufYSize,
    5501             :                                          eBufType,
    5502             :                                          band_list, pband_list,
    5503             :                                          nPixelSpace,
    5504             :                                          0,
    5505             :                                          nBandSpace,
    5506             :                                          nCacheSize,
    5507             :                                          nPageSizeHint,
    5508             :                                          FALSE,
    5509             :                                          options );
    5510           3 :         if( vmem == NULL )
    5511             :             return NULL;
    5512           3 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    5513           3 :         vmemshadow->vmem = vmem;
    5514           3 :         vmemshadow->eBufType = eBufType;
    5515           3 :         vmemshadow->bIsBandSequential = bIsBandSequential;
    5516           3 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    5517           3 :         vmemshadow->nBufXSize = nBufXSize;
    5518           3 :         vmemshadow->nBufYSize = nBufYSize;
    5519           3 :         vmemshadow->nBandCount = band_list;
    5520           3 :         return vmemshadow;
    5521             :     }
    5522           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){
    5523           3 :         if( band_list == 0 )
    5524             :             return NULL;
    5525           3 :         CPLVirtualMem* vmem = GDALDatasetGetTiledVirtualMem( self,
    5526             :                                          eRWFlag,
    5527             :                                          nXOff, nYOff,
    5528             :                                          nXSize, nYSize,
    5529             :                                          nTileXSize, nTileYSize,
    5530             :                                          eBufType,
    5531             :                                          band_list, pband_list,
    5532             :                                          eTileOrganization,
    5533             :                                          nCacheSize,
    5534             :                                          FALSE,
    5535             :                                          options );
    5536           3 :         if( vmem == NULL )
    5537             :             return NULL;
    5538           3 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    5539           3 :         vmemshadow->vmem = vmem;
    5540           3 :         vmemshadow->eBufType = eBufType;
    5541           3 :         vmemshadow->bIsBandSequential = -1;
    5542           3 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    5543           3 :         vmemshadow->nBufXSize = nXSize;
    5544           3 :         vmemshadow->nBufYSize = nYSize;
    5545           3 :         vmemshadow->eTileOrganization = eTileOrganization;
    5546           3 :         vmemshadow->nTileXSize = nTileXSize;
    5547           3 :         vmemshadow->nTileYSize = nTileYSize;
    5548           3 :         vmemshadow->nBandCount = band_list;
    5549           3 :         return vmemshadow;
    5550             :     }
    5551        6032 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CreateLayer(GDALDatasetShadow *self,char const *name,OSRSpatialReferenceShadow *srs=NULL,OGRwkbGeometryType geom_type=wkbUnknown,char **options=0){
    5552       12064 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCreateLayer( self,
    5553             :                                   name,
    5554             :                                   srs,
    5555             :                                   geom_type,
    5556             :                                   options);
    5557        6032 :     return layer;
    5558             :   }
    5559          14 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CreateLayerFromGeomFieldDefn(GDALDatasetShadow *self,char const *name,OGRGeomFieldDefnShadow *geom_field,char **options=0){
    5560          28 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCreateLayerFromGeomFieldDefn( self,
    5561             :                                   name,
    5562             :                                   geom_field,
    5563             :                                   options);
    5564          14 :     return layer;
    5565             :   }
    5566          18 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CopyLayer(GDALDatasetShadow *self,OGRLayerShadow *src_layer,char const *new_name,char **options=0){
    5567          36 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCopyLayer( self,
    5568             :                                                       src_layer,
    5569             :                                                       new_name,
    5570             :                                                       options);
    5571          18 :     return layer;
    5572             :   }
    5573          41 : SWIGINTERN OGRErr GDALDatasetShadow_DeleteLayer(GDALDatasetShadow *self,int index){
    5574          41 :     return GDALDatasetDeleteLayer(self, index);
    5575             :   }
    5576             : 
    5577             : 
    5578             : #include "ogr_core.h"
    5579             : static char const *
    5580           0 : OGRErrMessages( int rc ) {
    5581           0 :   switch( rc ) {
    5582             :   case OGRERR_NONE:
    5583             :     return "OGR Error: None";
    5584           0 :   case OGRERR_NOT_ENOUGH_DATA:
    5585           0 :     return "OGR Error: Not enough data to deserialize";
    5586           0 :   case OGRERR_NOT_ENOUGH_MEMORY:
    5587           0 :     return "OGR Error: Not enough memory";
    5588           0 :   case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
    5589           0 :     return "OGR Error: Unsupported geometry type";
    5590           0 :   case OGRERR_UNSUPPORTED_OPERATION:
    5591           0 :     return "OGR Error: Unsupported operation";
    5592           0 :   case OGRERR_CORRUPT_DATA:
    5593           0 :     return "OGR Error: Corrupt data";
    5594           0 :   case OGRERR_FAILURE:
    5595           0 :     return "OGR Error: General Error";
    5596           0 :   case OGRERR_UNSUPPORTED_SRS:
    5597           0 :     return "OGR Error: Unsupported SRS";
    5598           0 :   case OGRERR_INVALID_HANDLE:
    5599           0 :     return "OGR Error: Invalid handle";
    5600           0 :   case OGRERR_NON_EXISTING_FEATURE:
    5601           0 :     return "OGR Error: Non existing feature";
    5602           0 :   default:
    5603           0 :     return "OGR Error: Unknown";
    5604             :   }
    5605             : }
    5606             : 
    5607          91 : SWIGINTERN bool GDALDatasetShadow_IsLayerPrivate(GDALDatasetShadow *self,int index){
    5608         182 :     return GDALDatasetIsLayerPrivate(self, index);
    5609             :   }
    5610             : 
    5611             : SWIGINTERN int
    5612        5886 : SWIG_AsVal_bool (PyObject *obj, bool *val)
    5613             : {
    5614        5886 :   int r;
    5615        5886 :   if (!PyBool_Check(obj))
    5616             :     return SWIG_ERROR;
    5617        5885 :   r = PyObject_IsTrue(obj);
    5618        5885 :   if (r == -1)
    5619             :     return SWIG_ERROR;
    5620        5885 :   if (val) *val = r ? true : false;
    5621             :   return SWIG_OK;
    5622             : }
    5623             : 
    5624        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){
    5625        1917 :     OGRLayerH hLayer = NULL;
    5626        3834 :     OGRFeatureShadow* feat = (OGRFeatureShadow*)GDALDatasetGetNextFeature( self, &hLayer, pdfProgressPct,
    5627             :                                       callback, callback_data );
    5628        1917 :     *ppoBelongingLayer = (OGRLayerShadow*)hLayer;
    5629        1917 :     return feat;
    5630             :   }
    5631         122 : SWIGINTERN bool GDALDatasetShadow_TestCapability(GDALDatasetShadow *self,char const *cap){
    5632         244 :     return (GDALDatasetTestCapability(self, cap) > 0);
    5633             :   }
    5634        9864 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_ExecuteSQL(GDALDatasetShadow *self,char const *statement,OGRGeometryShadow *spatialFilter=NULL,char const *dialect=""){
    5635       19728 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetExecuteSQL(self,
    5636             :                                                       statement,
    5637             :                                                       spatialFilter,
    5638             :                                                       dialect);
    5639        9864 :     return layer;
    5640             :   }
    5641        2818 : SWIGINTERN void GDALDatasetShadow_ReleaseResultSet(GDALDatasetShadow *self,OGRLayerShadow *layer){
    5642        2818 :     GDALDatasetReleaseResultSet(self, layer);
    5643        2818 :   }
    5644           6 : SWIGINTERN OGRStyleTableShadow *GDALDatasetShadow_GetStyleTable(GDALDatasetShadow *self){
    5645           6 :     return (OGRStyleTableShadow*) GDALDatasetGetStyleTable(self);
    5646             :   }
    5647           7 : SWIGINTERN void GDALDatasetShadow_SetStyleTable(GDALDatasetShadow *self,OGRStyleTableShadow *table){
    5648           7 :     if( table != NULL )
    5649           5 :         GDALDatasetSetStyleTable(self, (OGRStyleTableH) table);
    5650             :   }
    5651        9269 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_GetLayerByIndex(GDALDatasetShadow *self,int index=0){
    5652             : 
    5653             : 
    5654             : 
    5655       18538 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetGetLayer(self, index);
    5656        9269 :     return layer;
    5657             :   }
    5658        2728 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_GetLayerByName(GDALDatasetShadow *self,char const *layer_name){
    5659        5456 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetGetLayerByName(self, layer_name);
    5660        2728 :     return layer;
    5661             :   }
    5662          14 : SWIGINTERN void GDALDatasetShadow_ResetReading(GDALDatasetShadow *self){
    5663          14 :     GDALDatasetResetReading(self);
    5664          14 :   }
    5665        1440 : SWIGINTERN int GDALDatasetShadow_GetLayerCount(GDALDatasetShadow *self){
    5666        1440 :     return GDALDatasetGetLayerCount(self);
    5667             :   }
    5668           6 : SWIGINTERN OGRErr GDALDatasetShadow_AbortSQL(GDALDatasetShadow *self){
    5669           6 :     return GDALDatasetAbortSQL(self);
    5670             : }
    5671         105 : SWIGINTERN OGRErr GDALDatasetShadow_StartTransaction(GDALDatasetShadow *self,int force=FALSE){
    5672         105 :     return GDALDatasetStartTransaction(self, force);
    5673             :   }
    5674          76 : SWIGINTERN OGRErr GDALDatasetShadow_CommitTransaction(GDALDatasetShadow *self){
    5675          76 :     return GDALDatasetCommitTransaction(self);
    5676             :   }
    5677          44 : SWIGINTERN OGRErr GDALDatasetShadow_RollbackTransaction(GDALDatasetShadow *self){
    5678          44 :     return GDALDatasetRollbackTransaction(self);
    5679             :   }
    5680           2 : SWIGINTERN void GDALDatasetShadow_ClearStatistics(GDALDatasetShadow *self){
    5681           2 :       GDALDatasetClearStatistics(self);
    5682           2 :   }
    5683          32 : SWIGINTERN char **GDALDatasetShadow_GetFieldDomainNames(GDALDatasetShadow *self,char **options=0){
    5684          32 :     return GDALDatasetGetFieldDomainNames(self, options);
    5685             :   }
    5686         114 : SWIGINTERN OGRFieldDomainShadow *GDALDatasetShadow_GetFieldDomain(GDALDatasetShadow *self,char const *name){
    5687         114 :     return (OGRFieldDomainShadow*) GDALDatasetGetFieldDomain(self, name);
    5688             :   }
    5689          37 : SWIGINTERN bool GDALDatasetShadow_AddFieldDomain(GDALDatasetShadow *self,OGRFieldDomainShadow *fieldDomain){
    5690          37 :       char* pszReason = NULL;
    5691          37 :       if( !GDALDatasetAddFieldDomain(self, (OGRFieldDomainH)fieldDomain, &pszReason) )
    5692             :       {
    5693           4 :           CPLError(CE_Failure, CPLE_AppDefined, "%s", pszReason);
    5694           4 :           CPLFree(pszReason);
    5695           4 :           return false;
    5696             :       }
    5697             :       return true;
    5698             :   }
    5699           8 : SWIGINTERN bool GDALDatasetShadow_DeleteFieldDomain(GDALDatasetShadow *self,char const *name){
    5700           8 :       return GDALDatasetDeleteFieldDomain(self, name, NULL);
    5701             :   }
    5702           4 : SWIGINTERN bool GDALDatasetShadow_UpdateFieldDomain(GDALDatasetShadow *self,OGRFieldDomainShadow *fieldDomain){
    5703           4 :       return GDALDatasetUpdateFieldDomain(self, (OGRFieldDomainH)fieldDomain, NULL);
    5704             :   }
    5705          46 : SWIGINTERN char **GDALDatasetShadow_GetRelationshipNames(GDALDatasetShadow *self,char **options=0){
    5706          46 :     return GDALDatasetGetRelationshipNames(self, options);
    5707             :   }
    5708          52 : SWIGINTERN GDALRelationshipShadow *GDALDatasetShadow_GetRelationship(GDALDatasetShadow *self,char const *name){
    5709          52 :     return (GDALRelationshipShadow*) GDALDatasetGetRelationship(self, name);
    5710             :   }
    5711          42 : SWIGINTERN bool GDALDatasetShadow_AddRelationship(GDALDatasetShadow *self,GDALRelationshipShadow *relationship){
    5712          42 :       return GDALDatasetAddRelationship(self, (GDALRelationshipH)relationship, NULL);
    5713             :   }
    5714           6 : SWIGINTERN bool GDALDatasetShadow_DeleteRelationship(GDALDatasetShadow *self,char const *name){
    5715           6 :       return GDALDatasetDeleteRelationship(self, name, NULL);
    5716             :   }
    5717           9 : SWIGINTERN bool GDALDatasetShadow_UpdateRelationship(GDALDatasetShadow *self,GDALRelationshipShadow *relationship){
    5718           9 :       return GDALDatasetUpdateRelationship(self, (GDALRelationshipH)relationship, NULL);
    5719             :   }
    5720      176573 : 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){
    5721      176573 :     *buf = NULL;
    5722             : 
    5723      176573 :     int nxsize = (buf_xsize==0) ? static_cast<int>(xsize) : *buf_xsize;
    5724      176573 :     int nysize = (buf_ysize==0) ? static_cast<int>(ysize) : *buf_ysize;
    5725      176573 :     GDALDataType ntype;
    5726      176573 :     if ( buf_type != 0 ) {
    5727      176573 :       ntype = *buf_type;
    5728             :     } else {
    5729           0 :       int lastband = GDALGetRasterCount( self ) - 1;
    5730           0 :       if (lastband < 0)
    5731             :       {
    5732             :           return CE_Failure;
    5733             :       }
    5734           0 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    5735             :     }
    5736             : 
    5737      176573 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    5738      176573 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    5739      176573 :     GIntBig band_space = (buf_band_space == 0) ? 0 : *buf_band_space;
    5740             : 
    5741      176573 :     int ntypesize = GDALGetDataTypeSizeBytes( ntype );
    5742      176573 :     size_t buf_size = static_cast<size_t>(
    5743      176573 :         ComputeDatasetRasterIOSize (nxsize, nysize, ntypesize,
    5744             :                                     band_list ? band_list :
    5745           0 :                                         GDALGetRasterCount(self),
    5746             :                                     pband_list, band_list,
    5747             :                                     pixel_space, line_space, band_space,
    5748      176573 :                                     FALSE));
    5749      176573 :     if (buf_size == 0)
    5750             :     {
    5751             :         return CE_Failure;
    5752             :     }
    5753             : 
    5754      176571 :     char *data;
    5755      176571 :     Py_buffer view;
    5756             : 
    5757      345997 :     if( !readraster_acquirebuffer(buf, inputOutputBuf, buf_size, ntype,
    5758             :                                   GetUseExceptions(), data, view) )
    5759             :     {
    5760             :         return CE_Failure;
    5761             :     }
    5762             : 
    5763      176558 :     if( inputOutputBuf == NULL )
    5764             :     {
    5765             :         /* Should we clear the buffer in case there are hole in it ? */
    5766      176546 :         if( line_space != 0 && pixel_space != 0 && line_space > pixel_space * nxsize )
    5767             :         {
    5768           4 :             memset(data, 0, buf_size);
    5769             :         }
    5770      176542 :         else if( band_list > 1 && band_space != 0 )
    5771             :         {
    5772        1069 :             if( line_space != 0 && band_space > line_space * nysize )
    5773           0 :                 memset(data, 0, buf_size);
    5774        1069 :             else if( pixel_space != 0 && band_space < pixel_space &&
    5775        1063 :                      pixel_space != (GIntBig)GDALGetRasterCount(self) * ntypesize )
    5776         160 :                 memset(data, 0, buf_size);
    5777             :         }
    5778             :     }
    5779             : 
    5780      176558 :     GDALRasterIOExtraArg sExtraArg;
    5781      176558 :     INIT_RASTERIO_EXTRA_ARG(sExtraArg);
    5782      176558 :     sExtraArg.eResampleAlg = resample_alg;
    5783      176558 :     sExtraArg.pfnProgress = callback;
    5784      176558 :     sExtraArg.pProgressData = callback_data;
    5785             : 
    5786      176558 :     int nXOff = (int)(xoff + 0.5);
    5787      176558 :     int nYOff = (int)(yoff + 0.5);
    5788      176558 :     int nXSize = (int)(xsize + 0.5);
    5789      176558 :     int nYSize = (int)(ysize + 0.5);
    5790      176558 :     if( fabs(xoff-nXOff) > 1e-8 || fabs(yoff-nYOff) > 1e-8 ||
    5791      176549 :         fabs(xsize-nXSize) > 1e-8 || fabs(ysize-nYSize) > 1e-8 )
    5792             :     {
    5793          11 :         sExtraArg.bFloatingPointWindowValidity = TRUE;
    5794          11 :         sExtraArg.dfXOff = xoff;
    5795          11 :         sExtraArg.dfYOff = yoff;
    5796          11 :         sExtraArg.dfXSize = xsize;
    5797          11 :         sExtraArg.dfYSize = ysize;
    5798             :     }
    5799             : 
    5800      176558 :     CPLErr eErr = GDALDatasetRasterIOEx(self, GF_Read, nXOff, nYOff, nXSize, nYSize,
    5801             :                                data, nxsize, nysize, ntype,
    5802             :                                band_list, pband_list, pixel_space, line_space, band_space,
    5803             :                                &sExtraArg );
    5804             : 
    5805      176558 :     readraster_releasebuffer(eErr, buf, inputOutputBuf, view);
    5806             : 
    5807             :     return eErr;
    5808             : }
    5809             : 
    5810       19831 : int GDALDatasetShadow_RasterXSize_get( GDALDatasetShadow *h ) {
    5811       19831 :   return GDALGetRasterXSize( h );
    5812             : }
    5813       20095 : int GDALDatasetShadow_RasterYSize_get( GDALDatasetShadow *h ) {
    5814       20095 :   return GDALGetRasterYSize( h );
    5815             : }
    5816      355232 : int GDALDatasetShadow_RasterCount_get( GDALDatasetShadow *h ) {
    5817      355232 :   return GDALGetRasterCount( h );
    5818             : }
    5819             : 
    5820          12 : SWIGINTERN GDALRasterAttributeTableShadow *new_GDALRasterAttributeTableShadow(){
    5821          12 :         return (GDALRasterAttributeTableShadow*)
    5822          12 :     GDALCreateRasterAttributeTable();
    5823             :     }
    5824          19 : SWIGINTERN void delete_GDALRasterAttributeTableShadow(GDALRasterAttributeTableShadow *self){
    5825          19 :         GDALDestroyRasterAttributeTable(self);
    5826          19 :     }
    5827           5 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterAttributeTableShadow_Clone(GDALRasterAttributeTableShadow *self){
    5828           5 :         return (GDALRasterAttributeTableShadow*) GDALRATClone(self);
    5829             :     }
    5830          48 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColumnCount(GDALRasterAttributeTableShadow *self){
    5831          48 :         return GDALRATGetColumnCount( self );
    5832             :     }
    5833         118 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetNameOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5834         118 :         return GDALRATGetNameOfCol( self, iCol );
    5835             :     }
    5836          61 : SWIGINTERN GDALRATFieldUsage GDALRasterAttributeTableShadow_GetUsageOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5837          61 :         return GDALRATGetUsageOfCol( self, iCol );
    5838             :     }
    5839         254 : SWIGINTERN GDALRATFieldType GDALRasterAttributeTableShadow_GetTypeOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5840         254 :         return GDALRATGetTypeOfCol( self, iCol );
    5841             :     }
    5842          13 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColOfUsage(GDALRasterAttributeTableShadow *self,GDALRATFieldUsage eUsage){
    5843          13 :         return GDALRATGetColOfUsage( self, eUsage );
    5844             :     }
    5845         235 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowCount(GDALRasterAttributeTableShadow *self){
    5846         235 :         return GDALRATGetRowCount( self );
    5847             :     }
    5848          90 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5849          90 :         return GDALRATGetValueAsString( self, iRow, iCol );
    5850             :     }
    5851         166 : SWIGINTERN int GDALRasterAttributeTableShadow_GetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5852         166 :         return GDALRATGetValueAsInt( self, iRow, iCol );
    5853             :     }
    5854          92 : SWIGINTERN double GDALRasterAttributeTableShadow_GetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5855          92 :         return GDALRATGetValueAsDouble( self, iRow, iCol );
    5856             :     }
    5857           8 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsString(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,char **ppszData){
    5858           8 :         return GDALRATValuesIOAsString(self, GF_Read, iField, iStartRow, iLength, ppszData);
    5859             :     }
    5860          10 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsInteger(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,int *pnData){
    5861          10 :         return GDALRATValuesIOAsInteger(self, GF_Read, iField, iStartRow, iLength, pnData);
    5862             :     }
    5863           8 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsDouble(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,double *pdfData){
    5864           8 :         return GDALRATValuesIOAsDouble(self, GF_Read, iField, iStartRow, iLength, pdfData);
    5865             :     }
    5866          37 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol,char const *pszValue){
    5867          37 :         GDALRATSetValueAsString( self, iRow, iCol, pszValue );
    5868          37 :     }
    5869          49 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol,int nValue){
    5870          49 :         GDALRATSetValueAsInt( self, iRow, iCol, nValue );
    5871          49 :     }
    5872          35 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol,double dfValue){
    5873          35 :         GDALRATSetValueAsDouble( self, iRow, iCol, dfValue );
    5874          35 :     }
    5875           7 : SWIGINTERN void GDALRasterAttributeTableShadow_SetRowCount(GDALRasterAttributeTableShadow *self,int nCount){
    5876           7 :         GDALRATSetRowCount( self, nCount );
    5877           7 :     }
    5878          31 : SWIGINTERN int GDALRasterAttributeTableShadow_CreateColumn(GDALRasterAttributeTableShadow *self,char const *pszName,GDALRATFieldType eType,GDALRATFieldUsage eUsage){
    5879          62 :         return GDALRATCreateColumn( self, pszName, eType, eUsage );
    5880             :     }
    5881           1 : SWIGINTERN bool GDALRasterAttributeTableShadow_GetLinearBinning(GDALRasterAttributeTableShadow *self,double *pdfRow0Min,double *pdfBinSize){
    5882           2 :         return (GDALRATGetLinearBinning(self, pdfRow0Min, pdfBinSize) != 0) ? true : false;
    5883             :     }
    5884           1 : SWIGINTERN int GDALRasterAttributeTableShadow_SetLinearBinning(GDALRasterAttributeTableShadow *self,double dfRow0Min,double dfBinSize){
    5885           2 :         return GDALRATSetLinearBinning(self, dfRow0Min, dfBinSize);
    5886             :     }
    5887           3 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowOfValue(GDALRasterAttributeTableShadow *self,double dfValue){
    5888           3 :         return GDALRATGetRowOfValue( self, dfValue );
    5889             :     }
    5890           2 : SWIGINTERN int GDALRasterAttributeTableShadow_ChangesAreWrittenToFile(GDALRasterAttributeTableShadow *self){
    5891           2 :         return GDALRATChangesAreWrittenToFile( self );
    5892             :     }
    5893           0 : SWIGINTERN void GDALRasterAttributeTableShadow_DumpReadable(GDALRasterAttributeTableShadow *self){
    5894           0 :         GDALRATDumpReadable( self, NULL );
    5895           0 :     }
    5896           3 : SWIGINTERN void GDALRasterAttributeTableShadow_SetTableType(GDALRasterAttributeTableShadow *self,GDALRATTableType eTableType){
    5897           3 :         GDALRATSetTableType( self, eTableType );
    5898           3 :     }
    5899          10 : SWIGINTERN GDALRATTableType GDALRasterAttributeTableShadow_GetTableType(GDALRasterAttributeTableShadow *self){
    5900          10 :         return GDALRATGetTableType( self );
    5901             :     }
    5902           1 : SWIGINTERN void GDALRasterAttributeTableShadow_RemoveStatistics(GDALRasterAttributeTableShadow *self){
    5903           1 :         GDALRATRemoveStatistics(self);
    5904           1 :     }
    5905        1450 : SWIGINTERN void delete_GDALGroupHS(GDALGroupHS *self){
    5906        1450 :     GDALGroupRelease(self);
    5907        1450 :   }
    5908          95 : SWIGINTERN char const *GDALGroupHS_GetName(GDALGroupHS *self){
    5909          95 :     return GDALGroupGetName(self);
    5910             :   }
    5911          47 : SWIGINTERN char const *GDALGroupHS_GetFullName(GDALGroupHS *self){
    5912          47 :     return GDALGroupGetFullName(self);
    5913             :   }
    5914         329 : SWIGINTERN char **GDALGroupHS_GetMDArrayNames(GDALGroupHS *self,char **options=0){
    5915         329 :     return GDALGroupGetMDArrayNames( self, options );
    5916             :   }
    5917           1 : SWIGINTERN char **GDALGroupHS_GetMDArrayFullNamesRecursive(GDALGroupHS *self,char **groupOptions=0,char **arrayOptions=0){
    5918           1 :     return GDALGroupGetMDArrayFullNamesRecursive( self, groupOptions, arrayOptions );
    5919             :   }
    5920         807 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_OpenMDArray(GDALGroupHS *self,char const *name,char **options=0){
    5921             : 
    5922         807 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5923             : 
    5924         807 :     GDALMDArrayH hRet = GDALGroupOpenMDArray(self, name, options);
    5925             : 
    5926         929 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5927          17 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5928             : 
    5929         807 :     return hRet;
    5930             :   }
    5931          17 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_OpenMDArrayFromFullname(GDALGroupHS *self,char const *name,char **options=0){
    5932             : 
    5933          17 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5934             : 
    5935          17 :     GDALMDArrayH hRet = GDALGroupOpenMDArrayFromFullname(self, name, options);
    5936             : 
    5937          25 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5938           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5939             : 
    5940          17 :     return hRet;
    5941             :   }
    5942          19 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_ResolveMDArray(GDALGroupHS *self,char const *name,char const *starting_point,char **options=0){
    5943             : 
    5944          19 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5945             : 
    5946          19 :     GDALMDArrayH hRet = GDALGroupResolveMDArray(self, name, starting_point, options);
    5947             : 
    5948          19 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5949           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5950             : 
    5951          19 :     return hRet;
    5952             :   }
    5953          97 : SWIGINTERN char **GDALGroupHS_GetGroupNames(GDALGroupHS *self,char **options=0){
    5954          97 :     return GDALGroupGetGroupNames( self, options );
    5955             :   }
    5956         163 : SWIGINTERN GDALGroupHS *GDALGroupHS_OpenGroup(GDALGroupHS *self,char const *name,char **options=0){
    5957             : 
    5958         163 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5959             : 
    5960         163 :     GDALGroupH hRet = GDALGroupOpenGroup(self, name, options);
    5961             : 
    5962         171 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5963          12 :         CPLError(CE_Failure, CPLE_AppDefined, "Group %s does not exist", name);
    5964             : 
    5965         163 :     return hRet;
    5966             :   }
    5967           3 : SWIGINTERN GDALGroupHS *GDALGroupHS_OpenGroupFromFullname(GDALGroupHS *self,char const *name,char **options=0){
    5968             : 
    5969           3 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5970             : 
    5971           3 :     GDALGroupH hRet = GDALGroupOpenGroupFromFullname(self, name, options);
    5972             : 
    5973           3 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5974           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Group %s does not exist", name);
    5975             : 
    5976           3 :     return hRet;
    5977             :   }
    5978           8 : SWIGINTERN char **GDALGroupHS_GetVectorLayerNames(GDALGroupHS *self,char **options=0){
    5979           8 :     return GDALGroupGetVectorLayerNames( self, options );
    5980             :   }
    5981          12 : SWIGINTERN OGRLayerShadow *GDALGroupHS_OpenVectorLayer(GDALGroupHS *self,char const *name,char **options=0){
    5982             : 
    5983          12 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5984             : 
    5985          12 :     OGRLayerH hRet = GDALGroupOpenVectorLayer(self, name, options);
    5986             : 
    5987          12 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5988           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Vector layer %s does not exist", name);
    5989             : 
    5990          12 :     return (OGRLayerShadow*) hRet;
    5991             :   }
    5992          73 : SWIGINTERN void GDALGroupHS_GetDimensions(GDALGroupHS *self,GDALDimensionHS ***pdims,size_t *pnCount,char **options=0){
    5993         146 :     *pdims = GDALGroupGetDimensions(self, pnCount, options);
    5994             :   }
    5995          80 : SWIGINTERN GDALAttributeHS *GDALGroupHS_GetAttribute(GDALGroupHS *self,char const *name){
    5996             : 
    5997          80 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5998             : 
    5999          80 :     GDALAttributeH hRet = GDALGroupGetAttribute(self, name);
    6000             : 
    6001          85 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    6002           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Attribute %s does not exist", name);
    6003             : 
    6004          80 :     return hRet;
    6005             :   }
    6006          71 : SWIGINTERN void GDALGroupHS_GetAttributes(GDALGroupHS *self,GDALAttributeHS ***pattrs,size_t *pnCount,char **options=0){
    6007         142 :     *pattrs = GDALGroupGetAttributes(self, pnCount, options);
    6008             :   }
    6009           4 : SWIGINTERN char **GDALGroupHS_GetStructuralInfo(GDALGroupHS *self){
    6010           4 :     return GDALGroupGetStructuralInfo( self );
    6011             :   }
    6012         179 : SWIGINTERN GDALGroupHS *GDALGroupHS_CreateGroup(GDALGroupHS *self,char const *name,char **options=0){
    6013         179 :     return GDALGroupCreateGroup(self, name, options);
    6014             :   }
    6015          20 : SWIGINTERN CPLErr GDALGroupHS_DeleteGroup(GDALGroupHS *self,char const *name,char **options=0){
    6016          20 :     return GDALGroupDeleteGroup(self, name, options) ? CE_None : CE_Failure;
    6017             :   }
    6018         659 : SWIGINTERN GDALDimensionHS *GDALGroupHS_CreateDimension(GDALGroupHS *self,char const *name,char const *dim_type,char const *direction,GUIntBig size,char **options=0){
    6019         659 :     return GDALGroupCreateDimension(self, name, dim_type, direction, size, options);
    6020             :   }
    6021         608 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_CreateMDArray(GDALGroupHS *self,char const *name,int dimensions,GDALDimensionHS **dimensionsValues,GDALExtendedDataTypeHS *data_type,char **options=0){
    6022         608 :     return GDALGroupCreateMDArray(self, name, dimensions, dimensionsValues,
    6023             :                                   data_type, options);
    6024             :   }
    6025          20 : SWIGINTERN CPLErr GDALGroupHS_DeleteMDArray(GDALGroupHS *self,char const *name,char **options=0){
    6026          20 :     return GDALGroupDeleteMDArray(self, name, options) ? CE_None : CE_Failure;
    6027             :   }
    6028             : 
    6029             : static GUIntBig*
    6030        5226 : CreateCGUIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
    6031             :   /* check if is List */
    6032        5226 :   if ( !PySequence_Check(pySeq) ) {
    6033           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    6034           0 :     *pnSize = -1;
    6035           0 :     return NULL;
    6036             :   }
    6037        5226 :   Py_ssize_t size = PySequence_Size(pySeq);
    6038        5226 :   if( size > (Py_ssize_t)INT_MAX ) {
    6039           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6040           0 :     *pnSize = -1;
    6041           0 :     return NULL;
    6042             :   }
    6043        5226 :   if( (size_t)size > SIZE_MAX / sizeof(GUIntBig) ) {
    6044           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6045           0 :     *pnSize = -1;
    6046           0 :     return NULL;
    6047             :   }
    6048        5226 :   *pnSize = (int)size;
    6049        5226 :   GUIntBig* ret = (GUIntBig*) malloc((*pnSize)*sizeof(GUIntBig));
    6050        5226 :   if( !ret ) {
    6051           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    6052           0 :     *pnSize = -1;
    6053           0 :     return NULL;
    6054             :   }
    6055       14661 :   for( int i = 0; i<*pnSize; i++ ) {
    6056        9435 :     PyObject *o = PySequence_GetItem(pySeq,i);
    6057        9435 :     if ( !PyArg_Parse(o,"K",&ret[i]) ) {
    6058           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    6059           0 :         Py_DECREF(o);
    6060           0 :         free(ret);
    6061           0 :         *pnSize = -1;
    6062           0 :         return NULL;
    6063             :     }
    6064        9435 :     Py_DECREF(o);
    6065             :   }
    6066             :   return ret;
    6067             : }
    6068             : 
    6069         125 : SWIGINTERN GDALAttributeHS *GDALGroupHS_CreateAttribute(GDALGroupHS *self,char const *name,int dimensions,GUIntBig *sizes,GDALExtendedDataTypeHS *data_type,char **options=0){
    6070         125 :     return GDALGroupCreateAttribute(self, name, dimensions,
    6071             :                                     (const GUInt64*) sizes,
    6072             :                                     data_type, options);
    6073             :   }
    6074          25 : SWIGINTERN CPLErr GDALGroupHS_DeleteAttribute(GDALGroupHS *self,char const *name,char **options=0){
    6075          25 :     return GDALGroupDeleteAttribute(self, name, options) ? CE_None : CE_Failure;
    6076             :   }
    6077          45 : SWIGINTERN CPLErr GDALGroupHS_Rename(GDALGroupHS *self,char const *newName){
    6078          45 :     return GDALGroupRename( self, newName ) ? CE_None : CE_Failure;
    6079             :   }
    6080          14 : SWIGINTERN GDALGroupHS *GDALGroupHS_SubsetDimensionFromSelection(GDALGroupHS *self,char const *selection,char **options=0){
    6081          14 :     return GDALGroupSubsetDimensionFromSelection(self, selection, options);
    6082             :   }
    6083           2 : SWIGINTERN size_t GDALGroupHS_GetDataTypeCount(GDALGroupHS *self){
    6084           2 :     return GDALGroupGetDataTypeCount(self);
    6085             :   }
    6086             : 
    6087             : SWIGINTERNINLINE PyObject* 
    6088        3613 : SWIG_From_unsigned_SS_long  (unsigned long value)
    6089             : {
    6090        3613 :   return (value > LONG_MAX) ?
    6091        3613 :     PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
    6092             : }
    6093             : 
    6094             : 
    6095             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6096             : SWIGINTERNINLINE PyObject* 
    6097             : SWIG_From_unsigned_SS_long_SS_long  (unsigned long long value)
    6098             : {
    6099             :   return (value > LONG_MAX) ?
    6100             :     PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
    6101             : }
    6102             : #endif
    6103             : 
    6104             : 
    6105             : SWIGINTERNINLINE PyObject *
    6106        3613 : SWIG_From_size_t  (size_t value)
    6107             : {    
    6108             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6109        3613 :   if (sizeof(size_t) <= sizeof(unsigned long)) {
    6110             : #endif
    6111        3613 :     return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
    6112             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6113             :   } else {
    6114             :     /* assume sizeof(size_t) <= sizeof(unsigned long long) */
    6115             :     return SWIG_From_unsigned_SS_long_SS_long  (static_cast< unsigned long long >(value));
    6116             :   }
    6117             : #endif
    6118             : }
    6119             : 
    6120           2 : SWIGINTERN GDALExtendedDataTypeHS *GDALGroupHS_GetDataType(GDALGroupHS *self,size_t idx){
    6121           2 :     if (idx >= GDALGroupGetDataTypeCount(self))
    6122             :     {
    6123           1 :         CPLError(CE_Failure, CPLE_AppDefined, "GetDataType(): invalid index");
    6124           1 :         return NULL;
    6125             :     }
    6126           1 :     return GDALGroupGetDataType(self, idx);
    6127             :   }
    6128             : 
    6129             : typedef struct
    6130             : {
    6131             :   double min;
    6132             :   double max;
    6133             :   double mean;
    6134             :   double std_dev;
    6135             :   GIntBig valid_count;
    6136             : } Statistics;
    6137             : 
    6138           0 : SWIGINTERN void delete_Statistics(Statistics *self){
    6139           0 :     CPLFree(self);
    6140           0 :   }
    6141             : 
    6142             : #include <limits>
    6143             : 
    6144        2433 : static bool CheckNumericDataType(GDALExtendedDataTypeHS* dt)
    6145             : {
    6146        2433 :     GDALExtendedDataTypeClass klass = GDALExtendedDataTypeGetClass(dt);
    6147        2433 :     if( klass == GEDTC_NUMERIC )
    6148             :         return true;
    6149          32 :     if( klass == GEDTC_STRING )
    6150             :         return false;
    6151          20 :     CPLAssert( klass == GEDTC_COMPOUND );
    6152          20 :     size_t nCount = 0;
    6153          20 :     GDALEDTComponentH* comps = GDALExtendedDataTypeGetComponents(dt, &nCount);
    6154             :     bool ret = true;
    6155          56 :     for( size_t i = 0; i < nCount; i++ )
    6156             :     {
    6157          38 :         GDALExtendedDataTypeH tmpType = GDALEDTComponentGetType(comps[i]);
    6158          38 :         ret = CheckNumericDataType(tmpType);
    6159          38 :         GDALExtendedDataTypeRelease(tmpType);
    6160          38 :         if( !ret )
    6161             :             break;
    6162             :     }
    6163          20 :     GDALExtendedDataTypeFreeComponents(comps, nCount);
    6164             :     return ret;
    6165             : }
    6166             : 
    6167        4273 : static CPLErr MDArrayReadWriteCheckArguments(GDALMDArrayHS* array,
    6168             :                                              bool bCheckOnlyDims,
    6169             :                                              int nDims1, GUIntBig* array_start_idx,
    6170             :                                              int nDims2, GUIntBig* count,
    6171             :                                              int nDims3, GIntBig* array_step,
    6172             :                                              int nDims4, GIntBig* buffer_stride,
    6173             :                                              GDALExtendedDataTypeHS* buffer_datatype,
    6174             :                                              size_t* pnBufferSize)
    6175             : {
    6176        4273 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(array);
    6177        4273 :     if( nDims1 != nExpectedDims )
    6178             :     {
    6179           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6180             :             "Wrong number of values in array_start_idx");
    6181           1 :         return CE_Failure;
    6182             :     }
    6183        4272 :     if( nDims2 != nExpectedDims )
    6184             :     {
    6185           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6186             :             "Wrong number of values in count");
    6187           1 :         return CE_Failure;
    6188             :     }
    6189        4271 :     if( nDims3 != nExpectedDims )
    6190             :     {
    6191           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6192             :             "Wrong number of values in array_step");
    6193           1 :         return CE_Failure;
    6194             :     }
    6195        4270 :     if( nDims4!= nExpectedDims )
    6196             :     {
    6197           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6198             :             "Wrong number of values in buffer_stride");
    6199           1 :         return CE_Failure;
    6200             :     }
    6201        4269 :     if( bCheckOnlyDims )
    6202             :         return CE_None;
    6203        2380 :     if( !CheckNumericDataType(buffer_datatype) )
    6204             :     {
    6205           8 :         CPLError(CE_Failure, CPLE_NotSupported,
    6206             :             "non-numeric buffer data type not supported in SWIG bindings");
    6207           8 :         return CE_Failure;
    6208             :     }
    6209             :     GIntBig nBufferSize = 0;
    6210        6756 :     for( int i = 0; i < nExpectedDims; i++ )
    6211             :     {
    6212        4386 :         if( count[i] == 0 )
    6213             :         {
    6214           1 :             CPLError(CE_Failure, CPLE_AppDefined,
    6215             :                      "count[%d] = 0 is invalid", i);
    6216           1 :             return CE_Failure;
    6217             :         }
    6218        4385 :         if( buffer_stride[i] < 0 )
    6219             :         {
    6220           1 :             CPLError(CE_Failure, CPLE_NotSupported,
    6221             :                 "Negative value in buffer_stride not supported in SWIG bindings");
    6222           1 :             return CE_Failure;
    6223             :         }
    6224        4384 :         if( count[i] > 1 && buffer_stride[i] != 0 )
    6225             :         {
    6226        3686 :             if( (GUIntBig)buffer_stride[i] > std::numeric_limits<GIntBig>::max() / (count[i] - 1) )
    6227             :             {
    6228           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6229           0 :                 return CE_Failure;
    6230             :             }
    6231        3686 :             GIntBig nDelta = buffer_stride[i] * (count[i] - 1);
    6232        3686 :             if( nBufferSize > std::numeric_limits<GIntBig>::max() - nDelta )
    6233             :             {
    6234           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6235           0 :                 return CE_Failure;
    6236             :             }
    6237        3686 :             nBufferSize += nDelta;
    6238             :         }
    6239             :     }
    6240        2370 :     const size_t nDTSize = GDALExtendedDataTypeGetSize(buffer_datatype);
    6241        2370 :     if( nDTSize == 0 )
    6242             :     {
    6243           0 :         CPLError(CE_Failure, CPLE_AppDefined, "nDTSize == 0");
    6244           0 :         return CE_Failure;
    6245             :     }
    6246        2370 :     if( (GUIntBig)nBufferSize > (GUIntBig)std::numeric_limits<GIntBig>::max() / nDTSize )
    6247             :     {
    6248           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6249           0 :         return CE_Failure;
    6250             :     }
    6251        2370 :     nBufferSize *= nDTSize;
    6252        2370 :     if( (GUIntBig)nBufferSize > (GUIntBig)std::numeric_limits<GIntBig>::max() - nDTSize )
    6253             :     {
    6254           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6255           1 :         return CE_Failure;
    6256             :     }
    6257        2369 :     nBufferSize += nDTSize;
    6258             : 
    6259             : #if SIZEOF_VOIDP == 4
    6260             :     if( nBufferSize > INT_MAX )
    6261             :     {
    6262             :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    6263             :         return CE_Failure;
    6264             :     }
    6265             : #endif
    6266        2369 :     *pnBufferSize = (size_t)nBufferSize;
    6267        2369 :     return CE_None;
    6268             : }
    6269             : 
    6270        2024 : SWIGINTERN void delete_GDALMDArrayHS(GDALMDArrayHS *self){
    6271        2024 :     GDALMDArrayRelease(self);
    6272        2024 :   }
    6273          83 : SWIGINTERN char const *GDALMDArrayHS_GetName(GDALMDArrayHS *self){
    6274          83 :     return GDALMDArrayGetName(self);
    6275             :   }
    6276          50 : SWIGINTERN char const *GDALMDArrayHS_GetFullName(GDALMDArrayHS *self){
    6277          50 :     return GDALMDArrayGetFullName(self);
    6278             :   }
    6279           6 : SWIGINTERN GUIntBig GDALMDArrayHS_GetTotalElementsCount(GDALMDArrayHS *self){
    6280           6 :     return GDALMDArrayGetTotalElementsCount(self);
    6281             :   }
    6282        3514 : SWIGINTERN size_t GDALMDArrayHS_GetDimensionCount(GDALMDArrayHS *self){
    6283        3514 :     return GDALMDArrayGetDimensionCount(self);
    6284             :   }
    6285        2285 : SWIGINTERN void GDALMDArrayHS_GetDimensions(GDALMDArrayHS *self,GDALDimensionHS ***pdims,size_t *pnCount){
    6286        4570 :     *pdims = GDALMDArrayGetDimensions(self, pnCount);
    6287             :   }
    6288          13 : SWIGINTERN void GDALMDArrayHS_GetCoordinateVariables(GDALMDArrayHS *self,GDALMDArrayHS ***parrays,size_t *pnCount){
    6289          26 :     *parrays = GDALMDArrayGetCoordinateVariables(self, pnCount);
    6290             :   }
    6291          93 : SWIGINTERN void GDALMDArrayHS_GetBlockSize(GDALMDArrayHS *self,GUIntBig **psizes,size_t *pnCount){
    6292         186 :     *psizes = GDALMDArrayGetBlockSize(self, pnCount);
    6293             :   }
    6294           1 : SWIGINTERN void GDALMDArrayHS_GetProcessingChunkSize(GDALMDArrayHS *self,size_t nMaxChunkMemory,GUIntBig **psizes,size_t *pnCount){
    6295           1 :      size_t* panTmp = GDALMDArrayGetProcessingChunkSize(self, pnCount, nMaxChunkMemory);
    6296           1 :      *psizes = NULL;
    6297           1 :      if( panTmp )
    6298             :      {
    6299           1 :         *psizes = (GUIntBig*) CPLMalloc(sizeof(GUIntBig) * (*pnCount));
    6300           3 :         for( size_t i = 0; i < *pnCount; ++i )
    6301             :         {
    6302           2 :             (*psizes)[i] = panTmp[i];
    6303             :         }
    6304           1 :         CPLFree(panTmp);
    6305             :      }
    6306           1 :   }
    6307        1977 : SWIGINTERN GDALExtendedDataTypeHS *GDALMDArrayHS_GetDataType(GDALMDArrayHS *self){
    6308        1977 :     return GDALMDArrayGetDataType(self);
    6309             :   }
    6310          15 : SWIGINTERN char **GDALMDArrayHS_GetStructuralInfo(GDALMDArrayHS *self){
    6311          15 :     return GDALMDArrayGetStructuralInfo( self );
    6312             :   }
    6313          44 : SWIGINTERN CPLErr GDALMDArrayHS_Resize(GDALMDArrayHS *self,int newDimensions,GUIntBig *newSizes,char **options=NULL){
    6314          44 :     if( static_cast<size_t>(newDimensions) != GDALMDArrayGetDimensionCount(self) )
    6315             :     {
    6316           2 :         CPLError(CE_Failure, CPLE_IllegalArg,
    6317             :                  "newSizes array not of expected size");
    6318           2 :         return CE_Failure;
    6319             :     }
    6320          42 :     return GDALMDArrayResize( self, newSizes, options ) ? CE_None : CE_Failure;
    6321             :   }
    6322             : 
    6323             : static GIntBig*
    6324        4831 : CreateCGIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
    6325             :   /* check if is List */
    6326        4831 :   if ( !PySequence_Check(pySeq) ) {
    6327           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    6328           0 :     *pnSize = -1;
    6329           0 :     return NULL;
    6330             :   }
    6331        4831 :   Py_ssize_t size = PySequence_Size(pySeq);
    6332        4831 :   if( size > (Py_ssize_t)INT_MAX ) {
    6333           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6334           0 :     *pnSize = -1;
    6335           0 :     return NULL;
    6336             :   }
    6337        4831 :   if( (size_t)size > SIZE_MAX / sizeof(GIntBig) ) {
    6338           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6339           0 :     *pnSize = -1;
    6340           0 :     return NULL;
    6341             :   }
    6342        4831 :   *pnSize = (int)size;
    6343        4831 :   GIntBig* ret = (GIntBig*) malloc((*pnSize)*sizeof(GIntBig));
    6344        4831 :   if( !ret ) {
    6345           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    6346           0 :     *pnSize = -1;
    6347           0 :     return NULL;
    6348             :   }
    6349       13747 :   for( int i = 0; i<*pnSize; i++ ) {
    6350        8916 :     PyObject *o = PySequence_GetItem(pySeq,i);
    6351        8916 :     if ( !PyArg_Parse(o,"L",&ret[i]) ) {
    6352           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    6353           0 :         Py_DECREF(o);
    6354           0 :         free(ret);
    6355           0 :         *pnSize = -1;
    6356           0 :         return NULL;
    6357             :     }
    6358        8916 :     Py_DECREF(o);
    6359             :   }
    6360             :   return ret;
    6361             : }
    6362             : 
    6363        1893 : 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){
    6364        1893 :     *buf = NULL;
    6365             : 
    6366        1893 :     size_t buf_size = 0;
    6367        1893 :     if( MDArrayReadWriteCheckArguments(self, true,
    6368             :                                         nDims1, array_start_idx,
    6369             :                                         nDims2, count,
    6370             :                                         nDims3, array_step,
    6371             :                                         nDims4, buffer_stride,
    6372             :                                         buffer_datatype,
    6373             :                                         &buf_size) != CE_None )
    6374             :     {
    6375             :       return CE_Failure;
    6376             :     }
    6377             : 
    6378        1889 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6379        3782 :     std::vector<size_t> count_internal(nExpectedDims + 1);
    6380        3778 :     std::vector<GPtrDiff_t> buffer_stride_internal(nExpectedDims + 1);
    6381        1889 :     size_t nProductCount = 1;
    6382        5426 :     for( int i = 0; i < nExpectedDims; i++ )
    6383             :     {
    6384        3537 :         count_internal[i] = (size_t)count[i];
    6385        3537 :         if( count_internal[i] != count[i] )
    6386             :         {
    6387             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6388             :             return CE_Failure;
    6389             :         }
    6390        3537 :         nProductCount *= count_internal[i];
    6391        3537 :         buffer_stride_internal[i] = (GPtrDiff_t)buffer_stride[i];
    6392        3537 :         if( buffer_stride_internal[i] != buffer_stride[i] )
    6393             :         {
    6394           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6395             :             return CE_Failure;
    6396             :         }
    6397             :     }
    6398             : 
    6399        1889 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6400        1889 :     bool isSelfString = GDALExtendedDataTypeGetClass(selfType) == GEDTC_STRING;
    6401        1889 :     GDALExtendedDataTypeRelease(selfType);
    6402             : 
    6403        1889 :     if( GDALExtendedDataTypeGetClass(buffer_datatype) == GEDTC_STRING &&
    6404             :         isSelfString )
    6405             :     {
    6406             :         size_t nExpectedStride = 1;
    6407          60 :         for( int i = nExpectedDims; i > 0; )
    6408             :         {
    6409          35 :             --i;
    6410          35 :             if( (size_t)buffer_stride_internal[i] != nExpectedStride )
    6411             :             {
    6412           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Unhandled stride");
    6413             :                 return CE_Failure;
    6414             :             }
    6415          35 :             nExpectedStride *= count_internal[i];
    6416             :         }
    6417          25 :         char** ppszBuffer = (char**)VSI_CALLOC_VERBOSE(nProductCount, sizeof(char*));
    6418          25 :         if( !ppszBuffer )
    6419             :             return CE_Failure;
    6420          25 :         GByte* pabyBuffer = (GByte*)ppszBuffer;
    6421          25 :         if( !(GDALMDArrayRead( self,
    6422             :                             array_start_idx,
    6423          25 :                             &count_internal[0],
    6424             :                             array_step,
    6425             :                             NULL,
    6426             :                             buffer_datatype,
    6427             :                             pabyBuffer,
    6428             :                             pabyBuffer,
    6429             :                             nProductCount * sizeof(char*) )) )
    6430             :         {
    6431           0 :             for( size_t i = 0; i < nProductCount; i++ )
    6432           0 :                 VSIFree(ppszBuffer[i]);
    6433           0 :             VSIFree(pabyBuffer);
    6434             :             return CE_Failure;
    6435             :         }
    6436             : 
    6437          25 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6438          25 :         PyObject* obj = PyList_New( nProductCount );
    6439         176 :         for( size_t i = 0; i < nProductCount; i++ )
    6440             :         {
    6441         151 :             if( !ppszBuffer[i] )
    6442             :             {
    6443           3 :                 Py_INCREF(Py_None);
    6444           3 :                 PyList_SetItem(obj, i, Py_None);
    6445             :             }
    6446             :             else
    6447             :             {
    6448         148 :                 PyList_SetItem(obj, i, GDALPythonObjectFromCStr( ppszBuffer[i] ) );
    6449             :             }
    6450         151 :             VSIFree(ppszBuffer[i]);
    6451             :         }
    6452          25 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6453          25 :         *buf = obj;
    6454          25 :         VSIFree(pabyBuffer);
    6455          25 :         return CE_None;
    6456             :     }
    6457             : 
    6458        1864 :     if( MDArrayReadWriteCheckArguments(self, false,
    6459             :                                         nDims1, array_start_idx,
    6460             :                                         nDims2, count,
    6461             :                                         nDims3, array_step,
    6462             :                                         nDims4, buffer_stride,
    6463             :                                         buffer_datatype,
    6464             :                                         &buf_size) != CE_None )
    6465             :     {
    6466             :       return CE_Failure;
    6467             :     }
    6468        1853 :     if( buf_size == 0 )
    6469             :     {
    6470             :         return CE_None;
    6471             :     }
    6472             : 
    6473             : 
    6474        3742 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6475        1853 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    6476        1853 :     if (*buf == NULL)
    6477             :     {
    6478           0 :         *buf = Py_None;
    6479           0 :         if( !GetUseExceptions() )
    6480             :         {
    6481           0 :             PyErr_Clear();
    6482             :         }
    6483           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6484           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6485             :         return CE_Failure;
    6486             :     }
    6487        1853 :     char *data = PyByteArray_AsString( (PyObject *)*buf );
    6488        1853 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6489             : 
    6490        1853 :     memset(data, 0, buf_size);
    6491             : 
    6492        1853 :     CPLErr eErr = GDALMDArrayRead( self,
    6493             :                                    array_start_idx,
    6494        1853 :                                    &count_internal[0],
    6495             :                                    array_step,
    6496        1853 :                                    &buffer_stride_internal[0],
    6497             :                                    buffer_datatype,
    6498             :                                    data,
    6499             :                                    data,
    6500        1878 :                                    buf_size ) ? CE_None : CE_Failure;
    6501          25 :     if (eErr == CE_Failure)
    6502             :     {
    6503          25 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6504          25 :         Py_DECREF((PyObject*)*buf);
    6505          25 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6506          25 :         *buf = NULL;
    6507             :     }
    6508             : 
    6509             :     return eErr;
    6510             :   }
    6511          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){
    6512             : 
    6513          13 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6514          26 :     std::vector<size_t> count_internal(nExpectedDims + 1);
    6515          13 :     if( nExpectedDims > 1 )
    6516             :     {
    6517           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6518             :             "Unsupported number of dimensions");
    6519             :         return CE_Failure;
    6520             :     }
    6521          25 :     for( int i = 0; i < nExpectedDims; i++ )
    6522             :     {
    6523          12 :         count_internal[i] = (size_t)count[i];
    6524          12 :         if( count_internal[i] != count[i] )
    6525             :         {
    6526             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6527             :             return CE_Failure;
    6528             :         }
    6529             :     }
    6530          13 :     if( nExpectedDims == 1 )
    6531             :     {
    6532          12 :         if( nDims1 != 1 )
    6533             :         {
    6534           0 :             CPLError(CE_Failure, CPLE_AppDefined,
    6535             :                 "Wrong number of values in array_start_idx");
    6536             :             return CE_Failure;
    6537             :         }
    6538          12 :         if( nDims2 != 1 )
    6539             :         {
    6540           0 :             CPLError(CE_Failure, CPLE_AppDefined,
    6541             :                 "Wrong number of values in count");
    6542             :             return CE_Failure;
    6543             :         }
    6544          12 :         if( nDims3 != 1 )
    6545             :         {
    6546           0 :             CPLError(CE_Failure, CPLE_AppDefined,
    6547             :                 "Wrong number of values in array_step");
    6548             :             return CE_Failure;
    6549             :         }
    6550             :     }
    6551             : 
    6552          26 :     CPLErr eErr = GDALMDArrayWrite(self,
    6553             :                                    array_start_idx,
    6554          13 :                                    &count_internal[0],
    6555             :                                    array_step,
    6556             :                                    NULL,
    6557             :                                    buffer_datatype,
    6558             :                                    options,
    6559             :                                    options,
    6560          13 :                                    CSLCount(options) * sizeof(char*) ) ? CE_None : CE_Failure;
    6561             :     return eErr;
    6562             :   }
    6563         516 : 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){
    6564             : 
    6565         516 :     size_t buf_size = 0;
    6566         516 :     if( MDArrayReadWriteCheckArguments(self, false,
    6567             :                                         nDims1, array_start_idx,
    6568             :                                         nDims2, count,
    6569             :                                         nDims3, array_step,
    6570             :                                         nDims4, buffer_stride,
    6571             :                                         buffer_datatype,
    6572             :                                         &buf_size) != CE_None )
    6573             :     {
    6574             :       return CE_Failure;
    6575             :     }
    6576             : 
    6577         516 :     if ( (GUIntBig)buf_len < buf_size )
    6578             :     {
    6579           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    6580           2 :         return CE_Failure;
    6581             :     }
    6582             : 
    6583         514 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6584        1030 :     std::vector<size_t> count_internal(nExpectedDims+1);
    6585        1028 :     std::vector<GPtrDiff_t> buffer_stride_internal(nExpectedDims+1);
    6586        1412 :     for( int i = 0; i < nExpectedDims; i++ )
    6587             :     {
    6588         898 :         count_internal[i] = (size_t)count[i];
    6589         898 :         if( count_internal[i] != count[i] )
    6590             :         {
    6591             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6592             :             return CE_Failure;
    6593             :         }
    6594         898 :         buffer_stride_internal[i] = (GPtrDiff_t)buffer_stride[i];
    6595         898 :         if( buffer_stride_internal[i] != buffer_stride[i] )
    6596             :         {
    6597           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6598             :             return CE_Failure;
    6599             :         }
    6600             :     }
    6601             : 
    6602         514 :     CPLErr eErr = GDALMDArrayWrite( self,
    6603             :                                    array_start_idx,
    6604         514 :                                    &count_internal[0],
    6605             :                                    array_step,
    6606         514 :                                    &buffer_stride_internal[0],
    6607             :                                    buffer_datatype,
    6608             :                                    buf_string,
    6609             :                                    buf_string,
    6610         517 :                                    (size_t)buf_len ) ? CE_None : CE_Failure;
    6611             :     return eErr;
    6612             :   }
    6613          22 : SWIGINTERN CPLErr GDALMDArrayHS_AdviseRead(GDALMDArrayHS *self,int nDims1,GUIntBig *array_start_idx,int nDims2,GUIntBig *count,char **options=0){
    6614             : 
    6615          22 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6616          22 :     if( nDims1 != nExpectedDims )
    6617             :     {
    6618           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6619             :             "Wrong number of values in array_start_idx");
    6620           0 :         return CE_Failure;
    6621             :     }
    6622          22 :     if( nDims2 != nExpectedDims )
    6623             :     {
    6624           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6625             :             "Wrong number of values in count");
    6626           0 :         return CE_Failure;
    6627             :     }
    6628             : 
    6629          44 :     std::vector<size_t> count_internal(nExpectedDims+1);
    6630          58 :     for( int i = 0; i < nExpectedDims; i++ )
    6631             :     {
    6632          36 :         count_internal[i] = (size_t)count[i];
    6633          36 :         if( count_internal[i] != count[i] )
    6634             :         {
    6635             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6636             :             return CE_Failure;
    6637             :         }
    6638             :     }
    6639             : 
    6640          22 :     if( !(GDALMDArrayAdviseReadEx( self, array_start_idx, count_internal.data(), options )) )
    6641             :     {
    6642           5 :         return CE_Failure;
    6643             :     }
    6644             :     return CE_None;
    6645             :   }
    6646         119 : SWIGINTERN GDALAttributeHS *GDALMDArrayHS_GetAttribute(GDALMDArrayHS *self,char const *name){
    6647             : 
    6648         119 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    6649             : 
    6650         119 :     GDALAttributeH hRet = GDALMDArrayGetAttribute(self, name);
    6651             : 
    6652         137 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    6653           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Attribute %s does not exist", name);
    6654             : 
    6655         119 :     return hRet;
    6656             :   }
    6657          58 : SWIGINTERN void GDALMDArrayHS_GetAttributes(GDALMDArrayHS *self,GDALAttributeHS ***pattrs,size_t *pnCount,char **options=0){
    6658         116 :     *pattrs = GDALMDArrayGetAttributes(self, pnCount, options);
    6659             :   }
    6660         162 : SWIGINTERN GDALAttributeHS *GDALMDArrayHS_CreateAttribute(GDALMDArrayHS *self,char const *name,int dimensions,GUIntBig *sizes,GDALExtendedDataTypeHS *data_type,char **options=0){
    6661         162 :     return GDALMDArrayCreateAttribute(self, name, dimensions,
    6662             :                                     (const GUInt64*) sizes,
    6663             :                                     data_type, options);
    6664             :   }
    6665          24 : SWIGINTERN CPLErr GDALMDArrayHS_DeleteAttribute(GDALMDArrayHS *self,char const *name,char **options=0){
    6666          24 :     return GDALMDArrayDeleteAttribute(self, name, options) ? CE_None : CE_Failure;
    6667             :   }
    6668          72 : SWIGINTERN CPLErr GDALMDArrayHS_GetNoDataValueAsRaw(GDALMDArrayHS *self,void **buf){
    6669          72 :     *buf = NULL;
    6670          72 :     const void* pabyBuf = GDALMDArrayGetRawNoDataValue(self);
    6671          72 :     if( pabyBuf == NULL )
    6672             :     {
    6673             :       return CE_Failure;
    6674             :     }
    6675          36 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6676          36 :     const size_t buf_size = GDALExtendedDataTypeGetSize(selfType);
    6677          36 :     GDALExtendedDataTypeRelease(selfType);
    6678             : 
    6679         108 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6680          36 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    6681          36 :     if (*buf == NULL)
    6682             :     {
    6683           0 :         *buf = Py_None;
    6684           0 :         if( !GetUseExceptions() )
    6685             :         {
    6686           0 :             PyErr_Clear();
    6687             :         }
    6688           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6689           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6690             :         return CE_Failure;
    6691             :     }
    6692          36 :     char *data = PyByteArray_AsString( (PyObject *)*buf );
    6693          36 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6694             : 
    6695          36 :     memcpy(data, pabyBuf, buf_size);
    6696             : 
    6697          36 :     return CE_None;
    6698             :   }
    6699         120 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsDouble(GDALMDArrayHS *self,double *val,int *hasval){
    6700         240 :     *val = GDALMDArrayGetNoDataValueAsDouble( self, hasval );
    6701             :   }
    6702          11 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsInt64(GDALMDArrayHS *self,GIntBig *val,int *hasval){
    6703          22 :     *val = GDALMDArrayGetNoDataValueAsInt64( self, hasval );
    6704             :   }
    6705           7 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsUInt64(GDALMDArrayHS *self,GUIntBig *val,int *hasval){
    6706          14 :     *val = GDALMDArrayGetNoDataValueAsUInt64( self, hasval );
    6707             :   }
    6708           5 : SWIGINTERN retStringAndCPLFree *GDALMDArrayHS_GetNoDataValueAsString(GDALMDArrayHS *self){
    6709           5 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6710           5 :     const size_t typeClass = GDALExtendedDataTypeGetClass(selfType);
    6711           5 :     GDALExtendedDataTypeRelease(selfType);
    6712             : 
    6713           5 :     if( typeClass != GEDTC_STRING )
    6714             :     {
    6715           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Data type is not string");
    6716           1 :         return NULL;
    6717             :     }
    6718           4 :     const void* pabyBuf = GDALMDArrayGetRawNoDataValue(self);
    6719           4 :     if( pabyBuf == NULL )
    6720             :     {
    6721             :       return NULL;
    6722             :     }
    6723           3 :     const char* ret = *reinterpret_cast<const char* const*>(pabyBuf);
    6724           3 :     if( ret )
    6725           2 :         return CPLStrdup(ret);
    6726             :     return NULL;
    6727             :   }
    6728          51 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueDouble(GDALMDArrayHS *self,double d){
    6729          51 :     return GDALMDArraySetNoDataValueAsDouble( self, d ) ? CE_None : CE_Failure;
    6730             :   }
    6731           1 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueInt64(GDALMDArrayHS *self,GIntBig v){
    6732           1 :     return GDALMDArraySetNoDataValueAsInt64( self, v ) ? CE_None : CE_Failure;
    6733             :   }
    6734           1 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueUInt64(GDALMDArrayHS *self,GUIntBig v){
    6735           1 :     return GDALMDArraySetNoDataValueAsUInt64( self, v ) ? CE_None : CE_Failure;
    6736             :   }
    6737           3 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueString(GDALMDArrayHS *self,char const *nodata){
    6738           3 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6739           3 :     const size_t typeClass = GDALExtendedDataTypeGetClass(selfType);
    6740           3 :     GDALExtendedDataTypeRelease(selfType);
    6741             : 
    6742           3 :     if( typeClass != GEDTC_STRING )
    6743             :     {
    6744           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Data type is not string");
    6745           0 :         return CE_Failure;
    6746             :     }
    6747           3 :     return GDALMDArraySetRawNoDataValue(self, &nodata) ? CE_None : CE_Failure;
    6748             :   }
    6749           8 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueRaw(GDALMDArrayHS *self,GIntBig nLen,char *pBuf){
    6750           8 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6751           8 :     const size_t selfTypeSize = GDALExtendedDataTypeGetSize(selfType);
    6752           8 :     GDALExtendedDataTypeRelease(selfType);
    6753             : 
    6754           8 :     if( static_cast<size_t>(nLen) != selfTypeSize )
    6755             :     {
    6756           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Argument of wrong size");
    6757           1 :         return CE_Failure;
    6758             :     }
    6759           7 :     return GDALMDArraySetRawNoDataValue(self, pBuf) ? CE_None : CE_Failure;
    6760             :   }
    6761           4 : SWIGINTERN CPLErr GDALMDArrayHS_DeleteNoDataValue(GDALMDArrayHS *self){
    6762           4 :     return GDALMDArraySetRawNoDataValue( self, NULL ) ? CE_None : CE_Failure;
    6763             :   }
    6764         100 : SWIGINTERN void GDALMDArrayHS_GetOffset(GDALMDArrayHS *self,double *val,int *hasval){
    6765         200 :     *val = GDALMDArrayGetOffset( self, hasval );
    6766             :   }
    6767           5 : SWIGINTERN GDALDataType GDALMDArrayHS_GetOffsetStorageType(GDALMDArrayHS *self){
    6768           5 :     GDALDataType eDT = GDT_Unknown;
    6769           5 :     int hasval = FALSE;
    6770           5 :     GDALMDArrayGetOffsetEx( self, &hasval, &eDT );
    6771           5 :     return hasval ? eDT : GDT_Unknown;
    6772             :   }
    6773         103 : SWIGINTERN void GDALMDArrayHS_GetScale(GDALMDArrayHS *self,double *val,int *hasval){
    6774         206 :     *val = GDALMDArrayGetScale( self, hasval );
    6775             :   }
    6776           5 : SWIGINTERN GDALDataType GDALMDArrayHS_GetScaleStorageType(GDALMDArrayHS *self){
    6777           5 :     GDALDataType eDT = GDT_Unknown;
    6778           5 :     int hasval = FALSE;
    6779           5 :     GDALMDArrayGetScaleEx( self, &hasval, &eDT );
    6780           5 :     return hasval ? eDT : GDT_Unknown;
    6781             :   }
    6782          21 : SWIGINTERN CPLErr GDALMDArrayHS_SetOffset(GDALMDArrayHS *self,double val,GDALDataType storageType=GDT_Unknown){
    6783          21 :     return GDALMDArraySetOffsetEx( self, val, storageType ) ? CE_None : CE_Failure;
    6784             :   }
    6785          21 : SWIGINTERN CPLErr GDALMDArrayHS_SetScale(GDALMDArrayHS *self,double val,GDALDataType storageType=GDT_Unknown){
    6786          21 :     return GDALMDArraySetScaleEx( self, val, storageType ) ? CE_None : CE_Failure;
    6787             :   }
    6788          15 : SWIGINTERN CPLErr GDALMDArrayHS_SetUnit(GDALMDArrayHS *self,char const *unit){
    6789          15 :     return GDALMDArraySetUnit(self, unit) ? CE_None : CE_Failure;
    6790             :   }
    6791         111 : SWIGINTERN char const *GDALMDArrayHS_GetUnit(GDALMDArrayHS *self){
    6792         111 :     return GDALMDArrayGetUnit(self);
    6793             :   }
    6794          30 : SWIGINTERN OGRErr GDALMDArrayHS_SetSpatialRef(GDALMDArrayHS *self,OSRSpatialReferenceShadow *srs){
    6795          30 :      return GDALMDArraySetSpatialRef( self, (OGRSpatialReferenceH)srs ) ? CE_None : CE_Failure;
    6796             :   }
    6797          77 : SWIGINTERN OSRSpatialReferenceShadow *GDALMDArrayHS_GetSpatialRef(GDALMDArrayHS *self){
    6798          77 :     return (OSRSpatialReferenceShadow*) GDALMDArrayGetSpatialRef(self);
    6799             :   }
    6800         430 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetView(GDALMDArrayHS *self,char const *viewExpr){
    6801         430 :     return GDALMDArrayGetView(self, viewExpr);
    6802             :   }
    6803          44 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_Transpose(GDALMDArrayHS *self,int axisMap,int *mapInts){
    6804          44 :     return GDALMDArrayTranspose(self, axisMap, mapInts);
    6805             :   }
    6806          13 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetUnscaled(GDALMDArrayHS *self){
    6807          13 :     return GDALMDArrayGetUnscaled(self);
    6808             :   }
    6809          35 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetMask(GDALMDArrayHS *self,char **options=0){
    6810          35 :     return GDALMDArrayGetMask(self, options);
    6811             :   }
    6812          22 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetGridded(GDALMDArrayHS *self,char const *pszGridOptions,GDALMDArrayHS *xArray=NULL,GDALMDArrayHS *yArray=NULL,char **options=0){
    6813          22 :     return GDALMDArrayGetGridded(self, pszGridOptions, xArray, yArray, options);
    6814             :   }
    6815          93 : SWIGINTERN GDALDatasetShadow *GDALMDArrayHS_AsClassicDataset(GDALMDArrayHS *self,size_t iXDim,size_t iYDim,GDALGroupHS *hRootGroup=NULL,char **options=0){
    6816          93 :     return (GDALDatasetShadow*)GDALMDArrayAsClassicDatasetEx(self, iXDim, iYDim, hRootGroup, options);
    6817             :   }
    6818          15 : SWIGINTERN Statistics *GDALMDArrayHS_GetStatistics(GDALMDArrayHS *self,bool approx_ok=FALSE,bool force=TRUE,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    6819          15 :         GUInt64 nValidCount = 0;
    6820          15 :         Statistics* psStatisticsOut = (Statistics*)CPLMalloc(sizeof(Statistics));
    6821          15 :         CPLErr eErr = GDALMDArrayGetStatistics(self, NULL, approx_ok, force,
    6822             :                                  &(psStatisticsOut->min),
    6823             :                                  &(psStatisticsOut->max),
    6824             :                                  &(psStatisticsOut->mean),
    6825             :                                  &(psStatisticsOut->std_dev),
    6826             :                                  &nValidCount,
    6827             :                                  callback, callback_data);
    6828          15 :         psStatisticsOut->valid_count = static_cast<GIntBig>(nValidCount);
    6829          15 :         if( eErr == CE_None )
    6830             :             return psStatisticsOut;
    6831           5 :         CPLFree(psStatisticsOut);
    6832             :         return NULL;
    6833             :   }
    6834           4 : SWIGINTERN Statistics *GDALMDArrayHS_ComputeStatistics(GDALMDArrayHS *self,bool approx_ok=FALSE,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=0){
    6835           4 :         GUInt64 nValidCount = 0;
    6836           4 :         Statistics* psStatisticsOut = (Statistics*)CPLMalloc(sizeof(Statistics));
    6837           4 :         int nSuccess = GDALMDArrayComputeStatisticsEx(self, NULL, approx_ok,
    6838             :                                  &(psStatisticsOut->min),
    6839             :                                  &(psStatisticsOut->max),
    6840             :                                  &(psStatisticsOut->mean),
    6841             :                                  &(psStatisticsOut->std_dev),
    6842             :                                  &nValidCount,
    6843             :                                  callback, callback_data, options);
    6844           4 :         psStatisticsOut->valid_count = static_cast<GIntBig>(nValidCount);
    6845           4 :         if( nSuccess )
    6846             :             return psStatisticsOut;
    6847           0 :         CPLFree(psStatisticsOut);
    6848             :         return NULL;
    6849             :   }
    6850          34 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetResampled(GDALMDArrayHS *self,int nDimensions,GDALDimensionHS **dimensions,GDALRIOResampleAlg resample_alg,OSRSpatialReferenceShadow **srs,char **options=0){
    6851          34 :     return GDALMDArrayGetResampled(self, nDimensions, dimensions,
    6852             :                                   resample_alg, srs ? *srs : NULL, options);
    6853             :   }
    6854           7 : SWIGINTERN void GDALMDArrayHS_GetMeshGrid(int nInputArrays,GDALMDArrayHS **ahInputArrays,GDALMDArrayHS ***outputArrays,size_t *pnCountOutputArrays,char **options=0){
    6855          14 :     *outputArrays = GDALMDArrayGetMeshGrid(ahInputArrays, nInputArrays, pnCountOutputArrays, options);
    6856             :   }
    6857           7 : SWIGINTERN bool GDALMDArrayHS_Cache(GDALMDArrayHS *self,char **options=NULL){
    6858          14 :       return GDALMDArrayCache(self, options);
    6859             :   }
    6860          28 : SWIGINTERN CPLErr GDALMDArrayHS_Rename(GDALMDArrayHS *self,char const *newName){
    6861          28 :     return GDALMDArrayRename( self, newName ) ? CE_None : CE_Failure;
    6862             :   }
    6863         737 : SWIGINTERN void delete_GDALAttributeHS(GDALAttributeHS *self){
    6864         737 :     GDALAttributeRelease(self);
    6865         737 :   }
    6866         361 : SWIGINTERN char const *GDALAttributeHS_GetName(GDALAttributeHS *self){
    6867         361 :     return GDALAttributeGetName(self);
    6868             :   }
    6869          49 : SWIGINTERN char const *GDALAttributeHS_GetFullName(GDALAttributeHS *self){
    6870          49 :     return GDALAttributeGetFullName(self);
    6871             :   }
    6872         176 : SWIGINTERN GUIntBig GDALAttributeHS_GetTotalElementsCount(GDALAttributeHS *self){
    6873         176 :     return GDALAttributeGetTotalElementsCount(self);
    6874             :   }
    6875          12 : SWIGINTERN size_t GDALAttributeHS_GetDimensionCount(GDALAttributeHS *self){
    6876          12 :     return GDALAttributeGetDimensionCount(self);
    6877             :   }
    6878          11 : SWIGINTERN void GDALAttributeHS_GetDimensionsSize(GDALAttributeHS *self,GUIntBig **pdims,size_t *pnCount){
    6879          22 :     *pdims = GDALAttributeGetDimensionsSize(self, pnCount);
    6880             :   }
    6881         418 : SWIGINTERN GDALExtendedDataTypeHS *GDALAttributeHS_GetDataType(GDALAttributeHS *self){
    6882         418 :     return GDALAttributeGetDataType(self);
    6883             :   }
    6884          10 : SWIGINTERN CPLErr GDALAttributeHS_ReadAsRaw(GDALAttributeHS *self,void **buf){
    6885          10 :     *buf = NULL;
    6886          10 :     GDALExtendedDataTypeHS* dt = GDALAttributeGetDataType(self);
    6887          10 :     bool bIsNumeric = CheckNumericDataType(dt);
    6888          10 :     GDALExtendedDataTypeRelease(dt);
    6889          10 :     if( !bIsNumeric )
    6890             :     {
    6891           4 :         CPLError(CE_Failure, CPLE_NotSupported,
    6892             :             "non-numeric buffer data type not supported in SWIG bindings");
    6893           4 :         return CE_Failure;
    6894             :     }
    6895           6 :     size_t buf_size = 0;
    6896           6 :     GByte* pabyBuf = GDALAttributeReadAsRaw(self, &buf_size);
    6897           6 :     if( pabyBuf == NULL )
    6898             :     {
    6899             :       return CE_Failure;
    6900             :     }
    6901             : 
    6902          16 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6903           6 :     *buf = (void *)PyBytes_FromStringAndSize( NULL, buf_size );
    6904           6 :     if (*buf == NULL)
    6905             :     {
    6906           0 :         *buf = Py_None;
    6907           0 :         if( !GetUseExceptions() )
    6908             :         {
    6909           0 :             PyErr_Clear();
    6910             :         }
    6911           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6912           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6913           0 :         GDALAttributeFreeRawResult(self, pabyBuf, buf_size);
    6914             :         return CE_Failure;
    6915             :     }
    6916           6 :     char *data = PyBytes_AsString( (PyObject *)*buf );
    6917           6 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6918             : 
    6919           6 :     memcpy(data, pabyBuf, buf_size);
    6920           6 :     GDALAttributeFreeRawResult(self, pabyBuf, buf_size);
    6921             : 
    6922             :     return CE_None;
    6923             :   }
    6924         107 : SWIGINTERN char const *GDALAttributeHS_ReadAsString(GDALAttributeHS *self){
    6925         107 :     return GDALAttributeReadAsString(self);
    6926             :   }
    6927          22 : SWIGINTERN int GDALAttributeHS_ReadAsInt(GDALAttributeHS *self){
    6928          22 :     return GDALAttributeReadAsInt(self);
    6929             :   }
    6930          15 : SWIGINTERN long long GDALAttributeHS_ReadAsInt64(GDALAttributeHS *self){
    6931          15 :     return GDALAttributeReadAsInt64(self);
    6932             :   }
    6933             : 
    6934             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6935             : SWIGINTERNINLINE PyObject* 
    6936          15 : SWIG_From_long_SS_long  (long long value)
    6937             : {
    6938          15 :   return ((value < LONG_MIN) || (value > LONG_MAX)) ?
    6939             :     PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value));
    6940             : }
    6941             : #endif
    6942             : 
    6943          40 : SWIGINTERN double GDALAttributeHS_ReadAsDouble(GDALAttributeHS *self){
    6944          40 :     return GDALAttributeReadAsDouble(self);
    6945             :   }
    6946          19 : SWIGINTERN char **GDALAttributeHS_ReadAsStringArray(GDALAttributeHS *self){
    6947          19 :     return GDALAttributeReadAsStringArray(self);
    6948             :   }
    6949             : 
    6950             : static PyObject *
    6951          15 : CreateTupleFromIntArray( const int *first, size_t size ) {
    6952          15 :   PyObject *out = PyTuple_New( size );
    6953         819 :   for( unsigned int i=0; i<size; i++ ) {
    6954         804 :     PyObject *val = PyInt_FromLong( *first );
    6955         804 :     ++first;
    6956         804 :     PyTuple_SetItem( out, i, val );
    6957             :   }
    6958          15 :   return out;
    6959             : }
    6960             : 
    6961          15 : SWIGINTERN void GDALAttributeHS_ReadAsIntArray(GDALAttributeHS *self,int **pvals,size_t *pnCount){
    6962          30 :     *pvals = GDALAttributeReadAsIntArray(self, pnCount);
    6963             :   }
    6964             : 
    6965             : static PyObject *
    6966          14 : CreateTupleFromInt64Array( const long long *first, size_t size ) {
    6967          14 :   PyObject *out = PyTuple_New( size );
    6968          69 :   for( unsigned int i=0; i<size; i++ ) {
    6969          55 :     PyObject *val = PyLong_FromLongLong( *first );
    6970          55 :     ++first;
    6971          55 :     PyTuple_SetItem( out, i, val );
    6972             :   }
    6973          14 :   return out;
    6974             : }
    6975             : 
    6976          14 : SWIGINTERN void GDALAttributeHS_ReadAsInt64Array(GDALAttributeHS *self,long long **pvals,size_t *pnCount){
    6977          28 :     *pvals = (long long*)GDALAttributeReadAsInt64Array(self, pnCount);
    6978             :   }
    6979          29 : SWIGINTERN void GDALAttributeHS_ReadAsDoubleArray(GDALAttributeHS *self,double **pvals,size_t *pnCount){
    6980          58 :     *pvals = GDALAttributeReadAsDoubleArray(self, pnCount);
    6981             :   }
    6982           5 : SWIGINTERN CPLErr GDALAttributeHS_WriteRaw(GDALAttributeHS *self,GIntBig nLen,char *pBuf){
    6983           5 :     GDALExtendedDataTypeHS* dt = GDALAttributeGetDataType(self);
    6984           5 :     bool bIsNumeric = CheckNumericDataType(dt);
    6985           5 :     GDALExtendedDataTypeRelease(dt);
    6986           5 :     if( !bIsNumeric )
    6987             :     {
    6988           0 :         CPLError(CE_Failure, CPLE_NotSupported,
    6989             :             "non-numeric buffer data type not supported in SWIG bindings");
    6990           0 :         return CE_Failure;
    6991             :     }
    6992           5 :     return GDALAttributeWriteRaw(self, pBuf, nLen) ? CE_None : CE_Failure;
    6993             :   }
    6994         181 : SWIGINTERN CPLErr GDALAttributeHS_WriteString(GDALAttributeHS *self,char const *val){
    6995         181 :     return GDALAttributeWriteString(self, val) ? CE_None : CE_Failure;
    6996             :   }
    6997           8 : SWIGINTERN CPLErr GDALAttributeHS_WriteStringArray(GDALAttributeHS *self,char **vals){
    6998           8 :     return GDALAttributeWriteStringArray(self, vals) ? CE_None : CE_Failure;
    6999             :   }
    7000          22 : SWIGINTERN CPLErr GDALAttributeHS_WriteInt(GDALAttributeHS *self,int val){
    7001          22 :     return GDALAttributeWriteInt(self, val) ? CE_None : CE_Failure;
    7002             :   }
    7003             : 
    7004             : #ifdef SWIG_LONG_LONG_AVAILABLE
    7005             : SWIGINTERN int
    7006          11 : SWIG_AsVal_long_SS_long (PyObject *obj, long long *val)
    7007             : {
    7008          11 :   int res = SWIG_TypeError;
    7009          11 :   if (PyLong_Check(obj)) {
    7010          11 :     long long v = PyLong_AsLongLong(obj);
    7011          11 :     if (!PyErr_Occurred()) {
    7012          11 :       if (val) *val = v;
    7013          11 :       return SWIG_OK;
    7014             :     } else {
    7015           0 :       PyErr_Clear();
    7016           0 :       res = SWIG_OverflowError;
    7017             :     }
    7018             :   } else {
    7019           0 :     long v;
    7020           0 :     res = SWIG_AsVal_long (obj,&v);
    7021           0 :     if (SWIG_IsOK(res)) {
    7022           0 :       if (val) *val = v;
    7023           0 :       return res;
    7024             :     }
    7025             :   }
    7026             : #ifdef SWIG_PYTHON_CAST_MODE
    7027             :   {
    7028             :     const double mant_max = 1LL << DBL_MANT_DIG;
    7029             :     const double mant_min = -mant_max;
    7030             :     double d;
    7031             :     res = SWIG_AsVal_double (obj,&d);
    7032             :     if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, mant_min, mant_max))
    7033             :       return SWIG_OverflowError;
    7034             :     if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) {
    7035             :       if (val) *val = (long long)(d);
    7036             :       return SWIG_AddCast(res);
    7037             :     }
    7038             :     res = SWIG_TypeError;
    7039             :   }
    7040             : #endif
    7041             :   return res;
    7042             : }
    7043             : #endif
    7044             : 
    7045          11 : SWIGINTERN CPLErr GDALAttributeHS_WriteInt64(GDALAttributeHS *self,long long val){
    7046          11 :     return GDALAttributeWriteInt64(self, val) ? CE_None : CE_Failure;
    7047             :   }
    7048          11 : SWIGINTERN CPLErr GDALAttributeHS_WriteDouble(GDALAttributeHS *self,double val){
    7049          11 :     return GDALAttributeWriteDouble(self, val) ? CE_None : CE_Failure;
    7050             :   }
    7051          11 : SWIGINTERN CPLErr GDALAttributeHS_WriteIntArray(GDALAttributeHS *self,int nList,int *pList){
    7052          11 :     return GDALAttributeWriteIntArray(self, pList, nList) ? CE_None : CE_Failure;
    7053             :   }
    7054             : 
    7055             : static long long*
    7056          10 : CreateCInt64ListFromSequence( PyObject* pySeq, int* pnSize ) {
    7057             :   /* check if is List */
    7058          10 :   if ( !PySequence_Check(pySeq) ) {
    7059           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    7060           0 :     *pnSize = -1;
    7061           0 :     return NULL;
    7062             :   }
    7063          10 :   Py_ssize_t size = PySequence_Size(pySeq);
    7064          10 :   if( size > (Py_ssize_t)INT_MAX ) {
    7065           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7066           0 :     *pnSize = -1;
    7067           0 :     return NULL;
    7068             :   }
    7069          10 :   if( (size_t)size > SIZE_MAX / sizeof(long long) ) {
    7070           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7071           0 :     *pnSize = -1;
    7072           0 :     return NULL;
    7073             :   }
    7074          10 :   *pnSize = (int)size;
    7075          10 :   long long* ret = (long long*) malloc((*pnSize)*sizeof(long long));
    7076          10 :   if( !ret ) {
    7077           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    7078           0 :     *pnSize = -1;
    7079           0 :     return NULL;
    7080             :   }
    7081          30 :   for( int i = 0; i<*pnSize; i++ ) {
    7082          20 :     PyObject *o = PySequence_GetItem(pySeq,i);
    7083          20 :     if ( !PyArg_Parse(o,"L",&ret[i]) ) {
    7084           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    7085           0 :         Py_DECREF(o);
    7086           0 :         free(ret);
    7087           0 :         *pnSize = -1;
    7088           0 :         return NULL;
    7089             :     }
    7090          20 :     Py_DECREF(o);
    7091             :   }
    7092             :   return ret;
    7093             : }
    7094             : 
    7095          10 : SWIGINTERN CPLErr GDALAttributeHS_WriteInt64Array(GDALAttributeHS *self,int nList,long long *pList){
    7096          10 :     return GDALAttributeWriteInt64Array(self, (int64_t*)pList, nList) ? CE_None : CE_Failure;
    7097             :   }
    7098             : 
    7099             : static double*
    7100         177 : CreateCDoubleListFromSequence( PyObject* pySeq, int* pnSize ) {
    7101             :   /* check if is List */
    7102         177 :   if ( !PySequence_Check(pySeq) ) {
    7103           1 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    7104           1 :     *pnSize = -1;
    7105           1 :     return NULL;
    7106             :   }
    7107         176 :   Py_ssize_t size = PySequence_Size(pySeq);
    7108         176 :   if( size > (Py_ssize_t)INT_MAX ) {
    7109           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7110           0 :     *pnSize = -1;
    7111           0 :     return NULL;
    7112             :   }
    7113         176 :   if( (size_t)size > SIZE_MAX / sizeof(double) ) {
    7114           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7115           0 :     *pnSize = -1;
    7116           0 :     return NULL;
    7117             :   }
    7118         176 :   *pnSize = (int)size;
    7119         176 :   double* ret = (double*) malloc((*pnSize)*sizeof(double));
    7120         176 :   if( !ret ) {
    7121           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    7122           0 :     *pnSize = -1;
    7123           0 :     return NULL;
    7124             :   }
    7125         569 :   for( int i = 0; i<*pnSize; i++ ) {
    7126         394 :     PyObject *o = PySequence_GetItem(pySeq,i);
    7127         394 :     if ( !PyArg_Parse(o,"d",&ret[i]) ) {
    7128           1 :         PyErr_SetString(PyExc_TypeError, "not an number");
    7129           1 :         Py_DECREF(o);
    7130           1 :         free(ret);
    7131           1 :         *pnSize = -1;
    7132           1 :         return NULL;
    7133             :     }
    7134         393 :     Py_DECREF(o);
    7135             :   }
    7136             :   return ret;
    7137             : }
    7138             : 
    7139           7 : SWIGINTERN CPLErr GDALAttributeHS_WriteDoubleArray(GDALAttributeHS *self,int nList,double *pList){
    7140           7 :     return GDALAttributeWriteDoubleArray(self, pList, nList) ? CE_None : CE_Failure;
    7141             :   }
    7142          27 : SWIGINTERN CPLErr GDALAttributeHS_Rename(GDALAttributeHS *self,char const *newName){
    7143          27 :     return GDALAttributeRename( self, newName ) ? CE_None : CE_Failure;
    7144             :   }
    7145        4924 : SWIGINTERN void delete_GDALDimensionHS(GDALDimensionHS *self){
    7146        4924 :     GDALDimensionRelease(self);
    7147        4924 :   }
    7148         276 : SWIGINTERN char const *GDALDimensionHS_GetName(GDALDimensionHS *self){
    7149         276 :     return GDALDimensionGetName(self);
    7150             :   }
    7151          82 : SWIGINTERN char const *GDALDimensionHS_GetFullName(GDALDimensionHS *self){
    7152          82 :     return GDALDimensionGetFullName(self);
    7153             :   }
    7154          54 : SWIGINTERN char const *GDALDimensionHS_GetType(GDALDimensionHS *self){
    7155          54 :     return GDALDimensionGetType(self);
    7156             :   }
    7157          22 : SWIGINTERN char const *GDALDimensionHS_GetDirection(GDALDimensionHS *self){
    7158          22 :     return GDALDimensionGetDirection(self);
    7159             :   }
    7160        3686 : SWIGINTERN GUIntBig GDALDimensionHS_GetSize(GDALDimensionHS *self){
    7161        3686 :     return GDALDimensionGetSize(self);
    7162             :   }
    7163         120 : SWIGINTERN GDALMDArrayHS *GDALDimensionHS_GetIndexingVariable(GDALDimensionHS *self){
    7164         120 :     return GDALDimensionGetIndexingVariable(self);
    7165             :   }
    7166          23 : SWIGINTERN bool GDALDimensionHS_SetIndexingVariable(GDALDimensionHS *self,GDALMDArrayHS *array){
    7167          46 :     return GDALDimensionSetIndexingVariable(self, array);
    7168             :   }
    7169          31 : SWIGINTERN CPLErr GDALDimensionHS_Rename(GDALDimensionHS *self,char const *newName){
    7170          31 :     return GDALDimensionRename( self, newName ) ? CE_None : CE_Failure;
    7171             :   }
    7172        4607 : SWIGINTERN void delete_GDALExtendedDataTypeHS(GDALExtendedDataTypeHS *self){
    7173        4607 :     GDALExtendedDataTypeRelease(self);
    7174        4607 :   }
    7175        1972 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_Create(GDALDataType dt){
    7176        1972 :     return GDALExtendedDataTypeCreate(dt);
    7177             :   }
    7178         195 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_CreateString(size_t nMaxStringLength=0,GDALExtendedDataTypeSubType eSubType=GEDTST_NONE){
    7179         195 :     return GDALExtendedDataTypeCreateStringEx(nMaxStringLength, eSubType);
    7180             :   }
    7181          22 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_CreateCompound(char const *name,size_t nTotalSize,int nComps,GDALEDTComponentHS **comps){
    7182          22 :     return GDALExtendedDataTypeCreateCompound(name, nTotalSize, nComps, comps);
    7183             :   }
    7184           8 : SWIGINTERN char const *GDALExtendedDataTypeHS_GetName(GDALExtendedDataTypeHS *self){
    7185           8 :     return GDALExtendedDataTypeGetName(self);
    7186             :   }
    7187        2900 : SWIGINTERN GDALExtendedDataTypeClass GDALExtendedDataTypeHS_GetClass(GDALExtendedDataTypeHS *self){
    7188        2900 :     return GDALExtendedDataTypeGetClass(self);
    7189             :   }
    7190        2077 : SWIGINTERN GDALDataType GDALExtendedDataTypeHS_GetNumericDataType(GDALExtendedDataTypeHS *self){
    7191        2077 :     return GDALExtendedDataTypeGetNumericDataType(self);
    7192             :   }
    7193          51 : SWIGINTERN size_t GDALExtendedDataTypeHS_GetSize(GDALExtendedDataTypeHS *self){
    7194          51 :     return GDALExtendedDataTypeGetSize(self);
    7195             :   }
    7196           3 : SWIGINTERN size_t GDALExtendedDataTypeHS_GetMaxStringLength(GDALExtendedDataTypeHS *self){
    7197           3 :     return GDALExtendedDataTypeGetMaxStringLength(self);
    7198             :   }
    7199         104 : SWIGINTERN GDALExtendedDataTypeSubType GDALExtendedDataTypeHS_GetSubType(GDALExtendedDataTypeHS *self){
    7200         104 :     return GDALExtendedDataTypeGetSubType(self);
    7201             :   }
    7202           1 : SWIGINTERN GDALRasterAttributeTableShadow *GDALExtendedDataTypeHS_GetRAT(GDALExtendedDataTypeHS *self){
    7203           1 :     return GDALExtendedDataTypeGetRAT(self);
    7204             :   }
    7205          21 : SWIGINTERN void GDALExtendedDataTypeHS_GetComponents(GDALExtendedDataTypeHS *self,GDALEDTComponentHS ***pcomps,size_t *pnCount){
    7206          42 :     *pcomps = GDALExtendedDataTypeGetComponents(self, pnCount);
    7207             :   }
    7208           7 : SWIGINTERN bool GDALExtendedDataTypeHS_CanConvertTo(GDALExtendedDataTypeHS *self,GDALExtendedDataTypeHS *other){
    7209          14 :     return GDALExtendedDataTypeCanConvertTo(self, other);
    7210             :   }
    7211         100 : SWIGINTERN bool GDALExtendedDataTypeHS_Equals(GDALExtendedDataTypeHS *self,GDALExtendedDataTypeHS *other){
    7212         200 :     return GDALExtendedDataTypeEquals(self, other);
    7213             :   }
    7214          61 : SWIGINTERN void delete_GDALEDTComponentHS(GDALEDTComponentHS *self){
    7215          61 :     GDALEDTComponentRelease(self);
    7216          61 :   }
    7217          20 : SWIGINTERN GDALEDTComponentHS *GDALEDTComponentHS_Create(char const *name,size_t offset,GDALExtendedDataTypeHS *type){
    7218          20 :     return GDALEDTComponentCreate(name, offset, type);
    7219             :   }
    7220          33 : SWIGINTERN char const *GDALEDTComponentHS_GetName(GDALEDTComponentHS *self){
    7221          33 :     return GDALEDTComponentGetName(self);
    7222             :   }
    7223          31 : SWIGINTERN size_t GDALEDTComponentHS_GetOffset(GDALEDTComponentHS *self){
    7224          31 :     return GDALEDTComponentGetOffset(self);
    7225             :   }
    7226          49 : SWIGINTERN GDALExtendedDataTypeHS *GDALEDTComponentHS_GetType(GDALEDTComponentHS *self){
    7227          49 :     return GDALEDTComponentGetType(self);
    7228             :   }
    7229             : 
    7230           6 : GDALRasterAttributeTableShadow* CreateRasterAttributeTableFromMDArrays(
    7231             :     GDALRATTableType eTableType, int nArrays, GDALMDArrayHS **ahArrays,
    7232             :     int nUsages = 0, GDALRATFieldUsage *paeUsages = NULL )
    7233             : {
    7234           6 :   if( nUsages != 0 && nUsages != nArrays )
    7235             :   {
    7236           1 :       CPLError(CE_Failure, CPLE_AppDefined, "nUsages != nArrays");
    7237           1 :       return NULL;
    7238             :   }
    7239           5 :   return GDALCreateRasterAttributeTableFromMDArrays( eTableType, nArrays, (const GDALMDArrayH *)ahArrays, paeUsages );
    7240             : }
    7241             : 
    7242             : 
    7243             : /* Returned size is in bytes or 0 if an error occurred. */
    7244             : static
    7245       19344 : GIntBig ComputeBandRasterIOSize (int buf_xsize, int buf_ysize, int nPixelSize,
    7246             :                                  GIntBig nPixelSpace, GIntBig nLineSpace,
    7247             :                                  int bSpacingShouldBeMultipleOfPixelSize )
    7248             : {
    7249       19344 :     if (buf_xsize <= 0 || buf_ysize <= 0)
    7250             :     {
    7251           2 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for buffer size");
    7252           2 :         return 0;
    7253             :     }
    7254             : 
    7255       19342 :     if (nPixelSpace < 0 || nLineSpace < 0)
    7256             :     {
    7257           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for space arguments");
    7258           0 :         return 0;
    7259             :     }
    7260             : 
    7261       19342 :     if (nPixelSize == 0)
    7262             :     {
    7263           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    7264           1 :         return 0;
    7265             :     }
    7266             : 
    7267       19341 :     if( nPixelSpace == 0 )
    7268       19144 :         nPixelSpace = nPixelSize;
    7269         197 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nPixelSpace % nPixelSize) != 0 )
    7270             :     {
    7271           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nPixelSpace should be a multiple of nPixelSize");
    7272           0 :         return 0;
    7273             :     }
    7274             : 
    7275       19341 :     if( nLineSpace == 0 )
    7276             :     {
    7277       19293 :         nLineSpace = nPixelSpace * buf_xsize;
    7278             :     }
    7279          48 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nLineSpace % nPixelSize) != 0 )
    7280             :     {
    7281           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    7282           0 :         return 0;
    7283             :     }
    7284             : 
    7285       19341 :     GIntBig nRet = (GIntBig)(buf_ysize - 1) * nLineSpace + (GIntBig)(buf_xsize - 1) * nPixelSpace + nPixelSize;
    7286             : #if SIZEOF_VOIDP == 4
    7287             :     if (nRet > INT_MAX)
    7288             :     {
    7289             :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    7290             :         return 0;
    7291             :     }
    7292             : #endif
    7293             : 
    7294       19341 :     return nRet;
    7295             : }
    7296             : 
    7297             : 
    7298             : static
    7299        9108 : CPLErr WriteRaster_internal( GDALRasterBandShadow *obj,
    7300             :                              int xoff, int yoff, int xsize, int ysize,
    7301             :                              int buf_xsize, int buf_ysize,
    7302             :                              GDALDataType buf_type,
    7303             :                              GIntBig buf_size, char *buffer,
    7304             :                              GIntBig pixel_space, GIntBig line_space,
    7305             :                              GDALRasterIOExtraArg* psExtraArg )
    7306             : {
    7307        9108 :     GIntBig min_buffer_size = ComputeBandRasterIOSize (buf_xsize, buf_ysize, GDALGetDataTypeSizeBytes( buf_type ),
    7308             :                                                    pixel_space, line_space, FALSE );
    7309        9108 :     if ( min_buffer_size == 0 )
    7310             :       return CE_Failure;
    7311             : 
    7312        9107 :     if ( buf_size < min_buffer_size ) {
    7313           1 :       CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    7314           1 :       return CE_Failure;
    7315             :     }
    7316             : 
    7317        9106 :     return GDALRasterIOEx( obj, GF_Write, xoff, yoff, xsize, ysize,
    7318        9106 :                            (void *) buffer, buf_xsize, buf_ysize, buf_type, pixel_space, line_space, psExtraArg );
    7319             : }
    7320             : 
    7321          68 : SWIGINTERN GDALDatasetShadow *GDALRasterBandShadow_GetDataset(GDALRasterBandShadow *self){
    7322          68 :     return (GDALDatasetShadow*) GDALGetBandDataset(self);
    7323             :   }
    7324           8 : SWIGINTERN int GDALRasterBandShadow_GetBand(GDALRasterBandShadow *self){
    7325           8 :     return GDALGetBandNumber(self);
    7326             :   }
    7327         491 : SWIGINTERN void GDALRasterBandShadow_GetBlockSize(GDALRasterBandShadow *self,int *pnBlockXSize,int *pnBlockYSize){
    7328         491 :       GDALGetBlockSize(self, pnBlockXSize, pnBlockYSize);
    7329         491 :   }
    7330           6 : SWIGINTERN void GDALRasterBandShadow_GetActualBlockSize(GDALRasterBandShadow *self,int nXBlockOff,int nYBlockOff,int *pnxvalid,int *pnyvalid,int *pisvalid){
    7331          12 :     *pisvalid = (GDALGetActualBlockSize(self, nXBlockOff, nYBlockOff, pnxvalid, pnyvalid) == CE_None);
    7332             :   }
    7333         839 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetColorInterpretation(GDALRasterBandShadow *self){
    7334         839 :     return GDALGetRasterColorInterpretation(self);
    7335             :   }
    7336         182 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetRasterColorInterpretation(GDALRasterBandShadow *self){
    7337         182 :     return GDALGetRasterColorInterpretation(self);
    7338             :   }
    7339         684 : SWIGINTERN CPLErr GDALRasterBandShadow_SetColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    7340         684 :     return GDALSetRasterColorInterpretation( self, val );
    7341             :   }
    7342         409 : SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    7343         409 :     return GDALSetRasterColorInterpretation( self, val );
    7344             :   }
    7345      410201 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValue(GDALRasterBandShadow *self,double *val,int *hasval){
    7346      820402 :     *val = GDALGetRasterNoDataValue( self, hasval );
    7347             :   }
    7348          31 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValueAsInt64(GDALRasterBandShadow *self,GIntBig *val,int *hasval){
    7349          62 :     *val = GDALGetRasterNoDataValueAsInt64( self, hasval );
    7350             :   }
    7351          22 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValueAsUInt64(GDALRasterBandShadow *self,GUIntBig *val,int *hasval){
    7352          44 :     *val = GDALGetRasterNoDataValueAsUInt64( self, hasval );
    7353             :   }
    7354         610 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValue(GDALRasterBandShadow *self,double d){
    7355         610 :     return GDALSetRasterNoDataValue( self, d );
    7356             :   }
    7357          21 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValueAsInt64(GDALRasterBandShadow *self,GIntBig v){
    7358          21 :     return GDALSetRasterNoDataValueAsInt64( self, v );
    7359             :   }
    7360          20 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValueAsUInt64(GDALRasterBandShadow *self,GUIntBig v){
    7361          20 :     return GDALSetRasterNoDataValueAsUInt64( self, v );
    7362             :   }
    7363          53 : SWIGINTERN CPLErr GDALRasterBandShadow_DeleteNoDataValue(GDALRasterBandShadow *self){
    7364          53 :     return GDALDeleteRasterNoDataValue(self);
    7365             :   }
    7366          69 : SWIGINTERN char const *GDALRasterBandShadow_GetUnitType(GDALRasterBandShadow *self){
    7367          69 :       return GDALGetRasterUnitType(self);
    7368             :   }
    7369          27 : SWIGINTERN CPLErr GDALRasterBandShadow_SetUnitType(GDALRasterBandShadow *self,char const *val){
    7370          27 :     return GDALSetRasterUnitType( self, val );
    7371             :   }
    7372          17 : SWIGINTERN char **GDALRasterBandShadow_GetRasterCategoryNames(GDALRasterBandShadow *self){
    7373          17 :     return GDALGetRasterCategoryNames(self);
    7374             :   }
    7375           0 : SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterCategoryNames(GDALRasterBandShadow *self,char **names){
    7376           0 :     return GDALSetRasterCategoryNames( self, names );
    7377             :   }
    7378          97 : SWIGINTERN void GDALRasterBandShadow_GetMinimum(GDALRasterBandShadow *self,double *val,int *hasval){
    7379         194 :     *val = GDALGetRasterMinimum( self, hasval );
    7380             :   }
    7381          87 : SWIGINTERN void GDALRasterBandShadow_GetMaximum(GDALRasterBandShadow *self,double *val,int *hasval){
    7382         174 :     *val = GDALGetRasterMaximum( self, hasval );
    7383             :   }
    7384         151 : SWIGINTERN void GDALRasterBandShadow_GetOffset(GDALRasterBandShadow *self,double *val,int *hasval){
    7385         302 :     *val = GDALGetRasterOffset( self, hasval );
    7386             :   }
    7387         149 : SWIGINTERN void GDALRasterBandShadow_GetScale(GDALRasterBandShadow *self,double *val,int *hasval){
    7388         298 :     *val = GDALGetRasterScale( self, hasval );
    7389             :   }
    7390          75 : SWIGINTERN CPLErr GDALRasterBandShadow_SetOffset(GDALRasterBandShadow *self,double val){
    7391          75 :     return GDALSetRasterOffset( self, val );
    7392             :   }
    7393          76 : SWIGINTERN CPLErr GDALRasterBandShadow_SetScale(GDALRasterBandShadow *self,double val){
    7394          76 :     return GDALSetRasterScale( self, val );
    7395             :   }
    7396         112 : SWIGINTERN CPLErr GDALRasterBandShadow_GetStatistics(GDALRasterBandShadow *self,int approx_ok,int force,double *min,double *max,double *mean,double *stddev){
    7397         112 :     if (min) *min = 0;
    7398         112 :     if (max) *max = 0;
    7399         112 :     if (mean) *mean = 0;
    7400         112 :     if (stddev) *stddev = -1; /* This is the only way to recognize from Python if GetRasterStatistics() has updated the values */
    7401         112 :     return GDALGetRasterStatistics( self, approx_ok, force,
    7402         112 :             min, max, mean, stddev );
    7403             :   }
    7404         156 : SWIGINTERN CPLErr GDALRasterBandShadow_ComputeStatistics(GDALRasterBandShadow *self,bool approx_ok,double *min,double *max,double *mean,double *stddev,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    7405         156 :     return GDALComputeRasterStatistics( self, approx_ok, min, max, mean, stddev, callback, callback_data );
    7406             :   }
    7407           2 : SWIGINTERN CPLErr GDALRasterBandShadow_SetStatistics(GDALRasterBandShadow *self,double min,double max,double mean,double stddev){
    7408           2 :     return GDALSetRasterStatistics( self, min, max, mean, stddev );
    7409             :   }
    7410         535 : SWIGINTERN int GDALRasterBandShadow_GetOverviewCount(GDALRasterBandShadow *self){
    7411         535 :     return GDALGetOverviewCount(self);
    7412             :   }
    7413        5612 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetOverview(GDALRasterBandShadow *self,int i){
    7414        5612 :     return (GDALRasterBandShadow*) GDALGetOverview( self, i );
    7415             :   }
    7416        2000 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetSampleOverview(GDALRasterBandShadow *self,GUIntBig nDesiredSamples){
    7417        2000 :     return (GDALRasterBandShadow*) GDALGetRasterSampleOverviewEx( self, nDesiredSamples );
    7418             :   }
    7419       38729 : SWIGINTERN int GDALRasterBandShadow_Checksum(GDALRasterBandShadow *self,int xoff=0,int yoff=0,int *xsize=0,int *ysize=0){
    7420       38729 :     int nxsize = (xsize!=0) ? *xsize : GDALGetRasterBandXSize( self );
    7421       38729 :     int nysize = (ysize!=0) ? *ysize : GDALGetRasterBandYSize( self );
    7422       38729 :     return GDALChecksumImage( self, xoff, yoff, nxsize, nysize );
    7423             :   }
    7424        1502 : SWIGINTERN void GDALRasterBandShadow_ComputeRasterMinMax(GDALRasterBandShadow *self,double argout[2],int *isvalid,bool approx_ok=false,bool can_return_none=false){
    7425        1502 :     *isvalid = GDALComputeRasterMinMax( self, approx_ok, argout ) == CE_None;
    7426        1502 :     if( !can_return_none && !*isvalid )
    7427             :     {
    7428           4 :         *isvalid = true;
    7429           4 :         argout[0] = CPLAtof("nan");
    7430           4 :         argout[1] = CPLAtof("nan");
    7431             :     }
    7432        1502 :   }
    7433          18 : SWIGINTERN void GDALRasterBandShadow_ComputeBandStats(GDALRasterBandShadow *self,double argout[2],int samplestep=1){
    7434          18 :     GDALComputeBandStats( self, samplestep, argout+0, argout+1,
    7435             :                           NULL, NULL );
    7436          18 :   }
    7437      268565 : SWIGINTERN CPLErr GDALRasterBandShadow_Fill(GDALRasterBandShadow *self,double real_fill,double imag_fill=0.0){
    7438      268565 :     return GDALFillRaster( self, real_fill, imag_fill );
    7439             :   }
    7440        9108 : 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){
    7441        9108 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    7442        9108 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    7443        9108 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    7444        9108 :                                         : *buf_type;
    7445        9108 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    7446        9108 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    7447        9108 :     GDALRasterIOExtraArg* psExtraArg = NULL;
    7448        9108 :     return WriteRaster_internal( self, xoff, yoff, xsize, ysize,
    7449        9108 :                                  nxsize, nysize, ntype, buf_len, buf_string, pixel_space, line_space, psExtraArg );
    7450             :   }
    7451         391 : SWIGINTERN void GDALRasterBandShadow_FlushCache(GDALRasterBandShadow *self){
    7452         391 :     GDALFlushRasterCache( self );
    7453         391 :   }
    7454         130 : SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetRasterColorTable(GDALRasterBandShadow *self){
    7455         130 :     return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
    7456             :   }
    7457         131 : SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetColorTable(GDALRasterBandShadow *self){
    7458         131 :     return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
    7459             :   }
    7460          46 : SWIGINTERN int GDALRasterBandShadow_SetRasterColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    7461          92 :     return GDALSetRasterColorTable( self, arg );
    7462             :   }
    7463          30 : SWIGINTERN int GDALRasterBandShadow_SetColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    7464          60 :     return GDALSetRasterColorTable( self, arg );
    7465             :   }
    7466          70 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterBandShadow_GetDefaultRAT(GDALRasterBandShadow *self){
    7467          70 :       return (GDALRasterAttributeTableShadow*) GDALGetDefaultRAT(self);
    7468             :   }
    7469          18 : SWIGINTERN int GDALRasterBandShadow_SetDefaultRAT(GDALRasterBandShadow *self,GDALRasterAttributeTableShadow *table){
    7470          36 :       return GDALSetDefaultRAT(self, table);
    7471             :   }
    7472       10828 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetMaskBand(GDALRasterBandShadow *self){
    7473       10828 :       return (GDALRasterBandShadow *) GDALGetMaskBand( self );
    7474             :   }
    7475         456 : SWIGINTERN int GDALRasterBandShadow_GetMaskFlags(GDALRasterBandShadow *self){
    7476         456 :       return GDALGetMaskFlags( self );
    7477             :   }
    7478          33 : SWIGINTERN CPLErr GDALRasterBandShadow_CreateMaskBand(GDALRasterBandShadow *self,int nFlags){
    7479          33 :       return GDALCreateMaskBand( self, nFlags );
    7480             :   }
    7481          37 : SWIGINTERN bool GDALRasterBandShadow_IsMaskBand(GDALRasterBandShadow *self){
    7482          37 :       return GDALIsMaskBand( self );
    7483             :   }
    7484          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){
    7485          26 :     CPLErrorReset();
    7486          26 :     CPLErr err = GDALGetRasterHistogramEx( self, min, max, buckets, panHistogram,
    7487             :                                          include_out_of_range, approx_ok,
    7488             :                                          callback, callback_data );
    7489          26 :     return err;
    7490             :   }
    7491          13 : 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){
    7492          13 :     return GDALGetDefaultHistogramEx( self, min_ret, max_ret, buckets_ret,
    7493             :                                     ppanHistogram, force,
    7494             :                                     callback, callback_data );
    7495             : }
    7496           5 : SWIGINTERN CPLErr GDALRasterBandShadow_SetDefaultHistogram(GDALRasterBandShadow *self,double min,double max,int buckets_in,GUIntBig *panHistogram_in){
    7497           5 :     return GDALSetDefaultHistogramEx( self, min, max,
    7498             :                                     buckets_in, panHistogram_in );
    7499             : }
    7500          17 : SWIGINTERN bool GDALRasterBandShadow_HasArbitraryOverviews(GDALRasterBandShadow *self){
    7501          34 :       return (GDALHasArbitraryOverviews( self ) != 0) ? true : false;
    7502             :   }
    7503          10 : SWIGINTERN char **GDALRasterBandShadow_GetCategoryNames(GDALRasterBandShadow *self){
    7504          10 :     return GDALGetRasterCategoryNames( self );
    7505             :   }
    7506           2 : SWIGINTERN CPLErr GDALRasterBandShadow_SetCategoryNames(GDALRasterBandShadow *self,char **papszCategoryNames){
    7507           2 :     return GDALSetRasterCategoryNames( self, papszCategoryNames );
    7508             :   }
    7509           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){
    7510           1 :         CPLVirtualMem* vmem = GDALRasterBandGetVirtualMem( self,
    7511             :                                          eRWFlag,
    7512             :                                          nXOff, nYOff,
    7513             :                                          nXSize, nYSize,
    7514             :                                          nBufXSize, nBufYSize,
    7515             :                                          eBufType,
    7516             :                                          0,
    7517             :                                          0,
    7518             :                                          nCacheSize,
    7519             :                                          nPageSizeHint,
    7520             :                                          FALSE,
    7521             :                                          options );
    7522           1 :         if( vmem == NULL )
    7523             :             return NULL;
    7524           1 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7525           1 :         vmemshadow->vmem = vmem;
    7526           1 :         vmemshadow->eBufType = eBufType;
    7527           1 :         vmemshadow->bIsBandSequential = TRUE;
    7528           1 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7529           1 :         vmemshadow->nBufXSize = nBufXSize;
    7530           1 :         vmemshadow->nBufYSize = nBufYSize;
    7531           1 :         vmemshadow->nBandCount = 1;
    7532           1 :         return vmemshadow;
    7533             :     }
    7534          21 : SWIGINTERN CPLVirtualMemShadow *GDALRasterBandShadow_GetVirtualMemAuto(GDALRasterBandShadow *self,GDALRWFlag eRWFlag,char **options=NULL){
    7535          21 :         int            nPixelSpace;
    7536          21 :         GIntBig        nLineSpace;
    7537          21 :         CPLVirtualMem* vmem = GDALGetVirtualMemAuto( self,
    7538             :                                          eRWFlag,
    7539             :                                          &nPixelSpace,
    7540             :                                          &nLineSpace,
    7541             :                                          options );
    7542          21 :         if( vmem == NULL )
    7543             :             return NULL;
    7544          20 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7545          20 :         vmemshadow->vmem = vmem;
    7546          20 :         vmemshadow->eBufType = GDALGetRasterDataType( self );
    7547          20 :         vmemshadow->bAuto = TRUE;
    7548          20 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7549          20 :         vmemshadow->nBandCount = 1;
    7550          20 :         vmemshadow->nPixelSpace = nPixelSpace;
    7551          20 :         vmemshadow->nLineSpace = nLineSpace;
    7552          20 :         vmemshadow->nBufXSize = GDALGetRasterBandXSize(self);
    7553          20 :         vmemshadow->nBufYSize = GDALGetRasterBandYSize(self);
    7554          20 :         return vmemshadow;
    7555             :     }
    7556           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){
    7557           1 :         CPLVirtualMem* vmem = GDALRasterBandGetTiledVirtualMem( self,
    7558             :                                          eRWFlag,
    7559             :                                          nXOff, nYOff,
    7560             :                                          nXSize, nYSize,
    7561             :                                          nTileXSize, nTileYSize,
    7562             :                                          eBufType,
    7563             :                                          nCacheSize,
    7564             :                                          FALSE,
    7565             :                                          options );
    7566           1 :         if( vmem == NULL )
    7567             :             return NULL;
    7568           1 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7569           1 :         vmemshadow->vmem = vmem;
    7570           1 :         vmemshadow->eBufType = eBufType;
    7571           1 :         vmemshadow->bIsBandSequential = -1;
    7572           1 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7573           1 :         vmemshadow->nBufXSize = nXSize;
    7574           1 :         vmemshadow->nBufYSize = nYSize;
    7575           1 :         vmemshadow->eTileOrganization = GTO_BSQ;
    7576           1 :         vmemshadow->nTileXSize = nTileXSize;
    7577           1 :         vmemshadow->nTileYSize = nTileYSize;
    7578           1 :         vmemshadow->nBandCount = 1;
    7579           1 :         return vmemshadow;
    7580             :     }
    7581          26 : SWIGINTERN int GDALRasterBandShadow_GetDataCoverageStatus(GDALRasterBandShadow *self,int nXOff,int nYOff,int nXSize,int nYSize,int nMaskFlagStop=0,double *pdfDataPct=NULL){
    7582          26 :         return GDALGetDataCoverageStatus(self, nXOff, nYOff,
    7583             :                                          nXSize, nYSize,
    7584             :                                          nMaskFlagStop,
    7585             :                                          pdfDataPct);
    7586             :     }
    7587           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){
    7588           2 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    7589           2 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    7590           2 :     GDALDataType ntype;
    7591           2 :     if ( buf_type != 0 ) {
    7592           0 :       ntype = (GDALDataType) *buf_type;
    7593             :     } else {
    7594           2 :       ntype = GDALGetRasterDataType( self );
    7595             :     }
    7596           2 :     return GDALRasterAdviseRead(self, xoff, yoff, xsize, ysize,
    7597           2 :                                 nxsize, nysize, ntype, options);
    7598             : }
    7599          69 : SWIGINTERN CPLErr GDALRasterBandShadow_InterpolateAtPoint(GDALRasterBandShadow *self,double pixel,double line,GDALRIOResampleAlg interpolation,double *pdfRealValue,double *pdfImagValue){
    7600          69 :     if (pdfRealValue) *pdfRealValue = 0;
    7601          69 :     if (pdfImagValue) *pdfImagValue = 0;
    7602          69 :     return GDALRasterInterpolateAtPoint( self, pixel, line, interpolation, pdfRealValue, pdfImagValue );
    7603             :   }
    7604          15 : SWIGINTERN CPLErr GDALRasterBandShadow_InterpolateAtGeolocation(GDALRasterBandShadow *self,double geolocX,double geolocY,OSRSpatialReferenceShadow *srs,GDALRIOResampleAlg interpolation,double *pdfRealValue,double *pdfImagValue,char **transformerOptions=NULL){
    7605          15 :     if (pdfRealValue) *pdfRealValue = 0;
    7606          15 :     if (pdfImagValue) *pdfImagValue = 0;
    7607          15 :     return GDALRasterInterpolateAtGeolocation( self, geolocX, geolocY,
    7608             :                 (OGRSpatialReferenceH)srs, interpolation,
    7609             :                 pdfRealValue, pdfImagValue, transformerOptions );
    7610             :   }
    7611           2 : SWIGINTERN CPLErr GDALRasterBandShadow_ComputeMinMaxLocation(GDALRasterBandShadow *self,double *pdfMin,double *pdfMax,int *pnMinX,int *pnMinY,int *pnMaxX,int *pnMaxY){
    7612           2 :     return GDALComputeRasterMinMaxLocation( self, pdfMin, pdfMax,
    7613             :                                             pnMinX, pnMinY,
    7614             :                                             pnMaxX, pnMaxY );
    7615             :   }
    7616          21 : SWIGINTERN GDALMDArrayHS *GDALRasterBandShadow_AsMDArray(GDALRasterBandShadow *self){
    7617          21 :     return GDALRasterBandAsMDArray(self);
    7618             :   }
    7619        4884 : SWIGINTERN void GDALRasterBandShadow__EnablePixelTypeSignedByteWarning(GDALRasterBandShadow *self,bool b){
    7620        4884 :       GDALEnablePixelTypeSignedByteWarning(self, b);
    7621        4884 :   }
    7622           6 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_UnaryOp(GDALRasterBandShadow *self,GDALRasterAlgebraUnaryOperation op){
    7623           6 :       return GDALRasterBandUnaryOp(self, op);
    7624             :   }
    7625          57 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_BinaryOpBand(GDALRasterBandShadow *self,GDALRasterAlgebraBinaryOperation op,GDALRasterBandShadow *other){
    7626          57 :       return GDALRasterBandBinaryOpBand(self, op, other);
    7627             :   }
    7628          59 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_BinaryOpDouble(GDALRasterBandShadow *self,GDALRasterAlgebraBinaryOperation op,double constant){
    7629          59 :       return GDALRasterBandBinaryOpDouble(self, op, constant);
    7630             :   }
    7631          18 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_BinaryOpDoubleToBand(double constant,GDALRasterAlgebraBinaryOperation op,GDALRasterBandShadow *band){
    7632          18 :       return GDALRasterBandBinaryOpDoubleToBand(constant, op, band);
    7633             :   }
    7634          12 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_IfThenElse(GDALRasterBandShadow *condBand,GDALRasterBandShadow *thenBand,GDALRasterBandShadow *elseBand){
    7635          12 :       return GDALRasterBandIfThenElse(condBand, thenBand, elseBand);
    7636             :   }
    7637          16 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_AsType(GDALRasterBandShadow *self,GDALDataType dt){
    7638          16 :       return GDALRasterBandAsDataType(self, dt);
    7639             :   }
    7640           4 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MaximumOfNBands(int band_count,GDALRasterBandShadow **bands){
    7641           4 :      return GDALMaximumOfNBands(band_count, bands);
    7642             :   }
    7643           2 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MaxConstant(GDALRasterBandShadow *self,double constant){
    7644           2 :       return GDALRasterBandMaxConstant(self, constant);
    7645             :   }
    7646           4 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MinimumOfNBands(int band_count,GDALRasterBandShadow **bands){
    7647           4 :      return GDALMinimumOfNBands(band_count, bands);
    7648             :   }
    7649           2 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MinConstant(GDALRasterBandShadow *self,double constant){
    7650           2 :       return GDALRasterBandMinConstant(self, constant);
    7651             :   }
    7652           3 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MeanOfNBands(int band_count,GDALRasterBandShadow **bands){
    7653           3 :      return GDALMeanOfNBands(band_count, bands);
    7654             :   }
    7655       10236 : 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){
    7656             : 
    7657       10236 :     *buf = NULL;
    7658             : 
    7659       10236 :     int nxsize = (buf_xsize==0) ? static_cast<int>(xsize) : *buf_xsize;
    7660       10236 :     int nysize = (buf_ysize==0) ? static_cast<int>(ysize) : *buf_ysize;
    7661       10236 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    7662       10236 :                                         : *buf_type;
    7663       10236 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    7664       10236 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    7665             : 
    7666       10236 :     size_t buf_size = static_cast<size_t>(
    7667       10236 :         ComputeBandRasterIOSize( nxsize, nysize,
    7668             :                                  GDALGetDataTypeSizeBytes( ntype ),
    7669       10236 :                                  pixel_space, line_space, FALSE ) );
    7670       10236 :     if (buf_size == 0)
    7671             :     {
    7672             :         return CE_Failure;
    7673             :     }
    7674             : 
    7675       10234 :     char *data;
    7676       10234 :     Py_buffer view;
    7677       14502 :     if( !readraster_acquirebuffer(buf, inputOutputBuf, buf_size, ntype,
    7678             :                                   GetUseExceptions(), data, view) )
    7679             :     {
    7680             :         return CE_Failure;
    7681             :     }
    7682             : 
    7683             :     /* Should we clear the buffer in case there are hole in it ? */
    7684       10221 :     if( inputOutputBuf == NULL &&
    7685       10209 :         line_space != 0 && pixel_space != 0 && line_space > pixel_space * nxsize )
    7686             :     {
    7687           4 :         memset(data, 0, buf_size);
    7688             :     }
    7689             : 
    7690       10221 :     GDALRasterIOExtraArg sExtraArg;
    7691       10221 :     INIT_RASTERIO_EXTRA_ARG(sExtraArg);
    7692       10221 :     sExtraArg.eResampleAlg = resample_alg;
    7693       10221 :     sExtraArg.pfnProgress = callback;
    7694       10221 :     sExtraArg.pProgressData = callback_data;
    7695       10221 :     int nXOff = (int)(xoff + 0.5);
    7696       10221 :     int nYOff = (int)(yoff + 0.5);
    7697       10221 :     int nXSize = (int)(xsize + 0.5);
    7698       10221 :     int nYSize = (int)(ysize + 0.5);
    7699       10221 :     if( fabs(xoff-nXOff) > 1e-8 || fabs(yoff-nYOff) > 1e-8 ||
    7700       10215 :         fabs(xsize-nXSize) > 1e-8 || fabs(ysize-nYSize) > 1e-8 )
    7701             :     {
    7702           8 :         sExtraArg.bFloatingPointWindowValidity = TRUE;
    7703           8 :         sExtraArg.dfXOff = xoff;
    7704           8 :         sExtraArg.dfYOff = yoff;
    7705           8 :         sExtraArg.dfXSize = xsize;
    7706           8 :         sExtraArg.dfYSize = ysize;
    7707             :     }
    7708             : 
    7709       10221 :     CPLErr eErr = GDALRasterIOEx( self, GF_Read, nXOff, nYOff, nXSize, nYSize,
    7710             :                          data, nxsize, nysize, ntype,
    7711             :                          pixel_space, line_space, &sExtraArg );
    7712             : 
    7713       10221 :     readraster_releasebuffer(eErr, buf, inputOutputBuf, view);
    7714             : 
    7715             :     return eErr;
    7716             :   }
    7717          90 : SWIGINTERN CPLErr GDALRasterBandShadow_ReadBlock(GDALRasterBandShadow *self,int xoff,int yoff,void **buf,void *buf_obj=NULL){
    7718             : 
    7719          90 :     int nBlockXSize, nBlockYSize;
    7720          90 :     GDALGetBlockSize(self, &nBlockXSize, &nBlockYSize);
    7721          90 :     GDALDataType ntype = GDALGetRasterDataType(self);
    7722          90 :     int nDataTypeSize = GDALGetDataTypeSizeBytes(ntype);
    7723          90 :     size_t buf_size = static_cast<size_t>(nBlockXSize) *
    7724          90 :                                                 nBlockYSize * nDataTypeSize;
    7725             : 
    7726          90 :     *buf = NULL;
    7727             : 
    7728          90 :     char *data;
    7729          90 :     Py_buffer view;
    7730             : 
    7731         124 :     if( !readraster_acquirebuffer(buf, buf_obj, buf_size, ntype,
    7732             :                                   GetUseExceptions(), data, view) )
    7733             :     {
    7734             :         return CE_Failure;
    7735             :     }
    7736             : 
    7737          77 :     CPLErr eErr = GDALReadBlock( self, xoff, yoff, data);
    7738             : 
    7739          77 :     readraster_releasebuffer(eErr, buf, buf_obj, view);
    7740             : 
    7741             :     return eErr;
    7742             :   }
    7743             : 
    7744      849590 : GDALDataType GDALRasterBandShadow_DataType_get( GDALRasterBandShadow *h ) {
    7745      849590 :   return GDALGetRasterDataType( h );
    7746             : }
    7747       17974 : int GDALRasterBandShadow_XSize_get( GDALRasterBandShadow *h ) {
    7748       17974 :   return GDALGetRasterBandXSize( h );
    7749             : }
    7750       16835 : int GDALRasterBandShadow_YSize_get( GDALRasterBandShadow *h ) {
    7751       16835 :   return GDALGetRasterBandYSize( h );
    7752             : }
    7753             : 
    7754         163 : SWIGINTERN void delete_GDALComputedRasterBandShadow(GDALComputedRasterBandShadow *self){
    7755         163 :       GDALComputedRasterBandRelease(self);
    7756         163 :   }
    7757          56 : SWIGINTERN GDALColorTableShadow *new_GDALColorTableShadow(GDALPaletteInterp palette=GPI_RGB){
    7758          56 :         return (GDALColorTableShadow*) GDALCreateColorTable(palette);
    7759             :     }
    7760          68 : SWIGINTERN void delete_GDALColorTableShadow(GDALColorTableShadow *self){
    7761          68 :         GDALDestroyColorTable(self);
    7762          68 :     }
    7763          12 : SWIGINTERN GDALColorTableShadow *GDALColorTableShadow_Clone(GDALColorTableShadow *self){
    7764          12 :         return (GDALColorTableShadow*) GDALCloneColorTable (self);
    7765             :     }
    7766           2 : SWIGINTERN GDALPaletteInterp GDALColorTableShadow_GetPaletteInterpretation(GDALColorTableShadow *self){
    7767           2 :         return GDALGetPaletteInterpretation(self);
    7768             :     }
    7769          73 : SWIGINTERN int GDALColorTableShadow_GetColorEntryCount(GDALColorTableShadow *self){
    7770          73 :         return GDALGetColorEntryCount(self);
    7771             :     }
    7772        4719 : SWIGINTERN GDALColorEntry *GDALColorTableShadow_GetColorEntry(GDALColorTableShadow *self,int entry){
    7773        4719 :         return (GDALColorEntry*) GDALGetColorEntry(self, entry);
    7774             :     }
    7775           0 : SWIGINTERN int GDALColorTableShadow_GetColorEntryAsRGB(GDALColorTableShadow *self,int entry,GDALColorEntry *centry){
    7776           0 :         return GDALGetColorEntryAsRGB(self, entry, centry);
    7777             :     }
    7778        1379 : SWIGINTERN void GDALColorTableShadow_SetColorEntry(GDALColorTableShadow *self,int entry,GDALColorEntry const *centry){
    7779        1379 :         GDALSetColorEntry(self, entry, centry);
    7780        1379 :     }
    7781           1 : SWIGINTERN void GDALColorTableShadow_CreateColorRamp(GDALColorTableShadow *self,int nStartIndex,GDALColorEntry const *startcolor,int nEndIndex,GDALColorEntry const *endcolor){
    7782           1 :         GDALCreateColorRamp(self, nStartIndex, startcolor, nEndIndex, endcolor);
    7783           1 :     }
    7784             : 
    7785             : #include "gdalsubdatasetinfo.h"
    7786             : 
    7787          60 : SWIGINTERN void delete_GDALSubdatasetInfoShadow(GDALSubdatasetInfoShadow *self){
    7788          60 :             GDALDestroySubdatasetInfo(reinterpret_cast<GDALSubdatasetInfoH>(self));
    7789          60 :         }
    7790          35 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_GetPathComponent(GDALSubdatasetInfoShadow *self){
    7791          35 :             return GDALSubdatasetInfoGetPathComponent(reinterpret_cast<GDALSubdatasetInfoH>(self) );
    7792             :         }
    7793          39 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_GetSubdatasetComponent(GDALSubdatasetInfoShadow *self){
    7794          39 :         return GDALSubdatasetInfoGetSubdatasetComponent(reinterpret_cast<GDALSubdatasetInfoH>(self) );
    7795             :         }
    7796          21 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_ModifyPathComponent(GDALSubdatasetInfoShadow *self,char const *pszNewFileName){
    7797          21 :         return GDALSubdatasetInfoModifyPathComponent(reinterpret_cast<GDALSubdatasetInfoH>(self), pszNewFileName );
    7798             :         }
    7799             : 
    7800          83 : GDALSubdatasetInfoShadow* GetSubdatasetInfo(const char *pszFileName)
    7801             : {
    7802          83 :     GDALSubdatasetInfoH info { GDALGetSubdatasetInfo(pszFileName) };
    7803             : 
    7804          83 :     if( ! info )
    7805             :     {
    7806          23 :       return nullptr;
    7807             :     }
    7808             : 
    7809             :     return (GDALSubdatasetInfoShadow*)( info );
    7810             : };
    7811             : 
    7812          29 : SWIGINTERN GDALRelationshipShadow *new_GDALRelationshipShadow(char const *name,char const *leftTableName,char const *rightTableName,GDALRelationshipCardinality cardinality){
    7813          29 :         return (GDALRelationshipShadow*)
    7814          29 :         GDALRelationshipCreate(name,
    7815             :                                leftTableName,
    7816             :                                rightTableName,
    7817             :                                cardinality);
    7818             :     }
    7819          29 : SWIGINTERN void delete_GDALRelationshipShadow(GDALRelationshipShadow *self){
    7820          29 :         GDALDestroyRelationship(self);
    7821          29 :     }
    7822          31 : SWIGINTERN char const *GDALRelationshipShadow_GetName(GDALRelationshipShadow *self){
    7823          31 :         return GDALRelationshipGetName( self );
    7824             :     }
    7825          47 : SWIGINTERN GDALRelationshipCardinality GDALRelationshipShadow_GetCardinality(GDALRelationshipShadow *self){
    7826          47 :         return GDALRelationshipGetCardinality( self );
    7827             :     }
    7828          49 : SWIGINTERN char const *GDALRelationshipShadow_GetLeftTableName(GDALRelationshipShadow *self){
    7829          49 :         return GDALRelationshipGetLeftTableName( self );
    7830             :     }
    7831          49 : SWIGINTERN char const *GDALRelationshipShadow_GetRightTableName(GDALRelationshipShadow *self){
    7832          49 :         return GDALRelationshipGetRightTableName( self );
    7833             :     }
    7834          34 : SWIGINTERN char const *GDALRelationshipShadow_GetMappingTableName(GDALRelationshipShadow *self){
    7835          34 :         return GDALRelationshipGetMappingTableName( self );
    7836             :     }
    7837          14 : SWIGINTERN void GDALRelationshipShadow_SetMappingTableName(GDALRelationshipShadow *self,char const *pszName){
    7838          14 :         GDALRelationshipSetMappingTableName( self, pszName );
    7839          14 :     }
    7840          48 : SWIGINTERN char **GDALRelationshipShadow_GetLeftTableFields(GDALRelationshipShadow *self){
    7841          48 :            return GDALRelationshipGetLeftTableFields(self);
    7842             :         }
    7843          48 : SWIGINTERN char **GDALRelationshipShadow_GetRightTableFields(GDALRelationshipShadow *self){
    7844          48 :             return GDALRelationshipGetRightTableFields(self);
    7845             :         }
    7846          37 : SWIGINTERN void GDALRelationshipShadow_SetLeftTableFields(GDALRelationshipShadow *self,char **pFields){
    7847          37 :             GDALRelationshipSetLeftTableFields(self, pFields);
    7848          37 :         }
    7849          38 : SWIGINTERN void GDALRelationshipShadow_SetRightTableFields(GDALRelationshipShadow *self,char **pFields){
    7850          38 :             GDALRelationshipSetRightTableFields(self, pFields);
    7851          38 :         }
    7852          23 : SWIGINTERN char **GDALRelationshipShadow_GetLeftMappingTableFields(GDALRelationshipShadow *self){
    7853          23 :             return GDALRelationshipGetLeftMappingTableFields(self);
    7854             :         }
    7855          23 : SWIGINTERN char **GDALRelationshipShadow_GetRightMappingTableFields(GDALRelationshipShadow *self){
    7856          23 :             return GDALRelationshipGetRightMappingTableFields(self);
    7857             :         }
    7858           9 : SWIGINTERN void GDALRelationshipShadow_SetLeftMappingTableFields(GDALRelationshipShadow *self,char **pFields){
    7859           9 :           GDALRelationshipSetLeftMappingTableFields(self, pFields);
    7860           9 :       }
    7861           9 : SWIGINTERN void GDALRelationshipShadow_SetRightMappingTableFields(GDALRelationshipShadow *self,char **pFields){
    7862           9 :           GDALRelationshipSetRightMappingTableFields(self, pFields);
    7863           9 :       }
    7864          47 : SWIGINTERN GDALRelationshipType GDALRelationshipShadow_GetType(GDALRelationshipShadow *self){
    7865          47 :         return GDALRelationshipGetType( self );
    7866             :     }
    7867          10 : SWIGINTERN void GDALRelationshipShadow_SetType(GDALRelationshipShadow *self,GDALRelationshipType type){
    7868          10 :       return GDALRelationshipSetType( self, type );
    7869             :     }
    7870          14 : SWIGINTERN char const *GDALRelationshipShadow_GetForwardPathLabel(GDALRelationshipShadow *self){
    7871          14 :         return GDALRelationshipGetForwardPathLabel( self );
    7872             :     }
    7873           9 : SWIGINTERN void GDALRelationshipShadow_SetForwardPathLabel(GDALRelationshipShadow *self,char const *pszLabel){
    7874           9 :         GDALRelationshipSetForwardPathLabel( self, pszLabel );
    7875           9 :     }
    7876          14 : SWIGINTERN char const *GDALRelationshipShadow_GetBackwardPathLabel(GDALRelationshipShadow *self){
    7877          14 :         return GDALRelationshipGetBackwardPathLabel( self );
    7878             :     }
    7879           9 : SWIGINTERN void GDALRelationshipShadow_SetBackwardPathLabel(GDALRelationshipShadow *self,char const *pszLabel){
    7880           9 :         GDALRelationshipSetBackwardPathLabel( self, pszLabel );
    7881           9 :     }
    7882          44 : SWIGINTERN char const *GDALRelationshipShadow_GetRelatedTableType(GDALRelationshipShadow *self){
    7883          44 :         return GDALRelationshipGetRelatedTableType( self );
    7884             :     }
    7885          20 : SWIGINTERN void GDALRelationshipShadow_SetRelatedTableType(GDALRelationshipShadow *self,char const *pszType){
    7886          20 :         GDALRelationshipSetRelatedTableType( self, pszType );
    7887          20 :     }
    7888             : 
    7889             : #include "gdalgrid.h"
    7890             : 
    7891             : #ifdef DEBUG
    7892             : typedef struct OGRLayerHS OGRLayerShadow;
    7893             : typedef struct OGRGeometryHS OGRGeometryShadow;
    7894             : #else
    7895             : typedef void OGRLayerShadow;
    7896             : typedef void OGRGeometryShadow;
    7897             : #endif
    7898             : 
    7899             : 
    7900             : static int
    7901        3713 : GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) {
    7902        3713 :   return GDALTermProgress( dfProgress, pszMessage, pData);
    7903             : }
    7904             : 
    7905             : 
    7906           4 : int  ComputeMedianCutPCT ( GDALRasterBandShadow *red,
    7907             :                               GDALRasterBandShadow *green,
    7908             :                               GDALRasterBandShadow *blue,
    7909             :                               int num_colors,
    7910             :                               GDALColorTableShadow* colors,
    7911             :                               GDALProgressFunc callback = NULL,
    7912             :                               void* callback_data=NULL) {
    7913             : 
    7914           4 :     CPLErrorReset();
    7915             : 
    7916           4 :     int err = GDALComputeMedianCutPCT( red,
    7917             :                                           green,
    7918             :                                           blue,
    7919             :                                           NULL,
    7920             :                                           num_colors,
    7921             :                                           colors,
    7922             :                                           callback,
    7923             :                                           callback_data);
    7924             : 
    7925           4 :     return err;
    7926             : }
    7927             : 
    7928             : 
    7929           7 : int  DitherRGB2PCT ( GDALRasterBandShadow *red,
    7930             :                      GDALRasterBandShadow *green,
    7931             :                      GDALRasterBandShadow *blue,
    7932             :                      GDALRasterBandShadow *target,
    7933             :                      GDALColorTableShadow *colors,
    7934             :                      GDALProgressFunc callback = NULL,
    7935             :                      void* callback_data=NULL) {
    7936             : 
    7937           7 :     CPLErrorReset();
    7938           7 :     int err;
    7939           7 :     err = GDALDitherRGB2PCT(  red,
    7940             :                                   green,
    7941             :                                   blue,
    7942             :                                   target,
    7943             :                                   colors,
    7944             :                                   callback,
    7945             :                                   callback_data);
    7946             : 
    7947           7 :     return err;
    7948             : }
    7949             : 
    7950             : 
    7951          62 : CPLErr  ReprojectImage ( GDALDatasetShadow *src_ds,
    7952             :                          GDALDatasetShadow *dst_ds,
    7953             :                          const char *src_wkt=NULL,
    7954             :                          const char *dst_wkt=NULL,
    7955             :                          GDALResampleAlg eResampleAlg=GRA_NearestNeighbour,
    7956             :                          double WarpMemoryLimit=0.0,
    7957             :                          double maxerror = 0.0,
    7958             :        GDALProgressFunc callback = NULL,
    7959             :                        void* callback_data=NULL,
    7960             :                          char** options = NULL ) {
    7961             : 
    7962          62 :     CPLErrorReset();
    7963             : 
    7964          62 :     GDALWarpOptions* psOptions = NULL;
    7965          62 :     if( options != NULL )
    7966             :     {
    7967           1 :         psOptions = GDALCreateWarpOptions();
    7968           1 :         psOptions->papszWarpOptions = CSLDuplicate(options);
    7969             :     }
    7970             : 
    7971          62 :     CPLErr err = GDALReprojectImage( src_ds,
    7972             :                                      src_wkt,
    7973             :                                      dst_ds,
    7974             :                                      dst_wkt,
    7975             :                                      eResampleAlg,
    7976             :                                      WarpMemoryLimit,
    7977             :                                      maxerror,
    7978             :                                      callback,
    7979             :                                      callback_data,
    7980             :                                      psOptions);
    7981             : 
    7982          62 :     if( psOptions != NULL )
    7983           1 :         GDALDestroyWarpOptions(psOptions);
    7984             : 
    7985          62 :     return err;
    7986             : }
    7987             : 
    7988             : 
    7989           6 : int  ComputeProximity( GDALRasterBandShadow *srcBand,
    7990             :                        GDALRasterBandShadow *proximityBand,
    7991             :                        char **options = NULL,
    7992             :                        GDALProgressFunc callback=NULL,
    7993             :                        void* callback_data=NULL) {
    7994             : 
    7995           6 :     CPLErrorReset();
    7996             : 
    7997           6 :     return GDALComputeProximity( srcBand, proximityBand, options,
    7998           6 :                                  callback, callback_data );
    7999             : }
    8000             : 
    8001             : 
    8002          42 : int  RasterizeLayer( GDALDatasetShadow *dataset,
    8003             :                  int bands, int *band_list,
    8004             :                  OGRLayerShadow *layer,
    8005             :                  void *pfnTransformer = NULL,
    8006             :                  void *pTransformArg = NULL,
    8007             :      int burn_values = 0, double *burn_values_list = NULL,
    8008             :                  char **options = NULL,
    8009             :                  GDALProgressFunc callback=NULL,
    8010             :                  void* callback_data=NULL) {
    8011             : 
    8012          42 :     CPLErr eErr;
    8013             : 
    8014          42 :     CPLErrorReset();
    8015             : 
    8016          42 :     if( burn_values == 0 )
    8017             :     {
    8018           1 :         burn_values_list = (double *) CPLMalloc(sizeof(double)*bands);
    8019           4 :         for( int i = 0; i < bands; i++ )
    8020           3 :             burn_values_list[i] = 255.0;
    8021             :     }
    8022          41 :     else if( burn_values != bands )
    8023             :     {
    8024           0 :         CPLError( CE_Failure, CPLE_AppDefined,
    8025             :                   "Did not get the expected number of burn values in RasterizeLayer()" );
    8026           0 :         return CE_Failure;
    8027             :     }
    8028             : 
    8029          42 :     OGRLayerH hLayer = (OGRLayerH)layer;
    8030          42 :     eErr = GDALRasterizeLayers( dataset, bands, band_list,
    8031             :                                 1, &hLayer,
    8032             :                                 (GDALTransformerFunc) pfnTransformer,
    8033             :                                 pTransformArg,
    8034             :                                 burn_values_list, options,
    8035             :                                 callback, callback_data );
    8036             : 
    8037          42 :     if( burn_values == 0 )
    8038           1 :         CPLFree( burn_values_list );
    8039             : 
    8040          42 :     return eErr;
    8041             : }
    8042             : 
    8043             : 
    8044          21 : int  Polygonize( GDALRasterBandShadow *srcBand,
    8045             :          GDALRasterBandShadow *maskBand,
    8046             :              OGRLayerShadow *outLayer,
    8047             :                  int iPixValField,
    8048             :                  char **options = NULL,
    8049             :                  GDALProgressFunc callback=NULL,
    8050             :                  void* callback_data=NULL) {
    8051             : 
    8052          21 :     CPLErrorReset();
    8053             : 
    8054          21 :     return GDALPolygonize( srcBand, maskBand, outLayer, iPixValField,
    8055          21 :                            options, callback, callback_data );
    8056             : }
    8057             : 
    8058             : 
    8059           1 : int  FPolygonize( GDALRasterBandShadow *srcBand,
    8060             :                  GDALRasterBandShadow *maskBand,
    8061             :                  OGRLayerShadow *outLayer,
    8062             :                  int iPixValField,
    8063             :                  char **options = NULL,
    8064             :                  GDALProgressFunc callback=NULL,
    8065             :                  void* callback_data=NULL) {
    8066             : 
    8067           1 :     CPLErrorReset();
    8068             : 
    8069           1 :     return GDALFPolygonize( srcBand, maskBand, outLayer, iPixValField,
    8070           1 :                            options, callback, callback_data );
    8071             : }
    8072             : 
    8073             : 
    8074          29 : int  FillNodata( GDALRasterBandShadow *targetBand,
    8075             :          GDALRasterBandShadow *maskBand,
    8076             :                  double maxSearchDist,
    8077             :                  int smoothingIterations,
    8078             :                  char **options = NULL,
    8079             :                  GDALProgressFunc callback=NULL,
    8080             :                  void* callback_data=NULL) {
    8081             : 
    8082          29 :     CPLErrorReset();
    8083             : 
    8084          29 :     return GDALFillNodata( targetBand, maskBand, maxSearchDist,
    8085             :                0, smoothingIterations, options,
    8086          29 :          callback, callback_data );
    8087             : }
    8088             : 
    8089             : 
    8090          12 : int  SieveFilter( GDALRasterBandShadow *srcBand,
    8091             :           GDALRasterBandShadow *maskBand,
    8092             :               GDALRasterBandShadow *dstBand,
    8093             :                   int threshold, int connectedness=4,
    8094             :                   char **options = NULL,
    8095             :                   GDALProgressFunc callback=NULL,
    8096             :                   void* callback_data=NULL) {
    8097             : 
    8098          12 :     CPLErrorReset();
    8099             : 
    8100          12 :     return GDALSieveFilter( srcBand, maskBand, dstBand,
    8101             :                             threshold, connectedness,
    8102          12 :                             options, callback, callback_data );
    8103             : }
    8104             : 
    8105             : 
    8106           2 : int  RegenerateOverviews( GDALRasterBandShadow *srcBand,
    8107             :             int overviewBandCount,
    8108             :                           GDALRasterBandShadow **overviewBands,
    8109             :                           const char *resampling = "average",
    8110             :                           GDALProgressFunc callback=NULL,
    8111             :                           void* callback_data=NULL) {
    8112             : 
    8113           2 :     CPLErrorReset();
    8114             : 
    8115           2 :     return GDALRegenerateOverviews( srcBand, overviewBandCount, overviewBands,
    8116           2 :                   resampling ? resampling : "average", callback, callback_data );
    8117             : }
    8118             : 
    8119             : 
    8120         248 : int  RegenerateOverview( GDALRasterBandShadow *srcBand,
    8121             :                           GDALRasterBandShadow *overviewBand,
    8122             :                           const char *resampling = "average",
    8123             :                           GDALProgressFunc callback=NULL,
    8124             :                           void* callback_data=NULL) {
    8125             : 
    8126         248 :     CPLErrorReset();
    8127             : 
    8128         248 :     return GDALRegenerateOverviews( srcBand, 1, &overviewBand,
    8129         248 :                   resampling ? resampling : "average", callback, callback_data );
    8130             : }
    8131             : 
    8132             : 
    8133           3 : int ContourGenerate( GDALRasterBandShadow *srcBand,
    8134             :                      double contourInterval,
    8135             :                      double contourBase,
    8136             :                      int fixedLevelCount,
    8137             :                      double *fixedLevels,
    8138             :                      int useNoData,
    8139             :                      double noDataValue,
    8140             :                      OGRLayerShadow* dstLayer,
    8141             :                      int idField,
    8142             :                      int elevField,
    8143             :                      GDALProgressFunc callback = NULL,
    8144             :                      void* callback_data = NULL)
    8145             : {
    8146           3 :     CPLErr eErr;
    8147             : 
    8148           3 :     CPLErrorReset();
    8149             : 
    8150           3 :     eErr =  GDALContourGenerate( srcBand,
    8151             :                                  contourInterval,
    8152             :                                  contourBase,
    8153             :                                  fixedLevelCount,
    8154             :                                  fixedLevels,
    8155             :                                  useNoData,
    8156             :                                  noDataValue,
    8157             :                                  dstLayer,
    8158             :                                  idField,
    8159             :                                  elevField,
    8160             :                                  callback,
    8161             :                                  callback_data);
    8162             : 
    8163           3 :     return eErr;
    8164             : }
    8165             : 
    8166             : 
    8167          25 : int ContourGenerateEx( GDALRasterBandShadow *srcBand,
    8168             :                        OGRLayerShadow* dstLayer,
    8169             :                        char** options = NULL,
    8170             :                        GDALProgressFunc callback = NULL,
    8171             :                        void* callback_data = NULL )
    8172             : {
    8173          25 :     CPLErr eErr;
    8174             : 
    8175          25 :     CPLErrorReset();
    8176             : 
    8177          25 :     eErr =  GDALContourGenerateEx( srcBand,
    8178             :                                    dstLayer,
    8179             :                                    options,
    8180             :                                    callback,
    8181             :                                    callback_data);
    8182             : 
    8183          25 :     return eErr;
    8184             : }
    8185             : 
    8186             : 
    8187           0 : GDALDatasetShadow *ViewshedGenerate( GDALRasterBandShadow *srcBand,
    8188             :                         const char* driverName,
    8189             :                         const char* targetRasterName,
    8190             :                         char** creationOptions,
    8191             :                         double observerX, double observerY, double observerHeight,
    8192             :                         double targetHeight, double visibleVal, double invisibleVal,
    8193             :                         double outOfRangeVal,  double noDataVal, double dfCurvCoeff,
    8194             :                         GDALViewshedMode mode, double maxDistance,
    8195             :                         GDALProgressFunc callback = NULL, void* callback_data = NULL,
    8196             :                         GDALViewshedOutputType heightMode = GVOT_NORMAL,
    8197             :                         char** options = NULL)
    8198             : {
    8199           0 :     GDALDatasetShadow* ds = GDALViewshedGenerate( srcBand,
    8200             :                                  driverName,
    8201             :                                  targetRasterName,
    8202             :                                  creationOptions,
    8203             :                                  observerX,
    8204             :                                  observerY,
    8205             :                                  observerHeight,
    8206             :                                  targetHeight,
    8207             :                                  visibleVal,
    8208             :                                  invisibleVal,
    8209             :                                  outOfRangeVal,
    8210             :                                  noDataVal,
    8211             :                                  dfCurvCoeff,
    8212             :                                  mode,
    8213             :                                  maxDistance,
    8214             :                                  callback,
    8215             :                                  callback_data,
    8216             :                                  heightMode,
    8217             :                                  options);
    8218           0 :   if (ds == 0) {
    8219             :     /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
    8220             :   }
    8221           0 :   return ds;
    8222             : }
    8223             : 
    8224             : 
    8225           5 : void IsLineOfSightVisible(GDALRasterBandShadow *band,
    8226             :                           int xA, int yA, double zA,
    8227             :                           int xB, int yB, double zB,
    8228             :                           bool *pbVisible, int *pnXIntersection, int *pnYIntersection,
    8229             :                           char** options = NULL)
    8230             : {
    8231           5 :     *pbVisible = GDALIsLineOfSightVisible(band, xA, yA, zA, xB, yB, zB, pnXIntersection, pnYIntersection, options);
    8232           5 : }
    8233             : 
    8234             : 
    8235          24 : GDALDatasetShadow *AutoCreateWarpedVRT( GDALDatasetShadow *src_ds,
    8236             :                                         const char *src_wkt = 0,
    8237             :                                         const char *dst_wkt = 0,
    8238             :                                         GDALResampleAlg eResampleAlg = GRA_NearestNeighbour,
    8239             :                                         double maxerror = 0.0 ) {
    8240          24 :   GDALDatasetShadow *ds = GDALAutoCreateWarpedVRT( src_ds, src_wkt,
    8241             :                                                    dst_wkt,
    8242             :                                                    eResampleAlg,
    8243             :                                                    maxerror,
    8244             :                                                    0 );
    8245          24 :   if (ds == 0) {
    8246             :     /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
    8247             :   }
    8248          24 :   return ds;
    8249             : 
    8250             : }
    8251             : 
    8252             : 
    8253           8 : GDALDatasetShadow*  CreatePansharpenedVRT( const char* pszXML,
    8254             :                             GDALRasterBandShadow* panchroBand,
    8255             :                             int nInputSpectralBands,
    8256             :                             GDALRasterBandShadow** ahInputSpectralBands )
    8257             : {
    8258           8 :     CPLErrorReset();
    8259             : 
    8260           8 :     return (GDALDatasetShadow*)GDALCreatePansharpenedVRT( pszXML, panchroBand,
    8261           8 :                                       nInputSpectralBands, ahInputSpectralBands );
    8262             : }
    8263             : 
    8264          71 : SWIGINTERN void delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow *self){
    8265          71 :     GDALDestroyTransformer( self );
    8266          71 :   }
    8267           0 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_0(GDALTransformerInfoShadow *self,int bDstToSrc,double inout[3]){
    8268           0 :     int nRet, nSuccess = TRUE;
    8269             : 
    8270           0 :     nRet = GDALUseTransformer( self, bDstToSrc,
    8271             :                                1, &inout[0], &inout[1], &inout[2],
    8272             :                                &nSuccess );
    8273             : 
    8274           0 :     return nRet && nSuccess;
    8275             :   }
    8276        8677 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_1(GDALTransformerInfoShadow *self,double argout[3],int bDstToSrc,double x,double y,double z=0.0){
    8277        8677 :     int nRet, nSuccess = TRUE;
    8278             : 
    8279        8677 :     argout[0] = x;
    8280        8677 :     argout[1] = y;
    8281        8677 :     argout[2] = z;
    8282        8677 :     nRet = GDALUseTransformer( self, bDstToSrc,
    8283             :                                1, &argout[0], &argout[1], &argout[2],
    8284             :                                &nSuccess );
    8285             : 
    8286        8677 :     return nRet && nSuccess;
    8287             :   }
    8288             : 
    8289             : static int
    8290           4 : DecomposeSequenceOfCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z )
    8291             : {
    8292          35 :   for( int i = 0; i<nCount; ++i )
    8293             :   {
    8294             : 
    8295          31 :     PyObject *o = PySequence_GetItem(seq, i);
    8296          31 :     if ( !PySequence_Check(o) )
    8297             :     {
    8298           0 :         Py_DECREF(o);
    8299           0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
    8300             : 
    8301           0 :         return FALSE;
    8302             :     }
    8303             : 
    8304          31 :     Py_ssize_t len = PySequence_Size(o);
    8305             : 
    8306          31 :     if (len == 2 || len == 3)
    8307             :     {
    8308          31 :         PyObject *o1 = PySequence_GetItem(o, 0);
    8309          31 :         if (!PyNumber_Check(o1))
    8310             :         {
    8311           0 :             Py_DECREF(o); Py_DECREF(o1);
    8312           0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    8313             : 
    8314           0 :             return FALSE;
    8315             :         }
    8316          31 :         x[i] = PyFloat_AsDouble(o1);
    8317          31 :         Py_DECREF(o1);
    8318             : 
    8319          31 :         o1 = PySequence_GetItem(o, 1);
    8320          31 :         if (!PyNumber_Check(o1))
    8321             :         {
    8322           0 :             Py_DECREF(o); Py_DECREF(o1);
    8323           0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    8324             : 
    8325           0 :             return FALSE;
    8326             :         }
    8327          31 :         y[i] = PyFloat_AsDouble(o1);
    8328          31 :         Py_DECREF(o1);
    8329             : 
    8330             :         /* The 3rd coordinate is optional, default 0.0 */
    8331          31 :         if (len == 3)
    8332             :         {
    8333           0 :             o1 = PySequence_GetItem(o, 2);
    8334           0 :             if (!PyNumber_Check(o1))
    8335             :             {
    8336           0 :                 Py_DECREF(o); Py_DECREF(o1);
    8337           0 :                 PyErr_SetString(PyExc_TypeError, "not a number");
    8338             : 
    8339           0 :                 return FALSE;
    8340             :             }
    8341           0 :             z[i] = PyFloat_AsDouble(o1);
    8342           0 :             Py_DECREF(o1);
    8343             :         }
    8344             :         else
    8345             :         {
    8346          31 :             z[i] = 0.0;
    8347             :         }
    8348             :     }
    8349             :     else
    8350             :     {
    8351           0 :         Py_DECREF(o);
    8352           0 :         PyErr_SetString(PyExc_TypeError, "invalid coordinate");
    8353             : 
    8354           0 :         return FALSE;
    8355             :     }
    8356             : 
    8357          31 :     Py_DECREF(o);
    8358             :   }
    8359             : 
    8360             :   return TRUE;
    8361             : }
    8362             : 
    8363           4 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow *self,int bDstToSrc,int nCount,double *x,double *y,double *z,int *panSuccess){
    8364           4 :     int nRet;
    8365             : 
    8366           8 :     nRet = GDALUseTransformer( self, bDstToSrc, nCount, x, y, z, panSuccess );
    8367             : 
    8368           4 :     return nRet;
    8369             :   }
    8370           1 : SWIGINTERN int GDALTransformerInfoShadow_TransformGeolocations(GDALTransformerInfoShadow *self,GDALRasterBandShadow *xBand,GDALRasterBandShadow *yBand,GDALRasterBandShadow *zBand,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=NULL){
    8371             : 
    8372           1 :     CPLErrorReset();
    8373             : 
    8374           1 :     return GDALTransformGeolocations( xBand, yBand, zBand,
    8375             :                                       GDALUseTransformer, self,
    8376           1 :                                     callback, callback_data, options );
    8377             :   }
    8378             : 
    8379          79 :   GDALTransformerInfoShadow* Transformer( GDALDatasetShadow *src, GDALDatasetShadow *dst,
    8380             :                              char **options ) {
    8381          79 :     GDALTransformerInfoShadow *obj = (GDALTransformerInfoShadow*)
    8382          79 :        GDALCreateGenImgProjTransformer2( (GDALDatasetH)src, (GDALDatasetH)dst,
    8383             :                                          options );
    8384          79 :     return obj;
    8385             :   }
    8386             : 
    8387             : 
    8388             : typedef struct
    8389             : {
    8390             :   int     width;
    8391             :   int     height;
    8392             :   double  xmin;
    8393             :   double  ymin;
    8394             :   double  xmax;
    8395             :   double  ymax;
    8396             :   double  geotransform[6];
    8397             : } SuggestedWarpOutputRes;
    8398             : 
    8399           3 : SWIGINTERN void delete_SuggestedWarpOutputRes(SuggestedWarpOutputRes *self){
    8400           3 :     CPLFree(self);
    8401           3 :   }
    8402           2 : SWIGINTERN void SuggestedWarpOutputRes_GetGeotransform(SuggestedWarpOutputRes *self,double geotransform[6]){
    8403           2 :       memcpy(geotransform, self->geotransform, 6 * sizeof(double));
    8404             :   }
    8405             : 
    8406             : #ifdef SWIGPYTHON
    8407           1 :   SuggestedWarpOutputRes* SuggestedWarpOutputFromTransformer(
    8408             :                                                GDALDatasetShadow *src,
    8409             :                                                GDALTransformerInfoShadow* transformer )
    8410             : #else
    8411             :   SuggestedWarpOutputRes* SuggestedWarpOutput( GDALDatasetShadow *src,
    8412             :                                                GDALTransformerInfoShadow* transformer )
    8413             : #endif
    8414             :   {
    8415           1 :     SuggestedWarpOutputRes* res = (SuggestedWarpOutputRes*)CPLMalloc(sizeof(SuggestedWarpOutputRes));
    8416           1 :     double extent[4];
    8417           1 :     if( GDALSuggestedWarpOutput2(src, GDALGenImgProjTransform, transformer,
    8418           1 :                                  res->geotransform,&(res->width), &(res->height),
    8419             :                                  extent, 0) != CE_None )
    8420             :     {
    8421           0 :         CPLFree(res);
    8422           0 :         return NULL;
    8423             :     }
    8424           1 :     res->xmin = extent[0];
    8425           1 :     res->ymin = extent[1];
    8426           1 :     res->xmax = extent[2];
    8427           1 :     res->ymax = extent[3];
    8428           1 :     return res;
    8429             :   }
    8430             : 
    8431             : 
    8432             : #ifdef SWIGPYTHON
    8433           2 :   SuggestedWarpOutputRes* SuggestedWarpOutputFromOptions( GDALDatasetShadow *src,
    8434             :                                                           char** options )
    8435             : #else
    8436             :   SuggestedWarpOutputRes* SuggestedWarpOutput( GDALDatasetShadow *src,
    8437             :                                                char** options )
    8438             : #endif
    8439             :   {
    8440           2 :     SuggestedWarpOutputRes* res = (SuggestedWarpOutputRes*)CPLMalloc(sizeof(SuggestedWarpOutputRes));
    8441           2 :     double extent[4];
    8442           2 :     void* pTransformArg = GDALCreateGenImgProjTransformer2( src, NULL, options );
    8443           2 :     if( GDALSuggestedWarpOutput2(src, GDALGenImgProjTransform, pTransformArg,
    8444           2 :                                  res->geotransform,&(res->width), &(res->height),
    8445             :                                  extent, 0) != CE_None )
    8446             :     {
    8447           0 :         GDALDestroyTransformer(pTransformArg);
    8448           0 :         CPLFree(res);
    8449           0 :         return NULL;
    8450             :     }
    8451           2 :     GDALDestroyTransformer(pTransformArg);
    8452           2 :     res->xmin = extent[0];
    8453           2 :     res->ymin = extent[1];
    8454           2 :     res->xmax = extent[2];
    8455           2 :     res->ymax = extent[3];
    8456           2 :     return res;
    8457             :   }
    8458             : 
    8459             : 
    8460          23 : GDALDatasetShadow* ApplyVerticalShiftGrid( GDALDatasetShadow *src_ds,
    8461             :                                            GDALDatasetShadow *grid_ds,
    8462             :                                            bool inverse = false,
    8463             :                                            double srcUnitToMeter = 1.0,
    8464             :                                            double dstUnitToMeter = 1.0,
    8465             :                                            char** options = NULL ) {
    8466          23 :   GDALDatasetShadow *ds = GDALApplyVerticalShiftGrid( src_ds, grid_ds,
    8467             :                                                       inverse,
    8468             :                                                       srcUnitToMeter,
    8469             :                                                       dstUnitToMeter,
    8470             :                                                       options );
    8471          23 :   return ds;
    8472             : 
    8473             : }
    8474             : 
    8475             : 
    8476             : #include "gdalalgorithm.h"
    8477             : 
    8478             : typedef GDALAlgorithmRegistryHS GDALAlgorithmRegistryHS;
    8479             : typedef GDALAlgorithmHS GDALAlgorithmHS;
    8480             : typedef GDALAlgorithmArgHS GDALAlgorithmArgHS;
    8481             : typedef GDALArgDatasetValueHS GDALArgDatasetValueHS;
    8482             : 
    8483        8848 : SWIGINTERN void delete_GDALAlgorithmArgHS(GDALAlgorithmArgHS *self){
    8484        8848 :     GDALAlgorithmArgRelease( self );
    8485        8848 :   }
    8486         149 : SWIGINTERN char const *GDALAlgorithmArgHS_GetName(GDALAlgorithmArgHS *self){
    8487         149 :     return GDALAlgorithmArgGetName(self);
    8488             :   }
    8489        6521 : SWIGINTERN GDALAlgorithmArgType GDALAlgorithmArgHS_GetType(GDALAlgorithmArgHS *self){
    8490        6521 :     return GDALAlgorithmArgGetType(self);
    8491             :   }
    8492           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetDescription(GDALAlgorithmArgHS *self){
    8493           1 :     return GDALAlgorithmArgGetDescription(self);
    8494             :   }
    8495           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetShortName(GDALAlgorithmArgHS *self){
    8496           1 :     return GDALAlgorithmArgGetShortName(self);
    8497             :   }
    8498           1 : SWIGINTERN char **GDALAlgorithmArgHS_GetAliases(GDALAlgorithmArgHS *self){
    8499           1 :     return GDALAlgorithmArgGetAliases( self );
    8500             :   }
    8501           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetMetaVar(GDALAlgorithmArgHS *self){
    8502           1 :     return GDALAlgorithmArgGetMetaVar(self);
    8503             :   }
    8504           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetCategory(GDALAlgorithmArgHS *self){
    8505           1 :     return GDALAlgorithmArgGetCategory(self);
    8506             :   }
    8507           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsPositional(GDALAlgorithmArgHS *self){
    8508           1 :     return GDALAlgorithmArgIsPositional(self);
    8509             :   }
    8510           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsRequired(GDALAlgorithmArgHS *self){
    8511           1 :     return GDALAlgorithmArgIsRequired(self);
    8512             :   }
    8513           1 : SWIGINTERN int GDALAlgorithmArgHS_GetMinCount(GDALAlgorithmArgHS *self){
    8514           1 :     return GDALAlgorithmArgGetMinCount(self);
    8515             :   }
    8516           1 : SWIGINTERN int GDALAlgorithmArgHS_GetMaxCount(GDALAlgorithmArgHS *self){
    8517           1 :     return GDALAlgorithmArgGetMaxCount(self);
    8518             :   }
    8519           1 : SWIGINTERN bool GDALAlgorithmArgHS_GetPackedValuesAllowed(GDALAlgorithmArgHS *self){
    8520           1 :     return GDALAlgorithmArgGetPackedValuesAllowed(self);
    8521             :   }
    8522           1 : SWIGINTERN bool GDALAlgorithmArgHS_GetRepeatedArgAllowed(GDALAlgorithmArgHS *self){
    8523           1 :     return GDALAlgorithmArgGetRepeatedArgAllowed(self);
    8524             :   }
    8525           1 : SWIGINTERN char **GDALAlgorithmArgHS_GetChoices(GDALAlgorithmArgHS *self){
    8526           1 :     return GDALAlgorithmArgGetChoices( self );
    8527             :   }
    8528          27 : SWIGINTERN char **GDALAlgorithmArgHS_GetMetadataItem(GDALAlgorithmArgHS *self,char const *item){
    8529          27 :     return GDALAlgorithmArgGetMetadataItem( self, item );
    8530             :   }
    8531         167 : SWIGINTERN bool GDALAlgorithmArgHS_IsExplicitlySet(GDALAlgorithmArgHS *self){
    8532         167 :     return GDALAlgorithmArgIsExplicitlySet(self);
    8533             :   }
    8534           1 : SWIGINTERN bool GDALAlgorithmArgHS_HasDefaultValue(GDALAlgorithmArgHS *self){
    8535           1 :     return GDALAlgorithmArgHasDefaultValue(self);
    8536             :   }
    8537           1 : SWIGINTERN bool GDALAlgorithmArgHS_GetDefaultAsBoolean(GDALAlgorithmArgHS *self){
    8538           1 :     return GDALAlgorithmArgGetDefaultAsBoolean(self);
    8539             :   }
    8540           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetDefaultAsString(GDALAlgorithmArgHS *self){
    8541           1 :     return GDALAlgorithmArgGetDefaultAsString(self);
    8542             :   }
    8543           1 : SWIGINTERN int GDALAlgorithmArgHS_GetDefaultAsInteger(GDALAlgorithmArgHS *self){
    8544           1 :     return GDALAlgorithmArgGetDefaultAsInteger(self);
    8545             :   }
    8546           1 : SWIGINTERN double GDALAlgorithmArgHS_GetDefaultAsDouble(GDALAlgorithmArgHS *self){
    8547           1 :     return GDALAlgorithmArgGetDefaultAsDouble(self);
    8548             :   }
    8549           1 : SWIGINTERN char **GDALAlgorithmArgHS_GetDefaultAsStringList(GDALAlgorithmArgHS *self){
    8550           1 :     return GDALAlgorithmArgGetDefaultAsStringList( self );
    8551             :   }
    8552           1 : SWIGINTERN void GDALAlgorithmArgHS_GetDefaultAsIntegerList(GDALAlgorithmArgHS *self,int *nLen,int const **pList){
    8553           1 :      size_t nLenSizet = 0;
    8554           2 :     *pList = GDALAlgorithmArgGetDefaultAsIntegerList(self, &nLenSizet);
    8555           1 :     *nLen = (int)nLenSizet;
    8556             :   }
    8557           1 : SWIGINTERN void GDALAlgorithmArgHS_GetDefaultAsDoubleList(GDALAlgorithmArgHS *self,int *nLen,double const **pList){
    8558           1 :      size_t nLenSizet = 0;
    8559           2 :     *pList = GDALAlgorithmArgGetDefaultAsDoubleList(self, &nLenSizet);
    8560           1 :     *nLen = (int)nLenSizet;
    8561             :   }
    8562           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsHidden(GDALAlgorithmArgHS *self){
    8563           1 :     return GDALAlgorithmArgIsHidden(self);
    8564             :   }
    8565           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsHiddenForCLI(GDALAlgorithmArgHS *self){
    8566           1 :     return GDALAlgorithmArgIsHiddenForCLI(self);
    8567             :   }
    8568           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsHiddenForAPI(GDALAlgorithmArgHS *self){
    8569           1 :     return GDALAlgorithmArgIsHiddenForAPI(self);
    8570             :   }
    8571           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsInput(GDALAlgorithmArgHS *self){
    8572           1 :     return GDALAlgorithmArgIsInput(self);
    8573             :   }
    8574        2713 : SWIGINTERN bool GDALAlgorithmArgHS_IsOutput(GDALAlgorithmArgHS *self){
    8575        2713 :     return GDALAlgorithmArgIsOutput(self);
    8576             :   }
    8577           1 : SWIGINTERN int GDALAlgorithmArgHS_GetDatasetType(GDALAlgorithmArgHS *self){
    8578           1 :     return GDALAlgorithmArgGetDatasetType(self);
    8579             :   }
    8580           1 : SWIGINTERN int GDALAlgorithmArgHS_GetDatasetInputFlags(GDALAlgorithmArgHS *self){
    8581           1 :     return GDALAlgorithmArgGetDatasetInputFlags(self);
    8582             :   }
    8583           1 : SWIGINTERN int GDALAlgorithmArgHS_GetDatasetOutputFlags(GDALAlgorithmArgHS *self){
    8584           1 :     return GDALAlgorithmArgGetDatasetOutputFlags(self);
    8585             :   }
    8586           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetMutualExclusionGroup(GDALAlgorithmArgHS *self){
    8587           1 :     return GDALAlgorithmArgGetMutualExclusionGroup(self);
    8588             :   }
    8589           7 : SWIGINTERN bool GDALAlgorithmArgHS_GetAsBoolean(GDALAlgorithmArgHS *self){
    8590           7 :     return GDALAlgorithmArgGetAsBoolean(self);
    8591             :   }
    8592         292 : SWIGINTERN char const *GDALAlgorithmArgHS_GetAsString(GDALAlgorithmArgHS *self){
    8593         292 :     return GDALAlgorithmArgGetAsString(self);
    8594             :   }
    8595           7 : SWIGINTERN int GDALAlgorithmArgHS_GetAsInteger(GDALAlgorithmArgHS *self){
    8596           7 :     return GDALAlgorithmArgGetAsInteger(self);
    8597             :   }
    8598           7 : SWIGINTERN double GDALAlgorithmArgHS_GetAsDouble(GDALAlgorithmArgHS *self){
    8599           7 :     return GDALAlgorithmArgGetAsDouble(self);
    8600             :   }
    8601        1716 : SWIGINTERN GDALArgDatasetValueHS *GDALAlgorithmArgHS_GetAsDatasetValue(GDALAlgorithmArgHS *self){
    8602        1716 :     return GDALAlgorithmArgGetAsDatasetValue(self);
    8603             :   }
    8604           1 : SWIGINTERN char **GDALAlgorithmArgHS_GetAsStringList(GDALAlgorithmArgHS *self){
    8605           1 :     return GDALAlgorithmArgGetAsStringList( self );
    8606             :   }
    8607           7 : SWIGINTERN void GDALAlgorithmArgHS_GetAsIntegerList(GDALAlgorithmArgHS *self,int *nLen,int const **pList){
    8608           7 :      size_t nLenSizet = 0;
    8609          14 :     *pList = GDALAlgorithmArgGetAsIntegerList(self, &nLenSizet);
    8610           7 :     *nLen = (int)nLenSizet;
    8611             :   }
    8612           7 : SWIGINTERN void GDALAlgorithmArgHS_GetAsDoubleList(GDALAlgorithmArgHS *self,int *nLen,double const **pList){
    8613           7 :      size_t nLenSizet = 0;
    8614          14 :     *pList = GDALAlgorithmArgGetAsDoubleList(self, &nLenSizet);
    8615           7 :     *nLen = (int)nLenSizet;
    8616             :   }
    8617         512 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsBoolean(GDALAlgorithmArgHS *self,bool value){
    8618         512 :     return GDALAlgorithmArgSetAsBoolean(self, value);
    8619             :   }
    8620        1555 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsString(GDALAlgorithmArgHS *self,char const *value){
    8621        1555 :     return GDALAlgorithmArgSetAsString(self, value);
    8622             :   }
    8623         232 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsInteger(GDALAlgorithmArgHS *self,int value){
    8624         232 :     return GDALAlgorithmArgSetAsInteger(self, value);
    8625             :   }
    8626         215 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsDouble(GDALAlgorithmArgHS *self,double value){
    8627         215 :     return GDALAlgorithmArgSetAsDouble(self, value);
    8628             :   }
    8629           1 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsDatasetValue(GDALAlgorithmArgHS *self,GDALArgDatasetValueHS *value){
    8630           1 :     return GDALAlgorithmArgSetAsDatasetValue(self, value);
    8631             :   }
    8632         310 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsStringList(GDALAlgorithmArgHS *self,char **value){
    8633         310 :     return GDALAlgorithmArgSetAsStringList(self, value);
    8634             :   }
    8635          59 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsIntegerList(GDALAlgorithmArgHS *self,int nList,int *pList){
    8636          59 :     return GDALAlgorithmArgSetAsIntegerList(self, nList, pList);
    8637             :   }
    8638         124 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsDoubleList(GDALAlgorithmArgHS *self,int nList,double *pList){
    8639         124 :     return GDALAlgorithmArgSetAsDoubleList(self, nList, pList);
    8640             :   }
    8641           0 : SWIGINTERN bool GDALAlgorithmArgHS_SetDataset(GDALAlgorithmArgHS *self,GDALDatasetShadow *ds){
    8642           0 :     return GDALAlgorithmArgSetDataset(self, ds);
    8643             :   }
    8644         724 : SWIGINTERN bool GDALAlgorithmArgHS_SetDatasets(GDALAlgorithmArgHS *self,int object_list_count,GDALDatasetShadow **poObjects){
    8645         724 :     return GDALAlgorithmArgSetDatasets(self, object_list_count, poObjects);
    8646             :   }
    8647         472 : SWIGINTERN bool GDALAlgorithmArgHS_SetDatasetNames(GDALAlgorithmArgHS *self,char **names){
    8648         472 :     return GDALAlgorithmArgSetDatasetNames(self, names);
    8649             :   }
    8650        4511 : SWIGINTERN void delete_GDALAlgorithmHS(GDALAlgorithmHS *self){
    8651        4511 :     GDALAlgorithmRelease( self );
    8652        4511 :   }
    8653          32 : SWIGINTERN char const *GDALAlgorithmHS_GetName(GDALAlgorithmHS *self){
    8654          32 :     return GDALAlgorithmGetName(self);
    8655             :   }
    8656           1 : SWIGINTERN char const *GDALAlgorithmHS_GetDescription(GDALAlgorithmHS *self){
    8657           1 :     return GDALAlgorithmGetDescription(self);
    8658             :   }
    8659           1 : SWIGINTERN char const *GDALAlgorithmHS_GetLongDescription(GDALAlgorithmHS *self){
    8660           1 :     return GDALAlgorithmGetLongDescription(self);
    8661             :   }
    8662           1 : SWIGINTERN char const *GDALAlgorithmHS_GetHelpFullURL(GDALAlgorithmHS *self){
    8663           1 :     return GDALAlgorithmGetHelpFullURL(self);
    8664             :   }
    8665        2494 : SWIGINTERN bool GDALAlgorithmHS_HasSubAlgorithms(GDALAlgorithmHS *self){
    8666        2494 :     return GDALAlgorithmHasSubAlgorithms(self);
    8667             :   }
    8668           6 : SWIGINTERN char **GDALAlgorithmHS_GetSubAlgorithmNames(GDALAlgorithmHS *self){
    8669           6 :     return GDALAlgorithmGetSubAlgorithmNames( self );
    8670             :   }
    8671        1936 : SWIGINTERN GDALAlgorithmHS *GDALAlgorithmHS_InstantiateSubAlgorithm(GDALAlgorithmHS *self,char const *algName){
    8672        1936 :     return GDALAlgorithmInstantiateSubAlgorithm(self, algName);
    8673             :   }
    8674          50 : SWIGINTERN bool GDALAlgorithmHS_ParseCommandLineArguments(GDALAlgorithmHS *self,char **args){
    8675          50 :     return GDALAlgorithmParseCommandLineArguments(self, args);
    8676             :   }
    8677         756 : SWIGINTERN GDALAlgorithmHS *GDALAlgorithmHS_GetActualAlgorithm(GDALAlgorithmHS *self){
    8678         756 :     return GDALAlgorithmGetActualAlgorithm(self);
    8679             :   }
    8680        1531 : SWIGINTERN bool GDALAlgorithmHS_Run(GDALAlgorithmHS *self,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    8681        1531 :     return GDALAlgorithmRun(self, callback, callback_data);
    8682             :   }
    8683         439 : SWIGINTERN bool GDALAlgorithmHS_Finalize(GDALAlgorithmHS *self){
    8684         439 :     return GDALAlgorithmFinalize(self);
    8685             :   }
    8686         249 : SWIGINTERN bool GDALAlgorithmHS_ParseRunAndFinalize(GDALAlgorithmHS *self,char **args,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    8687         438 :     return GDALAlgorithmParseCommandLineArguments(self, args) &&
    8688         417 :            GDALAlgorithmRun(self, callback, callback_data) &&
    8689         168 :            GDALAlgorithmFinalize(self);
    8690             :   }
    8691           3 : SWIGINTERN retStringAndCPLFree *GDALAlgorithmHS_GetUsageAsJSON(GDALAlgorithmHS *self){
    8692           3 :     return GDALAlgorithmGetUsageAsJSON(self);
    8693             :   }
    8694         131 : SWIGINTERN char **GDALAlgorithmHS_GetArgNames(GDALAlgorithmHS *self){
    8695         131 :     return GDALAlgorithmGetArgNames( self );
    8696             :   }
    8697        3474 : SWIGINTERN GDALAlgorithmArgHS *GDALAlgorithmHS_GetArg(GDALAlgorithmHS *self,char const *argName){
    8698        3474 :     return GDALAlgorithmGetArg(self, argName);
    8699             :   }
    8700        5377 : SWIGINTERN GDALAlgorithmArgHS *GDALAlgorithmHS_GetArgNonConst(GDALAlgorithmHS *self,char const *argName){
    8701        5377 :     return GDALAlgorithmGetArgNonConst(self, argName);
    8702             :   }
    8703        1835 : SWIGINTERN void delete_GDALAlgorithmRegistryHS(GDALAlgorithmRegistryHS *self){
    8704        1835 :     GDALAlgorithmRegistryRelease( self );
    8705        1835 :   }
    8706           1 : SWIGINTERN char **GDALAlgorithmRegistryHS_GetAlgNames(GDALAlgorithmRegistryHS *self){
    8707           1 :     return GDALAlgorithmRegistryGetAlgNames( self );
    8708             :   }
    8709        1836 : SWIGINTERN GDALAlgorithmHS *GDALAlgorithmRegistryHS_InstantiateAlg(GDALAlgorithmRegistryHS *self,char const *algName){
    8710        1836 :     return GDALAlgorithmRegistryInstantiateAlg(self, algName);
    8711             :   }
    8712        1715 : SWIGINTERN void delete_GDALArgDatasetValueHS(GDALArgDatasetValueHS *self){
    8713        1715 :     GDALArgDatasetValueRelease( self );
    8714        1715 :   }
    8715           2 : SWIGINTERN char const *GDALArgDatasetValueHS_GetName(GDALArgDatasetValueHS *self){
    8716           2 :     return GDALArgDatasetValueGetName(self);
    8717             :   }
    8718         560 : SWIGINTERN GDALDatasetShadow *GDALArgDatasetValueHS_GetDataset(GDALArgDatasetValueHS *self){
    8719         560 :     return GDALArgDatasetValueGetDatasetIncreaseRefCount(self);
    8720             :   }
    8721         834 : SWIGINTERN void GDALArgDatasetValueHS_SetName(GDALArgDatasetValueHS *self,char const *name){
    8722         834 :     GDALArgDatasetValueSetName(self, name);
    8723         834 :   }
    8724         314 : SWIGINTERN void GDALArgDatasetValueHS_SetDataset(GDALArgDatasetValueHS *self,GDALDatasetShadow *ds){
    8725         314 :     GDALArgDatasetValueSetDataset(self, ds);
    8726         314 :   }
    8727             : 
    8728          56 : GIntBig wrapper_GDALGetCacheMax()
    8729             : {
    8730          56 :     return GDALGetCacheMax64();
    8731             : }
    8732             : 
    8733             : 
    8734           2 : GIntBig wrapper_GDALGetCacheUsed()
    8735             : {
    8736           2 :     return GDALGetCacheUsed64();
    8737             : }
    8738             : 
    8739             : 
    8740          76 : void wrapper_GDALSetCacheMax(GIntBig nBytes)
    8741             : {
    8742          76 :     return GDALSetCacheMax64(nBytes);
    8743             : }
    8744             : 
    8745             : 
    8746          43 : int wrapper_GDALGetDataTypeSizeBits( GDALDataType eDataType )
    8747             : {
    8748          43 :     return GDALGetDataTypeSizeBits(eDataType);
    8749             : }
    8750             : 
    8751             : 
    8752             : /************************************************************************/
    8753             : /*                          XMLTreeToPyList()                           */
    8754             : /************************************************************************/
    8755       26996 : static PyObject *XMLTreeToPyList( CPLXMLNode *psTree )
    8756             : {
    8757       26996 :     PyObject *pyList;
    8758       26996 :     int      nChildCount = 0, iChild;
    8759       26996 :     CPLXMLNode *psChild;
    8760             : 
    8761       26996 :     if( psTree == NULL )
    8762             :         return Py_None;
    8763             : 
    8764       26983 :     for( psChild = psTree->psChild;
    8765       53900 :          psChild != NULL;
    8766       26917 :          psChild = psChild->psNext )
    8767       26917 :         nChildCount++;
    8768             : 
    8769       26983 :     pyList = PyList_New(nChildCount+2);
    8770             : 
    8771       26983 :     PyList_SetItem( pyList, 0, Py_BuildValue( "i", (int) psTree->eType ) );
    8772       26983 :     PyList_SetItem( pyList, 1, Py_BuildValue( "s", psTree->pszValue ) );
    8773             : 
    8774       26983 :     for( psChild = psTree->psChild, iChild = 2;
    8775       53900 :          psChild != NULL;
    8776       26917 :          psChild = psChild->psNext, iChild++ )
    8777             :     {
    8778       26917 :         PyList_SetItem( pyList, iChild, XMLTreeToPyList( psChild ) );
    8779             :     }
    8780             : 
    8781             :     return pyList;
    8782             : }
    8783             : 
    8784             : 
    8785             : /************************************************************************/
    8786             : /*                          PyListToXMLTree()                           */
    8787             : /************************************************************************/
    8788         339 : static CPLXMLNode *PyListToXMLTree( PyObject *pyList )
    8789             : 
    8790             : {
    8791         339 :     int      nChildCount = 0, iChild, nType = 0;
    8792         339 :     CPLXMLNode *psThisNode;
    8793         339 :     CPLXMLNode *psChild;
    8794         339 :     char       *pszText = NULL;
    8795             : 
    8796         339 :     if( PyList_Size(pyList) > INT_MAX )
    8797             :     {
    8798           0 :         PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8799           0 :         return NULL;
    8800             :     }
    8801         339 :     nChildCount = static_cast<int>(PyList_Size(pyList)) - 2;
    8802         339 :     if( nChildCount < 0 )
    8803             :     {
    8804           0 :         PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8805           0 :         return NULL;
    8806             :     }
    8807             : 
    8808         339 :     CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyList,0), "i", &nType ));
    8809         339 :     CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyList,1), "s", &pszText ));
    8810             : 
    8811             :     /* Detect "pseudo" root */
    8812         339 :     if (nType == CXT_Element && pszText != NULL && strlen(pszText) == 0 && nChildCount == 2)
    8813             :     {
    8814           2 :         PyObject *pyFirst = PyList_GET_ITEM(pyList, 2);
    8815           2 :         if (PyList_Size(pyFirst) < 2)
    8816             :         {
    8817           0 :             PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8818           2 :             return NULL;
    8819             :         }
    8820           2 :         int nTypeFirst = 0;
    8821           2 :         char* pszTextFirst = NULL;
    8822           2 :         CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyFirst,0), "i", &nTypeFirst ));
    8823           2 :         CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyFirst,1), "s", &pszTextFirst ));
    8824           2 :         if (nTypeFirst == CXT_Element && pszTextFirst != NULL && pszTextFirst[0] == '?')
    8825             :         {
    8826           2 :             psThisNode = PyListToXMLTree( PyList_GET_ITEM(pyList,2) );
    8827           2 :             psThisNode->psNext = PyListToXMLTree( PyList_GET_ITEM(pyList,3) );
    8828           2 :             return psThisNode;
    8829             :         }
    8830             :     }
    8831             : 
    8832         337 :     psThisNode = CPLCreateXMLNode( NULL, (CPLXMLNodeType) nType, pszText );
    8833             : 
    8834         659 :     for( iChild = 0; iChild < nChildCount; iChild++ )
    8835             :     {
    8836         322 :         psChild = PyListToXMLTree( PyList_GET_ITEM(pyList,iChild+2) );
    8837         322 :         CPLAddXMLChild( psThisNode, psChild );
    8838             :     }
    8839             : 
    8840             :     return psThisNode;
    8841             : }
    8842             : 
    8843             : 
    8844           9 : retStringAndCPLFree *GetJPEG2000StructureAsString( const char* pszFilename, char** options = NULL )
    8845             : {
    8846           9 :     CPLXMLNode* psNode = GDALGetJPEG2000Structure(pszFilename, options);
    8847           9 :     if( psNode == NULL )
    8848             :         return NULL;
    8849           9 :     char* pszXML = CPLSerializeXMLTree(psNode);
    8850           9 :     CPLDestroyXMLNode(psNode);
    8851           9 :     return pszXML;
    8852             : }
    8853             : 
    8854             : 
    8855         373 : int GetDriverCount() {
    8856         373 :   return GDALGetDriverCount();
    8857             : }
    8858             : 
    8859             : 
    8860             : static
    8861       15840 : GDALDriverShadow* GetDriverByName( char const *name ) {
    8862       15840 :   return (GDALDriverShadow*) GDALGetDriverByName( name );
    8863             : }
    8864             : 
    8865             : 
    8866       82225 : GDALDriverShadow* GetDriver( int i ) {
    8867       82225 :   return (GDALDriverShadow*) GDALGetDriver( i );
    8868             : }
    8869             : 
    8870             : 
    8871       23371 : GDALDatasetShadow* Open( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    8872       23371 :   CPLErrorReset();
    8873       23371 :   GDALDatasetShadow *ds = GDALOpen( utf8_path, eAccess );
    8874             : #ifndef SWIGPYTHON
    8875             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8876             :   {
    8877             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8878             :           GDALClose(ds);
    8879             :       ds = NULL;
    8880             :   }
    8881             : #endif
    8882       23371 :   return (GDALDatasetShadow*) ds;
    8883             : }
    8884             : 
    8885             : 
    8886        6611 : GDALDatasetShadow* OpenEx( char const* utf8_path, unsigned int nOpenFlags = 0,
    8887             :                            char** allowed_drivers = NULL, char** open_options = NULL,
    8888             :                            char** sibling_files = NULL ) {
    8889        6611 :   CPLErrorReset();
    8890             : #ifdef SWIGPYTHON
    8891        9124 :   if( GetUseExceptions() )
    8892        2977 :       nOpenFlags |= GDAL_OF_VERBOSE_ERROR;
    8893             : #endif
    8894        6611 :   GDALDatasetShadow *ds = GDALOpenEx( utf8_path, nOpenFlags, allowed_drivers,
    8895             :                                       open_options, sibling_files );
    8896             : #ifndef SWIGPYTHON
    8897             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8898             :   {
    8899             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8900             :           GDALClose(ds);
    8901             :       ds = NULL;
    8902             :   }
    8903             : #endif
    8904        6611 :   return (GDALDatasetShadow*) ds;
    8905             : }
    8906             : 
    8907             : 
    8908        5053 : GDALDatasetShadow* OpenShared( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    8909        5053 :   CPLErrorReset();
    8910        5053 :   GDALDatasetShadow *ds = GDALOpenShared( utf8_path, eAccess );
    8911             : #ifndef SWIGPYTHON
    8912             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8913             :   {
    8914             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8915             :           GDALClose(ds);
    8916             :       ds = NULL;
    8917             :   }
    8918             : #endif
    8919        5053 :   return (GDALDatasetShadow*) ds;
    8920             : }
    8921             : 
    8922             : 
    8923          11 : GDALDriverShadow *IdentifyDriver( const char *utf8_path,
    8924             :                                   char **papszSiblings = NULL ) {
    8925          11 :     return (GDALDriverShadow *) GDALIdentifyDriver( utf8_path,
    8926          11 :                                                 papszSiblings );
    8927             : }
    8928             : 
    8929             : 
    8930          50 : GDALDriverShadow *IdentifyDriverEx( const char* utf8_path,
    8931             :                                     unsigned int nIdentifyFlags = 0,
    8932             :                                     char** allowed_drivers = NULL,
    8933             :                                     char** sibling_files = NULL )
    8934             : {
    8935          50 :     return  (GDALDriverShadow *) GDALIdentifyDriverEx( utf8_path,
    8936             :                                                 nIdentifyFlags,
    8937             :                                                 allowed_drivers,
    8938          50 :                                                 sibling_files );
    8939             : }
    8940             : 
    8941             : 
    8942         193 :   char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
    8943         193 :     int nResArgCount;
    8944             : 
    8945         193 :     if( papszArgv == NULL )
    8946             :         return NULL;
    8947             : 
    8948         386 :     bool bReloadDrivers = ( CSLFindString(papszArgv, "GDAL_SKIP") >= 0 ||
    8949         193 :                             CSLFindString(papszArgv, "OGR_SKIP") >= 0 );
    8950             : 
    8951         193 :     nResArgCount =
    8952         193 :       GDALGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions );
    8953             : 
    8954         193 :     if( bReloadDrivers )
    8955             :     {
    8956           0 :         GDALAllRegister();
    8957             :     }
    8958             : 
    8959         193 :     if( nResArgCount <= 0 )
    8960             :         return NULL;
    8961             :     else
    8962         178 :         return papszArgv;
    8963             :   }
    8964             : 
    8965             : 
    8966             : #include "gdal_utils.h"
    8967             : 
    8968             : 
    8969             : 
    8970             : #include <vector>
    8971             : 
    8972             : class ErrorStruct
    8973             : {
    8974             :   public:
    8975             :     CPLErr type;
    8976             :     CPLErrorNum no;
    8977             :     char* msg;
    8978             : 
    8979             :     ErrorStruct() = delete;
    8980         280 :     ErrorStruct(CPLErr eErrIn, CPLErrorNum noIn, const char* msgIn) :
    8981         280 :         type(eErrIn), no(noIn), msg(msgIn ? CPLStrdup(msgIn) : nullptr) {}
    8982          70 :     ErrorStruct(const ErrorStruct& other):
    8983          70 :         type(other.type), no(other.no),
    8984          70 :         msg(other.msg ? CPLStrdup(other.msg) : nullptr) {}
    8985         350 :     ~ErrorStruct() { CPLFree(msg); }
    8986             : };
    8987             : 
    8988         280 : static void CPL_STDCALL StackingErrorHandler( CPLErr eErr, CPLErrorNum no,
    8989             :                                            const char* msg )
    8990             : {
    8991         280 :     std::vector<ErrorStruct>* paoErrors =
    8992             :         static_cast<std::vector<ErrorStruct> *>(
    8993         280 :             CPLGetErrorHandlerUserData());
    8994         280 :     paoErrors->emplace_back(eErr, no, msg);
    8995         280 : }
    8996             : 
    8997        2561 : static void PushStackingErrorHandler(std::vector<ErrorStruct>* paoErrors)
    8998             : {
    8999        2561 :     CPLPushErrorHandlerEx(StackingErrorHandler, paoErrors);
    9000        2561 :     CPLSetCurrentErrorHandlerCatchDebug(false);
    9001        2561 : }
    9002             : 
    9003        2561 : static void PopStackingErrorHandler(std::vector<ErrorStruct>* paoErrors, bool bSuccess)
    9004             : {
    9005        2561 :     CPLPopErrorHandler();
    9006             : 
    9007             :     // If the operation was successful, do not emit regular CPLError()
    9008             :     // of CE_Failure type that would be caught by the PythonBindingErrorHandler
    9009             :     // and turned into
    9010             :     // Python exceptions. Just emit them with the previous error handler
    9011             : 
    9012        2841 :     for( size_t iError = 0; iError < paoErrors->size(); ++iError )
    9013             :     {
    9014         280 :         CPLErr eErrClass = (*paoErrors)[iError].type;
    9015         280 :         if( bSuccess && eErrClass == CE_Failure )
    9016             :         {
    9017          12 :             CPLCallPreviousHandler( eErrClass,
    9018          12 :                                 (*paoErrors)[iError].no,
    9019          12 :                                 (*paoErrors)[iError].msg );
    9020             :         }
    9021             :         else
    9022             :         {
    9023         268 :             CPLError( eErrClass,
    9024         268 :                     (*paoErrors)[iError].no,
    9025             :                     "%s",
    9026         268 :                     (*paoErrors)[iError].msg );
    9027             :         }
    9028             :     }
    9029             : 
    9030        2561 :     if( bSuccess )
    9031             :     {
    9032        2445 :         CPLErrorReset();
    9033             :     }
    9034        2561 : }
    9035             : 
    9036          55 : SWIGINTERN GDALInfoOptions *new_GDALInfoOptions(char **options){
    9037          55 :         return GDALInfoOptionsNew(options, NULL);
    9038             :     }
    9039          55 : SWIGINTERN void delete_GDALInfoOptions(GDALInfoOptions *self){
    9040          55 :         GDALInfoOptionsFree( self );
    9041          55 :     }
    9042          36 : SWIGINTERN GDALVectorInfoOptions *new_GDALVectorInfoOptions(char **options){
    9043          36 :         return GDALVectorInfoOptionsNew(options, NULL);
    9044             :     }
    9045          36 : SWIGINTERN void delete_GDALVectorInfoOptions(GDALVectorInfoOptions *self){
    9046          36 :         GDALVectorInfoOptionsFree( self );
    9047          36 :     }
    9048          28 : SWIGINTERN GDALMultiDimInfoOptions *new_GDALMultiDimInfoOptions(char **options){
    9049          28 :         return GDALMultiDimInfoOptionsNew(options, NULL);
    9050             :     }
    9051          28 : SWIGINTERN void delete_GDALMultiDimInfoOptions(GDALMultiDimInfoOptions *self){
    9052          28 :         GDALMultiDimInfoOptionsFree( self );
    9053          28 :     }
    9054        2024 : SWIGINTERN GDALTranslateOptions *new_GDALTranslateOptions(char **options){
    9055        2024 :         return GDALTranslateOptionsNew(options, NULL);
    9056             :     }
    9057        2020 : SWIGINTERN void delete_GDALTranslateOptions(GDALTranslateOptions *self){
    9058        2020 :         GDALTranslateOptionsFree( self );
    9059        2020 :     }
    9060             : 
    9061        2022 : GDALDatasetShadow* wrapper_GDALTranslate( const char* dest,
    9062             :                                       GDALDatasetShadow* dataset,
    9063             :                                       GDALTranslateOptions* translateOptions,
    9064             :                                       GDALProgressFunc callback=NULL,
    9065             :                                       void* callback_data=NULL)
    9066             : {
    9067        2022 :     int usageError; /* ignored */
    9068        2022 :     bool bFreeOptions = false;
    9069        2022 :     if( callback )
    9070             :     {
    9071           3 :         if( translateOptions == NULL )
    9072             :         {
    9073           1 :             bFreeOptions = true;
    9074           1 :             translateOptions = GDALTranslateOptionsNew(NULL, NULL);
    9075             :         }
    9076           3 :         GDALTranslateOptionsSetProgress(translateOptions, callback, callback_data);
    9077             :     }
    9078             : #ifdef SWIGPYTHON
    9079        2022 :     std::vector<ErrorStruct> aoErrors;
    9080        2895 :     if( GetUseExceptions() )
    9081             :     {
    9082         890 :         PushStackingErrorHandler(&aoErrors);
    9083             :     }
    9084             : #endif
    9085        2022 :     GDALDatasetH hDSRet = GDALTranslate(dest, dataset, translateOptions, &usageError);
    9086        2022 :     if( bFreeOptions )
    9087           1 :         GDALTranslateOptionsFree(translateOptions);
    9088             : #ifdef SWIGPYTHON
    9089        2895 :     if( GetUseExceptions() )
    9090             :     {
    9091         890 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9092             :     }
    9093             : #endif
    9094        2022 :     return hDSRet;
    9095             : }
    9096             : 
    9097         800 : SWIGINTERN GDALWarpAppOptions *new_GDALWarpAppOptions(char **options){
    9098         800 :         return GDALWarpAppOptionsNew(options, NULL);
    9099             :     }
    9100         798 : SWIGINTERN void delete_GDALWarpAppOptions(GDALWarpAppOptions *self){
    9101         798 :         GDALWarpAppOptionsFree( self );
    9102         798 :     }
    9103             : 
    9104             : 
    9105          86 : int wrapper_GDALWarpDestDS( GDALDatasetShadow* dstDS,
    9106             :                             int object_list_count, GDALDatasetShadow** poObjects,
    9107             :                             GDALWarpAppOptions* warpAppOptions,
    9108             :                             GDALProgressFunc callback=NULL,
    9109             :                             void* callback_data=NULL)
    9110             : {
    9111          86 :     int usageError; /* ignored */
    9112          86 :     bool bFreeOptions = false;
    9113          86 :     if( callback )
    9114             :     {
    9115           1 :         if( warpAppOptions == NULL )
    9116             :         {
    9117           1 :             bFreeOptions = true;
    9118           1 :             warpAppOptions = GDALWarpAppOptionsNew(NULL, NULL);
    9119             :         }
    9120           1 :         GDALWarpAppOptionsSetProgress(warpAppOptions, callback, callback_data);
    9121             :     }
    9122             : #ifdef SWIGPYTHON
    9123          86 :     std::vector<ErrorStruct> aoErrors;
    9124         166 :     if( GetUseExceptions() )
    9125             :     {
    9126          86 :         PushStackingErrorHandler(&aoErrors);
    9127             :     }
    9128             : #endif
    9129          86 :     bool bRet = (GDALWarp(NULL, dstDS, object_list_count, poObjects, warpAppOptions, &usageError) != NULL);
    9130          86 :     if( bFreeOptions )
    9131           1 :         GDALWarpAppOptionsFree(warpAppOptions);
    9132             : #ifdef SWIGPYTHON
    9133         166 :     if( GetUseExceptions() )
    9134             :     {
    9135          86 :         PopStackingErrorHandler(&aoErrors, bRet);
    9136             :     }
    9137             : #endif
    9138          86 :     return bRet;
    9139             : }
    9140             : 
    9141             : 
    9142         715 : GDALDatasetShadow* wrapper_GDALWarpDestName( const char* dest,
    9143             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    9144             :                                              GDALWarpAppOptions* warpAppOptions,
    9145             :                                              GDALProgressFunc callback=NULL,
    9146             :                                              void* callback_data=NULL)
    9147             : {
    9148         715 :     int usageError; /* ignored */
    9149         715 :     bool bFreeOptions = false;
    9150         715 :     if( callback )
    9151             :     {
    9152           2 :         if( warpAppOptions == NULL )
    9153             :         {
    9154           1 :             bFreeOptions = true;
    9155           1 :             warpAppOptions = GDALWarpAppOptionsNew(NULL, NULL);
    9156             :         }
    9157           2 :         GDALWarpAppOptionsSetProgress(warpAppOptions, callback, callback_data);
    9158             :     }
    9159             : #ifdef SWIGPYTHON
    9160         715 :     std::vector<ErrorStruct> aoErrors;
    9161        1365 :     if( GetUseExceptions() )
    9162             :     {
    9163         691 :         PushStackingErrorHandler(&aoErrors);
    9164             :     }
    9165             : #endif
    9166         715 :     GDALDatasetH hDSRet = GDALWarp(dest, NULL, object_list_count, poObjects, warpAppOptions, &usageError);
    9167         715 :     if( bFreeOptions )
    9168           1 :         GDALWarpAppOptionsFree(warpAppOptions);
    9169             : #ifdef SWIGPYTHON
    9170        1365 :     if( GetUseExceptions() )
    9171             :     {
    9172         691 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9173             :     }
    9174             : #endif
    9175         715 :     return hDSRet;
    9176             : }
    9177             : 
    9178         650 : SWIGINTERN GDALVectorTranslateOptions *new_GDALVectorTranslateOptions(char **options){
    9179         650 :         return GDALVectorTranslateOptionsNew(options, NULL);
    9180             :     }
    9181         623 : SWIGINTERN void delete_GDALVectorTranslateOptions(GDALVectorTranslateOptions *self){
    9182         623 :         GDALVectorTranslateOptionsFree( self );
    9183         623 :     }
    9184             : 
    9185          12 : int wrapper_GDALVectorTranslateDestDS( GDALDatasetShadow* dstDS,
    9186             :                                        GDALDatasetShadow* srcDS,
    9187             :                             GDALVectorTranslateOptions* options,
    9188             :                             GDALProgressFunc callback=NULL,
    9189             :                             void* callback_data=NULL)
    9190             : {
    9191          12 :     int usageError; /* ignored */
    9192          12 :     bool bFreeOptions = false;
    9193          12 :     if( callback )
    9194             :     {
    9195           0 :         if( options == NULL )
    9196             :         {
    9197           0 :             bFreeOptions = true;
    9198           0 :             options = GDALVectorTranslateOptionsNew(NULL, NULL);
    9199             :         }
    9200           0 :         GDALVectorTranslateOptionsSetProgress(options, callback, callback_data);
    9201             :     }
    9202             : #ifdef SWIGPYTHON
    9203          12 :     std::vector<ErrorStruct> aoErrors;
    9204          19 :     if( GetUseExceptions() )
    9205             :     {
    9206          11 :         PushStackingErrorHandler(&aoErrors);
    9207             :     }
    9208             : #endif
    9209          12 :     bool bRet = (GDALVectorTranslate(NULL, dstDS, 1, &srcDS, options, &usageError) != NULL);
    9210          12 :     if( bFreeOptions )
    9211           0 :         GDALVectorTranslateOptionsFree(options);
    9212             : #ifdef SWIGPYTHON
    9213          19 :     if( GetUseExceptions() )
    9214             :     {
    9215          11 :         PopStackingErrorHandler(&aoErrors, bRet);
    9216             :     }
    9217             : #endif
    9218          12 :     return bRet;
    9219             : }
    9220             : 
    9221             : 
    9222         599 : GDALDatasetShadow* wrapper_GDALVectorTranslateDestName( const char* dest,
    9223             :                                              GDALDatasetShadow* srcDS,
    9224             :                                              GDALVectorTranslateOptions* options,
    9225             :                                              GDALProgressFunc callback=NULL,
    9226             :                                              void* callback_data=NULL)
    9227             : {
    9228         599 :     int usageError; /* ignored */
    9229         599 :     bool bFreeOptions = false;
    9230         599 :     if( callback )
    9231             :     {
    9232           3 :         if( options == NULL )
    9233             :         {
    9234           0 :             bFreeOptions = true;
    9235           0 :             options = GDALVectorTranslateOptionsNew(NULL, NULL);
    9236             :         }
    9237           3 :         GDALVectorTranslateOptionsSetProgress(options, callback, callback_data);
    9238             :     }
    9239             : #ifdef SWIGPYTHON
    9240         599 :     std::vector<ErrorStruct> aoErrors;
    9241         985 :     if( GetUseExceptions() )
    9242             :     {
    9243         449 :         PushStackingErrorHandler(&aoErrors);
    9244             :     }
    9245             : #endif
    9246         599 :     GDALDatasetH hDSRet = GDALVectorTranslate(dest, NULL, 1, &srcDS, options, &usageError);
    9247         599 :     if( bFreeOptions )
    9248           0 :         GDALVectorTranslateOptionsFree(options);
    9249             : #ifdef SWIGPYTHON
    9250         985 :     if( GetUseExceptions() )
    9251             :     {
    9252         449 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9253             :     }
    9254             : #endif
    9255         599 :     return hDSRet;
    9256             : }
    9257             : 
    9258          81 : SWIGINTERN GDALDEMProcessingOptions *new_GDALDEMProcessingOptions(char **options){
    9259          81 :         return GDALDEMProcessingOptionsNew(options, NULL);
    9260             :     }
    9261          77 : SWIGINTERN void delete_GDALDEMProcessingOptions(GDALDEMProcessingOptions *self){
    9262          77 :         GDALDEMProcessingOptionsFree( self );
    9263          77 :     }
    9264             : 
    9265          77 : GDALDatasetShadow* wrapper_GDALDEMProcessing( const char* dest,
    9266             :                                       GDALDatasetShadow* dataset,
    9267             :                                       const char* pszProcessing,
    9268             :                                       const char* pszColorFilename,
    9269             :                                       GDALDEMProcessingOptions* options,
    9270             :                                       GDALProgressFunc callback=NULL,
    9271             :                                       void* callback_data=NULL)
    9272             : {
    9273          77 :     int usageError; /* ignored */
    9274          77 :     bool bFreeOptions = false;
    9275          77 :     if( callback )
    9276             :     {
    9277           0 :         if( options == NULL )
    9278             :         {
    9279           0 :             bFreeOptions = true;
    9280           0 :             options = GDALDEMProcessingOptionsNew(NULL, NULL);
    9281             :         }
    9282           0 :         GDALDEMProcessingOptionsSetProgress(options, callback, callback_data);
    9283             :     }
    9284             : #ifdef SWIGPYTHON
    9285          77 :     std::vector<ErrorStruct> aoErrors;
    9286         154 :     if( GetUseExceptions() )
    9287             :     {
    9288          77 :         PushStackingErrorHandler(&aoErrors);
    9289             :     }
    9290             : #endif
    9291          77 :     GDALDatasetH hDSRet = GDALDEMProcessing(dest, dataset, pszProcessing, pszColorFilename, options, &usageError);
    9292          77 :     if( bFreeOptions )
    9293           0 :         GDALDEMProcessingOptionsFree(options);
    9294             : #ifdef SWIGPYTHON
    9295         154 :     if( GetUseExceptions() )
    9296             :     {
    9297          77 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9298             :     }
    9299             : #endif
    9300          77 :     return hDSRet;
    9301             : }
    9302             : 
    9303          45 : SWIGINTERN GDALNearblackOptions *new_GDALNearblackOptions(char **options){
    9304          45 :         return GDALNearblackOptionsNew(options, NULL);
    9305             :     }
    9306          45 : SWIGINTERN void delete_GDALNearblackOptions(GDALNearblackOptions *self){
    9307          45 :         GDALNearblackOptionsFree( self );
    9308          45 :     }
    9309             : 
    9310           2 : int wrapper_GDALNearblackDestDS( GDALDatasetShadow* dstDS,
    9311             :                             GDALDatasetShadow* srcDS,
    9312             :                             GDALNearblackOptions* options,
    9313             :                             GDALProgressFunc callback=NULL,
    9314             :                             void* callback_data=NULL)
    9315             : {
    9316           2 :     int usageError; /* ignored */
    9317           2 :     bool bFreeOptions = false;
    9318           2 :     if( callback )
    9319             :     {
    9320           0 :         if( options == NULL )
    9321             :         {
    9322           0 :             bFreeOptions = true;
    9323           0 :             options = GDALNearblackOptionsNew(NULL, NULL);
    9324             :         }
    9325           0 :         GDALNearblackOptionsSetProgress(options, callback, callback_data);
    9326             :     }
    9327             : #ifdef SWIGPYTHON
    9328           2 :     std::vector<ErrorStruct> aoErrors;
    9329           4 :     if( GetUseExceptions() )
    9330             :     {
    9331           2 :         PushStackingErrorHandler(&aoErrors);
    9332             :     }
    9333             : #endif
    9334           2 :     bool bRet = (GDALNearblack(NULL, dstDS, srcDS, options, &usageError) != NULL);
    9335           2 :     if( bFreeOptions )
    9336           0 :         GDALNearblackOptionsFree(options);
    9337             : #ifdef SWIGPYTHON
    9338           4 :     if( GetUseExceptions() )
    9339             :     {
    9340           2 :         PopStackingErrorHandler(&aoErrors, bRet);
    9341             :     }
    9342             : #endif
    9343           2 :     return bRet;
    9344             : }
    9345             : 
    9346             : 
    9347          43 : GDALDatasetShadow* wrapper_GDALNearblackDestName( const char* dest,
    9348             :                                              GDALDatasetShadow* srcDS,
    9349             :                                              GDALNearblackOptions* options,
    9350             :                                              GDALProgressFunc callback=NULL,
    9351             :                                              void* callback_data=NULL)
    9352             : {
    9353          43 :     int usageError; /* ignored */
    9354          43 :     bool bFreeOptions = false;
    9355          43 :     if( callback )
    9356             :     {
    9357           0 :         if( options == NULL )
    9358             :         {
    9359           0 :             bFreeOptions = true;
    9360           0 :             options = GDALNearblackOptionsNew(NULL, NULL);
    9361             :         }
    9362           0 :         GDALNearblackOptionsSetProgress(options, callback, callback_data);
    9363             :     }
    9364             : #ifdef SWIGPYTHON
    9365          43 :     std::vector<ErrorStruct> aoErrors;
    9366          86 :     if( GetUseExceptions() )
    9367             :     {
    9368          43 :         PushStackingErrorHandler(&aoErrors);
    9369             :     }
    9370             : #endif
    9371          43 :     GDALDatasetH hDSRet = GDALNearblack(dest, NULL, srcDS, options, &usageError);
    9372          43 :     if( bFreeOptions )
    9373           0 :         GDALNearblackOptionsFree(options);
    9374             : #ifdef SWIGPYTHON
    9375          86 :     if( GetUseExceptions() )
    9376             :     {
    9377          43 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9378             :     }
    9379             : #endif
    9380          43 :     return hDSRet;
    9381             : }
    9382             : 
    9383          52 : SWIGINTERN GDALGridOptions *new_GDALGridOptions(char **options){
    9384          52 :         return GDALGridOptionsNew(options, NULL);
    9385             :     }
    9386          52 : SWIGINTERN void delete_GDALGridOptions(GDALGridOptions *self){
    9387          52 :         GDALGridOptionsFree( self );
    9388          52 :     }
    9389             : 
    9390          52 : GDALDatasetShadow* wrapper_GDALGrid( const char* dest,
    9391             :                                       GDALDatasetShadow* dataset,
    9392             :                                       GDALGridOptions* options,
    9393             :                                       GDALProgressFunc callback=NULL,
    9394             :                                       void* callback_data=NULL)
    9395             : {
    9396          52 :     int usageError; /* ignored */
    9397          52 :     bool bFreeOptions = false;
    9398          52 :     if( callback )
    9399             :     {
    9400           0 :         if( options == NULL )
    9401             :         {
    9402           0 :             bFreeOptions = true;
    9403           0 :             options = GDALGridOptionsNew(NULL, NULL);
    9404             :         }
    9405           0 :         GDALGridOptionsSetProgress(options, callback, callback_data);
    9406             :     }
    9407             : #ifdef SWIGPYTHON
    9408          52 :     std::vector<ErrorStruct> aoErrors;
    9409         103 :     if( GetUseExceptions() )
    9410             :     {
    9411          51 :         PushStackingErrorHandler(&aoErrors);
    9412             :     }
    9413             : #endif
    9414          52 :     GDALDatasetH hDSRet = GDALGrid(dest, dataset, options, &usageError);
    9415          52 :     if( bFreeOptions )
    9416           0 :         GDALGridOptionsFree(options);
    9417             : #ifdef SWIGPYTHON
    9418         103 :     if( GetUseExceptions() )
    9419             :     {
    9420          51 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9421             :     }
    9422             : #endif
    9423          52 :     return hDSRet;
    9424             : }
    9425             : 
    9426          12 : SWIGINTERN GDALContourOptions *new_GDALContourOptions(char **options){
    9427          12 :             return GDALContourOptionsNew(options, NULL);
    9428             :         }
    9429          12 : SWIGINTERN void delete_GDALContourOptions(GDALContourOptions *self){
    9430          12 :             GDALContourOptionsFree( self );
    9431          12 :         }
    9432             : 
    9433             : 
    9434           6 : int wrapper_GDALContourDestDS(  GDALDatasetShadow* dstDS,
    9435             :                                 GDALDatasetShadow* srcDS,
    9436             :                                 GDALContourOptions* options,
    9437             :                                 GDALProgressFunc callback=NULL,
    9438             :                                 void* callback_data=NULL)
    9439             : {
    9440           6 :     bool bFreeOptions = false;
    9441           6 :     if( callback )
    9442             :     {
    9443           0 :         if( options == NULL )
    9444             :         {
    9445           0 :             bFreeOptions = true;
    9446           0 :             options = GDALContourOptionsNew(NULL, NULL);
    9447             :         }
    9448           0 :         GDALContourOptionsSetProgress(options, callback, callback_data);
    9449             :     }
    9450             : 
    9451             : #ifdef SWIGPYTHON
    9452           6 :     std::vector<ErrorStruct> aoErrors;
    9453          12 :     if( GetUseExceptions() )
    9454             :     {
    9455           6 :         PushStackingErrorHandler(&aoErrors);
    9456             :     }
    9457             : #endif
    9458             : 
    9459           6 :     char** papszStringOptions = NULL;
    9460           6 :     GDALRasterBandH hBand = NULL;
    9461           6 :     OGRLayerH hLayer = NULL;
    9462           6 :     const CPLErr err = GDALContourProcessOptions(options, &papszStringOptions, &srcDS, &hBand, &dstDS, &hLayer);
    9463           6 :     bool bRet = (err == CE_None && GDALContourGenerateEx(hBand, hLayer, papszStringOptions, callback, callback_data) == CE_None);
    9464           6 :     if( bFreeOptions )
    9465           0 :         GDALContourOptionsFree(options);
    9466             : #ifdef SWIGPYTHON
    9467          12 :     if( GetUseExceptions() )
    9468             :     {
    9469           6 :         PopStackingErrorHandler(&aoErrors, bRet);
    9470             :     }
    9471             : #endif
    9472           6 :     CSLDestroy(papszStringOptions);
    9473           6 :     return bRet;
    9474             : }
    9475             : 
    9476             : 
    9477           6 : GDALDatasetShadow* wrapper_GDALContourDestName( const char* dest,
    9478             :                                                   GDALDatasetShadow* srcDS,
    9479             :                                                   GDALContourOptions* options,
    9480             :                                                   GDALProgressFunc callback=NULL,
    9481             :                                                   void* callback_data=NULL)
    9482             : {
    9483           6 :     bool bFreeOptions = false;
    9484           6 :     if( callback )
    9485             :     {
    9486           0 :         if( options == NULL )
    9487             :         {
    9488           0 :             bFreeOptions = true;
    9489           0 :             options = GDALContourOptionsNew(NULL, NULL);
    9490             :         }
    9491           0 :         GDALContourOptionsSetProgress(options, callback, callback_data);
    9492             :     }
    9493             : 
    9494             : #ifdef SWIGPYTHON
    9495           6 :     std::vector<ErrorStruct> aoErrors;
    9496          12 :     if( GetUseExceptions() )
    9497             :     {
    9498           6 :         PushStackingErrorHandler(&aoErrors);
    9499             :     }
    9500             : #endif
    9501             : 
    9502           6 :     GDALContourOptionsSetDestDataSource(options, dest);
    9503           6 :     char** papszStringOptions = NULL;
    9504           6 :     GDALRasterBandH hBand = NULL;
    9505           6 :     OGRLayerH hLayer = NULL;
    9506           6 :     GDALDatasetH dstDS = NULL;
    9507           6 :     CPLErr err = GDALContourProcessOptions(options, &papszStringOptions, &srcDS, &hBand, &dstDS, &hLayer);
    9508           6 :     if (err == CE_None )
    9509             :     {
    9510           6 :         err = GDALContourGenerateEx(hBand, hLayer, papszStringOptions, callback, callback_data);
    9511             :     }
    9512             : 
    9513           6 :     if( bFreeOptions )
    9514           0 :         GDALContourOptionsFree(options);
    9515             : #ifdef SWIGPYTHON
    9516          12 :     if( GetUseExceptions() )
    9517             :     {
    9518           6 :         PopStackingErrorHandler(&aoErrors, dstDS != NULL);
    9519             :     }
    9520             : #endif
    9521           6 :     CSLDestroy(papszStringOptions);
    9522           6 :     return dstDS;
    9523             : }
    9524             : 
    9525          23 : SWIGINTERN GDALRasterizeOptions *new_GDALRasterizeOptions(char **options){
    9526          23 :         return GDALRasterizeOptionsNew(options, NULL);
    9527             :     }
    9528          23 : SWIGINTERN void delete_GDALRasterizeOptions(GDALRasterizeOptions *self){
    9529          23 :         GDALRasterizeOptionsFree( self );
    9530          23 :     }
    9531             : 
    9532          13 : int wrapper_GDALRasterizeDestDS( GDALDatasetShadow* dstDS,
    9533             :                             GDALDatasetShadow* srcDS,
    9534             :                             GDALRasterizeOptions* options,
    9535             :                             GDALProgressFunc callback=NULL,
    9536             :                             void* callback_data=NULL)
    9537             : {
    9538          13 :     int usageError; /* ignored */
    9539          13 :     bool bFreeOptions = false;
    9540          13 :     if( callback )
    9541             :     {
    9542           0 :         if( options == NULL )
    9543             :         {
    9544           0 :             bFreeOptions = true;
    9545           0 :             options = GDALRasterizeOptionsNew(NULL, NULL);
    9546             :         }
    9547           0 :         GDALRasterizeOptionsSetProgress(options, callback, callback_data);
    9548             :     }
    9549             : #ifdef SWIGPYTHON
    9550          13 :     std::vector<ErrorStruct> aoErrors;
    9551          26 :     if( GetUseExceptions() )
    9552             :     {
    9553          13 :         PushStackingErrorHandler(&aoErrors);
    9554             :     }
    9555             : #endif
    9556          13 :     bool bRet = (GDALRasterize(NULL, dstDS, srcDS, options, &usageError) != NULL);
    9557          13 :     if( bFreeOptions )
    9558           0 :         GDALRasterizeOptionsFree(options);
    9559             : #ifdef SWIGPYTHON
    9560          26 :     if( GetUseExceptions() )
    9561             :     {
    9562          13 :         PopStackingErrorHandler(&aoErrors, bRet);
    9563             :     }
    9564             : #endif
    9565          13 :     return bRet;
    9566             : }
    9567             : 
    9568             : 
    9569          10 : GDALDatasetShadow* wrapper_GDALRasterizeDestName( const char* dest,
    9570             :                                              GDALDatasetShadow* srcDS,
    9571             :                                              GDALRasterizeOptions* options,
    9572             :                                              GDALProgressFunc callback=NULL,
    9573             :                                              void* callback_data=NULL)
    9574             : {
    9575          10 :     int usageError; /* ignored */
    9576          10 :     bool bFreeOptions = false;
    9577          10 :     if( callback )
    9578             :     {
    9579           0 :         if( options == NULL )
    9580             :         {
    9581           0 :             bFreeOptions = true;
    9582           0 :             options = GDALRasterizeOptionsNew(NULL, NULL);
    9583             :         }
    9584           0 :         GDALRasterizeOptionsSetProgress(options, callback, callback_data);
    9585             :     }
    9586             : #ifdef SWIGPYTHON
    9587          10 :     std::vector<ErrorStruct> aoErrors;
    9588          17 :     if( GetUseExceptions() )
    9589             :     {
    9590          10 :         PushStackingErrorHandler(&aoErrors);
    9591             :     }
    9592             : #endif
    9593          10 :     GDALDatasetH hDSRet = GDALRasterize(dest, NULL, srcDS, options, &usageError);
    9594          10 :     if( bFreeOptions )
    9595           0 :         GDALRasterizeOptionsFree(options);
    9596             : #ifdef SWIGPYTHON
    9597          17 :     if( GetUseExceptions() )
    9598             :     {
    9599          10 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9600             :     }
    9601             : #endif
    9602          10 :     return hDSRet;
    9603             : }
    9604             : 
    9605          39 : SWIGINTERN GDALFootprintOptions *new_GDALFootprintOptions(char **options){
    9606          39 :         return GDALFootprintOptionsNew(options, NULL);
    9607             :     }
    9608          37 : SWIGINTERN void delete_GDALFootprintOptions(GDALFootprintOptions *self){
    9609          37 :         GDALFootprintOptionsFree( self );
    9610          37 :     }
    9611             : 
    9612           3 : int wrapper_GDALFootprintDestDS( GDALDatasetShadow* dstDS,
    9613             :                             GDALDatasetShadow* srcDS,
    9614             :                             GDALFootprintOptions* options,
    9615             :                             GDALProgressFunc callback=NULL,
    9616             :                             void* callback_data=NULL)
    9617             : {
    9618           3 :     int usageError; /* ignored */
    9619           3 :     bool bFreeOptions = false;
    9620           3 :     if( callback )
    9621             :     {
    9622           0 :         if( options == NULL )
    9623             :         {
    9624           0 :             bFreeOptions = true;
    9625           0 :             options = GDALFootprintOptionsNew(NULL, NULL);
    9626             :         }
    9627           0 :         GDALFootprintOptionsSetProgress(options, callback, callback_data);
    9628             :     }
    9629             : #ifdef SWIGPYTHON
    9630           3 :     std::vector<ErrorStruct> aoErrors;
    9631           6 :     if( GetUseExceptions() )
    9632             :     {
    9633           3 :         PushStackingErrorHandler(&aoErrors);
    9634             :     }
    9635             : #endif
    9636           3 :     bool bRet = (GDALFootprint(NULL, dstDS, srcDS, options, &usageError) != NULL);
    9637           3 :     if( bFreeOptions )
    9638           0 :         GDALFootprintOptionsFree(options);
    9639             : #ifdef SWIGPYTHON
    9640           6 :     if( GetUseExceptions() )
    9641             :     {
    9642           3 :         PopStackingErrorHandler(&aoErrors, bRet);
    9643             :     }
    9644             : #endif
    9645           3 :     return bRet;
    9646             : }
    9647             : 
    9648             : 
    9649          34 : GDALDatasetShadow* wrapper_GDALFootprintDestName( const char* dest,
    9650             :                                              GDALDatasetShadow* srcDS,
    9651             :                                              GDALFootprintOptions* options,
    9652             :                                              GDALProgressFunc callback=NULL,
    9653             :                                              void* callback_data=NULL)
    9654             : {
    9655          34 :     int usageError; /* ignored */
    9656          34 :     bool bFreeOptions = false;
    9657          34 :     if( callback )
    9658             :     {
    9659           0 :         if( options == NULL )
    9660             :         {
    9661           0 :             bFreeOptions = true;
    9662           0 :             options = GDALFootprintOptionsNew(NULL, NULL);
    9663             :         }
    9664           0 :         GDALFootprintOptionsSetProgress(options, callback, callback_data);
    9665             :     }
    9666             : #ifdef SWIGPYTHON
    9667          34 :     std::vector<ErrorStruct> aoErrors;
    9668          68 :     if( GetUseExceptions() )
    9669             :     {
    9670          34 :         PushStackingErrorHandler(&aoErrors);
    9671             :     }
    9672             : #endif
    9673          34 :     GDALDatasetH hDSRet = GDALFootprint(dest, NULL, srcDS, options, &usageError);
    9674          34 :     if( bFreeOptions )
    9675           0 :         GDALFootprintOptionsFree(options);
    9676             : #ifdef SWIGPYTHON
    9677          68 :     if( GetUseExceptions() )
    9678             :     {
    9679          34 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9680             :     }
    9681             : #endif
    9682          34 :     return hDSRet;
    9683             : }
    9684             : 
    9685         172 : SWIGINTERN GDALBuildVRTOptions *new_GDALBuildVRTOptions(char **options){
    9686         172 :         return GDALBuildVRTOptionsNew(options, NULL);
    9687             :     }
    9688         169 : SWIGINTERN void delete_GDALBuildVRTOptions(GDALBuildVRTOptions *self){
    9689         169 :         GDALBuildVRTOptionsFree( self );
    9690         169 :     }
    9691             : 
    9692          69 : GDALDatasetShadow* wrapper_GDALBuildVRT_objects( const char* dest,
    9693             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    9694             :                                              GDALBuildVRTOptions* options,
    9695             :                                              GDALProgressFunc callback=NULL,
    9696             :                                              void* callback_data=NULL)
    9697             : {
    9698          69 :     int usageError; /* ignored */
    9699          69 :     bool bFreeOptions = false;
    9700          69 :     if( callback )
    9701             :     {
    9702           0 :         if( options == NULL )
    9703             :         {
    9704           0 :             bFreeOptions = true;
    9705           0 :             options = GDALBuildVRTOptionsNew(NULL, NULL);
    9706             :         }
    9707           0 :         GDALBuildVRTOptionsSetProgress(options, callback, callback_data);
    9708             :     }
    9709             : #ifdef SWIGPYTHON
    9710          69 :     std::vector<ErrorStruct> aoErrors;
    9711         116 :     if( GetUseExceptions() )
    9712             :     {
    9713          56 :         PushStackingErrorHandler(&aoErrors);
    9714             :     }
    9715             : #endif
    9716          69 :     GDALDatasetH hDSRet = GDALBuildVRT(dest, object_list_count, poObjects, NULL, options, &usageError);
    9717          69 :     if( bFreeOptions )
    9718           0 :         GDALBuildVRTOptionsFree(options);
    9719             : #ifdef SWIGPYTHON
    9720         116 :     if( GetUseExceptions() )
    9721             :     {
    9722          56 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9723             :     }
    9724             : #endif
    9725          69 :     return hDSRet;
    9726             : }
    9727             : 
    9728             : 
    9729         100 : GDALDatasetShadow* wrapper_GDALBuildVRT_names( const char* dest,
    9730             :                                          char ** source_filenames,
    9731             :                                          GDALBuildVRTOptions* options,
    9732             :                                          GDALProgressFunc callback=NULL,
    9733             :                                          void* callback_data=NULL)
    9734             : {
    9735         100 :     int usageError; /* ignored */
    9736         100 :     bool bFreeOptions = false;
    9737         100 :     if( callback )
    9738             :     {
    9739           1 :         if( options == NULL )
    9740             :         {
    9741           0 :             bFreeOptions = true;
    9742           0 :             options = GDALBuildVRTOptionsNew(NULL, NULL);
    9743             :         }
    9744           1 :         GDALBuildVRTOptionsSetProgress(options, callback, callback_data);
    9745             :     }
    9746             : #ifdef SWIGPYTHON
    9747         100 :     std::vector<ErrorStruct> aoErrors;
    9748         173 :     if( GetUseExceptions() )
    9749             :     {
    9750          85 :         PushStackingErrorHandler(&aoErrors);
    9751             :     }
    9752             : #endif
    9753         100 :     GDALDatasetH hDSRet = GDALBuildVRT(dest, CSLCount(source_filenames), NULL, source_filenames, options, &usageError);
    9754         100 :     if( bFreeOptions )
    9755           0 :         GDALBuildVRTOptionsFree(options);
    9756             : #ifdef SWIGPYTHON
    9757         173 :     if( GetUseExceptions() )
    9758             :     {
    9759          85 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9760             :     }
    9761             : #endif
    9762         100 :     return hDSRet;
    9763             : }
    9764             : 
    9765          23 : SWIGINTERN GDALTileIndexOptions *new_GDALTileIndexOptions(char **options){
    9766          23 :         return GDALTileIndexOptionsNew(options, NULL);
    9767             :     }
    9768          23 : SWIGINTERN void delete_GDALTileIndexOptions(GDALTileIndexOptions *self){
    9769          23 :         GDALTileIndexOptionsFree( self );
    9770          23 :     }
    9771             : 
    9772          23 : GDALDatasetShadow* wrapper_TileIndex_names( const char* dest,
    9773             :                                             char ** source_filenames,
    9774             :                                             GDALTileIndexOptions* options,
    9775             :                                             GDALProgressFunc callback=NULL,
    9776             :                                             void* callback_data=NULL)
    9777             : {
    9778          23 :     int usageError; /* ignored */
    9779             : #if 0
    9780             :     bool bFreeOptions = false;
    9781             :     if( callback )
    9782             :     {
    9783             :         if( options == NULL )
    9784             :         {
    9785             :             bFreeOptions = true;
    9786             :             options = GDALTileIndexOptionsNew(NULL, NULL);
    9787             :         }
    9788             :         GDALTileIndexOptionsSetProgress(options, callback, callback_data);
    9789             :     }
    9790             : #endif
    9791             : 
    9792             : #ifdef SWIGPYTHON
    9793          23 :     std::vector<ErrorStruct> aoErrors;
    9794          46 :     if( GetUseExceptions() )
    9795             :     {
    9796          23 :         PushStackingErrorHandler(&aoErrors);
    9797             :     }
    9798             : #endif
    9799          23 :     GDALDatasetH hDSRet = GDALTileIndex(dest, CSLCount(source_filenames), source_filenames, options, &usageError);
    9800             : #if 0
    9801             :     if( bFreeOptions )
    9802             :         GDALTileIndexOptionsFree(options);
    9803             : #endif
    9804             : #ifdef SWIGPYTHON
    9805          46 :     if( GetUseExceptions() )
    9806             :     {
    9807          23 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9808             :     }
    9809             : #endif
    9810          23 :     return hDSRet;
    9811             : }
    9812             : 
    9813         104 : SWIGINTERN GDALMultiDimTranslateOptions *new_GDALMultiDimTranslateOptions(char **options){
    9814         104 :         return GDALMultiDimTranslateOptionsNew(options, NULL);
    9815             :     }
    9816         104 : SWIGINTERN void delete_GDALMultiDimTranslateOptions(GDALMultiDimTranslateOptions *self){
    9817         104 :         GDALMultiDimTranslateOptionsFree( self );
    9818         104 :     }
    9819             : 
    9820         104 : GDALDatasetShadow* wrapper_GDALMultiDimTranslateDestName( const char* dest,
    9821             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    9822             :                                              GDALMultiDimTranslateOptions* multiDimTranslateOptions,
    9823             :                                              GDALProgressFunc callback=NULL,
    9824             :                                              void* callback_data=NULL)
    9825             : {
    9826         104 :     int usageError; /* ignored */
    9827         104 :     bool bFreeOptions = false;
    9828         104 :     if( callback )
    9829             :     {
    9830           0 :         if( multiDimTranslateOptions == NULL )
    9831             :         {
    9832           0 :             bFreeOptions = true;
    9833           0 :             multiDimTranslateOptions = GDALMultiDimTranslateOptionsNew(NULL, NULL);
    9834             :         }
    9835           0 :         GDALMultiDimTranslateOptionsSetProgress(multiDimTranslateOptions, callback, callback_data);
    9836             :     }
    9837             : #ifdef SWIGPYTHON
    9838         104 :     std::vector<ErrorStruct> aoErrors;
    9839         129 :     if( GetUseExceptions() )
    9840             :     {
    9841          25 :         PushStackingErrorHandler(&aoErrors);
    9842             :     }
    9843             : #endif
    9844         104 :     GDALDatasetH hDSRet = GDALMultiDimTranslate(dest, NULL, object_list_count, poObjects, multiDimTranslateOptions, &usageError);
    9845         104 :     if( bFreeOptions )
    9846           0 :         GDALMultiDimTranslateOptionsFree(multiDimTranslateOptions);
    9847             : #ifdef SWIGPYTHON
    9848         129 :     if( GetUseExceptions() )
    9849             :     {
    9850          25 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9851             :     }
    9852             : #endif
    9853         104 :     return hDSRet;
    9854             : }
    9855             : 
    9856             : #ifdef __cplusplus
    9857             : extern "C" {
    9858             : #endif
    9859       10014 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9860       10014 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9861       10014 :   int result;
    9862             :   
    9863       10014 :   if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
    9864       10014 :   {
    9865             : #ifdef SED_HACKS
    9866       10014 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9867             : #endif
    9868       10014 :     result = GetUseExceptions();
    9869             :   }
    9870       10014 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9871       10014 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9872             :   return resultobj;
    9873           0 : fail:
    9874           0 :   return NULL;
    9875             : }
    9876             : 
    9877             : 
    9878       11390 : SWIGINTERN PyObject *_wrap__GetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9879       11390 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9880       11390 :   int result;
    9881             :   
    9882       11390 :   if (!SWIG_Python_UnpackTuple(args, "_GetExceptionsLocal", 0, 0, 0)) SWIG_fail;
    9883       11390 :   {
    9884             : #ifdef SED_HACKS
    9885       11390 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9886             : #endif
    9887       11390 :     {
    9888       11390 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9889       11390 :       result = (int)_GetExceptionsLocal();
    9890       11390 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9891             :     }
    9892             :   }
    9893       11390 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9894       11390 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9895             :   return resultobj;
    9896           0 : fail:
    9897           0 :   return NULL;
    9898             : }
    9899             : 
    9900             : 
    9901       22780 : SWIGINTERN PyObject *_wrap__SetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9902       22780 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9903       22780 :   int arg1 ;
    9904       22780 :   int val1 ;
    9905       22780 :   int ecode1 = 0 ;
    9906       22780 :   PyObject *swig_obj[1] ;
    9907             :   
    9908       22780 :   if (!args) SWIG_fail;
    9909       22780 :   swig_obj[0] = args;
    9910       22780 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
    9911       22780 :   if (!SWIG_IsOK(ecode1)) {
    9912           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_SetExceptionsLocal" "', argument " "1"" of type '" "int""'");
    9913             :   } 
    9914       22780 :   arg1 = static_cast< int >(val1);
    9915       22780 :   {
    9916             : #ifdef SED_HACKS
    9917       22780 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9918             : #endif
    9919       22780 :     {
    9920       22780 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9921       22780 :       _SetExceptionsLocal(arg1);
    9922       22780 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9923             :     }
    9924             :   }
    9925       22780 :   resultobj = SWIG_Py_Void();
    9926       22780 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9927             :   return resultobj;
    9928             : fail:
    9929             :   return NULL;
    9930             : }
    9931             : 
    9932             : 
    9933          29 : SWIGINTERN PyObject *_wrap__UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9934          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9935             :   
    9936          29 :   if (!SWIG_Python_UnpackTuple(args, "_UseExceptions", 0, 0, 0)) SWIG_fail;
    9937          29 :   {
    9938          29 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9939          29 :     _UseExceptions();
    9940          29 :     SWIG_PYTHON_THREAD_END_ALLOW;
    9941             :   }
    9942          29 :   resultobj = SWIG_Py_Void();
    9943          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; } }
    9944             :   return resultobj;
    9945           0 : fail:
    9946           0 :   return NULL;
    9947             : }
    9948             : 
    9949             : 
    9950           5 : SWIGINTERN PyObject *_wrap__DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9951           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9952             :   
    9953           5 :   if (!SWIG_Python_UnpackTuple(args, "_DontUseExceptions", 0, 0, 0)) SWIG_fail;
    9954           5 :   {
    9955           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9956           5 :     _DontUseExceptions();
    9957           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
    9958             :   }
    9959           5 :   resultobj = SWIG_Py_Void();
    9960           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; } }
    9961             :   return resultobj;
    9962           0 : fail:
    9963           0 :   return NULL;
    9964             : }
    9965             : 
    9966             : 
    9967       58158 : SWIGINTERN PyObject *_wrap__UserHasSpecifiedIfUsingExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9968       58158 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9969       58158 :   int result;
    9970             :   
    9971       58158 :   if (!SWIG_Python_UnpackTuple(args, "_UserHasSpecifiedIfUsingExceptions", 0, 0, 0)) SWIG_fail;
    9972       58158 :   {
    9973             : #ifdef SED_HACKS
    9974       58158 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9975             : #endif
    9976       58158 :     {
    9977       58158 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9978       58158 :       result = (int)_UserHasSpecifiedIfUsingExceptions();
    9979       58158 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9980             :     }
    9981             :   }
    9982       58158 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9983       58158 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9984             :   return resultobj;
    9985           0 : fail:
    9986           0 :   return NULL;
    9987             : }
    9988             : 
    9989             : 
    9990       27507 : SWIGINTERN PyObject *_wrap_VSIFReadL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9991       27507 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9992       27507 :   void **arg1 = (void **) 0 ;
    9993       27507 :   unsigned int arg2 ;
    9994       27507 :   unsigned int arg3 ;
    9995       27507 :   VSILFILE *arg4 = (VSILFILE *) 0 ;
    9996       27507 :   void *pyObject1 = NULL ;
    9997       27507 :   unsigned int val2 ;
    9998       27507 :   int ecode2 = 0 ;
    9999       27507 :   unsigned int val3 ;
   10000       27507 :   int ecode3 = 0 ;
   10001       27507 :   void *argp4 = 0 ;
   10002       27507 :   int res4 = 0 ;
   10003       27507 :   PyObject *swig_obj[3] ;
   10004       27507 :   unsigned int result;
   10005             :   
   10006       27507 :   {
   10007             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject1 = NULL ) */
   10008       27507 :     arg1 = &pyObject1;
   10009             :   }
   10010       27507 :   if (!SWIG_Python_UnpackTuple(args, "VSIFReadL", 3, 3, swig_obj)) SWIG_fail;
   10011       27507 :   ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val2);
   10012       27507 :   if (!SWIG_IsOK(ecode2)) {
   10013           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VSIFReadL" "', argument " "2"" of type '" "unsigned int""'");
   10014             :   } 
   10015       27507 :   arg2 = static_cast< unsigned int >(val2);
   10016       27507 :   ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val3);
   10017       27507 :   if (!SWIG_IsOK(ecode3)) {
   10018           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFReadL" "', argument " "3"" of type '" "unsigned int""'");
   10019             :   } 
   10020       27507 :   arg3 = static_cast< unsigned int >(val3);
   10021       27507 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_VSILFILE, 0 |  0 );
   10022       27507 :   if (!SWIG_IsOK(res4)) {
   10023           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VSIFReadL" "', argument " "4"" of type '" "VSILFILE *""'"); 
   10024             :   }
   10025       27507 :   arg4 = reinterpret_cast< VSILFILE * >(argp4);
   10026       27507 :   {
   10027       27507 :     if (!arg4) {
   10028           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10029             :     }
   10030             :   }
   10031       27506 :   {
   10032       27506 :     const int bLocalUseExceptions = GetUseExceptions();
   10033       27506 :     if ( bLocalUseExceptions ) {
   10034        1640 :       pushErrorHandler();
   10035             :     }
   10036       27506 :     {
   10037       27506 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10038       27506 :       result = (unsigned int)wrapper_VSIFReadL(arg1,arg2,arg3,arg4);
   10039       27506 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10040             :     }
   10041       27506 :     if ( bLocalUseExceptions ) {
   10042        1640 :       popErrorHandler();
   10043             :     }
   10044             : #ifndef SED_HACKS
   10045             :     if ( bLocalUseExceptions ) {
   10046             :       CPLErr eclass = CPLGetLastErrorType();
   10047             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10048             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10049             :       }
   10050             :     }
   10051             : #endif
   10052             :   }
   10053       27506 :   resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
   10054       27506 :   {
   10055             :     /* %typemap(argout) ( void **outPythonObject ) */
   10056       27506 :     Py_XDECREF(resultobj);
   10057       27506 :     if (*arg1)
   10058             :     {
   10059             :       resultobj = (PyObject*)*arg1;
   10060             :     }
   10061             :     else
   10062             :     {
   10063          12 :       resultobj = Py_None;
   10064          12 :       Py_INCREF(resultobj);
   10065             :     }
   10066             :   }
   10067       27507 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10068             :   return resultobj;
   10069             : fail:
   10070             :   return NULL;
   10071             : }
   10072             : 
   10073             : 
   10074           2 : SWIGINTERN PyObject *_wrap_VSIGetMemFileBuffer_unsafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10075           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10076           2 :   char *arg1 = (char *) 0 ;
   10077           2 :   GByte **arg2 = (GByte **) 0 ;
   10078           2 :   vsi_l_offset *arg3 = (vsi_l_offset *) 0 ;
   10079           2 :   int bToFree1 = 0 ;
   10080           2 :   GByte *out2 = NULL ;
   10081           2 :   vsi_l_offset length2 ;
   10082           2 :   PyObject *swig_obj[1] ;
   10083             :   
   10084           2 :   {
   10085           2 :     arg2 = &out2;
   10086           2 :     arg3 = &length2;
   10087             :   }
   10088           2 :   if (!args) SWIG_fail;
   10089           2 :   swig_obj[0] = args;
   10090           2 :   {
   10091             :     /* %typemap(in) (const char *utf8_path) */
   10092           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   10093             :     {
   10094           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   10095             :     }
   10096             :     else
   10097             :     {
   10098           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   10099             :       
   10100             :     }
   10101           2 :     if (arg1 == NULL)
   10102             :     {
   10103           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   10104           0 :       SWIG_fail;
   10105             :     }
   10106             :   }
   10107           2 :   {
   10108           2 :     const int bLocalUseExceptions = GetUseExceptions();
   10109           2 :     if ( bLocalUseExceptions ) {
   10110           0 :       pushErrorHandler();
   10111             :     }
   10112           2 :     {
   10113           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10114           2 :       wrapper_VSIGetMemFileBuffer((char const *)arg1,arg2,arg3);
   10115           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10116             :     }
   10117           2 :     if ( bLocalUseExceptions ) {
   10118           0 :       popErrorHandler();
   10119             :     }
   10120             : #ifndef SED_HACKS
   10121             :     if ( bLocalUseExceptions ) {
   10122             :       CPLErr eclass = CPLGetLastErrorType();
   10123             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10124             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10125             :       }
   10126             :     }
   10127             : #endif
   10128             :   }
   10129           2 :   resultobj = SWIG_Py_Void();
   10130           2 :   {
   10131           2 :     if (*arg2 == NULL) {
   10132           1 :       if( GetUseExceptions() ) {
   10133           0 :         PyErr_SetString(PyExc_RuntimeError, "Could not find path");
   10134             :         resultobj = NULL;
   10135             :       } else {
   10136           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Could not find path");
   10137           1 :         resultobj = Py_None;
   10138           1 :         Py_INCREF(resultobj);
   10139             :       }
   10140             :     } else {
   10141           1 :       do {
   10142           1 :         resultobj = PyMemoryView_FromMemory(reinterpret_cast<char *>(*arg2), *arg3, PyBUF_READ);
   10143           1 :         if (resultobj == NULL) {
   10144           0 :           if( GetUseExceptions() ) {
   10145           0 :             PyErr_SetString(PyExc_RuntimeError, "Could not allocate result buffer");
   10146             :             resultobj = NULL;
   10147             :           } else {
   10148           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Could not allocate result buffer");
   10149           0 :             resultobj = Py_None;
   10150           0 :             Py_INCREF(resultobj);
   10151             :           }
   10152             :         }
   10153             :       } while(0);
   10154             :     }
   10155             :   }
   10156           2 :   {
   10157             :     /* %typemap(freearg) (const char *utf8_path) */
   10158           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   10159             :   }
   10160           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; } }
   10161             :   return resultobj;
   10162           0 : fail:
   10163           0 :   {
   10164             :     /* %typemap(freearg) (const char *utf8_path) */
   10165           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   10166             :   }
   10167             :   return NULL;
   10168             : }
   10169             : 
   10170             : 
   10171         147 : SWIGINTERN PyObject *_wrap_Debug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10172         147 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10173         147 :   char *arg1 = (char *) 0 ;
   10174         147 :   char *arg2 = (char *) 0 ;
   10175         147 :   int res1 ;
   10176         147 :   char *buf1 = 0 ;
   10177         147 :   int alloc1 = 0 ;
   10178         147 :   int res2 ;
   10179         147 :   char *buf2 = 0 ;
   10180         147 :   int alloc2 = 0 ;
   10181         147 :   PyObject *swig_obj[2] ;
   10182             :   
   10183         147 :   if (!SWIG_Python_UnpackTuple(args, "Debug", 2, 2, swig_obj)) SWIG_fail;
   10184         147 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10185         147 :   if (!SWIG_IsOK(res1)) {
   10186           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Debug" "', argument " "1"" of type '" "char const *""'");
   10187             :   }
   10188         147 :   arg1 = reinterpret_cast< char * >(buf1);
   10189         147 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   10190         147 :   if (!SWIG_IsOK(res2)) {
   10191           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Debug" "', argument " "2"" of type '" "char const *""'");
   10192             :   }
   10193         147 :   arg2 = reinterpret_cast< char * >(buf2);
   10194         147 :   {
   10195         147 :     if (!arg2) {
   10196           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10197             :     }
   10198             :   }
   10199         147 :   {
   10200         147 :     const int bLocalUseExceptions = GetUseExceptions();
   10201         147 :     if ( bLocalUseExceptions ) {
   10202          98 :       pushErrorHandler();
   10203             :     }
   10204         147 :     {
   10205         147 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10206         147 :       Debug((char const *)arg1,(char const *)arg2);
   10207         147 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10208             :     }
   10209         147 :     if ( bLocalUseExceptions ) {
   10210          98 :       popErrorHandler();
   10211             :     }
   10212             : #ifndef SED_HACKS
   10213             :     if ( bLocalUseExceptions ) {
   10214             :       CPLErr eclass = CPLGetLastErrorType();
   10215             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10216             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10217             :       }
   10218             :     }
   10219             : #endif
   10220             :   }
   10221         147 :   resultobj = SWIG_Py_Void();
   10222         147 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10223         147 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10224         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; } }
   10225             :   return resultobj;
   10226           0 : fail:
   10227           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10228           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10229             :   return NULL;
   10230             : }
   10231             : 
   10232             : 
   10233           6 : SWIGINTERN PyObject *_wrap_SetErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10234           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10235           6 :   CPLErrorHandler arg1 = (CPLErrorHandler) NULL ;
   10236           6 :   void *arg2 = (void *) NULL ;
   10237           6 :   PyObject *swig_obj[1] ;
   10238           6 :   CPLErr result;
   10239             :   
   10240           6 :   if (!SWIG_Python_UnpackTuple(args, "SetErrorHandler", 0, 1, swig_obj)) SWIG_fail;
   10241           6 :   if (swig_obj[0]) {
   10242           6 :     {
   10243             :       /* %typemap(in) (CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL) */
   10244           6 :       int alloc = 0;
   10245           6 :       char* pszCallbackName = NULL;
   10246           6 :       arg2 = NULL;
   10247           6 :       if( SWIG_IsOK(SWIG_AsCharPtrAndSize(swig_obj[0], &pszCallbackName, NULL, &alloc)) )
   10248             :       {
   10249           3 :         if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
   10250             :         arg1 = CPLQuietErrorHandler;
   10251           3 :         else if( EQUAL(pszCallbackName,"CPLQuietWarningsErrorHandler") )
   10252             :         arg1 = CPLQuietWarningsErrorHandler;
   10253           3 :         else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
   10254             :         arg1 = CPLDefaultErrorHandler;
   10255           0 :         else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
   10256             :         arg1 = CPLLoggingErrorHandler;
   10257             :         else
   10258             :         {
   10259           0 :           if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10260           0 :           PyErr_SetString( PyExc_RuntimeError, "Unhandled value for passed string" );
   10261           0 :           SWIG_fail;
   10262             :         }
   10263             :         
   10264           3 :         if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10265             :       }
   10266           3 :       else if (!PyCallable_Check(swig_obj[0]))
   10267             :       {
   10268           0 :         PyErr_SetString( PyExc_RuntimeError,
   10269             :           "Object given is not a String or a Python function" );
   10270           0 :         SWIG_fail;
   10271             :       }
   10272             :       else
   10273             :       {
   10274           3 :         Py_INCREF(swig_obj[0]);
   10275           3 :         arg1 = PyCPLErrorHandler;
   10276           3 :         arg2 = swig_obj[0];
   10277             :       }
   10278             :     }
   10279             :   }
   10280           6 :   {
   10281           6 :     const int bLocalUseExceptions = GetUseExceptions();
   10282           6 :     if ( bLocalUseExceptions ) {
   10283           0 :       pushErrorHandler();
   10284             :     }
   10285           6 :     {
   10286           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10287           6 :       result = (CPLErr)SetErrorHandler(arg1,arg2);
   10288           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10289             :     }
   10290           6 :     if ( bLocalUseExceptions ) {
   10291           0 :       popErrorHandler();
   10292             :     }
   10293             : #ifndef SED_HACKS
   10294             :     if ( bLocalUseExceptions ) {
   10295             :       CPLErr eclass = CPLGetLastErrorType();
   10296             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10297             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10298             :       }
   10299             :     }
   10300             : #endif
   10301             :   }
   10302           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10303           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; } }
   10304             :   return resultobj;
   10305             : fail:
   10306             :   return NULL;
   10307             : }
   10308             : 
   10309             : 
   10310           1 : SWIGINTERN PyObject *_wrap_SetCurrentErrorHandlerCatchDebug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10311           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10312           1 :   int arg1 ;
   10313           1 :   int val1 ;
   10314           1 :   int ecode1 = 0 ;
   10315           1 :   PyObject *swig_obj[1] ;
   10316             :   
   10317           1 :   if (!args) SWIG_fail;
   10318           1 :   swig_obj[0] = args;
   10319           1 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   10320           1 :   if (!SWIG_IsOK(ecode1)) {
   10321           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetCurrentErrorHandlerCatchDebug" "', argument " "1"" of type '" "int""'");
   10322             :   } 
   10323           1 :   arg1 = static_cast< int >(val1);
   10324           1 :   {
   10325           1 :     const int bLocalUseExceptions = GetUseExceptions();
   10326           1 :     if ( bLocalUseExceptions ) {
   10327           0 :       pushErrorHandler();
   10328             :     }
   10329           1 :     {
   10330           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10331           1 :       CPLSetCurrentErrorHandlerCatchDebug(arg1);
   10332           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10333             :     }
   10334           1 :     if ( bLocalUseExceptions ) {
   10335           0 :       popErrorHandler();
   10336             :     }
   10337             : #ifndef SED_HACKS
   10338             :     if ( bLocalUseExceptions ) {
   10339             :       CPLErr eclass = CPLGetLastErrorType();
   10340             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10341             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10342             :       }
   10343             :     }
   10344             : #endif
   10345             :   }
   10346           1 :   resultobj = SWIG_Py_Void();
   10347           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; } }
   10348             :   return resultobj;
   10349             : fail:
   10350             :   return NULL;
   10351             : }
   10352             : 
   10353             : 
   10354       30122 : SWIGINTERN PyObject *_wrap_PushErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10355       30122 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10356       30122 :   CPLErrorHandler arg1 = (CPLErrorHandler) NULL ;
   10357       30122 :   void *arg2 = (void *) NULL ;
   10358       30122 :   PyObject *swig_obj[1] ;
   10359       30122 :   CPLErr result;
   10360             :   
   10361       30122 :   if (!SWIG_Python_UnpackTuple(args, "PushErrorHandler", 0, 1, swig_obj)) SWIG_fail;
   10362       30122 :   if (swig_obj[0]) {
   10363       30046 :     {
   10364             :       /* %typemap(in) (CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL) */
   10365       30046 :       int alloc = 0;
   10366       30046 :       char* pszCallbackName = NULL;
   10367       30046 :       arg2 = NULL;
   10368       30046 :       if( SWIG_IsOK(SWIG_AsCharPtrAndSize(swig_obj[0], &pszCallbackName, NULL, &alloc)) )
   10369             :       {
   10370       28506 :         if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
   10371             :         arg1 = CPLQuietErrorHandler;
   10372           7 :         else if( EQUAL(pszCallbackName,"CPLQuietWarningsErrorHandler") )
   10373             :         arg1 = CPLQuietWarningsErrorHandler;
   10374           0 :         else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
   10375             :         arg1 = CPLDefaultErrorHandler;
   10376           0 :         else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
   10377             :         arg1 = CPLLoggingErrorHandler;
   10378             :         else
   10379             :         {
   10380           0 :           if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10381           0 :           PyErr_SetString( PyExc_RuntimeError, "Unhandled value for passed string" );
   10382           0 :           SWIG_fail;
   10383             :         }
   10384             :         
   10385       28506 :         if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10386             :       }
   10387        1540 :       else if (!PyCallable_Check(swig_obj[0]))
   10388             :       {
   10389           0 :         PyErr_SetString( PyExc_RuntimeError,
   10390             :           "Object given is not a String or a Python function" );
   10391           0 :         SWIG_fail;
   10392             :       }
   10393             :       else
   10394             :       {
   10395        1540 :         Py_INCREF(swig_obj[0]);
   10396        1540 :         arg1 = PyCPLErrorHandler;
   10397        1540 :         arg2 = swig_obj[0];
   10398             :       }
   10399             :     }
   10400             :   }
   10401       30122 :   {
   10402       30681 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10403       30122 :     result = (CPLErr)PushErrorHandler(arg1,arg2);
   10404             :   }
   10405       30122 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10406       30122 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10407             :   return resultobj;
   10408             : fail:
   10409             :   return NULL;
   10410             : }
   10411             : 
   10412             : 
   10413       30117 : SWIGINTERN PyObject *_wrap_PopErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10414       30117 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10415             :   
   10416       30117 :   if (!SWIG_Python_UnpackTuple(args, "PopErrorHandler", 0, 0, 0)) SWIG_fail;
   10417       30117 :   {
   10418       30676 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10419       30117 :     PopErrorHandler();
   10420             :   }
   10421       30117 :   resultobj = SWIG_Py_Void();
   10422       30117 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10423             :   return resultobj;
   10424           0 : fail:
   10425           0 :   return NULL;
   10426             : }
   10427             : 
   10428             : 
   10429          29 : SWIGINTERN PyObject *_wrap_Error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10430          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10431          29 :   CPLErr arg1 = (CPLErr) CE_Failure ;
   10432          29 :   int arg2 = (int) 0 ;
   10433          29 :   char *arg3 = (char *) "error" ;
   10434          29 :   int val1 ;
   10435          29 :   int ecode1 = 0 ;
   10436          29 :   int val2 ;
   10437          29 :   int ecode2 = 0 ;
   10438          29 :   int res3 ;
   10439          29 :   char *buf3 = 0 ;
   10440          29 :   int alloc3 = 0 ;
   10441          29 :   PyObject *swig_obj[3] ;
   10442             :   
   10443          29 :   if (!SWIG_Python_UnpackTuple(args, "Error", 0, 3, swig_obj)) SWIG_fail;
   10444          29 :   if (swig_obj[0]) {
   10445          29 :     ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   10446          29 :     if (!SWIG_IsOK(ecode1)) {
   10447           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Error" "', argument " "1"" of type '" "CPLErr""'");
   10448             :     } 
   10449          29 :     arg1 = static_cast< CPLErr >(val1);
   10450             :   }
   10451          29 :   if (swig_obj[1]) {
   10452          29 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   10453          29 :     if (!SWIG_IsOK(ecode2)) {
   10454           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Error" "', argument " "2"" of type '" "int""'");
   10455             :     } 
   10456             :     arg2 = static_cast< int >(val2);
   10457             :   }
   10458          29 :   if (swig_obj[2]) {
   10459          29 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   10460          29 :     if (!SWIG_IsOK(res3)) {
   10461           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Error" "', argument " "3"" of type '" "char const *""'");
   10462             :     }
   10463          29 :     arg3 = reinterpret_cast< char * >(buf3);
   10464             :   }
   10465          29 :   {
   10466          29 :     const int bLocalUseExceptions = GetUseExceptions();
   10467          29 :     if ( bLocalUseExceptions ) {
   10468           2 :       pushErrorHandler();
   10469             :     }
   10470          29 :     {
   10471          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10472          29 :       Error(arg1,arg2,(char const *)arg3);
   10473          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10474             :     }
   10475          29 :     if ( bLocalUseExceptions ) {
   10476           2 :       popErrorHandler();
   10477             :     }
   10478             : #ifndef SED_HACKS
   10479             :     if ( bLocalUseExceptions ) {
   10480             :       CPLErr eclass = CPLGetLastErrorType();
   10481             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10482             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10483             :       }
   10484             :     }
   10485             : #endif
   10486             :   }
   10487          29 :   resultobj = SWIG_Py_Void();
   10488          29 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   10489          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; } }
   10490             :   return resultobj;
   10491           0 : fail:
   10492           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   10493             :   return NULL;
   10494             : }
   10495             : 
   10496             : 
   10497           0 : SWIGINTERN PyObject *_wrap_GOA2GetAuthorizationURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10498           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10499           0 :   char *arg1 = (char *) 0 ;
   10500           0 :   int res1 ;
   10501           0 :   char *buf1 = 0 ;
   10502           0 :   int alloc1 = 0 ;
   10503           0 :   PyObject *swig_obj[1] ;
   10504           0 :   retStringAndCPLFree *result = 0 ;
   10505             :   
   10506           0 :   if (!args) SWIG_fail;
   10507           0 :   swig_obj[0] = args;
   10508           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10509           0 :   if (!SWIG_IsOK(res1)) {
   10510           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetAuthorizationURL" "', argument " "1"" of type '" "char const *""'");
   10511             :   }
   10512           0 :   arg1 = reinterpret_cast< char * >(buf1);
   10513           0 :   {
   10514           0 :     if (!arg1) {
   10515           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10516             :     }
   10517             :   }
   10518           0 :   {
   10519           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10520           0 :     if ( bLocalUseExceptions ) {
   10521           0 :       pushErrorHandler();
   10522             :     }
   10523           0 :     {
   10524           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10525           0 :       result = (retStringAndCPLFree *)GOA2GetAuthorizationURL((char const *)arg1);
   10526           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10527             :     }
   10528           0 :     if ( bLocalUseExceptions ) {
   10529           0 :       popErrorHandler();
   10530             :     }
   10531             : #ifndef SED_HACKS
   10532             :     if ( bLocalUseExceptions ) {
   10533             :       CPLErr eclass = CPLGetLastErrorType();
   10534             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10535             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10536             :       }
   10537             :     }
   10538             : #endif
   10539             :   }
   10540           0 :   {
   10541             :     /* %typemap(out) (retStringAndCPLFree*) */
   10542           0 :     Py_XDECREF(resultobj);
   10543           0 :     if(result)
   10544             :     {
   10545           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10546           0 :       CPLFree(result);
   10547             :     }
   10548             :     else
   10549             :     {
   10550           0 :       resultobj = Py_None;
   10551           0 :       Py_INCREF(resultobj);
   10552             :     }
   10553             :   }
   10554           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10555           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; } }
   10556             :   return resultobj;
   10557           0 : fail:
   10558           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10559             :   return NULL;
   10560             : }
   10561             : 
   10562             : 
   10563           0 : SWIGINTERN PyObject *_wrap_GOA2GetRefreshToken(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10564           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10565           0 :   char *arg1 = (char *) 0 ;
   10566           0 :   char *arg2 = (char *) 0 ;
   10567           0 :   int res1 ;
   10568           0 :   char *buf1 = 0 ;
   10569           0 :   int alloc1 = 0 ;
   10570           0 :   int res2 ;
   10571           0 :   char *buf2 = 0 ;
   10572           0 :   int alloc2 = 0 ;
   10573           0 :   PyObject *swig_obj[2] ;
   10574           0 :   retStringAndCPLFree *result = 0 ;
   10575             :   
   10576           0 :   if (!SWIG_Python_UnpackTuple(args, "GOA2GetRefreshToken", 2, 2, swig_obj)) SWIG_fail;
   10577           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10578           0 :   if (!SWIG_IsOK(res1)) {
   10579           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetRefreshToken" "', argument " "1"" of type '" "char const *""'");
   10580             :   }
   10581           0 :   arg1 = reinterpret_cast< char * >(buf1);
   10582           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   10583           0 :   if (!SWIG_IsOK(res2)) {
   10584           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GOA2GetRefreshToken" "', argument " "2"" of type '" "char const *""'");
   10585             :   }
   10586           0 :   arg2 = reinterpret_cast< char * >(buf2);
   10587           0 :   {
   10588           0 :     if (!arg1) {
   10589           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10590             :     }
   10591             :   }
   10592           0 :   {
   10593           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10594           0 :     if ( bLocalUseExceptions ) {
   10595           0 :       pushErrorHandler();
   10596             :     }
   10597           0 :     {
   10598           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10599           0 :       result = (retStringAndCPLFree *)GOA2GetRefreshToken((char const *)arg1,(char const *)arg2);
   10600           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10601             :     }
   10602           0 :     if ( bLocalUseExceptions ) {
   10603           0 :       popErrorHandler();
   10604             :     }
   10605             : #ifndef SED_HACKS
   10606             :     if ( bLocalUseExceptions ) {
   10607             :       CPLErr eclass = CPLGetLastErrorType();
   10608             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10609             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10610             :       }
   10611             :     }
   10612             : #endif
   10613             :   }
   10614           0 :   {
   10615             :     /* %typemap(out) (retStringAndCPLFree*) */
   10616           0 :     Py_XDECREF(resultobj);
   10617           0 :     if(result)
   10618             :     {
   10619           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10620           0 :       CPLFree(result);
   10621             :     }
   10622             :     else
   10623             :     {
   10624           0 :       resultobj = Py_None;
   10625           0 :       Py_INCREF(resultobj);
   10626             :     }
   10627             :   }
   10628           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10629           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10630           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; } }
   10631             :   return resultobj;
   10632           0 : fail:
   10633           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10634           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10635             :   return NULL;
   10636             : }
   10637             : 
   10638             : 
   10639           0 : SWIGINTERN PyObject *_wrap_GOA2GetAccessToken(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10640           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10641           0 :   char *arg1 = (char *) 0 ;
   10642           0 :   char *arg2 = (char *) 0 ;
   10643           0 :   int res1 ;
   10644           0 :   char *buf1 = 0 ;
   10645           0 :   int alloc1 = 0 ;
   10646           0 :   int res2 ;
   10647           0 :   char *buf2 = 0 ;
   10648           0 :   int alloc2 = 0 ;
   10649           0 :   PyObject *swig_obj[2] ;
   10650           0 :   retStringAndCPLFree *result = 0 ;
   10651             :   
   10652           0 :   if (!SWIG_Python_UnpackTuple(args, "GOA2GetAccessToken", 2, 2, swig_obj)) SWIG_fail;
   10653           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10654           0 :   if (!SWIG_IsOK(res1)) {
   10655           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetAccessToken" "', argument " "1"" of type '" "char const *""'");
   10656             :   }
   10657           0 :   arg1 = reinterpret_cast< char * >(buf1);
   10658           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   10659           0 :   if (!SWIG_IsOK(res2)) {
   10660           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GOA2GetAccessToken" "', argument " "2"" of type '" "char const *""'");
   10661             :   }
   10662           0 :   arg2 = reinterpret_cast< char * >(buf2);
   10663           0 :   {
   10664           0 :     if (!arg1) {
   10665           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10666             :     }
   10667             :   }
   10668           0 :   {
   10669           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10670           0 :     if ( bLocalUseExceptions ) {
   10671           0 :       pushErrorHandler();
   10672             :     }
   10673           0 :     {
   10674           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10675           0 :       result = (retStringAndCPLFree *)GOA2GetAccessToken((char const *)arg1,(char const *)arg2);
   10676           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10677             :     }
   10678           0 :     if ( bLocalUseExceptions ) {
   10679           0 :       popErrorHandler();
   10680             :     }
   10681             : #ifndef SED_HACKS
   10682             :     if ( bLocalUseExceptions ) {
   10683             :       CPLErr eclass = CPLGetLastErrorType();
   10684             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10685             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10686             :       }
   10687             :     }
   10688             : #endif
   10689             :   }
   10690           0 :   {
   10691             :     /* %typemap(out) (retStringAndCPLFree*) */
   10692           0 :     Py_XDECREF(resultobj);
   10693           0 :     if(result)
   10694             :     {
   10695           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10696           0 :       CPLFree(result);
   10697             :     }
   10698             :     else
   10699             :     {
   10700           0 :       resultobj = Py_None;
   10701           0 :       Py_INCREF(resultobj);
   10702             :     }
   10703             :   }
   10704           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10705           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10706           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; } }
   10707             :   return resultobj;
   10708           0 : fail:
   10709           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10710           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10711             :   return NULL;
   10712             : }
   10713             : 
   10714             : 
   10715        1781 : SWIGINTERN PyObject *_wrap_ErrorReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10716        1781 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10717             :   
   10718        1781 :   if (!SWIG_Python_UnpackTuple(args, "ErrorReset", 0, 0, 0)) SWIG_fail;
   10719        1781 :   {
   10720        1781 :     const int bLocalUseExceptions = GetUseExceptions();
   10721        1781 :     if ( bLocalUseExceptions ) {
   10722         305 :       pushErrorHandler();
   10723             :     }
   10724        1781 :     {
   10725        1781 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10726        1781 :       CPLErrorReset();
   10727        1781 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10728             :     }
   10729        1781 :     if ( bLocalUseExceptions ) {
   10730         305 :       popErrorHandler();
   10731             :     }
   10732             : #ifndef SED_HACKS
   10733             :     if ( bLocalUseExceptions ) {
   10734             :       CPLErr eclass = CPLGetLastErrorType();
   10735             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10736             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10737             :       }
   10738             :     }
   10739             : #endif
   10740             :   }
   10741        1781 :   resultobj = SWIG_Py_Void();
   10742        1781 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10743             :   return resultobj;
   10744           0 : fail:
   10745           0 :   return NULL;
   10746             : }
   10747             : 
   10748             : 
   10749         170 : SWIGINTERN PyObject *_wrap_wrapper_EscapeString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   10750         170 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10751         170 :   int arg1 ;
   10752         170 :   char *arg2 = (char *) 0 ;
   10753         170 :   int arg3 = (int) CPLES_SQL ;
   10754         170 :   int alloc1 = 0 ;
   10755         170 :   bool viewIsValid1 = false ;
   10756         170 :   Py_buffer view1 ;
   10757         170 :   int val3 ;
   10758         170 :   int ecode3 = 0 ;
   10759         170 :   PyObject * obj0 = 0 ;
   10760         170 :   PyObject * obj1 = 0 ;
   10761         170 :   char * kwnames[] = {
   10762             :     (char *)"len",  (char *)"scheme",  NULL 
   10763             :   };
   10764         170 :   retStringAndCPLFree *result = 0 ;
   10765             :   
   10766         170 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:wrapper_EscapeString", kwnames, &obj0, &obj1)) SWIG_fail;
   10767         170 :   {
   10768             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   10769         170 :     char* ptr = NULL;
   10770         170 :     if( !GetBufferAsCharPtrIntSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   10771           0 :       SWIG_fail;
   10772             :     }
   10773         170 :     arg2 = (char *)ptr;
   10774             :   }
   10775         170 :   if (obj1) {
   10776         170 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
   10777         170 :     if (!SWIG_IsOK(ecode3)) {
   10778           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "wrapper_EscapeString" "', argument " "3"" of type '" "int""'");
   10779             :     } 
   10780             :     arg3 = static_cast< int >(val3);
   10781             :   }
   10782         170 :   {
   10783         170 :     const int bLocalUseExceptions = GetUseExceptions();
   10784         170 :     if ( bLocalUseExceptions ) {
   10785         137 :       pushErrorHandler();
   10786             :     }
   10787         170 :     {
   10788         170 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10789         170 :       result = (retStringAndCPLFree *)wrapper_EscapeString(arg1,arg2,arg3);
   10790         170 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10791             :     }
   10792         170 :     if ( bLocalUseExceptions ) {
   10793         137 :       popErrorHandler();
   10794             :     }
   10795             : #ifndef SED_HACKS
   10796             :     if ( bLocalUseExceptions ) {
   10797             :       CPLErr eclass = CPLGetLastErrorType();
   10798             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10799             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10800             :       }
   10801             :     }
   10802             : #endif
   10803             :   }
   10804         170 :   {
   10805             :     /* %typemap(out) (retStringAndCPLFree*) */
   10806         170 :     Py_XDECREF(resultobj);
   10807         170 :     if(result)
   10808             :     {
   10809         170 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10810         170 :       CPLFree(result);
   10811             :     }
   10812             :     else
   10813             :     {
   10814           0 :       resultobj = Py_None;
   10815           0 :       Py_INCREF(resultobj);
   10816             :     }
   10817             :   }
   10818         170 :   {
   10819             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10820         170 :     if( viewIsValid1 ) {
   10821           0 :       PyBuffer_Release(&view1);
   10822             :     }
   10823         170 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10824         170 :       delete[] arg2;
   10825             :     }
   10826             :   }
   10827         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; } }
   10828             :   return resultobj;
   10829           0 : fail:
   10830           0 :   {
   10831             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10832           0 :     if( viewIsValid1 ) {
   10833           0 :       PyBuffer_Release(&view1);
   10834             :     }
   10835         170 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10836           0 :       delete[] arg2;
   10837             :     }
   10838             :   }
   10839             :   return NULL;
   10840             : }
   10841             : 
   10842             : 
   10843          81 : SWIGINTERN PyObject *_wrap_EscapeBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   10844          81 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10845          81 :   int arg1 ;
   10846          81 :   char *arg2 = (char *) 0 ;
   10847          81 :   size_t *arg3 = (size_t *) 0 ;
   10848          81 :   char **arg4 = (char **) 0 ;
   10849          81 :   int arg5 = (int) CPLES_SQL ;
   10850          81 :   int alloc1 = 0 ;
   10851          81 :   bool viewIsValid1 = false ;
   10852          81 :   Py_buffer view1 ;
   10853          81 :   size_t nLen3 = 0 ;
   10854          81 :   char *pBuf3 = 0 ;
   10855          81 :   int val5 ;
   10856          81 :   int ecode5 = 0 ;
   10857          81 :   PyObject * obj0 = 0 ;
   10858          81 :   PyObject * obj1 = 0 ;
   10859          81 :   char * kwnames[] = {
   10860             :     (char *)"len",  (char *)"scheme",  NULL 
   10861             :   };
   10862             :   
   10863          81 :   {
   10864             :     /* %typemap(in,numinputs=0) (size_t *nLen3, char **pBuf3 ) */
   10865          81 :     arg3 = &nLen3;
   10866          81 :     arg4 = &pBuf3;
   10867             :   }
   10868          81 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:EscapeBinary", kwnames, &obj0, &obj1)) SWIG_fail;
   10869          81 :   {
   10870             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   10871          81 :     char* ptr = NULL;
   10872          81 :     if( !GetBufferAsCharPtrIntSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   10873           0 :       SWIG_fail;
   10874             :     }
   10875          81 :     arg2 = (char *)ptr;
   10876             :   }
   10877          81 :   if (obj1) {
   10878          81 :     ecode5 = SWIG_AsVal_int(obj1, &val5);
   10879          81 :     if (!SWIG_IsOK(ecode5)) {
   10880           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "EscapeBinary" "', argument " "5"" of type '" "int""'");
   10881             :     } 
   10882             :     arg5 = static_cast< int >(val5);
   10883             :   }
   10884          81 :   {
   10885          81 :     const int bLocalUseExceptions = GetUseExceptions();
   10886          81 :     if ( bLocalUseExceptions ) {
   10887          72 :       pushErrorHandler();
   10888             :     }
   10889          81 :     {
   10890          81 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10891          81 :       EscapeBinary(arg1,arg2,arg3,arg4,arg5);
   10892          81 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10893             :     }
   10894          81 :     if ( bLocalUseExceptions ) {
   10895          72 :       popErrorHandler();
   10896             :     }
   10897             : #ifndef SED_HACKS
   10898             :     if ( bLocalUseExceptions ) {
   10899             :       CPLErr eclass = CPLGetLastErrorType();
   10900             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10901             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10902             :       }
   10903             :     }
   10904             : #endif
   10905             :   }
   10906          81 :   resultobj = SWIG_Py_Void();
   10907          81 :   {
   10908             :     /* %typemap(argout) (size_t *nLen, char **pBuf ) */
   10909          81 :     Py_XDECREF(resultobj);
   10910          81 :     if( *arg4 ) {
   10911          81 :       resultobj = PyByteArray_FromStringAndSize( *arg4, *arg3 );
   10912             :     }
   10913             :     else {
   10914           0 :       resultobj = Py_None;
   10915           0 :       Py_INCREF(Py_None);
   10916             :     }
   10917             :   }
   10918          81 :   {
   10919             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10920          81 :     if( viewIsValid1 ) {
   10921          81 :       PyBuffer_Release(&view1);
   10922             :     }
   10923           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10924           0 :       delete[] arg2;
   10925             :     }
   10926             :   }
   10927          81 :   {
   10928             :     /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
   10929          81 :     VSIFree( *arg4 );
   10930             :   }
   10931          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; } }
   10932             :   return resultobj;
   10933           0 : fail:
   10934           0 :   {
   10935             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10936           0 :     if( viewIsValid1 ) {
   10937           0 :       PyBuffer_Release(&view1);
   10938             :     }
   10939           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10940           0 :       delete[] arg2;
   10941             :     }
   10942             :   }
   10943           0 :   {
   10944             :     /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
   10945           0 :     VSIFree( *arg4 );
   10946             :   }
   10947             :   return NULL;
   10948             : }
   10949             : 
   10950             : 
   10951           2 : SWIGINTERN PyObject *_wrap_GetLastErrorNo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10952           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10953           2 :   int result;
   10954             :   
   10955           2 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorNo", 0, 0, 0)) SWIG_fail;
   10956           2 :   {
   10957             : #ifdef SED_HACKS
   10958           2 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10959             : #endif
   10960             :     
   10961           2 :     result = CPLGetLastErrorNo();
   10962             :   }
   10963           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10964           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; } }
   10965             :   return resultobj;
   10966           0 : fail:
   10967           0 :   return NULL;
   10968             : }
   10969             : 
   10970             : 
   10971          75 : SWIGINTERN PyObject *_wrap_GetLastErrorType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10972          75 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10973          75 :   int result;
   10974             :   
   10975          75 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorType", 0, 0, 0)) SWIG_fail;
   10976          75 :   {
   10977             : #ifdef SED_HACKS
   10978          87 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10979             : #endif
   10980             :     
   10981          75 :     result = CPLGetLastErrorType();
   10982             :   }
   10983          75 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10984          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; } }
   10985             :   return resultobj;
   10986           0 : fail:
   10987           0 :   return NULL;
   10988             : }
   10989             : 
   10990             : 
   10991        2091 : SWIGINTERN PyObject *_wrap_GetLastErrorMsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10992        2091 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10993        2091 :   char *result = 0 ;
   10994             :   
   10995        2091 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorMsg", 0, 0, 0)) SWIG_fail;
   10996        2091 :   {
   10997             : #ifdef SED_HACKS
   10998        2322 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10999             : #endif
   11000             :     
   11001        2091 :     result = (char*)CPLGetLastErrorMsg();
   11002             :   }
   11003        2091 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11004        2091 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11005             :   return resultobj;
   11006           0 : fail:
   11007           0 :   return NULL;
   11008             : }
   11009             : 
   11010             : 
   11011           0 : SWIGINTERN PyObject *_wrap_GetErrorCounter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11012           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11013           0 :   unsigned int result;
   11014             :   
   11015           0 :   if (!SWIG_Python_UnpackTuple(args, "GetErrorCounter", 0, 0, 0)) SWIG_fail;
   11016           0 :   {
   11017             : #ifdef SED_HACKS
   11018           0 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   11019             : #endif
   11020             :     
   11021           0 :     result = CPLGetErrorCounter();
   11022             :   }
   11023           0 :   resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
   11024           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; } }
   11025             :   return resultobj;
   11026           0 : fail:
   11027           0 :   return NULL;
   11028             : }
   11029             : 
   11030             : 
   11031           4 : SWIGINTERN PyObject *_wrap_VSIGetLastErrorNo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11032           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11033           4 :   int result;
   11034             :   
   11035           4 :   if (!SWIG_Python_UnpackTuple(args, "VSIGetLastErrorNo", 0, 0, 0)) SWIG_fail;
   11036           4 :   {
   11037           4 :     const int bLocalUseExceptions = GetUseExceptions();
   11038           4 :     if ( bLocalUseExceptions ) {
   11039           0 :       pushErrorHandler();
   11040             :     }
   11041           4 :     {
   11042           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11043           4 :       result = (int)VSIGetLastErrorNo();
   11044           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11045             :     }
   11046           4 :     if ( bLocalUseExceptions ) {
   11047           0 :       popErrorHandler();
   11048             :     }
   11049             : #ifndef SED_HACKS
   11050             :     if ( bLocalUseExceptions ) {
   11051             :       CPLErr eclass = CPLGetLastErrorType();
   11052             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11053             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11054             :       }
   11055             :     }
   11056             : #endif
   11057             :   }
   11058           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11059           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; } }
   11060             :   return resultobj;
   11061           0 : fail:
   11062           0 :   return NULL;
   11063             : }
   11064             : 
   11065             : 
   11066          42 : SWIGINTERN PyObject *_wrap_VSIGetLastErrorMsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11067          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11068          42 :   char *result = 0 ;
   11069             :   
   11070          42 :   if (!SWIG_Python_UnpackTuple(args, "VSIGetLastErrorMsg", 0, 0, 0)) SWIG_fail;
   11071          42 :   {
   11072          42 :     const int bLocalUseExceptions = GetUseExceptions();
   11073          42 :     if ( bLocalUseExceptions ) {
   11074          11 :       pushErrorHandler();
   11075             :     }
   11076          42 :     {
   11077          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11078          42 :       result = (char *)VSIGetLastErrorMsg();
   11079          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11080             :     }
   11081          42 :     if ( bLocalUseExceptions ) {
   11082          11 :       popErrorHandler();
   11083             :     }
   11084             : #ifndef SED_HACKS
   11085             :     if ( bLocalUseExceptions ) {
   11086             :       CPLErr eclass = CPLGetLastErrorType();
   11087             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11088             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11089             :       }
   11090             :     }
   11091             : #endif
   11092             :   }
   11093          42 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11094          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; } }
   11095             :   return resultobj;
   11096           0 : fail:
   11097           0 :   return NULL;
   11098             : }
   11099             : 
   11100             : 
   11101           3 : SWIGINTERN PyObject *_wrap_VSIErrorReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11102           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11103             :   
   11104           3 :   if (!SWIG_Python_UnpackTuple(args, "VSIErrorReset", 0, 0, 0)) SWIG_fail;
   11105           3 :   {
   11106           3 :     const int bLocalUseExceptions = GetUseExceptions();
   11107           3 :     if ( bLocalUseExceptions ) {
   11108           1 :       pushErrorHandler();
   11109             :     }
   11110           3 :     {
   11111           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11112           3 :       VSIErrorReset();
   11113           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11114             :     }
   11115           3 :     if ( bLocalUseExceptions ) {
   11116           1 :       popErrorHandler();
   11117             :     }
   11118             : #ifndef SED_HACKS
   11119             :     if ( bLocalUseExceptions ) {
   11120             :       CPLErr eclass = CPLGetLastErrorType();
   11121             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11122             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11123             :       }
   11124             :     }
   11125             : #endif
   11126             :   }
   11127           3 :   resultobj = SWIG_Py_Void();
   11128           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; } }
   11129             :   return resultobj;
   11130           0 : fail:
   11131           0 :   return NULL;
   11132             : }
   11133             : 
   11134             : 
   11135           0 : SWIGINTERN PyObject *_wrap_PushFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11136           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11137           0 :   char *arg1 = (char *) 0 ;
   11138           0 :   int bToFree1 = 0 ;
   11139           0 :   PyObject *swig_obj[1] ;
   11140             :   
   11141           0 :   if (!args) SWIG_fail;
   11142           0 :   swig_obj[0] = args;
   11143           0 :   {
   11144             :     /* %typemap(in) (const char *utf8_path) */
   11145           0 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11146             :     {
   11147           0 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11148             :     }
   11149             :     else
   11150             :     {
   11151           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11152             :       
   11153             :     }
   11154           0 :     if (arg1 == NULL)
   11155             :     {
   11156           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11157           0 :       SWIG_fail;
   11158             :     }
   11159             :   }
   11160           0 :   {
   11161           0 :     if (!arg1) {
   11162           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11163             :     }
   11164             :   }
   11165           0 :   {
   11166           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11167           0 :     if ( bLocalUseExceptions ) {
   11168           0 :       pushErrorHandler();
   11169             :     }
   11170           0 :     {
   11171           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11172           0 :       CPLPushFinderLocation((char const *)arg1);
   11173           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11174             :     }
   11175           0 :     if ( bLocalUseExceptions ) {
   11176           0 :       popErrorHandler();
   11177             :     }
   11178             : #ifndef SED_HACKS
   11179             :     if ( bLocalUseExceptions ) {
   11180             :       CPLErr eclass = CPLGetLastErrorType();
   11181             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11182             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11183             :       }
   11184             :     }
   11185             : #endif
   11186             :   }
   11187           0 :   resultobj = SWIG_Py_Void();
   11188           0 :   {
   11189             :     /* %typemap(freearg) (const char *utf8_path) */
   11190           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   11191             :   }
   11192           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; } }
   11193             :   return resultobj;
   11194           0 : fail:
   11195           0 :   {
   11196             :     /* %typemap(freearg) (const char *utf8_path) */
   11197           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   11198             :   }
   11199             :   return NULL;
   11200             : }
   11201             : 
   11202             : 
   11203           0 : SWIGINTERN PyObject *_wrap_PopFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11204           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11205             :   
   11206           0 :   if (!SWIG_Python_UnpackTuple(args, "PopFinderLocation", 0, 0, 0)) SWIG_fail;
   11207           0 :   {
   11208           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11209           0 :     if ( bLocalUseExceptions ) {
   11210           0 :       pushErrorHandler();
   11211             :     }
   11212           0 :     {
   11213           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11214           0 :       CPLPopFinderLocation();
   11215           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11216             :     }
   11217           0 :     if ( bLocalUseExceptions ) {
   11218           0 :       popErrorHandler();
   11219             :     }
   11220             : #ifndef SED_HACKS
   11221             :     if ( bLocalUseExceptions ) {
   11222             :       CPLErr eclass = CPLGetLastErrorType();
   11223             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11224             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11225             :       }
   11226             :     }
   11227             : #endif
   11228             :   }
   11229           0 :   resultobj = SWIG_Py_Void();
   11230           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; } }
   11231             :   return resultobj;
   11232           0 : fail:
   11233           0 :   return NULL;
   11234             : }
   11235             : 
   11236             : 
   11237           0 : SWIGINTERN PyObject *_wrap_FinderClean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11238           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11239             :   
   11240           0 :   if (!SWIG_Python_UnpackTuple(args, "FinderClean", 0, 0, 0)) SWIG_fail;
   11241           0 :   {
   11242           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11243           0 :     if ( bLocalUseExceptions ) {
   11244           0 :       pushErrorHandler();
   11245             :     }
   11246           0 :     {
   11247           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11248           0 :       CPLFinderClean();
   11249           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11250             :     }
   11251           0 :     if ( bLocalUseExceptions ) {
   11252           0 :       popErrorHandler();
   11253             :     }
   11254             : #ifndef SED_HACKS
   11255             :     if ( bLocalUseExceptions ) {
   11256             :       CPLErr eclass = CPLGetLastErrorType();
   11257             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11258             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11259             :       }
   11260             :     }
   11261             : #endif
   11262             :   }
   11263           0 :   resultobj = SWIG_Py_Void();
   11264           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; } }
   11265             :   return resultobj;
   11266           0 : fail:
   11267           0 :   return NULL;
   11268             : }
   11269             : 
   11270             : 
   11271          47 : SWIGINTERN PyObject *_wrap_FindFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11272          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11273          47 :   char *arg1 = (char *) 0 ;
   11274          47 :   char *arg2 = (char *) 0 ;
   11275          47 :   int res1 ;
   11276          47 :   char *buf1 = 0 ;
   11277          47 :   int alloc1 = 0 ;
   11278          47 :   int bToFree2 = 0 ;
   11279          47 :   PyObject *swig_obj[2] ;
   11280          47 :   char *result = 0 ;
   11281             :   
   11282          47 :   if (!SWIG_Python_UnpackTuple(args, "FindFile", 2, 2, swig_obj)) SWIG_fail;
   11283          47 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   11284          47 :   if (!SWIG_IsOK(res1)) {
   11285           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindFile" "', argument " "1"" of type '" "char const *""'");
   11286             :   }
   11287          47 :   arg1 = reinterpret_cast< char * >(buf1);
   11288          47 :   {
   11289             :     /* %typemap(in) (const char *utf8_path) */
   11290          47 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   11291             :     {
   11292          47 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   11293             :     }
   11294             :     else
   11295             :     {
   11296           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   11297             :       
   11298             :     }
   11299          47 :     if (arg2 == NULL)
   11300             :     {
   11301           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11302           0 :       SWIG_fail;
   11303             :     }
   11304             :   }
   11305          47 :   {
   11306          47 :     if (!arg2) {
   11307          47 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11308             :     }
   11309             :   }
   11310          47 :   {
   11311          47 :     const int bLocalUseExceptions = GetUseExceptions();
   11312          47 :     if ( bLocalUseExceptions ) {
   11313          47 :       pushErrorHandler();
   11314             :     }
   11315          47 :     {
   11316          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11317          47 :       result = (char *)CPLFindFile((char const *)arg1,(char const *)arg2);
   11318          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11319             :     }
   11320          47 :     if ( bLocalUseExceptions ) {
   11321          47 :       popErrorHandler();
   11322             :     }
   11323             : #ifndef SED_HACKS
   11324             :     if ( bLocalUseExceptions ) {
   11325             :       CPLErr eclass = CPLGetLastErrorType();
   11326             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11327             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11328             :       }
   11329             :     }
   11330             : #endif
   11331             :   }
   11332          47 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11333          47 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11334          47 :   {
   11335             :     /* %typemap(freearg) (const char *utf8_path) */
   11336          47 :     GDALPythonFreeCStr(arg2, bToFree2);
   11337             :   }
   11338          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; } }
   11339             :   return resultobj;
   11340           0 : fail:
   11341           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11342           0 :   {
   11343             :     /* %typemap(freearg) (const char *utf8_path) */
   11344          47 :     GDALPythonFreeCStr(arg2, bToFree2);
   11345             :   }
   11346             :   return NULL;
   11347             : }
   11348             : 
   11349             : 
   11350        3261 : SWIGINTERN PyObject *_wrap_ReadDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11351        3261 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11352        3261 :   char *arg1 = (char *) 0 ;
   11353        3261 :   int arg2 = (int) 0 ;
   11354        3261 :   int bToFree1 = 0 ;
   11355        3261 :   int val2 ;
   11356        3261 :   int ecode2 = 0 ;
   11357        3261 :   PyObject *swig_obj[2] ;
   11358        3261 :   char **result = 0 ;
   11359             :   
   11360        3261 :   if (!SWIG_Python_UnpackTuple(args, "ReadDir", 1, 2, swig_obj)) SWIG_fail;
   11361        3261 :   {
   11362             :     /* %typemap(in) (const char *utf8_path) */
   11363        3261 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11364             :     {
   11365        3239 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11366             :     }
   11367             :     else
   11368             :     {
   11369          22 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11370             :       
   11371             :     }
   11372        3261 :     if (arg1 == NULL)
   11373             :     {
   11374           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11375           0 :       SWIG_fail;
   11376             :     }
   11377             :   }
   11378        3261 :   if (swig_obj[1]) {
   11379           6 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   11380           6 :     if (!SWIG_IsOK(ecode2)) {
   11381           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReadDir" "', argument " "2"" of type '" "int""'");
   11382             :     } 
   11383             :     arg2 = static_cast< int >(val2);
   11384             :   }
   11385        3261 :   {
   11386        3261 :     if (!arg1) {
   11387        3261 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11388             :     }
   11389             :   }
   11390        3261 :   {
   11391        3261 :     const int bLocalUseExceptions = GetUseExceptions();
   11392        3261 :     if ( bLocalUseExceptions ) {
   11393        2509 :       pushErrorHandler();
   11394             :     }
   11395        3261 :     {
   11396        3261 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11397        3261 :       result = (char **)wrapper_VSIReadDirEx((char const *)arg1,arg2);
   11398        3261 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11399             :     }
   11400        3261 :     if ( bLocalUseExceptions ) {
   11401        2509 :       popErrorHandler();
   11402             :     }
   11403             : #ifndef SED_HACKS
   11404             :     if ( bLocalUseExceptions ) {
   11405             :       CPLErr eclass = CPLGetLastErrorType();
   11406             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11407             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11408             :       }
   11409             :     }
   11410             : #endif
   11411             :   }
   11412        3261 :   {
   11413             :     /* %typemap(out) char **CSL -> ( string ) */
   11414        3261 :     bool bErr = false;
   11415        3261 :     resultobj = CSLToList(result, &bErr);
   11416        3261 :     CSLDestroy(result);
   11417        3261 :     if( bErr ) {
   11418           0 :       SWIG_fail;
   11419             :     }
   11420             :   }
   11421        3261 :   {
   11422             :     /* %typemap(freearg) (const char *utf8_path) */
   11423        3261 :     GDALPythonFreeCStr(arg1, bToFree1);
   11424             :   }
   11425        3293 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11426             :   return resultobj;
   11427           0 : fail:
   11428           0 :   {
   11429             :     /* %typemap(freearg) (const char *utf8_path) */
   11430        3261 :     GDALPythonFreeCStr(arg1, bToFree1);
   11431             :   }
   11432             :   return NULL;
   11433             : }
   11434             : 
   11435             : 
   11436        1133 : SWIGINTERN PyObject *_wrap_ReadDirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11437        1133 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11438        1133 :   char *arg1 = (char *) 0 ;
   11439        1133 :   int bToFree1 = 0 ;
   11440        1133 :   PyObject *swig_obj[1] ;
   11441        1133 :   char **result = 0 ;
   11442             :   
   11443        1133 :   if (!args) SWIG_fail;
   11444        1133 :   swig_obj[0] = args;
   11445        1133 :   {
   11446             :     /* %typemap(in) (const char *utf8_path) */
   11447        1133 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11448             :     {
   11449        1068 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11450             :     }
   11451             :     else
   11452             :     {
   11453          65 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11454             :       
   11455             :     }
   11456        1133 :     if (arg1 == NULL)
   11457             :     {
   11458           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11459           0 :       SWIG_fail;
   11460             :     }
   11461             :   }
   11462        1133 :   {
   11463        1133 :     if (!arg1) {
   11464        1133 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11465             :     }
   11466             :   }
   11467        1133 :   {
   11468        1133 :     const int bLocalUseExceptions = GetUseExceptions();
   11469        1133 :     if ( bLocalUseExceptions ) {
   11470         300 :       pushErrorHandler();
   11471             :     }
   11472        1133 :     {
   11473        1133 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11474        1133 :       result = (char **)VSIReadDirRecursive((char const *)arg1);
   11475        1133 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11476             :     }
   11477        1133 :     if ( bLocalUseExceptions ) {
   11478         300 :       popErrorHandler();
   11479             :     }
   11480             : #ifndef SED_HACKS
   11481             :     if ( bLocalUseExceptions ) {
   11482             :       CPLErr eclass = CPLGetLastErrorType();
   11483             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11484             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11485             :       }
   11486             :     }
   11487             : #endif
   11488             :   }
   11489        1133 :   {
   11490             :     /* %typemap(out) char **CSL -> ( string ) */
   11491        1133 :     bool bErr = false;
   11492        1133 :     resultobj = CSLToList(result, &bErr);
   11493        1133 :     CSLDestroy(result);
   11494        1133 :     if( bErr ) {
   11495           0 :       SWIG_fail;
   11496             :     }
   11497             :   }
   11498        1133 :   {
   11499             :     /* %typemap(freearg) (const char *utf8_path) */
   11500        1133 :     GDALPythonFreeCStr(arg1, bToFree1);
   11501             :   }
   11502        1133 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11503             :   return resultobj;
   11504           0 : fail:
   11505           0 :   {
   11506             :     /* %typemap(freearg) (const char *utf8_path) */
   11507        1133 :     GDALPythonFreeCStr(arg1, bToFree1);
   11508             :   }
   11509             :   return NULL;
   11510             : }
   11511             : 
   11512             : 
   11513          35 : SWIGINTERN PyObject *_wrap_OpenDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11514          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11515          35 :   char *arg1 = (char *) 0 ;
   11516          35 :   int arg2 = (int) -1 ;
   11517          35 :   char **arg3 = (char **) NULL ;
   11518          35 :   int bToFree1 = 0 ;
   11519          35 :   int val2 ;
   11520          35 :   int ecode2 = 0 ;
   11521          35 :   PyObject *swig_obj[3] ;
   11522          35 :   VSIDIR *result = 0 ;
   11523             :   
   11524          35 :   if (!SWIG_Python_UnpackTuple(args, "OpenDir", 1, 3, swig_obj)) SWIG_fail;
   11525          35 :   {
   11526             :     /* %typemap(in) (const char *utf8_path) */
   11527          35 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11528             :     {
   11529          35 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11530             :     }
   11531             :     else
   11532             :     {
   11533           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11534             :       
   11535             :     }
   11536          35 :     if (arg1 == NULL)
   11537             :     {
   11538           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11539           0 :       SWIG_fail;
   11540             :     }
   11541             :   }
   11542          35 :   if (swig_obj[1]) {
   11543          22 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   11544          22 :     if (!SWIG_IsOK(ecode2)) {
   11545           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenDir" "', argument " "2"" of type '" "int""'");
   11546             :     } 
   11547             :     arg2 = static_cast< int >(val2);
   11548             :   }
   11549          35 :   if (swig_obj[2]) {
   11550          18 :     {
   11551             :       /* %typemap(in) char **dict */
   11552          18 :       arg3 = NULL;
   11553          18 :       if ( PySequence_Check( swig_obj[2] ) ) {
   11554          18 :         int bErr = FALSE;
   11555          18 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   11556          18 :         if ( bErr )
   11557             :         {
   11558           0 :           SWIG_fail;
   11559             :         }
   11560             :       }
   11561           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   11562           0 :         int bErr = FALSE;
   11563           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   11564           0 :         if ( bErr )
   11565             :         {
   11566           0 :           SWIG_fail;
   11567             :         }
   11568             :       }
   11569             :       else {
   11570           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   11571           0 :         SWIG_fail;
   11572             :       }
   11573             :     }
   11574             :   }
   11575          35 :   {
   11576          35 :     if (!arg1) {
   11577          35 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11578             :     }
   11579             :   }
   11580          35 :   {
   11581          35 :     const int bLocalUseExceptions = GetUseExceptions();
   11582          35 :     if ( bLocalUseExceptions ) {
   11583           0 :       pushErrorHandler();
   11584             :     }
   11585          35 :     {
   11586          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11587          35 :       result = (VSIDIR *)wrapper_VSIOpenDir((char const *)arg1,arg2,arg3);
   11588          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11589             :     }
   11590          35 :     if ( bLocalUseExceptions ) {
   11591           0 :       popErrorHandler();
   11592             :     }
   11593             : #ifndef SED_HACKS
   11594             :     if ( bLocalUseExceptions ) {
   11595             :       CPLErr eclass = CPLGetLastErrorType();
   11596             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11597             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11598             :       }
   11599             :     }
   11600             : #endif
   11601             :   }
   11602          35 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSIDIR, 0 |  0 );
   11603          35 :   {
   11604             :     /* %typemap(freearg) (const char *utf8_path) */
   11605          35 :     GDALPythonFreeCStr(arg1, bToFree1);
   11606             :   }
   11607          35 :   {
   11608             :     /* %typemap(freearg) char **dict */
   11609          35 :     CSLDestroy( arg3 );
   11610             :   }
   11611          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; } }
   11612             :   return resultobj;
   11613           0 : fail:
   11614           0 :   {
   11615             :     /* %typemap(freearg) (const char *utf8_path) */
   11616           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   11617             :   }
   11618           0 :   {
   11619             :     /* %typemap(freearg) char **dict */
   11620           0 :     CSLDestroy( arg3 );
   11621             :   }
   11622             :   return NULL;
   11623             : }
   11624             : 
   11625             : 
   11626          81 : SWIGINTERN PyObject *_wrap_DirEntry_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11627          81 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11628          81 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11629          81 :   void *argp1 = 0 ;
   11630          81 :   int res1 = 0 ;
   11631          81 :   PyObject *swig_obj[1] ;
   11632          81 :   char *result = 0 ;
   11633             :   
   11634          81 :   if (!args) SWIG_fail;
   11635          81 :   swig_obj[0] = args;
   11636          81 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11637          81 :   if (!SWIG_IsOK(res1)) {
   11638           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_name_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11639             :   }
   11640          81 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11641          81 :   {
   11642          81 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11643          81 :     result = (char *) ((arg1)->name);
   11644          81 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11645             :   }
   11646          81 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11647          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; } }
   11648             :   return resultobj;
   11649             : fail:
   11650             :   return NULL;
   11651             : }
   11652             : 
   11653             : 
   11654          42 : SWIGINTERN PyObject *_wrap_DirEntry_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11655          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11656          42 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11657          42 :   void *argp1 = 0 ;
   11658          42 :   int res1 = 0 ;
   11659          42 :   PyObject *swig_obj[1] ;
   11660          42 :   int result;
   11661             :   
   11662          42 :   if (!args) SWIG_fail;
   11663          42 :   swig_obj[0] = args;
   11664          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11665          42 :   if (!SWIG_IsOK(res1)) {
   11666           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mode_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11667             :   }
   11668          42 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11669          42 :   {
   11670          42 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11671          42 :     result = (int) ((arg1)->mode);
   11672          42 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11673             :   }
   11674          42 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11675          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; } }
   11676             :   return resultobj;
   11677             : fail:
   11678             :   return NULL;
   11679             : }
   11680             : 
   11681             : 
   11682          15 : SWIGINTERN PyObject *_wrap_DirEntry_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11683          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11684          15 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11685          15 :   void *argp1 = 0 ;
   11686          15 :   int res1 = 0 ;
   11687          15 :   PyObject *swig_obj[1] ;
   11688          15 :   GIntBig result;
   11689             :   
   11690          15 :   if (!args) SWIG_fail;
   11691          15 :   swig_obj[0] = args;
   11692          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11693          15 :   if (!SWIG_IsOK(res1)) {
   11694           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_size_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11695             :   }
   11696          15 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11697          15 :   {
   11698          15 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11699          15 :     result =  ((arg1)->size);
   11700          15 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11701             :   }
   11702          15 :   {
   11703          15 :     resultobj = PyLong_FromLongLong(result);
   11704             :   }
   11705          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; } }
   11706             :   return resultobj;
   11707             : fail:
   11708             :   return NULL;
   11709             : }
   11710             : 
   11711             : 
   11712          12 : SWIGINTERN PyObject *_wrap_DirEntry_mtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11713          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11714          12 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11715          12 :   void *argp1 = 0 ;
   11716          12 :   int res1 = 0 ;
   11717          12 :   PyObject *swig_obj[1] ;
   11718          12 :   GIntBig result;
   11719             :   
   11720          12 :   if (!args) SWIG_fail;
   11721          12 :   swig_obj[0] = args;
   11722          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11723          12 :   if (!SWIG_IsOK(res1)) {
   11724           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mtime_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11725             :   }
   11726          12 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11727          12 :   {
   11728          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11729          12 :     result =  ((arg1)->mtime);
   11730          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11731             :   }
   11732          12 :   {
   11733          12 :     resultobj = PyLong_FromLongLong(result);
   11734             :   }
   11735          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; } }
   11736             :   return resultobj;
   11737             : fail:
   11738             :   return NULL;
   11739             : }
   11740             : 
   11741             : 
   11742           2 : SWIGINTERN PyObject *_wrap_DirEntry_modeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11743           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11744           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11745           2 :   void *argp1 = 0 ;
   11746           2 :   int res1 = 0 ;
   11747           2 :   PyObject *swig_obj[1] ;
   11748           2 :   bool result;
   11749             :   
   11750           2 :   if (!args) SWIG_fail;
   11751           2 :   swig_obj[0] = args;
   11752           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11753           2 :   if (!SWIG_IsOK(res1)) {
   11754           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_modeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11755             :   }
   11756           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11757           2 :   {
   11758           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11759           2 :     result = (bool) ((arg1)->modeKnown);
   11760           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11761             :   }
   11762           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11763           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; } }
   11764             :   return resultobj;
   11765             : fail:
   11766             :   return NULL;
   11767             : }
   11768             : 
   11769             : 
   11770           2 : SWIGINTERN PyObject *_wrap_DirEntry_sizeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11771           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11772           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11773           2 :   void *argp1 = 0 ;
   11774           2 :   int res1 = 0 ;
   11775           2 :   PyObject *swig_obj[1] ;
   11776           2 :   bool result;
   11777             :   
   11778           2 :   if (!args) SWIG_fail;
   11779           2 :   swig_obj[0] = args;
   11780           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11781           2 :   if (!SWIG_IsOK(res1)) {
   11782           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_sizeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11783             :   }
   11784           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11785           2 :   {
   11786           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11787           2 :     result = (bool) ((arg1)->sizeKnown);
   11788           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11789             :   }
   11790           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11791           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; } }
   11792             :   return resultobj;
   11793             : fail:
   11794             :   return NULL;
   11795             : }
   11796             : 
   11797             : 
   11798           2 : SWIGINTERN PyObject *_wrap_DirEntry_mtimeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11799           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11800           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11801           2 :   void *argp1 = 0 ;
   11802           2 :   int res1 = 0 ;
   11803           2 :   PyObject *swig_obj[1] ;
   11804           2 :   bool result;
   11805             :   
   11806           2 :   if (!args) SWIG_fail;
   11807           2 :   swig_obj[0] = args;
   11808           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11809           2 :   if (!SWIG_IsOK(res1)) {
   11810           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mtimeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11811             :   }
   11812           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11813           2 :   {
   11814           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11815           2 :     result = (bool) ((arg1)->mtimeKnown);
   11816           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11817             :   }
   11818           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11819           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; } }
   11820             :   return resultobj;
   11821             : fail:
   11822             :   return NULL;
   11823             : }
   11824             : 
   11825             : 
   11826           2 : SWIGINTERN PyObject *_wrap_DirEntry_extra_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11827           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11828           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11829           2 :   void *argp1 = 0 ;
   11830           2 :   int res1 = 0 ;
   11831           2 :   PyObject *swig_obj[1] ;
   11832           2 :   char **result = 0 ;
   11833             :   
   11834           2 :   if (!args) SWIG_fail;
   11835           2 :   swig_obj[0] = args;
   11836           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11837           2 :   if (!SWIG_IsOK(res1)) {
   11838           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_extra_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11839             :   }
   11840           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11841           2 :   {
   11842           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11843           2 :     result = (char **) ((arg1)->extra);
   11844           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11845             :   }
   11846           2 :   {
   11847             :     /* %typemap(out) char **dict */
   11848           2 :     resultobj = GetCSLStringAsPyDict(result, false);
   11849             :   }
   11850           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; } }
   11851             :   return resultobj;
   11852             : fail:
   11853             :   return NULL;
   11854             : }
   11855             : 
   11856             : 
   11857           0 : SWIGINTERN PyObject *_wrap_new_DirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11858           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11859           0 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11860           0 :   void *argp1 = 0 ;
   11861           0 :   int res1 = 0 ;
   11862           0 :   PyObject *swig_obj[1] ;
   11863           0 :   DirEntry *result = 0 ;
   11864             :   
   11865           0 :   if (!args) SWIG_fail;
   11866           0 :   swig_obj[0] = args;
   11867           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11868           0 :   if (!SWIG_IsOK(res1)) {
   11869           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DirEntry" "', argument " "1"" of type '" "DirEntry const *""'"); 
   11870             :   }
   11871           0 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11872           0 :   {
   11873           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11874           0 :     if ( bLocalUseExceptions ) {
   11875           0 :       pushErrorHandler();
   11876             :     }
   11877           0 :     {
   11878           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11879           0 :       result = (DirEntry *)new_DirEntry((DirEntry const *)arg1);
   11880           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11881             :     }
   11882           0 :     if ( bLocalUseExceptions ) {
   11883           0 :       popErrorHandler();
   11884             :     }
   11885             : #ifndef SED_HACKS
   11886             :     if ( bLocalUseExceptions ) {
   11887             :       CPLErr eclass = CPLGetLastErrorType();
   11888             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11889             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11890             :       }
   11891             :     }
   11892             : #endif
   11893             :   }
   11894           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirEntry, SWIG_POINTER_NEW |  0 );
   11895           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; } }
   11896             :   return resultobj;
   11897             : fail:
   11898             :   return NULL;
   11899             : }
   11900             : 
   11901             : 
   11902          79 : SWIGINTERN PyObject *_wrap_delete_DirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11903          79 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11904          79 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11905          79 :   void *argp1 = 0 ;
   11906          79 :   int res1 = 0 ;
   11907          79 :   PyObject *swig_obj[1] ;
   11908             :   
   11909          79 :   if (!args) SWIG_fail;
   11910          79 :   swig_obj[0] = args;
   11911          79 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, SWIG_POINTER_DISOWN |  0 );
   11912          79 :   if (!SWIG_IsOK(res1)) {
   11913           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DirEntry" "', argument " "1"" of type '" "DirEntry *""'"); 
   11914             :   }
   11915          79 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11916          79 :   {
   11917          79 :     const int bLocalUseExceptions = GetUseExceptions();
   11918          79 :     if ( bLocalUseExceptions ) {
   11919           0 :       pushErrorHandler();
   11920             :     }
   11921          79 :     {
   11922          79 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11923          79 :       delete_DirEntry(arg1);
   11924          79 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11925             :     }
   11926          79 :     if ( bLocalUseExceptions ) {
   11927           0 :       popErrorHandler();
   11928             :     }
   11929             : #ifndef SED_HACKS
   11930             :     if ( bLocalUseExceptions ) {
   11931             :       CPLErr eclass = CPLGetLastErrorType();
   11932             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11933             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11934             :       }
   11935             :     }
   11936             : #endif
   11937             :   }
   11938          79 :   resultobj = SWIG_Py_Void();
   11939          79 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11940             :   return resultobj;
   11941             : fail:
   11942             :   return NULL;
   11943             : }
   11944             : 
   11945             : 
   11946           0 : SWIGINTERN PyObject *_wrap_DirEntry_IsDirectory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11947           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11948           0 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11949           0 :   void *argp1 = 0 ;
   11950           0 :   int res1 = 0 ;
   11951           0 :   PyObject *swig_obj[1] ;
   11952           0 :   bool result;
   11953             :   
   11954           0 :   if (!args) SWIG_fail;
   11955           0 :   swig_obj[0] = args;
   11956           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11957           0 :   if (!SWIG_IsOK(res1)) {
   11958           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_IsDirectory" "', argument " "1"" of type '" "DirEntry *""'"); 
   11959             :   }
   11960           0 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11961           0 :   {
   11962           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11963           0 :     if ( bLocalUseExceptions ) {
   11964           0 :       pushErrorHandler();
   11965             :     }
   11966           0 :     {
   11967           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11968           0 :       result = (bool)DirEntry_IsDirectory(arg1);
   11969           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11970             :     }
   11971           0 :     if ( bLocalUseExceptions ) {
   11972           0 :       popErrorHandler();
   11973             :     }
   11974             : #ifndef SED_HACKS
   11975             :     if ( bLocalUseExceptions ) {
   11976             :       CPLErr eclass = CPLGetLastErrorType();
   11977             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11978             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11979             :       }
   11980             :     }
   11981             : #endif
   11982             :   }
   11983           0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11984           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; } }
   11985             :   return resultobj;
   11986             : fail:
   11987             :   return NULL;
   11988             : }
   11989             : 
   11990             : 
   11991         277 : SWIGINTERN PyObject *DirEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11992         277 :   PyObject *obj;
   11993         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   11994         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_DirEntry, SWIG_NewClientData(obj));
   11995         277 :   return SWIG_Py_Void();
   11996             : }
   11997             : 
   11998           0 : SWIGINTERN PyObject *DirEntry_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11999           0 :   return SWIG_Python_InitShadowInstance(args);
   12000             : }
   12001             : 
   12002         112 : SWIGINTERN PyObject *_wrap_GetNextDirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12003         112 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12004         112 :   VSIDIR *arg1 = (VSIDIR *) 0 ;
   12005         112 :   void *argp1 = 0 ;
   12006         112 :   int res1 = 0 ;
   12007         112 :   PyObject *swig_obj[1] ;
   12008         112 :   DirEntry *result = 0 ;
   12009             :   
   12010         112 :   if (!args) SWIG_fail;
   12011         112 :   swig_obj[0] = args;
   12012         112 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSIDIR, 0 |  0 );
   12013         112 :   if (!SWIG_IsOK(res1)) {
   12014           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetNextDirEntry" "', argument " "1"" of type '" "VSIDIR *""'"); 
   12015             :   }
   12016         112 :   arg1 = reinterpret_cast< VSIDIR * >(argp1);
   12017         112 :   {
   12018         112 :     if (!arg1) {
   12019           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12020             :     }
   12021             :   }
   12022         112 :   {
   12023         112 :     const int bLocalUseExceptions = GetUseExceptions();
   12024         112 :     if ( bLocalUseExceptions ) {
   12025           0 :       pushErrorHandler();
   12026             :     }
   12027         112 :     {
   12028         112 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12029         112 :       result = (DirEntry *)wrapper_VSIGetNextDirEntry(arg1);
   12030         112 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12031             :     }
   12032         112 :     if ( bLocalUseExceptions ) {
   12033           0 :       popErrorHandler();
   12034             :     }
   12035             : #ifndef SED_HACKS
   12036             :     if ( bLocalUseExceptions ) {
   12037             :       CPLErr eclass = CPLGetLastErrorType();
   12038             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12039             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12040             :       }
   12041             :     }
   12042             : #endif
   12043             :   }
   12044         112 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirEntry, SWIG_POINTER_OWN |  0 );
   12045         112 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12046             :   return resultobj;
   12047             : fail:
   12048             :   return NULL;
   12049             : }
   12050             : 
   12051             : 
   12052          33 : SWIGINTERN PyObject *_wrap_CloseDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12053          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12054          33 :   VSIDIR *arg1 = (VSIDIR *) 0 ;
   12055          33 :   void *argp1 = 0 ;
   12056          33 :   int res1 = 0 ;
   12057          33 :   PyObject *swig_obj[1] ;
   12058             :   
   12059          33 :   if (!args) SWIG_fail;
   12060          33 :   swig_obj[0] = args;
   12061          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSIDIR, 0 |  0 );
   12062          33 :   if (!SWIG_IsOK(res1)) {
   12063           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CloseDir" "', argument " "1"" of type '" "VSIDIR *""'"); 
   12064             :   }
   12065          33 :   arg1 = reinterpret_cast< VSIDIR * >(argp1);
   12066          33 :   {
   12067          33 :     if (!arg1) {
   12068           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12069             :     }
   12070             :   }
   12071          33 :   {
   12072          33 :     const int bLocalUseExceptions = GetUseExceptions();
   12073          33 :     if ( bLocalUseExceptions ) {
   12074           0 :       pushErrorHandler();
   12075             :     }
   12076          33 :     {
   12077          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12078          33 :       VSICloseDir(arg1);
   12079          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12080             :     }
   12081          33 :     if ( bLocalUseExceptions ) {
   12082           0 :       popErrorHandler();
   12083             :     }
   12084             : #ifndef SED_HACKS
   12085             :     if ( bLocalUseExceptions ) {
   12086             :       CPLErr eclass = CPLGetLastErrorType();
   12087             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12088             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12089             :       }
   12090             :     }
   12091             : #endif
   12092             :   }
   12093          33 :   resultobj = SWIG_Py_Void();
   12094          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; } }
   12095             :   return resultobj;
   12096             : fail:
   12097             :   return NULL;
   12098             : }
   12099             : 
   12100             : 
   12101        4211 : SWIGINTERN PyObject *_wrap_SetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12102        4211 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12103        4211 :   char *arg1 = (char *) 0 ;
   12104        4211 :   char *arg2 = (char *) 0 ;
   12105        4211 :   int res1 ;
   12106        4211 :   char *buf1 = 0 ;
   12107        4211 :   int alloc1 = 0 ;
   12108        4211 :   int res2 ;
   12109        4211 :   char *buf2 = 0 ;
   12110        4211 :   int alloc2 = 0 ;
   12111        4211 :   PyObject *swig_obj[2] ;
   12112             :   
   12113        4211 :   if (!SWIG_Python_UnpackTuple(args, "SetConfigOption", 2, 2, swig_obj)) SWIG_fail;
   12114        4211 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12115        4211 :   if (!SWIG_IsOK(res1)) {
   12116           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetConfigOption" "', argument " "1"" of type '" "char const *""'");
   12117             :   }
   12118        4211 :   arg1 = reinterpret_cast< char * >(buf1);
   12119        4211 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12120        4211 :   if (!SWIG_IsOK(res2)) {
   12121           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetConfigOption" "', argument " "2"" of type '" "char const *""'");
   12122             :   }
   12123        4211 :   arg2 = reinterpret_cast< char * >(buf2);
   12124        4211 :   {
   12125        4211 :     if (!arg1) {
   12126           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12127             :     }
   12128             :   }
   12129        4211 :   {
   12130        4211 :     const int bLocalUseExceptions = GetUseExceptions();
   12131        4211 :     if ( bLocalUseExceptions ) {
   12132         227 :       pushErrorHandler();
   12133             :     }
   12134        4211 :     {
   12135        4211 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12136        4211 :       CPLSetConfigOption((char const *)arg1,(char const *)arg2);
   12137        4211 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12138             :     }
   12139        4211 :     if ( bLocalUseExceptions ) {
   12140         227 :       popErrorHandler();
   12141             :     }
   12142             : #ifndef SED_HACKS
   12143             :     if ( bLocalUseExceptions ) {
   12144             :       CPLErr eclass = CPLGetLastErrorType();
   12145             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12146             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12147             :       }
   12148             :     }
   12149             : #endif
   12150             :   }
   12151        4211 :   resultobj = SWIG_Py_Void();
   12152        4211 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12153        4211 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12154        4211 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12155             :   return resultobj;
   12156           0 : fail:
   12157           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12158           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12159             :   return NULL;
   12160             : }
   12161             : 
   12162             : 
   12163        6018 : SWIGINTERN PyObject *_wrap_SetThreadLocalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12164        6018 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12165        6018 :   char *arg1 = (char *) 0 ;
   12166        6018 :   char *arg2 = (char *) 0 ;
   12167        6018 :   int res1 ;
   12168        6018 :   char *buf1 = 0 ;
   12169        6018 :   int alloc1 = 0 ;
   12170        6018 :   int res2 ;
   12171        6018 :   char *buf2 = 0 ;
   12172        6018 :   int alloc2 = 0 ;
   12173        6018 :   PyObject *swig_obj[2] ;
   12174             :   
   12175        6018 :   if (!SWIG_Python_UnpackTuple(args, "SetThreadLocalConfigOption", 2, 2, swig_obj)) SWIG_fail;
   12176        6018 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12177        6018 :   if (!SWIG_IsOK(res1)) {
   12178           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetThreadLocalConfigOption" "', argument " "1"" of type '" "char const *""'");
   12179             :   }
   12180        6018 :   arg1 = reinterpret_cast< char * >(buf1);
   12181        6018 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12182        6018 :   if (!SWIG_IsOK(res2)) {
   12183           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetThreadLocalConfigOption" "', argument " "2"" of type '" "char const *""'");
   12184             :   }
   12185        6018 :   arg2 = reinterpret_cast< char * >(buf2);
   12186        6018 :   {
   12187        6018 :     if (!arg1) {
   12188           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12189             :     }
   12190             :   }
   12191        6018 :   {
   12192        6018 :     const int bLocalUseExceptions = GetUseExceptions();
   12193        6018 :     if ( bLocalUseExceptions ) {
   12194        2978 :       pushErrorHandler();
   12195             :     }
   12196        6018 :     {
   12197        6018 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12198        6018 :       CPLSetThreadLocalConfigOption((char const *)arg1,(char const *)arg2);
   12199        6018 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12200             :     }
   12201        6018 :     if ( bLocalUseExceptions ) {
   12202        2978 :       popErrorHandler();
   12203             :     }
   12204             : #ifndef SED_HACKS
   12205             :     if ( bLocalUseExceptions ) {
   12206             :       CPLErr eclass = CPLGetLastErrorType();
   12207             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12208             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12209             :       }
   12210             :     }
   12211             : #endif
   12212             :   }
   12213        6018 :   resultobj = SWIG_Py_Void();
   12214        6018 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12215        6018 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12216        6018 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12217             :   return resultobj;
   12218           0 : fail:
   12219           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12220           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12221             :   return NULL;
   12222             : }
   12223             : 
   12224             : 
   12225       22233 : SWIGINTERN PyObject *_wrap_GetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12226       22233 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12227       22233 :   char *arg1 = (char *) 0 ;
   12228       22233 :   char *arg2 = (char *) NULL ;
   12229       22233 :   int res1 ;
   12230       22233 :   char *buf1 = 0 ;
   12231       22233 :   int alloc1 = 0 ;
   12232       22233 :   int res2 ;
   12233       22233 :   char *buf2 = 0 ;
   12234       22233 :   int alloc2 = 0 ;
   12235       22233 :   PyObject *swig_obj[2] ;
   12236       22233 :   char *result = 0 ;
   12237             :   
   12238       22233 :   if (!SWIG_Python_UnpackTuple(args, "GetConfigOption", 1, 2, swig_obj)) SWIG_fail;
   12239       22233 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12240       22233 :   if (!SWIG_IsOK(res1)) {
   12241           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetConfigOption" "', argument " "1"" of type '" "char const *""'");
   12242             :   }
   12243       22233 :   arg1 = reinterpret_cast< char * >(buf1);
   12244       22233 :   if (swig_obj[1]) {
   12245        1018 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12246        1018 :     if (!SWIG_IsOK(res2)) {
   12247           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetConfigOption" "', argument " "2"" of type '" "char const *""'");
   12248             :     }
   12249        1018 :     arg2 = reinterpret_cast< char * >(buf2);
   12250             :   }
   12251       22233 :   {
   12252       22233 :     if (!arg1) {
   12253           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12254             :     }
   12255             :   }
   12256       22233 :   {
   12257       22233 :     const int bLocalUseExceptions = GetUseExceptions();
   12258       22233 :     if ( bLocalUseExceptions ) {
   12259       21725 :       pushErrorHandler();
   12260             :     }
   12261       22233 :     {
   12262       22233 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12263       22233 :       result = (char *)wrapper_CPLGetConfigOption((char const *)arg1,(char const *)arg2);
   12264       22233 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12265             :     }
   12266       22233 :     if ( bLocalUseExceptions ) {
   12267       21725 :       popErrorHandler();
   12268             :     }
   12269             : #ifndef SED_HACKS
   12270             :     if ( bLocalUseExceptions ) {
   12271             :       CPLErr eclass = CPLGetLastErrorType();
   12272             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12273             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12274             :       }
   12275             :     }
   12276             : #endif
   12277             :   }
   12278       22233 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12279       22233 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12280       22233 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12281       22233 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12282             :   return resultobj;
   12283           0 : fail:
   12284           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12285           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12286             :   return NULL;
   12287             : }
   12288             : 
   12289             : 
   12290        1923 : SWIGINTERN PyObject *_wrap_GetGlobalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12291        1923 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12292        1923 :   char *arg1 = (char *) 0 ;
   12293        1923 :   char *arg2 = (char *) NULL ;
   12294        1923 :   int res1 ;
   12295        1923 :   char *buf1 = 0 ;
   12296        1923 :   int alloc1 = 0 ;
   12297        1923 :   int res2 ;
   12298        1923 :   char *buf2 = 0 ;
   12299        1923 :   int alloc2 = 0 ;
   12300        1923 :   PyObject *swig_obj[2] ;
   12301        1923 :   char *result = 0 ;
   12302             :   
   12303        1923 :   if (!SWIG_Python_UnpackTuple(args, "GetGlobalConfigOption", 1, 2, swig_obj)) SWIG_fail;
   12304        1923 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12305        1923 :   if (!SWIG_IsOK(res1)) {
   12306           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetGlobalConfigOption" "', argument " "1"" of type '" "char const *""'");
   12307             :   }
   12308        1923 :   arg1 = reinterpret_cast< char * >(buf1);
   12309        1923 :   if (swig_obj[1]) {
   12310           0 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12311           0 :     if (!SWIG_IsOK(res2)) {
   12312           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetGlobalConfigOption" "', argument " "2"" of type '" "char const *""'");
   12313             :     }
   12314           0 :     arg2 = reinterpret_cast< char * >(buf2);
   12315             :   }
   12316        1923 :   {
   12317        1923 :     if (!arg1) {
   12318           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12319             :     }
   12320             :   }
   12321        1923 :   {
   12322        1923 :     const int bLocalUseExceptions = GetUseExceptions();
   12323        1923 :     if ( bLocalUseExceptions ) {
   12324          68 :       pushErrorHandler();
   12325             :     }
   12326        1923 :     {
   12327        1923 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12328        1923 :       result = (char *)wrapper_CPLGetGlobalConfigOption((char const *)arg1,(char const *)arg2);
   12329        1923 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12330             :     }
   12331        1923 :     if ( bLocalUseExceptions ) {
   12332          68 :       popErrorHandler();
   12333             :     }
   12334             : #ifndef SED_HACKS
   12335             :     if ( bLocalUseExceptions ) {
   12336             :       CPLErr eclass = CPLGetLastErrorType();
   12337             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12338             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12339             :       }
   12340             :     }
   12341             : #endif
   12342             :   }
   12343        1923 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12344        1923 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12345        1923 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12346        1923 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = 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 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12350           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12351             :   return NULL;
   12352             : }
   12353             : 
   12354             : 
   12355        3014 : SWIGINTERN PyObject *_wrap_GetThreadLocalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12356        3014 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12357        3014 :   char *arg1 = (char *) 0 ;
   12358        3014 :   char *arg2 = (char *) NULL ;
   12359        3014 :   int res1 ;
   12360        3014 :   char *buf1 = 0 ;
   12361        3014 :   int alloc1 = 0 ;
   12362        3014 :   int res2 ;
   12363        3014 :   char *buf2 = 0 ;
   12364        3014 :   int alloc2 = 0 ;
   12365        3014 :   PyObject *swig_obj[2] ;
   12366        3014 :   char *result = 0 ;
   12367             :   
   12368        3014 :   if (!SWIG_Python_UnpackTuple(args, "GetThreadLocalConfigOption", 1, 2, swig_obj)) SWIG_fail;
   12369        3014 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12370        3014 :   if (!SWIG_IsOK(res1)) {
   12371           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetThreadLocalConfigOption" "', argument " "1"" of type '" "char const *""'");
   12372             :   }
   12373        3014 :   arg1 = reinterpret_cast< char * >(buf1);
   12374        3014 :   if (swig_obj[1]) {
   12375           0 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12376           0 :     if (!SWIG_IsOK(res2)) {
   12377           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetThreadLocalConfigOption" "', argument " "2"" of type '" "char const *""'");
   12378             :     }
   12379           0 :     arg2 = reinterpret_cast< char * >(buf2);
   12380             :   }
   12381        3014 :   {
   12382        3014 :     if (!arg1) {
   12383           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12384             :     }
   12385             :   }
   12386        3014 :   {
   12387        3014 :     const int bLocalUseExceptions = GetUseExceptions();
   12388        3014 :     if ( bLocalUseExceptions ) {
   12389        1489 :       pushErrorHandler();
   12390             :     }
   12391        3014 :     {
   12392        3014 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12393        3014 :       result = (char *)wrapper_CPLGetThreadLocalConfigOption((char const *)arg1,(char const *)arg2);
   12394        3014 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12395             :     }
   12396        3014 :     if ( bLocalUseExceptions ) {
   12397        1489 :       popErrorHandler();
   12398             :     }
   12399             : #ifndef SED_HACKS
   12400             :     if ( bLocalUseExceptions ) {
   12401             :       CPLErr eclass = CPLGetLastErrorType();
   12402             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12403             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12404             :       }
   12405             :     }
   12406             : #endif
   12407             :   }
   12408        3014 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12409        3014 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12410        3014 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12411        3014 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12412             :   return resultobj;
   12413           0 : fail:
   12414           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12415           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12416             :   return NULL;
   12417             : }
   12418             : 
   12419             : 
   12420           6 : SWIGINTERN PyObject *_wrap_GetConfigOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12421           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12422           6 :   char **result = 0 ;
   12423             :   
   12424           6 :   if (!SWIG_Python_UnpackTuple(args, "GetConfigOptions", 0, 0, 0)) SWIG_fail;
   12425           6 :   {
   12426           6 :     const int bLocalUseExceptions = GetUseExceptions();
   12427           6 :     if ( bLocalUseExceptions ) {
   12428           0 :       pushErrorHandler();
   12429             :     }
   12430           6 :     {
   12431           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12432           6 :       result = (char **)wrapper_GetConfigOptions();
   12433           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12434             :     }
   12435           6 :     if ( bLocalUseExceptions ) {
   12436           0 :       popErrorHandler();
   12437             :     }
   12438             : #ifndef SED_HACKS
   12439             :     if ( bLocalUseExceptions ) {
   12440             :       CPLErr eclass = CPLGetLastErrorType();
   12441             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12442             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12443             :       }
   12444             :     }
   12445             : #endif
   12446             :   }
   12447           6 :   {
   12448             :     /* %typemap(out) char **dict */
   12449           6 :     resultobj = GetCSLStringAsPyDict(result, true);
   12450             :   }
   12451           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; } }
   12452             :   return resultobj;
   12453           0 : fail:
   12454           0 :   return NULL;
   12455             : }
   12456             : 
   12457             : 
   12458          31 : SWIGINTERN PyObject *_wrap_SetPathSpecificOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12459          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12460          31 :   char *arg1 = (char *) 0 ;
   12461          31 :   char *arg2 = (char *) 0 ;
   12462          31 :   char *arg3 = (char *) 0 ;
   12463          31 :   int res1 ;
   12464          31 :   char *buf1 = 0 ;
   12465          31 :   int alloc1 = 0 ;
   12466          31 :   int res2 ;
   12467          31 :   char *buf2 = 0 ;
   12468          31 :   int alloc2 = 0 ;
   12469          31 :   int res3 ;
   12470          31 :   char *buf3 = 0 ;
   12471          31 :   int alloc3 = 0 ;
   12472          31 :   PyObject *swig_obj[3] ;
   12473             :   
   12474          31 :   if (!SWIG_Python_UnpackTuple(args, "SetPathSpecificOption", 3, 3, swig_obj)) SWIG_fail;
   12475          31 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12476          31 :   if (!SWIG_IsOK(res1)) {
   12477           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetPathSpecificOption" "', argument " "1"" of type '" "char const *""'");
   12478             :   }
   12479          31 :   arg1 = reinterpret_cast< char * >(buf1);
   12480          31 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12481          31 :   if (!SWIG_IsOK(res2)) {
   12482           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetPathSpecificOption" "', argument " "2"" of type '" "char const *""'");
   12483             :   }
   12484          31 :   arg2 = reinterpret_cast< char * >(buf2);
   12485          31 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12486          31 :   if (!SWIG_IsOK(res3)) {
   12487           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetPathSpecificOption" "', argument " "3"" of type '" "char const *""'");
   12488             :   }
   12489          31 :   arg3 = reinterpret_cast< char * >(buf3);
   12490          31 :   {
   12491          31 :     if (!arg1) {
   12492           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12493             :     }
   12494             :   }
   12495          30 :   {
   12496          30 :     if (!arg2) {
   12497           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12498             :     }
   12499             :   }
   12500          29 :   {
   12501          29 :     const int bLocalUseExceptions = GetUseExceptions();
   12502          29 :     if ( bLocalUseExceptions ) {
   12503          19 :       pushErrorHandler();
   12504             :     }
   12505          29 :     {
   12506          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12507          29 :       VSISetPathSpecificOption((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12508          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12509             :     }
   12510          29 :     if ( bLocalUseExceptions ) {
   12511          19 :       popErrorHandler();
   12512             :     }
   12513             : #ifndef SED_HACKS
   12514             :     if ( bLocalUseExceptions ) {
   12515             :       CPLErr eclass = CPLGetLastErrorType();
   12516             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12517             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12518             :       }
   12519             :     }
   12520             : #endif
   12521             :   }
   12522          29 :   resultobj = SWIG_Py_Void();
   12523          29 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12524          29 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12525          29 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12526          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; } }
   12527             :   return resultobj;
   12528           2 : fail:
   12529           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12530           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12531           2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12532             :   return NULL;
   12533             : }
   12534             : 
   12535             : 
   12536          56 : SWIGINTERN PyObject *_wrap_SetCredential(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12537          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12538          56 :   char *arg1 = (char *) 0 ;
   12539          56 :   char *arg2 = (char *) 0 ;
   12540          56 :   char *arg3 = (char *) 0 ;
   12541          56 :   int res1 ;
   12542          56 :   char *buf1 = 0 ;
   12543          56 :   int alloc1 = 0 ;
   12544          56 :   int res2 ;
   12545          56 :   char *buf2 = 0 ;
   12546          56 :   int alloc2 = 0 ;
   12547          56 :   int res3 ;
   12548          56 :   char *buf3 = 0 ;
   12549          56 :   int alloc3 = 0 ;
   12550          56 :   PyObject *swig_obj[3] ;
   12551             :   
   12552          56 :   if (!SWIG_Python_UnpackTuple(args, "SetCredential", 3, 3, swig_obj)) SWIG_fail;
   12553          56 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12554          56 :   if (!SWIG_IsOK(res1)) {
   12555           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetCredential" "', argument " "1"" of type '" "char const *""'");
   12556             :   }
   12557          56 :   arg1 = reinterpret_cast< char * >(buf1);
   12558          56 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12559          56 :   if (!SWIG_IsOK(res2)) {
   12560           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetCredential" "', argument " "2"" of type '" "char const *""'");
   12561             :   }
   12562          56 :   arg2 = reinterpret_cast< char * >(buf2);
   12563          56 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12564          56 :   if (!SWIG_IsOK(res3)) {
   12565           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetCredential" "', argument " "3"" of type '" "char const *""'");
   12566             :   }
   12567          56 :   arg3 = reinterpret_cast< char * >(buf3);
   12568          56 :   {
   12569          56 :     if (!arg1) {
   12570           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12571             :     }
   12572             :   }
   12573          56 :   {
   12574          56 :     if (!arg2) {
   12575           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12576             :     }
   12577             :   }
   12578          56 :   {
   12579          56 :     const int bLocalUseExceptions = GetUseExceptions();
   12580          56 :     if ( bLocalUseExceptions ) {
   12581           0 :       pushErrorHandler();
   12582             :     }
   12583          56 :     {
   12584          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12585          56 :       wrapper_VSISetCredential((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12586          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12587             :     }
   12588          56 :     if ( bLocalUseExceptions ) {
   12589           0 :       popErrorHandler();
   12590             :     }
   12591             : #ifndef SED_HACKS
   12592             :     if ( bLocalUseExceptions ) {
   12593             :       CPLErr eclass = CPLGetLastErrorType();
   12594             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12595             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12596             :       }
   12597             :     }
   12598             : #endif
   12599             :   }
   12600          56 :   resultobj = SWIG_Py_Void();
   12601          56 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12602          56 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12603          56 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12604          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; } }
   12605             :   return resultobj;
   12606           0 : fail:
   12607           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12608           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12609           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12610             :   return NULL;
   12611             : }
   12612             : 
   12613             : 
   12614           0 : SWIGINTERN PyObject *_wrap_GetCredential(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12615           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12616           0 :   char *arg1 = (char *) 0 ;
   12617           0 :   char *arg2 = (char *) 0 ;
   12618           0 :   char *arg3 = (char *) NULL ;
   12619           0 :   int res1 ;
   12620           0 :   char *buf1 = 0 ;
   12621           0 :   int alloc1 = 0 ;
   12622           0 :   int res2 ;
   12623           0 :   char *buf2 = 0 ;
   12624           0 :   int alloc2 = 0 ;
   12625           0 :   int res3 ;
   12626           0 :   char *buf3 = 0 ;
   12627           0 :   int alloc3 = 0 ;
   12628           0 :   PyObject *swig_obj[3] ;
   12629           0 :   char *result = 0 ;
   12630             :   
   12631           0 :   if (!SWIG_Python_UnpackTuple(args, "GetCredential", 2, 3, swig_obj)) SWIG_fail;
   12632           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12633           0 :   if (!SWIG_IsOK(res1)) {
   12634           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCredential" "', argument " "1"" of type '" "char const *""'");
   12635             :   }
   12636           0 :   arg1 = reinterpret_cast< char * >(buf1);
   12637           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12638           0 :   if (!SWIG_IsOK(res2)) {
   12639           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetCredential" "', argument " "2"" of type '" "char const *""'");
   12640             :   }
   12641           0 :   arg2 = reinterpret_cast< char * >(buf2);
   12642           0 :   if (swig_obj[2]) {
   12643           0 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12644           0 :     if (!SWIG_IsOK(res3)) {
   12645           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GetCredential" "', argument " "3"" of type '" "char const *""'");
   12646             :     }
   12647           0 :     arg3 = reinterpret_cast< char * >(buf3);
   12648             :   }
   12649           0 :   {
   12650           0 :     if (!arg1) {
   12651           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12652             :     }
   12653             :   }
   12654           0 :   {
   12655           0 :     if (!arg2) {
   12656           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12657             :     }
   12658             :   }
   12659           0 :   {
   12660           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12661           0 :     if ( bLocalUseExceptions ) {
   12662           0 :       pushErrorHandler();
   12663             :     }
   12664           0 :     {
   12665           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12666           0 :       result = (char *)wrapper_VSIGetCredential((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12667           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12668             :     }
   12669           0 :     if ( bLocalUseExceptions ) {
   12670           0 :       popErrorHandler();
   12671             :     }
   12672             : #ifndef SED_HACKS
   12673             :     if ( bLocalUseExceptions ) {
   12674             :       CPLErr eclass = CPLGetLastErrorType();
   12675             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12676             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12677             :       }
   12678             :     }
   12679             : #endif
   12680             :   }
   12681           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12682           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12683           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12684           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12685           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; } }
   12686             :   return resultobj;
   12687           0 : fail:
   12688           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12689           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12690           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12691             :   return NULL;
   12692             : }
   12693             : 
   12694             : 
   12695          12 : SWIGINTERN PyObject *_wrap_GetPathSpecificOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12696          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12697          12 :   char *arg1 = (char *) 0 ;
   12698          12 :   char *arg2 = (char *) 0 ;
   12699          12 :   char *arg3 = (char *) NULL ;
   12700          12 :   int res1 ;
   12701          12 :   char *buf1 = 0 ;
   12702          12 :   int alloc1 = 0 ;
   12703          12 :   int res2 ;
   12704          12 :   char *buf2 = 0 ;
   12705          12 :   int alloc2 = 0 ;
   12706          12 :   int res3 ;
   12707          12 :   char *buf3 = 0 ;
   12708          12 :   int alloc3 = 0 ;
   12709          12 :   PyObject *swig_obj[3] ;
   12710          12 :   char *result = 0 ;
   12711             :   
   12712          12 :   if (!SWIG_Python_UnpackTuple(args, "GetPathSpecificOption", 2, 3, swig_obj)) SWIG_fail;
   12713          12 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12714          12 :   if (!SWIG_IsOK(res1)) {
   12715           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetPathSpecificOption" "', argument " "1"" of type '" "char const *""'");
   12716             :   }
   12717          12 :   arg1 = reinterpret_cast< char * >(buf1);
   12718          12 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12719          12 :   if (!SWIG_IsOK(res2)) {
   12720           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetPathSpecificOption" "', argument " "2"" of type '" "char const *""'");
   12721             :   }
   12722          12 :   arg2 = reinterpret_cast< char * >(buf2);
   12723          12 :   if (swig_obj[2]) {
   12724           2 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12725           2 :     if (!SWIG_IsOK(res3)) {
   12726           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GetPathSpecificOption" "', argument " "3"" of type '" "char const *""'");
   12727             :     }
   12728           2 :     arg3 = reinterpret_cast< char * >(buf3);
   12729             :   }
   12730          12 :   {
   12731          12 :     if (!arg1) {
   12732           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12733             :     }
   12734             :   }
   12735          11 :   {
   12736          11 :     if (!arg2) {
   12737           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12738             :     }
   12739             :   }
   12740          10 :   {
   12741          10 :     const int bLocalUseExceptions = GetUseExceptions();
   12742          10 :     if ( bLocalUseExceptions ) {
   12743          10 :       pushErrorHandler();
   12744             :     }
   12745          10 :     {
   12746          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12747          10 :       result = (char *)wrapper_VSIGetPathSpecificOption((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12748          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12749             :     }
   12750          10 :     if ( bLocalUseExceptions ) {
   12751          10 :       popErrorHandler();
   12752             :     }
   12753             : #ifndef SED_HACKS
   12754             :     if ( bLocalUseExceptions ) {
   12755             :       CPLErr eclass = CPLGetLastErrorType();
   12756             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12757             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12758             :       }
   12759             :     }
   12760             : #endif
   12761             :   }
   12762          10 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12763          10 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12764          10 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12765          10 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12766          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; } }
   12767             :   return resultobj;
   12768           2 : fail:
   12769           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12770           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12771           2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12772             :   return NULL;
   12773             : }
   12774             : 
   12775             : 
   12776           8 : SWIGINTERN PyObject *_wrap_ClearCredentials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12777           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12778           8 :   char *arg1 = (char *) NULL ;
   12779           8 :   int res1 ;
   12780           8 :   char *buf1 = 0 ;
   12781           8 :   int alloc1 = 0 ;
   12782           8 :   PyObject *swig_obj[1] ;
   12783             :   
   12784           8 :   if (!SWIG_Python_UnpackTuple(args, "ClearCredentials", 0, 1, swig_obj)) SWIG_fail;
   12785           8 :   if (swig_obj[0]) {
   12786           8 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12787           8 :     if (!SWIG_IsOK(res1)) {
   12788           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClearCredentials" "', argument " "1"" of type '" "char const *""'");
   12789             :     }
   12790           8 :     arg1 = reinterpret_cast< char * >(buf1);
   12791             :   }
   12792           8 :   {
   12793           8 :     const int bLocalUseExceptions = GetUseExceptions();
   12794           8 :     if ( bLocalUseExceptions ) {
   12795           0 :       pushErrorHandler();
   12796             :     }
   12797           8 :     {
   12798           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12799           8 :       wrapper_VSIClearCredentials((char const *)arg1);
   12800           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12801             :     }
   12802           8 :     if ( bLocalUseExceptions ) {
   12803           0 :       popErrorHandler();
   12804             :     }
   12805             : #ifndef SED_HACKS
   12806             :     if ( bLocalUseExceptions ) {
   12807             :       CPLErr eclass = CPLGetLastErrorType();
   12808             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12809             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12810             :       }
   12811             :     }
   12812             : #endif
   12813             :   }
   12814           8 :   resultobj = SWIG_Py_Void();
   12815           8 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12816           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; } }
   12817             :   return resultobj;
   12818           0 : fail:
   12819           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12820             :   return NULL;
   12821             : }
   12822             : 
   12823             : 
   12824          10 : SWIGINTERN PyObject *_wrap_ClearPathSpecificOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12825          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12826          10 :   char *arg1 = (char *) NULL ;
   12827          10 :   int res1 ;
   12828          10 :   char *buf1 = 0 ;
   12829          10 :   int alloc1 = 0 ;
   12830          10 :   PyObject *swig_obj[1] ;
   12831             :   
   12832          10 :   if (!SWIG_Python_UnpackTuple(args, "ClearPathSpecificOptions", 0, 1, swig_obj)) SWIG_fail;
   12833          10 :   if (swig_obj[0]) {
   12834           7 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12835           7 :     if (!SWIG_IsOK(res1)) {
   12836           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClearPathSpecificOptions" "', argument " "1"" of type '" "char const *""'");
   12837             :     }
   12838           7 :     arg1 = reinterpret_cast< char * >(buf1);
   12839             :   }
   12840          10 :   {
   12841          10 :     const int bLocalUseExceptions = GetUseExceptions();
   12842          10 :     if ( bLocalUseExceptions ) {
   12843           5 :       pushErrorHandler();
   12844             :     }
   12845          10 :     {
   12846          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12847          10 :       wrapper_VSIClearPathSpecificOptions((char const *)arg1);
   12848          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12849             :     }
   12850          10 :     if ( bLocalUseExceptions ) {
   12851           5 :       popErrorHandler();
   12852             :     }
   12853             : #ifndef SED_HACKS
   12854             :     if ( bLocalUseExceptions ) {
   12855             :       CPLErr eclass = CPLGetLastErrorType();
   12856             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12857             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12858             :       }
   12859             :     }
   12860             : #endif
   12861             :   }
   12862          10 :   resultobj = SWIG_Py_Void();
   12863          10 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12864          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; } }
   12865             :   return resultobj;
   12866           0 : fail:
   12867           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12868             :   return NULL;
   12869             : }
   12870             : 
   12871             : 
   12872           0 : SWIGINTERN PyObject *_wrap_CPLBinaryToHex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12873           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12874           0 :   int arg1 ;
   12875           0 :   GByte *arg2 = (GByte *) 0 ;
   12876           0 :   int alloc1 = 0 ;
   12877           0 :   bool viewIsValid1 = false ;
   12878           0 :   Py_buffer view1 ;
   12879           0 :   PyObject *swig_obj[1] ;
   12880           0 :   retStringAndCPLFree *result = 0 ;
   12881             :   
   12882           0 :   if (!args) SWIG_fail;
   12883           0 :   swig_obj[0] = args;
   12884           0 :   {
   12885             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   12886           0 :     char* ptr = NULL;
   12887           0 :     if( !GetBufferAsCharPtrIntSize(swig_obj[0], &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   12888           0 :       SWIG_fail;
   12889             :     }
   12890           0 :     arg2 = (GByte *)ptr;
   12891             :   }
   12892           0 :   {
   12893           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12894           0 :     if ( bLocalUseExceptions ) {
   12895           0 :       pushErrorHandler();
   12896             :     }
   12897           0 :     {
   12898           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12899           0 :       result = (retStringAndCPLFree *)CPLBinaryToHex(arg1,(GByte const *)arg2);
   12900           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12901             :     }
   12902           0 :     if ( bLocalUseExceptions ) {
   12903           0 :       popErrorHandler();
   12904             :     }
   12905             : #ifndef SED_HACKS
   12906             :     if ( bLocalUseExceptions ) {
   12907             :       CPLErr eclass = CPLGetLastErrorType();
   12908             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12909             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12910             :       }
   12911             :     }
   12912             : #endif
   12913             :   }
   12914           0 :   {
   12915             :     /* %typemap(out) (retStringAndCPLFree*) */
   12916           0 :     Py_XDECREF(resultobj);
   12917           0 :     if(result)
   12918             :     {
   12919           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   12920           0 :       CPLFree(result);
   12921             :     }
   12922             :     else
   12923             :     {
   12924           0 :       resultobj = Py_None;
   12925           0 :       Py_INCREF(resultobj);
   12926             :     }
   12927             :   }
   12928           0 :   {
   12929             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   12930           0 :     if( viewIsValid1 ) {
   12931           0 :       PyBuffer_Release(&view1);
   12932             :     }
   12933           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   12934           0 :       delete[] arg2;
   12935             :     }
   12936             :   }
   12937           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; } }
   12938             :   return resultobj;
   12939           0 : fail:
   12940           0 :   {
   12941             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   12942           0 :     if( viewIsValid1 ) {
   12943           0 :       PyBuffer_Release(&view1);
   12944             :     }
   12945           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   12946             :       delete[] arg2;
   12947             :     }
   12948             :   }
   12949             :   return NULL;
   12950             : }
   12951             : 
   12952             : 
   12953           0 : SWIGINTERN PyObject *_wrap_CPLHexToBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12954           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12955           0 :   char *arg1 = (char *) 0 ;
   12956           0 :   int *arg2 = (int *) 0 ;
   12957           0 :   int res1 ;
   12958           0 :   char *buf1 = 0 ;
   12959           0 :   int alloc1 = 0 ;
   12960           0 :   void *argp2 = 0 ;
   12961           0 :   int res2 = 0 ;
   12962           0 :   PyObject *swig_obj[2] ;
   12963           0 :   GByte *result = 0 ;
   12964             :   
   12965           0 :   if (!SWIG_Python_UnpackTuple(args, "CPLHexToBinary", 2, 2, swig_obj)) SWIG_fail;
   12966           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12967           0 :   if (!SWIG_IsOK(res1)) {
   12968           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPLHexToBinary" "', argument " "1"" of type '" "char const *""'");
   12969             :   }
   12970           0 :   arg1 = reinterpret_cast< char * >(buf1);
   12971           0 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, 0 |  0 );
   12972           0 :   if (!SWIG_IsOK(res2)) {
   12973           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CPLHexToBinary" "', argument " "2"" of type '" "int *""'"); 
   12974             :   }
   12975           0 :   arg2 = reinterpret_cast< int * >(argp2);
   12976           0 :   {
   12977           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12978           0 :     if ( bLocalUseExceptions ) {
   12979           0 :       pushErrorHandler();
   12980             :     }
   12981           0 :     {
   12982           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12983           0 :       result = (GByte *)CPLHexToBinary((char const *)arg1,arg2);
   12984           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12985             :     }
   12986           0 :     if ( bLocalUseExceptions ) {
   12987           0 :       popErrorHandler();
   12988             :     }
   12989             : #ifndef SED_HACKS
   12990             :     if ( bLocalUseExceptions ) {
   12991             :       CPLErr eclass = CPLGetLastErrorType();
   12992             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12993             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12994             :       }
   12995             :     }
   12996             : #endif
   12997             :   }
   12998           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GByte, 0 |  0 );
   12999           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   13000           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; } }
   13001             :   return resultobj;
   13002           0 : fail:
   13003           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   13004             :   return NULL;
   13005             : }
   13006             : 
   13007             : 
   13008        3587 : SWIGINTERN PyObject *_wrap_FileFromMemBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13009        3587 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13010        3587 :   char *arg1 = (char *) 0 ;
   13011        3587 :   GIntBig arg2 ;
   13012        3587 :   char *arg3 = (char *) 0 ;
   13013        3587 :   int bToFree1 = 0 ;
   13014        3587 :   int alloc2 = 0 ;
   13015        3587 :   bool viewIsValid2 = false ;
   13016        3587 :   Py_buffer view2 ;
   13017        3587 :   PyObject *swig_obj[2] ;
   13018        3587 :   VSI_RETVAL result;
   13019             :   
   13020        3587 :   if (!SWIG_Python_UnpackTuple(args, "FileFromMemBuffer", 2, 2, swig_obj)) SWIG_fail;
   13021        3587 :   {
   13022             :     /* %typemap(in) (const char *utf8_path) */
   13023        3587 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13024             :     {
   13025        1763 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13026             :     }
   13027             :     else
   13028             :     {
   13029        1824 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13030             :       
   13031             :     }
   13032        3587 :     if (arg1 == NULL)
   13033             :     {
   13034           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13035           0 :       SWIG_fail;
   13036             :     }
   13037             :   }
   13038        3587 :   {
   13039             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   13040        3587 :     char* ptr = NULL;
   13041        3587 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   13042           0 :       SWIG_fail;
   13043             :     }
   13044        3587 :     arg3 = (char *)ptr;
   13045             :   }
   13046        3587 :   {
   13047        3587 :     if (!arg1) {
   13048        3587 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13049             :     }
   13050             :   }
   13051        3587 :   {
   13052        3587 :     const int bLocalUseExceptions = GetUseExceptions();
   13053        3587 :     if ( bLocalUseExceptions ) {
   13054        1264 :       pushErrorHandler();
   13055             :     }
   13056        3587 :     {
   13057        3587 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13058        3587 :       result = wrapper_VSIFileFromMemBuffer((char const *)arg1,arg2,(char const *)arg3);
   13059        3587 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13060             :     }
   13061        3587 :     if ( bLocalUseExceptions ) {
   13062        1264 :       popErrorHandler();
   13063             :     }
   13064             : #ifndef SED_HACKS
   13065             :     if ( bLocalUseExceptions ) {
   13066             :       CPLErr eclass = CPLGetLastErrorType();
   13067             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13068             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13069             :       }
   13070             :     }
   13071             : #endif
   13072             :   }
   13073        3587 :   {
   13074             :     /* %typemap(out) VSI_RETVAL */
   13075        3588 :     if ( result != 0 && GetUseExceptions()) {
   13076           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13077           0 :       if( pszMessage[0] != '\0' )
   13078           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13079             :       else
   13080           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13081           0 :       SWIG_fail;
   13082             :     }
   13083             :   }
   13084        3587 :   {
   13085             :     /* %typemap(freearg) (const char *utf8_path) */
   13086        3587 :     GDALPythonFreeCStr(arg1, bToFree1);
   13087             :   }
   13088        3587 :   {
   13089             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   13090        3587 :     if( viewIsValid2 ) {
   13091        1251 :       PyBuffer_Release(&view2);
   13092             :     }
   13093        2336 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   13094        2336 :       delete[] arg3;
   13095             :     }
   13096             :   }
   13097        3587 :   {
   13098             :     /* %typemap(ret) VSI_RETVAL */
   13099        3587 :     resultobj = PyInt_FromLong( result );
   13100             :   }
   13101        3587 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13102             :   return resultobj;
   13103           0 : fail:
   13104           0 :   {
   13105             :     /* %typemap(freearg) (const char *utf8_path) */
   13106           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   13107             :   }
   13108           0 :   {
   13109             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   13110           0 :     if( viewIsValid2 ) {
   13111           0 :       PyBuffer_Release(&view2);
   13112             :     }
   13113        3587 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   13114           0 :       delete[] arg3;
   13115             :     }
   13116             :   }
   13117             :   return NULL;
   13118             : }
   13119             : 
   13120             : 
   13121        7707 : SWIGINTERN PyObject *_wrap_Unlink(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13122        7707 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13123        7707 :   char *arg1 = (char *) 0 ;
   13124        7707 :   int bToFree1 = 0 ;
   13125        7707 :   PyObject *swig_obj[1] ;
   13126        7707 :   VSI_RETVAL result;
   13127             :   
   13128        7707 :   if (!args) SWIG_fail;
   13129        7707 :   swig_obj[0] = args;
   13130        7707 :   {
   13131             :     /* %typemap(in) (const char *utf8_path) */
   13132        7707 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13133             :     {
   13134        6868 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13135             :     }
   13136             :     else
   13137             :     {
   13138         839 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13139             :       
   13140             :     }
   13141        7707 :     if (arg1 == NULL)
   13142             :     {
   13143           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13144           0 :       SWIG_fail;
   13145             :     }
   13146             :   }
   13147        7707 :   {
   13148        7707 :     if (!arg1) {
   13149        7707 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13150             :     }
   13151             :   }
   13152        7707 :   {
   13153        7707 :     const int bLocalUseExceptions = GetUseExceptions();
   13154        7707 :     if ( bLocalUseExceptions ) {
   13155        1449 :       pushErrorHandler();
   13156             :     }
   13157        7707 :     {
   13158        7707 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13159        7707 :       result = VSIUnlink((char const *)arg1);
   13160        7707 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13161             :     }
   13162        7707 :     if ( bLocalUseExceptions ) {
   13163        1449 :       popErrorHandler();
   13164             :     }
   13165             : #ifndef SED_HACKS
   13166             :     if ( bLocalUseExceptions ) {
   13167             :       CPLErr eclass = CPLGetLastErrorType();
   13168             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13169             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13170             :       }
   13171             :     }
   13172             : #endif
   13173             :   }
   13174        7707 :   {
   13175             :     /* %typemap(out) VSI_RETVAL */
   13176        8270 :     if ( result != 0 && GetUseExceptions()) {
   13177          27 :       const char* pszMessage = CPLGetLastErrorMsg();
   13178          27 :       if( pszMessage[0] != '\0' )
   13179           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13180             :       else
   13181          27 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13182          27 :       SWIG_fail;
   13183             :     }
   13184             :   }
   13185        7680 :   {
   13186             :     /* %typemap(freearg) (const char *utf8_path) */
   13187        7680 :     GDALPythonFreeCStr(arg1, bToFree1);
   13188             :   }
   13189        7680 :   {
   13190             :     /* %typemap(ret) VSI_RETVAL */
   13191        7680 :     resultobj = PyInt_FromLong( result );
   13192             :   }
   13193        7680 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13194             :   return resultobj;
   13195          27 : fail:
   13196          27 :   {
   13197             :     /* %typemap(freearg) (const char *utf8_path) */
   13198        7734 :     GDALPythonFreeCStr(arg1, bToFree1);
   13199             :   }
   13200             :   return NULL;
   13201             : }
   13202             : 
   13203             : 
   13204          11 : SWIGINTERN PyObject *_wrap_UnlinkBatch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13205          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13206          11 :   char **arg1 = (char **) 0 ;
   13207          11 :   PyObject *swig_obj[1] ;
   13208          11 :   bool result;
   13209             :   
   13210          11 :   if (!args) SWIG_fail;
   13211          11 :   swig_obj[0] = args;
   13212          11 :   {
   13213             :     /* %typemap(in) char **dict */
   13214          11 :     arg1 = NULL;
   13215          11 :     if ( PySequence_Check( swig_obj[0] ) ) {
   13216          11 :       int bErr = FALSE;
   13217          11 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   13218          11 :       if ( bErr )
   13219             :       {
   13220           0 :         SWIG_fail;
   13221             :       }
   13222             :     }
   13223           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   13224           0 :       int bErr = FALSE;
   13225           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   13226           0 :       if ( bErr )
   13227             :       {
   13228           0 :         SWIG_fail;
   13229             :       }
   13230             :     }
   13231             :     else {
   13232           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   13233           0 :       SWIG_fail;
   13234             :     }
   13235             :   }
   13236          11 :   {
   13237          11 :     const int bLocalUseExceptions = GetUseExceptions();
   13238          11 :     if ( bLocalUseExceptions ) {
   13239           0 :       pushErrorHandler();
   13240             :     }
   13241          11 :     {
   13242          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13243          11 :       result = (bool)wrapper_VSIUnlinkBatch(arg1);
   13244          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13245             :     }
   13246          11 :     if ( bLocalUseExceptions ) {
   13247           0 :       popErrorHandler();
   13248             :     }
   13249             : #ifndef SED_HACKS
   13250             :     if ( bLocalUseExceptions ) {
   13251             :       CPLErr eclass = CPLGetLastErrorType();
   13252             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13253             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13254             :       }
   13255             :     }
   13256             : #endif
   13257             :   }
   13258          11 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   13259          11 :   {
   13260             :     /* %typemap(freearg) char **dict */
   13261          11 :     CSLDestroy( arg1 );
   13262             :   }
   13263          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; } }
   13264             :   return resultobj;
   13265           0 : fail:
   13266           0 :   {
   13267             :     /* %typemap(freearg) char **dict */
   13268           0 :     CSLDestroy( arg1 );
   13269             :   }
   13270             :   return NULL;
   13271             : }
   13272             : 
   13273             : 
   13274           0 : SWIGINTERN PyObject *_wrap_HasThreadSupport(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13275           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13276           0 :   int result;
   13277             :   
   13278           0 :   if (!SWIG_Python_UnpackTuple(args, "HasThreadSupport", 0, 0, 0)) SWIG_fail;
   13279           0 :   {
   13280           0 :     const int bLocalUseExceptions = GetUseExceptions();
   13281           0 :     if ( bLocalUseExceptions ) {
   13282           0 :       pushErrorHandler();
   13283             :     }
   13284           0 :     {
   13285           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13286           0 :       result = (int)wrapper_HasThreadSupport();
   13287           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13288             :     }
   13289           0 :     if ( bLocalUseExceptions ) {
   13290           0 :       popErrorHandler();
   13291             :     }
   13292             : #ifndef SED_HACKS
   13293             :     if ( bLocalUseExceptions ) {
   13294             :       CPLErr eclass = CPLGetLastErrorType();
   13295             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13296             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13297             :       }
   13298             :     }
   13299             : #endif
   13300             :   }
   13301           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13302           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; } }
   13303             :   return resultobj;
   13304           0 : fail:
   13305           0 :   return NULL;
   13306             : }
   13307             : 
   13308             : 
   13309           2 : SWIGINTERN PyObject *_wrap_GetCurrentThreadCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13310           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13311           2 :   int result;
   13312             :   
   13313           2 :   if (!SWIG_Python_UnpackTuple(args, "GetCurrentThreadCount", 0, 0, 0)) SWIG_fail;
   13314           2 :   {
   13315           2 :     const int bLocalUseExceptions = GetUseExceptions();
   13316           2 :     if ( bLocalUseExceptions ) {
   13317           2 :       pushErrorHandler();
   13318             :     }
   13319           2 :     {
   13320           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13321           2 :       result = (int)CPLGetCurrentThreadCount();
   13322           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13323             :     }
   13324           2 :     if ( bLocalUseExceptions ) {
   13325           2 :       popErrorHandler();
   13326             :     }
   13327             : #ifndef SED_HACKS
   13328             :     if ( bLocalUseExceptions ) {
   13329             :       CPLErr eclass = CPLGetLastErrorType();
   13330             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13331             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13332             :       }
   13333             :     }
   13334             : #endif
   13335             :   }
   13336           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13337           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; } }
   13338             :   return resultobj;
   13339           0 : fail:
   13340           0 :   return NULL;
   13341             : }
   13342             : 
   13343             : 
   13344        5069 : SWIGINTERN PyObject *_wrap_Mkdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13345        5069 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13346        5069 :   char *arg1 = (char *) 0 ;
   13347        5069 :   int arg2 ;
   13348        5069 :   int bToFree1 = 0 ;
   13349        5069 :   int val2 ;
   13350        5069 :   int ecode2 = 0 ;
   13351        5069 :   PyObject *swig_obj[2] ;
   13352        5069 :   VSI_RETVAL result;
   13353             :   
   13354        5069 :   if (!SWIG_Python_UnpackTuple(args, "Mkdir", 2, 2, swig_obj)) SWIG_fail;
   13355        5069 :   {
   13356             :     /* %typemap(in) (const char *utf8_path) */
   13357        5069 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13358             :     {
   13359        4777 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13360             :     }
   13361             :     else
   13362             :     {
   13363         292 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13364             :       
   13365             :     }
   13366        5069 :     if (arg1 == NULL)
   13367             :     {
   13368           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13369           0 :       SWIG_fail;
   13370             :     }
   13371             :   }
   13372        5069 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   13373        5069 :   if (!SWIG_IsOK(ecode2)) {
   13374           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Mkdir" "', argument " "2"" of type '" "int""'");
   13375             :   } 
   13376        5069 :   arg2 = static_cast< int >(val2);
   13377        5069 :   {
   13378        5069 :     if (!arg1) {
   13379        5069 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13380             :     }
   13381             :   }
   13382        5069 :   {
   13383        5069 :     const int bLocalUseExceptions = GetUseExceptions();
   13384        5069 :     if ( bLocalUseExceptions ) {
   13385        1768 :       pushErrorHandler();
   13386             :     }
   13387        5069 :     {
   13388        5069 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13389        5069 :       result = VSIMkdir((char const *)arg1,arg2);
   13390        5069 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13391             :     }
   13392        5069 :     if ( bLocalUseExceptions ) {
   13393        1768 :       popErrorHandler();
   13394             :     }
   13395             : #ifndef SED_HACKS
   13396             :     if ( bLocalUseExceptions ) {
   13397             :       CPLErr eclass = CPLGetLastErrorType();
   13398             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13399             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13400             :       }
   13401             :     }
   13402             : #endif
   13403             :   }
   13404        5069 :   {
   13405             :     /* %typemap(out) VSI_RETVAL */
   13406        5116 :     if ( result != 0 && GetUseExceptions()) {
   13407           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13408           0 :       if( pszMessage[0] != '\0' )
   13409           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13410             :       else
   13411           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13412           0 :       SWIG_fail;
   13413             :     }
   13414             :   }
   13415        5069 :   {
   13416             :     /* %typemap(freearg) (const char *utf8_path) */
   13417        5069 :     GDALPythonFreeCStr(arg1, bToFree1);
   13418             :   }
   13419        5069 :   {
   13420             :     /* %typemap(ret) VSI_RETVAL */
   13421        5069 :     resultobj = PyInt_FromLong( result );
   13422             :   }
   13423        5069 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13424             :   return resultobj;
   13425           0 : fail:
   13426           0 :   {
   13427             :     /* %typemap(freearg) (const char *utf8_path) */
   13428        5069 :     GDALPythonFreeCStr(arg1, bToFree1);
   13429             :   }
   13430             :   return NULL;
   13431             : }
   13432             : 
   13433             : 
   13434          35 : SWIGINTERN PyObject *_wrap_Rmdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13435          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13436          35 :   char *arg1 = (char *) 0 ;
   13437          35 :   int bToFree1 = 0 ;
   13438          35 :   PyObject *swig_obj[1] ;
   13439          35 :   VSI_RETVAL result;
   13440             :   
   13441          35 :   if (!args) SWIG_fail;
   13442          35 :   swig_obj[0] = args;
   13443          35 :   {
   13444             :     /* %typemap(in) (const char *utf8_path) */
   13445          35 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13446             :     {
   13447          31 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13448             :     }
   13449             :     else
   13450             :     {
   13451           4 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13452             :       
   13453             :     }
   13454          35 :     if (arg1 == NULL)
   13455             :     {
   13456           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13457           0 :       SWIG_fail;
   13458             :     }
   13459             :   }
   13460          35 :   {
   13461          35 :     if (!arg1) {
   13462          35 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13463             :     }
   13464             :   }
   13465          35 :   {
   13466          35 :     const int bLocalUseExceptions = GetUseExceptions();
   13467          35 :     if ( bLocalUseExceptions ) {
   13468           2 :       pushErrorHandler();
   13469             :     }
   13470          35 :     {
   13471          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13472          35 :       result = VSIRmdir((char const *)arg1);
   13473          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13474             :     }
   13475          35 :     if ( bLocalUseExceptions ) {
   13476           2 :       popErrorHandler();
   13477             :     }
   13478             : #ifndef SED_HACKS
   13479             :     if ( bLocalUseExceptions ) {
   13480             :       CPLErr eclass = CPLGetLastErrorType();
   13481             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13482             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13483             :       }
   13484             :     }
   13485             : #endif
   13486             :   }
   13487          35 :   {
   13488             :     /* %typemap(out) VSI_RETVAL */
   13489          52 :     if ( result != 0 && GetUseExceptions()) {
   13490           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13491           0 :       if( pszMessage[0] != '\0' )
   13492           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13493             :       else
   13494           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13495           0 :       SWIG_fail;
   13496             :     }
   13497             :   }
   13498          35 :   {
   13499             :     /* %typemap(freearg) (const char *utf8_path) */
   13500          35 :     GDALPythonFreeCStr(arg1, bToFree1);
   13501             :   }
   13502          35 :   {
   13503             :     /* %typemap(ret) VSI_RETVAL */
   13504          35 :     resultobj = PyInt_FromLong( result );
   13505             :   }
   13506          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; } }
   13507             :   return resultobj;
   13508           0 : fail:
   13509           0 :   {
   13510             :     /* %typemap(freearg) (const char *utf8_path) */
   13511          35 :     GDALPythonFreeCStr(arg1, bToFree1);
   13512             :   }
   13513             :   return NULL;
   13514             : }
   13515             : 
   13516             : 
   13517          10 : SWIGINTERN PyObject *_wrap_MkdirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13518          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13519          10 :   char *arg1 = (char *) 0 ;
   13520          10 :   int arg2 ;
   13521          10 :   int bToFree1 = 0 ;
   13522          10 :   int val2 ;
   13523          10 :   int ecode2 = 0 ;
   13524          10 :   PyObject *swig_obj[2] ;
   13525          10 :   VSI_RETVAL result;
   13526             :   
   13527          10 :   if (!SWIG_Python_UnpackTuple(args, "MkdirRecursive", 2, 2, swig_obj)) SWIG_fail;
   13528          10 :   {
   13529             :     /* %typemap(in) (const char *utf8_path) */
   13530          10 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13531             :     {
   13532          10 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13533             :     }
   13534             :     else
   13535             :     {
   13536           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13537             :       
   13538             :     }
   13539          10 :     if (arg1 == NULL)
   13540             :     {
   13541           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13542           0 :       SWIG_fail;
   13543             :     }
   13544             :   }
   13545          10 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   13546          10 :   if (!SWIG_IsOK(ecode2)) {
   13547           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MkdirRecursive" "', argument " "2"" of type '" "int""'");
   13548             :   } 
   13549          10 :   arg2 = static_cast< int >(val2);
   13550          10 :   {
   13551          10 :     if (!arg1) {
   13552          10 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13553             :     }
   13554             :   }
   13555          10 :   {
   13556          10 :     const int bLocalUseExceptions = GetUseExceptions();
   13557          10 :     if ( bLocalUseExceptions ) {
   13558           8 :       pushErrorHandler();
   13559             :     }
   13560          10 :     {
   13561          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13562          10 :       result = VSIMkdirRecursive((char const *)arg1,arg2);
   13563          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13564             :     }
   13565          10 :     if ( bLocalUseExceptions ) {
   13566           8 :       popErrorHandler();
   13567             :     }
   13568             : #ifndef SED_HACKS
   13569             :     if ( bLocalUseExceptions ) {
   13570             :       CPLErr eclass = CPLGetLastErrorType();
   13571             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13572             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13573             :       }
   13574             :     }
   13575             : #endif
   13576             :   }
   13577          10 :   {
   13578             :     /* %typemap(out) VSI_RETVAL */
   13579          10 :     if ( result != 0 && GetUseExceptions()) {
   13580           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13581           0 :       if( pszMessage[0] != '\0' )
   13582           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13583             :       else
   13584           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13585           0 :       SWIG_fail;
   13586             :     }
   13587             :   }
   13588          10 :   {
   13589             :     /* %typemap(freearg) (const char *utf8_path) */
   13590          10 :     GDALPythonFreeCStr(arg1, bToFree1);
   13591             :   }
   13592          10 :   {
   13593             :     /* %typemap(ret) VSI_RETVAL */
   13594          10 :     resultobj = PyInt_FromLong( result );
   13595             :   }
   13596          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; } }
   13597             :   return resultobj;
   13598           0 : fail:
   13599           0 :   {
   13600             :     /* %typemap(freearg) (const char *utf8_path) */
   13601          10 :     GDALPythonFreeCStr(arg1, bToFree1);
   13602             :   }
   13603             :   return NULL;
   13604             : }
   13605             : 
   13606             : 
   13607        4724 : SWIGINTERN PyObject *_wrap_RmdirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13608        4724 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13609        4724 :   char *arg1 = (char *) 0 ;
   13610        4724 :   int bToFree1 = 0 ;
   13611        4724 :   PyObject *swig_obj[1] ;
   13612        4724 :   VSI_RETVAL result;
   13613             :   
   13614        4724 :   if (!args) SWIG_fail;
   13615        4724 :   swig_obj[0] = args;
   13616        4724 :   {
   13617             :     /* %typemap(in) (const char *utf8_path) */
   13618        4724 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13619             :     {
   13620        4717 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13621             :     }
   13622             :     else
   13623             :     {
   13624           7 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13625             :       
   13626             :     }
   13627        4724 :     if (arg1 == NULL)
   13628             :     {
   13629           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13630           0 :       SWIG_fail;
   13631             :     }
   13632             :   }
   13633        4724 :   {
   13634        4724 :     if (!arg1) {
   13635        4724 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13636             :     }
   13637             :   }
   13638        4724 :   {
   13639        4724 :     const int bLocalUseExceptions = GetUseExceptions();
   13640        4724 :     if ( bLocalUseExceptions ) {
   13641        1722 :       pushErrorHandler();
   13642             :     }
   13643        4724 :     {
   13644        4724 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13645        4724 :       result = VSIRmdirRecursive((char const *)arg1);
   13646        4724 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13647             :     }
   13648        4724 :     if ( bLocalUseExceptions ) {
   13649        1722 :       popErrorHandler();
   13650             :     }
   13651             : #ifndef SED_HACKS
   13652             :     if ( bLocalUseExceptions ) {
   13653             :       CPLErr eclass = CPLGetLastErrorType();
   13654             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13655             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13656             :       }
   13657             :     }
   13658             : #endif
   13659             :   }
   13660        4724 :   {
   13661             :     /* %typemap(out) VSI_RETVAL */
   13662        4735 :     if ( result != 0 && GetUseExceptions()) {
   13663           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13664           0 :       if( pszMessage[0] != '\0' )
   13665           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13666             :       else
   13667           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13668           0 :       SWIG_fail;
   13669             :     }
   13670             :   }
   13671        4724 :   {
   13672             :     /* %typemap(freearg) (const char *utf8_path) */
   13673        4724 :     GDALPythonFreeCStr(arg1, bToFree1);
   13674             :   }
   13675        4724 :   {
   13676             :     /* %typemap(ret) VSI_RETVAL */
   13677        4724 :     resultobj = PyInt_FromLong( result );
   13678             :   }
   13679        4724 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13680             :   return resultobj;
   13681           0 : fail:
   13682           0 :   {
   13683             :     /* %typemap(freearg) (const char *utf8_path) */
   13684        4724 :     GDALPythonFreeCStr(arg1, bToFree1);
   13685             :   }
   13686             :   return NULL;
   13687             : }
   13688             : 
   13689             : 
   13690          12 : SWIGINTERN PyObject *_wrap_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13691          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13692          12 :   char *arg1 = (char *) 0 ;
   13693          12 :   char *arg2 = (char *) 0 ;
   13694          12 :   int bToFree1 = 0 ;
   13695          12 :   int bToFree2 = 0 ;
   13696          12 :   PyObject *swig_obj[2] ;
   13697          12 :   VSI_RETVAL result;
   13698             :   
   13699          12 :   if (!SWIG_Python_UnpackTuple(args, "Rename", 2, 2, swig_obj)) SWIG_fail;
   13700          12 :   {
   13701             :     /* %typemap(in) (const char *utf8_path) */
   13702          12 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13703             :     {
   13704          12 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13705             :     }
   13706             :     else
   13707             :     {
   13708           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13709             :       
   13710             :     }
   13711          12 :     if (arg1 == NULL)
   13712             :     {
   13713           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13714           0 :       SWIG_fail;
   13715             :     }
   13716             :   }
   13717          12 :   {
   13718             :     /* %typemap(in) (const char *utf8_path) */
   13719          12 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   13720             :     {
   13721          12 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   13722             :     }
   13723             :     else
   13724             :     {
   13725           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   13726             :       
   13727             :     }
   13728          12 :     if (arg2 == NULL)
   13729             :     {
   13730           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13731           0 :       SWIG_fail;
   13732             :     }
   13733             :   }
   13734          12 :   {
   13735          12 :     if (!arg1) {
   13736          12 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13737             :     }
   13738             :   }
   13739          12 :   {
   13740          12 :     if (!arg2) {
   13741          12 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13742             :     }
   13743             :   }
   13744          12 :   {
   13745          12 :     const int bLocalUseExceptions = GetUseExceptions();
   13746          12 :     if ( bLocalUseExceptions ) {
   13747           2 :       pushErrorHandler();
   13748             :     }
   13749          12 :     {
   13750          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13751          12 :       result = VSIRename((char const *)arg1,(char const *)arg2);
   13752          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13753             :     }
   13754          12 :     if ( bLocalUseExceptions ) {
   13755           2 :       popErrorHandler();
   13756             :     }
   13757             : #ifndef SED_HACKS
   13758             :     if ( bLocalUseExceptions ) {
   13759             :       CPLErr eclass = CPLGetLastErrorType();
   13760             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13761             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13762             :       }
   13763             :     }
   13764             : #endif
   13765             :   }
   13766          12 :   {
   13767             :     /* %typemap(out) VSI_RETVAL */
   13768          14 :     if ( result != 0 && GetUseExceptions()) {
   13769           1 :       const char* pszMessage = CPLGetLastErrorMsg();
   13770           1 :       if( pszMessage[0] != '\0' )
   13771           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13772             :       else
   13773           1 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13774           1 :       SWIG_fail;
   13775             :     }
   13776             :   }
   13777          11 :   {
   13778             :     /* %typemap(freearg) (const char *utf8_path) */
   13779          11 :     GDALPythonFreeCStr(arg1, bToFree1);
   13780             :   }
   13781          11 :   {
   13782             :     /* %typemap(freearg) (const char *utf8_path) */
   13783          11 :     GDALPythonFreeCStr(arg2, bToFree2);
   13784             :   }
   13785          11 :   {
   13786             :     /* %typemap(ret) VSI_RETVAL */
   13787          11 :     resultobj = PyInt_FromLong( result );
   13788             :   }
   13789          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; } }
   13790             :   return resultobj;
   13791           1 : fail:
   13792           1 :   {
   13793             :     /* %typemap(freearg) (const char *utf8_path) */
   13794           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   13795             :   }
   13796           1 :   {
   13797             :     /* %typemap(freearg) (const char *utf8_path) */
   13798          13 :     GDALPythonFreeCStr(arg2, bToFree2);
   13799             :   }
   13800             :   return NULL;
   13801             : }
   13802             : 
   13803             : 
   13804           7 : SWIGINTERN PyObject *_wrap_Move(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13805           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13806           7 :   char *arg1 = (char *) 0 ;
   13807           7 :   char *arg2 = (char *) 0 ;
   13808           7 :   char **arg3 = (char **) NULL ;
   13809           7 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   13810           7 :   void *arg5 = (void *) NULL ;
   13811           7 :   int bToFree1 = 0 ;
   13812           7 :   int bToFree2 = 0 ;
   13813           7 :   PyObject * obj0 = 0 ;
   13814           7 :   PyObject * obj1 = 0 ;
   13815           7 :   PyObject * obj2 = 0 ;
   13816           7 :   PyObject * obj3 = 0 ;
   13817           7 :   PyObject * obj4 = 0 ;
   13818           7 :   char * kwnames[] = {
   13819             :     (char *)"old_path",  (char *)"new_path",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   13820             :   };
   13821           7 :   VSI_RETVAL result;
   13822             :   
   13823             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   13824           7 :   PyProgressData *psProgressInfo;
   13825           7 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   13826           7 :   psProgressInfo->nLastReported = -1;
   13827           7 :   psProgressInfo->psPyCallback = NULL;
   13828           7 :   psProgressInfo->psPyCallbackData = NULL;
   13829           7 :   arg5 = psProgressInfo;
   13830           7 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Move", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   13831           7 :   {
   13832             :     /* %typemap(in) (const char *utf8_path) */
   13833           7 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   13834             :     {
   13835           0 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   13836             :     }
   13837             :     else
   13838             :     {
   13839           7 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   13840             :       
   13841             :     }
   13842           7 :     if (arg1 == NULL)
   13843             :     {
   13844           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13845           0 :       SWIG_fail;
   13846             :     }
   13847             :   }
   13848           7 :   {
   13849             :     /* %typemap(in) (const char *utf8_path) */
   13850           7 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   13851             :     {
   13852           0 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   13853             :     }
   13854             :     else
   13855             :     {
   13856           7 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   13857             :       
   13858             :     }
   13859           7 :     if (arg2 == NULL)
   13860             :     {
   13861           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13862           0 :       SWIG_fail;
   13863             :     }
   13864             :   }
   13865           7 :   if (obj2) {
   13866           0 :     {
   13867             :       /* %typemap(in) char **dict */
   13868           0 :       arg3 = NULL;
   13869           0 :       if ( PySequence_Check( obj2 ) ) {
   13870           0 :         int bErr = FALSE;
   13871           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   13872           0 :         if ( bErr )
   13873             :         {
   13874           0 :           SWIG_fail;
   13875             :         }
   13876             :       }
   13877           0 :       else if ( PyMapping_Check( obj2 ) ) {
   13878           0 :         int bErr = FALSE;
   13879           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   13880           0 :         if ( bErr )
   13881             :         {
   13882           0 :           SWIG_fail;
   13883             :         }
   13884             :       }
   13885             :       else {
   13886           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   13887           0 :         SWIG_fail;
   13888             :       }
   13889             :     }
   13890             :   }
   13891           7 :   if (obj3) {
   13892           4 :     {
   13893             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   13894             :       /* callback_func typemap */
   13895             :       
   13896             :       /* In some cases 0 is passed instead of None. */
   13897             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   13898           4 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   13899             :       {
   13900           0 :         if( PyLong_AsLong(obj3) == 0 )
   13901             :         {
   13902           0 :           obj3 = Py_None;
   13903             :         }
   13904             :       }
   13905             :       
   13906           4 :       if (obj3 && obj3 != Py_None ) {
   13907           4 :         void* cbfunction = NULL;
   13908           4 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   13909             :             (void**)&cbfunction,
   13910             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   13911             :             SWIG_POINTER_EXCEPTION | 0 ));
   13912             :         
   13913           4 :         if ( cbfunction == GDALTermProgress ) {
   13914             :           arg4 = GDALTermProgress;
   13915             :         } else {
   13916           4 :           if (!PyCallable_Check(obj3)) {
   13917           0 :             PyErr_SetString( PyExc_RuntimeError,
   13918             :               "Object given is not a Python function" );
   13919           0 :             SWIG_fail;
   13920             :           }
   13921           4 :           psProgressInfo->psPyCallback = obj3;
   13922           4 :           arg4 = PyProgressProxy;
   13923             :         }
   13924             :         
   13925             :       }
   13926             :       
   13927             :     }
   13928             :   }
   13929           7 :   if (obj4) {
   13930           0 :     {
   13931             :       /* %typemap(in) ( void* callback_data=NULL)  */
   13932           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   13933             :     }
   13934             :   }
   13935           7 :   {
   13936           7 :     if (!arg1) {
   13937           7 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13938             :     }
   13939             :   }
   13940           7 :   {
   13941           7 :     if (!arg2) {
   13942           7 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13943             :     }
   13944             :   }
   13945           7 :   {
   13946           7 :     const int bLocalUseExceptions = GetUseExceptions();
   13947           7 :     if ( bLocalUseExceptions ) {
   13948           0 :       pushErrorHandler();
   13949             :     }
   13950           7 :     {
   13951           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13952           7 :       result = wrapper_VSIMove((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
   13953           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13954             :     }
   13955           7 :     if ( bLocalUseExceptions ) {
   13956           0 :       popErrorHandler();
   13957             :     }
   13958             : #ifndef SED_HACKS
   13959             :     if ( bLocalUseExceptions ) {
   13960             :       CPLErr eclass = CPLGetLastErrorType();
   13961             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13962             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13963             :       }
   13964             :     }
   13965             : #endif
   13966             :   }
   13967           7 :   {
   13968             :     /* %typemap(out) VSI_RETVAL */
   13969           8 :     if ( result != 0 && GetUseExceptions()) {
   13970           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13971           0 :       if( pszMessage[0] != '\0' )
   13972           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13973             :       else
   13974           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13975           0 :       SWIG_fail;
   13976             :     }
   13977             :   }
   13978           7 :   {
   13979             :     /* %typemap(freearg) (const char *utf8_path) */
   13980           7 :     GDALPythonFreeCStr(arg1, bToFree1);
   13981             :   }
   13982           7 :   {
   13983             :     /* %typemap(freearg) (const char *utf8_path) */
   13984           7 :     GDALPythonFreeCStr(arg2, bToFree2);
   13985             :   }
   13986           7 :   {
   13987             :     /* %typemap(freearg) char **dict */
   13988           7 :     CSLDestroy( arg3 );
   13989             :   }
   13990           7 :   {
   13991             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   13992             :     
   13993           7 :     CPLFree(psProgressInfo);
   13994             :     
   13995             :   }
   13996           7 :   {
   13997             :     /* %typemap(ret) VSI_RETVAL */
   13998           7 :     resultobj = PyInt_FromLong( result );
   13999             :   }
   14000           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; } }
   14001             :   return resultobj;
   14002           0 : fail:
   14003           0 :   {
   14004             :     /* %typemap(freearg) (const char *utf8_path) */
   14005           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14006             :   }
   14007           0 :   {
   14008             :     /* %typemap(freearg) (const char *utf8_path) */
   14009           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14010             :   }
   14011           0 :   {
   14012             :     /* %typemap(freearg) char **dict */
   14013           0 :     CSLDestroy( arg3 );
   14014             :   }
   14015           0 :   {
   14016             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14017             :     
   14018           0 :     CPLFree(psProgressInfo);
   14019             :     
   14020             :   }
   14021             :   return NULL;
   14022             : }
   14023             : 
   14024             : 
   14025          42 : SWIGINTERN PyObject *_wrap_Sync(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14026          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14027          42 :   char *arg1 = (char *) 0 ;
   14028          42 :   char *arg2 = (char *) 0 ;
   14029          42 :   char **arg3 = (char **) NULL ;
   14030          42 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   14031          42 :   void *arg5 = (void *) NULL ;
   14032          42 :   int bToFree1 = 0 ;
   14033          42 :   int bToFree2 = 0 ;
   14034          42 :   PyObject * obj0 = 0 ;
   14035          42 :   PyObject * obj1 = 0 ;
   14036          42 :   PyObject * obj2 = 0 ;
   14037          42 :   PyObject * obj3 = 0 ;
   14038          42 :   PyObject * obj4 = 0 ;
   14039          42 :   char * kwnames[] = {
   14040             :     (char *)"pszSource",  (char *)"pszTarget",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   14041             :   };
   14042          42 :   bool result;
   14043             :   
   14044             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   14045          42 :   PyProgressData *psProgressInfo;
   14046          42 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   14047          42 :   psProgressInfo->nLastReported = -1;
   14048          42 :   psProgressInfo->psPyCallback = NULL;
   14049          42 :   psProgressInfo->psPyCallbackData = NULL;
   14050          42 :   arg5 = psProgressInfo;
   14051          42 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Sync", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   14052          42 :   {
   14053             :     /* %typemap(in) (const char *utf8_path) */
   14054          42 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   14055             :     {
   14056          30 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   14057             :     }
   14058             :     else
   14059             :     {
   14060          12 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   14061             :       
   14062             :     }
   14063          42 :     if (arg1 == NULL)
   14064             :     {
   14065           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14066           0 :       SWIG_fail;
   14067             :     }
   14068             :   }
   14069          42 :   {
   14070             :     /* %typemap(in) (const char *utf8_path) */
   14071          42 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   14072             :     {
   14073          31 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   14074             :     }
   14075             :     else
   14076             :     {
   14077          11 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   14078             :       
   14079             :     }
   14080          42 :     if (arg2 == NULL)
   14081             :     {
   14082           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14083           0 :       SWIG_fail;
   14084             :     }
   14085             :   }
   14086          42 :   if (obj2) {
   14087          26 :     {
   14088             :       /* %typemap(in) char **dict */
   14089          26 :       arg3 = NULL;
   14090          26 :       if ( PySequence_Check( obj2 ) ) {
   14091          26 :         int bErr = FALSE;
   14092          26 :         arg3 = CSLFromPySequence(obj2, &bErr);
   14093          26 :         if ( bErr )
   14094             :         {
   14095           0 :           SWIG_fail;
   14096             :         }
   14097             :       }
   14098           0 :       else if ( PyMapping_Check( obj2 ) ) {
   14099           0 :         int bErr = FALSE;
   14100           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   14101           0 :         if ( bErr )
   14102             :         {
   14103           0 :           SWIG_fail;
   14104             :         }
   14105             :       }
   14106             :       else {
   14107           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14108           0 :         SWIG_fail;
   14109             :       }
   14110             :     }
   14111             :   }
   14112          42 :   if (obj3) {
   14113           7 :     {
   14114             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   14115             :       /* callback_func typemap */
   14116             :       
   14117             :       /* In some cases 0 is passed instead of None. */
   14118             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   14119           7 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   14120             :       {
   14121           0 :         if( PyLong_AsLong(obj3) == 0 )
   14122             :         {
   14123           0 :           obj3 = Py_None;
   14124             :         }
   14125             :       }
   14126             :       
   14127           7 :       if (obj3 && obj3 != Py_None ) {
   14128           7 :         void* cbfunction = NULL;
   14129           7 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   14130             :             (void**)&cbfunction,
   14131             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   14132             :             SWIG_POINTER_EXCEPTION | 0 ));
   14133             :         
   14134           7 :         if ( cbfunction == GDALTermProgress ) {
   14135             :           arg4 = GDALTermProgress;
   14136             :         } else {
   14137           7 :           if (!PyCallable_Check(obj3)) {
   14138           0 :             PyErr_SetString( PyExc_RuntimeError,
   14139             :               "Object given is not a Python function" );
   14140           0 :             SWIG_fail;
   14141             :           }
   14142           7 :           psProgressInfo->psPyCallback = obj3;
   14143           7 :           arg4 = PyProgressProxy;
   14144             :         }
   14145             :         
   14146             :       }
   14147             :       
   14148             :     }
   14149             :   }
   14150          42 :   if (obj4) {
   14151           6 :     {
   14152             :       /* %typemap(in) ( void* callback_data=NULL)  */
   14153           6 :       psProgressInfo->psPyCallbackData = obj4 ;
   14154             :     }
   14155             :   }
   14156          42 :   {
   14157          42 :     if (!arg1) {
   14158          42 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14159             :     }
   14160             :   }
   14161          42 :   {
   14162          42 :     if (!arg2) {
   14163          42 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14164             :     }
   14165             :   }
   14166          42 :   {
   14167          42 :     const int bLocalUseExceptions = GetUseExceptions();
   14168          42 :     if ( bLocalUseExceptions ) {
   14169           1 :       pushErrorHandler();
   14170             :     }
   14171          42 :     {
   14172          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14173          42 :       result = (bool)wrapper_VSISync((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
   14174          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14175             :     }
   14176          42 :     if ( bLocalUseExceptions ) {
   14177           1 :       popErrorHandler();
   14178             :     }
   14179             : #ifndef SED_HACKS
   14180             :     if ( bLocalUseExceptions ) {
   14181             :       CPLErr eclass = CPLGetLastErrorType();
   14182             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14183             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14184             :       }
   14185             :     }
   14186             : #endif
   14187             :   }
   14188          42 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14189          42 :   {
   14190             :     /* %typemap(freearg) (const char *utf8_path) */
   14191          42 :     GDALPythonFreeCStr(arg1, bToFree1);
   14192             :   }
   14193          42 :   {
   14194             :     /* %typemap(freearg) (const char *utf8_path) */
   14195          42 :     GDALPythonFreeCStr(arg2, bToFree2);
   14196             :   }
   14197          42 :   {
   14198             :     /* %typemap(freearg) char **dict */
   14199          42 :     CSLDestroy( arg3 );
   14200             :   }
   14201          42 :   {
   14202             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14203             :     
   14204          42 :     CPLFree(psProgressInfo);
   14205             :     
   14206             :   }
   14207          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; } }
   14208             :   return resultobj;
   14209           0 : fail:
   14210           0 :   {
   14211             :     /* %typemap(freearg) (const char *utf8_path) */
   14212           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14213             :   }
   14214           0 :   {
   14215             :     /* %typemap(freearg) (const char *utf8_path) */
   14216           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14217             :   }
   14218           0 :   {
   14219             :     /* %typemap(freearg) char **dict */
   14220           0 :     CSLDestroy( arg3 );
   14221             :   }
   14222           0 :   {
   14223             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14224             :     
   14225           0 :     CPLFree(psProgressInfo);
   14226             :     
   14227             :   }
   14228             :   return NULL;
   14229             : }
   14230             : 
   14231             : 
   14232           1 : SWIGINTERN PyObject *_wrap_AbortPendingUploads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14233           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14234           1 :   char *arg1 = (char *) 0 ;
   14235           1 :   int bToFree1 = 0 ;
   14236           1 :   PyObject *swig_obj[1] ;
   14237           1 :   bool result;
   14238             :   
   14239           1 :   if (!args) SWIG_fail;
   14240           1 :   swig_obj[0] = args;
   14241           1 :   {
   14242             :     /* %typemap(in) (const char *utf8_path) */
   14243           1 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14244             :     {
   14245           1 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14246             :     }
   14247             :     else
   14248             :     {
   14249           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14250             :       
   14251             :     }
   14252           1 :     if (arg1 == NULL)
   14253             :     {
   14254           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14255           0 :       SWIG_fail;
   14256             :     }
   14257             :   }
   14258           1 :   {
   14259           1 :     if (!arg1) {
   14260           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14261             :     }
   14262             :   }
   14263           1 :   {
   14264           1 :     const int bLocalUseExceptions = GetUseExceptions();
   14265           1 :     if ( bLocalUseExceptions ) {
   14266           0 :       pushErrorHandler();
   14267             :     }
   14268           1 :     {
   14269           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14270           1 :       result = (bool)VSIAbortPendingUploads((char const *)arg1);
   14271           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14272             :     }
   14273           1 :     if ( bLocalUseExceptions ) {
   14274           0 :       popErrorHandler();
   14275             :     }
   14276             : #ifndef SED_HACKS
   14277             :     if ( bLocalUseExceptions ) {
   14278             :       CPLErr eclass = CPLGetLastErrorType();
   14279             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14280             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14281             :       }
   14282             :     }
   14283             : #endif
   14284             :   }
   14285           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14286           1 :   {
   14287             :     /* %typemap(freearg) (const char *utf8_path) */
   14288           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   14289             :   }
   14290           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; } }
   14291             :   return resultobj;
   14292           0 : fail:
   14293           0 :   {
   14294             :     /* %typemap(freearg) (const char *utf8_path) */
   14295           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   14296             :   }
   14297             :   return NULL;
   14298             : }
   14299             : 
   14300             : 
   14301          29 : SWIGINTERN PyObject *_wrap_CopyFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14302          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14303          29 :   char *arg1 = (char *) 0 ;
   14304          29 :   char *arg2 = (char *) 0 ;
   14305          29 :   VSILFILE *arg3 = (VSILFILE *) NULL ;
   14306          29 :   GIntBig arg4 = (GIntBig) -1 ;
   14307          29 :   char **arg5 = (char **) NULL ;
   14308          29 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   14309          29 :   void *arg7 = (void *) NULL ;
   14310          29 :   int bToFree1 = 0 ;
   14311          29 :   int bToFree2 = 0 ;
   14312          29 :   void *argp3 = 0 ;
   14313          29 :   int res3 = 0 ;
   14314          29 :   PyObject * obj0 = 0 ;
   14315          29 :   PyObject * obj1 = 0 ;
   14316          29 :   PyObject * obj2 = 0 ;
   14317          29 :   PyObject * obj3 = 0 ;
   14318          29 :   PyObject * obj4 = 0 ;
   14319          29 :   PyObject * obj5 = 0 ;
   14320          29 :   PyObject * obj6 = 0 ;
   14321          29 :   char * kwnames[] = {
   14322             :     (char *)"pszSource",  (char *)"pszTarget",  (char *)"fpSource",  (char *)"nSourceSize",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   14323             :   };
   14324          29 :   int result;
   14325             :   
   14326             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   14327          29 :   PyProgressData *psProgressInfo;
   14328          29 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   14329          29 :   psProgressInfo->nLastReported = -1;
   14330          29 :   psProgressInfo->psPyCallback = NULL;
   14331          29 :   psProgressInfo->psPyCallbackData = NULL;
   14332          29 :   arg7 = psProgressInfo;
   14333          29 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOOO:CopyFile", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   14334          29 :   {
   14335             :     /* %typemap(in) (const char *utf8_path_or_none) */
   14336          29 :     if( obj0 == Py_None )
   14337             :     {
   14338             :       arg1 = NULL;
   14339             :     }
   14340             :     else
   14341             :     {
   14342          25 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   14343          25 :       if (arg1 == NULL)
   14344             :       {
   14345           0 :         PyErr_SetString( PyExc_RuntimeError, "not a string" );
   14346           0 :         SWIG_fail;
   14347             :       }
   14348             :     }
   14349             :   }
   14350          29 :   {
   14351             :     /* %typemap(in) (const char *utf8_path) */
   14352          29 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   14353             :     {
   14354          18 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   14355             :     }
   14356             :     else
   14357             :     {
   14358          11 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   14359             :       
   14360             :     }
   14361          29 :     if (arg2 == NULL)
   14362             :     {
   14363           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14364           0 :       SWIG_fail;
   14365             :     }
   14366             :   }
   14367          29 :   if (obj2) {
   14368           3 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_VSILFILE, 0 |  0 );
   14369           3 :     if (!SWIG_IsOK(res3)) {
   14370           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CopyFile" "', argument " "3"" of type '" "VSILFILE *""'"); 
   14371             :     }
   14372           3 :     arg3 = reinterpret_cast< VSILFILE * >(argp3);
   14373             :   }
   14374          29 :   if (obj3) {
   14375           0 :     {
   14376           0 :       arg4 = (GIntBig)PyLong_AsLongLong(obj3);
   14377             :     }
   14378             :   }
   14379          29 :   if (obj4) {
   14380           1 :     {
   14381             :       /* %typemap(in) char **dict */
   14382           1 :       arg5 = NULL;
   14383           1 :       if ( PySequence_Check( obj4 ) ) {
   14384           1 :         int bErr = FALSE;
   14385           1 :         arg5 = CSLFromPySequence(obj4, &bErr);
   14386           1 :         if ( bErr )
   14387             :         {
   14388           0 :           SWIG_fail;
   14389             :         }
   14390             :       }
   14391           0 :       else if ( PyMapping_Check( obj4 ) ) {
   14392           0 :         int bErr = FALSE;
   14393           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   14394           0 :         if ( bErr )
   14395             :         {
   14396           0 :           SWIG_fail;
   14397             :         }
   14398             :       }
   14399             :       else {
   14400           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14401           0 :         SWIG_fail;
   14402             :       }
   14403             :     }
   14404             :   }
   14405          29 :   if (obj5) {
   14406           4 :     {
   14407             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   14408             :       /* callback_func typemap */
   14409             :       
   14410             :       /* In some cases 0 is passed instead of None. */
   14411             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   14412           4 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   14413             :       {
   14414           0 :         if( PyLong_AsLong(obj5) == 0 )
   14415             :         {
   14416           0 :           obj5 = Py_None;
   14417             :         }
   14418             :       }
   14419             :       
   14420           4 :       if (obj5 && obj5 != Py_None ) {
   14421           4 :         void* cbfunction = NULL;
   14422           4 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   14423             :             (void**)&cbfunction,
   14424             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   14425             :             SWIG_POINTER_EXCEPTION | 0 ));
   14426             :         
   14427           4 :         if ( cbfunction == GDALTermProgress ) {
   14428             :           arg6 = GDALTermProgress;
   14429             :         } else {
   14430           4 :           if (!PyCallable_Check(obj5)) {
   14431           0 :             PyErr_SetString( PyExc_RuntimeError,
   14432             :               "Object given is not a Python function" );
   14433           0 :             SWIG_fail;
   14434             :           }
   14435           4 :           psProgressInfo->psPyCallback = obj5;
   14436           4 :           arg6 = PyProgressProxy;
   14437             :         }
   14438             :         
   14439             :       }
   14440             :       
   14441             :     }
   14442             :   }
   14443          29 :   if (obj6) {
   14444           4 :     {
   14445             :       /* %typemap(in) ( void* callback_data=NULL)  */
   14446           4 :       psProgressInfo->psPyCallbackData = obj6 ;
   14447             :     }
   14448             :   }
   14449          29 :   {
   14450          29 :     if (!arg2) {
   14451          29 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14452             :     }
   14453             :   }
   14454          29 :   {
   14455          29 :     const int bLocalUseExceptions = GetUseExceptions();
   14456          29 :     if ( bLocalUseExceptions ) {
   14457          11 :       pushErrorHandler();
   14458             :     }
   14459          29 :     {
   14460          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14461          29 :       result = (int)wrapper_VSICopyFile((char const *)arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   14462          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14463             :     }
   14464          29 :     if ( bLocalUseExceptions ) {
   14465          11 :       popErrorHandler();
   14466             :     }
   14467             : #ifndef SED_HACKS
   14468             :     if ( bLocalUseExceptions ) {
   14469             :       CPLErr eclass = CPLGetLastErrorType();
   14470             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14471             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14472             :       }
   14473             :     }
   14474             : #endif
   14475             :   }
   14476          29 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14477          29 :   {
   14478             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14479          29 :     if( arg1 != NULL )
   14480          25 :     GDALPythonFreeCStr(arg1, bToFree1);
   14481             :   }
   14482          29 :   {
   14483             :     /* %typemap(freearg) (const char *utf8_path) */
   14484          29 :     GDALPythonFreeCStr(arg2, bToFree2);
   14485             :   }
   14486          29 :   {
   14487             :     /* %typemap(freearg) char **dict */
   14488          29 :     CSLDestroy( arg5 );
   14489             :   }
   14490          29 :   {
   14491             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14492             :     
   14493          29 :     CPLFree(psProgressInfo);
   14494             :     
   14495             :   }
   14496          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; } }
   14497             :   return resultobj;
   14498           0 : fail:
   14499           0 :   {
   14500             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14501           0 :     if( arg1 != NULL )
   14502           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14503             :   }
   14504           0 :   {
   14505             :     /* %typemap(freearg) (const char *utf8_path) */
   14506           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14507             :   }
   14508           0 :   {
   14509             :     /* %typemap(freearg) char **dict */
   14510           0 :     CSLDestroy( arg5 );
   14511             :   }
   14512           0 :   {
   14513             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14514             :     
   14515           0 :     CPLFree(psProgressInfo);
   14516             :     
   14517             :   }
   14518             :   return NULL;
   14519             : }
   14520             : 
   14521             : 
   14522          20 : SWIGINTERN PyObject *_wrap_CopyFileRestartable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14523          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14524          20 :   char *arg1 = (char *) 0 ;
   14525          20 :   char *arg2 = (char *) 0 ;
   14526          20 :   char *arg3 = (char *) 0 ;
   14527          20 :   int *arg4 = (int *) 0 ;
   14528          20 :   char **arg5 = (char **) 0 ;
   14529          20 :   char **arg6 = (char **) NULL ;
   14530          20 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   14531          20 :   void *arg8 = (void *) NULL ;
   14532          20 :   int bToFree1 = 0 ;
   14533          20 :   int bToFree2 = 0 ;
   14534          20 :   int res3 ;
   14535          20 :   char *buf3 = 0 ;
   14536          20 :   int alloc3 = 0 ;
   14537          20 :   int nRetCode4 = 0 ;
   14538          20 :   char *pszOutputPayload4 = 0 ;
   14539          20 :   PyObject *swig_obj[6] ;
   14540             :   
   14541             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   14542          20 :   PyProgressData *psProgressInfo;
   14543          20 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   14544          20 :   psProgressInfo->nLastReported = -1;
   14545          20 :   psProgressInfo->psPyCallback = NULL;
   14546          20 :   psProgressInfo->psPyCallbackData = NULL;
   14547          20 :   arg8 = psProgressInfo;
   14548          20 :   {
   14549             :     /* %typemap(in) (int* pnRetCode, char** ppszOutputPayload) */
   14550          20 :     arg4 = &nRetCode4;
   14551          20 :     arg5 = &pszOutputPayload4;
   14552             :   }
   14553          20 :   if (!SWIG_Python_UnpackTuple(args, "CopyFileRestartable", 3, 6, swig_obj)) SWIG_fail;
   14554          20 :   {
   14555             :     /* %typemap(in) (const char *utf8_path_or_none) */
   14556          20 :     if( swig_obj[0] == Py_None )
   14557             :     {
   14558             :       arg1 = NULL;
   14559             :     }
   14560             :     else
   14561             :     {
   14562          20 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14563          20 :       if (arg1 == NULL)
   14564             :       {
   14565           0 :         PyErr_SetString( PyExc_RuntimeError, "not a string" );
   14566           0 :         SWIG_fail;
   14567             :       }
   14568             :     }
   14569             :   }
   14570          20 :   {
   14571             :     /* %typemap(in) (const char *utf8_path) */
   14572          20 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   14573             :     {
   14574          20 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   14575             :     }
   14576             :     else
   14577             :     {
   14578           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   14579             :       
   14580             :     }
   14581          20 :     if (arg2 == NULL)
   14582             :     {
   14583           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14584           0 :       SWIG_fail;
   14585             :     }
   14586             :   }
   14587          20 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   14588          20 :   if (!SWIG_IsOK(res3)) {
   14589           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CopyFileRestartable" "', argument " "3"" of type '" "char const *""'");
   14590             :   }
   14591          20 :   arg3 = reinterpret_cast< char * >(buf3);
   14592          20 :   if (swig_obj[3]) {
   14593          18 :     {
   14594             :       /* %typemap(in) char **dict */
   14595          18 :       arg6 = NULL;
   14596          18 :       if ( PySequence_Check( swig_obj[3] ) ) {
   14597          18 :         int bErr = FALSE;
   14598          18 :         arg6 = CSLFromPySequence(swig_obj[3], &bErr);
   14599          18 :         if ( bErr )
   14600             :         {
   14601           0 :           SWIG_fail;
   14602             :         }
   14603             :       }
   14604           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   14605           0 :         int bErr = FALSE;
   14606           0 :         arg6 = CSLFromPyMapping(swig_obj[3], &bErr);
   14607           0 :         if ( bErr )
   14608             :         {
   14609           0 :           SWIG_fail;
   14610             :         }
   14611             :       }
   14612             :       else {
   14613           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14614           0 :         SWIG_fail;
   14615             :       }
   14616             :     }
   14617             :   }
   14618          20 :   if (swig_obj[4]) {
   14619           2 :     {
   14620             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   14621             :       /* callback_func typemap */
   14622             :       
   14623             :       /* In some cases 0 is passed instead of None. */
   14624             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   14625           2 :       if ( PyLong_Check(swig_obj[4]) || PyInt_Check(swig_obj[4]) )
   14626             :       {
   14627           0 :         if( PyLong_AsLong(swig_obj[4]) == 0 )
   14628             :         {
   14629           0 :           swig_obj[4] = Py_None;
   14630             :         }
   14631             :       }
   14632             :       
   14633           2 :       if (swig_obj[4] && swig_obj[4] != Py_None ) {
   14634           2 :         void* cbfunction = NULL;
   14635           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[4],
   14636             :             (void**)&cbfunction,
   14637             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   14638             :             SWIG_POINTER_EXCEPTION | 0 ));
   14639             :         
   14640           2 :         if ( cbfunction == GDALTermProgress ) {
   14641             :           arg7 = GDALTermProgress;
   14642             :         } else {
   14643           2 :           if (!PyCallable_Check(swig_obj[4])) {
   14644           0 :             PyErr_SetString( PyExc_RuntimeError,
   14645             :               "Object given is not a Python function" );
   14646           0 :             SWIG_fail;
   14647             :           }
   14648           2 :           psProgressInfo->psPyCallback = swig_obj[4];
   14649           2 :           arg7 = PyProgressProxy;
   14650             :         }
   14651             :         
   14652             :       }
   14653             :       
   14654             :     }
   14655             :   }
   14656          20 :   if (swig_obj[5]) {
   14657           0 :     {
   14658             :       /* %typemap(in) ( void* callback_data=NULL)  */
   14659           0 :       psProgressInfo->psPyCallbackData = swig_obj[5] ;
   14660             :     }
   14661             :   }
   14662          20 :   {
   14663          20 :     if (!arg2) {
   14664          20 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14665             :     }
   14666             :   }
   14667          20 :   {
   14668          20 :     const int bLocalUseExceptions = GetUseExceptions();
   14669          20 :     if ( bLocalUseExceptions ) {
   14670           0 :       pushErrorHandler();
   14671             :     }
   14672          20 :     {
   14673          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14674          20 :       CopyFileRestartable((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7,arg8);
   14675          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14676             :     }
   14677          20 :     if ( bLocalUseExceptions ) {
   14678           0 :       popErrorHandler();
   14679             :     }
   14680             : #ifndef SED_HACKS
   14681             :     if ( bLocalUseExceptions ) {
   14682             :       CPLErr eclass = CPLGetLastErrorType();
   14683             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14684             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14685             :       }
   14686             :     }
   14687             : #endif
   14688             :   }
   14689          20 :   resultobj = SWIG_Py_Void();
   14690          20 :   {
   14691             :     /* %typemap(argout) (int* pnRetCode, char** ppszOutputPayload)  */
   14692          20 :     PyObject *r = PyTuple_New( 2 );
   14693          20 :     PyTuple_SetItem( r, 0, PyLong_FromLong(*arg4) );
   14694          20 :     if( *arg5 )
   14695             :     {
   14696           2 :       PyTuple_SetItem( r, 1, GDALPythonObjectFromCStr(*arg5) );
   14697           2 :       VSIFree(*arg5);
   14698             :     }
   14699             :     else
   14700             :     {
   14701          18 :       Py_INCREF(Py_None);
   14702          18 :       PyTuple_SetItem( r, 1, Py_None );
   14703             :     }
   14704             : #if SWIG_VERSION >= 0x040300
   14705             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   14706             : #else
   14707          20 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   14708             : #endif
   14709             :   }
   14710          20 :   {
   14711             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14712          20 :     if( arg1 != NULL )
   14713          20 :     GDALPythonFreeCStr(arg1, bToFree1);
   14714             :   }
   14715          20 :   {
   14716             :     /* %typemap(freearg) (const char *utf8_path) */
   14717          20 :     GDALPythonFreeCStr(arg2, bToFree2);
   14718             :   }
   14719          20 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   14720          20 :   {
   14721             :     /* %typemap(freearg) char **dict */
   14722          20 :     CSLDestroy( arg6 );
   14723             :   }
   14724          20 :   {
   14725             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14726             :     
   14727          20 :     CPLFree(psProgressInfo);
   14728             :     
   14729             :   }
   14730          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; } }
   14731             :   return resultobj;
   14732           0 : fail:
   14733           0 :   {
   14734             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14735           0 :     if( arg1 != NULL )
   14736           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14737             :   }
   14738           0 :   {
   14739             :     /* %typemap(freearg) (const char *utf8_path) */
   14740           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14741             :   }
   14742           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   14743           0 :   {
   14744             :     /* %typemap(freearg) char **dict */
   14745           0 :     CSLDestroy( arg6 );
   14746             :   }
   14747           0 :   {
   14748             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14749             :     
   14750           0 :     CPLFree(psProgressInfo);
   14751             :     
   14752             :   }
   14753             :   return NULL;
   14754             : }
   14755             : 
   14756             : 
   14757           0 : SWIGINTERN PyObject *_wrap_MoveFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14758           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14759           0 :   char *arg1 = (char *) 0 ;
   14760           0 :   char *arg2 = (char *) 0 ;
   14761           0 :   int bToFree1 = 0 ;
   14762           0 :   int bToFree2 = 0 ;
   14763           0 :   PyObject *swig_obj[2] ;
   14764           0 :   int result;
   14765             :   
   14766           0 :   if (!SWIG_Python_UnpackTuple(args, "MoveFile", 2, 2, swig_obj)) SWIG_fail;
   14767           0 :   {
   14768             :     /* %typemap(in) (const char *utf8_path_or_none) */
   14769           0 :     if( swig_obj[0] == Py_None )
   14770             :     {
   14771             :       arg1 = NULL;
   14772             :     }
   14773             :     else
   14774             :     {
   14775           0 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14776           0 :       if (arg1 == NULL)
   14777             :       {
   14778           0 :         PyErr_SetString( PyExc_RuntimeError, "not a string" );
   14779           0 :         SWIG_fail;
   14780             :       }
   14781             :     }
   14782             :   }
   14783           0 :   {
   14784             :     /* %typemap(in) (const char *utf8_path) */
   14785           0 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   14786             :     {
   14787           0 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   14788             :     }
   14789             :     else
   14790             :     {
   14791           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   14792             :       
   14793             :     }
   14794           0 :     if (arg2 == NULL)
   14795             :     {
   14796           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14797           0 :       SWIG_fail;
   14798             :     }
   14799             :   }
   14800           0 :   {
   14801           0 :     if (!arg2) {
   14802           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14803             :     }
   14804             :   }
   14805           0 :   {
   14806           0 :     const int bLocalUseExceptions = GetUseExceptions();
   14807           0 :     if ( bLocalUseExceptions ) {
   14808           0 :       pushErrorHandler();
   14809             :     }
   14810           0 :     {
   14811           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14812           0 :       result = (int)wrapper_MoveFile((char const *)arg1,(char const *)arg2);
   14813           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14814             :     }
   14815           0 :     if ( bLocalUseExceptions ) {
   14816           0 :       popErrorHandler();
   14817             :     }
   14818             : #ifndef SED_HACKS
   14819             :     if ( bLocalUseExceptions ) {
   14820             :       CPLErr eclass = CPLGetLastErrorType();
   14821             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14822             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14823             :       }
   14824             :     }
   14825             : #endif
   14826             :   }
   14827           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14828           0 :   {
   14829             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14830           0 :     if( arg1 != NULL )
   14831           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14832             :   }
   14833           0 :   {
   14834             :     /* %typemap(freearg) (const char *utf8_path) */
   14835           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14836             :   }
   14837           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; } }
   14838             :   return resultobj;
   14839           0 : fail:
   14840           0 :   {
   14841             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14842           0 :     if( arg1 != NULL )
   14843           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14844             :   }
   14845           0 :   {
   14846             :     /* %typemap(freearg) (const char *utf8_path) */
   14847           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14848             :   }
   14849             :   return NULL;
   14850             : }
   14851             : 
   14852             : 
   14853           9 : SWIGINTERN PyObject *_wrap_GetActualURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14854           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14855           9 :   char *arg1 = (char *) 0 ;
   14856           9 :   int bToFree1 = 0 ;
   14857           9 :   PyObject *swig_obj[1] ;
   14858           9 :   char *result = 0 ;
   14859             :   
   14860           9 :   if (!args) SWIG_fail;
   14861           9 :   swig_obj[0] = args;
   14862           9 :   {
   14863             :     /* %typemap(in) (const char *utf8_path) */
   14864           9 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14865             :     {
   14866           9 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14867             :     }
   14868             :     else
   14869             :     {
   14870           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14871             :       
   14872             :     }
   14873           9 :     if (arg1 == NULL)
   14874             :     {
   14875           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14876           0 :       SWIG_fail;
   14877             :     }
   14878             :   }
   14879           9 :   {
   14880           9 :     if (!arg1) {
   14881           9 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14882             :     }
   14883             :   }
   14884           9 :   {
   14885           9 :     const int bLocalUseExceptions = GetUseExceptions();
   14886           9 :     if ( bLocalUseExceptions ) {
   14887           2 :       pushErrorHandler();
   14888             :     }
   14889           9 :     {
   14890           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14891           9 :       result = (char *)VSIGetActualURL((char const *)arg1);
   14892           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14893             :     }
   14894           9 :     if ( bLocalUseExceptions ) {
   14895           2 :       popErrorHandler();
   14896             :     }
   14897             : #ifndef SED_HACKS
   14898             :     if ( bLocalUseExceptions ) {
   14899             :       CPLErr eclass = CPLGetLastErrorType();
   14900             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14901             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14902             :       }
   14903             :     }
   14904             : #endif
   14905             :   }
   14906           9 :   resultobj = SWIG_FromCharPtr((const char *)result);
   14907           9 :   {
   14908             :     /* %typemap(freearg) (const char *utf8_path) */
   14909           9 :     GDALPythonFreeCStr(arg1, bToFree1);
   14910             :   }
   14911           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; } }
   14912             :   return resultobj;
   14913           0 : fail:
   14914           0 :   {
   14915             :     /* %typemap(freearg) (const char *utf8_path) */
   14916           9 :     GDALPythonFreeCStr(arg1, bToFree1);
   14917             :   }
   14918             :   return NULL;
   14919             : }
   14920             : 
   14921             : 
   14922          23 : SWIGINTERN PyObject *_wrap_GetSignedURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14923          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14924          23 :   char *arg1 = (char *) 0 ;
   14925          23 :   char **arg2 = (char **) NULL ;
   14926          23 :   int bToFree1 = 0 ;
   14927          23 :   PyObject *swig_obj[2] ;
   14928          23 :   retStringAndCPLFree *result = 0 ;
   14929             :   
   14930          23 :   if (!SWIG_Python_UnpackTuple(args, "GetSignedURL", 1, 2, swig_obj)) SWIG_fail;
   14931          23 :   {
   14932             :     /* %typemap(in) (const char *utf8_path) */
   14933          23 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14934             :     {
   14935          23 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14936             :     }
   14937             :     else
   14938             :     {
   14939           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14940             :       
   14941             :     }
   14942          23 :     if (arg1 == NULL)
   14943             :     {
   14944           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14945           0 :       SWIG_fail;
   14946             :     }
   14947             :   }
   14948          23 :   if (swig_obj[1]) {
   14949           7 :     {
   14950             :       /* %typemap(in) char **dict */
   14951           7 :       arg2 = NULL;
   14952           7 :       if ( PySequence_Check( swig_obj[1] ) ) {
   14953           7 :         int bErr = FALSE;
   14954           7 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   14955           7 :         if ( bErr )
   14956             :         {
   14957           0 :           SWIG_fail;
   14958             :         }
   14959             :       }
   14960           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   14961           0 :         int bErr = FALSE;
   14962           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   14963           0 :         if ( bErr )
   14964             :         {
   14965           0 :           SWIG_fail;
   14966             :         }
   14967             :       }
   14968             :       else {
   14969           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14970           0 :         SWIG_fail;
   14971             :       }
   14972             :     }
   14973             :   }
   14974          23 :   {
   14975          23 :     if (!arg1) {
   14976          23 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14977             :     }
   14978             :   }
   14979          23 :   {
   14980          23 :     const int bLocalUseExceptions = GetUseExceptions();
   14981          23 :     if ( bLocalUseExceptions ) {
   14982           4 :       pushErrorHandler();
   14983             :     }
   14984          23 :     {
   14985          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14986          23 :       result = (retStringAndCPLFree *)wrapper_VSIGetSignedURL((char const *)arg1,arg2);
   14987          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14988             :     }
   14989          23 :     if ( bLocalUseExceptions ) {
   14990           4 :       popErrorHandler();
   14991             :     }
   14992             : #ifndef SED_HACKS
   14993             :     if ( bLocalUseExceptions ) {
   14994             :       CPLErr eclass = CPLGetLastErrorType();
   14995             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14996             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14997             :       }
   14998             :     }
   14999             : #endif
   15000             :   }
   15001          23 :   {
   15002             :     /* %typemap(out) (retStringAndCPLFree*) */
   15003          23 :     Py_XDECREF(resultobj);
   15004          23 :     if(result)
   15005             :     {
   15006          14 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   15007          14 :       CPLFree(result);
   15008             :     }
   15009             :     else
   15010             :     {
   15011           9 :       resultobj = Py_None;
   15012           9 :       Py_INCREF(resultobj);
   15013             :     }
   15014             :   }
   15015          23 :   {
   15016             :     /* %typemap(freearg) (const char *utf8_path) */
   15017          23 :     GDALPythonFreeCStr(arg1, bToFree1);
   15018             :   }
   15019          23 :   {
   15020             :     /* %typemap(freearg) char **dict */
   15021          23 :     CSLDestroy( arg2 );
   15022             :   }
   15023          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; } }
   15024             :   return resultobj;
   15025           0 : fail:
   15026           0 :   {
   15027             :     /* %typemap(freearg) (const char *utf8_path) */
   15028           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15029             :   }
   15030           0 :   {
   15031             :     /* %typemap(freearg) char **dict */
   15032           0 :     CSLDestroy( arg2 );
   15033             :   }
   15034             :   return NULL;
   15035             : }
   15036             : 
   15037             : 
   15038           2 : SWIGINTERN PyObject *_wrap_GetFileSystemsPrefixes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15039           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15040           2 :   char **result = 0 ;
   15041             :   
   15042           2 :   if (!SWIG_Python_UnpackTuple(args, "GetFileSystemsPrefixes", 0, 0, 0)) SWIG_fail;
   15043           2 :   {
   15044           2 :     const int bLocalUseExceptions = GetUseExceptions();
   15045           2 :     if ( bLocalUseExceptions ) {
   15046           0 :       pushErrorHandler();
   15047             :     }
   15048           2 :     {
   15049           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15050           2 :       result = (char **)VSIGetFileSystemsPrefixes();
   15051           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15052             :     }
   15053           2 :     if ( bLocalUseExceptions ) {
   15054           0 :       popErrorHandler();
   15055             :     }
   15056             : #ifndef SED_HACKS
   15057             :     if ( bLocalUseExceptions ) {
   15058             :       CPLErr eclass = CPLGetLastErrorType();
   15059             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15060             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15061             :       }
   15062             :     }
   15063             : #endif
   15064             :   }
   15065           2 :   {
   15066             :     /* %typemap(out) char **CSL -> ( string ) */
   15067           2 :     bool bErr = false;
   15068           2 :     resultobj = CSLToList(result, &bErr);
   15069           2 :     CSLDestroy(result);
   15070           2 :     if( bErr ) {
   15071           0 :       SWIG_fail;
   15072             :     }
   15073             :   }
   15074           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; } }
   15075             :   return resultobj;
   15076             : fail:
   15077             :   return NULL;
   15078             : }
   15079             : 
   15080             : 
   15081          30 : SWIGINTERN PyObject *_wrap_GetFileSystemOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15082          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15083          30 :   char *arg1 = (char *) 0 ;
   15084          30 :   int bToFree1 = 0 ;
   15085          30 :   PyObject *swig_obj[1] ;
   15086          30 :   char *result = 0 ;
   15087             :   
   15088          30 :   if (!args) SWIG_fail;
   15089          30 :   swig_obj[0] = args;
   15090          30 :   {
   15091             :     /* %typemap(in) (const char *utf8_path) */
   15092          30 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15093             :     {
   15094          30 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15095             :     }
   15096             :     else
   15097             :     {
   15098           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15099             :       
   15100             :     }
   15101          30 :     if (arg1 == NULL)
   15102             :     {
   15103           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15104           0 :       SWIG_fail;
   15105             :     }
   15106             :   }
   15107          30 :   {
   15108          30 :     if (!arg1) {
   15109          30 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15110             :     }
   15111             :   }
   15112          30 :   {
   15113          30 :     const int bLocalUseExceptions = GetUseExceptions();
   15114          30 :     if ( bLocalUseExceptions ) {
   15115           0 :       pushErrorHandler();
   15116             :     }
   15117          30 :     {
   15118          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15119          30 :       result = (char *)VSIGetFileSystemOptions((char const *)arg1);
   15120          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15121             :     }
   15122          30 :     if ( bLocalUseExceptions ) {
   15123           0 :       popErrorHandler();
   15124             :     }
   15125             : #ifndef SED_HACKS
   15126             :     if ( bLocalUseExceptions ) {
   15127             :       CPLErr eclass = CPLGetLastErrorType();
   15128             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15129             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15130             :       }
   15131             :     }
   15132             : #endif
   15133             :   }
   15134          30 :   resultobj = SWIG_FromCharPtr((const char *)result);
   15135          30 :   {
   15136             :     /* %typemap(freearg) (const char *utf8_path) */
   15137          30 :     GDALPythonFreeCStr(arg1, bToFree1);
   15138             :   }
   15139          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; } }
   15140             :   return resultobj;
   15141           0 : fail:
   15142           0 :   {
   15143             :     /* %typemap(freearg) (const char *utf8_path) */
   15144          30 :     GDALPythonFreeCStr(arg1, bToFree1);
   15145             :   }
   15146             :   return NULL;
   15147             : }
   15148             : 
   15149             : 
   15150         277 : SWIGINTERN PyObject *VSILFILE_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15151         277 :   PyObject *obj;
   15152         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   15153         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_VSILFILE, SWIG_NewClientData(obj));
   15154         277 :   return SWIG_Py_Void();
   15155             : }
   15156             : 
   15157         647 : SWIGINTERN PyObject *_wrap_StatBuf_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15158         647 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15159         647 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15160         647 :   void *argp1 = 0 ;
   15161         647 :   int res1 = 0 ;
   15162         647 :   PyObject *swig_obj[1] ;
   15163         647 :   int result;
   15164             :   
   15165         647 :   if (!args) SWIG_fail;
   15166         647 :   swig_obj[0] = args;
   15167         647 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15168         647 :   if (!SWIG_IsOK(res1)) {
   15169           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mode_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   15170             :   }
   15171         647 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15172         647 :   {
   15173         647 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15174         647 :     result = (int) ((arg1)->mode);
   15175         647 :     SWIG_PYTHON_THREAD_END_ALLOW;
   15176             :   }
   15177         647 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15178         647 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15179             :   return resultobj;
   15180             : fail:
   15181             :   return NULL;
   15182             : }
   15183             : 
   15184             : 
   15185        1566 : SWIGINTERN PyObject *_wrap_StatBuf_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15186        1566 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15187        1566 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15188        1566 :   void *argp1 = 0 ;
   15189        1566 :   int res1 = 0 ;
   15190        1566 :   PyObject *swig_obj[1] ;
   15191        1566 :   GIntBig result;
   15192             :   
   15193        1566 :   if (!args) SWIG_fail;
   15194        1566 :   swig_obj[0] = args;
   15195        1566 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15196        1566 :   if (!SWIG_IsOK(res1)) {
   15197           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_size_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   15198             :   }
   15199        1566 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15200        1566 :   {
   15201        1566 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15202        1566 :     result =  ((arg1)->size);
   15203        1566 :     SWIG_PYTHON_THREAD_END_ALLOW;
   15204             :   }
   15205        1566 :   {
   15206        1566 :     resultobj = PyLong_FromLongLong(result);
   15207             :   }
   15208        1566 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15209             :   return resultobj;
   15210             : fail:
   15211             :   return NULL;
   15212             : }
   15213             : 
   15214             : 
   15215         124 : SWIGINTERN PyObject *_wrap_StatBuf_mtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15216         124 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15217         124 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15218         124 :   void *argp1 = 0 ;
   15219         124 :   int res1 = 0 ;
   15220         124 :   PyObject *swig_obj[1] ;
   15221         124 :   GIntBig result;
   15222             :   
   15223         124 :   if (!args) SWIG_fail;
   15224         124 :   swig_obj[0] = args;
   15225         124 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15226         124 :   if (!SWIG_IsOK(res1)) {
   15227           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mtime_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   15228             :   }
   15229         124 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15230         124 :   {
   15231         124 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15232         124 :     result =  ((arg1)->mtime);
   15233         124 :     SWIG_PYTHON_THREAD_END_ALLOW;
   15234             :   }
   15235         124 :   {
   15236         124 :     resultobj = PyLong_FromLongLong(result);
   15237             :   }
   15238         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; } }
   15239             :   return resultobj;
   15240             : fail:
   15241             :   return NULL;
   15242             : }
   15243             : 
   15244             : 
   15245           0 : SWIGINTERN PyObject *_wrap_new_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15246           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15247           0 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15248           0 :   void *argp1 = 0 ;
   15249           0 :   int res1 = 0 ;
   15250           0 :   PyObject *swig_obj[1] ;
   15251           0 :   StatBuf *result = 0 ;
   15252             :   
   15253           0 :   if (!args) SWIG_fail;
   15254           0 :   swig_obj[0] = args;
   15255           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15256           0 :   if (!SWIG_IsOK(res1)) {
   15257           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
   15258             :   }
   15259           0 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15260           0 :   {
   15261           0 :     const int bLocalUseExceptions = GetUseExceptions();
   15262           0 :     if ( bLocalUseExceptions ) {
   15263           0 :       pushErrorHandler();
   15264             :     }
   15265           0 :     {
   15266           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15267           0 :       result = (StatBuf *)new_StatBuf(arg1);
   15268           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15269             :     }
   15270           0 :     if ( bLocalUseExceptions ) {
   15271           0 :       popErrorHandler();
   15272             :     }
   15273             : #ifndef SED_HACKS
   15274             :     if ( bLocalUseExceptions ) {
   15275             :       CPLErr eclass = CPLGetLastErrorType();
   15276             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15277             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15278             :       }
   15279             :     }
   15280             : #endif
   15281             :   }
   15282           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StatBuf, SWIG_POINTER_NEW |  0 );
   15283           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; } }
   15284             :   return resultobj;
   15285             : fail:
   15286             :   return NULL;
   15287             : }
   15288             : 
   15289             : 
   15290        4833 : SWIGINTERN PyObject *_wrap_delete_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15291        4833 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15292        4833 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15293        4833 :   void *argp1 = 0 ;
   15294        4833 :   int res1 = 0 ;
   15295        4833 :   PyObject *swig_obj[1] ;
   15296             :   
   15297        4833 :   if (!args) SWIG_fail;
   15298        4833 :   swig_obj[0] = args;
   15299        4833 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, SWIG_POINTER_DISOWN |  0 );
   15300        4833 :   if (!SWIG_IsOK(res1)) {
   15301           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
   15302             :   }
   15303        4833 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15304        4833 :   {
   15305        4833 :     const int bLocalUseExceptions = GetUseExceptions();
   15306        4833 :     if ( bLocalUseExceptions ) {
   15307        3286 :       pushErrorHandler();
   15308             :     }
   15309        4833 :     {
   15310        4833 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15311        4833 :       delete_StatBuf(arg1);
   15312        4833 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15313             :     }
   15314        4833 :     if ( bLocalUseExceptions ) {
   15315        3286 :       popErrorHandler();
   15316             :     }
   15317             : #ifndef SED_HACKS
   15318             :     if ( bLocalUseExceptions ) {
   15319             :       CPLErr eclass = CPLGetLastErrorType();
   15320             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15321             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15322             :       }
   15323             :     }
   15324             : #endif
   15325             :   }
   15326        4833 :   resultobj = SWIG_Py_Void();
   15327        4833 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15328             :   return resultobj;
   15329             : fail:
   15330             :   return NULL;
   15331             : }
   15332             : 
   15333             : 
   15334        2503 : SWIGINTERN PyObject *_wrap_StatBuf_IsDirectory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15335        2503 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15336        2503 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15337        2503 :   void *argp1 = 0 ;
   15338        2503 :   int res1 = 0 ;
   15339        2503 :   PyObject *swig_obj[1] ;
   15340        2503 :   int result;
   15341             :   
   15342        2503 :   if (!args) SWIG_fail;
   15343        2503 :   swig_obj[0] = args;
   15344        2503 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15345        2503 :   if (!SWIG_IsOK(res1)) {
   15346           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_IsDirectory" "', argument " "1"" of type '" "StatBuf *""'"); 
   15347             :   }
   15348        2503 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15349        2503 :   {
   15350        2503 :     const int bLocalUseExceptions = GetUseExceptions();
   15351        2503 :     if ( bLocalUseExceptions ) {
   15352        2498 :       pushErrorHandler();
   15353             :     }
   15354        2503 :     {
   15355        2503 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15356        2503 :       result = (int)StatBuf_IsDirectory(arg1);
   15357        2503 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15358             :     }
   15359        2503 :     if ( bLocalUseExceptions ) {
   15360        2498 :       popErrorHandler();
   15361             :     }
   15362             : #ifndef SED_HACKS
   15363             :     if ( bLocalUseExceptions ) {
   15364             :       CPLErr eclass = CPLGetLastErrorType();
   15365             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15366             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15367             :       }
   15368             :     }
   15369             : #endif
   15370             :   }
   15371        2503 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15372        2503 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15373             :   return resultobj;
   15374             : fail:
   15375             :   return NULL;
   15376             : }
   15377             : 
   15378             : 
   15379         277 : SWIGINTERN PyObject *StatBuf_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15380         277 :   PyObject *obj;
   15381         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   15382         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_StatBuf, SWIG_NewClientData(obj));
   15383         277 :   return SWIG_Py_Void();
   15384             : }
   15385             : 
   15386           0 : SWIGINTERN PyObject *StatBuf_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15387           0 :   return SWIG_Python_InitShadowInstance(args);
   15388             : }
   15389             : 
   15390        6357 : SWIGINTERN PyObject *_wrap_VSIStatL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15391        6357 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15392        6357 :   char *arg1 = (char *) 0 ;
   15393        6357 :   StatBuf *arg2 = (StatBuf *) 0 ;
   15394        6357 :   int arg3 = (int) 0 ;
   15395        6357 :   int bToFree1 = 0 ;
   15396        6357 :   StatBuf sStatBuf2 ;
   15397        6357 :   int val3 ;
   15398        6357 :   int ecode3 = 0 ;
   15399        6357 :   PyObject *swig_obj[2] ;
   15400        6357 :   int result;
   15401             :   
   15402        6357 :   {
   15403             :     /* %typemap(in,numinputs=0) (StatBuf *psStatBufOut) (StatBuf sStatBuf2 ) */
   15404        6357 :     arg2 = &sStatBuf2;
   15405             :   }
   15406        6357 :   if (!SWIG_Python_UnpackTuple(args, "VSIStatL", 1, 2, swig_obj)) SWIG_fail;
   15407        6357 :   {
   15408             :     /* %typemap(in) (const char *utf8_path) */
   15409        6357 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15410             :     {
   15411        5452 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15412             :     }
   15413             :     else
   15414             :     {
   15415         905 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15416             :       
   15417             :     }
   15418        6357 :     if (arg1 == NULL)
   15419             :     {
   15420           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15421           0 :       SWIG_fail;
   15422             :     }
   15423             :   }
   15424        6357 :   if (swig_obj[1]) {
   15425        2532 :     ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   15426        2532 :     if (!SWIG_IsOK(ecode3)) {
   15427           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIStatL" "', argument " "3"" of type '" "int""'");
   15428             :     } 
   15429             :     arg3 = static_cast< int >(val3);
   15430             :   }
   15431        6357 :   {
   15432        6357 :     if (!arg1) {
   15433        6357 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15434             :     }
   15435             :   }
   15436        6357 :   {
   15437        6357 :     const int bLocalUseExceptions = GetUseExceptions();
   15438        6357 :     if ( bLocalUseExceptions ) {
   15439        3711 :       pushErrorHandler();
   15440             :     }
   15441        6357 :     {
   15442        6357 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15443        6357 :       result = (int)wrapper_VSIStatL((char const *)arg1,arg2,arg3);
   15444        6357 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15445             :     }
   15446        6357 :     if ( bLocalUseExceptions ) {
   15447        3711 :       popErrorHandler();
   15448             :     }
   15449             : #ifndef SED_HACKS
   15450             :     if ( bLocalUseExceptions ) {
   15451             :       CPLErr eclass = CPLGetLastErrorType();
   15452             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15453             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15454             :       }
   15455             :     }
   15456             : #endif
   15457             :   }
   15458        6357 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15459        6357 :   {
   15460             :     /* %typemap(argout) (StatBuf *psStatBufOut)*/
   15461        6357 :     Py_DECREF(resultobj);
   15462        6357 :     if (result == 0)
   15463        4833 :     resultobj = SWIG_NewPointerObj((void*)new_StatBuf( arg2 ),SWIGTYPE_p_StatBuf,1);
   15464             :     else
   15465             :     {
   15466        1524 :       resultobj = Py_None;
   15467        1524 :       Py_INCREF(resultobj);
   15468             :     }
   15469             :   }
   15470        6357 :   {
   15471             :     /* %typemap(freearg) (const char *utf8_path) */
   15472        6357 :     GDALPythonFreeCStr(arg1, bToFree1);
   15473             :   }
   15474        6589 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15475             :   return resultobj;
   15476           0 : fail:
   15477           0 :   {
   15478             :     /* %typemap(freearg) (const char *utf8_path) */
   15479        6357 :     GDALPythonFreeCStr(arg1, bToFree1);
   15480             :   }
   15481             :   return NULL;
   15482             : }
   15483             : 
   15484             : 
   15485          35 : SWIGINTERN PyObject *_wrap_GetFileMetadata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15486          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15487          35 :   char *arg1 = (char *) 0 ;
   15488          35 :   char *arg2 = (char *) 0 ;
   15489          35 :   char **arg3 = (char **) NULL ;
   15490          35 :   int bToFree1 = 0 ;
   15491          35 :   int res2 ;
   15492          35 :   char *buf2 = 0 ;
   15493          35 :   int alloc2 = 0 ;
   15494          35 :   PyObject *swig_obj[3] ;
   15495          35 :   char **result = 0 ;
   15496             :   
   15497          35 :   if (!SWIG_Python_UnpackTuple(args, "GetFileMetadata", 2, 3, swig_obj)) SWIG_fail;
   15498          35 :   {
   15499             :     /* %typemap(in) (const char *utf8_path) */
   15500          35 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15501             :     {
   15502          35 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15503             :     }
   15504             :     else
   15505             :     {
   15506           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15507             :       
   15508             :     }
   15509          35 :     if (arg1 == NULL)
   15510             :     {
   15511           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15512           0 :       SWIG_fail;
   15513             :     }
   15514             :   }
   15515          35 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15516          35 :   if (!SWIG_IsOK(res2)) {
   15517           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetFileMetadata" "', argument " "2"" of type '" "char const *""'");
   15518             :   }
   15519          35 :   arg2 = reinterpret_cast< char * >(buf2);
   15520          35 :   if (swig_obj[2]) {
   15521           0 :     {
   15522             :       /* %typemap(in) char **dict */
   15523           0 :       arg3 = NULL;
   15524           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   15525           0 :         int bErr = FALSE;
   15526           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   15527           0 :         if ( bErr )
   15528             :         {
   15529           0 :           SWIG_fail;
   15530             :         }
   15531             :       }
   15532           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   15533           0 :         int bErr = FALSE;
   15534           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   15535           0 :         if ( bErr )
   15536             :         {
   15537           0 :           SWIG_fail;
   15538             :         }
   15539             :       }
   15540             :       else {
   15541           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15542           0 :         SWIG_fail;
   15543             :       }
   15544             :     }
   15545             :   }
   15546          35 :   {
   15547          35 :     if (!arg1) {
   15548          35 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15549             :     }
   15550             :   }
   15551          35 :   {
   15552          35 :     const int bLocalUseExceptions = GetUseExceptions();
   15553          35 :     if ( bLocalUseExceptions ) {
   15554          16 :       pushErrorHandler();
   15555             :     }
   15556          35 :     {
   15557          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15558          35 :       result = (char **)VSIGetFileMetadata((char const *)arg1,(char const *)arg2,arg3);
   15559          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15560             :     }
   15561          35 :     if ( bLocalUseExceptions ) {
   15562          16 :       popErrorHandler();
   15563             :     }
   15564             : #ifndef SED_HACKS
   15565             :     if ( bLocalUseExceptions ) {
   15566             :       CPLErr eclass = CPLGetLastErrorType();
   15567             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15568             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15569             :       }
   15570             :     }
   15571             : #endif
   15572             :   }
   15573          35 :   {
   15574             :     /* %typemap(out) char **dict */
   15575          35 :     resultobj = GetCSLStringAsPyDict(result, true);
   15576             :   }
   15577          35 :   {
   15578             :     /* %typemap(freearg) (const char *utf8_path) */
   15579          35 :     GDALPythonFreeCStr(arg1, bToFree1);
   15580             :   }
   15581          35 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15582          35 :   {
   15583             :     /* %typemap(freearg) char **dict */
   15584          35 :     CSLDestroy( arg3 );
   15585             :   }
   15586          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; } }
   15587             :   return resultobj;
   15588           0 : fail:
   15589           0 :   {
   15590             :     /* %typemap(freearg) (const char *utf8_path) */
   15591           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15592             :   }
   15593           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15594           0 :   {
   15595             :     /* %typemap(freearg) char **dict */
   15596           0 :     CSLDestroy( arg3 );
   15597             :   }
   15598             :   return NULL;
   15599             : }
   15600             : 
   15601             : 
   15602          17 : SWIGINTERN PyObject *_wrap_SetFileMetadata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15603          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15604          17 :   char *arg1 = (char *) 0 ;
   15605          17 :   char **arg2 = (char **) 0 ;
   15606          17 :   char *arg3 = (char *) 0 ;
   15607          17 :   char **arg4 = (char **) NULL ;
   15608          17 :   int bToFree1 = 0 ;
   15609          17 :   int res3 ;
   15610          17 :   char *buf3 = 0 ;
   15611          17 :   int alloc3 = 0 ;
   15612          17 :   PyObject *swig_obj[4] ;
   15613          17 :   bool result;
   15614             :   
   15615          17 :   if (!SWIG_Python_UnpackTuple(args, "SetFileMetadata", 3, 4, swig_obj)) SWIG_fail;
   15616          17 :   {
   15617             :     /* %typemap(in) (const char *utf8_path) */
   15618          17 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15619             :     {
   15620          17 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15621             :     }
   15622             :     else
   15623             :     {
   15624           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15625             :       
   15626             :     }
   15627          17 :     if (arg1 == NULL)
   15628             :     {
   15629           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15630           0 :       SWIG_fail;
   15631             :     }
   15632             :   }
   15633          17 :   {
   15634             :     /* %typemap(in) char **dict */
   15635          17 :     arg2 = NULL;
   15636          17 :     if ( PySequence_Check( swig_obj[1] ) ) {
   15637           0 :       int bErr = FALSE;
   15638           0 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   15639           0 :       if ( bErr )
   15640             :       {
   15641           0 :         SWIG_fail;
   15642             :       }
   15643             :     }
   15644          17 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   15645          17 :       int bErr = FALSE;
   15646          17 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   15647          17 :       if ( bErr )
   15648             :       {
   15649           0 :         SWIG_fail;
   15650             :       }
   15651             :     }
   15652             :     else {
   15653           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15654           0 :       SWIG_fail;
   15655             :     }
   15656             :   }
   15657          17 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   15658          17 :   if (!SWIG_IsOK(res3)) {
   15659           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetFileMetadata" "', argument " "3"" of type '" "char const *""'");
   15660             :   }
   15661          17 :   arg3 = reinterpret_cast< char * >(buf3);
   15662          17 :   if (swig_obj[3]) {
   15663           1 :     {
   15664             :       /* %typemap(in) char **dict */
   15665           1 :       arg4 = NULL;
   15666           1 :       if ( PySequence_Check( swig_obj[3] ) ) {
   15667           1 :         int bErr = FALSE;
   15668           1 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   15669           1 :         if ( bErr )
   15670             :         {
   15671           0 :           SWIG_fail;
   15672             :         }
   15673             :       }
   15674           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   15675           0 :         int bErr = FALSE;
   15676           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   15677           0 :         if ( bErr )
   15678             :         {
   15679           0 :           SWIG_fail;
   15680             :         }
   15681             :       }
   15682             :       else {
   15683           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15684           0 :         SWIG_fail;
   15685             :       }
   15686             :     }
   15687             :   }
   15688          17 :   {
   15689          17 :     if (!arg1) {
   15690          17 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15691             :     }
   15692             :   }
   15693          17 :   {
   15694          17 :     const int bLocalUseExceptions = GetUseExceptions();
   15695          17 :     if ( bLocalUseExceptions ) {
   15696           0 :       pushErrorHandler();
   15697             :     }
   15698          17 :     {
   15699          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15700          17 :       result = (bool)VSISetFileMetadata((char const *)arg1,arg2,(char const *)arg3,arg4);
   15701          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15702             :     }
   15703          17 :     if ( bLocalUseExceptions ) {
   15704           0 :       popErrorHandler();
   15705             :     }
   15706             : #ifndef SED_HACKS
   15707             :     if ( bLocalUseExceptions ) {
   15708             :       CPLErr eclass = CPLGetLastErrorType();
   15709             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15710             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15711             :       }
   15712             :     }
   15713             : #endif
   15714             :   }
   15715          17 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   15716          17 :   {
   15717             :     /* %typemap(freearg) (const char *utf8_path) */
   15718          17 :     GDALPythonFreeCStr(arg1, bToFree1);
   15719             :   }
   15720          17 :   {
   15721             :     /* %typemap(freearg) char **dict */
   15722          17 :     CSLDestroy( arg2 );
   15723             :   }
   15724          17 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   15725          17 :   {
   15726             :     /* %typemap(freearg) char **dict */
   15727          17 :     CSLDestroy( arg4 );
   15728             :   }
   15729          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; } }
   15730             :   return resultobj;
   15731           0 : fail:
   15732           0 :   {
   15733             :     /* %typemap(freearg) (const char *utf8_path) */
   15734           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15735             :   }
   15736           0 :   {
   15737             :     /* %typemap(freearg) char **dict */
   15738           0 :     CSLDestroy( arg2 );
   15739             :   }
   15740           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   15741           0 :   {
   15742             :     /* %typemap(freearg) char **dict */
   15743           0 :     CSLDestroy( arg4 );
   15744             :   }
   15745             :   return NULL;
   15746             : }
   15747             : 
   15748             : 
   15749        4592 : SWIGINTERN PyObject *_wrap_VSIFOpenL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15750        4592 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15751        4592 :   char *arg1 = (char *) 0 ;
   15752        4592 :   char *arg2 = (char *) 0 ;
   15753        4592 :   int bToFree1 = 0 ;
   15754        4592 :   int res2 ;
   15755        4592 :   char *buf2 = 0 ;
   15756        4592 :   int alloc2 = 0 ;
   15757        4592 :   PyObject *swig_obj[2] ;
   15758        4592 :   VSILFILE *result = 0 ;
   15759             :   
   15760        4592 :   if (!SWIG_Python_UnpackTuple(args, "VSIFOpenL", 2, 2, swig_obj)) SWIG_fail;
   15761        4592 :   {
   15762             :     /* %typemap(in) (const char *utf8_path) */
   15763        4592 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15764             :     {
   15765        3928 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15766             :     }
   15767             :     else
   15768             :     {
   15769         664 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15770             :       
   15771             :     }
   15772        4592 :     if (arg1 == NULL)
   15773             :     {
   15774           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15775           0 :       SWIG_fail;
   15776             :     }
   15777             :   }
   15778        4592 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15779        4592 :   if (!SWIG_IsOK(res2)) {
   15780           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenL" "', argument " "2"" of type '" "char const *""'");
   15781             :   }
   15782        4592 :   arg2 = reinterpret_cast< char * >(buf2);
   15783        4592 :   {
   15784        4592 :     if (!arg1) {
   15785        4592 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15786             :     }
   15787             :   }
   15788        4592 :   {
   15789        4592 :     const int bLocalUseExceptions = GetUseExceptions();
   15790        4592 :     if ( bLocalUseExceptions ) {
   15791         902 :       pushErrorHandler();
   15792             :     }
   15793        4592 :     {
   15794        4592 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15795        4592 :       result = (VSILFILE *)wrapper_VSIFOpenL((char const *)arg1,(char const *)arg2);
   15796        4592 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15797             :     }
   15798        4592 :     if ( bLocalUseExceptions ) {
   15799         902 :       popErrorHandler();
   15800             :     }
   15801             : #ifndef SED_HACKS
   15802             :     if ( bLocalUseExceptions ) {
   15803             :       CPLErr eclass = CPLGetLastErrorType();
   15804             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15805             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15806             :       }
   15807             :     }
   15808             : #endif
   15809             :   }
   15810        4592 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSILFILE, 0 |  0 );
   15811        4592 :   {
   15812             :     /* %typemap(freearg) (const char *utf8_path) */
   15813        4592 :     GDALPythonFreeCStr(arg1, bToFree1);
   15814             :   }
   15815        4592 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15816        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; } }
   15817             :   return resultobj;
   15818           0 : fail:
   15819           0 :   {
   15820             :     /* %typemap(freearg) (const char *utf8_path) */
   15821           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15822             :   }
   15823           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15824             :   return NULL;
   15825             : }
   15826             : 
   15827             : 
   15828         389 : SWIGINTERN PyObject *_wrap_VSIFOpenExL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15829         389 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15830         389 :   char *arg1 = (char *) 0 ;
   15831         389 :   char *arg2 = (char *) 0 ;
   15832         389 :   int arg3 = (int) FALSE ;
   15833         389 :   char **arg4 = (char **) NULL ;
   15834         389 :   int bToFree1 = 0 ;
   15835         389 :   int res2 ;
   15836         389 :   char *buf2 = 0 ;
   15837         389 :   int alloc2 = 0 ;
   15838         389 :   int val3 ;
   15839         389 :   int ecode3 = 0 ;
   15840         389 :   PyObject *swig_obj[4] ;
   15841         389 :   VSILFILE *result = 0 ;
   15842             :   
   15843         389 :   if (!SWIG_Python_UnpackTuple(args, "VSIFOpenExL", 2, 4, swig_obj)) SWIG_fail;
   15844         389 :   {
   15845             :     /* %typemap(in) (const char *utf8_path) */
   15846         389 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15847             :     {
   15848         251 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15849             :     }
   15850             :     else
   15851             :     {
   15852         138 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15853             :       
   15854             :     }
   15855         389 :     if (arg1 == NULL)
   15856             :     {
   15857           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15858           0 :       SWIG_fail;
   15859             :     }
   15860             :   }
   15861         389 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15862         389 :   if (!SWIG_IsOK(res2)) {
   15863           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenExL" "', argument " "2"" of type '" "char const *""'");
   15864             :   }
   15865         389 :   arg2 = reinterpret_cast< char * >(buf2);
   15866         389 :   if (swig_obj[2]) {
   15867         389 :     ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   15868         389 :     if (!SWIG_IsOK(ecode3)) {
   15869           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFOpenExL" "', argument " "3"" of type '" "int""'");
   15870             :     } 
   15871             :     arg3 = static_cast< int >(val3);
   15872             :   }
   15873         389 :   if (swig_obj[3]) {
   15874          21 :     {
   15875             :       /* %typemap(in) char **dict */
   15876          21 :       arg4 = NULL;
   15877          21 :       if ( PySequence_Check( swig_obj[3] ) ) {
   15878          21 :         int bErr = FALSE;
   15879          21 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   15880          21 :         if ( bErr )
   15881             :         {
   15882           0 :           SWIG_fail;
   15883             :         }
   15884             :       }
   15885           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   15886           0 :         int bErr = FALSE;
   15887           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   15888           0 :         if ( bErr )
   15889             :         {
   15890           0 :           SWIG_fail;
   15891             :         }
   15892             :       }
   15893             :       else {
   15894           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15895           0 :         SWIG_fail;
   15896             :       }
   15897             :     }
   15898             :   }
   15899         389 :   {
   15900         389 :     if (!arg1) {
   15901         389 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15902             :     }
   15903             :   }
   15904         389 :   {
   15905         389 :     const int bLocalUseExceptions = GetUseExceptions();
   15906         389 :     if ( bLocalUseExceptions ) {
   15907         193 :       pushErrorHandler();
   15908             :     }
   15909         389 :     {
   15910         389 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15911         389 :       result = (VSILFILE *)wrapper_VSIFOpenExL((char const *)arg1,(char const *)arg2,arg3,arg4);
   15912         389 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15913             :     }
   15914         389 :     if ( bLocalUseExceptions ) {
   15915         193 :       popErrorHandler();
   15916             :     }
   15917             : #ifndef SED_HACKS
   15918             :     if ( bLocalUseExceptions ) {
   15919             :       CPLErr eclass = CPLGetLastErrorType();
   15920             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15921             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15922             :       }
   15923             :     }
   15924             : #endif
   15925             :   }
   15926         389 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSILFILE, 0 |  0 );
   15927         389 :   {
   15928             :     /* %typemap(freearg) (const char *utf8_path) */
   15929         389 :     GDALPythonFreeCStr(arg1, bToFree1);
   15930             :   }
   15931         389 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15932         389 :   {
   15933             :     /* %typemap(freearg) char **dict */
   15934         389 :     CSLDestroy( arg4 );
   15935             :   }
   15936         389 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15937             :   return resultobj;
   15938           0 : fail:
   15939           0 :   {
   15940             :     /* %typemap(freearg) (const char *utf8_path) */
   15941           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15942             :   }
   15943           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15944           0 :   {
   15945             :     /* %typemap(freearg) char **dict */
   15946           0 :     CSLDestroy( arg4 );
   15947             :   }
   15948             :   return NULL;
   15949             : }
   15950             : 
   15951             : 
   15952          40 : SWIGINTERN PyObject *_wrap_VSIFEofL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15953          40 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15954          40 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   15955          40 :   void *argp1 = 0 ;
   15956          40 :   int res1 = 0 ;
   15957          40 :   PyObject *swig_obj[1] ;
   15958          40 :   int result;
   15959             :   
   15960          40 :   if (!args) SWIG_fail;
   15961          40 :   swig_obj[0] = args;
   15962          40 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   15963          40 :   if (!SWIG_IsOK(res1)) {
   15964           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFEofL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   15965             :   }
   15966          40 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   15967          40 :   {
   15968          40 :     if (!arg1) {
   15969           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15970             :     }
   15971             :   }
   15972          40 :   {
   15973          40 :     const int bLocalUseExceptions = GetUseExceptions();
   15974          40 :     if ( bLocalUseExceptions ) {
   15975          11 :       pushErrorHandler();
   15976             :     }
   15977          40 :     {
   15978          40 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15979          40 :       result = (int)VSIFEofL(arg1);
   15980          40 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15981             :     }
   15982          40 :     if ( bLocalUseExceptions ) {
   15983          11 :       popErrorHandler();
   15984             :     }
   15985             : #ifndef SED_HACKS
   15986             :     if ( bLocalUseExceptions ) {
   15987             :       CPLErr eclass = CPLGetLastErrorType();
   15988             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15989             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15990             :       }
   15991             :     }
   15992             : #endif
   15993             :   }
   15994          40 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15995          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; } }
   15996             :   return resultobj;
   15997             : fail:
   15998             :   return NULL;
   15999             : }
   16000             : 
   16001             : 
   16002        1653 : SWIGINTERN PyObject *_wrap_VSIFErrorL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16003        1653 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16004        1653 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16005        1653 :   void *argp1 = 0 ;
   16006        1653 :   int res1 = 0 ;
   16007        1653 :   PyObject *swig_obj[1] ;
   16008        1653 :   int result;
   16009             :   
   16010        1653 :   if (!args) SWIG_fail;
   16011        1653 :   swig_obj[0] = args;
   16012        1653 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16013        1653 :   if (!SWIG_IsOK(res1)) {
   16014           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFErrorL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16015             :   }
   16016        1653 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16017        1653 :   {
   16018        1653 :     if (!arg1) {
   16019           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16020             :     }
   16021             :   }
   16022        1653 :   {
   16023        1653 :     const int bLocalUseExceptions = GetUseExceptions();
   16024        1653 :     if ( bLocalUseExceptions ) {
   16025          10 :       pushErrorHandler();
   16026             :     }
   16027        1653 :     {
   16028        1653 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16029        1653 :       result = (int)VSIFErrorL(arg1);
   16030        1653 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16031             :     }
   16032        1653 :     if ( bLocalUseExceptions ) {
   16033          10 :       popErrorHandler();
   16034             :     }
   16035             : #ifndef SED_HACKS
   16036             :     if ( bLocalUseExceptions ) {
   16037             :       CPLErr eclass = CPLGetLastErrorType();
   16038             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16039             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16040             :       }
   16041             :     }
   16042             : #endif
   16043             :   }
   16044        1653 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16045        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; } }
   16046             :   return resultobj;
   16047             : fail:
   16048             :   return NULL;
   16049             : }
   16050             : 
   16051             : 
   16052           5 : SWIGINTERN PyObject *_wrap_VSIFClearErrL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16053           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16054           5 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16055           5 :   void *argp1 = 0 ;
   16056           5 :   int res1 = 0 ;
   16057           5 :   PyObject *swig_obj[1] ;
   16058             :   
   16059           5 :   if (!args) SWIG_fail;
   16060           5 :   swig_obj[0] = args;
   16061           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16062           5 :   if (!SWIG_IsOK(res1)) {
   16063           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFClearErrL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16064             :   }
   16065           5 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16066           5 :   {
   16067           5 :     if (!arg1) {
   16068           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16069             :     }
   16070             :   }
   16071           5 :   {
   16072           5 :     const int bLocalUseExceptions = GetUseExceptions();
   16073           5 :     if ( bLocalUseExceptions ) {
   16074           1 :       pushErrorHandler();
   16075             :     }
   16076           5 :     {
   16077           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16078           5 :       VSIFClearErrL(arg1);
   16079           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16080             :     }
   16081           5 :     if ( bLocalUseExceptions ) {
   16082           1 :       popErrorHandler();
   16083             :     }
   16084             : #ifndef SED_HACKS
   16085             :     if ( bLocalUseExceptions ) {
   16086             :       CPLErr eclass = CPLGetLastErrorType();
   16087             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16088             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16089             :       }
   16090             :     }
   16091             : #endif
   16092             :   }
   16093           5 :   resultobj = SWIG_Py_Void();
   16094           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; } }
   16095             :   return resultobj;
   16096             : fail:
   16097             :   return NULL;
   16098             : }
   16099             : 
   16100             : 
   16101           3 : SWIGINTERN PyObject *_wrap_VSIFFlushL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16102           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16103           3 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16104           3 :   void *argp1 = 0 ;
   16105           3 :   int res1 = 0 ;
   16106           3 :   PyObject *swig_obj[1] ;
   16107           3 :   int result;
   16108             :   
   16109           3 :   if (!args) SWIG_fail;
   16110           3 :   swig_obj[0] = args;
   16111           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16112           3 :   if (!SWIG_IsOK(res1)) {
   16113           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFFlushL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16114             :   }
   16115           3 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16116           3 :   {
   16117           3 :     if (!arg1) {
   16118           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16119             :     }
   16120             :   }
   16121           3 :   {
   16122           3 :     const int bLocalUseExceptions = GetUseExceptions();
   16123           3 :     if ( bLocalUseExceptions ) {
   16124           0 :       pushErrorHandler();
   16125             :     }
   16126           3 :     {
   16127           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16128           3 :       result = (int)VSIFFlushL(arg1);
   16129           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16130             :     }
   16131           3 :     if ( bLocalUseExceptions ) {
   16132           0 :       popErrorHandler();
   16133             :     }
   16134             : #ifndef SED_HACKS
   16135             :     if ( bLocalUseExceptions ) {
   16136             :       CPLErr eclass = CPLGetLastErrorType();
   16137             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16138             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16139             :       }
   16140             :     }
   16141             : #endif
   16142             :   }
   16143           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16144           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; } }
   16145             :   return resultobj;
   16146             : fail:
   16147             :   return NULL;
   16148             : }
   16149             : 
   16150             : 
   16151        4661 : SWIGINTERN PyObject *_wrap_VSIFCloseL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16152        4661 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16153        4661 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16154        4661 :   void *argp1 = 0 ;
   16155        4661 :   int res1 = 0 ;
   16156        4661 :   PyObject *swig_obj[1] ;
   16157        4661 :   VSI_RETVAL result;
   16158             :   
   16159        4661 :   if (!args) SWIG_fail;
   16160        4661 :   swig_obj[0] = args;
   16161        4661 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16162        4661 :   if (!SWIG_IsOK(res1)) {
   16163           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFCloseL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16164             :   }
   16165        4661 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16166        4661 :   {
   16167        4661 :     if (!arg1) {
   16168           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16169             :     }
   16170             :   }
   16171        4661 :   {
   16172        4661 :     const int bLocalUseExceptions = GetUseExceptions();
   16173        4661 :     if ( bLocalUseExceptions ) {
   16174        1019 :       pushErrorHandler();
   16175             :     }
   16176        4661 :     {
   16177        4661 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16178        4661 :       result = VSIFCloseL(arg1);
   16179        4661 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16180             :     }
   16181        4661 :     if ( bLocalUseExceptions ) {
   16182        1019 :       popErrorHandler();
   16183             :     }
   16184             : #ifndef SED_HACKS
   16185             :     if ( bLocalUseExceptions ) {
   16186             :       CPLErr eclass = CPLGetLastErrorType();
   16187             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16188             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16189             :       }
   16190             :     }
   16191             : #endif
   16192             :   }
   16193        4661 :   {
   16194             :     /* %typemap(out) VSI_RETVAL */
   16195        4740 :     if ( result != 0 && GetUseExceptions()) {
   16196           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   16197           0 :       if( pszMessage[0] != '\0' )
   16198           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   16199             :       else
   16200           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   16201           0 :       SWIG_fail;
   16202             :     }
   16203             :   }
   16204        4661 :   {
   16205             :     /* %typemap(ret) VSI_RETVAL */
   16206        4661 :     resultobj = PyInt_FromLong( result );
   16207             :   }
   16208        4661 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16209             :   return resultobj;
   16210             : fail:
   16211             :   return NULL;
   16212             : }
   16213             : 
   16214             : 
   16215       65904 : SWIGINTERN PyObject *_wrap_VSIFSeekL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16216       65904 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16217       65904 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16218       65904 :   GIntBig arg2 ;
   16219       65904 :   int arg3 ;
   16220       65904 :   void *argp1 = 0 ;
   16221       65904 :   int res1 = 0 ;
   16222       65904 :   int val3 ;
   16223       65904 :   int ecode3 = 0 ;
   16224       65904 :   PyObject *swig_obj[3] ;
   16225       65904 :   int result;
   16226             :   
   16227       65904 :   if (!SWIG_Python_UnpackTuple(args, "VSIFSeekL", 3, 3, swig_obj)) SWIG_fail;
   16228       65904 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16229       65904 :   if (!SWIG_IsOK(res1)) {
   16230           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFSeekL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16231             :   }
   16232       65904 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16233       65904 :   {
   16234       65904 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   16235             :   }
   16236       65904 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   16237       65904 :   if (!SWIG_IsOK(ecode3)) {
   16238           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFSeekL" "', argument " "3"" of type '" "int""'");
   16239             :   } 
   16240       65904 :   arg3 = static_cast< int >(val3);
   16241       65904 :   {
   16242       65904 :     if (!arg1) {
   16243           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16244             :     }
   16245             :   }
   16246       65904 :   {
   16247       65904 :     const int bLocalUseExceptions = GetUseExceptions();
   16248       65904 :     if ( bLocalUseExceptions ) {
   16249        2679 :       pushErrorHandler();
   16250             :     }
   16251       65904 :     {
   16252       65904 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16253       65904 :       result = (int)wrapper_VSIFSeekL(arg1,arg2,arg3);
   16254       65904 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16255             :     }
   16256       65904 :     if ( bLocalUseExceptions ) {
   16257        2679 :       popErrorHandler();
   16258             :     }
   16259             : #ifndef SED_HACKS
   16260             :     if ( bLocalUseExceptions ) {
   16261             :       CPLErr eclass = CPLGetLastErrorType();
   16262             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16263             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16264             :       }
   16265             :     }
   16266             : #endif
   16267             :   }
   16268       65904 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16269       65904 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16270             :   return resultobj;
   16271             : fail:
   16272             :   return NULL;
   16273             : }
   16274             : 
   16275             : 
   16276         835 : SWIGINTERN PyObject *_wrap_VSIFTellL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16277         835 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16278         835 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16279         835 :   void *argp1 = 0 ;
   16280         835 :   int res1 = 0 ;
   16281         835 :   PyObject *swig_obj[1] ;
   16282         835 :   GIntBig result;
   16283             :   
   16284         835 :   if (!args) SWIG_fail;
   16285         835 :   swig_obj[0] = args;
   16286         835 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16287         835 :   if (!SWIG_IsOK(res1)) {
   16288           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTellL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16289             :   }
   16290         835 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16291         835 :   {
   16292         835 :     if (!arg1) {
   16293           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16294             :     }
   16295             :   }
   16296         835 :   {
   16297         835 :     const int bLocalUseExceptions = GetUseExceptions();
   16298         835 :     if ( bLocalUseExceptions ) {
   16299         608 :       pushErrorHandler();
   16300             :     }
   16301         835 :     {
   16302         835 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16303         835 :       result = VSIFTellL(arg1);
   16304         835 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16305             :     }
   16306         835 :     if ( bLocalUseExceptions ) {
   16307         608 :       popErrorHandler();
   16308             :     }
   16309             : #ifndef SED_HACKS
   16310             :     if ( bLocalUseExceptions ) {
   16311             :       CPLErr eclass = CPLGetLastErrorType();
   16312             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16313             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16314             :       }
   16315             :     }
   16316             : #endif
   16317             :   }
   16318         835 :   {
   16319         835 :     resultobj = PyLong_FromLongLong(result);
   16320             :   }
   16321         835 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16322             :   return resultobj;
   16323             : fail:
   16324             :   return NULL;
   16325             : }
   16326             : 
   16327             : 
   16328          37 : SWIGINTERN PyObject *_wrap_VSIFTruncateL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16329          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16330          37 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16331          37 :   GIntBig arg2 ;
   16332          37 :   void *argp1 = 0 ;
   16333          37 :   int res1 = 0 ;
   16334          37 :   PyObject *swig_obj[2] ;
   16335          37 :   int result;
   16336             :   
   16337          37 :   if (!SWIG_Python_UnpackTuple(args, "VSIFTruncateL", 2, 2, swig_obj)) SWIG_fail;
   16338          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16339          37 :   if (!SWIG_IsOK(res1)) {
   16340           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTruncateL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16341             :   }
   16342          37 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16343          37 :   {
   16344          37 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   16345             :   }
   16346          37 :   {
   16347          37 :     if (!arg1) {
   16348           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16349             :     }
   16350             :   }
   16351          37 :   {
   16352          37 :     const int bLocalUseExceptions = GetUseExceptions();
   16353          37 :     if ( bLocalUseExceptions ) {
   16354          16 :       pushErrorHandler();
   16355             :     }
   16356          37 :     {
   16357          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16358          37 :       result = (int)VSIFTruncateL(arg1,arg2);
   16359          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16360             :     }
   16361          37 :     if ( bLocalUseExceptions ) {
   16362          16 :       popErrorHandler();
   16363             :     }
   16364             : #ifndef SED_HACKS
   16365             :     if ( bLocalUseExceptions ) {
   16366             :       CPLErr eclass = CPLGetLastErrorType();
   16367             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16368             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16369             :       }
   16370             :     }
   16371             : #endif
   16372             :   }
   16373          37 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16374          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; } }
   16375             :   return resultobj;
   16376             : fail:
   16377             :   return NULL;
   16378             : }
   16379             : 
   16380             : 
   16381           2 : SWIGINTERN PyObject *_wrap_VSISupportsSparseFiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16382           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16383           2 :   char *arg1 = (char *) 0 ;
   16384           2 :   int bToFree1 = 0 ;
   16385           2 :   PyObject *swig_obj[1] ;
   16386           2 :   int result;
   16387             :   
   16388           2 :   if (!args) SWIG_fail;
   16389           2 :   swig_obj[0] = args;
   16390           2 :   {
   16391             :     /* %typemap(in) (const char *utf8_path) */
   16392           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   16393             :     {
   16394           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   16395             :     }
   16396             :     else
   16397             :     {
   16398           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   16399             :       
   16400             :     }
   16401           2 :     if (arg1 == NULL)
   16402             :     {
   16403           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16404           0 :       SWIG_fail;
   16405             :     }
   16406             :   }
   16407           2 :   {
   16408           2 :     if (!arg1) {
   16409           2 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16410             :     }
   16411             :   }
   16412           2 :   {
   16413           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16414           2 :     if ( bLocalUseExceptions ) {
   16415           0 :       pushErrorHandler();
   16416             :     }
   16417           2 :     {
   16418           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16419           2 :       result = (int)VSISupportsSparseFiles((char const *)arg1);
   16420           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16421             :     }
   16422           2 :     if ( bLocalUseExceptions ) {
   16423           0 :       popErrorHandler();
   16424             :     }
   16425             : #ifndef SED_HACKS
   16426             :     if ( bLocalUseExceptions ) {
   16427             :       CPLErr eclass = CPLGetLastErrorType();
   16428             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16429             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16430             :       }
   16431             :     }
   16432             : #endif
   16433             :   }
   16434           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16435           2 :   {
   16436             :     /* %typemap(freearg) (const char *utf8_path) */
   16437           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16438             :   }
   16439           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; } }
   16440             :   return resultobj;
   16441           0 : fail:
   16442           0 :   {
   16443             :     /* %typemap(freearg) (const char *utf8_path) */
   16444           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16445             :   }
   16446             :   return NULL;
   16447             : }
   16448             : 
   16449             : 
   16450           3 : SWIGINTERN PyObject *_wrap_VSIFGetRangeStatusL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16451           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16452           3 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16453           3 :   GIntBig arg2 ;
   16454           3 :   GIntBig arg3 ;
   16455           3 :   void *argp1 = 0 ;
   16456           3 :   int res1 = 0 ;
   16457           3 :   PyObject *swig_obj[3] ;
   16458           3 :   int result;
   16459             :   
   16460           3 :   if (!SWIG_Python_UnpackTuple(args, "VSIFGetRangeStatusL", 3, 3, swig_obj)) SWIG_fail;
   16461           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16462           3 :   if (!SWIG_IsOK(res1)) {
   16463           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFGetRangeStatusL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16464             :   }
   16465           3 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16466           3 :   {
   16467           3 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   16468             :   }
   16469           3 :   {
   16470           3 :     arg3 = (GIntBig)PyLong_AsLongLong(swig_obj[2]);
   16471             :   }
   16472           3 :   {
   16473           3 :     if (!arg1) {
   16474           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16475             :     }
   16476             :   }
   16477           3 :   {
   16478           3 :     const int bLocalUseExceptions = GetUseExceptions();
   16479           3 :     if ( bLocalUseExceptions ) {
   16480           0 :       pushErrorHandler();
   16481             :     }
   16482           3 :     {
   16483           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16484           3 :       result = (int)VSIFGetRangeStatusL(arg1,arg2,arg3);
   16485           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16486             :     }
   16487           3 :     if ( bLocalUseExceptions ) {
   16488           0 :       popErrorHandler();
   16489             :     }
   16490             : #ifndef SED_HACKS
   16491             :     if ( bLocalUseExceptions ) {
   16492             :       CPLErr eclass = CPLGetLastErrorType();
   16493             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16494             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16495             :       }
   16496             :     }
   16497             : #endif
   16498             :   }
   16499           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16500           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; } }
   16501             :   return resultobj;
   16502             : fail:
   16503             :   return NULL;
   16504             : }
   16505             : 
   16506             : 
   16507      346827 : SWIGINTERN PyObject *_wrap_VSIFWriteL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16508      346827 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16509      346827 :   int arg1 ;
   16510      346827 :   char *arg2 = (char *) 0 ;
   16511      346827 :   int arg3 ;
   16512      346827 :   int arg4 ;
   16513      346827 :   VSILFILE *arg5 = (VSILFILE *) 0 ;
   16514      346827 :   int alloc1 = 0 ;
   16515      346827 :   bool viewIsValid1 = false ;
   16516      346827 :   Py_buffer view1 ;
   16517      346827 :   int val3 ;
   16518      346827 :   int ecode3 = 0 ;
   16519      346827 :   int val4 ;
   16520      346827 :   int ecode4 = 0 ;
   16521      346827 :   void *argp5 = 0 ;
   16522      346827 :   int res5 = 0 ;
   16523      346827 :   PyObject *swig_obj[4] ;
   16524      346827 :   int result;
   16525             :   
   16526      346827 :   if (!SWIG_Python_UnpackTuple(args, "VSIFWriteL", 4, 4, swig_obj)) SWIG_fail;
   16527      346827 :   {
   16528             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   16529      346827 :     char* ptr = NULL;
   16530      346827 :     if( !GetBufferAsCharPtrIntSize(swig_obj[0], &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   16531           0 :       SWIG_fail;
   16532             :     }
   16533      346827 :     arg2 = (char *)ptr;
   16534             :   }
   16535      346827 :   ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   16536      346827 :   if (!SWIG_IsOK(ecode3)) {
   16537           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFWriteL" "', argument " "3"" of type '" "int""'");
   16538             :   } 
   16539      346827 :   arg3 = static_cast< int >(val3);
   16540      346827 :   ecode4 = SWIG_AsVal_int(swig_obj[2], &val4);
   16541      346827 :   if (!SWIG_IsOK(ecode4)) {
   16542           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VSIFWriteL" "', argument " "4"" of type '" "int""'");
   16543             :   } 
   16544      346827 :   arg4 = static_cast< int >(val4);
   16545      346827 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16546      346827 :   if (!SWIG_IsOK(res5)) {
   16547           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "VSIFWriteL" "', argument " "5"" of type '" "VSILFILE *""'"); 
   16548             :   }
   16549      346827 :   arg5 = reinterpret_cast< VSILFILE * >(argp5);
   16550      346827 :   {
   16551      346827 :     if (!arg5) {
   16552           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16553             :     }
   16554             :   }
   16555      346827 :   {
   16556      346827 :     const int bLocalUseExceptions = GetUseExceptions();
   16557      346827 :     if ( bLocalUseExceptions ) {
   16558      105890 :       pushErrorHandler();
   16559             :     }
   16560      346827 :     {
   16561      346827 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16562      346827 :       result = (int)wrapper_VSIFWriteL(arg1,arg2,arg3,arg4,arg5);
   16563      346827 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16564             :     }
   16565      346827 :     if ( bLocalUseExceptions ) {
   16566      105890 :       popErrorHandler();
   16567             :     }
   16568             : #ifndef SED_HACKS
   16569             :     if ( bLocalUseExceptions ) {
   16570             :       CPLErr eclass = CPLGetLastErrorType();
   16571             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16572             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16573             :       }
   16574             :     }
   16575             : #endif
   16576             :   }
   16577      346827 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16578      346827 :   {
   16579             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   16580      346827 :     if( viewIsValid1 ) {
   16581        6545 :       PyBuffer_Release(&view1);
   16582             :     }
   16583      340282 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   16584      340282 :       delete[] arg2;
   16585             :     }
   16586             :   }
   16587      346827 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16588             :   return resultobj;
   16589           0 : fail:
   16590           0 :   {
   16591             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   16592           0 :     if( viewIsValid1 ) {
   16593           0 :       PyBuffer_Release(&view1);
   16594             :     }
   16595      346827 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   16596           0 :       delete[] arg2;
   16597             :     }
   16598             :   }
   16599             :   return NULL;
   16600             : }
   16601             : 
   16602             : 
   16603         213 : SWIGINTERN PyObject *_wrap_CPLReadLineL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16604         213 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16605         213 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16606         213 :   void *argp1 = 0 ;
   16607         213 :   int res1 = 0 ;
   16608         213 :   PyObject *swig_obj[1] ;
   16609         213 :   char *result = 0 ;
   16610             :   
   16611         213 :   if (!args) SWIG_fail;
   16612         213 :   swig_obj[0] = args;
   16613         213 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16614         213 :   if (!SWIG_IsOK(res1)) {
   16615           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPLReadLineL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16616             :   }
   16617         213 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16618         213 :   {
   16619         213 :     if (!arg1) {
   16620           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16621             :     }
   16622             :   }
   16623         213 :   {
   16624         213 :     const int bLocalUseExceptions = GetUseExceptions();
   16625         213 :     if ( bLocalUseExceptions ) {
   16626          41 :       pushErrorHandler();
   16627             :     }
   16628         213 :     {
   16629         213 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16630         213 :       result = (char *)CPLReadLineL(arg1);
   16631         213 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16632             :     }
   16633         213 :     if ( bLocalUseExceptions ) {
   16634          41 :       popErrorHandler();
   16635             :     }
   16636             : #ifndef SED_HACKS
   16637             :     if ( bLocalUseExceptions ) {
   16638             :       CPLErr eclass = CPLGetLastErrorType();
   16639             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16640             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16641             :       }
   16642             :     }
   16643             : #endif
   16644             :   }
   16645         213 :   resultobj = SWIG_FromCharPtr((const char *)result);
   16646         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; } }
   16647             :   return resultobj;
   16648             : fail:
   16649             :   return NULL;
   16650             : }
   16651             : 
   16652             : 
   16653         337 : SWIGINTERN PyObject *_wrap_VSICurlClearCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16654         337 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16655             :   
   16656         337 :   if (!SWIG_Python_UnpackTuple(args, "VSICurlClearCache", 0, 0, 0)) SWIG_fail;
   16657         337 :   {
   16658         337 :     const int bLocalUseExceptions = GetUseExceptions();
   16659         337 :     if ( bLocalUseExceptions ) {
   16660         113 :       pushErrorHandler();
   16661             :     }
   16662         337 :     {
   16663         337 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16664         337 :       VSICurlClearCache();
   16665         337 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16666             :     }
   16667         337 :     if ( bLocalUseExceptions ) {
   16668         113 :       popErrorHandler();
   16669             :     }
   16670             : #ifndef SED_HACKS
   16671             :     if ( bLocalUseExceptions ) {
   16672             :       CPLErr eclass = CPLGetLastErrorType();
   16673             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16674             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16675             :       }
   16676             :     }
   16677             : #endif
   16678             :   }
   16679         337 :   resultobj = SWIG_Py_Void();
   16680         337 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16681             :   return resultobj;
   16682           0 : fail:
   16683           0 :   return NULL;
   16684             : }
   16685             : 
   16686             : 
   16687           2 : SWIGINTERN PyObject *_wrap_VSICurlPartialClearCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16688           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16689           2 :   char *arg1 = (char *) 0 ;
   16690           2 :   int bToFree1 = 0 ;
   16691           2 :   PyObject *swig_obj[1] ;
   16692             :   
   16693           2 :   if (!args) SWIG_fail;
   16694           2 :   swig_obj[0] = args;
   16695           2 :   {
   16696             :     /* %typemap(in) (const char *utf8_path) */
   16697           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   16698             :     {
   16699           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   16700             :     }
   16701             :     else
   16702             :     {
   16703           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   16704             :       
   16705             :     }
   16706           2 :     if (arg1 == NULL)
   16707             :     {
   16708           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16709           0 :       SWIG_fail;
   16710             :     }
   16711             :   }
   16712           2 :   {
   16713           2 :     if (!arg1) {
   16714           2 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16715             :     }
   16716             :   }
   16717           2 :   {
   16718           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16719           2 :     if ( bLocalUseExceptions ) {
   16720           0 :       pushErrorHandler();
   16721             :     }
   16722           2 :     {
   16723           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16724           2 :       VSICurlPartialClearCache((char const *)arg1);
   16725           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16726             :     }
   16727           2 :     if ( bLocalUseExceptions ) {
   16728           0 :       popErrorHandler();
   16729             :     }
   16730             : #ifndef SED_HACKS
   16731             :     if ( bLocalUseExceptions ) {
   16732             :       CPLErr eclass = CPLGetLastErrorType();
   16733             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16734             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16735             :       }
   16736             :     }
   16737             : #endif
   16738             :   }
   16739           2 :   resultobj = SWIG_Py_Void();
   16740           2 :   {
   16741             :     /* %typemap(freearg) (const char *utf8_path) */
   16742           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16743             :   }
   16744           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; } }
   16745             :   return resultobj;
   16746           0 : fail:
   16747           0 :   {
   16748             :     /* %typemap(freearg) (const char *utf8_path) */
   16749           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16750             :   }
   16751             :   return NULL;
   16752             : }
   16753             : 
   16754             : 
   16755           2 : SWIGINTERN PyObject *_wrap_NetworkStatsReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16756           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16757             :   
   16758           2 :   if (!SWIG_Python_UnpackTuple(args, "NetworkStatsReset", 0, 0, 0)) SWIG_fail;
   16759           2 :   {
   16760           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16761           2 :     if ( bLocalUseExceptions ) {
   16762           0 :       pushErrorHandler();
   16763             :     }
   16764           2 :     {
   16765           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16766           2 :       VSINetworkStatsReset();
   16767           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16768             :     }
   16769           2 :     if ( bLocalUseExceptions ) {
   16770           0 :       popErrorHandler();
   16771             :     }
   16772             : #ifndef SED_HACKS
   16773             :     if ( bLocalUseExceptions ) {
   16774             :       CPLErr eclass = CPLGetLastErrorType();
   16775             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16776             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16777             :       }
   16778             :     }
   16779             : #endif
   16780             :   }
   16781           2 :   resultobj = SWIG_Py_Void();
   16782           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; } }
   16783             :   return resultobj;
   16784           0 : fail:
   16785           0 :   return NULL;
   16786             : }
   16787             : 
   16788             : 
   16789           1 : SWIGINTERN PyObject *_wrap_NetworkStatsGetAsSerializedJSON(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16790           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16791           1 :   char **arg1 = (char **) NULL ;
   16792           1 :   PyObject *swig_obj[1] ;
   16793           1 :   retStringAndCPLFree *result = 0 ;
   16794             :   
   16795           1 :   if (!SWIG_Python_UnpackTuple(args, "NetworkStatsGetAsSerializedJSON", 0, 1, swig_obj)) SWIG_fail;
   16796           1 :   if (swig_obj[0]) {
   16797           0 :     {
   16798             :       /* %typemap(in) char **dict */
   16799           0 :       arg1 = NULL;
   16800           0 :       if ( PySequence_Check( swig_obj[0] ) ) {
   16801           0 :         int bErr = FALSE;
   16802           0 :         arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   16803           0 :         if ( bErr )
   16804             :         {
   16805           0 :           SWIG_fail;
   16806             :         }
   16807             :       }
   16808           0 :       else if ( PyMapping_Check( swig_obj[0] ) ) {
   16809           0 :         int bErr = FALSE;
   16810           0 :         arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   16811           0 :         if ( bErr )
   16812             :         {
   16813           0 :           SWIG_fail;
   16814             :         }
   16815             :       }
   16816             :       else {
   16817           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   16818           0 :         SWIG_fail;
   16819             :       }
   16820             :     }
   16821             :   }
   16822           1 :   {
   16823           1 :     const int bLocalUseExceptions = GetUseExceptions();
   16824           1 :     if ( bLocalUseExceptions ) {
   16825           0 :       pushErrorHandler();
   16826             :     }
   16827           1 :     {
   16828           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16829           1 :       result = (retStringAndCPLFree *)VSINetworkStatsGetAsSerializedJSON(arg1);
   16830           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16831             :     }
   16832           1 :     if ( bLocalUseExceptions ) {
   16833           0 :       popErrorHandler();
   16834             :     }
   16835             : #ifndef SED_HACKS
   16836             :     if ( bLocalUseExceptions ) {
   16837             :       CPLErr eclass = CPLGetLastErrorType();
   16838             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16839             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16840             :       }
   16841             :     }
   16842             : #endif
   16843             :   }
   16844           1 :   {
   16845             :     /* %typemap(out) (retStringAndCPLFree*) */
   16846           1 :     Py_XDECREF(resultobj);
   16847           1 :     if(result)
   16848             :     {
   16849           1 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   16850           1 :       CPLFree(result);
   16851             :     }
   16852             :     else
   16853             :     {
   16854           0 :       resultobj = Py_None;
   16855           0 :       Py_INCREF(resultobj);
   16856             :     }
   16857             :   }
   16858           1 :   {
   16859             :     /* %typemap(freearg) char **dict */
   16860           1 :     CSLDestroy( arg1 );
   16861             :   }
   16862           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; } }
   16863             :   return resultobj;
   16864           0 : fail:
   16865           0 :   {
   16866             :     /* %typemap(freearg) char **dict */
   16867           0 :     CSLDestroy( arg1 );
   16868             :   }
   16869             :   return NULL;
   16870             : }
   16871             : 
   16872             : 
   16873         911 : SWIGINTERN PyObject *_wrap_ParseCommandLine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16874         911 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16875         911 :   char *arg1 = (char *) 0 ;
   16876         911 :   int bToFree1 = 0 ;
   16877         911 :   PyObject *swig_obj[1] ;
   16878         911 :   char **result = 0 ;
   16879             :   
   16880         911 :   if (!args) SWIG_fail;
   16881         911 :   swig_obj[0] = args;
   16882         911 :   {
   16883             :     /* %typemap(in) (const char *utf8_path) */
   16884         911 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   16885             :     {
   16886         911 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   16887             :     }
   16888             :     else
   16889             :     {
   16890           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   16891             :       
   16892             :     }
   16893         911 :     if (arg1 == NULL)
   16894             :     {
   16895           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16896           0 :       SWIG_fail;
   16897             :     }
   16898             :   }
   16899         911 :   {
   16900         911 :     if (!arg1) {
   16901         911 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16902             :     }
   16903             :   }
   16904         911 :   {
   16905         911 :     const int bLocalUseExceptions = GetUseExceptions();
   16906         911 :     if ( bLocalUseExceptions ) {
   16907         789 :       pushErrorHandler();
   16908             :     }
   16909         911 :     {
   16910         911 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16911         911 :       result = (char **)CSLParseCommandLine((char const *)arg1);
   16912         911 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16913             :     }
   16914         911 :     if ( bLocalUseExceptions ) {
   16915         789 :       popErrorHandler();
   16916             :     }
   16917             : #ifndef SED_HACKS
   16918             :     if ( bLocalUseExceptions ) {
   16919             :       CPLErr eclass = CPLGetLastErrorType();
   16920             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16921             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16922             :       }
   16923             :     }
   16924             : #endif
   16925             :   }
   16926         911 :   {
   16927             :     /* %typemap(out) char **CSL -> ( string ) */
   16928         911 :     bool bErr = false;
   16929         911 :     resultobj = CSLToList(result, &bErr);
   16930         911 :     CSLDestroy(result);
   16931         911 :     if( bErr ) {
   16932           0 :       SWIG_fail;
   16933             :     }
   16934             :   }
   16935         911 :   {
   16936             :     /* %typemap(freearg) (const char *utf8_path) */
   16937         911 :     GDALPythonFreeCStr(arg1, bToFree1);
   16938             :   }
   16939         911 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16940             :   return resultobj;
   16941           0 : fail:
   16942           0 :   {
   16943             :     /* %typemap(freearg) (const char *utf8_path) */
   16944         911 :     GDALPythonFreeCStr(arg1, bToFree1);
   16945             :   }
   16946             :   return NULL;
   16947             : }
   16948             : 
   16949             : 
   16950          50 : SWIGINTERN PyObject *_wrap_GetNumCPUs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16951          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16952          50 :   int result;
   16953             :   
   16954          50 :   if (!SWIG_Python_UnpackTuple(args, "GetNumCPUs", 0, 0, 0)) SWIG_fail;
   16955          50 :   {
   16956          50 :     const int bLocalUseExceptions = GetUseExceptions();
   16957          50 :     if ( bLocalUseExceptions ) {
   16958          42 :       pushErrorHandler();
   16959             :     }
   16960          50 :     {
   16961          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16962          50 :       result = (int)CPLGetNumCPUs();
   16963          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16964             :     }
   16965          50 :     if ( bLocalUseExceptions ) {
   16966          42 :       popErrorHandler();
   16967             :     }
   16968             : #ifndef SED_HACKS
   16969             :     if ( bLocalUseExceptions ) {
   16970             :       CPLErr eclass = CPLGetLastErrorType();
   16971             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16972             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16973             :       }
   16974             :     }
   16975             : #endif
   16976             :   }
   16977          50 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16978          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; } }
   16979             :   return resultobj;
   16980           0 : fail:
   16981           0 :   return NULL;
   16982             : }
   16983             : 
   16984             : 
   16985           2 : SWIGINTERN PyObject *_wrap_GetUsablePhysicalRAM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16986           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16987           2 :   GIntBig result;
   16988             :   
   16989           2 :   if (!SWIG_Python_UnpackTuple(args, "GetUsablePhysicalRAM", 0, 0, 0)) SWIG_fail;
   16990           2 :   {
   16991           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16992           2 :     if ( bLocalUseExceptions ) {
   16993           1 :       pushErrorHandler();
   16994             :     }
   16995           2 :     {
   16996           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16997           2 :       result = CPLGetUsablePhysicalRAM();
   16998           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16999             :     }
   17000           2 :     if ( bLocalUseExceptions ) {
   17001           1 :       popErrorHandler();
   17002             :     }
   17003             : #ifndef SED_HACKS
   17004             :     if ( bLocalUseExceptions ) {
   17005             :       CPLErr eclass = CPLGetLastErrorType();
   17006             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17007             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17008             :       }
   17009             :     }
   17010             : #endif
   17011             :   }
   17012           2 :   {
   17013           2 :     resultobj = PyLong_FromLongLong(result);
   17014             :   }
   17015           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; } }
   17016             :   return resultobj;
   17017           0 : fail:
   17018           0 :   return NULL;
   17019             : }
   17020             : 
   17021             : 
   17022           8 : SWIGINTERN PyObject *_wrap_MultipartUploadGetCapabilities(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17023           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17024           8 :   char *arg1 = (char *) 0 ;
   17025           8 :   int *arg2 = (int *) 0 ;
   17026           8 :   int *arg3 = (int *) 0 ;
   17027           8 :   int *arg4 = (int *) 0 ;
   17028           8 :   int *arg5 = (int *) 0 ;
   17029           8 :   size_t *arg6 = (size_t *) 0 ;
   17030           8 :   size_t *arg7 = (size_t *) 0 ;
   17031           8 :   int *arg8 = (int *) 0 ;
   17032           8 :   int res1 ;
   17033           8 :   char *buf1 = 0 ;
   17034           8 :   int alloc1 = 0 ;
   17035           8 :   int nRetCode2 = 0 ;
   17036           8 :   int bNonSequentialUploadSupported2 = 0 ;
   17037           8 :   int bParallelUploadSupported2 = 0 ;
   17038           8 :   int bSupportsAbort2 = 0 ;
   17039           8 :   size_t nMinPartSize2 = 0 ;
   17040           8 :   size_t nMaxPartSize2 = 0 ;
   17041           8 :   int nMaxPartCount2 = 0 ;
   17042           8 :   PyObject *swig_obj[1] ;
   17043             :   
   17044           8 :   {
   17045           8 :     arg2 = &nRetCode2;
   17046           8 :     arg3 = &bNonSequentialUploadSupported2;
   17047           8 :     arg4 = &bParallelUploadSupported2;
   17048           8 :     arg5 = &bSupportsAbort2;
   17049           8 :     arg6 = &nMinPartSize2;
   17050           8 :     arg7 = &nMaxPartSize2;
   17051           8 :     arg8 = &nMaxPartCount2;
   17052             :   }
   17053           8 :   if (!args) SWIG_fail;
   17054           8 :   swig_obj[0] = args;
   17055           8 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17056           8 :   if (!SWIG_IsOK(res1)) {
   17057           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadGetCapabilities" "', argument " "1"" of type '" "char const *""'");
   17058             :   }
   17059           8 :   arg1 = reinterpret_cast< char * >(buf1);
   17060           8 :   {
   17061           8 :     if (!arg1) {
   17062           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17063             :     }
   17064             :   }
   17065           7 :   {
   17066           7 :     const int bLocalUseExceptions = GetUseExceptions();
   17067           7 :     if ( bLocalUseExceptions ) {
   17068           2 :       pushErrorHandler();
   17069             :     }
   17070           7 :     {
   17071           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17072           7 :       MultipartUploadGetCapabilities((char const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   17073           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17074             :     }
   17075           7 :     if ( bLocalUseExceptions ) {
   17076           2 :       popErrorHandler();
   17077             :     }
   17078             : #ifndef SED_HACKS
   17079             :     if ( bLocalUseExceptions ) {
   17080             :       CPLErr eclass = CPLGetLastErrorType();
   17081             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17082             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17083             :       }
   17084             :     }
   17085             : #endif
   17086             :   }
   17087           7 :   resultobj = SWIG_Py_Void();
   17088           7 :   {
   17089           7 :     if( *arg2 == 0 )
   17090             :     {
   17091           2 :       Py_DECREF(resultobj);
   17092           2 :       resultobj = Py_None;
   17093           2 :       Py_INCREF(Py_None);
   17094             :     }
   17095             :     else
   17096             :     {
   17097           5 :       PyObject *r = PyTuple_New( 6 );
   17098           5 :       PyTuple_SetItem( r, 0, PyBool_FromLong(*arg3) );
   17099           5 :       PyTuple_SetItem( r, 1, PyBool_FromLong(*arg4) );
   17100           5 :       PyTuple_SetItem( r, 2, PyBool_FromLong(*arg5) );
   17101           5 :       PyTuple_SetItem( r, 3, PyLong_FromUnsignedLongLong(*arg6) );
   17102           5 :       PyTuple_SetItem( r, 4, PyLong_FromUnsignedLongLong(*arg7) );
   17103           5 :       PyTuple_SetItem( r, 5, PyLong_FromUnsignedLongLong(*arg8) );
   17104             : #if SWIG_VERSION >= 0x040300
   17105             :       resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   17106             : #else
   17107           5 :       resultobj = SWIG_Python_AppendOutput(resultobj,r);
   17108             : #endif
   17109             :     }
   17110             :   }
   17111           7 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17112          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; } }
   17113             :   return resultobj;
   17114           1 : fail:
   17115           1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17116             :   return NULL;
   17117             : }
   17118             : 
   17119             : 
   17120           5 : SWIGINTERN PyObject *_wrap_MultipartUploadStart(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17121           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17122           5 :   char *arg1 = (char *) 0 ;
   17123           5 :   char **arg2 = (char **) NULL ;
   17124           5 :   int res1 ;
   17125           5 :   char *buf1 = 0 ;
   17126           5 :   int alloc1 = 0 ;
   17127           5 :   PyObject *swig_obj[2] ;
   17128           5 :   retStringAndCPLFree *result = 0 ;
   17129             :   
   17130           5 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadStart", 1, 2, swig_obj)) SWIG_fail;
   17131           5 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17132           5 :   if (!SWIG_IsOK(res1)) {
   17133           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadStart" "', argument " "1"" of type '" "char const *""'");
   17134             :   }
   17135           5 :   arg1 = reinterpret_cast< char * >(buf1);
   17136           5 :   if (swig_obj[1]) {
   17137           0 :     {
   17138             :       /* %typemap(in) char **dict */
   17139           0 :       arg2 = NULL;
   17140           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   17141           0 :         int bErr = FALSE;
   17142           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   17143           0 :         if ( bErr )
   17144             :         {
   17145           0 :           SWIG_fail;
   17146             :         }
   17147             :       }
   17148           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   17149           0 :         int bErr = FALSE;
   17150           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   17151           0 :         if ( bErr )
   17152             :         {
   17153           0 :           SWIG_fail;
   17154             :         }
   17155             :       }
   17156             :       else {
   17157           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17158           0 :         SWIG_fail;
   17159             :       }
   17160             :     }
   17161             :   }
   17162           5 :   {
   17163           5 :     if (!arg1) {
   17164           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17165             :     }
   17166             :   }
   17167           4 :   {
   17168           4 :     const int bLocalUseExceptions = GetUseExceptions();
   17169           4 :     if ( bLocalUseExceptions ) {
   17170           1 :       pushErrorHandler();
   17171             :     }
   17172           4 :     {
   17173           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17174           4 :       result = (retStringAndCPLFree *)MultipartUploadStart((char const *)arg1,arg2);
   17175           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17176             :     }
   17177           4 :     if ( bLocalUseExceptions ) {
   17178           1 :       popErrorHandler();
   17179             :     }
   17180             : #ifndef SED_HACKS
   17181             :     if ( bLocalUseExceptions ) {
   17182             :       CPLErr eclass = CPLGetLastErrorType();
   17183             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17184             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17185             :       }
   17186             :     }
   17187             : #endif
   17188             :   }
   17189           4 :   {
   17190             :     /* %typemap(out) (retStringAndCPLFree*) */
   17191           4 :     Py_XDECREF(resultobj);
   17192           4 :     if(result)
   17193             :     {
   17194           1 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   17195           1 :       CPLFree(result);
   17196             :     }
   17197             :     else
   17198             :     {
   17199           3 :       resultobj = Py_None;
   17200           3 :       Py_INCREF(resultobj);
   17201             :     }
   17202             :   }
   17203           4 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17204           4 :   {
   17205             :     /* %typemap(freearg) char **dict */
   17206           4 :     CSLDestroy( arg2 );
   17207             :   }
   17208           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; } }
   17209             :   return resultobj;
   17210           1 : fail:
   17211           1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17212           1 :   {
   17213             :     /* %typemap(freearg) char **dict */
   17214           1 :     CSLDestroy( arg2 );
   17215             :   }
   17216             :   return NULL;
   17217             : }
   17218             : 
   17219             : 
   17220           7 : SWIGINTERN PyObject *_wrap_MultipartUploadAddPart(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17221           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17222           7 :   char *arg1 = (char *) 0 ;
   17223           7 :   char *arg2 = (char *) 0 ;
   17224           7 :   int arg3 ;
   17225           7 :   GUIntBig arg4 ;
   17226           7 :   size_t arg5 ;
   17227           7 :   char *arg6 = (char *) 0 ;
   17228           7 :   char **arg7 = (char **) NULL ;
   17229           7 :   int res1 ;
   17230           7 :   char *buf1 = 0 ;
   17231           7 :   int alloc1 = 0 ;
   17232           7 :   int res2 ;
   17233           7 :   char *buf2 = 0 ;
   17234           7 :   int alloc2 = 0 ;
   17235           7 :   int val3 ;
   17236           7 :   int ecode3 = 0 ;
   17237           7 :   int alloc5 = 0 ;
   17238           7 :   bool viewIsValid5 = false ;
   17239           7 :   Py_buffer view5 ;
   17240           7 :   PyObject *swig_obj[6] ;
   17241           7 :   retStringAndCPLFree *result = 0 ;
   17242             :   
   17243           7 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadAddPart", 5, 6, swig_obj)) SWIG_fail;
   17244           7 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17245           7 :   if (!SWIG_IsOK(res1)) {
   17246           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadAddPart" "', argument " "1"" of type '" "char const *""'");
   17247             :   }
   17248           7 :   arg1 = reinterpret_cast< char * >(buf1);
   17249           7 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17250           7 :   if (!SWIG_IsOK(res2)) {
   17251           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadAddPart" "', argument " "2"" of type '" "char const *""'");
   17252             :   }
   17253           7 :   arg2 = reinterpret_cast< char * >(buf2);
   17254           7 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   17255           7 :   if (!SWIG_IsOK(ecode3)) {
   17256           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultipartUploadAddPart" "', argument " "3"" of type '" "int""'");
   17257             :   } 
   17258           7 :   arg3 = static_cast< int >(val3);
   17259           7 :   {
   17260           7 :     arg4 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[3]);
   17261             :   }
   17262           7 :   {
   17263             :     /* %typemap(in,numinputs=1) (size_t nLen, char *pBuf ) */
   17264           7 :     char* ptr = NULL;
   17265           7 :     if( !GetBufferAsCharPtrSizetSize(swig_obj[4], &arg5, &ptr, &alloc5, &viewIsValid5, &view5) ) {
   17266           0 :       SWIG_fail;
   17267             :     }
   17268           7 :     arg6 = (char *)ptr;
   17269             :   }
   17270           7 :   if (swig_obj[5]) {
   17271           0 :     {
   17272             :       /* %typemap(in) char **dict */
   17273           0 :       arg7 = NULL;
   17274           0 :       if ( PySequence_Check( swig_obj[5] ) ) {
   17275           0 :         int bErr = FALSE;
   17276           0 :         arg7 = CSLFromPySequence(swig_obj[5], &bErr);
   17277           0 :         if ( bErr )
   17278             :         {
   17279           0 :           SWIG_fail;
   17280             :         }
   17281             :       }
   17282           0 :       else if ( PyMapping_Check( swig_obj[5] ) ) {
   17283           0 :         int bErr = FALSE;
   17284           0 :         arg7 = CSLFromPyMapping(swig_obj[5], &bErr);
   17285           0 :         if ( bErr )
   17286             :         {
   17287           0 :           SWIG_fail;
   17288             :         }
   17289             :       }
   17290             :       else {
   17291           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17292           0 :         SWIG_fail;
   17293             :       }
   17294             :     }
   17295             :   }
   17296           7 :   {
   17297           7 :     if (!arg1) {
   17298           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17299             :     }
   17300             :   }
   17301           6 :   {
   17302           6 :     if (!arg2) {
   17303           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17304             :     }
   17305             :   }
   17306           5 :   {
   17307           5 :     const int bLocalUseExceptions = GetUseExceptions();
   17308           5 :     if ( bLocalUseExceptions ) {
   17309           1 :       pushErrorHandler();
   17310             :     }
   17311           5 :     {
   17312           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17313           5 :       result = (retStringAndCPLFree *)MultipartUploadAddPart((char const *)arg1,(char const *)arg2,arg3,arg4,arg5,(char const *)arg6,arg7);
   17314           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17315             :     }
   17316           5 :     if ( bLocalUseExceptions ) {
   17317           1 :       popErrorHandler();
   17318             :     }
   17319             : #ifndef SED_HACKS
   17320             :     if ( bLocalUseExceptions ) {
   17321             :       CPLErr eclass = CPLGetLastErrorType();
   17322             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17323             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17324             :       }
   17325             :     }
   17326             : #endif
   17327             :   }
   17328           5 :   {
   17329             :     /* %typemap(out) (retStringAndCPLFree*) */
   17330           5 :     Py_XDECREF(resultobj);
   17331           5 :     if(result)
   17332             :     {
   17333           2 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   17334           2 :       CPLFree(result);
   17335             :     }
   17336             :     else
   17337             :     {
   17338           3 :       resultobj = Py_None;
   17339           3 :       Py_INCREF(resultobj);
   17340             :     }
   17341             :   }
   17342           5 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17343           5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17344           5 :   {
   17345             :     /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
   17346           5 :     if( viewIsValid5 ) {
   17347           5 :       PyBuffer_Release(&view5);
   17348             :     }
   17349           0 :     else if (ReturnSame(alloc5) == SWIG_NEWOBJ ) {
   17350           0 :       delete[] arg6;
   17351             :     }
   17352             :   }
   17353           5 :   {
   17354             :     /* %typemap(freearg) char **dict */
   17355           5 :     CSLDestroy( arg7 );
   17356             :   }
   17357           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; } }
   17358             :   return resultobj;
   17359           2 : fail:
   17360           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17361           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17362           2 :   {
   17363             :     /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
   17364           2 :     if( viewIsValid5 ) {
   17365           2 :       PyBuffer_Release(&view5);
   17366             :     }
   17367           0 :     else if (ReturnSame(alloc5) == SWIG_NEWOBJ ) {
   17368           0 :       delete[] arg6;
   17369             :     }
   17370             :   }
   17371           2 :   {
   17372             :     /* %typemap(freearg) char **dict */
   17373           2 :     CSLDestroy( arg7 );
   17374             :   }
   17375             :   return NULL;
   17376             : }
   17377             : 
   17378             : 
   17379           7 : SWIGINTERN PyObject *_wrap_MultipartUploadEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17380           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17381           7 :   char *arg1 = (char *) 0 ;
   17382           7 :   char *arg2 = (char *) 0 ;
   17383           7 :   char **arg3 = (char **) 0 ;
   17384           7 :   GUIntBig arg4 ;
   17385           7 :   char **arg5 = (char **) NULL ;
   17386           7 :   int res1 ;
   17387           7 :   char *buf1 = 0 ;
   17388           7 :   int alloc1 = 0 ;
   17389           7 :   int res2 ;
   17390           7 :   char *buf2 = 0 ;
   17391           7 :   int alloc2 = 0 ;
   17392           7 :   PyObject *swig_obj[5] ;
   17393           7 :   bool result;
   17394             :   
   17395           7 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadEnd", 4, 5, swig_obj)) SWIG_fail;
   17396           7 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17397           7 :   if (!SWIG_IsOK(res1)) {
   17398           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadEnd" "', argument " "1"" of type '" "char const *""'");
   17399             :   }
   17400           7 :   arg1 = reinterpret_cast< char * >(buf1);
   17401           7 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17402           7 :   if (!SWIG_IsOK(res2)) {
   17403           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadEnd" "', argument " "2"" of type '" "char const *""'");
   17404             :   }
   17405           7 :   arg2 = reinterpret_cast< char * >(buf2);
   17406           7 :   {
   17407             :     /* %typemap(in) char **dict */
   17408           7 :     arg3 = NULL;
   17409           7 :     if ( PySequence_Check( swig_obj[2] ) ) {
   17410           7 :       int bErr = FALSE;
   17411           7 :       arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   17412           7 :       if ( bErr )
   17413             :       {
   17414           0 :         SWIG_fail;
   17415             :       }
   17416             :     }
   17417           0 :     else if ( PyMapping_Check( swig_obj[2] ) ) {
   17418           0 :       int bErr = FALSE;
   17419           0 :       arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   17420           0 :       if ( bErr )
   17421             :       {
   17422           0 :         SWIG_fail;
   17423             :       }
   17424             :     }
   17425             :     else {
   17426           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17427           0 :       SWIG_fail;
   17428             :     }
   17429             :   }
   17430           7 :   {
   17431           7 :     arg4 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[3]);
   17432             :   }
   17433           7 :   if (swig_obj[4]) {
   17434           0 :     {
   17435             :       /* %typemap(in) char **dict */
   17436           0 :       arg5 = NULL;
   17437           0 :       if ( PySequence_Check( swig_obj[4] ) ) {
   17438           0 :         int bErr = FALSE;
   17439           0 :         arg5 = CSLFromPySequence(swig_obj[4], &bErr);
   17440           0 :         if ( bErr )
   17441             :         {
   17442           0 :           SWIG_fail;
   17443             :         }
   17444             :       }
   17445           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   17446           0 :         int bErr = FALSE;
   17447           0 :         arg5 = CSLFromPyMapping(swig_obj[4], &bErr);
   17448           0 :         if ( bErr )
   17449             :         {
   17450           0 :           SWIG_fail;
   17451             :         }
   17452             :       }
   17453             :       else {
   17454           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17455           0 :         SWIG_fail;
   17456             :       }
   17457             :     }
   17458             :   }
   17459           7 :   {
   17460           7 :     if (!arg1) {
   17461           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17462             :     }
   17463             :   }
   17464           6 :   {
   17465           6 :     if (!arg2) {
   17466           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17467             :     }
   17468             :   }
   17469           5 :   {
   17470           5 :     const int bLocalUseExceptions = GetUseExceptions();
   17471           5 :     if ( bLocalUseExceptions ) {
   17472           1 :       pushErrorHandler();
   17473             :     }
   17474           5 :     {
   17475           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17476           5 :       result = (bool)MultipartUploadEnd((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
   17477           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17478             :     }
   17479           5 :     if ( bLocalUseExceptions ) {
   17480           1 :       popErrorHandler();
   17481             :     }
   17482             : #ifndef SED_HACKS
   17483             :     if ( bLocalUseExceptions ) {
   17484             :       CPLErr eclass = CPLGetLastErrorType();
   17485             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17486             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17487             :       }
   17488             :     }
   17489             : #endif
   17490             :   }
   17491           5 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   17492           5 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17493           5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17494           5 :   {
   17495             :     /* %typemap(freearg) char **dict */
   17496           5 :     CSLDestroy( arg3 );
   17497             :   }
   17498           5 :   {
   17499             :     /* %typemap(freearg) char **dict */
   17500           5 :     CSLDestroy( arg5 );
   17501             :   }
   17502           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; } }
   17503             :   return resultobj;
   17504           2 : fail:
   17505           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17506           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17507           2 :   {
   17508             :     /* %typemap(freearg) char **dict */
   17509           2 :     CSLDestroy( arg3 );
   17510             :   }
   17511           2 :   {
   17512             :     /* %typemap(freearg) char **dict */
   17513           2 :     CSLDestroy( arg5 );
   17514             :   }
   17515             :   return NULL;
   17516             : }
   17517             : 
   17518             : 
   17519           8 : SWIGINTERN PyObject *_wrap_MultipartUploadAbort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17520           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17521           8 :   char *arg1 = (char *) 0 ;
   17522           8 :   char *arg2 = (char *) 0 ;
   17523           8 :   char **arg3 = (char **) NULL ;
   17524           8 :   int res1 ;
   17525           8 :   char *buf1 = 0 ;
   17526           8 :   int alloc1 = 0 ;
   17527           8 :   int res2 ;
   17528           8 :   char *buf2 = 0 ;
   17529           8 :   int alloc2 = 0 ;
   17530           8 :   PyObject *swig_obj[3] ;
   17531           8 :   bool result;
   17532             :   
   17533           8 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadAbort", 2, 3, swig_obj)) SWIG_fail;
   17534           8 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17535           8 :   if (!SWIG_IsOK(res1)) {
   17536           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadAbort" "', argument " "1"" of type '" "char const *""'");
   17537             :   }
   17538           8 :   arg1 = reinterpret_cast< char * >(buf1);
   17539           8 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17540           8 :   if (!SWIG_IsOK(res2)) {
   17541           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadAbort" "', argument " "2"" of type '" "char const *""'");
   17542             :   }
   17543           8 :   arg2 = reinterpret_cast< char * >(buf2);
   17544           8 :   if (swig_obj[2]) {
   17545           0 :     {
   17546             :       /* %typemap(in) char **dict */
   17547           0 :       arg3 = NULL;
   17548           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   17549           0 :         int bErr = FALSE;
   17550           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   17551           0 :         if ( bErr )
   17552             :         {
   17553           0 :           SWIG_fail;
   17554             :         }
   17555             :       }
   17556           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   17557           0 :         int bErr = FALSE;
   17558           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   17559           0 :         if ( bErr )
   17560             :         {
   17561           0 :           SWIG_fail;
   17562             :         }
   17563             :       }
   17564             :       else {
   17565           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17566           0 :         SWIG_fail;
   17567             :       }
   17568             :     }
   17569             :   }
   17570           8 :   {
   17571           8 :     if (!arg1) {
   17572           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17573             :     }
   17574             :   }
   17575           7 :   {
   17576           7 :     if (!arg2) {
   17577           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17578             :     }
   17579             :   }
   17580           6 :   {
   17581           6 :     const int bLocalUseExceptions = GetUseExceptions();
   17582           6 :     if ( bLocalUseExceptions ) {
   17583           3 :       pushErrorHandler();
   17584             :     }
   17585           6 :     {
   17586           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17587           6 :       result = (bool)MultipartUploadAbort((char const *)arg1,(char const *)arg2,arg3);
   17588           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17589             :     }
   17590           6 :     if ( bLocalUseExceptions ) {
   17591           3 :       popErrorHandler();
   17592             :     }
   17593             : #ifndef SED_HACKS
   17594             :     if ( bLocalUseExceptions ) {
   17595             :       CPLErr eclass = CPLGetLastErrorType();
   17596             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17597             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17598             :       }
   17599             :     }
   17600             : #endif
   17601             :   }
   17602           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   17603           6 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17604           6 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17605           6 :   {
   17606             :     /* %typemap(freearg) char **dict */
   17607           6 :     CSLDestroy( arg3 );
   17608             :   }
   17609          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; } }
   17610             :   return resultobj;
   17611           2 : fail:
   17612           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17613           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17614           2 :   {
   17615             :     /* %typemap(freearg) char **dict */
   17616           2 :     CSLDestroy( arg3 );
   17617             :   }
   17618             :   return NULL;
   17619             : }
   17620             : 
   17621             : 
   17622        2486 : SWIGINTERN PyObject *_wrap_MajorObject_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17623        2486 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17624        2486 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17625        2486 :   void *argp1 = 0 ;
   17626        2486 :   int res1 = 0 ;
   17627        2486 :   PyObject *swig_obj[1] ;
   17628        2486 :   char *result = 0 ;
   17629             :   
   17630        2486 :   if (!args) SWIG_fail;
   17631        2486 :   swig_obj[0] = args;
   17632        2486 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17633        2486 :   if (!SWIG_IsOK(res1)) {
   17634           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17635             :   }
   17636        2486 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17637        2486 :   {
   17638        2486 :     const int bLocalUseExceptions = GetUseExceptions();
   17639        2486 :     if ( bLocalUseExceptions ) {
   17640        1250 :       pushErrorHandler();
   17641             :     }
   17642        2486 :     {
   17643        2486 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17644        2486 :       result = (char *)GDALMajorObjectShadow_GetDescription(arg1);
   17645        2486 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17646             :     }
   17647        2486 :     if ( bLocalUseExceptions ) {
   17648        1250 :       popErrorHandler();
   17649             :     }
   17650             : #ifndef SED_HACKS
   17651             :     if ( bLocalUseExceptions ) {
   17652             :       CPLErr eclass = CPLGetLastErrorType();
   17653             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17654             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17655             :       }
   17656             :     }
   17657             : #endif
   17658             :   }
   17659        2486 :   resultobj = SWIG_FromCharPtr((const char *)result);
   17660        2486 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17661             :   return resultobj;
   17662             : fail:
   17663             :   return NULL;
   17664             : }
   17665             : 
   17666             : 
   17667          44 : SWIGINTERN PyObject *_wrap_MajorObject_SetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17668          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17669          44 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17670          44 :   char *arg2 = (char *) 0 ;
   17671          44 :   void *argp1 = 0 ;
   17672          44 :   int res1 = 0 ;
   17673          44 :   int res2 ;
   17674          44 :   char *buf2 = 0 ;
   17675          44 :   int alloc2 = 0 ;
   17676          44 :   PyObject *swig_obj[2] ;
   17677             :   
   17678          44 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetDescription", 2, 2, swig_obj)) SWIG_fail;
   17679          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17680          44 :   if (!SWIG_IsOK(res1)) {
   17681           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17682             :   }
   17683          44 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17684          44 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17685          44 :   if (!SWIG_IsOK(res2)) {
   17686           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetDescription" "', argument " "2"" of type '" "char const *""'");
   17687             :   }
   17688          44 :   arg2 = reinterpret_cast< char * >(buf2);
   17689          44 :   {
   17690          44 :     if (!arg2) {
   17691           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17692             :     }
   17693             :   }
   17694          44 :   {
   17695          44 :     const int bLocalUseExceptions = GetUseExceptions();
   17696          44 :     if ( bLocalUseExceptions ) {
   17697          39 :       pushErrorHandler();
   17698             :     }
   17699          44 :     {
   17700          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17701          44 :       GDALMajorObjectShadow_SetDescription(arg1,(char const *)arg2);
   17702          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17703             :     }
   17704          44 :     if ( bLocalUseExceptions ) {
   17705          39 :       popErrorHandler();
   17706             :     }
   17707             : #ifndef SED_HACKS
   17708             :     if ( bLocalUseExceptions ) {
   17709             :       CPLErr eclass = CPLGetLastErrorType();
   17710             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17711             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17712             :       }
   17713             :     }
   17714             : #endif
   17715             :   }
   17716          44 :   resultobj = SWIG_Py_Void();
   17717          44 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17718          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; } }
   17719             :   return resultobj;
   17720           0 : fail:
   17721           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17722             :   return NULL;
   17723             : }
   17724             : 
   17725             : 
   17726          75 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataDomainList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17727          75 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17728          75 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17729          75 :   void *argp1 = 0 ;
   17730          75 :   int res1 = 0 ;
   17731          75 :   PyObject *swig_obj[1] ;
   17732          75 :   char **result = 0 ;
   17733             :   
   17734          75 :   if (!args) SWIG_fail;
   17735          75 :   swig_obj[0] = args;
   17736          75 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17737          75 :   if (!SWIG_IsOK(res1)) {
   17738           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataDomainList" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17739             :   }
   17740          75 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17741          75 :   {
   17742          75 :     const int bLocalUseExceptions = GetUseExceptions();
   17743          75 :     if ( bLocalUseExceptions ) {
   17744          39 :       pushErrorHandler();
   17745             :     }
   17746          75 :     {
   17747          75 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17748          75 :       result = (char **)GDALMajorObjectShadow_GetMetadataDomainList(arg1);
   17749          75 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17750             :     }
   17751          75 :     if ( bLocalUseExceptions ) {
   17752          39 :       popErrorHandler();
   17753             :     }
   17754             : #ifndef SED_HACKS
   17755             :     if ( bLocalUseExceptions ) {
   17756             :       CPLErr eclass = CPLGetLastErrorType();
   17757             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17758             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17759             :       }
   17760             :     }
   17761             : #endif
   17762             :   }
   17763          75 :   {
   17764             :     /* %typemap(out) char **CSL -> ( string ) */
   17765          75 :     bool bErr = false;
   17766          75 :     resultobj = CSLToList(result, &bErr);
   17767          75 :     CSLDestroy(result);
   17768          75 :     if( bErr ) {
   17769           0 :       SWIG_fail;
   17770             :     }
   17771             :   }
   17772          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; } }
   17773             :   return resultobj;
   17774             : fail:
   17775             :   return NULL;
   17776             : }
   17777             : 
   17778             : 
   17779        7007 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_Dict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17780        7007 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17781        7007 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17782        7007 :   char *arg2 = (char *) "" ;
   17783        7007 :   void *argp1 = 0 ;
   17784        7007 :   int res1 = 0 ;
   17785        7007 :   int res2 ;
   17786        7007 :   char *buf2 = 0 ;
   17787        7007 :   int alloc2 = 0 ;
   17788        7007 :   PyObject *swig_obj[2] ;
   17789        7007 :   char **result = 0 ;
   17790             :   
   17791        7007 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_Dict", 1, 2, swig_obj)) SWIG_fail;
   17792        7007 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17793        7007 :   if (!SWIG_IsOK(res1)) {
   17794           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17795             :   }
   17796        7007 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17797        7007 :   if (swig_obj[1]) {
   17798        6913 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17799        6913 :     if (!SWIG_IsOK(res2)) {
   17800           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "2"" of type '" "char const *""'");
   17801             :     }
   17802        6913 :     arg2 = reinterpret_cast< char * >(buf2);
   17803             :   }
   17804        7007 :   {
   17805        7007 :     const int bLocalUseExceptions = GetUseExceptions();
   17806        7007 :     if ( bLocalUseExceptions ) {
   17807        1709 :       pushErrorHandler();
   17808             :     }
   17809        7007 :     {
   17810        7007 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17811        7007 :       result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
   17812        7007 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17813             :     }
   17814        7007 :     if ( bLocalUseExceptions ) {
   17815        1709 :       popErrorHandler();
   17816             :     }
   17817             : #ifndef SED_HACKS
   17818             :     if ( bLocalUseExceptions ) {
   17819             :       CPLErr eclass = CPLGetLastErrorType();
   17820             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17821             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17822             :       }
   17823             :     }
   17824             : #endif
   17825             :   }
   17826        7007 :   {
   17827             :     /* %typemap(out) char **dict */
   17828        7007 :     resultobj = GetCSLStringAsPyDict(result, false);
   17829             :   }
   17830        7007 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17831        7007 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17832             :   return resultobj;
   17833           0 : fail:
   17834           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17835             :   return NULL;
   17836             : }
   17837             : 
   17838             : 
   17839         403 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17840         403 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17841         403 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17842         403 :   char *arg2 = (char *) "" ;
   17843         403 :   void *argp1 = 0 ;
   17844         403 :   int res1 = 0 ;
   17845         403 :   int res2 ;
   17846         403 :   char *buf2 = 0 ;
   17847         403 :   int alloc2 = 0 ;
   17848         403 :   PyObject *swig_obj[2] ;
   17849         403 :   char **result = 0 ;
   17850             :   
   17851         403 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_List", 1, 2, swig_obj)) SWIG_fail;
   17852         403 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17853         403 :   if (!SWIG_IsOK(res1)) {
   17854           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_List" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17855             :   }
   17856         403 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17857         403 :   if (swig_obj[1]) {
   17858         360 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17859         360 :     if (!SWIG_IsOK(res2)) {
   17860           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_List" "', argument " "2"" of type '" "char const *""'");
   17861             :     }
   17862         360 :     arg2 = reinterpret_cast< char * >(buf2);
   17863             :   }
   17864         403 :   {
   17865         403 :     const int bLocalUseExceptions = GetUseExceptions();
   17866         403 :     if ( bLocalUseExceptions ) {
   17867         115 :       pushErrorHandler();
   17868             :     }
   17869         403 :     {
   17870         403 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17871         403 :       result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
   17872         403 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17873             :     }
   17874         403 :     if ( bLocalUseExceptions ) {
   17875         115 :       popErrorHandler();
   17876             :     }
   17877             : #ifndef SED_HACKS
   17878             :     if ( bLocalUseExceptions ) {
   17879             :       CPLErr eclass = CPLGetLastErrorType();
   17880             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17881             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17882             :       }
   17883             :     }
   17884             : #endif
   17885             :   }
   17886         403 :   {
   17887             :     /* %typemap(out) char **options -> ( string ) */
   17888         403 :     bool bErr = false;
   17889         403 :     resultobj = CSLToList(result, &bErr);
   17890         403 :     if( bErr ) {
   17891           0 :       SWIG_fail;
   17892             :     }
   17893             :   }
   17894         403 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17895         403 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17896             :   return resultobj;
   17897           0 : fail:
   17898           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17899             :   return NULL;
   17900             : }
   17901             : 
   17902             : 
   17903             : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   17904             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17905             :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17906             :   char **arg2 = (char **) 0 ;
   17907             :   char *arg3 = (char *) "" ;
   17908             :   void *argp1 = 0 ;
   17909             :   int res1 = 0 ;
   17910             :   int res3 ;
   17911             :   char *buf3 = 0 ;
   17912             :   int alloc3 = 0 ;
   17913             :   CPLErr result;
   17914             :   
   17915             :   if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
   17916             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17917             :   if (!SWIG_IsOK(res1)) {
   17918             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17919             :   }
   17920             :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17921             :   {
   17922             :     /* %typemap(in) char **dict */
   17923             :     arg2 = NULL;
   17924             :     if ( PySequence_Check( swig_obj[1] ) ) {
   17925             :       int bErr = FALSE;
   17926             :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   17927             :       if ( bErr )
   17928             :       {
   17929             :         SWIG_fail;
   17930             :       }
   17931             :     }
   17932             :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   17933             :       int bErr = FALSE;
   17934             :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   17935             :       if ( bErr )
   17936             :       {
   17937             :         SWIG_fail;
   17938             :       }
   17939             :     }
   17940             :     else {
   17941             :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17942             :       SWIG_fail;
   17943             :     }
   17944             :   }
   17945             :   if (swig_obj[2]) {
   17946             :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   17947             :     if (!SWIG_IsOK(res3)) {
   17948             :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
   17949             :     }
   17950             :     arg3 = reinterpret_cast< char * >(buf3);
   17951             :   }
   17952             :   {
   17953             :     const int bLocalUseExceptions = GetUseExceptions();
   17954             :     if ( bLocalUseExceptions ) {
   17955             :       pushErrorHandler();
   17956             :     }
   17957             :     {
   17958             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17959             :       result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3);
   17960             :       SWIG_PYTHON_THREAD_END_ALLOW;
   17961             :     }
   17962             :     if ( bLocalUseExceptions ) {
   17963             :       popErrorHandler();
   17964             :     }
   17965             : #ifndef SED_HACKS
   17966             :     if ( bLocalUseExceptions ) {
   17967             :       CPLErr eclass = CPLGetLastErrorType();
   17968             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17969             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17970             :       }
   17971             :     }
   17972             : #endif
   17973             :   }
   17974             :   resultobj = SWIG_From_int(static_cast< int >(result));
   17975             :   {
   17976             :     /* %typemap(freearg) char **dict */
   17977             :     CSLDestroy( arg2 );
   17978             :   }
   17979             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17980             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17981             :   return resultobj;
   17982             : fail:
   17983             :   {
   17984             :     /* %typemap(freearg) char **dict */
   17985             :     CSLDestroy( arg2 );
   17986             :   }
   17987             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17988             :   return NULL;
   17989             : }
   17990             : 
   17991             : 
   17992             : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   17993             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17994             :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17995             :   char *arg2 = (char *) 0 ;
   17996             :   char *arg3 = (char *) "" ;
   17997             :   void *argp1 = 0 ;
   17998             :   int res1 = 0 ;
   17999             :   int res2 ;
   18000             :   char *buf2 = 0 ;
   18001             :   int alloc2 = 0 ;
   18002             :   int res3 ;
   18003             :   char *buf3 = 0 ;
   18004             :   int alloc3 = 0 ;
   18005             :   CPLErr result;
   18006             :   
   18007             :   if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
   18008             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   18009             :   if (!SWIG_IsOK(res1)) {
   18010             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   18011             :   }
   18012             :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   18013             :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   18014             :   if (!SWIG_IsOK(res2)) {
   18015             :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadata" "', argument " "2"" of type '" "char *""'");
   18016             :   }
   18017             :   arg2 = reinterpret_cast< char * >(buf2);
   18018             :   if (swig_obj[2]) {
   18019             :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   18020             :     if (!SWIG_IsOK(res3)) {
   18021             :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
   18022             :     }
   18023             :     arg3 = reinterpret_cast< char * >(buf3);
   18024             :   }
   18025             :   {
   18026             :     const int bLocalUseExceptions = GetUseExceptions();
   18027             :     if ( bLocalUseExceptions ) {
   18028             :       pushErrorHandler();
   18029             :     }
   18030             :     {
   18031             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18032             :       result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_1(arg1,arg2,(char const *)arg3);
   18033             :       SWIG_PYTHON_THREAD_END_ALLOW;
   18034             :     }
   18035             :     if ( bLocalUseExceptions ) {
   18036             :       popErrorHandler();
   18037             :     }
   18038             : #ifndef SED_HACKS
   18039             :     if ( bLocalUseExceptions ) {
   18040             :       CPLErr eclass = CPLGetLastErrorType();
   18041             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18042             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18043             :       }
   18044             :     }
   18045             : #endif
   18046             :   }
   18047             :   resultobj = SWIG_From_int(static_cast< int >(result));
   18048             :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18049             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18050             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18051             :   return resultobj;
   18052             : fail:
   18053             :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18054             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18055             :   return NULL;
   18056             : }
   18057             : 
   18058             : 
   18059         281 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata(PyObject *self, PyObject *args) {
   18060         281 :   Py_ssize_t argc;
   18061         281 :   PyObject *argv[4] = {
   18062             :     0
   18063             :   };
   18064             :   
   18065         281 :   if (!(argc = SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadata", 0, 3, argv))) SWIG_fail;
   18066         281 :   --argc;
   18067         281 :   if ((argc >= 2) && (argc <= 3)) {
   18068         281 :     int _v;
   18069         281 :     void *vptr = 0;
   18070         281 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
   18071         301 :     _v = SWIG_CheckState(res);
   18072         281 :     if (_v) {
   18073         281 :       {
   18074             :         /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
   18075             :         /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
   18076             :         /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
   18077             :         /* (see #4816) */
   18078         281 :         _v = ((PyMapping_Check(argv[1]) || PySequence_Check(argv[1]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0)) ) ? 1 : 0;
   18079             :       }
   18080         261 :       if (_v) {
   18081         261 :         if (argc <= 2) {
   18082         261 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
   18083             :         }
   18084         111 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
   18085         111 :         _v = SWIG_CheckState(res);
   18086         111 :         if (_v) {
   18087         111 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
   18088             :         }
   18089             :       }
   18090             :     }
   18091             :   }
   18092          20 :   if ((argc >= 2) && (argc <= 3)) {
   18093          20 :     int _v;
   18094          20 :     void *vptr = 0;
   18095          20 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
   18096          21 :     _v = SWIG_CheckState(res);
   18097          20 :     if (_v) {
   18098          20 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
   18099          20 :       _v = SWIG_CheckState(res);
   18100          19 :       if (_v) {
   18101          19 :         if (argc <= 2) {
   18102          19 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
   18103             :         }
   18104          15 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
   18105          15 :         _v = SWIG_CheckState(res);
   18106          15 :         if (_v) {
   18107          15 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
   18108             :         }
   18109             :       }
   18110             :     }
   18111             :   }
   18112             :   
   18113           0 : fail:
   18114           1 :   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'MajorObject_SetMetadata'.\n"
   18115             :     "  Possible C/C++ prototypes are:\n"
   18116             :     "    GDALMajorObjectShadow::SetMetadata(char **,char const *)\n"
   18117             :     "    GDALMajorObjectShadow::SetMetadata(char *,char const *)\n");
   18118             :   return 0;
   18119             : }
   18120             : 
   18121             : 
   18122       57019 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18123       57019 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18124       57019 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   18125       57019 :   char *arg2 = (char *) 0 ;
   18126       57019 :   char *arg3 = (char *) "" ;
   18127       57019 :   void *argp1 = 0 ;
   18128       57019 :   int res1 = 0 ;
   18129       57019 :   int res2 ;
   18130       57019 :   char *buf2 = 0 ;
   18131       57019 :   int alloc2 = 0 ;
   18132       57019 :   int res3 ;
   18133       57019 :   char *buf3 = 0 ;
   18134       57019 :   int alloc3 = 0 ;
   18135       57019 :   PyObject *swig_obj[3] ;
   18136       57019 :   char *result = 0 ;
   18137             :   
   18138       57019 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadataItem", 2, 3, swig_obj)) SWIG_fail;
   18139       57019 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   18140       57019 :   if (!SWIG_IsOK(res1)) {
   18141           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   18142             :   }
   18143       57019 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   18144       57019 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   18145       57019 :   if (!SWIG_IsOK(res2)) {
   18146           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
   18147             :   }
   18148       57019 :   arg2 = reinterpret_cast< char * >(buf2);
   18149       57019 :   if (swig_obj[2]) {
   18150        6965 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   18151        6965 :     if (!SWIG_IsOK(res3)) {
   18152           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_GetMetadataItem" "', argument " "3"" of type '" "char const *""'");
   18153             :     }
   18154        6965 :     arg3 = reinterpret_cast< char * >(buf3);
   18155             :   }
   18156       57019 :   {
   18157       57019 :     if (!arg2) {
   18158           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18159             :     }
   18160             :   }
   18161       57019 :   {
   18162       57019 :     const int bLocalUseExceptions = GetUseExceptions();
   18163       57019 :     if ( bLocalUseExceptions ) {
   18164       52602 :       pushErrorHandler();
   18165             :     }
   18166       57019 :     {
   18167       57019 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18168       57019 :       result = (char *)GDALMajorObjectShadow_GetMetadataItem(arg1,(char const *)arg2,(char const *)arg3);
   18169       57019 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18170             :     }
   18171       57019 :     if ( bLocalUseExceptions ) {
   18172       52602 :       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       57019 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18184       57019 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18185       57019 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18186       57021 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18187             :   return resultobj;
   18188           0 : fail:
   18189           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18190           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18191             :   return NULL;
   18192             : }
   18193             : 
   18194             : 
   18195         484 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18196         484 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18197         484 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   18198         484 :   char *arg2 = (char *) 0 ;
   18199         484 :   char *arg3 = (char *) 0 ;
   18200         484 :   char *arg4 = (char *) "" ;
   18201         484 :   void *argp1 = 0 ;
   18202         484 :   int res1 = 0 ;
   18203         484 :   int res2 ;
   18204         484 :   char *buf2 = 0 ;
   18205         484 :   int alloc2 = 0 ;
   18206         484 :   int res3 ;
   18207         484 :   char *buf3 = 0 ;
   18208         484 :   int alloc3 = 0 ;
   18209         484 :   int res4 ;
   18210         484 :   char *buf4 = 0 ;
   18211         484 :   int alloc4 = 0 ;
   18212         484 :   PyObject *swig_obj[4] ;
   18213         484 :   CPLErr result;
   18214             :   
   18215         484 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadataItem", 3, 4, swig_obj)) SWIG_fail;
   18216         484 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   18217         484 :   if (!SWIG_IsOK(res1)) {
   18218           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   18219             :   }
   18220         484 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   18221         484 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   18222         484 :   if (!SWIG_IsOK(res2)) {
   18223           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadataItem" "', argument " "2"" of type '" "char const *""'");
   18224             :   }
   18225         484 :   arg2 = reinterpret_cast< char * >(buf2);
   18226         484 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   18227         484 :   if (!SWIG_IsOK(res3)) {
   18228           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadataItem" "', argument " "3"" of type '" "char const *""'");
   18229             :   }
   18230         484 :   arg3 = reinterpret_cast< char * >(buf3);
   18231         484 :   if (swig_obj[3]) {
   18232          77 :     res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
   18233          77 :     if (!SWIG_IsOK(res4)) {
   18234           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MajorObject_SetMetadataItem" "', argument " "4"" of type '" "char const *""'");
   18235             :     }
   18236          77 :     arg4 = reinterpret_cast< char * >(buf4);
   18237             :   }
   18238         484 :   {
   18239         484 :     if (!arg2) {
   18240           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18241             :     }
   18242             :   }
   18243         484 :   {
   18244         484 :     const int bLocalUseExceptions = GetUseExceptions();
   18245         484 :     if ( bLocalUseExceptions ) {
   18246         127 :       pushErrorHandler();
   18247             :     }
   18248         484 :     {
   18249         484 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18250         484 :       result = (CPLErr)GDALMajorObjectShadow_SetMetadataItem(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
   18251         484 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18252             :     }
   18253         484 :     if ( bLocalUseExceptions ) {
   18254         127 :       popErrorHandler();
   18255             :     }
   18256             : #ifndef SED_HACKS
   18257             :     if ( bLocalUseExceptions ) {
   18258             :       CPLErr eclass = CPLGetLastErrorType();
   18259             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18260             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18261             :       }
   18262             :     }
   18263             : #endif
   18264             :   }
   18265         484 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18266         484 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18267         484 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18268         484 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   18269         484 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18270             :   return resultobj;
   18271           0 : fail:
   18272           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18273           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18274           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   18275             :   return NULL;
   18276             : }
   18277             : 
   18278             : 
   18279         277 : SWIGINTERN PyObject *MajorObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18280         277 :   PyObject *obj;
   18281         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   18282         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMajorObjectShadow, SWIG_NewClientData(obj));
   18283         277 :   return SWIG_Py_Void();
   18284             : }
   18285             : 
   18286       98602 : SWIGINTERN PyObject *_wrap_Driver_ShortName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18287       98602 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18288       98602 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18289       98602 :   void *argp1 = 0 ;
   18290       98602 :   int res1 = 0 ;
   18291       98602 :   PyObject *swig_obj[1] ;
   18292       98602 :   char *result = 0 ;
   18293             :   
   18294       98602 :   if (!args) SWIG_fail;
   18295       98602 :   swig_obj[0] = args;
   18296       98602 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18297       98602 :   if (!SWIG_IsOK(res1)) {
   18298           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_ShortName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18299             :   }
   18300       98602 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18301       98602 :   {
   18302       98602 :     const int bLocalUseExceptions = GetUseExceptions();
   18303       98602 :     if ( bLocalUseExceptions ) {
   18304       51476 :       pushErrorHandler();
   18305             :     }
   18306       98602 :     {
   18307       98602 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18308       98602 :       result = (char *)GDALDriverShadow_ShortName_get(arg1);
   18309       98602 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18310             :     }
   18311       98602 :     if ( bLocalUseExceptions ) {
   18312       51476 :       popErrorHandler();
   18313             :     }
   18314             : #ifndef SED_HACKS
   18315             :     if ( bLocalUseExceptions ) {
   18316             :       CPLErr eclass = CPLGetLastErrorType();
   18317             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18318             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18319             :       }
   18320             :     }
   18321             : #endif
   18322             :   }
   18323       98602 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18324       98602 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18325             :   return resultobj;
   18326             : fail:
   18327             :   return NULL;
   18328             : }
   18329             : 
   18330             : 
   18331          17 : SWIGINTERN PyObject *_wrap_Driver_LongName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18332          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18333          17 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18334          17 :   void *argp1 = 0 ;
   18335          17 :   int res1 = 0 ;
   18336          17 :   PyObject *swig_obj[1] ;
   18337          17 :   char *result = 0 ;
   18338             :   
   18339          17 :   if (!args) SWIG_fail;
   18340          17 :   swig_obj[0] = args;
   18341          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18342          17 :   if (!SWIG_IsOK(res1)) {
   18343           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_LongName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18344             :   }
   18345          17 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18346          17 :   {
   18347          17 :     const int bLocalUseExceptions = GetUseExceptions();
   18348          17 :     if ( bLocalUseExceptions ) {
   18349           0 :       pushErrorHandler();
   18350             :     }
   18351          17 :     {
   18352          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18353          17 :       result = (char *)GDALDriverShadow_LongName_get(arg1);
   18354          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18355             :     }
   18356          17 :     if ( bLocalUseExceptions ) {
   18357           0 :       popErrorHandler();
   18358             :     }
   18359             : #ifndef SED_HACKS
   18360             :     if ( bLocalUseExceptions ) {
   18361             :       CPLErr eclass = CPLGetLastErrorType();
   18362             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18363             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18364             :       }
   18365             :     }
   18366             : #endif
   18367             :   }
   18368          17 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18369          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; } }
   18370             :   return resultobj;
   18371             : fail:
   18372             :   return NULL;
   18373             : }
   18374             : 
   18375             : 
   18376           0 : SWIGINTERN PyObject *_wrap_Driver_HelpTopic_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18377           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18378           0 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18379           0 :   void *argp1 = 0 ;
   18380           0 :   int res1 = 0 ;
   18381           0 :   PyObject *swig_obj[1] ;
   18382           0 :   char *result = 0 ;
   18383             :   
   18384           0 :   if (!args) SWIG_fail;
   18385           0 :   swig_obj[0] = args;
   18386           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18387           0 :   if (!SWIG_IsOK(res1)) {
   18388           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_HelpTopic_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18389             :   }
   18390           0 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18391           0 :   {
   18392           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18393           0 :     if ( bLocalUseExceptions ) {
   18394           0 :       pushErrorHandler();
   18395             :     }
   18396           0 :     {
   18397           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18398           0 :       result = (char *)GDALDriverShadow_HelpTopic_get(arg1);
   18399           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18400             :     }
   18401           0 :     if ( bLocalUseExceptions ) {
   18402           0 :       popErrorHandler();
   18403             :     }
   18404             : #ifndef SED_HACKS
   18405             :     if ( bLocalUseExceptions ) {
   18406             :       CPLErr eclass = CPLGetLastErrorType();
   18407             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18408             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18409             :       }
   18410             :     }
   18411             : #endif
   18412             :   }
   18413           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18414           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; } }
   18415             :   return resultobj;
   18416             : fail:
   18417             :   return NULL;
   18418             : }
   18419             : 
   18420             : 
   18421       17318 : SWIGINTERN PyObject *_wrap_Driver_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18422       17318 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18423       17318 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18424       17318 :   char *arg2 = (char *) 0 ;
   18425       17318 :   int arg3 ;
   18426       17318 :   int arg4 ;
   18427       17318 :   int arg5 = (int) 1 ;
   18428       17318 :   GDALDataType arg6 = (GDALDataType) GDT_Byte ;
   18429       17318 :   char **arg7 = (char **) 0 ;
   18430       17318 :   void *argp1 = 0 ;
   18431       17318 :   int res1 = 0 ;
   18432       17318 :   int bToFree2 = 0 ;
   18433       17318 :   int val3 ;
   18434       17318 :   int ecode3 = 0 ;
   18435       17318 :   int val4 ;
   18436       17318 :   int ecode4 = 0 ;
   18437       17318 :   int val5 ;
   18438       17318 :   int ecode5 = 0 ;
   18439       17318 :   PyObject * obj0 = 0 ;
   18440       17318 :   PyObject * obj1 = 0 ;
   18441       17318 :   PyObject * obj2 = 0 ;
   18442       17318 :   PyObject * obj3 = 0 ;
   18443       17318 :   PyObject * obj4 = 0 ;
   18444       17318 :   PyObject * obj5 = 0 ;
   18445       17318 :   PyObject * obj6 = 0 ;
   18446       17318 :   char * kwnames[] = {
   18447             :     (char *)"self",  (char *)"utf8_path",  (char *)"xsize",  (char *)"ysize",  (char *)"bands",  (char *)"eType",  (char *)"options",  NULL 
   18448             :   };
   18449       17318 :   GDALDatasetShadow *result = 0 ;
   18450             :   
   18451       17318 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:Driver_Create", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   18452       17318 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18453       17318 :   if (!SWIG_IsOK(res1)) {
   18454           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Create" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18455             :   }
   18456       17318 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18457       17318 :   {
   18458             :     /* %typemap(in) (const char *utf8_path) */
   18459       17318 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18460             :     {
   18461       13704 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18462             :     }
   18463             :     else
   18464             :     {
   18465        3614 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18466             :       
   18467             :     }
   18468       17318 :     if (arg2 == NULL)
   18469             :     {
   18470           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18471           0 :       SWIG_fail;
   18472             :     }
   18473             :   }
   18474       17318 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   18475       17318 :   if (!SWIG_IsOK(ecode3)) {
   18476           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Driver_Create" "', argument " "3"" of type '" "int""'");
   18477             :   } 
   18478       17318 :   arg3 = static_cast< int >(val3);
   18479       17318 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   18480       17318 :   if (!SWIG_IsOK(ecode4)) {
   18481           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_Create" "', argument " "4"" of type '" "int""'");
   18482             :   } 
   18483       17318 :   arg4 = static_cast< int >(val4);
   18484       17318 :   if (obj4) {
   18485       15741 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   18486       15741 :     if (!SWIG_IsOK(ecode5)) {
   18487           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Driver_Create" "', argument " "5"" of type '" "int""'");
   18488             :     } 
   18489             :     arg5 = static_cast< int >(val5);
   18490             :   }
   18491       17318 :   if (obj5) {
   18492        9312 :     {
   18493        9312 :       if (PyInt_Check(obj5))
   18494             :       {
   18495        9308 :         arg6 = static_cast<GDALDataType>(PyInt_AsLong(obj5));
   18496             :       }
   18497             :       else
   18498             :       {
   18499           4 :         PyObject* gdal_array = PyImport_ImportModule("osgeo.gdal_array");
   18500           4 :         if (gdal_array)
   18501             :         {
   18502           4 :           PyObject* dict = PyModule_GetDict(gdal_array);
   18503           4 :           PyObject* fn = PyDict_GetItemString(dict, "NumericTypeCodeToGDALTypeCode");
   18504           4 :           PyObject* type_code = PyObject_CallFunctionObjArgs(fn, obj5, NULL);
   18505             :           
   18506           4 :           Py_DECREF(gdal_array);
   18507           4 :           if (type_code && PyInt_Check(type_code))
   18508             :           {
   18509           2 :             arg6 = static_cast<GDALDataType>(PyInt_AsLong(type_code));
   18510           2 :             Py_DECREF(type_code);
   18511             :           }
   18512             :           else
   18513             :           {
   18514           2 :             Py_XDECREF(type_code);
   18515           2 :             PyErr_SetString(PyExc_RuntimeError, "type must be a GDAL data type code or NumPy type");
   18516           2 :             SWIG_fail;
   18517             :           }
   18518             :         }
   18519             :         else
   18520             :         {
   18521           0 :           PyErr_SetString(PyExc_RuntimeError, "gdal_array module is not available; type must be a specified as a GDAL data type code");
   18522           0 :           SWIG_fail;
   18523             :         }
   18524             :       }
   18525             :     }
   18526             :   }
   18527       17316 :   if (obj6) {
   18528        4370 :     {
   18529             :       /* %typemap(in) char **dict */
   18530        4370 :       arg7 = NULL;
   18531        4370 :       if ( PySequence_Check( obj6 ) ) {
   18532        4346 :         int bErr = FALSE;
   18533        4346 :         arg7 = CSLFromPySequence(obj6, &bErr);
   18534        4346 :         if ( bErr )
   18535             :         {
   18536           0 :           SWIG_fail;
   18537             :         }
   18538             :       }
   18539          24 :       else if ( PyMapping_Check( obj6 ) ) {
   18540          24 :         int bErr = FALSE;
   18541          24 :         arg7 = CSLFromPyMapping(obj6, &bErr);
   18542          24 :         if ( bErr )
   18543             :         {
   18544           0 :           SWIG_fail;
   18545             :         }
   18546             :       }
   18547             :       else {
   18548           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18549           0 :         SWIG_fail;
   18550             :       }
   18551             :     }
   18552             :   }
   18553       17316 :   {
   18554       17316 :     if (!arg2) {
   18555       17316 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18556             :     }
   18557             :   }
   18558       17316 :   {
   18559       17316 :     const int bLocalUseExceptions = GetUseExceptions();
   18560       17316 :     if ( bLocalUseExceptions ) {
   18561        5527 :       pushErrorHandler();
   18562             :     }
   18563       17316 :     {
   18564       17316 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18565       17316 :       result = (GDALDatasetShadow *)GDALDriverShadow_Create(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   18566       17316 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18567             :     }
   18568       17316 :     if ( bLocalUseExceptions ) {
   18569        5527 :       popErrorHandler();
   18570             :     }
   18571             : #ifndef SED_HACKS
   18572             :     if ( bLocalUseExceptions ) {
   18573             :       CPLErr eclass = CPLGetLastErrorType();
   18574             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18575             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18576             :       }
   18577             :     }
   18578             : #endif
   18579             :   }
   18580       17316 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   18581       17316 :   {
   18582             :     /* %typemap(freearg) (const char *utf8_path) */
   18583       17316 :     GDALPythonFreeCStr(arg2, bToFree2);
   18584             :   }
   18585       17316 :   {
   18586             :     /* %typemap(freearg) char **dict */
   18587       17316 :     CSLDestroy( arg7 );
   18588             :   }
   18589       17364 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18590             :   return resultobj;
   18591           2 : fail:
   18592           2 :   {
   18593             :     /* %typemap(freearg) (const char *utf8_path) */
   18594           2 :     GDALPythonFreeCStr(arg2, bToFree2);
   18595             :   }
   18596           2 :   {
   18597             :     /* %typemap(freearg) char **dict */
   18598           2 :     CSLDestroy( arg7 );
   18599             :   }
   18600             :   return NULL;
   18601             : }
   18602             : 
   18603             : 
   18604         153 : SWIGINTERN PyObject *_wrap_Driver_CreateVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18605         153 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18606         153 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18607         153 :   char *arg2 = (char *) 0 ;
   18608         153 :   char **arg3 = (char **) 0 ;
   18609         153 :   void *argp1 = 0 ;
   18610         153 :   int res1 = 0 ;
   18611         153 :   int bToFree2 = 0 ;
   18612         153 :   PyObject * obj0 = 0 ;
   18613         153 :   PyObject * obj1 = 0 ;
   18614         153 :   PyObject * obj2 = 0 ;
   18615         153 :   char * kwnames[] = {
   18616             :     (char *)"self",  (char *)"utf8_path",  (char *)"options",  NULL 
   18617             :   };
   18618         153 :   GDALDatasetShadow *result = 0 ;
   18619             :   
   18620         153 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Driver_CreateVector", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   18621         153 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18622         153 :   if (!SWIG_IsOK(res1)) {
   18623           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateVector" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18624             :   }
   18625         153 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18626         153 :   {
   18627             :     /* %typemap(in) (const char *utf8_path) */
   18628         153 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18629             :     {
   18630         134 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18631             :     }
   18632             :     else
   18633             :     {
   18634          19 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18635             :       
   18636             :     }
   18637         153 :     if (arg2 == NULL)
   18638             :     {
   18639           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18640           0 :       SWIG_fail;
   18641             :     }
   18642             :   }
   18643         153 :   if (obj2) {
   18644           0 :     {
   18645             :       /* %typemap(in) char **dict */
   18646           0 :       arg3 = NULL;
   18647           0 :       if ( PySequence_Check( obj2 ) ) {
   18648           0 :         int bErr = FALSE;
   18649           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   18650           0 :         if ( bErr )
   18651             :         {
   18652           0 :           SWIG_fail;
   18653             :         }
   18654             :       }
   18655           0 :       else if ( PyMapping_Check( obj2 ) ) {
   18656           0 :         int bErr = FALSE;
   18657           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   18658           0 :         if ( bErr )
   18659             :         {
   18660           0 :           SWIG_fail;
   18661             :         }
   18662             :       }
   18663             :       else {
   18664           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18665           0 :         SWIG_fail;
   18666             :       }
   18667             :     }
   18668             :   }
   18669         153 :   {
   18670         153 :     if (!arg2) {
   18671         153 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18672             :     }
   18673             :   }
   18674         153 :   {
   18675         153 :     const int bLocalUseExceptions = GetUseExceptions();
   18676         153 :     if ( bLocalUseExceptions ) {
   18677         153 :       pushErrorHandler();
   18678             :     }
   18679         153 :     {
   18680         153 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18681         153 :       result = (GDALDatasetShadow *)GDALDriverShadow_CreateVector(arg1,(char const *)arg2,arg3);
   18682         153 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18683             :     }
   18684         153 :     if ( bLocalUseExceptions ) {
   18685         153 :       popErrorHandler();
   18686             :     }
   18687             : #ifndef SED_HACKS
   18688             :     if ( bLocalUseExceptions ) {
   18689             :       CPLErr eclass = CPLGetLastErrorType();
   18690             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18691             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18692             :       }
   18693             :     }
   18694             : #endif
   18695             :   }
   18696         153 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   18697         153 :   {
   18698             :     /* %typemap(freearg) (const char *utf8_path) */
   18699         153 :     GDALPythonFreeCStr(arg2, bToFree2);
   18700             :   }
   18701         153 :   {
   18702             :     /* %typemap(freearg) char **dict */
   18703         153 :     CSLDestroy( arg3 );
   18704             :   }
   18705         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; } }
   18706             :   return resultobj;
   18707           0 : fail:
   18708           0 :   {
   18709             :     /* %typemap(freearg) (const char *utf8_path) */
   18710           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   18711             :   }
   18712           0 :   {
   18713             :     /* %typemap(freearg) char **dict */
   18714           0 :     CSLDestroy( arg3 );
   18715             :   }
   18716             :   return NULL;
   18717             : }
   18718             : 
   18719             : 
   18720         425 : SWIGINTERN PyObject *_wrap_Driver_CreateMultiDimensional(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18721         425 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18722         425 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18723         425 :   char *arg2 = (char *) 0 ;
   18724         425 :   char **arg3 = (char **) 0 ;
   18725         425 :   char **arg4 = (char **) 0 ;
   18726         425 :   void *argp1 = 0 ;
   18727         425 :   int res1 = 0 ;
   18728         425 :   int bToFree2 = 0 ;
   18729         425 :   PyObject * obj0 = 0 ;
   18730         425 :   PyObject * obj1 = 0 ;
   18731         425 :   PyObject * obj2 = 0 ;
   18732         425 :   PyObject * obj3 = 0 ;
   18733         425 :   char * kwnames[] = {
   18734             :     (char *)"self",  (char *)"utf8_path",  (char *)"root_group_options",  (char *)"options",  NULL 
   18735             :   };
   18736         425 :   GDALDatasetShadow *result = 0 ;
   18737             :   
   18738         425 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Driver_CreateMultiDimensional", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   18739         425 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18740         425 :   if (!SWIG_IsOK(res1)) {
   18741           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateMultiDimensional" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18742             :   }
   18743         425 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18744         425 :   {
   18745             :     /* %typemap(in) (const char *utf8_path) */
   18746         425 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18747             :     {
   18748         240 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18749             :     }
   18750             :     else
   18751             :     {
   18752         185 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18753             :       
   18754             :     }
   18755         425 :     if (arg2 == NULL)
   18756             :     {
   18757           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18758           0 :       SWIG_fail;
   18759             :     }
   18760             :   }
   18761         425 :   if (obj2) {
   18762           1 :     {
   18763             :       /* %typemap(in) char **dict */
   18764           1 :       arg3 = NULL;
   18765           1 :       if ( PySequence_Check( obj2 ) ) {
   18766           1 :         int bErr = FALSE;
   18767           1 :         arg3 = CSLFromPySequence(obj2, &bErr);
   18768           1 :         if ( bErr )
   18769             :         {
   18770           0 :           SWIG_fail;
   18771             :         }
   18772             :       }
   18773           0 :       else if ( PyMapping_Check( obj2 ) ) {
   18774           0 :         int bErr = FALSE;
   18775           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   18776           0 :         if ( bErr )
   18777             :         {
   18778           0 :           SWIG_fail;
   18779             :         }
   18780             :       }
   18781             :       else {
   18782           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18783           0 :         SWIG_fail;
   18784             :       }
   18785             :     }
   18786             :   }
   18787         425 :   if (obj3) {
   18788         217 :     {
   18789             :       /* %typemap(in) char **dict */
   18790         217 :       arg4 = NULL;
   18791         217 :       if ( PySequence_Check( obj3 ) ) {
   18792         217 :         int bErr = FALSE;
   18793         217 :         arg4 = CSLFromPySequence(obj3, &bErr);
   18794         217 :         if ( bErr )
   18795             :         {
   18796           0 :           SWIG_fail;
   18797             :         }
   18798             :       }
   18799           0 :       else if ( PyMapping_Check( obj3 ) ) {
   18800           0 :         int bErr = FALSE;
   18801           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   18802           0 :         if ( bErr )
   18803             :         {
   18804           0 :           SWIG_fail;
   18805             :         }
   18806             :       }
   18807             :       else {
   18808           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18809           0 :         SWIG_fail;
   18810             :       }
   18811             :     }
   18812             :   }
   18813         425 :   {
   18814         425 :     if (!arg2) {
   18815         425 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18816             :     }
   18817             :   }
   18818         425 :   {
   18819         425 :     const int bLocalUseExceptions = GetUseExceptions();
   18820         425 :     if ( bLocalUseExceptions ) {
   18821         110 :       pushErrorHandler();
   18822             :     }
   18823         425 :     {
   18824         425 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18825         425 :       result = (GDALDatasetShadow *)GDALDriverShadow_CreateMultiDimensional(arg1,(char const *)arg2,arg3,arg4);
   18826         425 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18827             :     }
   18828         425 :     if ( bLocalUseExceptions ) {
   18829         110 :       popErrorHandler();
   18830             :     }
   18831             : #ifndef SED_HACKS
   18832             :     if ( bLocalUseExceptions ) {
   18833             :       CPLErr eclass = CPLGetLastErrorType();
   18834             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18835             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18836             :       }
   18837             :     }
   18838             : #endif
   18839             :   }
   18840         425 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   18841         425 :   {
   18842             :     /* %typemap(freearg) (const char *utf8_path) */
   18843         425 :     GDALPythonFreeCStr(arg2, bToFree2);
   18844             :   }
   18845         425 :   {
   18846             :     /* %typemap(freearg) char **dict */
   18847         425 :     CSLDestroy( arg3 );
   18848             :   }
   18849         425 :   {
   18850             :     /* %typemap(freearg) char **dict */
   18851         425 :     CSLDestroy( arg4 );
   18852             :   }
   18853         425 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18854             :   return resultobj;
   18855           0 : fail:
   18856           0 :   {
   18857             :     /* %typemap(freearg) (const char *utf8_path) */
   18858           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   18859             :   }
   18860           0 :   {
   18861             :     /* %typemap(freearg) char **dict */
   18862           0 :     CSLDestroy( arg3 );
   18863             :   }
   18864           0 :   {
   18865             :     /* %typemap(freearg) char **dict */
   18866           0 :     CSLDestroy( arg4 );
   18867             :   }
   18868             :   return NULL;
   18869             : }
   18870             : 
   18871             : 
   18872        3887 : SWIGINTERN PyObject *_wrap_Driver_CreateCopy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18873        3887 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18874        3887 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18875        3887 :   char *arg2 = (char *) 0 ;
   18876        3887 :   GDALDatasetShadow *arg3 = (GDALDatasetShadow *) 0 ;
   18877        3887 :   int arg4 = (int) 1 ;
   18878        3887 :   char **arg5 = (char **) 0 ;
   18879        3887 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   18880        3887 :   void *arg7 = (void *) NULL ;
   18881        3887 :   void *argp1 = 0 ;
   18882        3887 :   int res1 = 0 ;
   18883        3887 :   int bToFree2 = 0 ;
   18884        3887 :   void *argp3 = 0 ;
   18885        3887 :   int res3 = 0 ;
   18886        3887 :   int val4 ;
   18887        3887 :   int ecode4 = 0 ;
   18888        3887 :   PyObject * obj0 = 0 ;
   18889        3887 :   PyObject * obj1 = 0 ;
   18890        3887 :   PyObject * obj2 = 0 ;
   18891        3887 :   PyObject * obj3 = 0 ;
   18892        3887 :   PyObject * obj4 = 0 ;
   18893        3887 :   PyObject * obj5 = 0 ;
   18894        3887 :   PyObject * obj6 = 0 ;
   18895        3887 :   char * kwnames[] = {
   18896             :     (char *)"self",  (char *)"utf8_path",  (char *)"src",  (char *)"strict",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   18897             :   };
   18898        3887 :   GDALDatasetShadow *result = 0 ;
   18899             :   
   18900             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18901        3887 :   PyProgressData *psProgressInfo;
   18902        3887 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18903        3887 :   psProgressInfo->nLastReported = -1;
   18904        3887 :   psProgressInfo->psPyCallback = NULL;
   18905        3887 :   psProgressInfo->psPyCallbackData = NULL;
   18906        3887 :   arg7 = psProgressInfo;
   18907        3887 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOOO:Driver_CreateCopy", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   18908        3887 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18909        3887 :   if (!SWIG_IsOK(res1)) {
   18910           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateCopy" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18911             :   }
   18912        3887 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18913        3887 :   {
   18914             :     /* %typemap(in) (const char *utf8_path) */
   18915        3887 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18916             :     {
   18917        3711 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18918             :     }
   18919             :     else
   18920             :     {
   18921         176 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18922             :       
   18923             :     }
   18924        3887 :     if (arg2 == NULL)
   18925             :     {
   18926           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18927           0 :       SWIG_fail;
   18928             :     }
   18929             :   }
   18930        3887 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   18931        3887 :   if (!SWIG_IsOK(res3)) {
   18932           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_CreateCopy" "', argument " "3"" of type '" "GDALDatasetShadow *""'"); 
   18933             :   }
   18934        3887 :   arg3 = reinterpret_cast< GDALDatasetShadow * >(argp3);
   18935        3887 :   if (obj3) {
   18936         477 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
   18937         477 :     if (!SWIG_IsOK(ecode4)) {
   18938           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_CreateCopy" "', argument " "4"" of type '" "int""'");
   18939             :     } 
   18940             :     arg4 = static_cast< int >(val4);
   18941             :   }
   18942        3887 :   if (obj4) {
   18943        1445 :     {
   18944             :       /* %typemap(in) char **dict */
   18945        1445 :       arg5 = NULL;
   18946        1445 :       if ( PySequence_Check( obj4 ) ) {
   18947        1440 :         int bErr = FALSE;
   18948        1440 :         arg5 = CSLFromPySequence(obj4, &bErr);
   18949        1440 :         if ( bErr )
   18950             :         {
   18951           0 :           SWIG_fail;
   18952             :         }
   18953             :       }
   18954           5 :       else if ( PyMapping_Check( obj4 ) ) {
   18955           5 :         int bErr = FALSE;
   18956           5 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   18957           5 :         if ( bErr )
   18958             :         {
   18959           0 :           SWIG_fail;
   18960             :         }
   18961             :       }
   18962             :       else {
   18963           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18964           0 :         SWIG_fail;
   18965             :       }
   18966             :     }
   18967             :   }
   18968        3887 :   if (obj5) {
   18969          79 :     {
   18970             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18971             :       /* callback_func typemap */
   18972             :       
   18973             :       /* In some cases 0 is passed instead of None. */
   18974             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   18975          79 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   18976             :       {
   18977           0 :         if( PyLong_AsLong(obj5) == 0 )
   18978             :         {
   18979           0 :           obj5 = Py_None;
   18980             :         }
   18981             :       }
   18982             :       
   18983          79 :       if (obj5 && obj5 != Py_None ) {
   18984          79 :         void* cbfunction = NULL;
   18985          79 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   18986             :             (void**)&cbfunction,
   18987             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   18988             :             SWIG_POINTER_EXCEPTION | 0 ));
   18989             :         
   18990          79 :         if ( cbfunction == GDALTermProgress ) {
   18991             :           arg6 = GDALTermProgress;
   18992             :         } else {
   18993          79 :           if (!PyCallable_Check(obj5)) {
   18994           1 :             PyErr_SetString( PyExc_RuntimeError,
   18995             :               "Object given is not a Python function" );
   18996           1 :             SWIG_fail;
   18997             :           }
   18998          78 :           psProgressInfo->psPyCallback = obj5;
   18999          78 :           arg6 = PyProgressProxy;
   19000             :         }
   19001             :         
   19002             :       }
   19003             :       
   19004             :     }
   19005             :   }
   19006        3886 :   if (obj6) {
   19007          14 :     {
   19008             :       /* %typemap(in) ( void* callback_data=NULL)  */
   19009          14 :       psProgressInfo->psPyCallbackData = obj6 ;
   19010             :     }
   19011             :   }
   19012        3886 :   {
   19013        3886 :     if (!arg2) {
   19014        3886 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19015             :     }
   19016             :   }
   19017        3886 :   {
   19018        3886 :     if (!arg3) {
   19019           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19020             :     }
   19021             :   }
   19022        3886 :   {
   19023        3886 :     const int bLocalUseExceptions = GetUseExceptions();
   19024        3886 :     if ( bLocalUseExceptions ) {
   19025         649 :       pushErrorHandler();
   19026             :     }
   19027        3886 :     {
   19028        3886 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19029        3886 :       result = (GDALDatasetShadow *)GDALDriverShadow_CreateCopy(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   19030        3886 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19031             :     }
   19032        3886 :     if ( bLocalUseExceptions ) {
   19033         649 :       popErrorHandler();
   19034             :     }
   19035             : #ifndef SED_HACKS
   19036             :     if ( bLocalUseExceptions ) {
   19037             :       CPLErr eclass = CPLGetLastErrorType();
   19038             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19039             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19040             :       }
   19041             :     }
   19042             : #endif
   19043             :   }
   19044        3886 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   19045        3886 :   {
   19046             :     /* %typemap(freearg) (const char *utf8_path) */
   19047        3886 :     GDALPythonFreeCStr(arg2, bToFree2);
   19048             :   }
   19049        3886 :   {
   19050             :     /* %typemap(freearg) char **dict */
   19051        3886 :     CSLDestroy( arg5 );
   19052             :   }
   19053        3886 :   {
   19054             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19055             :     
   19056        3886 :     CPLFree(psProgressInfo);
   19057             :     
   19058             :   }
   19059        3921 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19060             :   return resultobj;
   19061           1 : fail:
   19062           1 :   {
   19063             :     /* %typemap(freearg) (const char *utf8_path) */
   19064           1 :     GDALPythonFreeCStr(arg2, bToFree2);
   19065             :   }
   19066           1 :   {
   19067             :     /* %typemap(freearg) char **dict */
   19068           1 :     CSLDestroy( arg5 );
   19069             :   }
   19070           1 :   {
   19071             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19072             :     
   19073           1 :     CPLFree(psProgressInfo);
   19074             :     
   19075             :   }
   19076             :   return NULL;
   19077             : }
   19078             : 
   19079             : 
   19080        2414 : SWIGINTERN PyObject *_wrap_Driver_Delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19081        2414 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19082        2414 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19083        2414 :   char *arg2 = (char *) 0 ;
   19084        2414 :   void *argp1 = 0 ;
   19085        2414 :   int res1 = 0 ;
   19086        2414 :   int bToFree2 = 0 ;
   19087        2414 :   PyObject *swig_obj[2] ;
   19088        2414 :   CPLErr result;
   19089             :   
   19090        2414 :   if (!SWIG_Python_UnpackTuple(args, "Driver_Delete", 2, 2, swig_obj)) SWIG_fail;
   19091        2414 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19092        2414 :   if (!SWIG_IsOK(res1)) {
   19093           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Delete" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19094             :   }
   19095        2414 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19096        2414 :   {
   19097             :     /* %typemap(in) (const char *utf8_path) */
   19098        2414 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   19099             :     {
   19100        2281 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   19101             :     }
   19102             :     else
   19103             :     {
   19104         133 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   19105             :       
   19106             :     }
   19107        2414 :     if (arg2 == NULL)
   19108             :     {
   19109           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19110           0 :       SWIG_fail;
   19111             :     }
   19112             :   }
   19113        2414 :   {
   19114        2414 :     if (!arg2) {
   19115        2414 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19116             :     }
   19117             :   }
   19118        2414 :   {
   19119        2414 :     const int bLocalUseExceptions = GetUseExceptions();
   19120        2414 :     if ( bLocalUseExceptions ) {
   19121        1317 :       pushErrorHandler();
   19122             :     }
   19123        2414 :     {
   19124        2414 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19125        2414 :       result = (CPLErr)GDALDriverShadow_Delete(arg1,(char const *)arg2);
   19126        2414 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19127             :     }
   19128        2414 :     if ( bLocalUseExceptions ) {
   19129        1317 :       popErrorHandler();
   19130             :     }
   19131             : #ifndef SED_HACKS
   19132             :     if ( bLocalUseExceptions ) {
   19133             :       CPLErr eclass = CPLGetLastErrorType();
   19134             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19135             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19136             :       }
   19137             :     }
   19138             : #endif
   19139             :   }
   19140        2414 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19141        2414 :   {
   19142             :     /* %typemap(freearg) (const char *utf8_path) */
   19143        2414 :     GDALPythonFreeCStr(arg2, bToFree2);
   19144             :   }
   19145        2414 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19146             :   return resultobj;
   19147           0 : fail:
   19148           0 :   {
   19149             :     /* %typemap(freearg) (const char *utf8_path) */
   19150        2414 :     GDALPythonFreeCStr(arg2, bToFree2);
   19151             :   }
   19152             :   return NULL;
   19153             : }
   19154             : 
   19155             : 
   19156         173 : SWIGINTERN PyObject *_wrap_Driver_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19157         173 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19158         173 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19159         173 :   char *arg2 = (char *) 0 ;
   19160         173 :   char *arg3 = (char *) 0 ;
   19161         173 :   void *argp1 = 0 ;
   19162         173 :   int res1 = 0 ;
   19163         173 :   int bToFree2 = 0 ;
   19164         173 :   int bToFree3 = 0 ;
   19165         173 :   PyObject *swig_obj[3] ;
   19166         173 :   CPLErr result;
   19167             :   
   19168         173 :   if (!SWIG_Python_UnpackTuple(args, "Driver_Rename", 3, 3, swig_obj)) SWIG_fail;
   19169         173 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19170         173 :   if (!SWIG_IsOK(res1)) {
   19171           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Rename" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19172             :   }
   19173         173 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19174         173 :   {
   19175             :     /* %typemap(in) (const char *utf8_path) */
   19176         173 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   19177             :     {
   19178         171 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   19179             :     }
   19180             :     else
   19181             :     {
   19182           2 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   19183             :       
   19184             :     }
   19185         173 :     if (arg2 == NULL)
   19186             :     {
   19187           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19188           0 :       SWIG_fail;
   19189             :     }
   19190             :   }
   19191         173 :   {
   19192             :     /* %typemap(in) (const char *utf8_path) */
   19193         173 :     if (PyUnicode_Check(swig_obj[2]) || PyBytes_Check(swig_obj[2]))
   19194             :     {
   19195         171 :       arg3 = GDALPythonObjectToCStr( swig_obj[2], &bToFree3 );
   19196             :     }
   19197             :     else
   19198             :     {
   19199           2 :       arg3 = GDALPythonPathToCStr(swig_obj[2], &bToFree3);
   19200             :       
   19201             :     }
   19202         173 :     if (arg3 == NULL)
   19203             :     {
   19204           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19205           0 :       SWIG_fail;
   19206             :     }
   19207             :   }
   19208         173 :   {
   19209         173 :     if (!arg2) {
   19210         173 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19211             :     }
   19212             :   }
   19213         173 :   {
   19214         173 :     if (!arg3) {
   19215         173 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19216             :     }
   19217             :   }
   19218         173 :   {
   19219         173 :     const int bLocalUseExceptions = GetUseExceptions();
   19220         173 :     if ( bLocalUseExceptions ) {
   19221         173 :       pushErrorHandler();
   19222             :     }
   19223         173 :     {
   19224         173 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19225         173 :       result = (CPLErr)GDALDriverShadow_Rename(arg1,(char const *)arg2,(char const *)arg3);
   19226         173 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19227             :     }
   19228         173 :     if ( bLocalUseExceptions ) {
   19229         173 :       popErrorHandler();
   19230             :     }
   19231             : #ifndef SED_HACKS
   19232             :     if ( bLocalUseExceptions ) {
   19233             :       CPLErr eclass = CPLGetLastErrorType();
   19234             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19235             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19236             :       }
   19237             :     }
   19238             : #endif
   19239             :   }
   19240         173 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19241         173 :   {
   19242             :     /* %typemap(freearg) (const char *utf8_path) */
   19243         173 :     GDALPythonFreeCStr(arg2, bToFree2);
   19244             :   }
   19245         173 :   {
   19246             :     /* %typemap(freearg) (const char *utf8_path) */
   19247         173 :     GDALPythonFreeCStr(arg3, bToFree3);
   19248             :   }
   19249         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; } }
   19250             :   return resultobj;
   19251           0 : fail:
   19252           0 :   {
   19253             :     /* %typemap(freearg) (const char *utf8_path) */
   19254           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   19255             :   }
   19256           0 :   {
   19257             :     /* %typemap(freearg) (const char *utf8_path) */
   19258         173 :     GDALPythonFreeCStr(arg3, bToFree3);
   19259             :   }
   19260             :   return NULL;
   19261             : }
   19262             : 
   19263             : 
   19264           3 : SWIGINTERN PyObject *_wrap_Driver_CopyFiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19265           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19266           3 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19267           3 :   char *arg2 = (char *) 0 ;
   19268           3 :   char *arg3 = (char *) 0 ;
   19269           3 :   void *argp1 = 0 ;
   19270           3 :   int res1 = 0 ;
   19271           3 :   int bToFree2 = 0 ;
   19272           3 :   int bToFree3 = 0 ;
   19273           3 :   PyObject *swig_obj[3] ;
   19274           3 :   CPLErr result;
   19275             :   
   19276           3 :   if (!SWIG_Python_UnpackTuple(args, "Driver_CopyFiles", 3, 3, swig_obj)) SWIG_fail;
   19277           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19278           3 :   if (!SWIG_IsOK(res1)) {
   19279           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CopyFiles" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19280             :   }
   19281           3 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19282           3 :   {
   19283             :     /* %typemap(in) (const char *utf8_path) */
   19284           3 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   19285             :     {
   19286           1 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   19287             :     }
   19288             :     else
   19289             :     {
   19290           2 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   19291             :       
   19292             :     }
   19293           3 :     if (arg2 == NULL)
   19294             :     {
   19295           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19296           0 :       SWIG_fail;
   19297             :     }
   19298             :   }
   19299           3 :   {
   19300             :     /* %typemap(in) (const char *utf8_path) */
   19301           3 :     if (PyUnicode_Check(swig_obj[2]) || PyBytes_Check(swig_obj[2]))
   19302             :     {
   19303           1 :       arg3 = GDALPythonObjectToCStr( swig_obj[2], &bToFree3 );
   19304             :     }
   19305             :     else
   19306             :     {
   19307           2 :       arg3 = GDALPythonPathToCStr(swig_obj[2], &bToFree3);
   19308             :       
   19309             :     }
   19310           3 :     if (arg3 == NULL)
   19311             :     {
   19312           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19313           0 :       SWIG_fail;
   19314             :     }
   19315             :   }
   19316           3 :   {
   19317           3 :     if (!arg2) {
   19318           3 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19319             :     }
   19320             :   }
   19321           3 :   {
   19322           3 :     if (!arg3) {
   19323           3 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19324             :     }
   19325             :   }
   19326           3 :   {
   19327           3 :     const int bLocalUseExceptions = GetUseExceptions();
   19328           3 :     if ( bLocalUseExceptions ) {
   19329           3 :       pushErrorHandler();
   19330             :     }
   19331           3 :     {
   19332           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19333           3 :       result = (CPLErr)GDALDriverShadow_CopyFiles(arg1,(char const *)arg2,(char const *)arg3);
   19334           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19335             :     }
   19336           3 :     if ( bLocalUseExceptions ) {
   19337           3 :       popErrorHandler();
   19338             :     }
   19339             : #ifndef SED_HACKS
   19340             :     if ( bLocalUseExceptions ) {
   19341             :       CPLErr eclass = CPLGetLastErrorType();
   19342             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19343             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19344             :       }
   19345             :     }
   19346             : #endif
   19347             :   }
   19348           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19349           3 :   {
   19350             :     /* %typemap(freearg) (const char *utf8_path) */
   19351           3 :     GDALPythonFreeCStr(arg2, bToFree2);
   19352             :   }
   19353           3 :   {
   19354             :     /* %typemap(freearg) (const char *utf8_path) */
   19355           3 :     GDALPythonFreeCStr(arg3, bToFree3);
   19356             :   }
   19357           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; } }
   19358             :   return resultobj;
   19359           0 : fail:
   19360           0 :   {
   19361             :     /* %typemap(freearg) (const char *utf8_path) */
   19362           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   19363             :   }
   19364           0 :   {
   19365             :     /* %typemap(freearg) (const char *utf8_path) */
   19366           3 :     GDALPythonFreeCStr(arg3, bToFree3);
   19367             :   }
   19368             :   return NULL;
   19369             : }
   19370             : 
   19371             : 
   19372           2 : SWIGINTERN PyObject *_wrap_Driver_HasOpenOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19373           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19374           2 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19375           2 :   char *arg2 = (char *) 0 ;
   19376           2 :   void *argp1 = 0 ;
   19377           2 :   int res1 = 0 ;
   19378           2 :   int res2 ;
   19379           2 :   char *buf2 = 0 ;
   19380           2 :   int alloc2 = 0 ;
   19381           2 :   PyObject *swig_obj[2] ;
   19382           2 :   bool result;
   19383             :   
   19384           2 :   if (!SWIG_Python_UnpackTuple(args, "Driver_HasOpenOption", 2, 2, swig_obj)) SWIG_fail;
   19385           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19386           2 :   if (!SWIG_IsOK(res1)) {
   19387           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_HasOpenOption" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19388             :   }
   19389           2 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19390           2 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   19391           2 :   if (!SWIG_IsOK(res2)) {
   19392           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_HasOpenOption" "', argument " "2"" of type '" "char const *""'");
   19393             :   }
   19394           2 :   arg2 = reinterpret_cast< char * >(buf2);
   19395           2 :   {
   19396           2 :     const int bLocalUseExceptions = GetUseExceptions();
   19397           2 :     if ( bLocalUseExceptions ) {
   19398           0 :       pushErrorHandler();
   19399             :     }
   19400           2 :     {
   19401           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19402           2 :       result = (bool)GDALDriverShadow_HasOpenOption(arg1,(char const *)arg2);
   19403           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19404             :     }
   19405           2 :     if ( bLocalUseExceptions ) {
   19406           0 :       popErrorHandler();
   19407             :     }
   19408             : #ifndef SED_HACKS
   19409             :     if ( bLocalUseExceptions ) {
   19410             :       CPLErr eclass = CPLGetLastErrorType();
   19411             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19412             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19413             :       }
   19414             :     }
   19415             : #endif
   19416             :   }
   19417           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   19418           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19419           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; } }
   19420             :   return resultobj;
   19421           0 : fail:
   19422           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19423             :   return NULL;
   19424             : }
   19425             : 
   19426             : 
   19427           6 : SWIGINTERN PyObject *_wrap_Driver_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19428           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19429           6 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19430           6 :   char *arg2 = (char *) 0 ;
   19431           6 :   void *argp1 = 0 ;
   19432           6 :   int res1 = 0 ;
   19433           6 :   int res2 ;
   19434           6 :   char *buf2 = 0 ;
   19435           6 :   int alloc2 = 0 ;
   19436           6 :   PyObject *swig_obj[2] ;
   19437           6 :   bool result;
   19438             :   
   19439           6 :   if (!SWIG_Python_UnpackTuple(args, "Driver_TestCapability", 2, 2, swig_obj)) SWIG_fail;
   19440           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19441           6 :   if (!SWIG_IsOK(res1)) {
   19442           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_TestCapability" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19443             :   }
   19444           6 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19445           6 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   19446           6 :   if (!SWIG_IsOK(res2)) {
   19447           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_TestCapability" "', argument " "2"" of type '" "char const *""'");
   19448             :   }
   19449           6 :   arg2 = reinterpret_cast< char * >(buf2);
   19450           6 :   {
   19451           6 :     const int bLocalUseExceptions = GetUseExceptions();
   19452           6 :     if ( bLocalUseExceptions ) {
   19453           4 :       pushErrorHandler();
   19454             :     }
   19455           6 :     {
   19456           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19457           6 :       result = (bool)GDALDriverShadow_TestCapability(arg1,(char const *)arg2);
   19458           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19459             :     }
   19460           6 :     if ( bLocalUseExceptions ) {
   19461           4 :       popErrorHandler();
   19462             :     }
   19463             : #ifndef SED_HACKS
   19464             :     if ( bLocalUseExceptions ) {
   19465             :       CPLErr eclass = CPLGetLastErrorType();
   19466             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19467             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19468             :       }
   19469             :     }
   19470             : #endif
   19471             :   }
   19472           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   19473           6 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19474           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; } }
   19475             :   return resultobj;
   19476           0 : fail:
   19477           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19478             :   return NULL;
   19479             : }
   19480             : 
   19481             : 
   19482          93 : SWIGINTERN PyObject *_wrap_Driver_Register(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19483          93 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19484          93 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19485          93 :   void *argp1 = 0 ;
   19486          93 :   int res1 = 0 ;
   19487          93 :   PyObject *swig_obj[1] ;
   19488          93 :   int result;
   19489             :   
   19490          93 :   if (!args) SWIG_fail;
   19491          93 :   swig_obj[0] = args;
   19492          93 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19493          93 :   if (!SWIG_IsOK(res1)) {
   19494           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Register" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19495             :   }
   19496          93 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19497          93 :   {
   19498          93 :     const int bLocalUseExceptions = GetUseExceptions();
   19499          93 :     if ( bLocalUseExceptions ) {
   19500          17 :       pushErrorHandler();
   19501             :     }
   19502          93 :     {
   19503          93 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19504          93 :       result = (int)GDALDriverShadow_Register(arg1);
   19505          93 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19506             :     }
   19507          93 :     if ( bLocalUseExceptions ) {
   19508          17 :       popErrorHandler();
   19509             :     }
   19510             : #ifndef SED_HACKS
   19511             :     if ( bLocalUseExceptions ) {
   19512             :       CPLErr eclass = CPLGetLastErrorType();
   19513             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19514             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19515             :       }
   19516             :     }
   19517             : #endif
   19518             :   }
   19519          93 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19520          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; } }
   19521             :   return resultobj;
   19522             : fail:
   19523             :   return NULL;
   19524             : }
   19525             : 
   19526             : 
   19527          93 : SWIGINTERN PyObject *_wrap_Driver_Deregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19528          93 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19529          93 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19530          93 :   void *argp1 = 0 ;
   19531          93 :   int res1 = 0 ;
   19532          93 :   PyObject *swig_obj[1] ;
   19533             :   
   19534          93 :   if (!args) SWIG_fail;
   19535          93 :   swig_obj[0] = args;
   19536          93 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19537          93 :   if (!SWIG_IsOK(res1)) {
   19538           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Deregister" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19539             :   }
   19540          93 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19541          93 :   {
   19542          93 :     const int bLocalUseExceptions = GetUseExceptions();
   19543          93 :     if ( bLocalUseExceptions ) {
   19544          17 :       pushErrorHandler();
   19545             :     }
   19546          93 :     {
   19547          93 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19548          93 :       GDALDriverShadow_Deregister(arg1);
   19549          93 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19550             :     }
   19551          93 :     if ( bLocalUseExceptions ) {
   19552          17 :       popErrorHandler();
   19553             :     }
   19554             : #ifndef SED_HACKS
   19555             :     if ( bLocalUseExceptions ) {
   19556             :       CPLErr eclass = CPLGetLastErrorType();
   19557             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19558             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19559             :       }
   19560             :     }
   19561             : #endif
   19562             :   }
   19563          93 :   resultobj = SWIG_Py_Void();
   19564          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; } }
   19565             :   return resultobj;
   19566             : fail:
   19567             :   return NULL;
   19568             : }
   19569             : 
   19570             : 
   19571         277 : SWIGINTERN PyObject *Driver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19572         277 :   PyObject *obj;
   19573         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   19574         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDriverShadow, SWIG_NewClientData(obj));
   19575         277 :   return SWIG_Py_Void();
   19576             : }
   19577             : 
   19578           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19579           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19580           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19581           0 :   short arg2 ;
   19582           0 :   GDALColorEntry ce1 ;
   19583           0 :   short val2 ;
   19584           0 :   int ecode2 = 0 ;
   19585           0 :   PyObject *swig_obj[2] ;
   19586             :   
   19587           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c1_set", 2, 2, swig_obj)) SWIG_fail;
   19588           0 :   {
   19589             :     /* %typemap(in) GDALColorEntry* */
   19590           0 :     ce1.c4 = 255;
   19591           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19592           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19593           0 :       SWIG_fail;
   19594             :     }
   19595           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19596           0 :     if ( size > 4 ) {
   19597           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19598           0 :       SWIG_fail;
   19599             :     }
   19600           0 :     if ( size < 3 ) {
   19601           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19602           0 :       SWIG_fail;
   19603             :     }
   19604           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19605           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19606           0 :       SWIG_fail;
   19607             :     }
   19608           0 :     arg1 = &ce1;
   19609             :   }
   19610           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19611           0 :   if (!SWIG_IsOK(ecode2)) {
   19612           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c1_set" "', argument " "2"" of type '" "short""'");
   19613             :   } 
   19614           0 :   arg2 = static_cast< short >(val2);
   19615           0 :   {
   19616           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19617           0 :     if (arg1) (arg1)->c1 = arg2;
   19618           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19619             :   }
   19620           0 :   resultobj = SWIG_Py_Void();
   19621           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; } }
   19622             :   return resultobj;
   19623             : fail:
   19624             :   return NULL;
   19625             : }
   19626             : 
   19627             : 
   19628           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19629           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19630           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19631           0 :   GDALColorEntry ce1 ;
   19632           0 :   PyObject *swig_obj[1] ;
   19633           0 :   short result;
   19634             :   
   19635           0 :   if (!args) SWIG_fail;
   19636           0 :   swig_obj[0] = args;
   19637           0 :   {
   19638             :     /* %typemap(in) GDALColorEntry* */
   19639           0 :     ce1.c4 = 255;
   19640           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19641           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19642           0 :       SWIG_fail;
   19643             :     }
   19644           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19645           0 :     if ( size > 4 ) {
   19646           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19647           0 :       SWIG_fail;
   19648             :     }
   19649           0 :     if ( size < 3 ) {
   19650           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19651           0 :       SWIG_fail;
   19652             :     }
   19653           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19654           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19655           0 :       SWIG_fail;
   19656             :     }
   19657           0 :     arg1 = &ce1;
   19658             :   }
   19659           0 :   {
   19660           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19661           0 :     result = (short) ((arg1)->c1);
   19662           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19663             :   }
   19664           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19665           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; } }
   19666             :   return resultobj;
   19667             : fail:
   19668             :   return NULL;
   19669             : }
   19670             : 
   19671             : 
   19672           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19673           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19674           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19675           0 :   short arg2 ;
   19676           0 :   GDALColorEntry ce1 ;
   19677           0 :   short val2 ;
   19678           0 :   int ecode2 = 0 ;
   19679           0 :   PyObject *swig_obj[2] ;
   19680             :   
   19681           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c2_set", 2, 2, swig_obj)) SWIG_fail;
   19682           0 :   {
   19683             :     /* %typemap(in) GDALColorEntry* */
   19684           0 :     ce1.c4 = 255;
   19685           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19686           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19687           0 :       SWIG_fail;
   19688             :     }
   19689           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19690           0 :     if ( size > 4 ) {
   19691           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19692           0 :       SWIG_fail;
   19693             :     }
   19694           0 :     if ( size < 3 ) {
   19695           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19696           0 :       SWIG_fail;
   19697             :     }
   19698           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19699           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19700           0 :       SWIG_fail;
   19701             :     }
   19702           0 :     arg1 = &ce1;
   19703             :   }
   19704           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19705           0 :   if (!SWIG_IsOK(ecode2)) {
   19706           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c2_set" "', argument " "2"" of type '" "short""'");
   19707             :   } 
   19708           0 :   arg2 = static_cast< short >(val2);
   19709           0 :   {
   19710           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19711           0 :     if (arg1) (arg1)->c2 = arg2;
   19712           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19713             :   }
   19714           0 :   resultobj = SWIG_Py_Void();
   19715           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; } }
   19716             :   return resultobj;
   19717             : fail:
   19718             :   return NULL;
   19719             : }
   19720             : 
   19721             : 
   19722           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19723           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19724           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19725           0 :   GDALColorEntry ce1 ;
   19726           0 :   PyObject *swig_obj[1] ;
   19727           0 :   short result;
   19728             :   
   19729           0 :   if (!args) SWIG_fail;
   19730           0 :   swig_obj[0] = args;
   19731           0 :   {
   19732             :     /* %typemap(in) GDALColorEntry* */
   19733           0 :     ce1.c4 = 255;
   19734           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19735           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19736           0 :       SWIG_fail;
   19737             :     }
   19738           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19739           0 :     if ( size > 4 ) {
   19740           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19741           0 :       SWIG_fail;
   19742             :     }
   19743           0 :     if ( size < 3 ) {
   19744           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19745           0 :       SWIG_fail;
   19746             :     }
   19747           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19748           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19749           0 :       SWIG_fail;
   19750             :     }
   19751           0 :     arg1 = &ce1;
   19752             :   }
   19753           0 :   {
   19754           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19755           0 :     result = (short) ((arg1)->c2);
   19756           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19757             :   }
   19758           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19759           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; } }
   19760             :   return resultobj;
   19761             : fail:
   19762             :   return NULL;
   19763             : }
   19764             : 
   19765             : 
   19766           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19767           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19768           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19769           0 :   short arg2 ;
   19770           0 :   GDALColorEntry ce1 ;
   19771           0 :   short val2 ;
   19772           0 :   int ecode2 = 0 ;
   19773           0 :   PyObject *swig_obj[2] ;
   19774             :   
   19775           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c3_set", 2, 2, swig_obj)) SWIG_fail;
   19776           0 :   {
   19777             :     /* %typemap(in) GDALColorEntry* */
   19778           0 :     ce1.c4 = 255;
   19779           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19780           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19781           0 :       SWIG_fail;
   19782             :     }
   19783           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19784           0 :     if ( size > 4 ) {
   19785           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19786           0 :       SWIG_fail;
   19787             :     }
   19788           0 :     if ( size < 3 ) {
   19789           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19790           0 :       SWIG_fail;
   19791             :     }
   19792           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19793           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19794           0 :       SWIG_fail;
   19795             :     }
   19796           0 :     arg1 = &ce1;
   19797             :   }
   19798           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19799           0 :   if (!SWIG_IsOK(ecode2)) {
   19800           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c3_set" "', argument " "2"" of type '" "short""'");
   19801             :   } 
   19802           0 :   arg2 = static_cast< short >(val2);
   19803           0 :   {
   19804           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19805           0 :     if (arg1) (arg1)->c3 = arg2;
   19806           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19807             :   }
   19808           0 :   resultobj = SWIG_Py_Void();
   19809           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; } }
   19810             :   return resultobj;
   19811             : fail:
   19812             :   return NULL;
   19813             : }
   19814             : 
   19815             : 
   19816           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19817           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19818           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19819           0 :   GDALColorEntry ce1 ;
   19820           0 :   PyObject *swig_obj[1] ;
   19821           0 :   short result;
   19822             :   
   19823           0 :   if (!args) SWIG_fail;
   19824           0 :   swig_obj[0] = args;
   19825           0 :   {
   19826             :     /* %typemap(in) GDALColorEntry* */
   19827           0 :     ce1.c4 = 255;
   19828           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19829           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19830           0 :       SWIG_fail;
   19831             :     }
   19832           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19833           0 :     if ( size > 4 ) {
   19834           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19835           0 :       SWIG_fail;
   19836             :     }
   19837           0 :     if ( size < 3 ) {
   19838           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19839           0 :       SWIG_fail;
   19840             :     }
   19841           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19842           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19843           0 :       SWIG_fail;
   19844             :     }
   19845           0 :     arg1 = &ce1;
   19846             :   }
   19847           0 :   {
   19848           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19849           0 :     result = (short) ((arg1)->c3);
   19850           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19851             :   }
   19852           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19853           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; } }
   19854             :   return resultobj;
   19855             : fail:
   19856             :   return NULL;
   19857             : }
   19858             : 
   19859             : 
   19860           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19861           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19862           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19863           0 :   short arg2 ;
   19864           0 :   GDALColorEntry ce1 ;
   19865           0 :   short val2 ;
   19866           0 :   int ecode2 = 0 ;
   19867           0 :   PyObject *swig_obj[2] ;
   19868             :   
   19869           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c4_set", 2, 2, swig_obj)) SWIG_fail;
   19870           0 :   {
   19871             :     /* %typemap(in) GDALColorEntry* */
   19872           0 :     ce1.c4 = 255;
   19873           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19874           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19875           0 :       SWIG_fail;
   19876             :     }
   19877           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19878           0 :     if ( size > 4 ) {
   19879           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19880           0 :       SWIG_fail;
   19881             :     }
   19882           0 :     if ( size < 3 ) {
   19883           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19884           0 :       SWIG_fail;
   19885             :     }
   19886           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19887           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19888           0 :       SWIG_fail;
   19889             :     }
   19890           0 :     arg1 = &ce1;
   19891             :   }
   19892           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19893           0 :   if (!SWIG_IsOK(ecode2)) {
   19894           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c4_set" "', argument " "2"" of type '" "short""'");
   19895             :   } 
   19896           0 :   arg2 = static_cast< short >(val2);
   19897           0 :   {
   19898           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19899           0 :     if (arg1) (arg1)->c4 = arg2;
   19900           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19901             :   }
   19902           0 :   resultobj = SWIG_Py_Void();
   19903           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; } }
   19904             :   return resultobj;
   19905             : fail:
   19906             :   return NULL;
   19907             : }
   19908             : 
   19909             : 
   19910           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19911           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19912           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19913           0 :   GDALColorEntry ce1 ;
   19914           0 :   PyObject *swig_obj[1] ;
   19915           0 :   short result;
   19916             :   
   19917           0 :   if (!args) SWIG_fail;
   19918           0 :   swig_obj[0] = args;
   19919           0 :   {
   19920             :     /* %typemap(in) GDALColorEntry* */
   19921           0 :     ce1.c4 = 255;
   19922           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19923           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19924           0 :       SWIG_fail;
   19925             :     }
   19926           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19927           0 :     if ( size > 4 ) {
   19928           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19929           0 :       SWIG_fail;
   19930             :     }
   19931           0 :     if ( size < 3 ) {
   19932           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19933           0 :       SWIG_fail;
   19934             :     }
   19935           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19936           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19937           0 :       SWIG_fail;
   19938             :     }
   19939           0 :     arg1 = &ce1;
   19940             :   }
   19941           0 :   {
   19942           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19943           0 :     result = (short) ((arg1)->c4);
   19944           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19945             :   }
   19946           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19947           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; } }
   19948             :   return resultobj;
   19949             : fail:
   19950             :   return NULL;
   19951             : }
   19952             : 
   19953             : 
   19954         277 : SWIGINTERN PyObject *ColorEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19955         277 :   PyObject *obj;
   19956         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   19957         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorEntry, SWIG_NewClientData(obj));
   19958         277 :   return SWIG_Py_Void();
   19959             : }
   19960             : 
   19961          92 : SWIGINTERN PyObject *_wrap_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19962          92 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19963          92 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   19964          92 :   double arg2 ;
   19965          92 :   void *argp1 = 0 ;
   19966          92 :   int res1 = 0 ;
   19967          92 :   double val2 ;
   19968          92 :   int ecode2 = 0 ;
   19969          92 :   PyObject *swig_obj[2] ;
   19970             :   
   19971          92 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPX_set", 2, 2, swig_obj)) SWIG_fail;
   19972          92 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   19973          92 :   if (!SWIG_IsOK(res1)) {
   19974           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   19975             :   }
   19976          92 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   19977          92 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   19978          92 :   if (!SWIG_IsOK(ecode2)) {
   19979           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
   19980             :   } 
   19981          92 :   arg2 = static_cast< double >(val2);
   19982          92 :   {
   19983          92 :     const int bLocalUseExceptions = GetUseExceptions();
   19984          92 :     if ( bLocalUseExceptions ) {
   19985          91 :       pushErrorHandler();
   19986             :     }
   19987          92 :     {
   19988          92 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19989          92 :       GDAL_GCP_GCPX_set(arg1,arg2);
   19990          92 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19991             :     }
   19992          92 :     if ( bLocalUseExceptions ) {
   19993          91 :       popErrorHandler();
   19994             :     }
   19995             : #ifndef SED_HACKS
   19996             :     if ( bLocalUseExceptions ) {
   19997             :       CPLErr eclass = CPLGetLastErrorType();
   19998             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19999             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20000             :       }
   20001             :     }
   20002             : #endif
   20003             :   }
   20004          92 :   resultobj = SWIG_Py_Void();
   20005          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; } }
   20006             :   return resultobj;
   20007             : fail:
   20008             :   return NULL;
   20009             : }
   20010             : 
   20011             : 
   20012        2205 : SWIGINTERN PyObject *_wrap_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20013        2205 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20014        2205 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20015        2205 :   void *argp1 = 0 ;
   20016        2205 :   int res1 = 0 ;
   20017        2205 :   PyObject *swig_obj[1] ;
   20018        2205 :   double result;
   20019             :   
   20020        2205 :   if (!args) SWIG_fail;
   20021        2205 :   swig_obj[0] = args;
   20022        2205 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20023        2205 :   if (!SWIG_IsOK(res1)) {
   20024           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20025             :   }
   20026        2205 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20027        2205 :   {
   20028        2205 :     const int bLocalUseExceptions = GetUseExceptions();
   20029        2205 :     if ( bLocalUseExceptions ) {
   20030        2182 :       pushErrorHandler();
   20031             :     }
   20032        2205 :     {
   20033        2205 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20034        2205 :       result = (double)GDAL_GCP_GCPX_get(arg1);
   20035        2205 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20036             :     }
   20037        2205 :     if ( bLocalUseExceptions ) {
   20038        2182 :       popErrorHandler();
   20039             :     }
   20040             : #ifndef SED_HACKS
   20041             :     if ( bLocalUseExceptions ) {
   20042             :       CPLErr eclass = CPLGetLastErrorType();
   20043             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20044             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20045             :       }
   20046             :     }
   20047             : #endif
   20048             :   }
   20049        2205 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20050        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; } }
   20051             :   return resultobj;
   20052             : fail:
   20053             :   return NULL;
   20054             : }
   20055             : 
   20056             : 
   20057          92 : SWIGINTERN PyObject *_wrap_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20058          92 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20059          92 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20060          92 :   double arg2 ;
   20061          92 :   void *argp1 = 0 ;
   20062          92 :   int res1 = 0 ;
   20063          92 :   double val2 ;
   20064          92 :   int ecode2 = 0 ;
   20065          92 :   PyObject *swig_obj[2] ;
   20066             :   
   20067          92 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPY_set", 2, 2, swig_obj)) SWIG_fail;
   20068          92 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20069          92 :   if (!SWIG_IsOK(res1)) {
   20070           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20071             :   }
   20072          92 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20073          92 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20074          92 :   if (!SWIG_IsOK(ecode2)) {
   20075           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
   20076             :   } 
   20077          92 :   arg2 = static_cast< double >(val2);
   20078          92 :   {
   20079          92 :     const int bLocalUseExceptions = GetUseExceptions();
   20080          92 :     if ( bLocalUseExceptions ) {
   20081          91 :       pushErrorHandler();
   20082             :     }
   20083          92 :     {
   20084          92 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20085          92 :       GDAL_GCP_GCPY_set(arg1,arg2);
   20086          92 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20087             :     }
   20088          92 :     if ( bLocalUseExceptions ) {
   20089          91 :       popErrorHandler();
   20090             :     }
   20091             : #ifndef SED_HACKS
   20092             :     if ( bLocalUseExceptions ) {
   20093             :       CPLErr eclass = CPLGetLastErrorType();
   20094             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20095             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20096             :       }
   20097             :     }
   20098             : #endif
   20099             :   }
   20100          92 :   resultobj = SWIG_Py_Void();
   20101          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; } }
   20102             :   return resultobj;
   20103             : fail:
   20104             :   return NULL;
   20105             : }
   20106             : 
   20107             : 
   20108        2205 : SWIGINTERN PyObject *_wrap_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20109        2205 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20110        2205 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20111        2205 :   void *argp1 = 0 ;
   20112        2205 :   int res1 = 0 ;
   20113        2205 :   PyObject *swig_obj[1] ;
   20114        2205 :   double result;
   20115             :   
   20116        2205 :   if (!args) SWIG_fail;
   20117        2205 :   swig_obj[0] = args;
   20118        2205 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20119        2205 :   if (!SWIG_IsOK(res1)) {
   20120           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20121             :   }
   20122        2205 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20123        2205 :   {
   20124        2205 :     const int bLocalUseExceptions = GetUseExceptions();
   20125        2205 :     if ( bLocalUseExceptions ) {
   20126        2182 :       pushErrorHandler();
   20127             :     }
   20128        2205 :     {
   20129        2205 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20130        2205 :       result = (double)GDAL_GCP_GCPY_get(arg1);
   20131        2205 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20132             :     }
   20133        2205 :     if ( bLocalUseExceptions ) {
   20134        2182 :       popErrorHandler();
   20135             :     }
   20136             : #ifndef SED_HACKS
   20137             :     if ( bLocalUseExceptions ) {
   20138             :       CPLErr eclass = CPLGetLastErrorType();
   20139             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20140             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20141             :       }
   20142             :     }
   20143             : #endif
   20144             :   }
   20145        2205 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20146        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; } }
   20147             :   return resultobj;
   20148             : fail:
   20149             :   return NULL;
   20150             : }
   20151             : 
   20152             : 
   20153           0 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20154           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20155           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20156           0 :   double arg2 ;
   20157           0 :   void *argp1 = 0 ;
   20158           0 :   int res1 = 0 ;
   20159           0 :   double val2 ;
   20160           0 :   int ecode2 = 0 ;
   20161           0 :   PyObject *swig_obj[2] ;
   20162             :   
   20163           0 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPZ_set", 2, 2, swig_obj)) SWIG_fail;
   20164           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20165           0 :   if (!SWIG_IsOK(res1)) {
   20166           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20167             :   }
   20168           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20169           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20170           0 :   if (!SWIG_IsOK(ecode2)) {
   20171           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
   20172             :   } 
   20173           0 :   arg2 = static_cast< double >(val2);
   20174           0 :   {
   20175           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20176           0 :     if ( bLocalUseExceptions ) {
   20177           0 :       pushErrorHandler();
   20178             :     }
   20179           0 :     {
   20180           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20181           0 :       GDAL_GCP_GCPZ_set(arg1,arg2);
   20182           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20183             :     }
   20184           0 :     if ( bLocalUseExceptions ) {
   20185           0 :       popErrorHandler();
   20186             :     }
   20187             : #ifndef SED_HACKS
   20188             :     if ( bLocalUseExceptions ) {
   20189             :       CPLErr eclass = CPLGetLastErrorType();
   20190             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20191             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20192             :       }
   20193             :     }
   20194             : #endif
   20195             :   }
   20196           0 :   resultobj = SWIG_Py_Void();
   20197           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; } }
   20198             :   return resultobj;
   20199             : fail:
   20200             :   return NULL;
   20201             : }
   20202             : 
   20203             : 
   20204          42 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20205          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20206          42 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20207          42 :   void *argp1 = 0 ;
   20208          42 :   int res1 = 0 ;
   20209          42 :   PyObject *swig_obj[1] ;
   20210          42 :   double result;
   20211             :   
   20212          42 :   if (!args) SWIG_fail;
   20213          42 :   swig_obj[0] = args;
   20214          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20215          42 :   if (!SWIG_IsOK(res1)) {
   20216           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20217             :   }
   20218          42 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20219          42 :   {
   20220          42 :     const int bLocalUseExceptions = GetUseExceptions();
   20221          42 :     if ( bLocalUseExceptions ) {
   20222          29 :       pushErrorHandler();
   20223             :     }
   20224          42 :     {
   20225          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20226          42 :       result = (double)GDAL_GCP_GCPZ_get(arg1);
   20227          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20228             :     }
   20229          42 :     if ( bLocalUseExceptions ) {
   20230          29 :       popErrorHandler();
   20231             :     }
   20232             : #ifndef SED_HACKS
   20233             :     if ( bLocalUseExceptions ) {
   20234             :       CPLErr eclass = CPLGetLastErrorType();
   20235             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20236             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20237             :       }
   20238             :     }
   20239             : #endif
   20240             :   }
   20241          42 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20242          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; } }
   20243             :   return resultobj;
   20244             : fail:
   20245             :   return NULL;
   20246             : }
   20247             : 
   20248             : 
   20249         100 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20250         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20251         100 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20252         100 :   double arg2 ;
   20253         100 :   void *argp1 = 0 ;
   20254         100 :   int res1 = 0 ;
   20255         100 :   double val2 ;
   20256         100 :   int ecode2 = 0 ;
   20257         100 :   PyObject *swig_obj[2] ;
   20258             :   
   20259         100 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPPixel_set", 2, 2, swig_obj)) SWIG_fail;
   20260         100 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20261         100 :   if (!SWIG_IsOK(res1)) {
   20262           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20263             :   }
   20264         100 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20265         100 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20266         100 :   if (!SWIG_IsOK(ecode2)) {
   20267           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
   20268             :   } 
   20269         100 :   arg2 = static_cast< double >(val2);
   20270         100 :   {
   20271         100 :     const int bLocalUseExceptions = GetUseExceptions();
   20272         100 :     if ( bLocalUseExceptions ) {
   20273          99 :       pushErrorHandler();
   20274             :     }
   20275         100 :     {
   20276         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20277         100 :       GDAL_GCP_GCPPixel_set(arg1,arg2);
   20278         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20279             :     }
   20280         100 :     if ( bLocalUseExceptions ) {
   20281          99 :       popErrorHandler();
   20282             :     }
   20283             : #ifndef SED_HACKS
   20284             :     if ( bLocalUseExceptions ) {
   20285             :       CPLErr eclass = CPLGetLastErrorType();
   20286             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20287             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20288             :       }
   20289             :     }
   20290             : #endif
   20291             :   }
   20292         100 :   resultobj = SWIG_Py_Void();
   20293         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; } }
   20294             :   return resultobj;
   20295             : fail:
   20296             :   return NULL;
   20297             : }
   20298             : 
   20299             : 
   20300        8554 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20301        8554 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20302        8554 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20303        8554 :   void *argp1 = 0 ;
   20304        8554 :   int res1 = 0 ;
   20305        8554 :   PyObject *swig_obj[1] ;
   20306        8554 :   double result;
   20307             :   
   20308        8554 :   if (!args) SWIG_fail;
   20309        8554 :   swig_obj[0] = args;
   20310        8554 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20311        8554 :   if (!SWIG_IsOK(res1)) {
   20312           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20313             :   }
   20314        8554 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20315        8554 :   {
   20316        8554 :     const int bLocalUseExceptions = GetUseExceptions();
   20317        8554 :     if ( bLocalUseExceptions ) {
   20318        8531 :       pushErrorHandler();
   20319             :     }
   20320        8554 :     {
   20321        8554 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20322        8554 :       result = (double)GDAL_GCP_GCPPixel_get(arg1);
   20323        8554 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20324             :     }
   20325        8554 :     if ( bLocalUseExceptions ) {
   20326        8531 :       popErrorHandler();
   20327             :     }
   20328             : #ifndef SED_HACKS
   20329             :     if ( bLocalUseExceptions ) {
   20330             :       CPLErr eclass = CPLGetLastErrorType();
   20331             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20332             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20333             :       }
   20334             :     }
   20335             : #endif
   20336             :   }
   20337        8554 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20338        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; } }
   20339             :   return resultobj;
   20340             : fail:
   20341             :   return NULL;
   20342             : }
   20343             : 
   20344             : 
   20345         100 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20346         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20347         100 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20348         100 :   double arg2 ;
   20349         100 :   void *argp1 = 0 ;
   20350         100 :   int res1 = 0 ;
   20351         100 :   double val2 ;
   20352         100 :   int ecode2 = 0 ;
   20353         100 :   PyObject *swig_obj[2] ;
   20354             :   
   20355         100 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPLine_set", 2, 2, swig_obj)) SWIG_fail;
   20356         100 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20357         100 :   if (!SWIG_IsOK(res1)) {
   20358           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20359             :   }
   20360         100 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20361         100 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20362         100 :   if (!SWIG_IsOK(ecode2)) {
   20363           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
   20364             :   } 
   20365         100 :   arg2 = static_cast< double >(val2);
   20366         100 :   {
   20367         100 :     const int bLocalUseExceptions = GetUseExceptions();
   20368         100 :     if ( bLocalUseExceptions ) {
   20369          99 :       pushErrorHandler();
   20370             :     }
   20371         100 :     {
   20372         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20373         100 :       GDAL_GCP_GCPLine_set(arg1,arg2);
   20374         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20375             :     }
   20376         100 :     if ( bLocalUseExceptions ) {
   20377          99 :       popErrorHandler();
   20378             :     }
   20379             : #ifndef SED_HACKS
   20380             :     if ( bLocalUseExceptions ) {
   20381             :       CPLErr eclass = CPLGetLastErrorType();
   20382             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20383             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20384             :       }
   20385             :     }
   20386             : #endif
   20387             :   }
   20388         100 :   resultobj = SWIG_Py_Void();
   20389         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; } }
   20390             :   return resultobj;
   20391             : fail:
   20392             :   return NULL;
   20393             : }
   20394             : 
   20395             : 
   20396        8554 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20397        8554 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20398        8554 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20399        8554 :   void *argp1 = 0 ;
   20400        8554 :   int res1 = 0 ;
   20401        8554 :   PyObject *swig_obj[1] ;
   20402        8554 :   double result;
   20403             :   
   20404        8554 :   if (!args) SWIG_fail;
   20405        8554 :   swig_obj[0] = args;
   20406        8554 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20407        8554 :   if (!SWIG_IsOK(res1)) {
   20408           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20409             :   }
   20410        8554 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20411        8554 :   {
   20412        8554 :     const int bLocalUseExceptions = GetUseExceptions();
   20413        8554 :     if ( bLocalUseExceptions ) {
   20414        8531 :       pushErrorHandler();
   20415             :     }
   20416        8554 :     {
   20417        8554 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20418        8554 :       result = (double)GDAL_GCP_GCPLine_get(arg1);
   20419        8554 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20420             :     }
   20421        8554 :     if ( bLocalUseExceptions ) {
   20422        8531 :       popErrorHandler();
   20423             :     }
   20424             : #ifndef SED_HACKS
   20425             :     if ( bLocalUseExceptions ) {
   20426             :       CPLErr eclass = CPLGetLastErrorType();
   20427             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20428             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20429             :       }
   20430             :     }
   20431             : #endif
   20432             :   }
   20433        8554 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20434        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; } }
   20435             :   return resultobj;
   20436             : fail:
   20437             :   return NULL;
   20438             : }
   20439             : 
   20440             : 
   20441           1 : SWIGINTERN PyObject *_wrap_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20442           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20443           1 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20444           1 :   char *arg2 = (char *) 0 ;
   20445           1 :   void *argp1 = 0 ;
   20446           1 :   int res1 = 0 ;
   20447           1 :   int res2 ;
   20448           1 :   char *buf2 = 0 ;
   20449           1 :   int alloc2 = 0 ;
   20450           1 :   PyObject *swig_obj[2] ;
   20451             :   
   20452           1 :   if (!SWIG_Python_UnpackTuple(args, "GCP_Info_set", 2, 2, swig_obj)) SWIG_fail;
   20453           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20454           1 :   if (!SWIG_IsOK(res1)) {
   20455           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20456             :   }
   20457           1 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20458           1 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   20459           1 :   if (!SWIG_IsOK(res2)) {
   20460           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Info_set" "', argument " "2"" of type '" "char *""'");
   20461             :   }
   20462           1 :   arg2 = reinterpret_cast< char * >(buf2);
   20463           1 :   {
   20464           1 :     const int bLocalUseExceptions = GetUseExceptions();
   20465           1 :     if ( bLocalUseExceptions ) {
   20466           1 :       pushErrorHandler();
   20467             :     }
   20468           1 :     {
   20469           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20470           1 :       GDAL_GCP_Info_set(arg1,arg2);
   20471           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20472             :     }
   20473           1 :     if ( bLocalUseExceptions ) {
   20474           1 :       popErrorHandler();
   20475             :     }
   20476             : #ifndef SED_HACKS
   20477             :     if ( bLocalUseExceptions ) {
   20478             :       CPLErr eclass = CPLGetLastErrorType();
   20479             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20480             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20481             :       }
   20482             :     }
   20483             : #endif
   20484             :   }
   20485           1 :   resultobj = SWIG_Py_Void();
   20486           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20487           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; } }
   20488             :   return resultobj;
   20489           0 : fail:
   20490           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20491             :   return NULL;
   20492             : }
   20493             : 
   20494             : 
   20495           9 : SWIGINTERN PyObject *_wrap_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20496           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20497           9 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20498           9 :   void *argp1 = 0 ;
   20499           9 :   int res1 = 0 ;
   20500           9 :   PyObject *swig_obj[1] ;
   20501           9 :   char *result = 0 ;
   20502             :   
   20503           9 :   if (!args) SWIG_fail;
   20504           9 :   swig_obj[0] = args;
   20505           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20506           9 :   if (!SWIG_IsOK(res1)) {
   20507           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20508             :   }
   20509           9 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20510           9 :   {
   20511           9 :     const int bLocalUseExceptions = GetUseExceptions();
   20512           9 :     if ( bLocalUseExceptions ) {
   20513           5 :       pushErrorHandler();
   20514             :     }
   20515           9 :     {
   20516           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20517           9 :       result = (char *)GDAL_GCP_Info_get(arg1);
   20518           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20519             :     }
   20520           9 :     if ( bLocalUseExceptions ) {
   20521           5 :       popErrorHandler();
   20522             :     }
   20523             : #ifndef SED_HACKS
   20524             :     if ( bLocalUseExceptions ) {
   20525             :       CPLErr eclass = CPLGetLastErrorType();
   20526             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20527             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20528             :       }
   20529             :     }
   20530             : #endif
   20531             :   }
   20532           9 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20533           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; } }
   20534             :   return resultobj;
   20535             : fail:
   20536             :   return NULL;
   20537             : }
   20538             : 
   20539             : 
   20540           1 : SWIGINTERN PyObject *_wrap_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20541           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20542           1 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20543           1 :   char *arg2 = (char *) 0 ;
   20544           1 :   void *argp1 = 0 ;
   20545           1 :   int res1 = 0 ;
   20546           1 :   int res2 ;
   20547           1 :   char *buf2 = 0 ;
   20548           1 :   int alloc2 = 0 ;
   20549           1 :   PyObject *swig_obj[2] ;
   20550             :   
   20551           1 :   if (!SWIG_Python_UnpackTuple(args, "GCP_Id_set", 2, 2, swig_obj)) SWIG_fail;
   20552           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20553           1 :   if (!SWIG_IsOK(res1)) {
   20554           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20555             :   }
   20556           1 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20557           1 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   20558           1 :   if (!SWIG_IsOK(res2)) {
   20559           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Id_set" "', argument " "2"" of type '" "char *""'");
   20560             :   }
   20561           1 :   arg2 = reinterpret_cast< char * >(buf2);
   20562           1 :   {
   20563           1 :     const int bLocalUseExceptions = GetUseExceptions();
   20564           1 :     if ( bLocalUseExceptions ) {
   20565           1 :       pushErrorHandler();
   20566             :     }
   20567           1 :     {
   20568           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20569           1 :       GDAL_GCP_Id_set(arg1,arg2);
   20570           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20571             :     }
   20572           1 :     if ( bLocalUseExceptions ) {
   20573           1 :       popErrorHandler();
   20574             :     }
   20575             : #ifndef SED_HACKS
   20576             :     if ( bLocalUseExceptions ) {
   20577             :       CPLErr eclass = CPLGetLastErrorType();
   20578             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20579             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20580             :       }
   20581             :     }
   20582             : #endif
   20583             :   }
   20584           1 :   resultobj = SWIG_Py_Void();
   20585           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20586           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; } }
   20587             :   return resultobj;
   20588           0 : fail:
   20589           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20590             :   return NULL;
   20591             : }
   20592             : 
   20593             : 
   20594           9 : SWIGINTERN PyObject *_wrap_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20595           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20596           9 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20597           9 :   void *argp1 = 0 ;
   20598           9 :   int res1 = 0 ;
   20599           9 :   PyObject *swig_obj[1] ;
   20600           9 :   char *result = 0 ;
   20601             :   
   20602           9 :   if (!args) SWIG_fail;
   20603           9 :   swig_obj[0] = args;
   20604           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20605           9 :   if (!SWIG_IsOK(res1)) {
   20606           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20607             :   }
   20608           9 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20609           9 :   {
   20610           9 :     const int bLocalUseExceptions = GetUseExceptions();
   20611           9 :     if ( bLocalUseExceptions ) {
   20612           5 :       pushErrorHandler();
   20613             :     }
   20614           9 :     {
   20615           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20616           9 :       result = (char *)GDAL_GCP_Id_get(arg1);
   20617           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20618             :     }
   20619           9 :     if ( bLocalUseExceptions ) {
   20620           5 :       popErrorHandler();
   20621             :     }
   20622             : #ifndef SED_HACKS
   20623             :     if ( bLocalUseExceptions ) {
   20624             :       CPLErr eclass = CPLGetLastErrorType();
   20625             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20626             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20627             :       }
   20628             :     }
   20629             : #endif
   20630             :   }
   20631           9 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20632           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; } }
   20633             :   return resultobj;
   20634             : fail:
   20635             :   return NULL;
   20636             : }
   20637             : 
   20638             : 
   20639         130 : SWIGINTERN PyObject *_wrap_new_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20640         130 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20641         130 :   double arg1 = (double) 0.0 ;
   20642         130 :   double arg2 = (double) 0.0 ;
   20643         130 :   double arg3 = (double) 0.0 ;
   20644         130 :   double arg4 = (double) 0.0 ;
   20645         130 :   double arg5 = (double) 0.0 ;
   20646         130 :   char *arg6 = (char *) "" ;
   20647         130 :   char *arg7 = (char *) "" ;
   20648         130 :   double val1 ;
   20649         130 :   int ecode1 = 0 ;
   20650         130 :   double val2 ;
   20651         130 :   int ecode2 = 0 ;
   20652         130 :   double val3 ;
   20653         130 :   int ecode3 = 0 ;
   20654         130 :   double val4 ;
   20655         130 :   int ecode4 = 0 ;
   20656         130 :   double val5 ;
   20657         130 :   int ecode5 = 0 ;
   20658         130 :   int res6 ;
   20659         130 :   char *buf6 = 0 ;
   20660         130 :   int alloc6 = 0 ;
   20661         130 :   int res7 ;
   20662         130 :   char *buf7 = 0 ;
   20663         130 :   int alloc7 = 0 ;
   20664         130 :   PyObject *swig_obj[7] ;
   20665         130 :   GDAL_GCP *result = 0 ;
   20666             :   
   20667         130 :   if (!SWIG_Python_UnpackTuple(args, "new_GCP", 0, 7, swig_obj)) SWIG_fail;
   20668         130 :   if (swig_obj[0]) {
   20669          38 :     ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   20670          38 :     if (!SWIG_IsOK(ecode1)) {
   20671           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GCP" "', argument " "1"" of type '" "double""'");
   20672             :     } 
   20673          38 :     arg1 = static_cast< double >(val1);
   20674             :   }
   20675         130 :   if (swig_obj[1]) {
   20676          38 :     ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20677          38 :     if (!SWIG_IsOK(ecode2)) {
   20678           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GCP" "', argument " "2"" of type '" "double""'");
   20679             :     } 
   20680          38 :     arg2 = static_cast< double >(val2);
   20681             :   }
   20682         130 :   if (swig_obj[2]) {
   20683          38 :     ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   20684          38 :     if (!SWIG_IsOK(ecode3)) {
   20685           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GCP" "', argument " "3"" of type '" "double""'");
   20686             :     } 
   20687          38 :     arg3 = static_cast< double >(val3);
   20688             :   }
   20689         130 :   if (swig_obj[3]) {
   20690          38 :     ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   20691          38 :     if (!SWIG_IsOK(ecode4)) {
   20692           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GCP" "', argument " "4"" of type '" "double""'");
   20693             :     } 
   20694          38 :     arg4 = static_cast< double >(val4);
   20695             :   }
   20696         130 :   if (swig_obj[4]) {
   20697          38 :     ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   20698          38 :     if (!SWIG_IsOK(ecode5)) {
   20699           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GCP" "', argument " "5"" of type '" "double""'");
   20700             :     } 
   20701          38 :     arg5 = static_cast< double >(val5);
   20702             :   }
   20703         130 :   if (swig_obj[5]) {
   20704           0 :     res6 = SWIG_AsCharPtrAndSize(swig_obj[5], &buf6, NULL, &alloc6);
   20705           0 :     if (!SWIG_IsOK(res6)) {
   20706           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_GCP" "', argument " "6"" of type '" "char const *""'");
   20707             :     }
   20708           0 :     arg6 = reinterpret_cast< char * >(buf6);
   20709             :   }
   20710         130 :   if (swig_obj[6]) {
   20711           0 :     res7 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf7, NULL, &alloc7);
   20712           0 :     if (!SWIG_IsOK(res7)) {
   20713           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_GCP" "', argument " "7"" of type '" "char const *""'");
   20714             :     }
   20715           0 :     arg7 = reinterpret_cast< char * >(buf7);
   20716             :   }
   20717         130 :   {
   20718         130 :     const int bLocalUseExceptions = GetUseExceptions();
   20719         130 :     if ( bLocalUseExceptions ) {
   20720         119 :       pushErrorHandler();
   20721             :     }
   20722         130 :     {
   20723         130 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20724         130 :       result = (GDAL_GCP *)new_GDAL_GCP(arg1,arg2,arg3,arg4,arg5,(char const *)arg6,(char const *)arg7);
   20725         130 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20726             :     }
   20727         130 :     if ( bLocalUseExceptions ) {
   20728         119 :       popErrorHandler();
   20729             :     }
   20730             : #ifndef SED_HACKS
   20731             :     if ( bLocalUseExceptions ) {
   20732             :       CPLErr eclass = CPLGetLastErrorType();
   20733             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20734             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20735             :       }
   20736             :     }
   20737             : #endif
   20738             :   }
   20739         130 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_NEW |  0 );
   20740         130 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
   20741         130 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
   20742         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; } }
   20743             :   return resultobj;
   20744           0 : fail:
   20745           0 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
   20746           0 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
   20747             :   return NULL;
   20748             : }
   20749             : 
   20750             : 
   20751        3428 : SWIGINTERN PyObject *_wrap_delete_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20752        3428 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20753        3428 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20754        3428 :   void *argp1 = 0 ;
   20755        3428 :   int res1 = 0 ;
   20756        3428 :   PyObject *swig_obj[1] ;
   20757             :   
   20758        3428 :   if (!args) SWIG_fail;
   20759        3428 :   swig_obj[0] = args;
   20760        3428 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_DISOWN |  0 );
   20761        3428 :   if (!SWIG_IsOK(res1)) {
   20762           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GCP" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20763             :   }
   20764        3428 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20765        3428 :   {
   20766        3428 :     const int bLocalUseExceptions = GetUseExceptions();
   20767        3428 :     if ( bLocalUseExceptions ) {
   20768        3337 :       pushErrorHandler();
   20769             :     }
   20770        3428 :     {
   20771        3428 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20772        3428 :       delete_GDAL_GCP(arg1);
   20773        3428 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20774             :     }
   20775        3428 :     if ( bLocalUseExceptions ) {
   20776        3337 :       popErrorHandler();
   20777             :     }
   20778             : #ifndef SED_HACKS
   20779             :     if ( bLocalUseExceptions ) {
   20780             :       CPLErr eclass = CPLGetLastErrorType();
   20781             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20782             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20783             :       }
   20784             :     }
   20785             : #endif
   20786             :   }
   20787        3428 :   resultobj = SWIG_Py_Void();
   20788        3428 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20789             :   return resultobj;
   20790             : fail:
   20791             :   return NULL;
   20792             : }
   20793             : 
   20794             : 
   20795         277 : SWIGINTERN PyObject *GCP_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20796         277 :   PyObject *obj;
   20797         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   20798         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDAL_GCP, SWIG_NewClientData(obj));
   20799         277 :   return SWIG_Py_Void();
   20800             : }
   20801             : 
   20802         130 : SWIGINTERN PyObject *GCP_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20803         130 :   return SWIG_Python_InitShadowInstance(args);
   20804             : }
   20805             : 
   20806           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20807           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20808           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20809           0 :   void *argp1 = 0 ;
   20810           0 :   int res1 = 0 ;
   20811           0 :   PyObject *swig_obj[1] ;
   20812           0 :   double result;
   20813             :   
   20814           0 :   if (!args) SWIG_fail;
   20815           0 :   swig_obj[0] = args;
   20816           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20817           0 :   if (!SWIG_IsOK(res1)) {
   20818           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20819             :   }
   20820           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20821           0 :   {
   20822           0 :     if (!arg1) {
   20823           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20824             :     }
   20825             :   }
   20826           0 :   {
   20827           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20828           0 :     if ( bLocalUseExceptions ) {
   20829           0 :       pushErrorHandler();
   20830             :     }
   20831           0 :     {
   20832           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20833           0 :       result = (double)GDAL_GCP_GCPX_get(arg1);
   20834           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20835             :     }
   20836           0 :     if ( bLocalUseExceptions ) {
   20837           0 :       popErrorHandler();
   20838             :     }
   20839             : #ifndef SED_HACKS
   20840             :     if ( bLocalUseExceptions ) {
   20841             :       CPLErr eclass = CPLGetLastErrorType();
   20842             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20843             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20844             :       }
   20845             :     }
   20846             : #endif
   20847             :   }
   20848           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20849           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; } }
   20850             :   return resultobj;
   20851             : fail:
   20852             :   return NULL;
   20853             : }
   20854             : 
   20855             : 
   20856           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20857           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20858           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20859           0 :   double arg2 ;
   20860           0 :   void *argp1 = 0 ;
   20861           0 :   int res1 = 0 ;
   20862           0 :   double val2 ;
   20863           0 :   int ecode2 = 0 ;
   20864           0 :   PyObject *swig_obj[2] ;
   20865             :   
   20866           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPX_set", 2, 2, swig_obj)) SWIG_fail;
   20867           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20868           0 :   if (!SWIG_IsOK(res1)) {
   20869           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20870             :   }
   20871           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20872           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20873           0 :   if (!SWIG_IsOK(ecode2)) {
   20874           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
   20875             :   } 
   20876           0 :   arg2 = static_cast< double >(val2);
   20877           0 :   {
   20878           0 :     if (!arg1) {
   20879           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20880             :     }
   20881             :   }
   20882           0 :   {
   20883           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20884           0 :     if ( bLocalUseExceptions ) {
   20885           0 :       pushErrorHandler();
   20886             :     }
   20887           0 :     {
   20888           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20889           0 :       GDAL_GCP_GCPX_set(arg1,arg2);
   20890           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20891             :     }
   20892           0 :     if ( bLocalUseExceptions ) {
   20893           0 :       popErrorHandler();
   20894             :     }
   20895             : #ifndef SED_HACKS
   20896             :     if ( bLocalUseExceptions ) {
   20897             :       CPLErr eclass = CPLGetLastErrorType();
   20898             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20899             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20900             :       }
   20901             :     }
   20902             : #endif
   20903             :   }
   20904           0 :   resultobj = SWIG_Py_Void();
   20905           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; } }
   20906             :   return resultobj;
   20907             : fail:
   20908             :   return NULL;
   20909             : }
   20910             : 
   20911             : 
   20912           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20913           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20914           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20915           0 :   void *argp1 = 0 ;
   20916           0 :   int res1 = 0 ;
   20917           0 :   PyObject *swig_obj[1] ;
   20918           0 :   double result;
   20919             :   
   20920           0 :   if (!args) SWIG_fail;
   20921           0 :   swig_obj[0] = args;
   20922           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20923           0 :   if (!SWIG_IsOK(res1)) {
   20924           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20925             :   }
   20926           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20927           0 :   {
   20928           0 :     if (!arg1) {
   20929           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20930             :     }
   20931             :   }
   20932           0 :   {
   20933           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20934           0 :     if ( bLocalUseExceptions ) {
   20935           0 :       pushErrorHandler();
   20936             :     }
   20937           0 :     {
   20938           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20939           0 :       result = (double)GDAL_GCP_GCPY_get(arg1);
   20940           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20941             :     }
   20942           0 :     if ( bLocalUseExceptions ) {
   20943           0 :       popErrorHandler();
   20944             :     }
   20945             : #ifndef SED_HACKS
   20946             :     if ( bLocalUseExceptions ) {
   20947             :       CPLErr eclass = CPLGetLastErrorType();
   20948             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20949             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20950             :       }
   20951             :     }
   20952             : #endif
   20953             :   }
   20954           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20955           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; } }
   20956             :   return resultobj;
   20957             : fail:
   20958             :   return NULL;
   20959             : }
   20960             : 
   20961             : 
   20962           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20963           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20964           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20965           0 :   double arg2 ;
   20966           0 :   void *argp1 = 0 ;
   20967           0 :   int res1 = 0 ;
   20968           0 :   double val2 ;
   20969           0 :   int ecode2 = 0 ;
   20970           0 :   PyObject *swig_obj[2] ;
   20971             :   
   20972           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPY_set", 2, 2, swig_obj)) SWIG_fail;
   20973           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20974           0 :   if (!SWIG_IsOK(res1)) {
   20975           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20976             :   }
   20977           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20978           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20979           0 :   if (!SWIG_IsOK(ecode2)) {
   20980           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
   20981             :   } 
   20982           0 :   arg2 = static_cast< double >(val2);
   20983           0 :   {
   20984           0 :     if (!arg1) {
   20985           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20986             :     }
   20987             :   }
   20988           0 :   {
   20989           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20990           0 :     if ( bLocalUseExceptions ) {
   20991           0 :       pushErrorHandler();
   20992             :     }
   20993           0 :     {
   20994           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20995           0 :       GDAL_GCP_GCPY_set(arg1,arg2);
   20996           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20997             :     }
   20998           0 :     if ( bLocalUseExceptions ) {
   20999           0 :       popErrorHandler();
   21000             :     }
   21001             : #ifndef SED_HACKS
   21002             :     if ( bLocalUseExceptions ) {
   21003             :       CPLErr eclass = CPLGetLastErrorType();
   21004             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21005             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21006             :       }
   21007             :     }
   21008             : #endif
   21009             :   }
   21010           0 :   resultobj = SWIG_Py_Void();
   21011           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; } }
   21012             :   return resultobj;
   21013             : fail:
   21014             :   return NULL;
   21015             : }
   21016             : 
   21017             : 
   21018           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21019           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21020           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21021           0 :   void *argp1 = 0 ;
   21022           0 :   int res1 = 0 ;
   21023           0 :   PyObject *swig_obj[1] ;
   21024           0 :   double result;
   21025             :   
   21026           0 :   if (!args) SWIG_fail;
   21027           0 :   swig_obj[0] = args;
   21028           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21029           0 :   if (!SWIG_IsOK(res1)) {
   21030           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21031             :   }
   21032           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21033           0 :   {
   21034           0 :     if (!arg1) {
   21035           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21036             :     }
   21037             :   }
   21038           0 :   {
   21039           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21040           0 :     if ( bLocalUseExceptions ) {
   21041           0 :       pushErrorHandler();
   21042             :     }
   21043           0 :     {
   21044           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21045           0 :       result = (double)GDAL_GCP_GCPZ_get(arg1);
   21046           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21047             :     }
   21048           0 :     if ( bLocalUseExceptions ) {
   21049           0 :       popErrorHandler();
   21050             :     }
   21051             : #ifndef SED_HACKS
   21052             :     if ( bLocalUseExceptions ) {
   21053             :       CPLErr eclass = CPLGetLastErrorType();
   21054             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21055             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21056             :       }
   21057             :     }
   21058             : #endif
   21059             :   }
   21060           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   21061           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; } }
   21062             :   return resultobj;
   21063             : fail:
   21064             :   return NULL;
   21065             : }
   21066             : 
   21067             : 
   21068           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21069           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21070           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21071           0 :   double arg2 ;
   21072           0 :   void *argp1 = 0 ;
   21073           0 :   int res1 = 0 ;
   21074           0 :   double val2 ;
   21075           0 :   int ecode2 = 0 ;
   21076           0 :   PyObject *swig_obj[2] ;
   21077             :   
   21078           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPZ_set", 2, 2, swig_obj)) SWIG_fail;
   21079           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21080           0 :   if (!SWIG_IsOK(res1)) {
   21081           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21082             :   }
   21083           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21084           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   21085           0 :   if (!SWIG_IsOK(ecode2)) {
   21086           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
   21087             :   } 
   21088           0 :   arg2 = static_cast< double >(val2);
   21089           0 :   {
   21090           0 :     if (!arg1) {
   21091           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21092             :     }
   21093             :   }
   21094           0 :   {
   21095           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21096           0 :     if ( bLocalUseExceptions ) {
   21097           0 :       pushErrorHandler();
   21098             :     }
   21099           0 :     {
   21100           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21101           0 :       GDAL_GCP_GCPZ_set(arg1,arg2);
   21102           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21103             :     }
   21104           0 :     if ( bLocalUseExceptions ) {
   21105           0 :       popErrorHandler();
   21106             :     }
   21107             : #ifndef SED_HACKS
   21108             :     if ( bLocalUseExceptions ) {
   21109             :       CPLErr eclass = CPLGetLastErrorType();
   21110             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21111             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21112             :       }
   21113             :     }
   21114             : #endif
   21115             :   }
   21116           0 :   resultobj = SWIG_Py_Void();
   21117           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; } }
   21118             :   return resultobj;
   21119             : fail:
   21120             :   return NULL;
   21121             : }
   21122             : 
   21123             : 
   21124           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21125           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21126           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21127           0 :   void *argp1 = 0 ;
   21128           0 :   int res1 = 0 ;
   21129           0 :   PyObject *swig_obj[1] ;
   21130           0 :   double result;
   21131             :   
   21132           0 :   if (!args) SWIG_fail;
   21133           0 :   swig_obj[0] = args;
   21134           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21135           0 :   if (!SWIG_IsOK(res1)) {
   21136           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21137             :   }
   21138           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21139           0 :   {
   21140           0 :     if (!arg1) {
   21141           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21142             :     }
   21143             :   }
   21144           0 :   {
   21145           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21146           0 :     if ( bLocalUseExceptions ) {
   21147           0 :       pushErrorHandler();
   21148             :     }
   21149           0 :     {
   21150           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21151           0 :       result = (double)GDAL_GCP_GCPPixel_get(arg1);
   21152           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21153             :     }
   21154           0 :     if ( bLocalUseExceptions ) {
   21155           0 :       popErrorHandler();
   21156             :     }
   21157             : #ifndef SED_HACKS
   21158             :     if ( bLocalUseExceptions ) {
   21159             :       CPLErr eclass = CPLGetLastErrorType();
   21160             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21161             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21162             :       }
   21163             :     }
   21164             : #endif
   21165             :   }
   21166           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   21167           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; } }
   21168             :   return resultobj;
   21169             : fail:
   21170             :   return NULL;
   21171             : }
   21172             : 
   21173             : 
   21174           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21175           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21176           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21177           0 :   double arg2 ;
   21178           0 :   void *argp1 = 0 ;
   21179           0 :   int res1 = 0 ;
   21180           0 :   double val2 ;
   21181           0 :   int ecode2 = 0 ;
   21182           0 :   PyObject *swig_obj[2] ;
   21183             :   
   21184           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPPixel_set", 2, 2, swig_obj)) SWIG_fail;
   21185           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21186           0 :   if (!SWIG_IsOK(res1)) {
   21187           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21188             :   }
   21189           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21190           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   21191           0 :   if (!SWIG_IsOK(ecode2)) {
   21192           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
   21193             :   } 
   21194           0 :   arg2 = static_cast< double >(val2);
   21195           0 :   {
   21196           0 :     if (!arg1) {
   21197           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21198             :     }
   21199             :   }
   21200           0 :   {
   21201           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21202           0 :     if ( bLocalUseExceptions ) {
   21203           0 :       pushErrorHandler();
   21204             :     }
   21205           0 :     {
   21206           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21207           0 :       GDAL_GCP_GCPPixel_set(arg1,arg2);
   21208           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21209             :     }
   21210           0 :     if ( bLocalUseExceptions ) {
   21211           0 :       popErrorHandler();
   21212             :     }
   21213             : #ifndef SED_HACKS
   21214             :     if ( bLocalUseExceptions ) {
   21215             :       CPLErr eclass = CPLGetLastErrorType();
   21216             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21217             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21218             :       }
   21219             :     }
   21220             : #endif
   21221             :   }
   21222           0 :   resultobj = SWIG_Py_Void();
   21223           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; } }
   21224             :   return resultobj;
   21225             : fail:
   21226             :   return NULL;
   21227             : }
   21228             : 
   21229             : 
   21230           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21231           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21232           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21233           0 :   void *argp1 = 0 ;
   21234           0 :   int res1 = 0 ;
   21235           0 :   PyObject *swig_obj[1] ;
   21236           0 :   double result;
   21237             :   
   21238           0 :   if (!args) SWIG_fail;
   21239           0 :   swig_obj[0] = args;
   21240           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21241           0 :   if (!SWIG_IsOK(res1)) {
   21242           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21243             :   }
   21244           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21245           0 :   {
   21246           0 :     if (!arg1) {
   21247           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21248             :     }
   21249             :   }
   21250           0 :   {
   21251           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21252           0 :     if ( bLocalUseExceptions ) {
   21253           0 :       pushErrorHandler();
   21254             :     }
   21255           0 :     {
   21256           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21257           0 :       result = (double)GDAL_GCP_GCPLine_get(arg1);
   21258           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21259             :     }
   21260           0 :     if ( bLocalUseExceptions ) {
   21261           0 :       popErrorHandler();
   21262             :     }
   21263             : #ifndef SED_HACKS
   21264             :     if ( bLocalUseExceptions ) {
   21265             :       CPLErr eclass = CPLGetLastErrorType();
   21266             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21267             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21268             :       }
   21269             :     }
   21270             : #endif
   21271             :   }
   21272           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   21273           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; } }
   21274             :   return resultobj;
   21275             : fail:
   21276             :   return NULL;
   21277             : }
   21278             : 
   21279             : 
   21280           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21281           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21282           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21283           0 :   double arg2 ;
   21284           0 :   void *argp1 = 0 ;
   21285           0 :   int res1 = 0 ;
   21286           0 :   double val2 ;
   21287           0 :   int ecode2 = 0 ;
   21288           0 :   PyObject *swig_obj[2] ;
   21289             :   
   21290           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPLine_set", 2, 2, swig_obj)) SWIG_fail;
   21291           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21292           0 :   if (!SWIG_IsOK(res1)) {
   21293           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21294             :   }
   21295           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21296           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   21297           0 :   if (!SWIG_IsOK(ecode2)) {
   21298           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
   21299             :   } 
   21300           0 :   arg2 = static_cast< double >(val2);
   21301           0 :   {
   21302           0 :     if (!arg1) {
   21303           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21304             :     }
   21305             :   }
   21306           0 :   {
   21307           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21308           0 :     if ( bLocalUseExceptions ) {
   21309           0 :       pushErrorHandler();
   21310             :     }
   21311           0 :     {
   21312           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21313           0 :       GDAL_GCP_GCPLine_set(arg1,arg2);
   21314           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21315             :     }
   21316           0 :     if ( bLocalUseExceptions ) {
   21317           0 :       popErrorHandler();
   21318             :     }
   21319             : #ifndef SED_HACKS
   21320             :     if ( bLocalUseExceptions ) {
   21321             :       CPLErr eclass = CPLGetLastErrorType();
   21322             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21323             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21324             :       }
   21325             :     }
   21326             : #endif
   21327             :   }
   21328           0 :   resultobj = SWIG_Py_Void();
   21329           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; } }
   21330             :   return resultobj;
   21331             : fail:
   21332             :   return NULL;
   21333             : }
   21334             : 
   21335             : 
   21336           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21337           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21338           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21339           0 :   void *argp1 = 0 ;
   21340           0 :   int res1 = 0 ;
   21341           0 :   PyObject *swig_obj[1] ;
   21342           0 :   char *result = 0 ;
   21343             :   
   21344           0 :   if (!args) SWIG_fail;
   21345           0 :   swig_obj[0] = args;
   21346           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21347           0 :   if (!SWIG_IsOK(res1)) {
   21348           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21349             :   }
   21350           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21351           0 :   {
   21352           0 :     if (!arg1) {
   21353           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21354             :     }
   21355             :   }
   21356           0 :   {
   21357           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21358           0 :     if ( bLocalUseExceptions ) {
   21359           0 :       pushErrorHandler();
   21360             :     }
   21361           0 :     {
   21362           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21363           0 :       result = (char *)GDAL_GCP_Info_get(arg1);
   21364           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21365             :     }
   21366           0 :     if ( bLocalUseExceptions ) {
   21367           0 :       popErrorHandler();
   21368             :     }
   21369             : #ifndef SED_HACKS
   21370             :     if ( bLocalUseExceptions ) {
   21371             :       CPLErr eclass = CPLGetLastErrorType();
   21372             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21373             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21374             :       }
   21375             :     }
   21376             : #endif
   21377             :   }
   21378           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   21379           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; } }
   21380             :   return resultobj;
   21381             : fail:
   21382             :   return NULL;
   21383             : }
   21384             : 
   21385             : 
   21386           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21387           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21388           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21389           0 :   char *arg2 = (char *) 0 ;
   21390           0 :   void *argp1 = 0 ;
   21391           0 :   int res1 = 0 ;
   21392           0 :   int res2 ;
   21393           0 :   char *buf2 = 0 ;
   21394           0 :   int alloc2 = 0 ;
   21395           0 :   PyObject *swig_obj[2] ;
   21396             :   
   21397           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_Info_set", 2, 2, swig_obj)) SWIG_fail;
   21398           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21399           0 :   if (!SWIG_IsOK(res1)) {
   21400           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21401             :   }
   21402           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21403           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   21404           0 :   if (!SWIG_IsOK(res2)) {
   21405           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Info_set" "', argument " "2"" of type '" "char const *""'");
   21406             :   }
   21407           0 :   arg2 = reinterpret_cast< char * >(buf2);
   21408           0 :   {
   21409           0 :     if (!arg1) {
   21410           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21411             :     }
   21412             :   }
   21413           0 :   {
   21414           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21415           0 :     if ( bLocalUseExceptions ) {
   21416           0 :       pushErrorHandler();
   21417             :     }
   21418           0 :     {
   21419           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21420           0 :       GDAL_GCP_Info_set(arg1,(char const *)arg2);
   21421           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21422             :     }
   21423           0 :     if ( bLocalUseExceptions ) {
   21424           0 :       popErrorHandler();
   21425             :     }
   21426             : #ifndef SED_HACKS
   21427             :     if ( bLocalUseExceptions ) {
   21428             :       CPLErr eclass = CPLGetLastErrorType();
   21429             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21430             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21431             :       }
   21432             :     }
   21433             : #endif
   21434             :   }
   21435           0 :   resultobj = SWIG_Py_Void();
   21436           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21437           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; } }
   21438             :   return resultobj;
   21439           0 : fail:
   21440           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21441             :   return NULL;
   21442             : }
   21443             : 
   21444             : 
   21445           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21446           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21447           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21448           0 :   void *argp1 = 0 ;
   21449           0 :   int res1 = 0 ;
   21450           0 :   PyObject *swig_obj[1] ;
   21451           0 :   char *result = 0 ;
   21452             :   
   21453           0 :   if (!args) SWIG_fail;
   21454           0 :   swig_obj[0] = args;
   21455           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21456           0 :   if (!SWIG_IsOK(res1)) {
   21457           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21458             :   }
   21459           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21460           0 :   {
   21461           0 :     if (!arg1) {
   21462           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21463             :     }
   21464             :   }
   21465           0 :   {
   21466           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21467           0 :     if ( bLocalUseExceptions ) {
   21468           0 :       pushErrorHandler();
   21469             :     }
   21470           0 :     {
   21471           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21472           0 :       result = (char *)GDAL_GCP_Id_get(arg1);
   21473           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21474             :     }
   21475           0 :     if ( bLocalUseExceptions ) {
   21476           0 :       popErrorHandler();
   21477             :     }
   21478             : #ifndef SED_HACKS
   21479             :     if ( bLocalUseExceptions ) {
   21480             :       CPLErr eclass = CPLGetLastErrorType();
   21481             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21482             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21483             :       }
   21484             :     }
   21485             : #endif
   21486             :   }
   21487           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   21488           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; } }
   21489             :   return resultobj;
   21490             : fail:
   21491             :   return NULL;
   21492             : }
   21493             : 
   21494             : 
   21495           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21496           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21497           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21498           0 :   char *arg2 = (char *) 0 ;
   21499           0 :   void *argp1 = 0 ;
   21500           0 :   int res1 = 0 ;
   21501           0 :   int res2 ;
   21502           0 :   char *buf2 = 0 ;
   21503           0 :   int alloc2 = 0 ;
   21504           0 :   PyObject *swig_obj[2] ;
   21505             :   
   21506           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_Id_set", 2, 2, swig_obj)) SWIG_fail;
   21507           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21508           0 :   if (!SWIG_IsOK(res1)) {
   21509           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21510             :   }
   21511           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21512           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   21513           0 :   if (!SWIG_IsOK(res2)) {
   21514           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Id_set" "', argument " "2"" of type '" "char const *""'");
   21515             :   }
   21516           0 :   arg2 = reinterpret_cast< char * >(buf2);
   21517           0 :   {
   21518           0 :     if (!arg1) {
   21519           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21520             :     }
   21521             :   }
   21522           0 :   {
   21523           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21524           0 :     if ( bLocalUseExceptions ) {
   21525           0 :       pushErrorHandler();
   21526             :     }
   21527           0 :     {
   21528           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21529           0 :       GDAL_GCP_Id_set(arg1,(char const *)arg2);
   21530           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21531             :     }
   21532           0 :     if ( bLocalUseExceptions ) {
   21533           0 :       popErrorHandler();
   21534             :     }
   21535             : #ifndef SED_HACKS
   21536             :     if ( bLocalUseExceptions ) {
   21537             :       CPLErr eclass = CPLGetLastErrorType();
   21538             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21539             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21540             :       }
   21541             :     }
   21542             : #endif
   21543             :   }
   21544           0 :   resultobj = SWIG_Py_Void();
   21545           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21546           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; } }
   21547             :   return resultobj;
   21548           0 : fail:
   21549           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21550             :   return NULL;
   21551             : }
   21552             : 
   21553             : 
   21554          10 : SWIGINTERN PyObject *_wrap_GCPsToGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21555          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21556          10 :   int arg1 ;
   21557          10 :   GDAL_GCP *arg2 = (GDAL_GCP *) 0 ;
   21558          10 :   double *arg3 ;
   21559          10 :   int arg4 = (int) 1 ;
   21560          10 :   GDAL_GCP *tmpGCPList1 ;
   21561          10 :   double argout3[6] ;
   21562          10 :   int val4 ;
   21563          10 :   int ecode4 = 0 ;
   21564          10 :   PyObject *swig_obj[2] ;
   21565          10 :   RETURN_NONE result;
   21566             :   
   21567          10 :   {
   21568             :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   21569          10 :     memset(argout3, 0, sizeof(argout3));
   21570          10 :     arg3 = argout3;
   21571             :   }
   21572          10 :   if (!SWIG_Python_UnpackTuple(args, "GCPsToGeoTransform", 1, 2, swig_obj)) SWIG_fail;
   21573          10 :   {
   21574             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21575             :     /* check if is List */
   21576          10 :     if ( !PySequence_Check(swig_obj[0]) ) {
   21577           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   21578           0 :       SWIG_fail;
   21579             :     }
   21580          10 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   21581          10 :     if( size > (Py_ssize_t)INT_MAX ) {
   21582           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   21583           0 :       SWIG_fail;
   21584             :     }
   21585          10 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   21586           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   21587           0 :       SWIG_fail;
   21588             :     }
   21589          10 :     arg1 = (int)size;
   21590          10 :     tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
   21591          10 :     if( !tmpGCPList1 ) {
   21592           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   21593           0 :       SWIG_fail;
   21594             :     }
   21595          46 :     arg2 = tmpGCPList1;
   21596          46 :     for( int i = 0; i<arg1; i++ ) {
   21597          36 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   21598          36 :       GDAL_GCP *item = 0;
   21599          36 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   21600          36 :       if ( ! item ) {
   21601           0 :         Py_DECREF(o);
   21602           0 :         SWIG_fail;
   21603             :       }
   21604          36 :       memcpy( tmpGCPList1 + i, item, sizeof( GDAL_GCP ) );
   21605          36 :       Py_DECREF(o);
   21606             :     }
   21607             :   }
   21608          10 :   if (swig_obj[1]) {
   21609           1 :     ecode4 = SWIG_AsVal_int(swig_obj[1], &val4);
   21610           1 :     if (!SWIG_IsOK(ecode4)) {
   21611           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GCPsToGeoTransform" "', argument " "4"" of type '" "int""'");
   21612             :     } 
   21613             :     arg4 = static_cast< int >(val4);
   21614             :   }
   21615          10 :   {
   21616          10 :     const int bLocalUseExceptions = GetUseExceptions();
   21617          10 :     if ( bLocalUseExceptions ) {
   21618          10 :       pushErrorHandler();
   21619             :     }
   21620          10 :     {
   21621          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21622          10 :       result = (RETURN_NONE)GDALGCPsToGeoTransform(arg1,(GDAL_GCP const *)arg2,arg3,arg4);
   21623          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21624             :     }
   21625          10 :     if ( bLocalUseExceptions ) {
   21626          10 :       popErrorHandler();
   21627             :     }
   21628             : #ifndef SED_HACKS
   21629             :     if ( bLocalUseExceptions ) {
   21630             :       CPLErr eclass = CPLGetLastErrorType();
   21631             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21632             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21633             :       }
   21634             :     }
   21635             : #endif
   21636             :   }
   21637             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   21638          10 :   {
   21639             :     /* %typemap(argout) (double argout[ANY]) */
   21640          10 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 6 );
   21641             : #if SWIG_VERSION >= 0x040300
   21642             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   21643             : #else
   21644          10 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   21645             : #endif
   21646             :   }
   21647          10 :   {
   21648             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21649          10 :     free( arg2 );
   21650             :   }
   21651          10 :   {
   21652             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   21653          10 :     if (result == 0 ) {
   21654           4 :       Py_XDECREF( resultobj );
   21655           4 :       resultobj = Py_None;
   21656           4 :       Py_INCREF(resultobj);
   21657             :     }
   21658          10 :     if (resultobj == 0) {
   21659           0 :       resultobj = Py_None;
   21660           0 :       Py_INCREF(resultobj);
   21661             :     }
   21662             :   }
   21663          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; } }
   21664             :   return resultobj;
   21665           0 : fail:
   21666           0 :   {
   21667             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21668           0 :     free( arg2 );
   21669             :   }
   21670           0 :   return NULL;
   21671             : }
   21672             : 
   21673             : 
   21674          10 : SWIGINTERN PyObject *_wrap_GCPsToHomography(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21675          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21676          10 :   int arg1 ;
   21677          10 :   GDAL_GCP *arg2 = (GDAL_GCP *) 0 ;
   21678          10 :   double *arg3 ;
   21679          10 :   GDAL_GCP *tmpGCPList1 ;
   21680          10 :   double argout3[9] ;
   21681          10 :   PyObject *swig_obj[1] ;
   21682          10 :   RETURN_NONE result;
   21683             :   
   21684          10 :   {
   21685             :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   21686          10 :     memset(argout3, 0, sizeof(argout3));
   21687          10 :     arg3 = argout3;
   21688             :   }
   21689          10 :   if (!args) SWIG_fail;
   21690          10 :   swig_obj[0] = args;
   21691          10 :   {
   21692             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21693             :     /* check if is List */
   21694          10 :     if ( !PySequence_Check(swig_obj[0]) ) {
   21695           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   21696           0 :       SWIG_fail;
   21697             :     }
   21698          10 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   21699          10 :     if( size > (Py_ssize_t)INT_MAX ) {
   21700           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   21701           0 :       SWIG_fail;
   21702             :     }
   21703          10 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   21704           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   21705           0 :       SWIG_fail;
   21706             :     }
   21707          10 :     arg1 = (int)size;
   21708          10 :     tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
   21709          10 :     if( !tmpGCPList1 ) {
   21710           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   21711           0 :       SWIG_fail;
   21712             :     }
   21713          46 :     arg2 = tmpGCPList1;
   21714          46 :     for( int i = 0; i<arg1; i++ ) {
   21715          36 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   21716          36 :       GDAL_GCP *item = 0;
   21717          36 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   21718          36 :       if ( ! item ) {
   21719           0 :         Py_DECREF(o);
   21720           0 :         SWIG_fail;
   21721             :       }
   21722          36 :       memcpy( tmpGCPList1 + i, item, sizeof( GDAL_GCP ) );
   21723          36 :       Py_DECREF(o);
   21724             :     }
   21725             :   }
   21726          10 :   {
   21727          10 :     const int bLocalUseExceptions = GetUseExceptions();
   21728          10 :     if ( bLocalUseExceptions ) {
   21729          10 :       pushErrorHandler();
   21730             :     }
   21731          10 :     {
   21732          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21733          10 :       result = (RETURN_NONE)GDALGCPsToHomography(arg1,(GDAL_GCP const *)arg2,arg3);
   21734          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21735             :     }
   21736          10 :     if ( bLocalUseExceptions ) {
   21737          10 :       popErrorHandler();
   21738             :     }
   21739             : #ifndef SED_HACKS
   21740             :     if ( bLocalUseExceptions ) {
   21741             :       CPLErr eclass = CPLGetLastErrorType();
   21742             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21743             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21744             :       }
   21745             :     }
   21746             : #endif
   21747             :   }
   21748             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   21749          10 :   {
   21750             :     /* %typemap(argout) (double argout[ANY]) */
   21751          10 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 9 );
   21752             : #if SWIG_VERSION >= 0x040300
   21753             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   21754             : #else
   21755          10 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   21756             : #endif
   21757             :   }
   21758          10 :   {
   21759             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21760          10 :     free( arg2 );
   21761             :   }
   21762          10 :   {
   21763             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   21764          10 :     if (result == 0 ) {
   21765           3 :       Py_XDECREF( resultobj );
   21766           3 :       resultobj = Py_None;
   21767           3 :       Py_INCREF(resultobj);
   21768             :     }
   21769          10 :     if (resultobj == 0) {
   21770           0 :       resultobj = Py_None;
   21771           0 :       Py_INCREF(resultobj);
   21772             :     }
   21773             :   }
   21774          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; } }
   21775             :   return resultobj;
   21776           0 : fail:
   21777           0 :   {
   21778             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21779           0 :     free( arg2 );
   21780             :   }
   21781           0 :   return NULL;
   21782             : }
   21783             : 
   21784             : 
   21785           0 : SWIGINTERN PyObject *_wrap_delete_VirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21786           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21787           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   21788           0 :   void *argp1 = 0 ;
   21789           0 :   int res1 = 0 ;
   21790           0 :   PyObject *swig_obj[1] ;
   21791             :   
   21792           0 :   if (!args) SWIG_fail;
   21793           0 :   swig_obj[0] = args;
   21794           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_DISOWN |  0 );
   21795           0 :   if (!SWIG_IsOK(res1)) {
   21796           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VirtualMem" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   21797             :   }
   21798           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   21799           0 :   {
   21800           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21801           0 :     if ( bLocalUseExceptions ) {
   21802           0 :       pushErrorHandler();
   21803             :     }
   21804           0 :     {
   21805           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21806           0 :       delete_CPLVirtualMemShadow(arg1);
   21807           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21808             :     }
   21809           0 :     if ( bLocalUseExceptions ) {
   21810           0 :       popErrorHandler();
   21811             :     }
   21812             : #ifndef SED_HACKS
   21813             :     if ( bLocalUseExceptions ) {
   21814             :       CPLErr eclass = CPLGetLastErrorType();
   21815             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21816             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21817             :       }
   21818             :     }
   21819             : #endif
   21820             :   }
   21821           0 :   resultobj = SWIG_Py_Void();
   21822           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; } }
   21823             :   return resultobj;
   21824             : fail:
   21825             :   return NULL;
   21826             : }
   21827             : 
   21828             : 
   21829           0 : SWIGINTERN PyObject *_wrap_VirtualMem_GetAddr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21830           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21831           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   21832           0 :   void **arg2 = (void **) 0 ;
   21833           0 :   size_t *arg3 = (size_t *) 0 ;
   21834           0 :   GDALDataType *arg4 = (GDALDataType *) 0 ;
   21835           0 :   int *arg5 = (int *) 0 ;
   21836           0 :   void *argp1 = 0 ;
   21837           0 :   int res1 = 0 ;
   21838           0 :   void *ptr2 ;
   21839           0 :   size_t nsize2 ;
   21840           0 :   GDALDataType datatype2 ;
   21841           0 :   int readonly2 ;
   21842           0 :   PyObject *swig_obj[1] ;
   21843             :   
   21844           0 :   {
   21845             :     /* %typemap(in,numinputs=0) (void** pptr, size_t* pnsize, GDALDataType* pdatatype, int* preadonly) */
   21846           0 :     arg2 = &ptr2;
   21847           0 :     arg3 = &nsize2;
   21848           0 :     arg4 = &datatype2;
   21849           0 :     arg5 = &readonly2;
   21850             :   }
   21851           0 :   if (!args) SWIG_fail;
   21852           0 :   swig_obj[0] = args;
   21853           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, 0 |  0 );
   21854           0 :   if (!SWIG_IsOK(res1)) {
   21855           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VirtualMem_GetAddr" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   21856             :   }
   21857           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   21858           0 :   {
   21859           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21860           0 :     if ( bLocalUseExceptions ) {
   21861           0 :       pushErrorHandler();
   21862             :     }
   21863           0 :     {
   21864           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21865           0 :       CPLVirtualMemShadow_GetAddr(arg1,arg2,arg3,arg4,arg5);
   21866           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21867             :     }
   21868           0 :     if ( bLocalUseExceptions ) {
   21869           0 :       popErrorHandler();
   21870             :     }
   21871             : #ifndef SED_HACKS
   21872             :     if ( bLocalUseExceptions ) {
   21873             :       CPLErr eclass = CPLGetLastErrorType();
   21874             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21875             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21876             :       }
   21877             :     }
   21878             : #endif
   21879             :   }
   21880           0 :   resultobj = SWIG_Py_Void();
   21881           0 :   {
   21882             :     /* %typemap(argout) (void** pptr, size_t* pnsize, GDALDataType* pdatatype, int* preadonly)*/
   21883           0 :     Py_buffer *buf=(Py_buffer*)malloc(sizeof(Py_buffer));
   21884             :     
   21885           0 :     if (PyBuffer_FillInfo(buf, swig_obj[0], *(arg2), *(arg3), *(arg5), PyBUF_ND)) {
   21886             :       // error, handle
   21887             :     }
   21888           0 :     if( *(arg4) == GDT_Byte )
   21889             :     {
   21890           0 :       buf->format = (char*) "B";
   21891           0 :       buf->itemsize = 1;
   21892             :     }
   21893           0 :     else if( *(arg4) == GDT_Int16 )
   21894             :     {
   21895           0 :       buf->format = (char*) "h";
   21896           0 :       buf->itemsize = 2;
   21897             :     }
   21898           0 :     else if( *(arg4) == GDT_UInt16 )
   21899             :     {
   21900           0 :       buf->format = (char*) "H";
   21901           0 :       buf->itemsize = 2;
   21902             :     }
   21903           0 :     else if( *(arg4) == GDT_Int32 )
   21904             :     {
   21905           0 :       buf->format = (char*) "i";
   21906           0 :       buf->itemsize = 4;
   21907             :     }
   21908           0 :     else if( *(arg4) == GDT_UInt32 )
   21909             :     {
   21910           0 :       buf->format = (char*) "I";
   21911           0 :       buf->itemsize = 4;
   21912             :     }
   21913           0 :     else if( *(arg4) == GDT_Float16 )
   21914             :     {
   21915           0 :       buf->format = (char*) "f";
   21916           0 :       buf->itemsize = 2;
   21917             :     }
   21918           0 :     else if( *(arg4) == GDT_Float32 )
   21919             :     {
   21920           0 :       buf->format = (char*) "f";
   21921           0 :       buf->itemsize = 4;
   21922             :     }
   21923           0 :     else if( *(arg4) == GDT_Float64 )
   21924             :     {
   21925           0 :       buf->format = (char*) "F";
   21926           0 :       buf->itemsize = 8;
   21927             :     }
   21928             :     else
   21929             :     {
   21930           0 :       buf->format = (char*) "B";
   21931           0 :       buf->itemsize = 1;
   21932             :     }
   21933           0 :     Py_DECREF(resultobj);
   21934           0 :     resultobj = PyMemoryView_FromBuffer(buf);
   21935             :   }
   21936           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; } }
   21937             :   return resultobj;
   21938             : fail:
   21939             :   return NULL;
   21940             : }
   21941             : 
   21942             : 
   21943           0 : SWIGINTERN PyObject *_wrap_VirtualMem_Pin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21944           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21945           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   21946           0 :   size_t arg2 = (size_t) 0 ;
   21947           0 :   size_t arg3 = (size_t) 0 ;
   21948           0 :   int arg4 = (int) 0 ;
   21949           0 :   void *argp1 = 0 ;
   21950           0 :   int res1 = 0 ;
   21951           0 :   size_t val2 ;
   21952           0 :   int ecode2 = 0 ;
   21953           0 :   size_t val3 ;
   21954           0 :   int ecode3 = 0 ;
   21955           0 :   int val4 ;
   21956           0 :   int ecode4 = 0 ;
   21957           0 :   PyObject *swig_obj[4] ;
   21958             :   
   21959           0 :   if (!SWIG_Python_UnpackTuple(args, "VirtualMem_Pin", 1, 4, swig_obj)) SWIG_fail;
   21960           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, 0 |  0 );
   21961           0 :   if (!SWIG_IsOK(res1)) {
   21962           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VirtualMem_Pin" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   21963             :   }
   21964           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   21965           0 :   if (swig_obj[1]) {
   21966           0 :     ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   21967           0 :     if (!SWIG_IsOK(ecode2)) {
   21968           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VirtualMem_Pin" "', argument " "2"" of type '" "size_t""'");
   21969             :     } 
   21970             :     arg2 = static_cast< size_t >(val2);
   21971             :   }
   21972           0 :   if (swig_obj[2]) {
   21973           0 :     ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
   21974           0 :     if (!SWIG_IsOK(ecode3)) {
   21975           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VirtualMem_Pin" "', argument " "3"" of type '" "size_t""'");
   21976             :     } 
   21977             :     arg3 = static_cast< size_t >(val3);
   21978             :   }
   21979           0 :   if (swig_obj[3]) {
   21980           0 :     ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   21981           0 :     if (!SWIG_IsOK(ecode4)) {
   21982           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VirtualMem_Pin" "', argument " "4"" of type '" "int""'");
   21983             :     } 
   21984             :     arg4 = static_cast< int >(val4);
   21985             :   }
   21986           0 :   {
   21987           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21988           0 :     if ( bLocalUseExceptions ) {
   21989           0 :       pushErrorHandler();
   21990             :     }
   21991           0 :     {
   21992           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21993           0 :       CPLVirtualMemShadow_Pin(arg1,arg2,arg3,arg4);
   21994           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21995             :     }
   21996           0 :     if ( bLocalUseExceptions ) {
   21997           0 :       popErrorHandler();
   21998             :     }
   21999             : #ifndef SED_HACKS
   22000             :     if ( bLocalUseExceptions ) {
   22001             :       CPLErr eclass = CPLGetLastErrorType();
   22002             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22003             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22004             :       }
   22005             :     }
   22006             : #endif
   22007             :   }
   22008           0 :   resultobj = SWIG_Py_Void();
   22009           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; } }
   22010             :   return resultobj;
   22011             : fail:
   22012             :   return NULL;
   22013             : }
   22014             : 
   22015             : 
   22016         277 : SWIGINTERN PyObject *VirtualMem_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22017         277 :   PyObject *obj;
   22018         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   22019         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_CPLVirtualMemShadow, SWIG_NewClientData(obj));
   22020         277 :   return SWIG_Py_Void();
   22021             : }
   22022             : 
   22023           1 : SWIGINTERN PyObject *_wrap_delete_AsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22024           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22025           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22026           1 :   void *argp1 = 0 ;
   22027           1 :   int res1 = 0 ;
   22028           1 :   PyObject *swig_obj[1] ;
   22029             :   
   22030           1 :   if (!args) SWIG_fail;
   22031           1 :   swig_obj[0] = args;
   22032           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_DISOWN |  0 );
   22033           1 :   if (!SWIG_IsOK(res1)) {
   22034           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AsyncReader" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22035             :   }
   22036           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22037           1 :   {
   22038           1 :     const int bLocalUseExceptions = GetUseExceptions();
   22039           1 :     if ( bLocalUseExceptions ) {
   22040           1 :       pushErrorHandler();
   22041             :     }
   22042           1 :     {
   22043           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22044           1 :       delete_GDALAsyncReaderShadow(arg1);
   22045           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22046             :     }
   22047           1 :     if ( bLocalUseExceptions ) {
   22048           1 :       popErrorHandler();
   22049             :     }
   22050             : #ifndef SED_HACKS
   22051             :     if ( bLocalUseExceptions ) {
   22052             :       CPLErr eclass = CPLGetLastErrorType();
   22053             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22054             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22055             :       }
   22056             :     }
   22057             : #endif
   22058             :   }
   22059           1 :   resultobj = SWIG_Py_Void();
   22060           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; } }
   22061             :   return resultobj;
   22062             : fail:
   22063             :   return NULL;
   22064             : }
   22065             : 
   22066             : 
   22067           1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetNextUpdatedRegion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22068           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22069           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22070           1 :   double arg2 ;
   22071           1 :   int *arg3 = (int *) 0 ;
   22072           1 :   int *arg4 = (int *) 0 ;
   22073           1 :   int *arg5 = (int *) 0 ;
   22074           1 :   int *arg6 = (int *) 0 ;
   22075           1 :   void *argp1 = 0 ;
   22076           1 :   int res1 = 0 ;
   22077           1 :   double val2 ;
   22078           1 :   int ecode2 = 0 ;
   22079           1 :   int temp3 ;
   22080           1 :   int res3 = SWIG_TMPOBJ ;
   22081           1 :   int temp4 ;
   22082           1 :   int res4 = SWIG_TMPOBJ ;
   22083           1 :   int temp5 ;
   22084           1 :   int res5 = SWIG_TMPOBJ ;
   22085           1 :   int temp6 ;
   22086           1 :   int res6 = SWIG_TMPOBJ ;
   22087           1 :   PyObject *swig_obj[2] ;
   22088           1 :   GDALAsyncStatusType result;
   22089             :   
   22090           1 :   arg3 = &temp3;
   22091           1 :   arg4 = &temp4;
   22092           1 :   arg5 = &temp5;
   22093           1 :   arg6 = &temp6;
   22094           1 :   if (!SWIG_Python_UnpackTuple(args, "AsyncReader_GetNextUpdatedRegion", 2, 2, swig_obj)) SWIG_fail;
   22095           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22096           1 :   if (!SWIG_IsOK(res1)) {
   22097           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22098             :   }
   22099           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22100           1 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   22101           1 :   if (!SWIG_IsOK(ecode2)) {
   22102           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "2"" of type '" "double""'");
   22103             :   } 
   22104           1 :   arg2 = static_cast< double >(val2);
   22105           1 :   {
   22106           1 :     const int bLocalUseExceptions = GetUseExceptions();
   22107           1 :     if ( bLocalUseExceptions ) {
   22108           1 :       pushErrorHandler();
   22109             :     }
   22110           1 :     {
   22111           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22112           1 :       result = (GDALAsyncStatusType)GDALAsyncReaderShadow_GetNextUpdatedRegion(arg1,arg2,arg3,arg4,arg5,arg6);
   22113           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22114             :     }
   22115           1 :     if ( bLocalUseExceptions ) {
   22116           1 :       popErrorHandler();
   22117             :     }
   22118             : #ifndef SED_HACKS
   22119             :     if ( bLocalUseExceptions ) {
   22120             :       CPLErr eclass = CPLGetLastErrorType();
   22121             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22122             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22123             :       }
   22124             :     }
   22125             : #endif
   22126             :   }
   22127           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22128           1 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   22129           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   22130             :   } else {
   22131           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   22132           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   22133             :   }
   22134           1 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   22135           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
   22136             :   } else {
   22137           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   22138           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
   22139             :   }
   22140           1 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   22141           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
   22142             :   } else {
   22143           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   22144           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
   22145             :   }
   22146           1 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   22147           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
   22148             :   } else {
   22149           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   22150           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
   22151             :   }
   22152           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; } }
   22153             :   return resultobj;
   22154             : fail:
   22155             :   return NULL;
   22156             : }
   22157             : 
   22158             : 
   22159           1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22160           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22161           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22162           1 :   void **arg2 = (void **) 0 ;
   22163           1 :   void *argp1 = 0 ;
   22164           1 :   int res1 = 0 ;
   22165           1 :   void *pyObject2 = NULL ;
   22166           1 :   PyObject *swig_obj[1] ;
   22167             :   
   22168           1 :   {
   22169             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   22170           1 :     arg2 = &pyObject2;
   22171             :   }
   22172           1 :   if (!args) SWIG_fail;
   22173           1 :   swig_obj[0] = args;
   22174           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22175           1 :   if (!SWIG_IsOK(res1)) {
   22176           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22177             :   }
   22178           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22179           1 :   {
   22180           1 :     const int bLocalUseExceptions = GetUseExceptions();
   22181           1 :     if ( bLocalUseExceptions ) {
   22182           1 :       pushErrorHandler();
   22183             :     }
   22184           1 :     {
   22185           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22186           1 :       GDALAsyncReaderShadow_GetBuffer(arg1,arg2);
   22187           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22188             :     }
   22189           1 :     if ( bLocalUseExceptions ) {
   22190           1 :       popErrorHandler();
   22191             :     }
   22192             : #ifndef SED_HACKS
   22193             :     if ( bLocalUseExceptions ) {
   22194             :       CPLErr eclass = CPLGetLastErrorType();
   22195             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22196             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22197             :       }
   22198             :     }
   22199             : #endif
   22200             :   }
   22201           1 :   resultobj = SWIG_Py_Void();
   22202           1 :   {
   22203             :     /* %typemap(argout) ( void **outPythonObject ) */
   22204           1 :     Py_XDECREF(resultobj);
   22205           1 :     if (*arg2)
   22206             :     {
   22207             :       resultobj = (PyObject*)*arg2;
   22208             :     }
   22209             :     else
   22210             :     {
   22211           0 :       resultobj = Py_None;
   22212           0 :       Py_INCREF(resultobj);
   22213             :     }
   22214             :   }
   22215           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; } }
   22216             :   return resultobj;
   22217             : fail:
   22218             :   return NULL;
   22219             : }
   22220             : 
   22221             : 
   22222           0 : SWIGINTERN PyObject *_wrap_AsyncReader_LockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22223           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22224           0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22225           0 :   double arg2 ;
   22226           0 :   void *argp1 = 0 ;
   22227           0 :   int res1 = 0 ;
   22228           0 :   double val2 ;
   22229           0 :   int ecode2 = 0 ;
   22230           0 :   PyObject *swig_obj[2] ;
   22231           0 :   int result;
   22232             :   
   22233           0 :   if (!SWIG_Python_UnpackTuple(args, "AsyncReader_LockBuffer", 2, 2, swig_obj)) SWIG_fail;
   22234           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22235           0 :   if (!SWIG_IsOK(res1)) {
   22236           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_LockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22237             :   }
   22238           0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22239           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   22240           0 :   if (!SWIG_IsOK(ecode2)) {
   22241           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_LockBuffer" "', argument " "2"" of type '" "double""'");
   22242             :   } 
   22243           0 :   arg2 = static_cast< double >(val2);
   22244           0 :   {
   22245           0 :     const int bLocalUseExceptions = GetUseExceptions();
   22246           0 :     if ( bLocalUseExceptions ) {
   22247           0 :       pushErrorHandler();
   22248             :     }
   22249           0 :     {
   22250           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22251           0 :       result = (int)GDALAsyncReaderShadow_LockBuffer(arg1,arg2);
   22252           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22253             :     }
   22254           0 :     if ( bLocalUseExceptions ) {
   22255           0 :       popErrorHandler();
   22256             :     }
   22257             : #ifndef SED_HACKS
   22258             :     if ( bLocalUseExceptions ) {
   22259             :       CPLErr eclass = CPLGetLastErrorType();
   22260             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22261             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22262             :       }
   22263             :     }
   22264             : #endif
   22265             :   }
   22266           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22267           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; } }
   22268             :   return resultobj;
   22269             : fail:
   22270             :   return NULL;
   22271             : }
   22272             : 
   22273             : 
   22274           0 : SWIGINTERN PyObject *_wrap_AsyncReader_UnlockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22275           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22276           0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22277           0 :   void *argp1 = 0 ;
   22278           0 :   int res1 = 0 ;
   22279           0 :   PyObject *swig_obj[1] ;
   22280             :   
   22281           0 :   if (!args) SWIG_fail;
   22282           0 :   swig_obj[0] = args;
   22283           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22284           0 :   if (!SWIG_IsOK(res1)) {
   22285           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_UnlockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22286             :   }
   22287           0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22288           0 :   {
   22289           0 :     const int bLocalUseExceptions = GetUseExceptions();
   22290           0 :     if ( bLocalUseExceptions ) {
   22291           0 :       pushErrorHandler();
   22292             :     }
   22293           0 :     {
   22294           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22295           0 :       GDALAsyncReaderShadow_UnlockBuffer(arg1);
   22296           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22297             :     }
   22298           0 :     if ( bLocalUseExceptions ) {
   22299           0 :       popErrorHandler();
   22300             :     }
   22301             : #ifndef SED_HACKS
   22302             :     if ( bLocalUseExceptions ) {
   22303             :       CPLErr eclass = CPLGetLastErrorType();
   22304             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22305             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22306             :       }
   22307             :     }
   22308             : #endif
   22309             :   }
   22310           0 :   resultobj = SWIG_Py_Void();
   22311           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; } }
   22312             :   return resultobj;
   22313             : fail:
   22314             :   return NULL;
   22315             : }
   22316             : 
   22317             : 
   22318         277 : SWIGINTERN PyObject *AsyncReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22319         277 :   PyObject *obj;
   22320         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   22321         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_NewClientData(obj));
   22322         277 :   return SWIG_Py_Void();
   22323             : }
   22324             : 
   22325       19831 : SWIGINTERN PyObject *_wrap_Dataset_RasterXSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22326       19831 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22327       19831 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22328       19831 :   void *argp1 = 0 ;
   22329       19831 :   int res1 = 0 ;
   22330       19831 :   PyObject *swig_obj[1] ;
   22331       19831 :   int result;
   22332             :   
   22333       19831 :   if (!args) SWIG_fail;
   22334       19831 :   swig_obj[0] = args;
   22335       19831 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22336       19831 :   if (!SWIG_IsOK(res1)) {
   22337           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterXSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22338             :   }
   22339       19831 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22340       19831 :   {
   22341       19831 :     const int bLocalUseExceptions = GetUseExceptions();
   22342       19831 :     if ( bLocalUseExceptions ) {
   22343       16840 :       pushErrorHandler();
   22344             :     }
   22345       19831 :     {
   22346       19831 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22347       19831 :       result = (int)GDALDatasetShadow_RasterXSize_get(arg1);
   22348       19831 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22349             :     }
   22350       19831 :     if ( bLocalUseExceptions ) {
   22351       16840 :       popErrorHandler();
   22352             :     }
   22353             : #ifndef SED_HACKS
   22354             :     if ( bLocalUseExceptions ) {
   22355             :       CPLErr eclass = CPLGetLastErrorType();
   22356             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22357             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22358             :       }
   22359             :     }
   22360             : #endif
   22361             :   }
   22362       19831 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22363       19831 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22364             :   return resultobj;
   22365             : fail:
   22366             :   return NULL;
   22367             : }
   22368             : 
   22369             : 
   22370       20095 : SWIGINTERN PyObject *_wrap_Dataset_RasterYSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22371       20095 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22372       20095 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22373       20095 :   void *argp1 = 0 ;
   22374       20095 :   int res1 = 0 ;
   22375       20095 :   PyObject *swig_obj[1] ;
   22376       20095 :   int result;
   22377             :   
   22378       20095 :   if (!args) SWIG_fail;
   22379       20095 :   swig_obj[0] = args;
   22380       20095 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22381       20095 :   if (!SWIG_IsOK(res1)) {
   22382           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterYSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22383             :   }
   22384       20095 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22385       20095 :   {
   22386       20095 :     const int bLocalUseExceptions = GetUseExceptions();
   22387       20095 :     if ( bLocalUseExceptions ) {
   22388       17283 :       pushErrorHandler();
   22389             :     }
   22390       20095 :     {
   22391       20095 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22392       20095 :       result = (int)GDALDatasetShadow_RasterYSize_get(arg1);
   22393       20095 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22394             :     }
   22395       20095 :     if ( bLocalUseExceptions ) {
   22396       17283 :       popErrorHandler();
   22397             :     }
   22398             : #ifndef SED_HACKS
   22399             :     if ( bLocalUseExceptions ) {
   22400             :       CPLErr eclass = CPLGetLastErrorType();
   22401             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22402             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22403             :       }
   22404             :     }
   22405             : #endif
   22406             :   }
   22407       20095 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22408       20095 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22409             :   return resultobj;
   22410             : fail:
   22411             :   return NULL;
   22412             : }
   22413             : 
   22414             : 
   22415      355233 : SWIGINTERN PyObject *_wrap_Dataset_RasterCount_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22416      355233 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22417      355233 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22418      355233 :   void *argp1 = 0 ;
   22419      355233 :   int res1 = 0 ;
   22420      355233 :   PyObject *swig_obj[1] ;
   22421      355233 :   int result;
   22422             :   
   22423      355233 :   if (!args) SWIG_fail;
   22424      355233 :   swig_obj[0] = args;
   22425      355233 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22426      355233 :   if (!SWIG_IsOK(res1)) {
   22427           2 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterCount_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22428             :   }
   22429      355232 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22430      355232 :   {
   22431      355232 :     const int bLocalUseExceptions = GetUseExceptions();
   22432      355232 :     if ( bLocalUseExceptions ) {
   22433      339803 :       pushErrorHandler();
   22434             :     }
   22435      355232 :     {
   22436      355232 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22437      355232 :       result = (int)GDALDatasetShadow_RasterCount_get(arg1);
   22438      355232 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22439             :     }
   22440      355232 :     if ( bLocalUseExceptions ) {
   22441      339803 :       popErrorHandler();
   22442             :     }
   22443             : #ifndef SED_HACKS
   22444             :     if ( bLocalUseExceptions ) {
   22445             :       CPLErr eclass = CPLGetLastErrorType();
   22446             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22447             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22448             :       }
   22449             :     }
   22450             : #endif
   22451             :   }
   22452      355232 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22453      355233 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22454             :   return resultobj;
   22455             : fail:
   22456             :   return NULL;
   22457             : }
   22458             : 
   22459             : 
   22460       55723 : SWIGINTERN PyObject *_wrap_delete_Dataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22461       55723 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22462       55723 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22463       55723 :   void *argp1 = 0 ;
   22464       55723 :   int res1 = 0 ;
   22465       55723 :   PyObject *swig_obj[1] ;
   22466             :   
   22467       55723 :   if (!args) SWIG_fail;
   22468       55723 :   swig_obj[0] = args;
   22469       55723 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_DISOWN |  0 );
   22470       55723 :   if (!SWIG_IsOK(res1)) {
   22471           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dataset" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22472             :   }
   22473       55723 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22474       55723 :   {
   22475       55723 :     const int bLocalUseExceptions = GetUseExceptions();
   22476       55723 :     if ( bLocalUseExceptions ) {
   22477       24638 :       pushErrorHandler();
   22478             :     }
   22479       55723 :     {
   22480       55723 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22481       55723 :       delete_GDALDatasetShadow(arg1);
   22482       55723 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22483             :     }
   22484       55723 :     if ( bLocalUseExceptions ) {
   22485       24638 :       popErrorHandler();
   22486             :     }
   22487             : #ifndef SED_HACKS
   22488             :     if ( bLocalUseExceptions ) {
   22489             :       CPLErr eclass = CPLGetLastErrorType();
   22490             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22491             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22492             :       }
   22493             :     }
   22494             : #endif
   22495             :   }
   22496       55723 :   resultobj = SWIG_Py_Void();
   22497       55723 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22498             :   return resultobj;
   22499             : fail:
   22500             :   return NULL;
   22501             : }
   22502             : 
   22503             : 
   22504           4 : SWIGINTERN PyObject *_wrap_Dataset_MarkSuppressOnClose(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22505           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22506           4 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22507           4 :   void *argp1 = 0 ;
   22508           4 :   int res1 = 0 ;
   22509           4 :   PyObject *swig_obj[1] ;
   22510             :   
   22511           4 :   if (!args) SWIG_fail;
   22512           4 :   swig_obj[0] = args;
   22513           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22514           4 :   if (!SWIG_IsOK(res1)) {
   22515           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_MarkSuppressOnClose" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22516             :   }
   22517           4 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22518           4 :   {
   22519           4 :     const int bLocalUseExceptions = GetUseExceptions();
   22520           4 :     if ( bLocalUseExceptions ) {
   22521           0 :       pushErrorHandler();
   22522             :     }
   22523           4 :     {
   22524           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22525           4 :       GDALDatasetShadow_MarkSuppressOnClose(arg1);
   22526           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22527             :     }
   22528           4 :     if ( bLocalUseExceptions ) {
   22529           0 :       popErrorHandler();
   22530             :     }
   22531             : #ifndef SED_HACKS
   22532             :     if ( bLocalUseExceptions ) {
   22533             :       CPLErr eclass = CPLGetLastErrorType();
   22534             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22535             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22536             :       }
   22537             :     }
   22538             : #endif
   22539             :   }
   22540           4 :   resultobj = SWIG_Py_Void();
   22541           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; } }
   22542             :   return resultobj;
   22543             : fail:
   22544             :   return NULL;
   22545             : }
   22546             : 
   22547             : 
   22548        3763 : SWIGINTERN PyObject *_wrap_Dataset_Close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22549        3763 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22550        3763 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22551        3763 :   void *argp1 = 0 ;
   22552        3763 :   int res1 = 0 ;
   22553        3763 :   PyObject *swig_obj[1] ;
   22554        3763 :   CPLErr result;
   22555             :   
   22556        3763 :   if (!args) SWIG_fail;
   22557        3763 :   swig_obj[0] = args;
   22558        3763 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22559        3763 :   if (!SWIG_IsOK(res1)) {
   22560           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_Close" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22561             :   }
   22562        3763 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22563        3763 :   {
   22564        3763 :     const int bLocalUseExceptions = GetUseExceptions();
   22565        3763 :     if ( bLocalUseExceptions ) {
   22566        1209 :       pushErrorHandler();
   22567             :     }
   22568        3763 :     {
   22569        3763 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22570        3763 :       result = (CPLErr)GDALDatasetShadow_Close(arg1);
   22571        3763 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22572             :     }
   22573        3763 :     if ( bLocalUseExceptions ) {
   22574        1209 :       popErrorHandler();
   22575             :     }
   22576             : #ifndef SED_HACKS
   22577             :     if ( bLocalUseExceptions ) {
   22578             :       CPLErr eclass = CPLGetLastErrorType();
   22579             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22580             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22581             :       }
   22582             :     }
   22583             : #endif
   22584             :   }
   22585        3763 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22586        3775 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22587             :   return resultobj;
   22588             : fail:
   22589             :   return NULL;
   22590             : }
   22591             : 
   22592             : 
   22593          30 : SWIGINTERN PyObject *_wrap_Dataset__RunCloseWithoutDestroying(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22594          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22595          30 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22596          30 :   void *argp1 = 0 ;
   22597          30 :   int res1 = 0 ;
   22598          30 :   PyObject *swig_obj[1] ;
   22599          30 :   CPLErr result;
   22600             :   
   22601          30 :   if (!args) SWIG_fail;
   22602          30 :   swig_obj[0] = args;
   22603          30 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22604          30 :   if (!SWIG_IsOK(res1)) {
   22605           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__RunCloseWithoutDestroying" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22606             :   }
   22607          30 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22608          30 :   {
   22609          30 :     const int bLocalUseExceptions = GetUseExceptions();
   22610          30 :     if ( bLocalUseExceptions ) {
   22611          30 :       pushErrorHandler();
   22612             :     }
   22613          30 :     {
   22614          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22615          30 :       result = (CPLErr)GDALDatasetShadow__RunCloseWithoutDestroying(arg1);
   22616          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22617             :     }
   22618          30 :     if ( bLocalUseExceptions ) {
   22619          30 :       popErrorHandler();
   22620             :     }
   22621             : #ifndef SED_HACKS
   22622             :     if ( bLocalUseExceptions ) {
   22623             :       CPLErr eclass = CPLGetLastErrorType();
   22624             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22625             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22626             :       }
   22627             :     }
   22628             : #endif
   22629             :   }
   22630          30 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22631          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; } }
   22632             :   return resultobj;
   22633             : fail:
   22634             :   return NULL;
   22635             : }
   22636             : 
   22637             : 
   22638        1327 : SWIGINTERN PyObject *_wrap_Dataset_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22639        1327 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22640        1327 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22641        1327 :   void *argp1 = 0 ;
   22642        1327 :   int res1 = 0 ;
   22643        1327 :   PyObject *swig_obj[1] ;
   22644        1327 :   GDALDriverShadow *result = 0 ;
   22645             :   
   22646        1327 :   if (!args) SWIG_fail;
   22647        1327 :   swig_obj[0] = args;
   22648        1327 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22649        1327 :   if (!SWIG_IsOK(res1)) {
   22650           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetDriver" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22651             :   }
   22652        1327 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22653        1327 :   {
   22654        1327 :     const int bLocalUseExceptions = GetUseExceptions();
   22655        1327 :     if ( bLocalUseExceptions ) {
   22656         830 :       pushErrorHandler();
   22657             :     }
   22658        1327 :     {
   22659        1327 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22660        1327 :       result = (GDALDriverShadow *)GDALDatasetShadow_GetDriver(arg1);
   22661        1327 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22662             :     }
   22663        1327 :     if ( bLocalUseExceptions ) {
   22664         830 :       popErrorHandler();
   22665             :     }
   22666             : #ifndef SED_HACKS
   22667             :     if ( bLocalUseExceptions ) {
   22668             :       CPLErr eclass = CPLGetLastErrorType();
   22669             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22670             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22671             :       }
   22672             :     }
   22673             : #endif
   22674             :   }
   22675        1327 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   22676        1327 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22677             :   return resultobj;
   22678             : fail:
   22679             :   return NULL;
   22680             : }
   22681             : 
   22682             : 
   22683      360032 : SWIGINTERN PyObject *_wrap_Dataset_GetRasterBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22684      360032 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22685      360032 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22686      360032 :   int arg2 ;
   22687      360032 :   void *argp1 = 0 ;
   22688      360032 :   int res1 = 0 ;
   22689      360032 :   int val2 ;
   22690      360032 :   int ecode2 = 0 ;
   22691      360032 :   PyObject *swig_obj[2] ;
   22692      360032 :   GDALRasterBandShadow *result = 0 ;
   22693             :   
   22694      360032 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRasterBand", 2, 2, swig_obj)) SWIG_fail;
   22695      360032 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22696      360032 :   if (!SWIG_IsOK(res1)) {
   22697           8 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRasterBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22698             :   }
   22699      360028 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22700      360028 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   22701      360028 :   if (!SWIG_IsOK(ecode2)) {
   22702           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetRasterBand" "', argument " "2"" of type '" "int""'");
   22703             :   } 
   22704      360028 :   arg2 = static_cast< int >(val2);
   22705      360028 :   {
   22706      360028 :     const int bLocalUseExceptions = GetUseExceptions();
   22707      360028 :     if ( bLocalUseExceptions ) {
   22708      234228 :       pushErrorHandler();
   22709             :     }
   22710      360028 :     {
   22711      360028 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22712      360028 :       result = (GDALRasterBandShadow *)GDALDatasetShadow_GetRasterBand(arg1,arg2);
   22713      360028 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22714             :     }
   22715      360028 :     if ( bLocalUseExceptions ) {
   22716      234228 :       popErrorHandler();
   22717             :     }
   22718             : #ifndef SED_HACKS
   22719             :     if ( bLocalUseExceptions ) {
   22720             :       CPLErr eclass = CPLGetLastErrorType();
   22721             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22722             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22723             :       }
   22724             :     }
   22725             : #endif
   22726             :   }
   22727      360028 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   22728      360032 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22729             :   return resultobj;
   22730             : fail:
   22731             :   return NULL;
   22732             : }
   22733             : 
   22734             : 
   22735           5 : SWIGINTERN PyObject *_wrap_Dataset_IsThreadSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22736           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22737           5 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22738           5 :   int arg2 ;
   22739           5 :   void *argp1 = 0 ;
   22740           5 :   int res1 = 0 ;
   22741           5 :   int val2 ;
   22742           5 :   int ecode2 = 0 ;
   22743           5 :   PyObject *swig_obj[2] ;
   22744           5 :   bool result;
   22745             :   
   22746           5 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_IsThreadSafe", 2, 2, swig_obj)) SWIG_fail;
   22747           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22748           5 :   if (!SWIG_IsOK(res1)) {
   22749           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_IsThreadSafe" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22750             :   }
   22751           5 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22752           5 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   22753           5 :   if (!SWIG_IsOK(ecode2)) {
   22754           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_IsThreadSafe" "', argument " "2"" of type '" "int""'");
   22755             :   } 
   22756           5 :   arg2 = static_cast< int >(val2);
   22757           5 :   {
   22758           5 :     const int bLocalUseExceptions = GetUseExceptions();
   22759           5 :     if ( bLocalUseExceptions ) {
   22760           5 :       pushErrorHandler();
   22761             :     }
   22762           5 :     {
   22763           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22764           5 :       result = (bool)GDALDatasetShadow_IsThreadSafe(arg1,arg2);
   22765           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22766             :     }
   22767           5 :     if ( bLocalUseExceptions ) {
   22768           5 :       popErrorHandler();
   22769             :     }
   22770             : #ifndef SED_HACKS
   22771             :     if ( bLocalUseExceptions ) {
   22772             :       CPLErr eclass = CPLGetLastErrorType();
   22773             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22774             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22775             :       }
   22776             :     }
   22777             : #endif
   22778             :   }
   22779           5 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   22780           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; } }
   22781             :   return resultobj;
   22782             : fail:
   22783             :   return NULL;
   22784             : }
   22785             : 
   22786             : 
   22787           8 : SWIGINTERN PyObject *_wrap_Dataset_GetThreadSafeDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22788           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22789           8 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22790           8 :   int arg2 ;
   22791           8 :   void *argp1 = 0 ;
   22792           8 :   int res1 = 0 ;
   22793           8 :   int val2 ;
   22794           8 :   int ecode2 = 0 ;
   22795           8 :   PyObject *swig_obj[2] ;
   22796           8 :   GDALDatasetShadow *result = 0 ;
   22797             :   
   22798           8 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetThreadSafeDataset", 2, 2, swig_obj)) SWIG_fail;
   22799           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22800           8 :   if (!SWIG_IsOK(res1)) {
   22801           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetThreadSafeDataset" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22802             :   }
   22803           8 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22804           8 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   22805           8 :   if (!SWIG_IsOK(ecode2)) {
   22806           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetThreadSafeDataset" "', argument " "2"" of type '" "int""'");
   22807             :   } 
   22808           8 :   arg2 = static_cast< int >(val2);
   22809           8 :   {
   22810           8 :     const int bLocalUseExceptions = GetUseExceptions();
   22811           8 :     if ( bLocalUseExceptions ) {
   22812           8 :       pushErrorHandler();
   22813             :     }
   22814           8 :     {
   22815           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22816           8 :       result = (GDALDatasetShadow *)GDALDatasetShadow_GetThreadSafeDataset(arg1,arg2);
   22817           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22818             :     }
   22819           8 :     if ( bLocalUseExceptions ) {
   22820           8 :       popErrorHandler();
   22821             :     }
   22822             : #ifndef SED_HACKS
   22823             :     if ( bLocalUseExceptions ) {
   22824             :       CPLErr eclass = CPLGetLastErrorType();
   22825             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22826             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22827             :       }
   22828             :     }
   22829             : #endif
   22830             :   }
   22831           8 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   22832           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; } }
   22833             :   return resultobj;
   22834             : fail:
   22835             :   return NULL;
   22836             : }
   22837             : 
   22838             : 
   22839        1180 : SWIGINTERN PyObject *_wrap_Dataset_GetRootGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22840        1180 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22841        1180 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22842        1180 :   void *argp1 = 0 ;
   22843        1180 :   int res1 = 0 ;
   22844        1180 :   PyObject *swig_obj[1] ;
   22845        1180 :   GDALGroupHS *result = 0 ;
   22846             :   
   22847        1180 :   if (!args) SWIG_fail;
   22848        1180 :   swig_obj[0] = args;
   22849        1180 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22850        1180 :   if (!SWIG_IsOK(res1)) {
   22851           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRootGroup" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22852             :   }
   22853        1180 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22854        1180 :   {
   22855        1180 :     const int bLocalUseExceptions = GetUseExceptions();
   22856        1180 :     if ( bLocalUseExceptions ) {
   22857         339 :       pushErrorHandler();
   22858             :     }
   22859        1180 :     {
   22860        1180 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22861        1180 :       result = (GDALGroupHS *)GDALDatasetShadow_GetRootGroup(arg1);
   22862        1180 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22863             :     }
   22864        1180 :     if ( bLocalUseExceptions ) {
   22865         339 :       popErrorHandler();
   22866             :     }
   22867             : #ifndef SED_HACKS
   22868             :     if ( bLocalUseExceptions ) {
   22869             :       CPLErr eclass = CPLGetLastErrorType();
   22870             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22871             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22872             :       }
   22873             :     }
   22874             : #endif
   22875             :   }
   22876        1180 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   22877        1180 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22878             :   return resultobj;
   22879             : fail:
   22880             :   return NULL;
   22881             : }
   22882             : 
   22883             : 
   22884         454 : SWIGINTERN PyObject *_wrap_Dataset_GetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22885         454 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22886         454 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22887         454 :   void *argp1 = 0 ;
   22888         454 :   int res1 = 0 ;
   22889         454 :   PyObject *swig_obj[1] ;
   22890         454 :   char *result = 0 ;
   22891             :   
   22892         454 :   if (!args) SWIG_fail;
   22893         454 :   swig_obj[0] = args;
   22894         454 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22895         454 :   if (!SWIG_IsOK(res1)) {
   22896           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22897             :   }
   22898         454 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22899         454 :   {
   22900         454 :     const int bLocalUseExceptions = GetUseExceptions();
   22901         454 :     if ( bLocalUseExceptions ) {
   22902         405 :       pushErrorHandler();
   22903             :     }
   22904         454 :     {
   22905         454 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22906         454 :       result = (char *)GDALDatasetShadow_GetProjection(arg1);
   22907         454 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22908             :     }
   22909         454 :     if ( bLocalUseExceptions ) {
   22910         405 :       popErrorHandler();
   22911             :     }
   22912             : #ifndef SED_HACKS
   22913             :     if ( bLocalUseExceptions ) {
   22914             :       CPLErr eclass = CPLGetLastErrorType();
   22915             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22916             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22917             :       }
   22918             :     }
   22919             : #endif
   22920             :   }
   22921         454 :   resultobj = SWIG_FromCharPtr((const char *)result);
   22922         454 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22923             :   return resultobj;
   22924             : fail:
   22925             :   return NULL;
   22926             : }
   22927             : 
   22928             : 
   22929         858 : SWIGINTERN PyObject *_wrap_Dataset_GetProjectionRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22930         858 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22931         858 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22932         858 :   void *argp1 = 0 ;
   22933         858 :   int res1 = 0 ;
   22934         858 :   PyObject *swig_obj[1] ;
   22935         858 :   char *result = 0 ;
   22936             :   
   22937         858 :   if (!args) SWIG_fail;
   22938         858 :   swig_obj[0] = args;
   22939         858 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22940         858 :   if (!SWIG_IsOK(res1)) {
   22941           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjectionRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22942             :   }
   22943         858 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22944         858 :   {
   22945         858 :     const int bLocalUseExceptions = GetUseExceptions();
   22946         858 :     if ( bLocalUseExceptions ) {
   22947         625 :       pushErrorHandler();
   22948             :     }
   22949         858 :     {
   22950         858 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22951         858 :       result = (char *)GDALDatasetShadow_GetProjectionRef(arg1);
   22952         858 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22953             :     }
   22954         858 :     if ( bLocalUseExceptions ) {
   22955         625 :       popErrorHandler();
   22956             :     }
   22957             : #ifndef SED_HACKS
   22958             :     if ( bLocalUseExceptions ) {
   22959             :       CPLErr eclass = CPLGetLastErrorType();
   22960             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22961             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22962             :       }
   22963             :     }
   22964             : #endif
   22965             :   }
   22966         858 :   resultobj = SWIG_FromCharPtr((const char *)result);
   22967         858 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22968             :   return resultobj;
   22969             : fail:
   22970             :   return NULL;
   22971             : }
   22972             : 
   22973             : 
   22974        3788 : SWIGINTERN PyObject *_wrap_Dataset_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22975        3788 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22976        3788 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22977        3788 :   void *argp1 = 0 ;
   22978        3788 :   int res1 = 0 ;
   22979        3788 :   PyObject *swig_obj[1] ;
   22980        3788 :   int result;
   22981             :   
   22982        3788 :   if (!args) SWIG_fail;
   22983        3788 :   swig_obj[0] = args;
   22984        3788 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22985        3788 :   if (!SWIG_IsOK(res1)) {
   22986           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRefCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22987             :   }
   22988        3788 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22989        3788 :   {
   22990        3788 :     const int bLocalUseExceptions = GetUseExceptions();
   22991        3788 :     if ( bLocalUseExceptions ) {
   22992        1241 :       pushErrorHandler();
   22993             :     }
   22994        3788 :     {
   22995        3788 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22996        3788 :       result = (int)GDALDatasetShadow_GetRefCount(arg1);
   22997        3788 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22998             :     }
   22999        3788 :     if ( bLocalUseExceptions ) {
   23000        1241 :       popErrorHandler();
   23001             :     }
   23002             : #ifndef SED_HACKS
   23003             :     if ( bLocalUseExceptions ) {
   23004             :       CPLErr eclass = CPLGetLastErrorType();
   23005             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23006             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23007             :       }
   23008             :     }
   23009             : #endif
   23010             :   }
   23011        3788 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23012        3788 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23013             :   return resultobj;
   23014             : fail:
   23015             :   return NULL;
   23016             : }
   23017             : 
   23018             : 
   23019           0 : SWIGINTERN PyObject *_wrap_Dataset_GetSummaryRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23020           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23021           0 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23022           0 :   void *argp1 = 0 ;
   23023           0 :   int res1 = 0 ;
   23024           0 :   PyObject *swig_obj[1] ;
   23025           0 :   int result;
   23026             :   
   23027           0 :   if (!args) SWIG_fail;
   23028           0 :   swig_obj[0] = args;
   23029           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23030           0 :   if (!SWIG_IsOK(res1)) {
   23031           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetSummaryRefCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23032             :   }
   23033           0 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23034           0 :   {
   23035           0 :     const int bLocalUseExceptions = GetUseExceptions();
   23036           0 :     if ( bLocalUseExceptions ) {
   23037           0 :       pushErrorHandler();
   23038             :     }
   23039           0 :     {
   23040           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23041           0 :       result = (int)GDALDatasetShadow_GetSummaryRefCount(arg1);
   23042           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23043             :     }
   23044           0 :     if ( bLocalUseExceptions ) {
   23045           0 :       popErrorHandler();
   23046             :     }
   23047             : #ifndef SED_HACKS
   23048             :     if ( bLocalUseExceptions ) {
   23049             :       CPLErr eclass = CPLGetLastErrorType();
   23050             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23051             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23052             :       }
   23053             :     }
   23054             : #endif
   23055             :   }
   23056           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23057           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; } }
   23058             :   return resultobj;
   23059             : fail:
   23060             :   return NULL;
   23061             : }
   23062             : 
   23063             : 
   23064        1229 : SWIGINTERN PyObject *_wrap_Dataset_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23065        1229 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23066        1229 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23067        1229 :   void *argp1 = 0 ;
   23068        1229 :   int res1 = 0 ;
   23069        1229 :   PyObject *swig_obj[1] ;
   23070        1229 :   OSRSpatialReferenceShadow *result = 0 ;
   23071             :   
   23072        1229 :   if (!args) SWIG_fail;
   23073        1229 :   swig_obj[0] = args;
   23074        1229 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23075        1229 :   if (!SWIG_IsOK(res1)) {
   23076           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23077             :   }
   23078        1229 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23079        1229 :   {
   23080        1229 :     const int bLocalUseExceptions = GetUseExceptions();
   23081        1229 :     if ( bLocalUseExceptions ) {
   23082         972 :       pushErrorHandler();
   23083             :     }
   23084        1229 :     {
   23085        1229 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23086        1229 :       result = (OSRSpatialReferenceShadow *)GDALDatasetShadow_GetSpatialRef(arg1);
   23087        1229 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23088             :     }
   23089        1229 :     if ( bLocalUseExceptions ) {
   23090         972 :       popErrorHandler();
   23091             :     }
   23092             : #ifndef SED_HACKS
   23093             :     if ( bLocalUseExceptions ) {
   23094             :       CPLErr eclass = CPLGetLastErrorType();
   23095             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23096             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23097             :       }
   23098             :     }
   23099             : #endif
   23100             :   }
   23101        1229 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   23102        1229 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23103             :   return resultobj;
   23104             : fail:
   23105             :   return NULL;
   23106             : }
   23107             : 
   23108             : 
   23109        1630 : SWIGINTERN PyObject *_wrap_Dataset_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23110        1630 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23111        1630 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23112        1630 :   char *arg2 = (char *) 0 ;
   23113        1630 :   void *argp1 = 0 ;
   23114        1630 :   int res1 = 0 ;
   23115        1630 :   int res2 ;
   23116        1630 :   char *buf2 = 0 ;
   23117        1630 :   int alloc2 = 0 ;
   23118        1630 :   PyObject *swig_obj[2] ;
   23119        1630 :   CPLErr result;
   23120             :   
   23121        1630 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetProjection", 2, 2, swig_obj)) SWIG_fail;
   23122        1630 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23123        1630 :   if (!SWIG_IsOK(res1)) {
   23124           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23125             :   }
   23126        1630 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23127        1630 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   23128        1630 :   if (!SWIG_IsOK(res2)) {
   23129           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetProjection" "', argument " "2"" of type '" "char const *""'");
   23130             :   }
   23131        1630 :   arg2 = reinterpret_cast< char * >(buf2);
   23132        1630 :   {
   23133        1630 :     if (!arg2) {
   23134           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   23135             :     }
   23136             :   }
   23137        1630 :   {
   23138        1630 :     const int bLocalUseExceptions = GetUseExceptions();
   23139        1630 :     if ( bLocalUseExceptions ) {
   23140         743 :       pushErrorHandler();
   23141             :     }
   23142        1630 :     {
   23143        1630 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23144        1630 :       result = (CPLErr)GDALDatasetShadow_SetProjection(arg1,(char const *)arg2);
   23145        1630 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23146             :     }
   23147        1630 :     if ( bLocalUseExceptions ) {
   23148         743 :       popErrorHandler();
   23149             :     }
   23150             : #ifndef SED_HACKS
   23151             :     if ( bLocalUseExceptions ) {
   23152             :       CPLErr eclass = CPLGetLastErrorType();
   23153             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23154             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23155             :       }
   23156             :     }
   23157             : #endif
   23158             :   }
   23159        1630 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23160        1630 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23161        1630 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23162             :   return resultobj;
   23163           0 : fail:
   23164           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23165             :   return NULL;
   23166             : }
   23167             : 
   23168             : 
   23169         300 : SWIGINTERN PyObject *_wrap_Dataset_SetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23170         300 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23171         300 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23172         300 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
   23173         300 :   void *argp1 = 0 ;
   23174         300 :   int res1 = 0 ;
   23175         300 :   void *argp2 = 0 ;
   23176         300 :   int res2 = 0 ;
   23177         300 :   PyObject *swig_obj[2] ;
   23178         300 :   CPLErr result;
   23179             :   
   23180         300 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
   23181         300 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23182         300 :   if (!SWIG_IsOK(res1)) {
   23183           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23184             :   }
   23185         300 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23186         300 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   23187         300 :   if (!SWIG_IsOK(res2)) {
   23188           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   23189             :   }
   23190         300 :   arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   23191         300 :   {
   23192         300 :     const int bLocalUseExceptions = GetUseExceptions();
   23193         300 :     if ( bLocalUseExceptions ) {
   23194         162 :       pushErrorHandler();
   23195             :     }
   23196         300 :     {
   23197         300 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23198         300 :       result = (CPLErr)GDALDatasetShadow_SetSpatialRef(arg1,arg2);
   23199         300 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23200             :     }
   23201         300 :     if ( bLocalUseExceptions ) {
   23202         162 :       popErrorHandler();
   23203             :     }
   23204             : #ifndef SED_HACKS
   23205             :     if ( bLocalUseExceptions ) {
   23206             :       CPLErr eclass = CPLGetLastErrorType();
   23207             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23208             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23209             :       }
   23210             :     }
   23211             : #endif
   23212             :   }
   23213         300 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23214         300 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23215             :   return resultobj;
   23216             : fail:
   23217             :   return NULL;
   23218             : }
   23219             : 
   23220             : 
   23221        3955 : SWIGINTERN PyObject *_wrap_Dataset_GetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23222        3955 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23223        3955 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23224        3955 :   double *arg2 ;
   23225        3955 :   int *arg3 = (int *) 0 ;
   23226        3955 :   int *arg4 = (int *) 0 ;
   23227        3955 :   void *argp1 = 0 ;
   23228        3955 :   int res1 = 0 ;
   23229        3955 :   double argout2[6] ;
   23230        3955 :   int isvalid2 ;
   23231        3955 :   int val4 ;
   23232        3955 :   PyObject * obj0 = 0 ;
   23233        3955 :   PyObject * obj1 = 0 ;
   23234        3955 :   char * kwnames[] = {
   23235             :     (char *)"self",  (char *)"can_return_null",  NULL 
   23236             :   };
   23237             :   
   23238        3955 :   {
   23239             :     /* %typemap(in,numinputs=0) (double argout2[6], int* isvalid2) */
   23240        3955 :     arg2 = argout2;
   23241        3955 :     arg3 = &isvalid2;
   23242             :   }
   23243        3955 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_GetGeoTransform", kwnames, &obj0, &obj1)) SWIG_fail;
   23244        3955 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23245        3955 :   if (!SWIG_IsOK(res1)) {
   23246           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23247             :   }
   23248        3955 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23249        3955 :   if (obj1) {
   23250         403 :     {
   23251             :       /* %typemap(in) (int *optional_##int) */
   23252         403 :       if ( obj1 == Py_None ) {
   23253             :         arg4 = 0;
   23254             :       }
   23255         403 :       else if ( PyArg_Parse( obj1,"i" ,&val4 ) ) {
   23256             :         arg4 = (int *) &val4;
   23257             :       }
   23258             :       else {
   23259           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   23260           0 :         SWIG_fail;
   23261             :       }
   23262             :     }
   23263             :   }
   23264        3955 :   {
   23265        3955 :     const int bLocalUseExceptions = GetUseExceptions();
   23266        3955 :     if ( bLocalUseExceptions ) {
   23267        2671 :       pushErrorHandler();
   23268             :     }
   23269        3955 :     {
   23270        3955 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23271        3955 :       GDALDatasetShadow_GetGeoTransform(arg1,arg2,arg3,arg4);
   23272        3955 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23273             :     }
   23274        3955 :     if ( bLocalUseExceptions ) {
   23275        2671 :       popErrorHandler();
   23276             :     }
   23277             : #ifndef SED_HACKS
   23278             :     if ( bLocalUseExceptions ) {
   23279             :       CPLErr eclass = CPLGetLastErrorType();
   23280             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23281             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23282             :       }
   23283             :     }
   23284             : #endif
   23285             :   }
   23286        3955 :   resultobj = SWIG_Py_Void();
   23287        3955 :   {
   23288             :     /* %typemap(argout) (double argout[6], int* isvalid)  */
   23289        3955 :     PyObject *r;
   23290        3955 :     if ( !*arg3 ) {
   23291         125 :       Py_INCREF(Py_None);
   23292         125 :       r = Py_None;
   23293             :     }
   23294             :     else {
   23295        3830 :       r = CreateTupleFromDoubleArray(arg2, 6);
   23296             :     }
   23297             : #if 0x040001 >= 0x040300
   23298             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   23299             : #else
   23300        3955 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   23301             : #endif
   23302             :   }
   23303        3955 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23304             :   return resultobj;
   23305             : fail:
   23306             :   return NULL;
   23307             : }
   23308             : 
   23309             : 
   23310        2907 : SWIGINTERN PyObject *_wrap_Dataset_SetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23311        2907 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23312        2907 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23313        2907 :   double *arg2 ;
   23314        2907 :   void *argp1 = 0 ;
   23315        2907 :   int res1 = 0 ;
   23316        2907 :   double argin2[6] ;
   23317        2907 :   PyObject *swig_obj[2] ;
   23318        2907 :   CPLErr result;
   23319             :   
   23320        2907 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetGeoTransform", 2, 2, swig_obj)) SWIG_fail;
   23321        2907 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23322        2907 :   if (!SWIG_IsOK(res1)) {
   23323           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23324             :   }
   23325        2907 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23326        2907 :   {
   23327             :     /* %typemap(in) (double argin2[ANY]) */
   23328        2907 :     arg2 = argin2;
   23329        2907 :     if (! PySequence_Check(swig_obj[1]) ) {
   23330           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   23331           0 :       SWIG_fail;
   23332             :     }
   23333        2907 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
   23334        2907 :     if ( seq_size != 6 ) {
   23335           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   23336           0 :       SWIG_fail;
   23337             :     }
   23338       20349 :     for (unsigned int i=0; i<6; i++) {
   23339       17442 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   23340       17442 :       double val;
   23341       17442 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   23342           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   23343           0 :         Py_DECREF(o);
   23344           0 :         SWIG_fail;
   23345             :       }
   23346       17442 :       arg2[i] =  val;
   23347       17442 :       Py_DECREF(o);
   23348             :     }
   23349             :   }
   23350        2907 :   {
   23351        2907 :     const int bLocalUseExceptions = GetUseExceptions();
   23352        2907 :     if ( bLocalUseExceptions ) {
   23353        1749 :       pushErrorHandler();
   23354             :     }
   23355        2907 :     {
   23356        2907 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23357        2907 :       result = (CPLErr)GDALDatasetShadow_SetGeoTransform(arg1,arg2);
   23358        2907 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23359             :     }
   23360        2907 :     if ( bLocalUseExceptions ) {
   23361        1749 :       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        2907 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23373        2907 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = 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          10 : SWIGINTERN PyObject *_wrap_Dataset_GetExtent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23381          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23382          10 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23383          10 :   double *arg2 ;
   23384          10 :   int *arg3 = (int *) 0 ;
   23385          10 :   OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) NULL ;
   23386          10 :   void *argp1 = 0 ;
   23387          10 :   int res1 = 0 ;
   23388          10 :   double argout2[4] ;
   23389          10 :   int isvalid2 ;
   23390          10 :   void *argp4 = 0 ;
   23391          10 :   int res4 = 0 ;
   23392          10 :   PyObject * obj0 = 0 ;
   23393          10 :   PyObject * obj1 = 0 ;
   23394          10 :   char * kwnames[] = {
   23395             :     (char *)"self",  (char *)"srs",  NULL 
   23396             :   };
   23397             :   
   23398          10 :   {
   23399             :     /* %typemap(in,numinputs=0) (double argout2[4], int* isvalid2) */
   23400          10 :     arg2 = argout2;
   23401          10 :     arg3 = &isvalid2;
   23402             :   }
   23403          10 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_GetExtent", kwnames, &obj0, &obj1)) SWIG_fail;
   23404          10 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23405          10 :   if (!SWIG_IsOK(res1)) {
   23406           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetExtent" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23407             :   }
   23408          10 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23409          10 :   if (obj1) {
   23410           2 :     res4 = SWIG_ConvertPtr(obj1, &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   23411           2 :     if (!SWIG_IsOK(res4)) {
   23412           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset_GetExtent" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
   23413             :     }
   23414           2 :     arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
   23415             :   }
   23416          10 :   {
   23417          10 :     const int bLocalUseExceptions = GetUseExceptions();
   23418          10 :     if ( bLocalUseExceptions ) {
   23419           2 :       pushErrorHandler();
   23420             :     }
   23421          10 :     {
   23422          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23423          10 :       GDALDatasetShadow_GetExtent(arg1,arg2,arg3,arg4);
   23424          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23425             :     }
   23426          10 :     if ( bLocalUseExceptions ) {
   23427           2 :       popErrorHandler();
   23428             :     }
   23429             : #ifndef SED_HACKS
   23430             :     if ( bLocalUseExceptions ) {
   23431             :       CPLErr eclass = CPLGetLastErrorType();
   23432             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23433             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23434             :       }
   23435             :     }
   23436             : #endif
   23437             :   }
   23438          10 :   resultobj = SWIG_Py_Void();
   23439          10 :   {
   23440             :     /* %typemap(argout) (double argout[4], int* isvalid)  */
   23441          10 :     PyObject *r;
   23442          10 :     if ( !*arg3 ) {
   23443           3 :       Py_INCREF(Py_None);
   23444           3 :       r = Py_None;
   23445             :     }
   23446             :     else {
   23447           7 :       r = CreateTupleFromDoubleArray(arg2, 4);
   23448             :     }
   23449             : #if 0x040001 >= 0x040300
   23450             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   23451             : #else
   23452          10 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   23453             : #endif
   23454             :   }
   23455          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; } }
   23456             :   return resultobj;
   23457             : fail:
   23458             :   return NULL;
   23459             : }
   23460             : 
   23461             : 
   23462           4 : SWIGINTERN PyObject *_wrap_Dataset_GetExtentWGS84LongLat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23463           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23464           4 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23465           4 :   double *arg2 ;
   23466           4 :   int *arg3 = (int *) 0 ;
   23467           4 :   void *argp1 = 0 ;
   23468           4 :   int res1 = 0 ;
   23469           4 :   double argout2[4] ;
   23470           4 :   int isvalid2 ;
   23471           4 :   PyObject *swig_obj[1] ;
   23472             :   
   23473           4 :   {
   23474             :     /* %typemap(in,numinputs=0) (double argout2[4], int* isvalid2) */
   23475           4 :     arg2 = argout2;
   23476           4 :     arg3 = &isvalid2;
   23477             :   }
   23478           4 :   if (!args) SWIG_fail;
   23479           4 :   swig_obj[0] = args;
   23480           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23481           4 :   if (!SWIG_IsOK(res1)) {
   23482           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetExtentWGS84LongLat" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23483             :   }
   23484           4 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23485           4 :   {
   23486           4 :     const int bLocalUseExceptions = GetUseExceptions();
   23487           4 :     if ( bLocalUseExceptions ) {
   23488           2 :       pushErrorHandler();
   23489             :     }
   23490           4 :     {
   23491           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23492           4 :       GDALDatasetShadow_GetExtentWGS84LongLat(arg1,arg2,arg3);
   23493           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23494             :     }
   23495           4 :     if ( bLocalUseExceptions ) {
   23496           2 :       popErrorHandler();
   23497             :     }
   23498             : #ifndef SED_HACKS
   23499             :     if ( bLocalUseExceptions ) {
   23500             :       CPLErr eclass = CPLGetLastErrorType();
   23501             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23502             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23503             :       }
   23504             :     }
   23505             : #endif
   23506             :   }
   23507           4 :   resultobj = SWIG_Py_Void();
   23508           4 :   {
   23509             :     /* %typemap(argout) (double argout[4], int* isvalid)  */
   23510           4 :     PyObject *r;
   23511           4 :     if ( !*arg3 ) {
   23512           2 :       Py_INCREF(Py_None);
   23513           2 :       r = Py_None;
   23514             :     }
   23515             :     else {
   23516           2 :       r = CreateTupleFromDoubleArray(arg2, 4);
   23517             :     }
   23518             : #if 0x040001 >= 0x040300
   23519             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   23520             : #else
   23521           4 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   23522             : #endif
   23523             :   }
   23524           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; } }
   23525             :   return resultobj;
   23526             : fail:
   23527             :   return NULL;
   23528             : }
   23529             : 
   23530             : 
   23531         682 : SWIGINTERN PyObject *_wrap_Dataset_BuildOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23532         682 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23533         682 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23534         682 :   char *arg2 = (char *) "NEAREST" ;
   23535         682 :   int arg3 = (int) 0 ;
   23536         682 :   int *arg4 = (int *) 0 ;
   23537         682 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   23538         682 :   void *arg6 = (void *) NULL ;
   23539         682 :   char **arg7 = (char **) NULL ;
   23540         682 :   void *argp1 = 0 ;
   23541         682 :   int res1 = 0 ;
   23542         682 :   int res2 ;
   23543         682 :   char *buf2 = 0 ;
   23544         682 :   int alloc2 = 0 ;
   23545         682 :   PyObject * obj0 = 0 ;
   23546         682 :   PyObject * obj1 = 0 ;
   23547         682 :   PyObject * obj2 = 0 ;
   23548         682 :   PyObject * obj3 = 0 ;
   23549         682 :   PyObject * obj4 = 0 ;
   23550         682 :   PyObject * obj5 = 0 ;
   23551         682 :   char * kwnames[] = {
   23552             :     (char *)"self",  (char *)"resampling",  (char *)"overviewlist",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   23553             :   };
   23554         682 :   int result;
   23555             :   
   23556             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   23557         682 :   PyProgressData *psProgressInfo;
   23558         682 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   23559         682 :   psProgressInfo->nLastReported = -1;
   23560         682 :   psProgressInfo->psPyCallback = NULL;
   23561         682 :   psProgressInfo->psPyCallbackData = NULL;
   23562         682 :   arg6 = psProgressInfo;
   23563         682 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOO:Dataset_BuildOverviews", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
   23564         682 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23565         682 :   if (!SWIG_IsOK(res1)) {
   23566           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BuildOverviews" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23567             :   }
   23568         682 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23569         682 :   if (obj1) {
   23570         631 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   23571         631 :     if (!SWIG_IsOK(res2)) {
   23572           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_BuildOverviews" "', argument " "2"" of type '" "char const *""'");
   23573             :     }
   23574         631 :     arg2 = reinterpret_cast< char * >(buf2);
   23575             :   }
   23576         682 :   if (obj2) {
   23577         682 :     {
   23578             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   23579         682 :       arg4 = CreateCIntListFromSequence(obj2, &arg3);
   23580         682 :       if( arg3 < 0 ) {
   23581           0 :         SWIG_fail;
   23582             :       }
   23583             :     }
   23584             :   }
   23585         682 :   if (obj3) {
   23586           2 :     {
   23587             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   23588             :       /* callback_func typemap */
   23589             :       
   23590             :       /* In some cases 0 is passed instead of None. */
   23591             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   23592           2 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   23593             :       {
   23594           0 :         if( PyLong_AsLong(obj3) == 0 )
   23595             :         {
   23596           0 :           obj3 = Py_None;
   23597             :         }
   23598             :       }
   23599             :       
   23600           2 :       if (obj3 && obj3 != Py_None ) {
   23601           2 :         void* cbfunction = NULL;
   23602           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   23603             :             (void**)&cbfunction,
   23604             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   23605             :             SWIG_POINTER_EXCEPTION | 0 ));
   23606             :         
   23607           2 :         if ( cbfunction == GDALTermProgress ) {
   23608             :           arg5 = GDALTermProgress;
   23609             :         } else {
   23610           2 :           if (!PyCallable_Check(obj3)) {
   23611           0 :             PyErr_SetString( PyExc_RuntimeError,
   23612             :               "Object given is not a Python function" );
   23613           0 :             SWIG_fail;
   23614             :           }
   23615           2 :           psProgressInfo->psPyCallback = obj3;
   23616           2 :           arg5 = PyProgressProxy;
   23617             :         }
   23618             :         
   23619             :       }
   23620             :       
   23621             :     }
   23622             :   }
   23623         682 :   if (obj4) {
   23624           2 :     {
   23625             :       /* %typemap(in) ( void* callback_data=NULL)  */
   23626           2 :       psProgressInfo->psPyCallbackData = obj4 ;
   23627             :     }
   23628             :   }
   23629         682 :   if (obj5) {
   23630          14 :     {
   23631             :       /* %typemap(in) char **dict */
   23632          14 :       arg7 = NULL;
   23633          14 :       if ( PySequence_Check( obj5 ) ) {
   23634          14 :         int bErr = FALSE;
   23635          14 :         arg7 = CSLFromPySequence(obj5, &bErr);
   23636          14 :         if ( bErr )
   23637             :         {
   23638           0 :           SWIG_fail;
   23639             :         }
   23640             :       }
   23641           0 :       else if ( PyMapping_Check( obj5 ) ) {
   23642           0 :         int bErr = FALSE;
   23643           0 :         arg7 = CSLFromPyMapping(obj5, &bErr);
   23644           0 :         if ( bErr )
   23645             :         {
   23646           0 :           SWIG_fail;
   23647             :         }
   23648             :       }
   23649             :       else {
   23650           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   23651           0 :         SWIG_fail;
   23652             :       }
   23653             :     }
   23654             :   }
   23655         682 :   {
   23656         682 :     const int bLocalUseExceptions = GetUseExceptions();
   23657         682 :     if ( bLocalUseExceptions ) {
   23658         268 :       pushErrorHandler();
   23659             :     }
   23660         682 :     {
   23661         682 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23662         682 :       result = (int)GDALDatasetShadow_BuildOverviews(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   23663         682 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23664             :     }
   23665         682 :     if ( bLocalUseExceptions ) {
   23666         268 :       popErrorHandler();
   23667             :     }
   23668             : #ifndef SED_HACKS
   23669             :     if ( bLocalUseExceptions ) {
   23670             :       CPLErr eclass = CPLGetLastErrorType();
   23671             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23672             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23673             :       }
   23674             :     }
   23675             : #endif
   23676             :   }
   23677         682 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23678         682 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23679         682 :   {
   23680             :     /* %typemap(freearg) (int nList, int* pList) */
   23681         682 :     free(arg4);
   23682             :   }
   23683         682 :   {
   23684             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   23685             :     
   23686         682 :     CPLFree(psProgressInfo);
   23687             :     
   23688             :   }
   23689         682 :   {
   23690             :     /* %typemap(freearg) char **dict */
   23691         682 :     CSLDestroy( arg7 );
   23692             :   }
   23693         696 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23694             :   return resultobj;
   23695           0 : fail:
   23696           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23697           0 :   {
   23698             :     /* %typemap(freearg) (int nList, int* pList) */
   23699           0 :     free(arg4);
   23700             :   }
   23701           0 :   {
   23702             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   23703             :     
   23704           0 :     CPLFree(psProgressInfo);
   23705             :     
   23706             :   }
   23707           0 :   {
   23708             :     /* %typemap(freearg) char **dict */
   23709           0 :     CSLDestroy( arg7 );
   23710             :   }
   23711             :   return NULL;
   23712             : }
   23713             : 
   23714             : 
   23715         117 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23716         117 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23717         117 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23718         117 :   void *argp1 = 0 ;
   23719         117 :   int res1 = 0 ;
   23720         117 :   PyObject *swig_obj[1] ;
   23721         117 :   int result;
   23722             :   
   23723         117 :   if (!args) SWIG_fail;
   23724         117 :   swig_obj[0] = args;
   23725         117 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23726         117 :   if (!SWIG_IsOK(res1)) {
   23727           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23728             :   }
   23729         117 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23730         117 :   {
   23731         117 :     const int bLocalUseExceptions = GetUseExceptions();
   23732         117 :     if ( bLocalUseExceptions ) {
   23733          68 :       pushErrorHandler();
   23734             :     }
   23735         117 :     {
   23736         117 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23737         117 :       result = (int)GDALDatasetShadow_GetGCPCount(arg1);
   23738         117 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23739             :     }
   23740         117 :     if ( bLocalUseExceptions ) {
   23741          68 :       popErrorHandler();
   23742             :     }
   23743             : #ifndef SED_HACKS
   23744             :     if ( bLocalUseExceptions ) {
   23745             :       CPLErr eclass = CPLGetLastErrorType();
   23746             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23747             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23748             :       }
   23749             :     }
   23750             : #endif
   23751             :   }
   23752         117 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23753         117 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23754             :   return resultobj;
   23755             : fail:
   23756             :   return NULL;
   23757             : }
   23758             : 
   23759             : 
   23760         454 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23761         454 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23762         454 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23763         454 :   void *argp1 = 0 ;
   23764         454 :   int res1 = 0 ;
   23765         454 :   PyObject *swig_obj[1] ;
   23766         454 :   char *result = 0 ;
   23767             :   
   23768         454 :   if (!args) SWIG_fail;
   23769         454 :   swig_obj[0] = args;
   23770         454 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23771         454 :   if (!SWIG_IsOK(res1)) {
   23772           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23773             :   }
   23774         454 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23775         454 :   {
   23776         454 :     const int bLocalUseExceptions = GetUseExceptions();
   23777         454 :     if ( bLocalUseExceptions ) {
   23778         436 :       pushErrorHandler();
   23779             :     }
   23780         454 :     {
   23781         454 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23782         454 :       result = (char *)GDALDatasetShadow_GetGCPProjection(arg1);
   23783         454 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23784             :     }
   23785         454 :     if ( bLocalUseExceptions ) {
   23786         436 :       popErrorHandler();
   23787             :     }
   23788             : #ifndef SED_HACKS
   23789             :     if ( bLocalUseExceptions ) {
   23790             :       CPLErr eclass = CPLGetLastErrorType();
   23791             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23792             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23793             :       }
   23794             :     }
   23795             : #endif
   23796             :   }
   23797         454 :   resultobj = SWIG_FromCharPtr((const char *)result);
   23798         454 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23799             :   return resultobj;
   23800             : fail:
   23801             :   return NULL;
   23802             : }
   23803             : 
   23804             : 
   23805         426 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23806         426 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23807         426 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23808         426 :   void *argp1 = 0 ;
   23809         426 :   int res1 = 0 ;
   23810         426 :   PyObject *swig_obj[1] ;
   23811         426 :   OSRSpatialReferenceShadow *result = 0 ;
   23812             :   
   23813         426 :   if (!args) SWIG_fail;
   23814         426 :   swig_obj[0] = args;
   23815         426 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23816         426 :   if (!SWIG_IsOK(res1)) {
   23817           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23818             :   }
   23819         426 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23820         426 :   {
   23821         426 :     const int bLocalUseExceptions = GetUseExceptions();
   23822         426 :     if ( bLocalUseExceptions ) {
   23823         412 :       pushErrorHandler();
   23824             :     }
   23825         426 :     {
   23826         426 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23827         426 :       result = (OSRSpatialReferenceShadow *)GDALDatasetShadow_GetGCPSpatialRef(arg1);
   23828         426 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23829             :     }
   23830         426 :     if ( bLocalUseExceptions ) {
   23831         412 :       popErrorHandler();
   23832             :     }
   23833             : #ifndef SED_HACKS
   23834             :     if ( bLocalUseExceptions ) {
   23835             :       CPLErr eclass = CPLGetLastErrorType();
   23836             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23837             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23838             :       }
   23839             :     }
   23840             : #endif
   23841             :   }
   23842         426 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   23843         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; } }
   23844             :   return resultobj;
   23845             : fail:
   23846             :   return NULL;
   23847             : }
   23848             : 
   23849             : 
   23850         528 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23851         528 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23852         528 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23853         528 :   int *arg2 = (int *) 0 ;
   23854         528 :   GDAL_GCP **arg3 = (GDAL_GCP **) 0 ;
   23855         528 :   void *argp1 = 0 ;
   23856         528 :   int res1 = 0 ;
   23857         528 :   int nGCPs2 = 0 ;
   23858         528 :   GDAL_GCP *pGCPs2 = 0 ;
   23859         528 :   PyObject *swig_obj[1] ;
   23860             :   
   23861         528 :   {
   23862             :     /* %typemap(in,numinputs=0) (int *nGCPs2, GDAL_GCP const **pGCPs2 ) */
   23863         528 :     arg2 = &nGCPs2;
   23864         528 :     arg3 = &pGCPs2;
   23865             :   }
   23866         528 :   if (!args) SWIG_fail;
   23867         528 :   swig_obj[0] = args;
   23868         528 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23869         528 :   if (!SWIG_IsOK(res1)) {
   23870           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23871             :   }
   23872         528 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23873         528 :   {
   23874         528 :     const int bLocalUseExceptions = GetUseExceptions();
   23875         528 :     if ( bLocalUseExceptions ) {
   23876         495 :       pushErrorHandler();
   23877             :     }
   23878         528 :     {
   23879         528 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23880         528 :       GDALDatasetShadow_GetGCPs(arg1,arg2,(GDAL_GCP const **)arg3);
   23881         528 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23882             :     }
   23883         528 :     if ( bLocalUseExceptions ) {
   23884         495 :       popErrorHandler();
   23885             :     }
   23886             : #ifndef SED_HACKS
   23887             :     if ( bLocalUseExceptions ) {
   23888             :       CPLErr eclass = CPLGetLastErrorType();
   23889             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23890             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23891             :       }
   23892             :     }
   23893             : #endif
   23894             :   }
   23895         528 :   resultobj = SWIG_Py_Void();
   23896         528 :   {
   23897             :     /* %typemap(argout) (int *nGCPs, GDAL_GCP const **pGCPs ) */
   23898         528 :     PyObject *dict = PyTuple_New( *arg2 );
   23899        3826 :     for( int i = 0; i < *arg2; i++ ) {
   23900        6596 :       GDAL_GCP *o = new_GDAL_GCP( (*arg3)[i].dfGCPX,
   23901             :         (*arg3)[i].dfGCPY,
   23902             :         (*arg3)[i].dfGCPZ,
   23903             :         (*arg3)[i].dfGCPPixel,
   23904             :         (*arg3)[i].dfGCPLine,
   23905        3298 :         (*arg3)[i].pszInfo,
   23906        3298 :         (*arg3)[i].pszId );
   23907             :       
   23908        3298 :       PyTuple_SetItem(dict, i,
   23909             :         SWIG_NewPointerObj((void*)o,SWIGTYPE_p_GDAL_GCP,1) );
   23910             :     }
   23911         528 :     Py_DECREF(resultobj);
   23912         528 :     resultobj = dict;
   23913             :   }
   23914         528 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23915             :   return resultobj;
   23916             : fail:
   23917             :   return NULL;
   23918             : }
   23919             : 
   23920             : 
   23921          28 : SWIGINTERN PyObject *_wrap_Dataset__SetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23922          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23923          28 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23924          28 :   int arg2 ;
   23925          28 :   GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
   23926          28 :   char *arg4 = (char *) 0 ;
   23927          28 :   void *argp1 = 0 ;
   23928          28 :   int res1 = 0 ;
   23929          28 :   GDAL_GCP *tmpGCPList2 ;
   23930          28 :   int res4 ;
   23931          28 :   char *buf4 = 0 ;
   23932          28 :   int alloc4 = 0 ;
   23933          28 :   PyObject *swig_obj[3] ;
   23934          28 :   CPLErr result;
   23935             :   
   23936          28 :   if (!SWIG_Python_UnpackTuple(args, "Dataset__SetGCPs", 3, 3, swig_obj)) SWIG_fail;
   23937          28 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23938          28 :   if (!SWIG_IsOK(res1)) {
   23939           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__SetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23940             :   }
   23941          28 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23942          28 :   {
   23943             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   23944             :     /* check if is List */
   23945          28 :     if ( !PySequence_Check(swig_obj[1]) ) {
   23946           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   23947           0 :       SWIG_fail;
   23948             :     }
   23949          28 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   23950          28 :     if( size > (Py_ssize_t)INT_MAX ) {
   23951           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   23952           0 :       SWIG_fail;
   23953             :     }
   23954          28 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   23955           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   23956           0 :       SWIG_fail;
   23957             :     }
   23958          28 :     arg2 = (int)size;
   23959          28 :     tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
   23960          28 :     if( !tmpGCPList2 ) {
   23961           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   23962           0 :       SWIG_fail;
   23963             :     }
   23964          91 :     arg3 = tmpGCPList2;
   23965          91 :     for( int i = 0; i<arg2; i++ ) {
   23966          63 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   23967          63 :       GDAL_GCP *item = 0;
   23968          63 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   23969          63 :       if ( ! item ) {
   23970           0 :         Py_DECREF(o);
   23971           0 :         SWIG_fail;
   23972             :       }
   23973          63 :       memcpy( tmpGCPList2 + i, item, sizeof( GDAL_GCP ) );
   23974          63 :       Py_DECREF(o);
   23975             :     }
   23976             :   }
   23977          28 :   res4 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf4, NULL, &alloc4);
   23978          28 :   if (!SWIG_IsOK(res4)) {
   23979           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset__SetGCPs" "', argument " "4"" of type '" "char const *""'");
   23980             :   }
   23981          28 :   arg4 = reinterpret_cast< char * >(buf4);
   23982          28 :   {
   23983          28 :     const int bLocalUseExceptions = GetUseExceptions();
   23984          28 :     if ( bLocalUseExceptions ) {
   23985          14 :       pushErrorHandler();
   23986             :     }
   23987          28 :     {
   23988          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23989          28 :       result = (CPLErr)GDALDatasetShadow_SetGCPs(arg1,arg2,(GDAL_GCP const *)arg3,(char const *)arg4);
   23990          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23991             :     }
   23992          28 :     if ( bLocalUseExceptions ) {
   23993          14 :       popErrorHandler();
   23994             :     }
   23995             : #ifndef SED_HACKS
   23996             :     if ( bLocalUseExceptions ) {
   23997             :       CPLErr eclass = CPLGetLastErrorType();
   23998             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23999             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24000             :       }
   24001             :     }
   24002             : #endif
   24003             :   }
   24004          28 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24005          28 :   {
   24006             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   24007          28 :     free( arg3 );
   24008             :   }
   24009          28 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   24010          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; } }
   24011             :   return resultobj;
   24012           0 : fail:
   24013           0 :   {
   24014             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   24015           0 :     free( arg3 );
   24016             :   }
   24017           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   24018             :   return NULL;
   24019             : }
   24020             : 
   24021             : 
   24022           9 : SWIGINTERN PyObject *_wrap_Dataset__SetGCPs2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24023           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24024           9 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24025           9 :   int arg2 ;
   24026           9 :   GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
   24027           9 :   OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
   24028           9 :   void *argp1 = 0 ;
   24029           9 :   int res1 = 0 ;
   24030           9 :   GDAL_GCP *tmpGCPList2 ;
   24031           9 :   void *argp4 = 0 ;
   24032           9 :   int res4 = 0 ;
   24033           9 :   PyObject *swig_obj[3] ;
   24034           9 :   CPLErr result;
   24035             :   
   24036           9 :   if (!SWIG_Python_UnpackTuple(args, "Dataset__SetGCPs2", 3, 3, swig_obj)) SWIG_fail;
   24037           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24038           9 :   if (!SWIG_IsOK(res1)) {
   24039           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__SetGCPs2" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24040             :   }
   24041           9 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24042           9 :   {
   24043             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   24044             :     /* check if is List */
   24045           9 :     if ( !PySequence_Check(swig_obj[1]) ) {
   24046           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   24047           0 :       SWIG_fail;
   24048             :     }
   24049           9 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   24050           9 :     if( size > (Py_ssize_t)INT_MAX ) {
   24051           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   24052           0 :       SWIG_fail;
   24053             :     }
   24054           9 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   24055           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   24056           0 :       SWIG_fail;
   24057             :     }
   24058           9 :     arg2 = (int)size;
   24059           9 :     tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
   24060           9 :     if( !tmpGCPList2 ) {
   24061           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   24062           0 :       SWIG_fail;
   24063             :     }
   24064       21871 :     arg3 = tmpGCPList2;
   24065       21871 :     for( int i = 0; i<arg2; i++ ) {
   24066       21862 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   24067       21862 :       GDAL_GCP *item = 0;
   24068       21862 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   24069       21862 :       if ( ! item ) {
   24070           0 :         Py_DECREF(o);
   24071           0 :         SWIG_fail;
   24072             :       }
   24073       21862 :       memcpy( tmpGCPList2 + i, item, sizeof( GDAL_GCP ) );
   24074       21862 :       Py_DECREF(o);
   24075             :     }
   24076             :   }
   24077           9 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   24078           9 :   if (!SWIG_IsOK(res4)) {
   24079           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset__SetGCPs2" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
   24080             :   }
   24081           9 :   arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
   24082           9 :   {
   24083           9 :     const int bLocalUseExceptions = GetUseExceptions();
   24084           9 :     if ( bLocalUseExceptions ) {
   24085           1 :       pushErrorHandler();
   24086             :     }
   24087           9 :     {
   24088           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24089           9 :       result = (CPLErr)GDALDatasetShadow_SetGCPs2(arg1,arg2,(GDAL_GCP const *)arg3,arg4);
   24090           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24091             :     }
   24092           9 :     if ( bLocalUseExceptions ) {
   24093           1 :       popErrorHandler();
   24094             :     }
   24095             : #ifndef SED_HACKS
   24096             :     if ( bLocalUseExceptions ) {
   24097             :       CPLErr eclass = CPLGetLastErrorType();
   24098             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24099             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24100             :       }
   24101             :     }
   24102             : #endif
   24103             :   }
   24104           9 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24105           9 :   {
   24106             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   24107           9 :     free( arg3 );
   24108             :   }
   24109           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; } }
   24110             :   return resultobj;
   24111           0 : fail:
   24112           0 :   {
   24113             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   24114           0 :     free( arg3 );
   24115             :   }
   24116           0 :   return NULL;
   24117             : }
   24118             : 
   24119             : 
   24120        1623 : SWIGINTERN PyObject *_wrap_Dataset_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24121        1623 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24122        1623 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24123        1623 :   void *argp1 = 0 ;
   24124        1623 :   int res1 = 0 ;
   24125        1623 :   PyObject *swig_obj[1] ;
   24126        1623 :   CPLErr result;
   24127             :   
   24128        1623 :   if (!args) SWIG_fail;
   24129        1623 :   swig_obj[0] = args;
   24130        1623 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24131        1623 :   if (!SWIG_IsOK(res1)) {
   24132           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_FlushCache" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24133             :   }
   24134        1623 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24135        1623 :   {
   24136        1623 :     const int bLocalUseExceptions = GetUseExceptions();
   24137        1623 :     if ( bLocalUseExceptions ) {
   24138         399 :       pushErrorHandler();
   24139             :     }
   24140        1623 :     {
   24141        1623 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24142        1623 :       result = (CPLErr)GDALDatasetShadow_FlushCache(arg1);
   24143        1623 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24144             :     }
   24145        1623 :     if ( bLocalUseExceptions ) {
   24146         399 :       popErrorHandler();
   24147             :     }
   24148             : #ifndef SED_HACKS
   24149             :     if ( bLocalUseExceptions ) {
   24150             :       CPLErr eclass = CPLGetLastErrorType();
   24151             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24152             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24153             :       }
   24154             :     }
   24155             : #endif
   24156             :   }
   24157        1623 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24158        1625 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   24159             :   return resultobj;
   24160             : fail:
   24161             :   return NULL;
   24162             : }
   24163             : 
   24164             : 
   24165          30 : SWIGINTERN PyObject *_wrap_Dataset_AddBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   24166          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24167          30 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24168          30 :   GDALDataType arg2 = (GDALDataType) GDT_Byte ;
   24169          30 :   char **arg3 = (char **) 0 ;
   24170          30 :   void *argp1 = 0 ;
   24171          30 :   int res1 = 0 ;
   24172          30 :   PyObject * obj0 = 0 ;
   24173          30 :   PyObject * obj1 = 0 ;
   24174          30 :   PyObject * obj2 = 0 ;
   24175          30 :   char * kwnames[] = {
   24176             :     (char *)"self",  (char *)"datatype",  (char *)"options",  NULL 
   24177             :   };
   24178          30 :   CPLErr result;
   24179             :   
   24180          30 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Dataset_AddBand", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   24181          30 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24182          30 :   if (!SWIG_IsOK(res1)) {
   24183           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24184             :   }
   24185          30 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24186          30 :   if (obj1) {
   24187          24 :     {
   24188             :       // %typemap(in) GDALDataType
   24189          24 :       int val = 0;
   24190          24 :       int ecode = SWIG_AsVal_int(obj1, &val);
   24191          24 :       if (!SWIG_IsOK(ecode)) {
   24192           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   24193             :       }
   24194          24 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   24195             :       {
   24196           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   24197             :       }
   24198             :       arg2 = static_cast<GDALDataType>(val);
   24199             :     }
   24200             :   }
   24201          30 :   if (obj2) {
   24202          15 :     {
   24203             :       /* %typemap(in) char **dict */
   24204          15 :       arg3 = NULL;
   24205          15 :       if ( PySequence_Check( obj2 ) ) {
   24206          15 :         int bErr = FALSE;
   24207          15 :         arg3 = CSLFromPySequence(obj2, &bErr);
   24208          15 :         if ( bErr )
   24209             :         {
   24210           0 :           SWIG_fail;
   24211             :         }
   24212             :       }
   24213           0 :       else if ( PyMapping_Check( obj2 ) ) {
   24214           0 :         int bErr = FALSE;
   24215           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   24216           0 :         if ( bErr )
   24217             :         {
   24218           0 :           SWIG_fail;
   24219             :         }
   24220             :       }
   24221             :       else {
   24222           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   24223           0 :         SWIG_fail;
   24224             :       }
   24225             :     }
   24226             :   }
   24227          30 :   {
   24228          30 :     const int bLocalUseExceptions = GetUseExceptions();
   24229          30 :     if ( bLocalUseExceptions ) {
   24230          20 :       pushErrorHandler();
   24231             :     }
   24232          30 :     {
   24233          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24234          30 :       result = (CPLErr)GDALDatasetShadow_AddBand(arg1,arg2,arg3);
   24235          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24236             :     }
   24237          30 :     if ( bLocalUseExceptions ) {
   24238          20 :       popErrorHandler();
   24239             :     }
   24240             : #ifndef SED_HACKS
   24241             :     if ( bLocalUseExceptions ) {
   24242             :       CPLErr eclass = CPLGetLastErrorType();
   24243             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24244             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24245             :       }
   24246             :     }
   24247             : #endif
   24248             :   }
   24249          30 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24250          30 :   {
   24251             :     /* %typemap(freearg) char **dict */
   24252          30 :     CSLDestroy( arg3 );
   24253             :   }
   24254          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; } }
   24255             :   return resultobj;
   24256           0 : fail:
   24257           0 :   {
   24258             :     /* %typemap(freearg) char **dict */
   24259           0 :     CSLDestroy( arg3 );
   24260             :   }
   24261             :   return NULL;
   24262             : }
   24263             : 
   24264             : 
   24265          57 : SWIGINTERN PyObject *_wrap_Dataset_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24266          57 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24267          57 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24268          57 :   int arg2 ;
   24269          57 :   void *argp1 = 0 ;
   24270          57 :   int res1 = 0 ;
   24271          57 :   int val2 ;
   24272          57 :   int ecode2 = 0 ;
   24273          57 :   PyObject *swig_obj[2] ;
   24274          57 :   CPLErr result;
   24275             :   
   24276          57 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_CreateMaskBand", 2, 2, swig_obj)) SWIG_fail;
   24277          57 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24278          57 :   if (!SWIG_IsOK(res1)) {
   24279           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateMaskBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24280             :   }
   24281          57 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24282          57 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   24283          57 :   if (!SWIG_IsOK(ecode2)) {
   24284           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   24285             :   } 
   24286          57 :   arg2 = static_cast< int >(val2);
   24287          57 :   {
   24288          57 :     const int bLocalUseExceptions = GetUseExceptions();
   24289          57 :     if ( bLocalUseExceptions ) {
   24290          19 :       pushErrorHandler();
   24291             :     }
   24292          57 :     {
   24293          57 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24294          57 :       result = (CPLErr)GDALDatasetShadow_CreateMaskBand(arg1,arg2);
   24295          57 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24296             :     }
   24297          57 :     if ( bLocalUseExceptions ) {
   24298          19 :       popErrorHandler();
   24299             :     }
   24300             : #ifndef SED_HACKS
   24301             :     if ( bLocalUseExceptions ) {
   24302             :       CPLErr eclass = CPLGetLastErrorType();
   24303             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24304             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24305             :       }
   24306             :     }
   24307             : #endif
   24308             :   }
   24309          57 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24310          59 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   24311             :   return resultobj;
   24312             : fail:
   24313             :   return NULL;
   24314             : }
   24315             : 
   24316             : 
   24317         460 : SWIGINTERN PyObject *_wrap_Dataset_GetFileList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24318         460 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24319         460 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24320         460 :   void *argp1 = 0 ;
   24321         460 :   int res1 = 0 ;
   24322         460 :   PyObject *swig_obj[1] ;
   24323         460 :   char **result = 0 ;
   24324             :   
   24325         460 :   if (!args) SWIG_fail;
   24326         460 :   swig_obj[0] = args;
   24327         460 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24328         460 :   if (!SWIG_IsOK(res1)) {
   24329           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFileList" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24330             :   }
   24331         460 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24332         460 :   {
   24333         460 :     const int bLocalUseExceptions = GetUseExceptions();
   24334         460 :     if ( bLocalUseExceptions ) {
   24335         315 :       pushErrorHandler();
   24336             :     }
   24337         460 :     {
   24338         460 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24339         460 :       result = (char **)GDALDatasetShadow_GetFileList(arg1);
   24340         460 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24341             :     }
   24342         460 :     if ( bLocalUseExceptions ) {
   24343         315 :       popErrorHandler();
   24344             :     }
   24345             : #ifndef SED_HACKS
   24346             :     if ( bLocalUseExceptions ) {
   24347             :       CPLErr eclass = CPLGetLastErrorType();
   24348             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24349             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24350             :       }
   24351             :     }
   24352             : #endif
   24353             :   }
   24354         460 :   {
   24355             :     /* %typemap(out) char **CSL -> ( string ) */
   24356         460 :     bool bErr = false;
   24357         460 :     resultobj = CSLToList(result, &bErr);
   24358         460 :     CSLDestroy(result);
   24359         460 :     if( bErr ) {
   24360           0 :       SWIG_fail;
   24361             :     }
   24362             :   }
   24363         462 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   24364             :   return resultobj;
   24365             : fail:
   24366             :   return NULL;
   24367             : }
   24368             : 
   24369             : 
   24370      176461 : SWIGINTERN PyObject *_wrap_Dataset_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   24371      176461 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24372      176461 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24373      176461 :   int arg2 ;
   24374      176461 :   int arg3 ;
   24375      176461 :   int arg4 ;
   24376      176461 :   int arg5 ;
   24377      176461 :   GIntBig arg6 ;
   24378      176461 :   char *arg7 = (char *) 0 ;
   24379      176461 :   int *arg8 = (int *) 0 ;
   24380      176461 :   int *arg9 = (int *) 0 ;
   24381      176461 :   GDALDataType *arg10 = (GDALDataType *) 0 ;
   24382      176461 :   int arg11 = (int) 0 ;
   24383      176461 :   int *arg12 = (int *) 0 ;
   24384      176461 :   GIntBig *arg13 = (GIntBig *) 0 ;
   24385      176461 :   GIntBig *arg14 = (GIntBig *) 0 ;
   24386      176461 :   GIntBig *arg15 = (GIntBig *) 0 ;
   24387      176461 :   void *argp1 = 0 ;
   24388      176461 :   int res1 = 0 ;
   24389      176461 :   int val2 ;
   24390      176461 :   int ecode2 = 0 ;
   24391      176461 :   int val3 ;
   24392      176461 :   int ecode3 = 0 ;
   24393      176461 :   int val4 ;
   24394      176461 :   int ecode4 = 0 ;
   24395      176461 :   int val5 ;
   24396      176461 :   int ecode5 = 0 ;
   24397      176461 :   int alloc6 = 0 ;
   24398      176461 :   bool viewIsValid6 = false ;
   24399      176461 :   Py_buffer view6 ;
   24400      176461 :   int val8 ;
   24401      176461 :   int val9 ;
   24402      176461 :   GDALDataType val10 ;
   24403      176461 :   GIntBig val13 ;
   24404      176461 :   GIntBig val14 ;
   24405      176461 :   GIntBig val15 ;
   24406      176461 :   PyObject * obj0 = 0 ;
   24407      176461 :   PyObject * obj1 = 0 ;
   24408      176461 :   PyObject * obj2 = 0 ;
   24409      176461 :   PyObject * obj3 = 0 ;
   24410      176461 :   PyObject * obj4 = 0 ;
   24411      176461 :   PyObject * obj5 = 0 ;
   24412      176461 :   PyObject * obj6 = 0 ;
   24413      176461 :   PyObject * obj7 = 0 ;
   24414      176461 :   PyObject * obj8 = 0 ;
   24415      176461 :   PyObject * obj9 = 0 ;
   24416      176461 :   PyObject * obj10 = 0 ;
   24417      176461 :   PyObject * obj11 = 0 ;
   24418      176461 :   PyObject * obj12 = 0 ;
   24419      176461 :   char * kwnames[] = {
   24420             :     (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 
   24421             :   };
   24422      176461 :   CPLErr result;
   24423             :   
   24424      176461 :   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;
   24425      176461 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24426      176461 :   if (!SWIG_IsOK(res1)) {
   24427           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_WriteRaster" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24428             :   }
   24429      176461 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24430      176461 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   24431      176461 :   if (!SWIG_IsOK(ecode2)) {
   24432           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_WriteRaster" "', argument " "2"" of type '" "int""'");
   24433             :   } 
   24434      176461 :   arg2 = static_cast< int >(val2);
   24435      176461 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   24436      176461 :   if (!SWIG_IsOK(ecode3)) {
   24437           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_WriteRaster" "', argument " "3"" of type '" "int""'");
   24438             :   } 
   24439      176461 :   arg3 = static_cast< int >(val3);
   24440      176461 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   24441      176461 :   if (!SWIG_IsOK(ecode4)) {
   24442           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_WriteRaster" "', argument " "4"" of type '" "int""'");
   24443             :   } 
   24444      176461 :   arg4 = static_cast< int >(val4);
   24445      176461 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   24446      176461 :   if (!SWIG_IsOK(ecode5)) {
   24447           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_WriteRaster" "', argument " "5"" of type '" "int""'");
   24448             :   } 
   24449      176461 :   arg5 = static_cast< int >(val5);
   24450      176461 :   {
   24451             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   24452      176461 :     char* ptr = NULL;
   24453      176461 :     if( !GetBufferAsCharPtrGIntBigSize(obj5, &arg6, &ptr, &alloc6, &viewIsValid6, &view6) ) {
   24454           1 :       SWIG_fail;
   24455             :     }
   24456      176460 :     arg7 = (char *)ptr;
   24457             :   }
   24458      176460 :   if (obj6) {
   24459      176460 :     {
   24460             :       /* %typemap(in) (int *optional_##int) */
   24461      176460 :       if ( obj6 == Py_None ) {
   24462             :         arg8 = 0;
   24463             :       }
   24464      176460 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   24465             :         arg8 = (int *) &val8;
   24466             :       }
   24467             :       else {
   24468           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24469           0 :         SWIG_fail;
   24470             :       }
   24471             :     }
   24472             :   }
   24473      176460 :   if (obj7) {
   24474      176460 :     {
   24475             :       /* %typemap(in) (int *optional_##int) */
   24476      176460 :       if ( obj7 == Py_None ) {
   24477             :         arg9 = 0;
   24478             :       }
   24479      176460 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   24480             :         arg9 = (int *) &val9;
   24481             :       }
   24482             :       else {
   24483           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24484           0 :         SWIG_fail;
   24485             :       }
   24486             :     }
   24487             :   }
   24488      176460 :   if (obj8) {
   24489      176460 :     {
   24490             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   24491      176460 :       int intval = 0;
   24492      176460 :       if ( obj8 == Py_None ) {
   24493             :         arg10 = NULL;
   24494             :       }
   24495      352920 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj8, &intval)) ) {
   24496      176460 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   24497             :         {
   24498           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   24499             :         }
   24500      176460 :         val10 = static_cast<GDALDataType>(intval);
   24501      176460 :         arg10 = &val10;
   24502             :       }
   24503             :       else {
   24504           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24505           0 :         SWIG_fail;
   24506             :       }
   24507             :     }
   24508             :   }
   24509      176460 :   if (obj9) {
   24510      176460 :     {
   24511             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24512      176460 :       arg12 = CreateCIntListFromSequence(obj9, &arg11);
   24513      176460 :       if( arg11 < 0 ) {
   24514           0 :         SWIG_fail;
   24515             :       }
   24516             :     }
   24517             :   }
   24518      176460 :   if (obj10) {
   24519      176460 :     {
   24520             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24521      176460 :       if ( obj10 == Py_None ) {
   24522             :         arg13 = 0;
   24523             :       }
   24524          24 :       else if ( PyArg_Parse( obj10,"L" ,&val13 ) ) {
   24525             :         arg13 = (GIntBig *) &val13;
   24526             :       }
   24527             :       else {
   24528           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24529           0 :         SWIG_fail;
   24530             :       }
   24531             :     }
   24532             :   }
   24533      176460 :   if (obj11) {
   24534      176460 :     {
   24535             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24536      176460 :       if ( obj11 == Py_None ) {
   24537             :         arg14 = 0;
   24538             :       }
   24539          12 :       else if ( PyArg_Parse( obj11,"L" ,&val14 ) ) {
   24540             :         arg14 = (GIntBig *) &val14;
   24541             :       }
   24542             :       else {
   24543           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24544           0 :         SWIG_fail;
   24545             :       }
   24546             :     }
   24547             :   }
   24548      176460 :   if (obj12) {
   24549      176460 :     {
   24550             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24551      176460 :       if ( obj12 == Py_None ) {
   24552             :         arg15 = 0;
   24553             :       }
   24554          24 :       else if ( PyArg_Parse( obj12,"L" ,&val15 ) ) {
   24555             :         arg15 = (GIntBig *) &val15;
   24556             :       }
   24557             :       else {
   24558           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24559           0 :         SWIG_fail;
   24560             :       }
   24561             :     }
   24562             :   }
   24563      176460 :   {
   24564      176460 :     const int bLocalUseExceptions = GetUseExceptions();
   24565      176460 :     if ( bLocalUseExceptions ) {
   24566      172409 :       pushErrorHandler();
   24567             :     }
   24568      176460 :     {
   24569      176460 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24570      176460 :       result = (CPLErr)GDALDatasetShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   24571      176460 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24572             :     }
   24573      176460 :     if ( bLocalUseExceptions ) {
   24574      172409 :       popErrorHandler();
   24575             :     }
   24576             : #ifndef SED_HACKS
   24577             :     if ( bLocalUseExceptions ) {
   24578             :       CPLErr eclass = CPLGetLastErrorType();
   24579             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24580             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24581             :       }
   24582             :     }
   24583             : #endif
   24584             :   }
   24585      176460 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24586      176460 :   {
   24587             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   24588      176460 :     if( viewIsValid6 ) {
   24589      175450 :       PyBuffer_Release(&view6);
   24590             :     }
   24591        1010 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   24592        1010 :       delete[] arg7;
   24593             :     }
   24594             :   }
   24595      176460 :   {
   24596             :     /* %typemap(freearg) (int nList, int* pList) */
   24597      176460 :     free(arg12);
   24598             :   }
   24599      176463 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   24600             :   return resultobj;
   24601           1 : fail:
   24602           1 :   {
   24603             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   24604           1 :     if( viewIsValid6 ) {
   24605           0 :       PyBuffer_Release(&view6);
   24606             :     }
   24607           1 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   24608           0 :       delete[] arg7;
   24609             :     }
   24610             :   }
   24611           1 :   {
   24612             :     /* %typemap(freearg) (int nList, int* pList) */
   24613           1 :     free(arg12);
   24614             :   }
   24615           1 :   return NULL;
   24616             : }
   24617             : 
   24618             : 
   24619           1 : SWIGINTERN PyObject *_wrap_Dataset_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24620           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24621           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24622           1 :   int arg2 ;
   24623           1 :   int arg3 ;
   24624           1 :   int arg4 ;
   24625           1 :   int arg5 ;
   24626           1 :   int *arg6 = (int *) 0 ;
   24627           1 :   int *arg7 = (int *) 0 ;
   24628           1 :   GDALDataType *arg8 = (GDALDataType *) 0 ;
   24629           1 :   int arg9 = (int) 0 ;
   24630           1 :   int *arg10 = (int *) 0 ;
   24631           1 :   char **arg11 = (char **) NULL ;
   24632           1 :   void *argp1 = 0 ;
   24633           1 :   int res1 = 0 ;
   24634           1 :   int val2 ;
   24635           1 :   int ecode2 = 0 ;
   24636           1 :   int val3 ;
   24637           1 :   int ecode3 = 0 ;
   24638           1 :   int val4 ;
   24639           1 :   int ecode4 = 0 ;
   24640           1 :   int val5 ;
   24641           1 :   int ecode5 = 0 ;
   24642           1 :   void *argp6 = 0 ;
   24643           1 :   int res6 = 0 ;
   24644           1 :   void *argp7 = 0 ;
   24645           1 :   int res7 = 0 ;
   24646           1 :   int val8 ;
   24647           1 :   PyObject *swig_obj[10] ;
   24648           1 :   CPLErr result;
   24649             :   
   24650           1 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AdviseRead", 5, 10, swig_obj)) SWIG_fail;
   24651           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24652           1 :   if (!SWIG_IsOK(res1)) {
   24653           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AdviseRead" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24654             :   }
   24655           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24656           1 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   24657           1 :   if (!SWIG_IsOK(ecode2)) {
   24658           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_AdviseRead" "', argument " "2"" of type '" "int""'");
   24659             :   } 
   24660           1 :   arg2 = static_cast< int >(val2);
   24661           1 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   24662           1 :   if (!SWIG_IsOK(ecode3)) {
   24663           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_AdviseRead" "', argument " "3"" of type '" "int""'");
   24664             :   } 
   24665           1 :   arg3 = static_cast< int >(val3);
   24666           1 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   24667           1 :   if (!SWIG_IsOK(ecode4)) {
   24668           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_AdviseRead" "', argument " "4"" of type '" "int""'");
   24669             :   } 
   24670           1 :   arg4 = static_cast< int >(val4);
   24671           1 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   24672           1 :   if (!SWIG_IsOK(ecode5)) {
   24673           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_AdviseRead" "', argument " "5"" of type '" "int""'");
   24674             :   } 
   24675           1 :   arg5 = static_cast< int >(val5);
   24676           1 :   if (swig_obj[5]) {
   24677           0 :     res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
   24678           0 :     if (!SWIG_IsOK(res6)) {
   24679           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Dataset_AdviseRead" "', argument " "6"" of type '" "int *""'"); 
   24680             :     }
   24681           0 :     arg6 = reinterpret_cast< int * >(argp6);
   24682             :   }
   24683           1 :   if (swig_obj[6]) {
   24684           0 :     res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
   24685           0 :     if (!SWIG_IsOK(res7)) {
   24686           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Dataset_AdviseRead" "', argument " "7"" of type '" "int *""'"); 
   24687             :     }
   24688           0 :     arg7 = reinterpret_cast< int * >(argp7);
   24689             :   }
   24690           1 :   if (swig_obj[7]) {
   24691           0 :     {
   24692             :       /* %typemap(in) (int *optional_##int) */
   24693           0 :       if ( swig_obj[7] == Py_None ) {
   24694             :         arg8 = 0;
   24695             :       }
   24696           0 :       else if ( PyArg_Parse( swig_obj[7],"i" ,&val8 ) ) {
   24697             :         arg8 = (GDALDataType *) &val8;
   24698             :       }
   24699             :       else {
   24700           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24701           0 :         SWIG_fail;
   24702             :       }
   24703             :     }
   24704             :   }
   24705           1 :   if (swig_obj[8]) {
   24706           0 :     {
   24707             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24708           0 :       arg10 = CreateCIntListFromSequence(swig_obj[8], &arg9);
   24709           0 :       if( arg9 < 0 ) {
   24710           0 :         SWIG_fail;
   24711             :       }
   24712             :     }
   24713             :   }
   24714           1 :   if (swig_obj[9]) {
   24715           0 :     {
   24716             :       /* %typemap(in) char **dict */
   24717           0 :       arg11 = NULL;
   24718           0 :       if ( PySequence_Check( swig_obj[9] ) ) {
   24719           0 :         int bErr = FALSE;
   24720           0 :         arg11 = CSLFromPySequence(swig_obj[9], &bErr);
   24721           0 :         if ( bErr )
   24722             :         {
   24723           0 :           SWIG_fail;
   24724             :         }
   24725             :       }
   24726           0 :       else if ( PyMapping_Check( swig_obj[9] ) ) {
   24727           0 :         int bErr = FALSE;
   24728           0 :         arg11 = CSLFromPyMapping(swig_obj[9], &bErr);
   24729           0 :         if ( bErr )
   24730             :         {
   24731           0 :           SWIG_fail;
   24732             :         }
   24733             :       }
   24734             :       else {
   24735           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   24736           0 :         SWIG_fail;
   24737             :       }
   24738             :     }
   24739             :   }
   24740           1 :   {
   24741           1 :     const int bLocalUseExceptions = GetUseExceptions();
   24742           1 :     if ( bLocalUseExceptions ) {
   24743           0 :       pushErrorHandler();
   24744             :     }
   24745           1 :     {
   24746           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24747           1 :       result = (CPLErr)GDALDatasetShadow_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   24748           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24749             :     }
   24750           1 :     if ( bLocalUseExceptions ) {
   24751           0 :       popErrorHandler();
   24752             :     }
   24753             : #ifndef SED_HACKS
   24754             :     if ( bLocalUseExceptions ) {
   24755             :       CPLErr eclass = CPLGetLastErrorType();
   24756             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24757             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24758             :       }
   24759             :     }
   24760             : #endif
   24761             :   }
   24762           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24763           1 :   {
   24764             :     /* %typemap(freearg) (int nList, int* pList) */
   24765           1 :     free(arg10);
   24766             :   }
   24767           1 :   {
   24768             :     /* %typemap(freearg) char **dict */
   24769           1 :     CSLDestroy( arg11 );
   24770             :   }
   24771           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; } }
   24772             :   return resultobj;
   24773           0 : fail:
   24774           0 :   {
   24775             :     /* %typemap(freearg) (int nList, int* pList) */
   24776           0 :     free(arg10);
   24777             :   }
   24778           0 :   {
   24779             :     /* %typemap(freearg) char **dict */
   24780           0 :     CSLDestroy( arg11 );
   24781             :   }
   24782             :   return NULL;
   24783             : }
   24784             : 
   24785             : 
   24786           2 : SWIGINTERN PyObject *_wrap_Dataset_BeginAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   24787           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24788           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24789           2 :   int arg2 ;
   24790           2 :   int arg3 ;
   24791           2 :   int arg4 ;
   24792           2 :   int arg5 ;
   24793           2 :   size_t arg6 ;
   24794           2 :   char *arg7 = (char *) 0 ;
   24795           2 :   void *arg8 = (void *) 0 ;
   24796           2 :   int arg9 ;
   24797           2 :   int arg10 ;
   24798           2 :   GDALDataType arg11 = (GDALDataType) (GDALDataType) 0 ;
   24799           2 :   int arg12 = (int) 0 ;
   24800           2 :   int *arg13 = (int *) 0 ;
   24801           2 :   int arg14 = (int) 0 ;
   24802           2 :   int arg15 = (int) 0 ;
   24803           2 :   int arg16 = (int) 0 ;
   24804           2 :   char **arg17 = (char **) 0 ;
   24805           2 :   void *argp1 = 0 ;
   24806           2 :   int res1 = 0 ;
   24807           2 :   int val2 ;
   24808           2 :   int ecode2 = 0 ;
   24809           2 :   int val3 ;
   24810           2 :   int ecode3 = 0 ;
   24811           2 :   int val4 ;
   24812           2 :   int ecode4 = 0 ;
   24813           2 :   int val5 ;
   24814           2 :   int ecode5 = 0 ;
   24815           2 :   int val9 ;
   24816           2 :   int ecode9 = 0 ;
   24817           2 :   int val10 ;
   24818           2 :   int ecode10 = 0 ;
   24819           2 :   int val14 ;
   24820           2 :   int ecode14 = 0 ;
   24821           2 :   int val15 ;
   24822           2 :   int ecode15 = 0 ;
   24823           2 :   int val16 ;
   24824           2 :   int ecode16 = 0 ;
   24825           2 :   PyObject * obj0 = 0 ;
   24826           2 :   PyObject * obj1 = 0 ;
   24827           2 :   PyObject * obj2 = 0 ;
   24828           2 :   PyObject * obj3 = 0 ;
   24829           2 :   PyObject * obj4 = 0 ;
   24830           2 :   PyObject * obj5 = 0 ;
   24831           2 :   PyObject * obj6 = 0 ;
   24832           2 :   PyObject * obj7 = 0 ;
   24833           2 :   PyObject * obj8 = 0 ;
   24834           2 :   PyObject * obj9 = 0 ;
   24835           2 :   PyObject * obj10 = 0 ;
   24836           2 :   PyObject * obj11 = 0 ;
   24837           2 :   PyObject * obj12 = 0 ;
   24838           2 :   PyObject * obj13 = 0 ;
   24839           2 :   char * kwnames[] = {
   24840             :     (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 
   24841             :   };
   24842           2 :   GDALAsyncReaderShadow *result = 0 ;
   24843             :   
   24844           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;
   24845           2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24846           2 :   if (!SWIG_IsOK(res1)) {
   24847           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BeginAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24848             :   }
   24849           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24850           2 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   24851           2 :   if (!SWIG_IsOK(ecode2)) {
   24852           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_BeginAsyncReader" "', argument " "2"" of type '" "int""'");
   24853             :   } 
   24854           2 :   arg2 = static_cast< int >(val2);
   24855           2 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   24856           2 :   if (!SWIG_IsOK(ecode3)) {
   24857           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_BeginAsyncReader" "', argument " "3"" of type '" "int""'");
   24858             :   } 
   24859           2 :   arg3 = static_cast< int >(val3);
   24860           2 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   24861           2 :   if (!SWIG_IsOK(ecode4)) {
   24862           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_BeginAsyncReader" "', argument " "4"" of type '" "int""'");
   24863             :   } 
   24864           2 :   arg4 = static_cast< int >(val4);
   24865           2 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   24866           2 :   if (!SWIG_IsOK(ecode5)) {
   24867           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_BeginAsyncReader" "', argument " "5"" of type '" "int""'");
   24868             :   } 
   24869           2 :   arg5 = static_cast< int >(val5);
   24870           2 :   {
   24871             :     /* %typemap(in,numinputs=1) (size_t nLenKeepObject, char *pBufKeepObject, void* pyObject) */
   24872           2 :     if (PyBytes_Check(obj5))
   24873             :     {
   24874           2 :       Py_ssize_t safeLen = 0;
   24875           2 :       PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   24876           2 :       arg6 = safeLen;
   24877           2 :       arg8 = obj5;
   24878             :     }
   24879             :     else
   24880             :     {
   24881           0 :       PyErr_SetString(PyExc_TypeError, "not a bytes");
   24882           0 :       SWIG_fail;
   24883             :     }
   24884             :   }
   24885           2 :   ecode9 = SWIG_AsVal_int(obj6, &val9);
   24886           2 :   if (!SWIG_IsOK(ecode9)) {
   24887           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Dataset_BeginAsyncReader" "', argument " "9"" of type '" "int""'");
   24888             :   } 
   24889           2 :   arg9 = static_cast< int >(val9);
   24890           2 :   ecode10 = SWIG_AsVal_int(obj7, &val10);
   24891           2 :   if (!SWIG_IsOK(ecode10)) {
   24892           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Dataset_BeginAsyncReader" "', argument " "10"" of type '" "int""'");
   24893             :   } 
   24894           2 :   arg10 = static_cast< int >(val10);
   24895           2 :   if (obj8) {
   24896           2 :     {
   24897             :       // %typemap(in) GDALDataType
   24898           2 :       int val = 0;
   24899           2 :       int ecode = SWIG_AsVal_int(obj8, &val);
   24900           2 :       if (!SWIG_IsOK(ecode)) {
   24901           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   24902             :       }
   24903           2 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   24904             :       {
   24905           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   24906             :       }
   24907             :       arg11 = static_cast<GDALDataType>(val);
   24908             :     }
   24909             :   }
   24910           2 :   if (obj9) {
   24911           2 :     {
   24912             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24913           2 :       arg13 = CreateCIntListFromSequence(obj9, &arg12);
   24914           2 :       if( arg12 < 0 ) {
   24915           0 :         SWIG_fail;
   24916             :       }
   24917             :     }
   24918             :   }
   24919           2 :   if (obj10) {
   24920           2 :     ecode14 = SWIG_AsVal_int(obj10, &val14);
   24921           2 :     if (!SWIG_IsOK(ecode14)) {
   24922           0 :       SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_BeginAsyncReader" "', argument " "14"" of type '" "int""'");
   24923             :     } 
   24924             :     arg14 = static_cast< int >(val14);
   24925             :   }
   24926           2 :   if (obj11) {
   24927           2 :     ecode15 = SWIG_AsVal_int(obj11, &val15);
   24928           2 :     if (!SWIG_IsOK(ecode15)) {
   24929           0 :       SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "Dataset_BeginAsyncReader" "', argument " "15"" of type '" "int""'");
   24930             :     } 
   24931             :     arg15 = static_cast< int >(val15);
   24932             :   }
   24933           2 :   if (obj12) {
   24934           2 :     ecode16 = SWIG_AsVal_int(obj12, &val16);
   24935           2 :     if (!SWIG_IsOK(ecode16)) {
   24936           0 :       SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "Dataset_BeginAsyncReader" "', argument " "16"" of type '" "int""'");
   24937             :     } 
   24938             :     arg16 = static_cast< int >(val16);
   24939             :   }
   24940           2 :   if (obj13) {
   24941           2 :     {
   24942             :       /* %typemap(in) char **dict */
   24943           2 :       arg17 = NULL;
   24944           2 :       if ( PySequence_Check( obj13 ) ) {
   24945           2 :         int bErr = FALSE;
   24946           2 :         arg17 = CSLFromPySequence(obj13, &bErr);
   24947           2 :         if ( bErr )
   24948             :         {
   24949           0 :           SWIG_fail;
   24950             :         }
   24951             :       }
   24952           0 :       else if ( PyMapping_Check( obj13 ) ) {
   24953           0 :         int bErr = FALSE;
   24954           0 :         arg17 = CSLFromPyMapping(obj13, &bErr);
   24955           0 :         if ( bErr )
   24956             :         {
   24957           0 :           SWIG_fail;
   24958             :         }
   24959             :       }
   24960             :       else {
   24961           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   24962           0 :         SWIG_fail;
   24963             :       }
   24964             :     }
   24965             :   }
   24966           2 :   {
   24967           2 :     const int bLocalUseExceptions = GetUseExceptions();
   24968           2 :     if ( bLocalUseExceptions ) {
   24969           2 :       pushErrorHandler();
   24970             :     }
   24971           2 :     {
   24972           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24973           2 :       result = (GDALAsyncReaderShadow *)GDALDatasetShadow_BeginAsyncReader(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
   24974           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24975             :     }
   24976           2 :     if ( bLocalUseExceptions ) {
   24977           2 :       popErrorHandler();
   24978             :     }
   24979             : #ifndef SED_HACKS
   24980             :     if ( bLocalUseExceptions ) {
   24981             :       CPLErr eclass = CPLGetLastErrorType();
   24982             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24983             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24984             :       }
   24985             :     }
   24986             : #endif
   24987             :   }
   24988           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_OWN |  0 );
   24989           2 :   {
   24990             :     /* %typemap(freearg) (int nList, int* pList) */
   24991           2 :     free(arg13);
   24992             :   }
   24993           2 :   {
   24994             :     /* %typemap(freearg) char **dict */
   24995           2 :     CSLDestroy( arg17 );
   24996             :   }
   24997           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; } }
   24998             :   return resultobj;
   24999           0 : fail:
   25000           0 :   {
   25001             :     /* %typemap(freearg) (int nList, int* pList) */
   25002           0 :     free(arg13);
   25003             :   }
   25004           0 :   {
   25005             :     /* %typemap(freearg) char **dict */
   25006           0 :     CSLDestroy( arg17 );
   25007             :   }
   25008             :   return NULL;
   25009             : }
   25010             : 
   25011             : 
   25012           1 : SWIGINTERN PyObject *_wrap_Dataset_EndAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25013           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25014           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25015           1 :   GDALAsyncReaderShadow *arg2 = (GDALAsyncReaderShadow *) 0 ;
   25016           1 :   void *argp1 = 0 ;
   25017           1 :   int res1 = 0 ;
   25018           1 :   void *argp2 = 0 ;
   25019           1 :   int res2 = 0 ;
   25020           1 :   PyObject *swig_obj[2] ;
   25021             :   
   25022           1 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_EndAsyncReader", 2, 2, swig_obj)) SWIG_fail;
   25023           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25024           1 :   if (!SWIG_IsOK(res1)) {
   25025           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_EndAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25026             :   }
   25027           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25028           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   25029           1 :   if (!SWIG_IsOK(res2)) {
   25030           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_EndAsyncReader" "', argument " "2"" of type '" "GDALAsyncReaderShadow *""'"); 
   25031             :   }
   25032           1 :   arg2 = reinterpret_cast< GDALAsyncReaderShadow * >(argp2);
   25033           1 :   {
   25034           1 :     const int bLocalUseExceptions = GetUseExceptions();
   25035           1 :     if ( bLocalUseExceptions ) {
   25036           1 :       pushErrorHandler();
   25037             :     }
   25038           1 :     {
   25039           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25040           1 :       GDALDatasetShadow_EndAsyncReader(arg1,arg2);
   25041           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25042             :     }
   25043           1 :     if ( bLocalUseExceptions ) {
   25044           1 :       popErrorHandler();
   25045             :     }
   25046             : #ifndef SED_HACKS
   25047             :     if ( bLocalUseExceptions ) {
   25048             :       CPLErr eclass = CPLGetLastErrorType();
   25049             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25050             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25051             :       }
   25052             :     }
   25053             : #endif
   25054             :   }
   25055           1 :   resultobj = SWIG_Py_Void();
   25056           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; } }
   25057             :   return resultobj;
   25058             : fail:
   25059             :   return NULL;
   25060             : }
   25061             : 
   25062             : 
   25063           3 : SWIGINTERN PyObject *_wrap_Dataset_GetVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25064           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25065           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25066           3 :   GDALRWFlag arg2 ;
   25067           3 :   int arg3 ;
   25068           3 :   int arg4 ;
   25069           3 :   int arg5 ;
   25070           3 :   int arg6 ;
   25071           3 :   int arg7 ;
   25072           3 :   int arg8 ;
   25073           3 :   GDALDataType arg9 ;
   25074           3 :   int arg10 ;
   25075           3 :   int *arg11 = (int *) 0 ;
   25076           3 :   int arg12 ;
   25077           3 :   size_t arg13 ;
   25078           3 :   size_t arg14 ;
   25079           3 :   char **arg15 = (char **) NULL ;
   25080           3 :   void *argp1 = 0 ;
   25081           3 :   int res1 = 0 ;
   25082           3 :   int val2 ;
   25083           3 :   int ecode2 = 0 ;
   25084           3 :   int val3 ;
   25085           3 :   int ecode3 = 0 ;
   25086           3 :   int val4 ;
   25087           3 :   int ecode4 = 0 ;
   25088           3 :   int val5 ;
   25089           3 :   int ecode5 = 0 ;
   25090           3 :   int val6 ;
   25091           3 :   int ecode6 = 0 ;
   25092           3 :   int val7 ;
   25093           3 :   int ecode7 = 0 ;
   25094           3 :   int val8 ;
   25095           3 :   int ecode8 = 0 ;
   25096           3 :   int val12 ;
   25097           3 :   int ecode12 = 0 ;
   25098           3 :   size_t val13 ;
   25099           3 :   int ecode13 = 0 ;
   25100           3 :   size_t val14 ;
   25101           3 :   int ecode14 = 0 ;
   25102           3 :   PyObject * obj0 = 0 ;
   25103           3 :   PyObject * obj1 = 0 ;
   25104           3 :   PyObject * obj2 = 0 ;
   25105           3 :   PyObject * obj3 = 0 ;
   25106           3 :   PyObject * obj4 = 0 ;
   25107           3 :   PyObject * obj5 = 0 ;
   25108           3 :   PyObject * obj6 = 0 ;
   25109           3 :   PyObject * obj7 = 0 ;
   25110           3 :   PyObject * obj8 = 0 ;
   25111           3 :   PyObject * obj9 = 0 ;
   25112           3 :   PyObject * obj10 = 0 ;
   25113           3 :   PyObject * obj11 = 0 ;
   25114           3 :   PyObject * obj12 = 0 ;
   25115           3 :   PyObject * obj13 = 0 ;
   25116           3 :   char * kwnames[] = {
   25117             :     (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 
   25118             :   };
   25119           3 :   CPLVirtualMemShadow *result = 0 ;
   25120             :   
   25121           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;
   25122           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25123           3 :   if (!SWIG_IsOK(res1)) {
   25124           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetVirtualMem" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25125             :   }
   25126           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25127           3 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   25128           3 :   if (!SWIG_IsOK(ecode2)) {
   25129           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   25130             :   } 
   25131           3 :   arg2 = static_cast< GDALRWFlag >(val2);
   25132           3 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   25133           3 :   if (!SWIG_IsOK(ecode3)) {
   25134           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetVirtualMem" "', argument " "3"" of type '" "int""'");
   25135             :   } 
   25136           3 :   arg3 = static_cast< int >(val3);
   25137           3 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   25138           3 :   if (!SWIG_IsOK(ecode4)) {
   25139           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_GetVirtualMem" "', argument " "4"" of type '" "int""'");
   25140             :   } 
   25141           3 :   arg4 = static_cast< int >(val4);
   25142           3 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   25143           3 :   if (!SWIG_IsOK(ecode5)) {
   25144           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_GetVirtualMem" "', argument " "5"" of type '" "int""'");
   25145             :   } 
   25146           3 :   arg5 = static_cast< int >(val5);
   25147           3 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   25148           3 :   if (!SWIG_IsOK(ecode6)) {
   25149           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Dataset_GetVirtualMem" "', argument " "6"" of type '" "int""'");
   25150             :   } 
   25151           3 :   arg6 = static_cast< int >(val6);
   25152           3 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   25153           3 :   if (!SWIG_IsOK(ecode7)) {
   25154           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Dataset_GetVirtualMem" "', argument " "7"" of type '" "int""'");
   25155             :   } 
   25156           3 :   arg7 = static_cast< int >(val7);
   25157           3 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   25158           3 :   if (!SWIG_IsOK(ecode8)) {
   25159           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Dataset_GetVirtualMem" "', argument " "8"" of type '" "int""'");
   25160             :   } 
   25161           3 :   arg8 = static_cast< int >(val8);
   25162           3 :   {
   25163             :     // %typemap(in) GDALDataType
   25164           3 :     int val = 0;
   25165           3 :     int ecode = SWIG_AsVal_int(obj8, &val);
   25166           3 :     if (!SWIG_IsOK(ecode)) {
   25167           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   25168             :     }
   25169           3 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   25170             :     {
   25171           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   25172             :     }
   25173           3 :     arg9 = static_cast<GDALDataType>(val);
   25174             :   }
   25175           3 :   {
   25176             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   25177           3 :     arg11 = CreateCIntListFromSequence(obj9, &arg10);
   25178           3 :     if( arg10 < 0 ) {
   25179           0 :       SWIG_fail;
   25180             :     }
   25181             :   }
   25182           3 :   ecode12 = SWIG_AsVal_int(obj10, &val12);
   25183           3 :   if (!SWIG_IsOK(ecode12)) {
   25184           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "Dataset_GetVirtualMem" "', argument " "12"" of type '" "int""'");
   25185             :   } 
   25186           3 :   arg12 = static_cast< int >(val12);
   25187           3 :   ecode13 = SWIG_AsVal_size_t(obj11, &val13);
   25188           3 :   if (!SWIG_IsOK(ecode13)) {
   25189           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "Dataset_GetVirtualMem" "', argument " "13"" of type '" "size_t""'");
   25190             :   } 
   25191           3 :   arg13 = static_cast< size_t >(val13);
   25192           3 :   ecode14 = SWIG_AsVal_size_t(obj12, &val14);
   25193           3 :   if (!SWIG_IsOK(ecode14)) {
   25194           0 :     SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_GetVirtualMem" "', argument " "14"" of type '" "size_t""'");
   25195             :   } 
   25196           3 :   arg14 = static_cast< size_t >(val14);
   25197           3 :   if (obj13) {
   25198           0 :     {
   25199             :       /* %typemap(in) char **dict */
   25200           0 :       arg15 = NULL;
   25201           0 :       if ( PySequence_Check( obj13 ) ) {
   25202           0 :         int bErr = FALSE;
   25203           0 :         arg15 = CSLFromPySequence(obj13, &bErr);
   25204           0 :         if ( bErr )
   25205             :         {
   25206           0 :           SWIG_fail;
   25207             :         }
   25208             :       }
   25209           0 :       else if ( PyMapping_Check( obj13 ) ) {
   25210           0 :         int bErr = FALSE;
   25211           0 :         arg15 = CSLFromPyMapping(obj13, &bErr);
   25212           0 :         if ( bErr )
   25213             :         {
   25214           0 :           SWIG_fail;
   25215             :         }
   25216             :       }
   25217             :       else {
   25218           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25219           0 :         SWIG_fail;
   25220             :       }
   25221             :     }
   25222             :   }
   25223           3 :   {
   25224           3 :     const int bLocalUseExceptions = GetUseExceptions();
   25225           3 :     if ( bLocalUseExceptions ) {
   25226           3 :       pushErrorHandler();
   25227             :     }
   25228           3 :     {
   25229           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25230           3 :       result = (CPLVirtualMemShadow *)GDALDatasetShadow_GetVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   25231           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25232             :     }
   25233           3 :     if ( bLocalUseExceptions ) {
   25234           3 :       popErrorHandler();
   25235             :     }
   25236             : #ifndef SED_HACKS
   25237             :     if ( bLocalUseExceptions ) {
   25238             :       CPLErr eclass = CPLGetLastErrorType();
   25239             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25240             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25241             :       }
   25242             :     }
   25243             : #endif
   25244             :   }
   25245           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   25246           3 :   {
   25247             :     /* %typemap(freearg) (int nList, int* pList) */
   25248           3 :     free(arg11);
   25249             :   }
   25250           3 :   {
   25251             :     /* %typemap(freearg) char **dict */
   25252           3 :     CSLDestroy( arg15 );
   25253             :   }
   25254           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; } }
   25255             :   return resultobj;
   25256           0 : fail:
   25257           0 :   {
   25258             :     /* %typemap(freearg) (int nList, int* pList) */
   25259           0 :     free(arg11);
   25260             :   }
   25261           0 :   {
   25262             :     /* %typemap(freearg) char **dict */
   25263           0 :     CSLDestroy( arg15 );
   25264             :   }
   25265             :   return NULL;
   25266             : }
   25267             : 
   25268             : 
   25269           3 : SWIGINTERN PyObject *_wrap_Dataset_GetTiledVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25270           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25271           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25272           3 :   GDALRWFlag arg2 ;
   25273           3 :   int arg3 ;
   25274           3 :   int arg4 ;
   25275           3 :   int arg5 ;
   25276           3 :   int arg6 ;
   25277           3 :   int arg7 ;
   25278           3 :   int arg8 ;
   25279           3 :   GDALDataType arg9 ;
   25280           3 :   int arg10 ;
   25281           3 :   int *arg11 = (int *) 0 ;
   25282           3 :   GDALTileOrganization arg12 ;
   25283           3 :   size_t arg13 ;
   25284           3 :   char **arg14 = (char **) NULL ;
   25285           3 :   void *argp1 = 0 ;
   25286           3 :   int res1 = 0 ;
   25287           3 :   int val2 ;
   25288           3 :   int ecode2 = 0 ;
   25289           3 :   int val3 ;
   25290           3 :   int ecode3 = 0 ;
   25291           3 :   int val4 ;
   25292           3 :   int ecode4 = 0 ;
   25293           3 :   int val5 ;
   25294           3 :   int ecode5 = 0 ;
   25295           3 :   int val6 ;
   25296           3 :   int ecode6 = 0 ;
   25297           3 :   int val7 ;
   25298           3 :   int ecode7 = 0 ;
   25299           3 :   int val8 ;
   25300           3 :   int ecode8 = 0 ;
   25301           3 :   int val12 ;
   25302           3 :   int ecode12 = 0 ;
   25303           3 :   size_t val13 ;
   25304           3 :   int ecode13 = 0 ;
   25305           3 :   PyObject * obj0 = 0 ;
   25306           3 :   PyObject * obj1 = 0 ;
   25307           3 :   PyObject * obj2 = 0 ;
   25308           3 :   PyObject * obj3 = 0 ;
   25309           3 :   PyObject * obj4 = 0 ;
   25310           3 :   PyObject * obj5 = 0 ;
   25311           3 :   PyObject * obj6 = 0 ;
   25312           3 :   PyObject * obj7 = 0 ;
   25313           3 :   PyObject * obj8 = 0 ;
   25314           3 :   PyObject * obj9 = 0 ;
   25315           3 :   PyObject * obj10 = 0 ;
   25316           3 :   PyObject * obj11 = 0 ;
   25317           3 :   PyObject * obj12 = 0 ;
   25318           3 :   char * kwnames[] = {
   25319             :     (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 
   25320             :   };
   25321           3 :   CPLVirtualMemShadow *result = 0 ;
   25322             :   
   25323           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;
   25324           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25325           3 :   if (!SWIG_IsOK(res1)) {
   25326           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25327             :   }
   25328           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25329           3 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   25330           3 :   if (!SWIG_IsOK(ecode2)) {
   25331           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   25332             :   } 
   25333           3 :   arg2 = static_cast< GDALRWFlag >(val2);
   25334           3 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   25335           3 :   if (!SWIG_IsOK(ecode3)) {
   25336           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "3"" of type '" "int""'");
   25337             :   } 
   25338           3 :   arg3 = static_cast< int >(val3);
   25339           3 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   25340           3 :   if (!SWIG_IsOK(ecode4)) {
   25341           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "4"" of type '" "int""'");
   25342             :   } 
   25343           3 :   arg4 = static_cast< int >(val4);
   25344           3 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   25345           3 :   if (!SWIG_IsOK(ecode5)) {
   25346           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "5"" of type '" "int""'");
   25347             :   } 
   25348           3 :   arg5 = static_cast< int >(val5);
   25349           3 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   25350           3 :   if (!SWIG_IsOK(ecode6)) {
   25351           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "6"" of type '" "int""'");
   25352             :   } 
   25353           3 :   arg6 = static_cast< int >(val6);
   25354           3 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   25355           3 :   if (!SWIG_IsOK(ecode7)) {
   25356           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "7"" of type '" "int""'");
   25357             :   } 
   25358           3 :   arg7 = static_cast< int >(val7);
   25359           3 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   25360           3 :   if (!SWIG_IsOK(ecode8)) {
   25361           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "8"" of type '" "int""'");
   25362             :   } 
   25363           3 :   arg8 = static_cast< int >(val8);
   25364           3 :   {
   25365             :     // %typemap(in) GDALDataType
   25366           3 :     int val = 0;
   25367           3 :     int ecode = SWIG_AsVal_int(obj8, &val);
   25368           3 :     if (!SWIG_IsOK(ecode)) {
   25369           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   25370             :     }
   25371           3 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   25372             :     {
   25373           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   25374             :     }
   25375           3 :     arg9 = static_cast<GDALDataType>(val);
   25376             :   }
   25377           3 :   {
   25378             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   25379           3 :     arg11 = CreateCIntListFromSequence(obj9, &arg10);
   25380           3 :     if( arg10 < 0 ) {
   25381           0 :       SWIG_fail;
   25382             :     }
   25383             :   }
   25384           3 :   ecode12 = SWIG_AsVal_int(obj10, &val12);
   25385           3 :   if (!SWIG_IsOK(ecode12)) {
   25386           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "12"" of type '" "GDALTileOrganization""'");
   25387             :   } 
   25388           3 :   arg12 = static_cast< GDALTileOrganization >(val12);
   25389           3 :   ecode13 = SWIG_AsVal_size_t(obj11, &val13);
   25390           3 :   if (!SWIG_IsOK(ecode13)) {
   25391           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "13"" of type '" "size_t""'");
   25392             :   } 
   25393           3 :   arg13 = static_cast< size_t >(val13);
   25394           3 :   if (obj12) {
   25395           0 :     {
   25396             :       /* %typemap(in) char **dict */
   25397           0 :       arg14 = NULL;
   25398           0 :       if ( PySequence_Check( obj12 ) ) {
   25399           0 :         int bErr = FALSE;
   25400           0 :         arg14 = CSLFromPySequence(obj12, &bErr);
   25401           0 :         if ( bErr )
   25402             :         {
   25403           0 :           SWIG_fail;
   25404             :         }
   25405             :       }
   25406           0 :       else if ( PyMapping_Check( obj12 ) ) {
   25407           0 :         int bErr = FALSE;
   25408           0 :         arg14 = CSLFromPyMapping(obj12, &bErr);
   25409           0 :         if ( bErr )
   25410             :         {
   25411           0 :           SWIG_fail;
   25412             :         }
   25413             :       }
   25414             :       else {
   25415           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25416           0 :         SWIG_fail;
   25417             :       }
   25418             :     }
   25419             :   }
   25420           3 :   {
   25421           3 :     const int bLocalUseExceptions = GetUseExceptions();
   25422           3 :     if ( bLocalUseExceptions ) {
   25423           3 :       pushErrorHandler();
   25424             :     }
   25425           3 :     {
   25426           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25427           3 :       result = (CPLVirtualMemShadow *)GDALDatasetShadow_GetTiledVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
   25428           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25429             :     }
   25430           3 :     if ( bLocalUseExceptions ) {
   25431           3 :       popErrorHandler();
   25432             :     }
   25433             : #ifndef SED_HACKS
   25434             :     if ( bLocalUseExceptions ) {
   25435             :       CPLErr eclass = CPLGetLastErrorType();
   25436             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25437             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25438             :       }
   25439             :     }
   25440             : #endif
   25441             :   }
   25442           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   25443           3 :   {
   25444             :     /* %typemap(freearg) (int nList, int* pList) */
   25445           3 :     free(arg11);
   25446             :   }
   25447           3 :   {
   25448             :     /* %typemap(freearg) char **dict */
   25449           3 :     CSLDestroy( arg14 );
   25450             :   }
   25451           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; } }
   25452             :   return resultobj;
   25453           0 : fail:
   25454           0 :   {
   25455             :     /* %typemap(freearg) (int nList, int* pList) */
   25456           0 :     free(arg11);
   25457             :   }
   25458           0 :   {
   25459             :     /* %typemap(freearg) char **dict */
   25460           0 :     CSLDestroy( arg14 );
   25461             :   }
   25462             :   return NULL;
   25463             : }
   25464             : 
   25465             : 
   25466        6032 : SWIGINTERN PyObject *_wrap_Dataset_CreateLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25467        6032 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25468        6032 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25469        6032 :   char *arg2 = (char *) 0 ;
   25470        6032 :   OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
   25471        6032 :   OGRwkbGeometryType arg4 = (OGRwkbGeometryType) wkbUnknown ;
   25472        6032 :   char **arg5 = (char **) 0 ;
   25473        6032 :   void *argp1 = 0 ;
   25474        6032 :   int res1 = 0 ;
   25475        6032 :   int res2 ;
   25476        6032 :   char *buf2 = 0 ;
   25477        6032 :   int alloc2 = 0 ;
   25478        6032 :   void *argp3 = 0 ;
   25479        6032 :   int res3 = 0 ;
   25480        6032 :   int val4 ;
   25481        6032 :   int ecode4 = 0 ;
   25482        6032 :   PyObject * obj0 = 0 ;
   25483        6032 :   PyObject * obj1 = 0 ;
   25484        6032 :   PyObject * obj2 = 0 ;
   25485        6032 :   PyObject * obj3 = 0 ;
   25486        6032 :   PyObject * obj4 = 0 ;
   25487        6032 :   char * kwnames[] = {
   25488             :     (char *)"self",  (char *)"name",  (char *)"srs",  (char *)"geom_type",  (char *)"options",  NULL 
   25489             :   };
   25490        6032 :   OGRLayerShadow *result = 0 ;
   25491             :   
   25492        6032 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Dataset_CreateLayer", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   25493        6032 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25494        6032 :   if (!SWIG_IsOK(res1)) {
   25495           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25496             :   }
   25497        6032 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25498        6032 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   25499        6032 :   if (!SWIG_IsOK(res2)) {
   25500           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CreateLayer" "', argument " "2"" of type '" "char const *""'");
   25501             :   }
   25502        6032 :   arg2 = reinterpret_cast< char * >(buf2);
   25503        6032 :   if (obj2) {
   25504        1195 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   25505        1195 :     if (!SWIG_IsOK(res3)) {
   25506           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CreateLayer" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'"); 
   25507             :     }
   25508        1195 :     arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
   25509             :   }
   25510        6032 :   if (obj3) {
   25511        1783 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
   25512        1783 :     if (!SWIG_IsOK(ecode4)) {
   25513           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_CreateLayer" "', argument " "4"" of type '" "OGRwkbGeometryType""'");
   25514             :     } 
   25515        1783 :     arg4 = static_cast< OGRwkbGeometryType >(val4);
   25516             :   }
   25517        6032 :   if (obj4) {
   25518        1225 :     {
   25519             :       /* %typemap(in) char **dict */
   25520        1225 :       arg5 = NULL;
   25521        1225 :       if ( PySequence_Check( obj4 ) ) {
   25522        1193 :         int bErr = FALSE;
   25523        1193 :         arg5 = CSLFromPySequence(obj4, &bErr);
   25524        1193 :         if ( bErr )
   25525             :         {
   25526           0 :           SWIG_fail;
   25527             :         }
   25528             :       }
   25529          32 :       else if ( PyMapping_Check( obj4 ) ) {
   25530          32 :         int bErr = FALSE;
   25531          32 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   25532          32 :         if ( bErr )
   25533             :         {
   25534           0 :           SWIG_fail;
   25535             :         }
   25536             :       }
   25537             :       else {
   25538           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25539           0 :         SWIG_fail;
   25540             :       }
   25541             :     }
   25542             :   }
   25543        6032 :   {
   25544        6032 :     const int bLocalUseExceptions = GetUseExceptions();
   25545        6032 :     if ( bLocalUseExceptions ) {
   25546        1971 :       pushErrorHandler();
   25547             :     }
   25548        6032 :     {
   25549        6032 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25550        6032 :       result = (OGRLayerShadow *)GDALDatasetShadow_CreateLayer(arg1,(char const *)arg2,arg3,arg4,arg5);
   25551        6032 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25552             :     }
   25553        6032 :     if ( bLocalUseExceptions ) {
   25554        1971 :       popErrorHandler();
   25555             :     }
   25556             : #ifndef SED_HACKS
   25557             :     if ( bLocalUseExceptions ) {
   25558             :       CPLErr eclass = CPLGetLastErrorType();
   25559             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25560             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25561             :       }
   25562             :     }
   25563             : #endif
   25564             :   }
   25565        6032 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25566        6032 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25567        6032 :   {
   25568             :     /* %typemap(freearg) char **dict */
   25569        6032 :     CSLDestroy( arg5 );
   25570             :   }
   25571        6092 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   25572             :   return resultobj;
   25573           0 : fail:
   25574           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25575           0 :   {
   25576             :     /* %typemap(freearg) char **dict */
   25577           0 :     CSLDestroy( arg5 );
   25578             :   }
   25579             :   return NULL;
   25580             : }
   25581             : 
   25582             : 
   25583          14 : SWIGINTERN PyObject *_wrap_Dataset_CreateLayerFromGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25584          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25585          14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25586          14 :   char *arg2 = (char *) 0 ;
   25587          14 :   OGRGeomFieldDefnShadow *arg3 = (OGRGeomFieldDefnShadow *) 0 ;
   25588          14 :   char **arg4 = (char **) 0 ;
   25589          14 :   void *argp1 = 0 ;
   25590          14 :   int res1 = 0 ;
   25591          14 :   int res2 ;
   25592          14 :   char *buf2 = 0 ;
   25593          14 :   int alloc2 = 0 ;
   25594          14 :   void *argp3 = 0 ;
   25595          14 :   int res3 = 0 ;
   25596          14 :   PyObject *swig_obj[4] ;
   25597          14 :   OGRLayerShadow *result = 0 ;
   25598             :   
   25599          14 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_CreateLayerFromGeomFieldDefn", 3, 4, swig_obj)) SWIG_fail;
   25600          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25601          14 :   if (!SWIG_IsOK(res1)) {
   25602           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25603             :   }
   25604          14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25605          14 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   25606          14 :   if (!SWIG_IsOK(res2)) {
   25607           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "2"" of type '" "char const *""'");
   25608             :   }
   25609          14 :   arg2 = reinterpret_cast< char * >(buf2);
   25610          14 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
   25611          14 :   if (!SWIG_IsOK(res3)) {
   25612           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "3"" of type '" "OGRGeomFieldDefnShadow *""'"); 
   25613             :   }
   25614          14 :   arg3 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp3);
   25615          14 :   if (swig_obj[3]) {
   25616           7 :     {
   25617             :       /* %typemap(in) char **dict */
   25618           7 :       arg4 = NULL;
   25619           7 :       if ( PySequence_Check( swig_obj[3] ) ) {
   25620           7 :         int bErr = FALSE;
   25621           7 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   25622           7 :         if ( bErr )
   25623             :         {
   25624           0 :           SWIG_fail;
   25625             :         }
   25626             :       }
   25627           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   25628           0 :         int bErr = FALSE;
   25629           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   25630           0 :         if ( bErr )
   25631             :         {
   25632           0 :           SWIG_fail;
   25633             :         }
   25634             :       }
   25635             :       else {
   25636           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25637           0 :         SWIG_fail;
   25638             :       }
   25639             :     }
   25640             :   }
   25641          14 :   {
   25642          14 :     const int bLocalUseExceptions = GetUseExceptions();
   25643          14 :     if ( bLocalUseExceptions ) {
   25644           9 :       pushErrorHandler();
   25645             :     }
   25646          14 :     {
   25647          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25648          14 :       result = (OGRLayerShadow *)GDALDatasetShadow_CreateLayerFromGeomFieldDefn(arg1,(char const *)arg2,arg3,arg4);
   25649          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25650             :     }
   25651          14 :     if ( bLocalUseExceptions ) {
   25652           9 :       popErrorHandler();
   25653             :     }
   25654             : #ifndef SED_HACKS
   25655             :     if ( bLocalUseExceptions ) {
   25656             :       CPLErr eclass = CPLGetLastErrorType();
   25657             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25658             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25659             :       }
   25660             :     }
   25661             : #endif
   25662             :   }
   25663          14 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25664          14 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25665          14 :   {
   25666             :     /* %typemap(freearg) char **dict */
   25667          14 :     CSLDestroy( arg4 );
   25668             :   }
   25669          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; } }
   25670             :   return resultobj;
   25671           0 : fail:
   25672           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25673           0 :   {
   25674             :     /* %typemap(freearg) char **dict */
   25675           0 :     CSLDestroy( arg4 );
   25676             :   }
   25677             :   return NULL;
   25678             : }
   25679             : 
   25680             : 
   25681          18 : SWIGINTERN PyObject *_wrap_Dataset_CopyLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25682          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25683          18 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25684          18 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   25685          18 :   char *arg3 = (char *) 0 ;
   25686          18 :   char **arg4 = (char **) 0 ;
   25687          18 :   void *argp1 = 0 ;
   25688          18 :   int res1 = 0 ;
   25689          18 :   void *argp2 = 0 ;
   25690          18 :   int res2 = 0 ;
   25691          18 :   int res3 ;
   25692          18 :   char *buf3 = 0 ;
   25693          18 :   int alloc3 = 0 ;
   25694          18 :   PyObject * obj0 = 0 ;
   25695          18 :   PyObject * obj1 = 0 ;
   25696          18 :   PyObject * obj2 = 0 ;
   25697          18 :   PyObject * obj3 = 0 ;
   25698          18 :   char * kwnames[] = {
   25699             :     (char *)"self",  (char *)"src_layer",  (char *)"new_name",  (char *)"options",  NULL 
   25700             :   };
   25701          18 :   OGRLayerShadow *result = 0 ;
   25702             :   
   25703          18 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:Dataset_CopyLayer", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   25704          18 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25705          18 :   if (!SWIG_IsOK(res1)) {
   25706           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CopyLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25707             :   }
   25708          18 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25709          18 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25710          18 :   if (!SWIG_IsOK(res2)) {
   25711           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CopyLayer" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
   25712             :   }
   25713          18 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
   25714          18 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   25715          18 :   if (!SWIG_IsOK(res3)) {
   25716           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CopyLayer" "', argument " "3"" of type '" "char const *""'");
   25717             :   }
   25718          18 :   arg3 = reinterpret_cast< char * >(buf3);
   25719          18 :   if (obj3) {
   25720           4 :     {
   25721             :       /* %typemap(in) char **dict */
   25722           4 :       arg4 = NULL;
   25723           4 :       if ( PySequence_Check( obj3 ) ) {
   25724           4 :         int bErr = FALSE;
   25725           4 :         arg4 = CSLFromPySequence(obj3, &bErr);
   25726           4 :         if ( bErr )
   25727             :         {
   25728           0 :           SWIG_fail;
   25729             :         }
   25730             :       }
   25731           0 :       else if ( PyMapping_Check( obj3 ) ) {
   25732           0 :         int bErr = FALSE;
   25733           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   25734           0 :         if ( bErr )
   25735             :         {
   25736           0 :           SWIG_fail;
   25737             :         }
   25738             :       }
   25739             :       else {
   25740           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25741           0 :         SWIG_fail;
   25742             :       }
   25743             :     }
   25744             :   }
   25745          18 :   {
   25746          18 :     if (!arg2) {
   25747           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   25748             :     }
   25749             :   }
   25750          18 :   {
   25751          18 :     const int bLocalUseExceptions = GetUseExceptions();
   25752          18 :     if ( bLocalUseExceptions ) {
   25753          14 :       pushErrorHandler();
   25754             :     }
   25755          18 :     {
   25756          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25757          18 :       result = (OGRLayerShadow *)GDALDatasetShadow_CopyLayer(arg1,arg2,(char const *)arg3,arg4);
   25758          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25759             :     }
   25760          18 :     if ( bLocalUseExceptions ) {
   25761          14 :       popErrorHandler();
   25762             :     }
   25763             : #ifndef SED_HACKS
   25764             :     if ( bLocalUseExceptions ) {
   25765             :       CPLErr eclass = CPLGetLastErrorType();
   25766             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25767             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25768             :       }
   25769             :     }
   25770             : #endif
   25771             :   }
   25772          18 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25773          18 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   25774          18 :   {
   25775             :     /* %typemap(freearg) char **dict */
   25776          18 :     CSLDestroy( arg4 );
   25777             :   }
   25778          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; } }
   25779             :   return resultobj;
   25780           0 : fail:
   25781           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   25782           0 :   {
   25783             :     /* %typemap(freearg) char **dict */
   25784           0 :     CSLDestroy( arg4 );
   25785             :   }
   25786             :   return NULL;
   25787             : }
   25788             : 
   25789             : 
   25790          41 : SWIGINTERN PyObject *_wrap_Dataset_DeleteLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25791          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25792          41 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25793          41 :   int arg2 ;
   25794          41 :   void *argp1 = 0 ;
   25795          41 :   int res1 = 0 ;
   25796          41 :   int val2 ;
   25797          41 :   int ecode2 = 0 ;
   25798          41 :   PyObject *swig_obj[2] ;
   25799          41 :   OGRErr result;
   25800             :   
   25801          41 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteLayer", 2, 2, swig_obj)) SWIG_fail;
   25802          41 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25803          41 :   if (!SWIG_IsOK(res1)) {
   25804           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25805             :   }
   25806          41 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25807          41 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25808          41 :   if (!SWIG_IsOK(ecode2)) {
   25809           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_DeleteLayer" "', argument " "2"" of type '" "int""'");
   25810             :   } 
   25811          41 :   arg2 = static_cast< int >(val2);
   25812          41 :   {
   25813          41 :     const int bLocalUseExceptions = GetUseExceptions();
   25814          41 :     if ( bLocalUseExceptions ) {
   25815           7 :       pushErrorHandler();
   25816             :     }
   25817          41 :     {
   25818          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25819          41 :       result = (OGRErr)GDALDatasetShadow_DeleteLayer(arg1,arg2);
   25820          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25821             :     }
   25822          41 :     if ( bLocalUseExceptions ) {
   25823           7 :       popErrorHandler();
   25824             :     }
   25825             : #ifndef SED_HACKS
   25826             :     if ( bLocalUseExceptions ) {
   25827             :       CPLErr eclass = CPLGetLastErrorType();
   25828             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25829             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25830             :       }
   25831             :     }
   25832             : #endif
   25833             :   }
   25834          41 :   {
   25835             :     /* %typemap(out) OGRErr */
   25836          59 :     if ( result != 0 && GetUseExceptions()) {
   25837           2 :       const char* pszMessage = CPLGetLastErrorMsg();
   25838           2 :       if( pszMessage[0] != '\0' )
   25839           2 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   25840             :       else
   25841           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   25842           2 :       SWIG_fail;
   25843             :     }
   25844             :   }
   25845          39 :   {
   25846             :     /* %typemap(ret) OGRErr */
   25847          39 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   25848          39 :       resultobj = PyInt_FromLong( result );
   25849             :     }
   25850             :   }
   25851          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; } }
   25852             :   return resultobj;
   25853             : fail:
   25854             :   return NULL;
   25855             : }
   25856             : 
   25857             : 
   25858          91 : SWIGINTERN PyObject *_wrap_Dataset_IsLayerPrivate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25859          91 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25860          91 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25861          91 :   int arg2 ;
   25862          91 :   void *argp1 = 0 ;
   25863          91 :   int res1 = 0 ;
   25864          91 :   int val2 ;
   25865          91 :   int ecode2 = 0 ;
   25866          91 :   PyObject *swig_obj[2] ;
   25867          91 :   bool result;
   25868             :   
   25869          91 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_IsLayerPrivate", 2, 2, swig_obj)) SWIG_fail;
   25870          91 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25871          91 :   if (!SWIG_IsOK(res1)) {
   25872           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_IsLayerPrivate" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25873             :   }
   25874          91 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25875          91 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25876          91 :   if (!SWIG_IsOK(ecode2)) {
   25877           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_IsLayerPrivate" "', argument " "2"" of type '" "int""'");
   25878             :   } 
   25879          91 :   arg2 = static_cast< int >(val2);
   25880          91 :   {
   25881          91 :     const int bLocalUseExceptions = GetUseExceptions();
   25882          91 :     if ( bLocalUseExceptions ) {
   25883          85 :       pushErrorHandler();
   25884             :     }
   25885          91 :     {
   25886          91 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25887          91 :       result = (bool)GDALDatasetShadow_IsLayerPrivate(arg1,arg2);
   25888          91 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25889             :     }
   25890          91 :     if ( bLocalUseExceptions ) {
   25891          85 :       popErrorHandler();
   25892             :     }
   25893             : #ifndef SED_HACKS
   25894             :     if ( bLocalUseExceptions ) {
   25895             :       CPLErr eclass = CPLGetLastErrorType();
   25896             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25897             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25898             :       }
   25899             :     }
   25900             : #endif
   25901             :   }
   25902          91 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   25903          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; } }
   25904             :   return resultobj;
   25905             : fail:
   25906             :   return NULL;
   25907             : }
   25908             : 
   25909             : 
   25910        1917 : SWIGINTERN PyObject *_wrap_Dataset_GetNextFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25911        1917 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25912        1917 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25913        1917 :   bool arg2 = (bool) true ;
   25914        1917 :   bool arg3 = (bool) false ;
   25915        1917 :   OGRLayerShadow **arg4 = (OGRLayerShadow **) NULL ;
   25916        1917 :   double *arg5 = (double *) NULL ;
   25917        1917 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   25918        1917 :   void *arg7 = (void *) NULL ;
   25919        1917 :   void *argp1 = 0 ;
   25920        1917 :   int res1 = 0 ;
   25921        1917 :   bool val2 ;
   25922        1917 :   int ecode2 = 0 ;
   25923        1917 :   bool val3 ;
   25924        1917 :   int ecode3 = 0 ;
   25925        1917 :   OGRLayerShadow *poBelongingLayer4 = NULL ;
   25926        1917 :   double dfProgressPct4 = 0 ;
   25927        1917 :   PyObject * obj0 = 0 ;
   25928        1917 :   PyObject * obj1 = 0 ;
   25929        1917 :   PyObject * obj2 = 0 ;
   25930        1917 :   PyObject * obj3 = 0 ;
   25931        1917 :   PyObject * obj4 = 0 ;
   25932        1917 :   char * kwnames[] = {
   25933             :     (char *)"self",  (char *)"include_layer",  (char *)"include_pct",  (char *)"callback",  (char *)"callback_data",  NULL 
   25934             :   };
   25935        1917 :   OGRFeatureShadow *result = 0 ;
   25936             :   
   25937             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   25938        1917 :   PyProgressData *psProgressInfo;
   25939        1917 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   25940        1917 :   psProgressInfo->nLastReported = -1;
   25941        1917 :   psProgressInfo->psPyCallback = NULL;
   25942        1917 :   psProgressInfo->psPyCallbackData = NULL;
   25943        1917 :   arg7 = psProgressInfo;
   25944        1917 :   {
   25945             :     /* %typemap(in) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   25946        1917 :     arg4 = &poBelongingLayer4;
   25947        1917 :     arg5 = &dfProgressPct4;
   25948             :   }
   25949        1917 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Dataset_GetNextFeature", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   25950        1917 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25951        1917 :   if (!SWIG_IsOK(res1)) {
   25952           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetNextFeature" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25953             :   }
   25954        1917 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25955        1917 :   if (obj1) {
   25956           6 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   25957           6 :     if (!SWIG_IsOK(ecode2)) {
   25958           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetNextFeature" "', argument " "2"" of type '" "bool""'");
   25959             :     } 
   25960             :     arg2 = static_cast< bool >(val2);
   25961             :   }
   25962        1917 :   if (obj2) {
   25963          76 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   25964          76 :     if (!SWIG_IsOK(ecode3)) {
   25965           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetNextFeature" "', argument " "3"" of type '" "bool""'");
   25966             :     } 
   25967             :     arg3 = static_cast< bool >(val3);
   25968             :   }
   25969        1917 :   if (obj3) {
   25970           2 :     {
   25971             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   25972             :       /* callback_func typemap */
   25973             :       
   25974             :       /* In some cases 0 is passed instead of None. */
   25975             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   25976           2 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   25977             :       {
   25978           0 :         if( PyLong_AsLong(obj3) == 0 )
   25979             :         {
   25980           0 :           obj3 = Py_None;
   25981             :         }
   25982             :       }
   25983             :       
   25984           2 :       if (obj3 && obj3 != Py_None ) {
   25985           2 :         void* cbfunction = NULL;
   25986           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   25987             :             (void**)&cbfunction,
   25988             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   25989             :             SWIG_POINTER_EXCEPTION | 0 ));
   25990             :         
   25991           2 :         if ( cbfunction == GDALTermProgress ) {
   25992             :           arg6 = GDALTermProgress;
   25993             :         } else {
   25994           2 :           if (!PyCallable_Check(obj3)) {
   25995           0 :             PyErr_SetString( PyExc_RuntimeError,
   25996             :               "Object given is not a Python function" );
   25997           0 :             SWIG_fail;
   25998             :           }
   25999           2 :           psProgressInfo->psPyCallback = obj3;
   26000           2 :           arg6 = PyProgressProxy;
   26001             :         }
   26002             :         
   26003             :       }
   26004             :       
   26005             :     }
   26006             :   }
   26007        1917 :   if (obj4) {
   26008           1 :     {
   26009             :       /* %typemap(in) ( void* callback_data=NULL)  */
   26010           1 :       psProgressInfo->psPyCallbackData = obj4 ;
   26011             :     }
   26012             :   }
   26013        1917 :   {
   26014             :     /* %typemap(check) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   26015        1917 :     if( !arg3 )
   26016        1841 :     arg5 = NULL;
   26017             :   }
   26018        1917 :   {
   26019        1917 :     const int bLocalUseExceptions = GetUseExceptions();
   26020        1917 :     if ( bLocalUseExceptions ) {
   26021         104 :       pushErrorHandler();
   26022             :     }
   26023        1917 :     {
   26024        1917 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26025        1917 :       result = (OGRFeatureShadow *)GDALDatasetShadow_GetNextFeature(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   26026        1917 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26027             :     }
   26028        1917 :     if ( bLocalUseExceptions ) {
   26029         104 :       popErrorHandler();
   26030             :     }
   26031             : #ifndef SED_HACKS
   26032             :     if ( bLocalUseExceptions ) {
   26033             :       CPLErr eclass = CPLGetLastErrorType();
   26034             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26035             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26036             :       }
   26037             :     }
   26038             : #endif
   26039             :   }
   26040        1917 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
   26041        1917 :   {
   26042             :     /* %typemap(argout) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   26043             :     
   26044        1917 :     if( arg2 )
   26045             :     {
   26046        1911 :       if( resultobj == Py_None )
   26047             :       {
   26048          35 :         resultobj = PyList_New(1);
   26049          35 :         PyList_SetItem(resultobj, 0, Py_None);
   26050             :       }
   26051             :       
   26052        1911 :       PyObject* r;
   26053        1911 :       if ( !*arg4 ) {
   26054          35 :         r = Py_None;
   26055          35 :         Py_INCREF(Py_None);
   26056             :       }
   26057             :       else {
   26058        1876 :         r = SWIG_NewPointerObj(SWIG_as_voidptr( *arg4), SWIGTYPE_p_OGRLayerShadow, 0 );
   26059             :       }
   26060             : #if SWIG_VERSION >= 0x040300
   26061             :       resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   26062             : #else
   26063        1911 :       resultobj = SWIG_Python_AppendOutput(resultobj,r);
   26064             : #endif
   26065             :     }
   26066             :     
   26067        1917 :     if( arg3 )
   26068             :     {
   26069          76 :       if( resultobj == Py_None )
   26070             :       {
   26071           2 :         resultobj = PyList_New(1);
   26072           2 :         PyList_SetItem(resultobj, 0, Py_None);
   26073             :       }
   26074          76 :       PyObject* r = PyFloat_FromDouble( *arg5);
   26075             : #if SWIG_VERSION >= 0x040300
   26076             :       resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   26077             : #else
   26078          76 :       resultobj = SWIG_Python_AppendOutput(resultobj,r);
   26079             : #endif
   26080             :     }
   26081             :     
   26082             :   }
   26083        1917 :   {
   26084             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   26085             :     
   26086        1917 :     CPLFree(psProgressInfo);
   26087             :     
   26088             :   }
   26089        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; } }
   26090             :   return resultobj;
   26091           0 : fail:
   26092           0 :   {
   26093             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   26094             :     
   26095           0 :     CPLFree(psProgressInfo);
   26096             :     
   26097             :   }
   26098             :   return NULL;
   26099             : }
   26100             : 
   26101             : 
   26102         122 : SWIGINTERN PyObject *_wrap_Dataset_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26103         122 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26104         122 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26105         122 :   char *arg2 = (char *) 0 ;
   26106         122 :   void *argp1 = 0 ;
   26107         122 :   int res1 = 0 ;
   26108         122 :   int res2 ;
   26109         122 :   char *buf2 = 0 ;
   26110         122 :   int alloc2 = 0 ;
   26111         122 :   PyObject *swig_obj[2] ;
   26112         122 :   bool result;
   26113             :   
   26114         122 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_TestCapability", 2, 2, swig_obj)) SWIG_fail;
   26115         122 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26116         122 :   if (!SWIG_IsOK(res1)) {
   26117           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_TestCapability" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26118             :   }
   26119         122 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26120         122 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26121         122 :   if (!SWIG_IsOK(res2)) {
   26122           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_TestCapability" "', argument " "2"" of type '" "char const *""'");
   26123             :   }
   26124         122 :   arg2 = reinterpret_cast< char * >(buf2);
   26125         122 :   {
   26126         122 :     const int bLocalUseExceptions = GetUseExceptions();
   26127         122 :     if ( bLocalUseExceptions ) {
   26128          50 :       pushErrorHandler();
   26129             :     }
   26130         122 :     {
   26131         122 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26132         122 :       result = (bool)GDALDatasetShadow_TestCapability(arg1,(char const *)arg2);
   26133         122 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26134             :     }
   26135         122 :     if ( bLocalUseExceptions ) {
   26136          50 :       popErrorHandler();
   26137             :     }
   26138             : #ifndef SED_HACKS
   26139             :     if ( bLocalUseExceptions ) {
   26140             :       CPLErr eclass = CPLGetLastErrorType();
   26141             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26142             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26143             :       }
   26144             :     }
   26145             : #endif
   26146             :   }
   26147         122 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   26148         122 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26149         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; } }
   26150             :   return resultobj;
   26151           0 : fail:
   26152           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26153             :   return NULL;
   26154             : }
   26155             : 
   26156             : 
   26157        9995 : SWIGINTERN PyObject *_wrap_Dataset_ExecuteSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   26158        9995 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26159        9995 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26160        9995 :   char *arg2 = (char *) 0 ;
   26161        9995 :   OGRGeometryShadow *arg3 = (OGRGeometryShadow *) NULL ;
   26162        9995 :   char *arg4 = (char *) "" ;
   26163        9995 :   void *argp1 = 0 ;
   26164        9995 :   int res1 = 0 ;
   26165        9995 :   int res2 ;
   26166        9995 :   char *buf2 = 0 ;
   26167        9995 :   int alloc2 = 0 ;
   26168        9995 :   void *argp3 = 0 ;
   26169        9995 :   int res3 = 0 ;
   26170        9995 :   int res4 ;
   26171        9995 :   char *buf4 = 0 ;
   26172        9995 :   int alloc4 = 0 ;
   26173        9995 :   PyObject * obj0 = 0 ;
   26174        9995 :   PyObject * obj1 = 0 ;
   26175        9995 :   PyObject * obj2 = 0 ;
   26176        9995 :   PyObject * obj3 = 0 ;
   26177        9995 :   char * kwnames[] = {
   26178             :     (char *)"self",  (char *)"statement",  (char *)"spatialFilter",  (char *)"dialect",  NULL 
   26179             :   };
   26180        9995 :   OGRLayerShadow *result = 0 ;
   26181             :   
   26182        9995 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Dataset_ExecuteSQL", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   26183        9995 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26184        9995 :   if (!SWIG_IsOK(res1)) {
   26185           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ExecuteSQL" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26186             :   }
   26187        9995 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26188        9995 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   26189        9995 :   if (!SWIG_IsOK(res2)) {
   26190           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_ExecuteSQL" "', argument " "2"" of type '" "char const *""'");
   26191             :   }
   26192        9995 :   arg2 = reinterpret_cast< char * >(buf2);
   26193        9995 :   if (obj2) {
   26194        9995 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   26195        9995 :     if (!SWIG_IsOK(res3)) {
   26196           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_ExecuteSQL" "', argument " "3"" of type '" "OGRGeometryShadow *""'"); 
   26197             :     }
   26198        9995 :     arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
   26199             :   }
   26200        9995 :   if (obj3) {
   26201        9995 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   26202        9995 :     if (!SWIG_IsOK(res4)) {
   26203           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset_ExecuteSQL" "', argument " "4"" of type '" "char const *""'");
   26204             :     }
   26205        9995 :     arg4 = reinterpret_cast< char * >(buf4);
   26206             :   }
   26207        9995 :   {
   26208        9995 :     if (!arg2) {
   26209         131 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   26210             :     }
   26211             :   }
   26212        9864 :   {
   26213        9864 :     const int bLocalUseExceptions = GetUseExceptions();
   26214        9864 :     if ( bLocalUseExceptions ) {
   26215           0 :       pushErrorHandler();
   26216             :     }
   26217        9864 :     {
   26218        9864 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26219        9864 :       result = (OGRLayerShadow *)GDALDatasetShadow_ExecuteSQL(arg1,(char const *)arg2,arg3,(char const *)arg4);
   26220        9864 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26221             :     }
   26222        9864 :     if ( bLocalUseExceptions ) {
   26223           0 :       popErrorHandler();
   26224             :     }
   26225             : #ifndef SED_HACKS
   26226             :     if ( bLocalUseExceptions ) {
   26227             :       CPLErr eclass = CPLGetLastErrorType();
   26228             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26229             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26230             :       }
   26231             :     }
   26232             : #endif
   26233             :   }
   26234        9864 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   26235        9864 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26236        9864 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   26237        9995 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26238             :   return resultobj;
   26239         131 : fail:
   26240         131 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26241         131 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   26242             :   return NULL;
   26243             : }
   26244             : 
   26245             : 
   26246        2820 : SWIGINTERN PyObject *_wrap_Dataset_ReleaseResultSet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26247        2820 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26248        2820 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26249        2820 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   26250        2820 :   void *argp1 = 0 ;
   26251        2820 :   int res1 = 0 ;
   26252        2820 :   int res2 = 0 ;
   26253        2820 :   PyObject *swig_obj[2] ;
   26254             :   
   26255        2820 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_ReleaseResultSet", 2, 2, swig_obj)) SWIG_fail;
   26256        2820 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26257        2820 :   if (!SWIG_IsOK(res1)) {
   26258           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReleaseResultSet" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26259             :   }
   26260        2820 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26261        2820 :   res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRLayerShadow, SWIG_POINTER_DISOWN |  0 );
   26262        2820 :   if (!SWIG_IsOK(res2)) {
   26263           4 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_ReleaseResultSet" "', argument " "2"" of type '" "OGRLayerShadow *""'");
   26264             :   }
   26265        2818 :   {
   26266        2818 :     const int bLocalUseExceptions = GetUseExceptions();
   26267        2818 :     if ( bLocalUseExceptions ) {
   26268         782 :       pushErrorHandler();
   26269             :     }
   26270        2818 :     {
   26271        2818 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26272        2818 :       GDALDatasetShadow_ReleaseResultSet(arg1,arg2);
   26273        2818 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26274             :     }
   26275        2818 :     if ( bLocalUseExceptions ) {
   26276         782 :       popErrorHandler();
   26277             :     }
   26278             : #ifndef SED_HACKS
   26279             :     if ( bLocalUseExceptions ) {
   26280             :       CPLErr eclass = CPLGetLastErrorType();
   26281             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26282             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26283             :       }
   26284             :     }
   26285             : #endif
   26286             :   }
   26287        2818 :   resultobj = SWIG_Py_Void();
   26288        2820 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26289             :   return resultobj;
   26290             : fail:
   26291             :   return NULL;
   26292             : }
   26293             : 
   26294             : 
   26295           6 : SWIGINTERN PyObject *_wrap_Dataset_GetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26296           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26297           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26298           6 :   void *argp1 = 0 ;
   26299           6 :   int res1 = 0 ;
   26300           6 :   PyObject *swig_obj[1] ;
   26301           6 :   OGRStyleTableShadow *result = 0 ;
   26302             :   
   26303           6 :   if (!args) SWIG_fail;
   26304           6 :   swig_obj[0] = args;
   26305           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26306           6 :   if (!SWIG_IsOK(res1)) {
   26307           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetStyleTable" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26308             :   }
   26309           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26310           6 :   {
   26311           6 :     const int bLocalUseExceptions = GetUseExceptions();
   26312           6 :     if ( bLocalUseExceptions ) {
   26313           5 :       pushErrorHandler();
   26314             :     }
   26315           6 :     {
   26316           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26317           6 :       result = (OGRStyleTableShadow *)GDALDatasetShadow_GetStyleTable(arg1);
   26318           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26319             :     }
   26320           6 :     if ( bLocalUseExceptions ) {
   26321           5 :       popErrorHandler();
   26322             :     }
   26323             : #ifndef SED_HACKS
   26324             :     if ( bLocalUseExceptions ) {
   26325             :       CPLErr eclass = CPLGetLastErrorType();
   26326             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26327             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26328             :       }
   26329             :     }
   26330             : #endif
   26331             :   }
   26332           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
   26333           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; } }
   26334             :   return resultobj;
   26335             : fail:
   26336             :   return NULL;
   26337             : }
   26338             : 
   26339             : 
   26340           7 : SWIGINTERN PyObject *_wrap_Dataset_SetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26341           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26342           7 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26343           7 :   OGRStyleTableShadow *arg2 = (OGRStyleTableShadow *) 0 ;
   26344           7 :   void *argp1 = 0 ;
   26345           7 :   int res1 = 0 ;
   26346           7 :   void *argp2 = 0 ;
   26347           7 :   int res2 = 0 ;
   26348           7 :   PyObject *swig_obj[2] ;
   26349             :   
   26350           7 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetStyleTable", 2, 2, swig_obj)) SWIG_fail;
   26351           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26352           7 :   if (!SWIG_IsOK(res1)) {
   26353           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetStyleTable" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26354             :   }
   26355           7 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26356           7 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
   26357           7 :   if (!SWIG_IsOK(res2)) {
   26358           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetStyleTable" "', argument " "2"" of type '" "OGRStyleTableShadow *""'"); 
   26359             :   }
   26360           7 :   arg2 = reinterpret_cast< OGRStyleTableShadow * >(argp2);
   26361           7 :   {
   26362           7 :     const int bLocalUseExceptions = GetUseExceptions();
   26363           7 :     if ( bLocalUseExceptions ) {
   26364           6 :       pushErrorHandler();
   26365             :     }
   26366           7 :     {
   26367           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26368           7 :       GDALDatasetShadow_SetStyleTable(arg1,arg2);
   26369           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26370             :     }
   26371           7 :     if ( bLocalUseExceptions ) {
   26372           6 :       popErrorHandler();
   26373             :     }
   26374             : #ifndef SED_HACKS
   26375             :     if ( bLocalUseExceptions ) {
   26376             :       CPLErr eclass = CPLGetLastErrorType();
   26377             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26378             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26379             :       }
   26380             :     }
   26381             : #endif
   26382             :   }
   26383           7 :   resultobj = SWIG_Py_Void();
   26384           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; } }
   26385             :   return resultobj;
   26386             : fail:
   26387             :   return NULL;
   26388             : }
   26389             : 
   26390             : 
   26391        9276 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26392        9276 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26393        9276 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26394        9276 :   int arg2 = (int) 0 ;
   26395        9276 :   void *argp1 = 0 ;
   26396        9276 :   int res1 = 0 ;
   26397        9276 :   int val2 ;
   26398        9276 :   int ecode2 = 0 ;
   26399        9276 :   PyObject *swig_obj[2] ;
   26400        9276 :   OGRLayerShadow *result = 0 ;
   26401             :   
   26402        9276 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetLayerByIndex", 1, 2, swig_obj)) SWIG_fail;
   26403        9276 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26404        9276 :   if (!SWIG_IsOK(res1)) {
   26405          14 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerByIndex" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26406             :   }
   26407        9269 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26408        9269 :   if (swig_obj[1]) {
   26409        9269 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   26410        9269 :     if (!SWIG_IsOK(ecode2)) {
   26411           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetLayerByIndex" "', argument " "2"" of type '" "int""'");
   26412             :     } 
   26413             :     arg2 = static_cast< int >(val2);
   26414             :   }
   26415        9269 :   {
   26416        9269 :     const int bLocalUseExceptions = GetUseExceptions();
   26417        9269 :     if ( bLocalUseExceptions ) {
   26418        5266 :       pushErrorHandler();
   26419             :     }
   26420        9269 :     {
   26421        9269 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26422        9269 :       result = (OGRLayerShadow *)GDALDatasetShadow_GetLayerByIndex(arg1,arg2);
   26423        9269 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26424             :     }
   26425        9269 :     if ( bLocalUseExceptions ) {
   26426        5266 :       popErrorHandler();
   26427             :     }
   26428             : #ifndef SED_HACKS
   26429             :     if ( bLocalUseExceptions ) {
   26430             :       CPLErr eclass = CPLGetLastErrorType();
   26431             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26432             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26433             :       }
   26434             :     }
   26435             : #endif
   26436             :   }
   26437        9269 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   26438        9276 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26439             :   return resultobj;
   26440             : fail:
   26441             :   return NULL;
   26442             : }
   26443             : 
   26444             : 
   26445        2729 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26446        2729 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26447        2729 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26448        2729 :   char *arg2 = (char *) 0 ;
   26449        2729 :   void *argp1 = 0 ;
   26450        2729 :   int res1 = 0 ;
   26451        2729 :   int res2 ;
   26452        2729 :   char *buf2 = 0 ;
   26453        2729 :   int alloc2 = 0 ;
   26454        2729 :   PyObject *swig_obj[2] ;
   26455        2729 :   OGRLayerShadow *result = 0 ;
   26456             :   
   26457        2729 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetLayerByName", 2, 2, swig_obj)) SWIG_fail;
   26458        2729 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26459        2729 :   if (!SWIG_IsOK(res1)) {
   26460           2 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerByName" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26461             :   }
   26462        2728 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26463        2728 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26464        2728 :   if (!SWIG_IsOK(res2)) {
   26465           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetLayerByName" "', argument " "2"" of type '" "char const *""'");
   26466             :   }
   26467        2728 :   arg2 = reinterpret_cast< char * >(buf2);
   26468        2728 :   {
   26469        2728 :     const int bLocalUseExceptions = GetUseExceptions();
   26470        2728 :     if ( bLocalUseExceptions ) {
   26471         425 :       pushErrorHandler();
   26472             :     }
   26473        2728 :     {
   26474        2728 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26475        2728 :       result = (OGRLayerShadow *)GDALDatasetShadow_GetLayerByName(arg1,(char const *)arg2);
   26476        2728 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26477             :     }
   26478        2728 :     if ( bLocalUseExceptions ) {
   26479         425 :       popErrorHandler();
   26480             :     }
   26481             : #ifndef SED_HACKS
   26482             :     if ( bLocalUseExceptions ) {
   26483             :       CPLErr eclass = CPLGetLastErrorType();
   26484             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26485             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26486             :       }
   26487             :     }
   26488             : #endif
   26489             :   }
   26490        2728 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   26491        2728 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26492        2729 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26493             :   return resultobj;
   26494           1 : fail:
   26495           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26496             :   return NULL;
   26497             : }
   26498             : 
   26499             : 
   26500          14 : SWIGINTERN PyObject *_wrap_Dataset_ResetReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26501          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26502          14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26503          14 :   void *argp1 = 0 ;
   26504          14 :   int res1 = 0 ;
   26505          14 :   PyObject *swig_obj[1] ;
   26506             :   
   26507          14 :   if (!args) SWIG_fail;
   26508          14 :   swig_obj[0] = args;
   26509          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26510          14 :   if (!SWIG_IsOK(res1)) {
   26511           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ResetReading" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26512             :   }
   26513          14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26514          14 :   {
   26515          14 :     const int bLocalUseExceptions = GetUseExceptions();
   26516          14 :     if ( bLocalUseExceptions ) {
   26517           9 :       pushErrorHandler();
   26518             :     }
   26519          14 :     {
   26520          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26521          14 :       GDALDatasetShadow_ResetReading(arg1);
   26522          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26523             :     }
   26524          14 :     if ( bLocalUseExceptions ) {
   26525           9 :       popErrorHandler();
   26526             :     }
   26527             : #ifndef SED_HACKS
   26528             :     if ( bLocalUseExceptions ) {
   26529             :       CPLErr eclass = CPLGetLastErrorType();
   26530             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26531             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26532             :       }
   26533             :     }
   26534             : #endif
   26535             :   }
   26536          14 :   resultobj = SWIG_Py_Void();
   26537          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; } }
   26538             :   return resultobj;
   26539             : fail:
   26540             :   return NULL;
   26541             : }
   26542             : 
   26543             : 
   26544        1440 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26545        1440 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26546        1440 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26547        1440 :   void *argp1 = 0 ;
   26548        1440 :   int res1 = 0 ;
   26549        1440 :   PyObject *swig_obj[1] ;
   26550        1440 :   int result;
   26551             :   
   26552        1440 :   if (!args) SWIG_fail;
   26553        1440 :   swig_obj[0] = args;
   26554        1440 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26555        1440 :   if (!SWIG_IsOK(res1)) {
   26556           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26557             :   }
   26558        1440 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26559        1440 :   {
   26560        1440 :     const int bLocalUseExceptions = GetUseExceptions();
   26561        1440 :     if ( bLocalUseExceptions ) {
   26562         465 :       pushErrorHandler();
   26563             :     }
   26564        1440 :     {
   26565        1440 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26566        1440 :       result = (int)GDALDatasetShadow_GetLayerCount(arg1);
   26567        1440 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26568             :     }
   26569        1440 :     if ( bLocalUseExceptions ) {
   26570         465 :       popErrorHandler();
   26571             :     }
   26572             : #ifndef SED_HACKS
   26573             :     if ( bLocalUseExceptions ) {
   26574             :       CPLErr eclass = CPLGetLastErrorType();
   26575             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26576             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26577             :       }
   26578             :     }
   26579             : #endif
   26580             :   }
   26581        1440 :   resultobj = SWIG_From_int(static_cast< int >(result));
   26582        1440 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26583             :   return resultobj;
   26584             : fail:
   26585             :   return NULL;
   26586             : }
   26587             : 
   26588             : 
   26589           6 : SWIGINTERN PyObject *_wrap_Dataset_AbortSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26590           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26591           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26592           6 :   void *argp1 = 0 ;
   26593           6 :   int res1 = 0 ;
   26594           6 :   PyObject *swig_obj[1] ;
   26595           6 :   OGRErr result;
   26596             :   
   26597           6 :   if (!args) SWIG_fail;
   26598           6 :   swig_obj[0] = args;
   26599           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26600           6 :   if (!SWIG_IsOK(res1)) {
   26601           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AbortSQL" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26602             :   }
   26603           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26604           6 :   {
   26605           6 :     const int bLocalUseExceptions = GetUseExceptions();
   26606           6 :     if ( bLocalUseExceptions ) {
   26607           6 :       pushErrorHandler();
   26608             :     }
   26609           6 :     {
   26610           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26611           6 :       result = (OGRErr)GDALDatasetShadow_AbortSQL(arg1);
   26612           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26613             :     }
   26614           6 :     if ( bLocalUseExceptions ) {
   26615           6 :       popErrorHandler();
   26616             :     }
   26617             : #ifndef SED_HACKS
   26618             :     if ( bLocalUseExceptions ) {
   26619             :       CPLErr eclass = CPLGetLastErrorType();
   26620             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26621             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26622             :       }
   26623             :     }
   26624             : #endif
   26625             :   }
   26626           6 :   {
   26627             :     /* %typemap(out) OGRErr */
   26628           6 :     if ( result != 0 && GetUseExceptions()) {
   26629           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26630           0 :       if( pszMessage[0] != '\0' )
   26631           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26632             :       else
   26633           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26634           0 :       SWIG_fail;
   26635             :     }
   26636             :   }
   26637           6 :   {
   26638             :     /* %typemap(ret) OGRErr */
   26639           6 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26640           6 :       resultobj = PyInt_FromLong( result );
   26641             :     }
   26642             :   }
   26643           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; } }
   26644             :   return resultobj;
   26645             : fail:
   26646             :   return NULL;
   26647             : }
   26648             : 
   26649             : 
   26650         105 : SWIGINTERN PyObject *_wrap_Dataset_StartTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   26651         105 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26652         105 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26653         105 :   int arg2 = (int) FALSE ;
   26654         105 :   void *argp1 = 0 ;
   26655         105 :   int res1 = 0 ;
   26656         105 :   int val2 ;
   26657         105 :   int ecode2 = 0 ;
   26658         105 :   PyObject * obj0 = 0 ;
   26659         105 :   PyObject * obj1 = 0 ;
   26660         105 :   char * kwnames[] = {
   26661             :     (char *)"self",  (char *)"force",  NULL 
   26662             :   };
   26663         105 :   OGRErr result;
   26664             :   
   26665         105 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_StartTransaction", kwnames, &obj0, &obj1)) SWIG_fail;
   26666         105 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26667         105 :   if (!SWIG_IsOK(res1)) {
   26668           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_StartTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26669             :   }
   26670         105 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26671         105 :   if (obj1) {
   26672          17 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   26673          17 :     if (!SWIG_IsOK(ecode2)) {
   26674           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_StartTransaction" "', argument " "2"" of type '" "int""'");
   26675             :     } 
   26676             :     arg2 = static_cast< int >(val2);
   26677             :   }
   26678         105 :   {
   26679         105 :     const int bLocalUseExceptions = GetUseExceptions();
   26680         105 :     if ( bLocalUseExceptions ) {
   26681           0 :       pushErrorHandler();
   26682             :     }
   26683         105 :     {
   26684         105 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26685         105 :       result = (OGRErr)GDALDatasetShadow_StartTransaction(arg1,arg2);
   26686         105 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26687             :     }
   26688         105 :     if ( bLocalUseExceptions ) {
   26689           0 :       popErrorHandler();
   26690             :     }
   26691             : #ifndef SED_HACKS
   26692             :     if ( bLocalUseExceptions ) {
   26693             :       CPLErr eclass = CPLGetLastErrorType();
   26694             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26695             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26696             :       }
   26697             :     }
   26698             : #endif
   26699             :   }
   26700         105 :   {
   26701             :     /* %typemap(out) OGRErr */
   26702         119 :     if ( result != 0 && GetUseExceptions()) {
   26703           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26704           0 :       if( pszMessage[0] != '\0' )
   26705           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26706             :       else
   26707           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26708           0 :       SWIG_fail;
   26709             :     }
   26710             :   }
   26711         105 :   {
   26712             :     /* %typemap(ret) OGRErr */
   26713         105 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26714         105 :       resultobj = PyInt_FromLong( result );
   26715             :     }
   26716             :   }
   26717         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; } }
   26718             :   return resultobj;
   26719             : fail:
   26720             :   return NULL;
   26721             : }
   26722             : 
   26723             : 
   26724          76 : SWIGINTERN PyObject *_wrap_Dataset_CommitTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26725          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26726          76 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26727          76 :   void *argp1 = 0 ;
   26728          76 :   int res1 = 0 ;
   26729          76 :   PyObject *swig_obj[1] ;
   26730          76 :   OGRErr result;
   26731             :   
   26732          76 :   if (!args) SWIG_fail;
   26733          76 :   swig_obj[0] = args;
   26734          76 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26735          76 :   if (!SWIG_IsOK(res1)) {
   26736           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CommitTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26737             :   }
   26738          76 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26739          76 :   {
   26740          76 :     const int bLocalUseExceptions = GetUseExceptions();
   26741          76 :     if ( bLocalUseExceptions ) {
   26742           0 :       pushErrorHandler();
   26743             :     }
   26744          76 :     {
   26745          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26746          76 :       result = (OGRErr)GDALDatasetShadow_CommitTransaction(arg1);
   26747          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26748             :     }
   26749          76 :     if ( bLocalUseExceptions ) {
   26750           0 :       popErrorHandler();
   26751             :     }
   26752             : #ifndef SED_HACKS
   26753             :     if ( bLocalUseExceptions ) {
   26754             :       CPLErr eclass = CPLGetLastErrorType();
   26755             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26756             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26757             :       }
   26758             :     }
   26759             : #endif
   26760             :   }
   26761          76 :   {
   26762             :     /* %typemap(out) OGRErr */
   26763          85 :     if ( result != 0 && GetUseExceptions()) {
   26764           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26765           0 :       if( pszMessage[0] != '\0' )
   26766           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26767             :       else
   26768           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26769           0 :       SWIG_fail;
   26770             :     }
   26771             :   }
   26772          76 :   {
   26773             :     /* %typemap(ret) OGRErr */
   26774          76 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26775          76 :       resultobj = PyInt_FromLong( result );
   26776             :     }
   26777             :   }
   26778          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; } }
   26779             :   return resultobj;
   26780             : fail:
   26781             :   return NULL;
   26782             : }
   26783             : 
   26784             : 
   26785          44 : SWIGINTERN PyObject *_wrap_Dataset_RollbackTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26786          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26787          44 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26788          44 :   void *argp1 = 0 ;
   26789          44 :   int res1 = 0 ;
   26790          44 :   PyObject *swig_obj[1] ;
   26791          44 :   OGRErr result;
   26792             :   
   26793          44 :   if (!args) SWIG_fail;
   26794          44 :   swig_obj[0] = args;
   26795          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26796          44 :   if (!SWIG_IsOK(res1)) {
   26797           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RollbackTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26798             :   }
   26799          44 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26800          44 :   {
   26801          44 :     const int bLocalUseExceptions = GetUseExceptions();
   26802          44 :     if ( bLocalUseExceptions ) {
   26803           0 :       pushErrorHandler();
   26804             :     }
   26805          44 :     {
   26806          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26807          44 :       result = (OGRErr)GDALDatasetShadow_RollbackTransaction(arg1);
   26808          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26809             :     }
   26810          44 :     if ( bLocalUseExceptions ) {
   26811           0 :       popErrorHandler();
   26812             :     }
   26813             : #ifndef SED_HACKS
   26814             :     if ( bLocalUseExceptions ) {
   26815             :       CPLErr eclass = CPLGetLastErrorType();
   26816             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26817             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26818             :       }
   26819             :     }
   26820             : #endif
   26821             :   }
   26822          44 :   {
   26823             :     /* %typemap(out) OGRErr */
   26824          54 :     if ( result != 0 && GetUseExceptions()) {
   26825           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26826           0 :       if( pszMessage[0] != '\0' )
   26827           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26828             :       else
   26829           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26830           0 :       SWIG_fail;
   26831             :     }
   26832             :   }
   26833          44 :   {
   26834             :     /* %typemap(ret) OGRErr */
   26835          44 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26836          44 :       resultobj = PyInt_FromLong( result );
   26837             :     }
   26838             :   }
   26839          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; } }
   26840             :   return resultobj;
   26841             : fail:
   26842             :   return NULL;
   26843             : }
   26844             : 
   26845             : 
   26846           2 : SWIGINTERN PyObject *_wrap_Dataset_ClearStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26847           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26848           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26849           2 :   void *argp1 = 0 ;
   26850           2 :   int res1 = 0 ;
   26851           2 :   PyObject *swig_obj[1] ;
   26852             :   
   26853           2 :   if (!args) SWIG_fail;
   26854           2 :   swig_obj[0] = args;
   26855           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26856           2 :   if (!SWIG_IsOK(res1)) {
   26857           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ClearStatistics" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26858             :   }
   26859           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26860           2 :   {
   26861           2 :     const int bLocalUseExceptions = GetUseExceptions();
   26862           2 :     if ( bLocalUseExceptions ) {
   26863           1 :       pushErrorHandler();
   26864             :     }
   26865           2 :     {
   26866           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26867           2 :       GDALDatasetShadow_ClearStatistics(arg1);
   26868           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26869             :     }
   26870           2 :     if ( bLocalUseExceptions ) {
   26871           1 :       popErrorHandler();
   26872             :     }
   26873             : #ifndef SED_HACKS
   26874             :     if ( bLocalUseExceptions ) {
   26875             :       CPLErr eclass = CPLGetLastErrorType();
   26876             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26877             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26878             :       }
   26879             :     }
   26880             : #endif
   26881             :   }
   26882           2 :   resultobj = SWIG_Py_Void();
   26883           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; } }
   26884             :   return resultobj;
   26885             : fail:
   26886             :   return NULL;
   26887             : }
   26888             : 
   26889             : 
   26890          32 : SWIGINTERN PyObject *_wrap_Dataset_GetFieldDomainNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26891          32 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26892          32 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26893          32 :   char **arg2 = (char **) 0 ;
   26894          32 :   void *argp1 = 0 ;
   26895          32 :   int res1 = 0 ;
   26896          32 :   PyObject *swig_obj[2] ;
   26897          32 :   char **result = 0 ;
   26898             :   
   26899          32 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetFieldDomainNames", 1, 2, swig_obj)) SWIG_fail;
   26900          32 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26901          32 :   if (!SWIG_IsOK(res1)) {
   26902           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFieldDomainNames" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26903             :   }
   26904          32 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26905          32 :   if (swig_obj[1]) {
   26906           0 :     {
   26907             :       /* %typemap(in) char **dict */
   26908           0 :       arg2 = NULL;
   26909           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   26910           0 :         int bErr = FALSE;
   26911           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   26912           0 :         if ( bErr )
   26913             :         {
   26914           0 :           SWIG_fail;
   26915             :         }
   26916             :       }
   26917           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   26918           0 :         int bErr = FALSE;
   26919           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   26920           0 :         if ( bErr )
   26921             :         {
   26922           0 :           SWIG_fail;
   26923             :         }
   26924             :       }
   26925             :       else {
   26926           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   26927           0 :         SWIG_fail;
   26928             :       }
   26929             :     }
   26930             :   }
   26931          32 :   {
   26932          32 :     const int bLocalUseExceptions = GetUseExceptions();
   26933          32 :     if ( bLocalUseExceptions ) {
   26934          24 :       pushErrorHandler();
   26935             :     }
   26936          32 :     {
   26937          32 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26938          32 :       result = (char **)GDALDatasetShadow_GetFieldDomainNames(arg1,arg2);
   26939          32 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26940             :     }
   26941          32 :     if ( bLocalUseExceptions ) {
   26942          24 :       popErrorHandler();
   26943             :     }
   26944             : #ifndef SED_HACKS
   26945             :     if ( bLocalUseExceptions ) {
   26946             :       CPLErr eclass = CPLGetLastErrorType();
   26947             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26948             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26949             :       }
   26950             :     }
   26951             : #endif
   26952             :   }
   26953          32 :   {
   26954             :     /* %typemap(out) char **CSL -> ( string ) */
   26955          32 :     bool bErr = false;
   26956          32 :     resultobj = CSLToList(result, &bErr);
   26957          32 :     CSLDestroy(result);
   26958          32 :     if( bErr ) {
   26959           0 :       SWIG_fail;
   26960             :     }
   26961             :   }
   26962          32 :   {
   26963             :     /* %typemap(freearg) char **dict */
   26964          32 :     CSLDestroy( arg2 );
   26965             :   }
   26966          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; } }
   26967             :   return resultobj;
   26968           0 : fail:
   26969           0 :   {
   26970             :     /* %typemap(freearg) char **dict */
   26971           0 :     CSLDestroy( arg2 );
   26972             :   }
   26973             :   return NULL;
   26974             : }
   26975             : 
   26976             : 
   26977         115 : SWIGINTERN PyObject *_wrap_Dataset_GetFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26978         115 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26979         115 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26980         115 :   char *arg2 = (char *) 0 ;
   26981         115 :   void *argp1 = 0 ;
   26982         115 :   int res1 = 0 ;
   26983         115 :   int res2 ;
   26984         115 :   char *buf2 = 0 ;
   26985         115 :   int alloc2 = 0 ;
   26986         115 :   PyObject *swig_obj[2] ;
   26987         115 :   OGRFieldDomainShadow *result = 0 ;
   26988             :   
   26989         115 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   26990         115 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26991         115 :   if (!SWIG_IsOK(res1)) {
   26992           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26993             :   }
   26994         115 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26995         115 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26996         115 :   if (!SWIG_IsOK(res2)) {
   26997           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetFieldDomain" "', argument " "2"" of type '" "char const *""'");
   26998             :   }
   26999         115 :   arg2 = reinterpret_cast< char * >(buf2);
   27000         115 :   {
   27001         115 :     if (!arg2) {
   27002           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27003             :     }
   27004             :   }
   27005         114 :   {
   27006         114 :     const int bLocalUseExceptions = GetUseExceptions();
   27007         114 :     if ( bLocalUseExceptions ) {
   27008          82 :       pushErrorHandler();
   27009             :     }
   27010         114 :     {
   27011         114 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27012         114 :       result = (OGRFieldDomainShadow *)GDALDatasetShadow_GetFieldDomain(arg1,(char const *)arg2);
   27013         114 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27014             :     }
   27015         114 :     if ( bLocalUseExceptions ) {
   27016          82 :       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         114 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   27028         114 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27029         115 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27030             :   return resultobj;
   27031           1 : fail:
   27032           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27033             :   return NULL;
   27034             : }
   27035             : 
   27036             : 
   27037          38 : SWIGINTERN PyObject *_wrap_Dataset_AddFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27038          38 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27039          38 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27040          38 :   OGRFieldDomainShadow *arg2 = (OGRFieldDomainShadow *) 0 ;
   27041          38 :   void *argp1 = 0 ;
   27042          38 :   int res1 = 0 ;
   27043          38 :   void *argp2 = 0 ;
   27044          38 :   int res2 = 0 ;
   27045          38 :   PyObject *swig_obj[2] ;
   27046          38 :   bool result;
   27047             :   
   27048          38 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AddFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   27049          38 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27050          38 :   if (!SWIG_IsOK(res1)) {
   27051           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27052             :   }
   27053          38 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27054          38 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   27055          38 :   if (!SWIG_IsOK(res2)) {
   27056           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_AddFieldDomain" "', argument " "2"" of type '" "OGRFieldDomainShadow *""'"); 
   27057             :   }
   27058          38 :   arg2 = reinterpret_cast< OGRFieldDomainShadow * >(argp2);
   27059          38 :   {
   27060          38 :     if (!arg2) {
   27061           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27062             :     }
   27063             :   }
   27064          37 :   {
   27065          37 :     const int bLocalUseExceptions = GetUseExceptions();
   27066          37 :     if ( bLocalUseExceptions ) {
   27067          19 :       pushErrorHandler();
   27068             :     }
   27069          37 :     {
   27070          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27071          37 :       result = (bool)GDALDatasetShadow_AddFieldDomain(arg1,arg2);
   27072          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27073             :     }
   27074          37 :     if ( bLocalUseExceptions ) {
   27075          19 :       popErrorHandler();
   27076             :     }
   27077             : #ifndef SED_HACKS
   27078             :     if ( bLocalUseExceptions ) {
   27079             :       CPLErr eclass = CPLGetLastErrorType();
   27080             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27081             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27082             :       }
   27083             :     }
   27084             : #endif
   27085             :   }
   27086          37 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27087          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; } }
   27088             :   return resultobj;
   27089             : fail:
   27090             :   return NULL;
   27091             : }
   27092             : 
   27093             : 
   27094           8 : SWIGINTERN PyObject *_wrap_Dataset_DeleteFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27095           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27096           8 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27097           8 :   char *arg2 = (char *) 0 ;
   27098           8 :   void *argp1 = 0 ;
   27099           8 :   int res1 = 0 ;
   27100           8 :   int res2 ;
   27101           8 :   char *buf2 = 0 ;
   27102           8 :   int alloc2 = 0 ;
   27103           8 :   PyObject *swig_obj[2] ;
   27104           8 :   bool result;
   27105             :   
   27106           8 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   27107           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27108           8 :   if (!SWIG_IsOK(res1)) {
   27109           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27110             :   }
   27111           8 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27112           8 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27113           8 :   if (!SWIG_IsOK(res2)) {
   27114           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_DeleteFieldDomain" "', argument " "2"" of type '" "char const *""'");
   27115             :   }
   27116           8 :   arg2 = reinterpret_cast< char * >(buf2);
   27117           8 :   {
   27118           8 :     if (!arg2) {
   27119           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27120             :     }
   27121             :   }
   27122           8 :   {
   27123           8 :     const int bLocalUseExceptions = GetUseExceptions();
   27124           8 :     if ( bLocalUseExceptions ) {
   27125           8 :       pushErrorHandler();
   27126             :     }
   27127           8 :     {
   27128           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27129           8 :       result = (bool)GDALDatasetShadow_DeleteFieldDomain(arg1,(char const *)arg2);
   27130           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27131             :     }
   27132           8 :     if ( bLocalUseExceptions ) {
   27133           8 :       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           8 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27145           8 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27146           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; } }
   27147             :   return resultobj;
   27148           0 : fail:
   27149           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27150             :   return NULL;
   27151             : }
   27152             : 
   27153             : 
   27154           4 : SWIGINTERN PyObject *_wrap_Dataset_UpdateFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27155           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27156           4 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27157           4 :   OGRFieldDomainShadow *arg2 = (OGRFieldDomainShadow *) 0 ;
   27158           4 :   void *argp1 = 0 ;
   27159           4 :   int res1 = 0 ;
   27160           4 :   void *argp2 = 0 ;
   27161           4 :   int res2 = 0 ;
   27162           4 :   PyObject *swig_obj[2] ;
   27163           4 :   bool result;
   27164             :   
   27165           4 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_UpdateFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   27166           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27167           4 :   if (!SWIG_IsOK(res1)) {
   27168           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_UpdateFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27169             :   }
   27170           4 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27171           4 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   27172           4 :   if (!SWIG_IsOK(res2)) {
   27173           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_UpdateFieldDomain" "', argument " "2"" of type '" "OGRFieldDomainShadow *""'"); 
   27174             :   }
   27175           4 :   arg2 = reinterpret_cast< OGRFieldDomainShadow * >(argp2);
   27176           4 :   {
   27177           4 :     if (!arg2) {
   27178           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27179             :     }
   27180             :   }
   27181           4 :   {
   27182           4 :     const int bLocalUseExceptions = GetUseExceptions();
   27183           4 :     if ( bLocalUseExceptions ) {
   27184           4 :       pushErrorHandler();
   27185             :     }
   27186           4 :     {
   27187           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27188           4 :       result = (bool)GDALDatasetShadow_UpdateFieldDomain(arg1,arg2);
   27189           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27190             :     }
   27191           4 :     if ( bLocalUseExceptions ) {
   27192           4 :       popErrorHandler();
   27193             :     }
   27194             : #ifndef SED_HACKS
   27195             :     if ( bLocalUseExceptions ) {
   27196             :       CPLErr eclass = CPLGetLastErrorType();
   27197             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27198             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27199             :       }
   27200             :     }
   27201             : #endif
   27202             :   }
   27203           4 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27204           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; } }
   27205             :   return resultobj;
   27206             : fail:
   27207             :   return NULL;
   27208             : }
   27209             : 
   27210             : 
   27211          46 : SWIGINTERN PyObject *_wrap_Dataset_GetRelationshipNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27212          46 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27213          46 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27214          46 :   char **arg2 = (char **) 0 ;
   27215          46 :   void *argp1 = 0 ;
   27216          46 :   int res1 = 0 ;
   27217          46 :   PyObject *swig_obj[2] ;
   27218          46 :   char **result = 0 ;
   27219             :   
   27220          46 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRelationshipNames", 1, 2, swig_obj)) SWIG_fail;
   27221          46 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27222          46 :   if (!SWIG_IsOK(res1)) {
   27223           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRelationshipNames" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27224             :   }
   27225          46 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27226          46 :   if (swig_obj[1]) {
   27227           0 :     {
   27228             :       /* %typemap(in) char **dict */
   27229           0 :       arg2 = NULL;
   27230           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   27231           0 :         int bErr = FALSE;
   27232           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   27233           0 :         if ( bErr )
   27234             :         {
   27235           0 :           SWIG_fail;
   27236             :         }
   27237             :       }
   27238           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   27239           0 :         int bErr = FALSE;
   27240           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   27241           0 :         if ( bErr )
   27242             :         {
   27243           0 :           SWIG_fail;
   27244             :         }
   27245             :       }
   27246             :       else {
   27247           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   27248           0 :         SWIG_fail;
   27249             :       }
   27250             :     }
   27251             :   }
   27252          46 :   {
   27253          46 :     const int bLocalUseExceptions = GetUseExceptions();
   27254          46 :     if ( bLocalUseExceptions ) {
   27255           7 :       pushErrorHandler();
   27256             :     }
   27257          46 :     {
   27258          46 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27259          46 :       result = (char **)GDALDatasetShadow_GetRelationshipNames(arg1,arg2);
   27260          46 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27261             :     }
   27262          46 :     if ( bLocalUseExceptions ) {
   27263           7 :       popErrorHandler();
   27264             :     }
   27265             : #ifndef SED_HACKS
   27266             :     if ( bLocalUseExceptions ) {
   27267             :       CPLErr eclass = CPLGetLastErrorType();
   27268             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27269             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27270             :       }
   27271             :     }
   27272             : #endif
   27273             :   }
   27274          46 :   {
   27275             :     /* %typemap(out) char **CSL -> ( string ) */
   27276          46 :     bool bErr = false;
   27277          46 :     resultobj = CSLToList(result, &bErr);
   27278          46 :     CSLDestroy(result);
   27279          46 :     if( bErr ) {
   27280           0 :       SWIG_fail;
   27281             :     }
   27282             :   }
   27283          46 :   {
   27284             :     /* %typemap(freearg) char **dict */
   27285          46 :     CSLDestroy( arg2 );
   27286             :   }
   27287          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; } }
   27288             :   return resultobj;
   27289           0 : fail:
   27290           0 :   {
   27291             :     /* %typemap(freearg) char **dict */
   27292           0 :     CSLDestroy( arg2 );
   27293             :   }
   27294             :   return NULL;
   27295             : }
   27296             : 
   27297             : 
   27298          52 : SWIGINTERN PyObject *_wrap_Dataset_GetRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27299          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27300          52 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27301          52 :   char *arg2 = (char *) 0 ;
   27302          52 :   void *argp1 = 0 ;
   27303          52 :   int res1 = 0 ;
   27304          52 :   int res2 ;
   27305          52 :   char *buf2 = 0 ;
   27306          52 :   int alloc2 = 0 ;
   27307          52 :   PyObject *swig_obj[2] ;
   27308          52 :   GDALRelationshipShadow *result = 0 ;
   27309             :   
   27310          52 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRelationship", 2, 2, swig_obj)) SWIG_fail;
   27311          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27312          52 :   if (!SWIG_IsOK(res1)) {
   27313           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27314             :   }
   27315          52 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27316          52 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27317          52 :   if (!SWIG_IsOK(res2)) {
   27318           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetRelationship" "', argument " "2"" of type '" "char const *""'");
   27319             :   }
   27320          52 :   arg2 = reinterpret_cast< char * >(buf2);
   27321          52 :   {
   27322          52 :     if (!arg2) {
   27323           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27324             :     }
   27325             :   }
   27326          52 :   {
   27327          52 :     const int bLocalUseExceptions = GetUseExceptions();
   27328          52 :     if ( bLocalUseExceptions ) {
   27329          10 :       pushErrorHandler();
   27330             :     }
   27331          52 :     {
   27332          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27333          52 :       result = (GDALRelationshipShadow *)GDALDatasetShadow_GetRelationship(arg1,(char const *)arg2);
   27334          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27335             :     }
   27336          52 :     if ( bLocalUseExceptions ) {
   27337          10 :       popErrorHandler();
   27338             :     }
   27339             : #ifndef SED_HACKS
   27340             :     if ( bLocalUseExceptions ) {
   27341             :       CPLErr eclass = CPLGetLastErrorType();
   27342             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27343             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27344             :       }
   27345             :     }
   27346             : #endif
   27347             :   }
   27348          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   27349          52 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27350          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; } }
   27351             :   return resultobj;
   27352           0 : fail:
   27353           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27354             :   return NULL;
   27355             : }
   27356             : 
   27357             : 
   27358          42 : SWIGINTERN PyObject *_wrap_Dataset_AddRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27359          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27360          42 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27361          42 :   GDALRelationshipShadow *arg2 = (GDALRelationshipShadow *) 0 ;
   27362          42 :   void *argp1 = 0 ;
   27363          42 :   int res1 = 0 ;
   27364          42 :   void *argp2 = 0 ;
   27365          42 :   int res2 = 0 ;
   27366          42 :   PyObject *swig_obj[2] ;
   27367          42 :   bool result;
   27368             :   
   27369          42 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AddRelationship", 2, 2, swig_obj)) SWIG_fail;
   27370          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27371          42 :   if (!SWIG_IsOK(res1)) {
   27372           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27373             :   }
   27374          42 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27375          42 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   27376          42 :   if (!SWIG_IsOK(res2)) {
   27377           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_AddRelationship" "', argument " "2"" of type '" "GDALRelationshipShadow *""'"); 
   27378             :   }
   27379          42 :   arg2 = reinterpret_cast< GDALRelationshipShadow * >(argp2);
   27380          42 :   {
   27381          42 :     if (!arg2) {
   27382           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27383             :     }
   27384             :   }
   27385          42 :   {
   27386          42 :     const int bLocalUseExceptions = GetUseExceptions();
   27387          42 :     if ( bLocalUseExceptions ) {
   27388           0 :       pushErrorHandler();
   27389             :     }
   27390          42 :     {
   27391          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27392          42 :       result = (bool)GDALDatasetShadow_AddRelationship(arg1,arg2);
   27393          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27394             :     }
   27395          42 :     if ( bLocalUseExceptions ) {
   27396           0 :       popErrorHandler();
   27397             :     }
   27398             : #ifndef SED_HACKS
   27399             :     if ( bLocalUseExceptions ) {
   27400             :       CPLErr eclass = CPLGetLastErrorType();
   27401             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27402             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27403             :       }
   27404             :     }
   27405             : #endif
   27406             :   }
   27407          42 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27408          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; } }
   27409             :   return resultobj;
   27410             : fail:
   27411             :   return NULL;
   27412             : }
   27413             : 
   27414             : 
   27415           6 : SWIGINTERN PyObject *_wrap_Dataset_DeleteRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27416           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27417           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27418           6 :   char *arg2 = (char *) 0 ;
   27419           6 :   void *argp1 = 0 ;
   27420           6 :   int res1 = 0 ;
   27421           6 :   int res2 ;
   27422           6 :   char *buf2 = 0 ;
   27423           6 :   int alloc2 = 0 ;
   27424           6 :   PyObject *swig_obj[2] ;
   27425           6 :   bool result;
   27426             :   
   27427           6 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteRelationship", 2, 2, swig_obj)) SWIG_fail;
   27428           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27429           6 :   if (!SWIG_IsOK(res1)) {
   27430           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27431             :   }
   27432           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27433           6 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27434           6 :   if (!SWIG_IsOK(res2)) {
   27435           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_DeleteRelationship" "', argument " "2"" of type '" "char const *""'");
   27436             :   }
   27437           6 :   arg2 = reinterpret_cast< char * >(buf2);
   27438           6 :   {
   27439           6 :     if (!arg2) {
   27440           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27441             :     }
   27442             :   }
   27443           6 :   {
   27444           6 :     const int bLocalUseExceptions = GetUseExceptions();
   27445           6 :     if ( bLocalUseExceptions ) {
   27446           0 :       pushErrorHandler();
   27447             :     }
   27448           6 :     {
   27449           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27450           6 :       result = (bool)GDALDatasetShadow_DeleteRelationship(arg1,(char const *)arg2);
   27451           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27452             :     }
   27453           6 :     if ( bLocalUseExceptions ) {
   27454           0 :       popErrorHandler();
   27455             :     }
   27456             : #ifndef SED_HACKS
   27457             :     if ( bLocalUseExceptions ) {
   27458             :       CPLErr eclass = CPLGetLastErrorType();
   27459             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27460             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27461             :       }
   27462             :     }
   27463             : #endif
   27464             :   }
   27465           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27466           6 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27467           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; } }
   27468             :   return resultobj;
   27469           0 : fail:
   27470           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27471             :   return NULL;
   27472             : }
   27473             : 
   27474             : 
   27475           9 : SWIGINTERN PyObject *_wrap_Dataset_UpdateRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27476           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27477           9 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27478           9 :   GDALRelationshipShadow *arg2 = (GDALRelationshipShadow *) 0 ;
   27479           9 :   void *argp1 = 0 ;
   27480           9 :   int res1 = 0 ;
   27481           9 :   void *argp2 = 0 ;
   27482           9 :   int res2 = 0 ;
   27483           9 :   PyObject *swig_obj[2] ;
   27484           9 :   bool result;
   27485             :   
   27486           9 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_UpdateRelationship", 2, 2, swig_obj)) SWIG_fail;
   27487           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27488           9 :   if (!SWIG_IsOK(res1)) {
   27489           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_UpdateRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27490             :   }
   27491           9 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27492           9 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   27493           9 :   if (!SWIG_IsOK(res2)) {
   27494           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_UpdateRelationship" "', argument " "2"" of type '" "GDALRelationshipShadow *""'"); 
   27495             :   }
   27496           9 :   arg2 = reinterpret_cast< GDALRelationshipShadow * >(argp2);
   27497           9 :   {
   27498           9 :     if (!arg2) {
   27499           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27500             :     }
   27501             :   }
   27502           9 :   {
   27503           9 :     const int bLocalUseExceptions = GetUseExceptions();
   27504           9 :     if ( bLocalUseExceptions ) {
   27505           0 :       pushErrorHandler();
   27506             :     }
   27507           9 :     {
   27508           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27509           9 :       result = (bool)GDALDatasetShadow_UpdateRelationship(arg1,arg2);
   27510           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27511             :     }
   27512           9 :     if ( bLocalUseExceptions ) {
   27513           0 :       popErrorHandler();
   27514             :     }
   27515             : #ifndef SED_HACKS
   27516             :     if ( bLocalUseExceptions ) {
   27517             :       CPLErr eclass = CPLGetLastErrorType();
   27518             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27519             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27520             :       }
   27521             :     }
   27522             : #endif
   27523             :   }
   27524           9 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27525           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; } }
   27526             :   return resultobj;
   27527             : fail:
   27528             :   return NULL;
   27529             : }
   27530             : 
   27531             : 
   27532      176578 : SWIGINTERN PyObject *_wrap_Dataset_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   27533      176578 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27534      176578 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27535      176578 :   double arg2 ;
   27536      176578 :   double arg3 ;
   27537      176578 :   double arg4 ;
   27538      176578 :   double arg5 ;
   27539      176578 :   void **arg6 = (void **) 0 ;
   27540      176578 :   int *arg7 = (int *) 0 ;
   27541      176578 :   int *arg8 = (int *) 0 ;
   27542      176578 :   GDALDataType *arg9 = (GDALDataType *) 0 ;
   27543      176578 :   int arg10 = (int) 0 ;
   27544      176578 :   int *arg11 = (int *) 0 ;
   27545      176578 :   GIntBig *arg12 = (GIntBig *) 0 ;
   27546      176578 :   GIntBig *arg13 = (GIntBig *) 0 ;
   27547      176578 :   GIntBig *arg14 = (GIntBig *) 0 ;
   27548      176578 :   GDALRIOResampleAlg arg15 = (GDALRIOResampleAlg) GRIORA_NearestNeighbour ;
   27549      176578 :   GDALProgressFunc arg16 = (GDALProgressFunc) NULL ;
   27550      176578 :   void *arg17 = (void *) NULL ;
   27551      176578 :   void *arg18 = (void *) NULL ;
   27552      176578 :   void *argp1 = 0 ;
   27553      176578 :   int res1 = 0 ;
   27554      176578 :   double val2 ;
   27555      176578 :   int ecode2 = 0 ;
   27556      176578 :   double val3 ;
   27557      176578 :   int ecode3 = 0 ;
   27558      176578 :   double val4 ;
   27559      176578 :   int ecode4 = 0 ;
   27560      176578 :   double val5 ;
   27561      176578 :   int ecode5 = 0 ;
   27562      176578 :   void *pyObject6 = NULL ;
   27563      176578 :   int val7 ;
   27564      176578 :   int val8 ;
   27565      176578 :   GDALDataType val9 ;
   27566      176578 :   GIntBig val12 ;
   27567      176578 :   GIntBig val13 ;
   27568      176578 :   GIntBig val14 ;
   27569      176578 :   PyObject * obj0 = 0 ;
   27570      176578 :   PyObject * obj1 = 0 ;
   27571      176578 :   PyObject * obj2 = 0 ;
   27572      176578 :   PyObject * obj3 = 0 ;
   27573      176578 :   PyObject * obj4 = 0 ;
   27574      176578 :   PyObject * obj5 = 0 ;
   27575      176578 :   PyObject * obj6 = 0 ;
   27576      176578 :   PyObject * obj7 = 0 ;
   27577      176578 :   PyObject * obj8 = 0 ;
   27578      176578 :   PyObject * obj9 = 0 ;
   27579      176578 :   PyObject * obj10 = 0 ;
   27580      176578 :   PyObject * obj11 = 0 ;
   27581      176578 :   PyObject * obj12 = 0 ;
   27582      176578 :   PyObject * obj13 = 0 ;
   27583      176578 :   PyObject * obj14 = 0 ;
   27584      176578 :   PyObject * obj15 = 0 ;
   27585      176578 :   char * kwnames[] = {
   27586             :     (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 
   27587             :   };
   27588      176578 :   CPLErr result;
   27589             :   
   27590             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   27591      176578 :   PyProgressData *psProgressInfo;
   27592      176578 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   27593      176578 :   psProgressInfo->nLastReported = -1;
   27594      176578 :   psProgressInfo->psPyCallback = NULL;
   27595      176578 :   psProgressInfo->psPyCallbackData = NULL;
   27596      176578 :   arg17 = psProgressInfo;
   27597      176578 :   {
   27598             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   27599      176578 :     arg6 = &pyObject6;
   27600             :   }
   27601      176578 :   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;
   27602      176578 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27603      176578 :   if (!SWIG_IsOK(res1)) {
   27604           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReadRaster1" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27605             :   }
   27606      176578 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27607      176578 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   27608      176578 :   if (!SWIG_IsOK(ecode2)) {
   27609           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_ReadRaster1" "', argument " "2"" of type '" "double""'");
   27610             :   } 
   27611      176578 :   arg2 = static_cast< double >(val2);
   27612      176578 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   27613      176578 :   if (!SWIG_IsOK(ecode3)) {
   27614           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_ReadRaster1" "', argument " "3"" of type '" "double""'");
   27615             :   } 
   27616      176578 :   arg3 = static_cast< double >(val3);
   27617      176578 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   27618      176578 :   if (!SWIG_IsOK(ecode4)) {
   27619           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_ReadRaster1" "', argument " "4"" of type '" "double""'");
   27620             :   } 
   27621      176578 :   arg4 = static_cast< double >(val4);
   27622      176578 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   27623      176578 :   if (!SWIG_IsOK(ecode5)) {
   27624           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_ReadRaster1" "', argument " "5"" of type '" "double""'");
   27625             :   } 
   27626      176578 :   arg5 = static_cast< double >(val5);
   27627      176578 :   if (obj5) {
   27628      176578 :     {
   27629             :       /* %typemap(in) (int *optional_##int) */
   27630      176578 :       if ( obj5 == Py_None ) {
   27631             :         arg7 = 0;
   27632             :       }
   27633      176578 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   27634             :         arg7 = (int *) &val7;
   27635             :       }
   27636             :       else {
   27637           2 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27638           2 :         SWIG_fail;
   27639             :       }
   27640             :     }
   27641             :   }
   27642      176576 :   if (obj6) {
   27643      176576 :     {
   27644             :       /* %typemap(in) (int *optional_##int) */
   27645      176576 :       if ( obj6 == Py_None ) {
   27646             :         arg8 = 0;
   27647             :       }
   27648      176576 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   27649             :         arg8 = (int *) &val8;
   27650             :       }
   27651             :       else {
   27652           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27653           0 :         SWIG_fail;
   27654             :       }
   27655             :     }
   27656             :   }
   27657      176576 :   if (obj7) {
   27658      176576 :     {
   27659             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   27660      176576 :       int intval = 0;
   27661      176576 :       if ( obj7 == Py_None ) {
   27662             :         arg9 = NULL;
   27663             :       }
   27664      353152 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj7, &intval)) ) {
   27665      176576 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   27666             :         {
   27667           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   27668             :         }
   27669      176576 :         val9 = static_cast<GDALDataType>(intval);
   27670      176576 :         arg9 = &val9;
   27671             :       }
   27672             :       else {
   27673           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27674           0 :         SWIG_fail;
   27675             :       }
   27676             :     }
   27677             :   }
   27678      176576 :   if (obj8) {
   27679      176576 :     {
   27680             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   27681      176576 :       arg11 = CreateCIntListFromSequence(obj8, &arg10);
   27682      176576 :       if( arg10 < 0 ) {
   27683           0 :         SWIG_fail;
   27684             :       }
   27685             :     }
   27686             :   }
   27687      176576 :   if (obj9) {
   27688      176576 :     {
   27689             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   27690      176576 :       if ( obj9 == Py_None ) {
   27691             :         arg12 = 0;
   27692             :       }
   27693        1099 :       else if ( PyArg_Parse( obj9,"L" ,&val12 ) ) {
   27694             :         arg12 = (GIntBig *) &val12;
   27695             :       }
   27696             :       else {
   27697           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27698           0 :         SWIG_fail;
   27699             :       }
   27700             :     }
   27701             :   }
   27702      176576 :   if (obj10) {
   27703      176576 :     {
   27704             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   27705      176576 :       if ( obj10 == Py_None ) {
   27706             :         arg13 = 0;
   27707             :       }
   27708          27 :       else if ( PyArg_Parse( obj10,"L" ,&val13 ) ) {
   27709             :         arg13 = (GIntBig *) &val13;
   27710             :       }
   27711             :       else {
   27712           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27713           0 :         SWIG_fail;
   27714             :       }
   27715             :     }
   27716             :   }
   27717      176576 :   if (obj11) {
   27718      176576 :     {
   27719             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   27720      176576 :       if ( obj11 == Py_None ) {
   27721             :         arg14 = 0;
   27722             :       }
   27723        1077 :       else if ( PyArg_Parse( obj11,"L" ,&val14 ) ) {
   27724             :         arg14 = (GIntBig *) &val14;
   27725             :       }
   27726             :       else {
   27727           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27728           0 :         SWIG_fail;
   27729             :       }
   27730             :     }
   27731             :   }
   27732      176576 :   if (obj12) {
   27733      176576 :     {
   27734             :       // %typemap(in) GDALRIOResampleAlg
   27735      176576 :       int val = 0;
   27736      176576 :       int ecode = SWIG_AsVal_int(obj12, &val);
   27737      176576 :       if (!SWIG_IsOK(ecode)) {
   27738           1 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   27739             :       }
   27740      176575 :       if( val < 0 ||
   27741      176574 :         ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   27742      176573 :           val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   27743             :         val > static_cast<int>(GRIORA_LAST) )
   27744             :       {
   27745           2 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   27746             :       }
   27747             :       arg15 = static_cast< GDALRIOResampleAlg >(val);
   27748             :     }
   27749             :   }
   27750      176573 :   if (obj13) {
   27751      176573 :     {
   27752             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   27753             :       /* callback_func typemap */
   27754             :       
   27755             :       /* In some cases 0 is passed instead of None. */
   27756             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   27757      176573 :       if ( PyLong_Check(obj13) || PyInt_Check(obj13) )
   27758             :       {
   27759           0 :         if( PyLong_AsLong(obj13) == 0 )
   27760             :         {
   27761           0 :           obj13 = Py_None;
   27762             :         }
   27763             :       }
   27764             :       
   27765      176573 :       if (obj13 && obj13 != Py_None ) {
   27766          19 :         void* cbfunction = NULL;
   27767          19 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj13,
   27768             :             (void**)&cbfunction,
   27769             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   27770             :             SWIG_POINTER_EXCEPTION | 0 ));
   27771             :         
   27772          19 :         if ( cbfunction == GDALTermProgress ) {
   27773             :           arg16 = GDALTermProgress;
   27774             :         } else {
   27775          19 :           if (!PyCallable_Check(obj13)) {
   27776           0 :             PyErr_SetString( PyExc_RuntimeError,
   27777             :               "Object given is not a Python function" );
   27778           0 :             SWIG_fail;
   27779             :           }
   27780          19 :           psProgressInfo->psPyCallback = obj13;
   27781          19 :           arg16 = PyProgressProxy;
   27782             :         }
   27783             :         
   27784             :       }
   27785             :       
   27786             :     }
   27787             :   }
   27788      176573 :   if (obj14) {
   27789      176573 :     {
   27790             :       /* %typemap(in) ( void* callback_data=NULL)  */
   27791      176573 :       psProgressInfo->psPyCallbackData = obj14 ;
   27792             :     }
   27793             :   }
   27794      176573 :   if (obj15) {
   27795      176573 :     {
   27796             :       /* %typemap(in) ( void *inPythonObject ) */
   27797      176573 :       arg18 = obj15;
   27798             :     }
   27799             :   }
   27800      176573 :   {
   27801      176573 :     const int bLocalUseExceptions = GetUseExceptions();
   27802      176573 :     if ( bLocalUseExceptions ) {
   27803      169587 :       pushErrorHandler();
   27804             :     }
   27805      176573 :     {
   27806      176573 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27807      176573 :       result = (CPLErr)GDALDatasetShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
   27808      176573 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27809             :     }
   27810      176573 :     if ( bLocalUseExceptions ) {
   27811      169587 :       popErrorHandler();
   27812             :     }
   27813             : #ifndef SED_HACKS
   27814             :     if ( bLocalUseExceptions ) {
   27815             :       CPLErr eclass = CPLGetLastErrorType();
   27816             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27817             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27818             :       }
   27819             :     }
   27820             : #endif
   27821             :   }
   27822      176573 :   resultobj = SWIG_From_int(static_cast< int >(result));
   27823      176573 :   {
   27824             :     /* %typemap(argout) ( void **outPythonObject ) */
   27825      176573 :     Py_XDECREF(resultobj);
   27826      176573 :     if (*arg6)
   27827             :     {
   27828             :       resultobj = (PyObject*)*arg6;
   27829             :     }
   27830             :     else
   27831             :     {
   27832        1310 :       resultobj = Py_None;
   27833        1310 :       Py_INCREF(resultobj);
   27834             :     }
   27835             :   }
   27836      176573 :   {
   27837             :     /* %typemap(freearg) (int nList, int* pList) */
   27838      176573 :     free(arg11);
   27839             :   }
   27840      176573 :   {
   27841             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   27842             :     
   27843      176573 :     CPLFree(psProgressInfo);
   27844             :     
   27845             :   }
   27846      176840 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27847             :   return resultobj;
   27848           5 : fail:
   27849           5 :   {
   27850             :     /* %typemap(freearg) (int nList, int* pList) */
   27851           5 :     free(arg11);
   27852             :   }
   27853           5 :   {
   27854             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   27855             :     
   27856           5 :     CPLFree(psProgressInfo);
   27857             :     
   27858             :   }
   27859             :   return NULL;
   27860             : }
   27861             : 
   27862             : 
   27863         277 : SWIGINTERN PyObject *Dataset_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27864         277 :   PyObject *obj;
   27865         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   27866         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDatasetShadow, SWIG_NewClientData(obj));
   27867         277 :   return SWIG_Py_Void();
   27868             : }
   27869             : 
   27870          12 : SWIGINTERN PyObject *_wrap_new_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27871          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27872          12 :   GDALRasterAttributeTableShadow *result = 0 ;
   27873             :   
   27874          12 :   if (!SWIG_Python_UnpackTuple(args, "new_RasterAttributeTable", 0, 0, 0)) SWIG_fail;
   27875          12 :   {
   27876          12 :     const int bLocalUseExceptions = GetUseExceptions();
   27877          12 :     if ( bLocalUseExceptions ) {
   27878          12 :       pushErrorHandler();
   27879             :     }
   27880          12 :     {
   27881          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27882          12 :       result = (GDALRasterAttributeTableShadow *)new_GDALRasterAttributeTableShadow();
   27883          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27884             :     }
   27885          12 :     if ( bLocalUseExceptions ) {
   27886          12 :       popErrorHandler();
   27887             :     }
   27888             : #ifndef SED_HACKS
   27889             :     if ( bLocalUseExceptions ) {
   27890             :       CPLErr eclass = CPLGetLastErrorType();
   27891             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27892             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27893             :       }
   27894             :     }
   27895             : #endif
   27896             :   }
   27897          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_NEW |  0 );
   27898          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; } }
   27899             :   return resultobj;
   27900           0 : fail:
   27901           0 :   return NULL;
   27902             : }
   27903             : 
   27904             : 
   27905          19 : SWIGINTERN PyObject *_wrap_delete_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27906          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27907          19 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27908          19 :   void *argp1 = 0 ;
   27909          19 :   int res1 = 0 ;
   27910          19 :   PyObject *swig_obj[1] ;
   27911             :   
   27912          19 :   if (!args) SWIG_fail;
   27913          19 :   swig_obj[0] = args;
   27914          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_DISOWN |  0 );
   27915          19 :   if (!SWIG_IsOK(res1)) {
   27916           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RasterAttributeTable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27917             :   }
   27918          19 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27919          19 :   {
   27920          19 :     const int bLocalUseExceptions = GetUseExceptions();
   27921          19 :     if ( bLocalUseExceptions ) {
   27922          19 :       pushErrorHandler();
   27923             :     }
   27924          19 :     {
   27925          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27926          19 :       delete_GDALRasterAttributeTableShadow(arg1);
   27927          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27928             :     }
   27929          19 :     if ( bLocalUseExceptions ) {
   27930          19 :       popErrorHandler();
   27931             :     }
   27932             : #ifndef SED_HACKS
   27933             :     if ( bLocalUseExceptions ) {
   27934             :       CPLErr eclass = CPLGetLastErrorType();
   27935             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27936             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27937             :       }
   27938             :     }
   27939             : #endif
   27940             :   }
   27941          19 :   resultobj = SWIG_Py_Void();
   27942          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; } }
   27943             :   return resultobj;
   27944             : fail:
   27945             :   return NULL;
   27946             : }
   27947             : 
   27948             : 
   27949           5 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27950           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27951           5 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27952           5 :   void *argp1 = 0 ;
   27953           5 :   int res1 = 0 ;
   27954           5 :   PyObject *swig_obj[1] ;
   27955           5 :   GDALRasterAttributeTableShadow *result = 0 ;
   27956             :   
   27957           5 :   if (!args) SWIG_fail;
   27958           5 :   swig_obj[0] = args;
   27959           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   27960           5 :   if (!SWIG_IsOK(res1)) {
   27961           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_Clone" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27962             :   }
   27963           5 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27964           5 :   {
   27965           5 :     const int bLocalUseExceptions = GetUseExceptions();
   27966           5 :     if ( bLocalUseExceptions ) {
   27967           5 :       pushErrorHandler();
   27968             :     }
   27969           5 :     {
   27970           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27971           5 :       result = (GDALRasterAttributeTableShadow *)GDALRasterAttributeTableShadow_Clone(arg1);
   27972           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27973             :     }
   27974           5 :     if ( bLocalUseExceptions ) {
   27975           5 :       popErrorHandler();
   27976             :     }
   27977             : #ifndef SED_HACKS
   27978             :     if ( bLocalUseExceptions ) {
   27979             :       CPLErr eclass = CPLGetLastErrorType();
   27980             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27981             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27982             :       }
   27983             :     }
   27984             : #endif
   27985             :   }
   27986           5 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
   27987           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; } }
   27988             :   return resultobj;
   27989             : fail:
   27990             :   return NULL;
   27991             : }
   27992             : 
   27993             : 
   27994          48 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColumnCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27995          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27996          48 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27997          48 :   void *argp1 = 0 ;
   27998          48 :   int res1 = 0 ;
   27999          48 :   PyObject *swig_obj[1] ;
   28000          48 :   int result;
   28001             :   
   28002          48 :   if (!args) SWIG_fail;
   28003          48 :   swig_obj[0] = args;
   28004          48 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28005          48 :   if (!SWIG_IsOK(res1)) {
   28006           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColumnCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28007             :   }
   28008          48 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28009          48 :   {
   28010          48 :     const int bLocalUseExceptions = GetUseExceptions();
   28011          48 :     if ( bLocalUseExceptions ) {
   28012          47 :       pushErrorHandler();
   28013             :     }
   28014          48 :     {
   28015          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28016          48 :       result = (int)GDALRasterAttributeTableShadow_GetColumnCount(arg1);
   28017          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28018             :     }
   28019          48 :     if ( bLocalUseExceptions ) {
   28020          47 :       popErrorHandler();
   28021             :     }
   28022             : #ifndef SED_HACKS
   28023             :     if ( bLocalUseExceptions ) {
   28024             :       CPLErr eclass = CPLGetLastErrorType();
   28025             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28026             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28027             :       }
   28028             :     }
   28029             : #endif
   28030             :   }
   28031          48 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28032          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; } }
   28033             :   return resultobj;
   28034             : fail:
   28035             :   return NULL;
   28036             : }
   28037             : 
   28038             : 
   28039         118 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetNameOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28040         118 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28041         118 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28042         118 :   int arg2 ;
   28043         118 :   void *argp1 = 0 ;
   28044         118 :   int res1 = 0 ;
   28045         118 :   int val2 ;
   28046         118 :   int ecode2 = 0 ;
   28047         118 :   PyObject *swig_obj[2] ;
   28048         118 :   char *result = 0 ;
   28049             :   
   28050         118 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetNameOfCol", 2, 2, swig_obj)) SWIG_fail;
   28051         118 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28052         118 :   if (!SWIG_IsOK(res1)) {
   28053           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28054             :   }
   28055         118 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28056         118 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28057         118 :   if (!SWIG_IsOK(ecode2)) {
   28058           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "2"" of type '" "int""'");
   28059             :   } 
   28060         118 :   arg2 = static_cast< int >(val2);
   28061         118 :   {
   28062         118 :     const int bLocalUseExceptions = GetUseExceptions();
   28063         118 :     if ( bLocalUseExceptions ) {
   28064         115 :       pushErrorHandler();
   28065             :     }
   28066         118 :     {
   28067         118 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28068         118 :       result = (char *)GDALRasterAttributeTableShadow_GetNameOfCol(arg1,arg2);
   28069         118 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28070             :     }
   28071         118 :     if ( bLocalUseExceptions ) {
   28072         115 :       popErrorHandler();
   28073             :     }
   28074             : #ifndef SED_HACKS
   28075             :     if ( bLocalUseExceptions ) {
   28076             :       CPLErr eclass = CPLGetLastErrorType();
   28077             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28078             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28079             :       }
   28080             :     }
   28081             : #endif
   28082             :   }
   28083         118 :   resultobj = SWIG_FromCharPtr((const char *)result);
   28084         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; } }
   28085             :   return resultobj;
   28086             : fail:
   28087             :   return NULL;
   28088             : }
   28089             : 
   28090             : 
   28091          61 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetUsageOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28092          61 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28093          61 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28094          61 :   int arg2 ;
   28095          61 :   void *argp1 = 0 ;
   28096          61 :   int res1 = 0 ;
   28097          61 :   int val2 ;
   28098          61 :   int ecode2 = 0 ;
   28099          61 :   PyObject *swig_obj[2] ;
   28100          61 :   GDALRATFieldUsage result;
   28101             :   
   28102          61 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetUsageOfCol", 2, 2, swig_obj)) SWIG_fail;
   28103          61 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28104          61 :   if (!SWIG_IsOK(res1)) {
   28105           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28106             :   }
   28107          61 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28108          61 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28109          61 :   if (!SWIG_IsOK(ecode2)) {
   28110           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "2"" of type '" "int""'");
   28111             :   } 
   28112          61 :   arg2 = static_cast< int >(val2);
   28113          61 :   {
   28114          61 :     const int bLocalUseExceptions = GetUseExceptions();
   28115          61 :     if ( bLocalUseExceptions ) {
   28116          61 :       pushErrorHandler();
   28117             :     }
   28118          61 :     {
   28119          61 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28120          61 :       result = (GDALRATFieldUsage)GDALRasterAttributeTableShadow_GetUsageOfCol(arg1,arg2);
   28121          61 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28122             :     }
   28123          61 :     if ( bLocalUseExceptions ) {
   28124          61 :       popErrorHandler();
   28125             :     }
   28126             : #ifndef SED_HACKS
   28127             :     if ( bLocalUseExceptions ) {
   28128             :       CPLErr eclass = CPLGetLastErrorType();
   28129             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28130             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28131             :       }
   28132             :     }
   28133             : #endif
   28134             :   }
   28135          61 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28136          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; } }
   28137             :   return resultobj;
   28138             : fail:
   28139             :   return NULL;
   28140             : }
   28141             : 
   28142             : 
   28143         254 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTypeOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28144         254 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28145         254 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28146         254 :   int arg2 ;
   28147         254 :   void *argp1 = 0 ;
   28148         254 :   int res1 = 0 ;
   28149         254 :   int val2 ;
   28150         254 :   int ecode2 = 0 ;
   28151         254 :   PyObject *swig_obj[2] ;
   28152         254 :   GDALRATFieldType result;
   28153             :   
   28154         254 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetTypeOfCol", 2, 2, swig_obj)) SWIG_fail;
   28155         254 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28156         254 :   if (!SWIG_IsOK(res1)) {
   28157           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28158             :   }
   28159         254 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28160         254 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28161         254 :   if (!SWIG_IsOK(ecode2)) {
   28162           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "2"" of type '" "int""'");
   28163             :   } 
   28164         254 :   arg2 = static_cast< int >(val2);
   28165         254 :   {
   28166         254 :     const int bLocalUseExceptions = GetUseExceptions();
   28167         254 :     if ( bLocalUseExceptions ) {
   28168         251 :       pushErrorHandler();
   28169             :     }
   28170         254 :     {
   28171         254 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28172         254 :       result = (GDALRATFieldType)GDALRasterAttributeTableShadow_GetTypeOfCol(arg1,arg2);
   28173         254 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28174             :     }
   28175         254 :     if ( bLocalUseExceptions ) {
   28176         251 :       popErrorHandler();
   28177             :     }
   28178             : #ifndef SED_HACKS
   28179             :     if ( bLocalUseExceptions ) {
   28180             :       CPLErr eclass = CPLGetLastErrorType();
   28181             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28182             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28183             :       }
   28184             :     }
   28185             : #endif
   28186             :   }
   28187         254 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28188         254 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28189             :   return resultobj;
   28190             : fail:
   28191             :   return NULL;
   28192             : }
   28193             : 
   28194             : 
   28195          13 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColOfUsage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28196          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28197          13 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28198          13 :   GDALRATFieldUsage arg2 ;
   28199          13 :   void *argp1 = 0 ;
   28200          13 :   int res1 = 0 ;
   28201          13 :   int val2 ;
   28202          13 :   int ecode2 = 0 ;
   28203          13 :   PyObject *swig_obj[2] ;
   28204          13 :   int result;
   28205             :   
   28206          13 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetColOfUsage", 2, 2, swig_obj)) SWIG_fail;
   28207          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28208          13 :   if (!SWIG_IsOK(res1)) {
   28209           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28210             :   }
   28211          13 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28212          13 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28213          13 :   if (!SWIG_IsOK(ecode2)) {
   28214           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "2"" of type '" "GDALRATFieldUsage""'");
   28215             :   } 
   28216          13 :   arg2 = static_cast< GDALRATFieldUsage >(val2);
   28217          13 :   {
   28218          13 :     const int bLocalUseExceptions = GetUseExceptions();
   28219          13 :     if ( bLocalUseExceptions ) {
   28220          13 :       pushErrorHandler();
   28221             :     }
   28222          13 :     {
   28223          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28224          13 :       result = (int)GDALRasterAttributeTableShadow_GetColOfUsage(arg1,arg2);
   28225          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28226             :     }
   28227          13 :     if ( bLocalUseExceptions ) {
   28228          13 :       popErrorHandler();
   28229             :     }
   28230             : #ifndef SED_HACKS
   28231             :     if ( bLocalUseExceptions ) {
   28232             :       CPLErr eclass = CPLGetLastErrorType();
   28233             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28234             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28235             :       }
   28236             :     }
   28237             : #endif
   28238             :   }
   28239          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28240          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; } }
   28241             :   return resultobj;
   28242             : fail:
   28243             :   return NULL;
   28244             : }
   28245             : 
   28246             : 
   28247         235 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28248         235 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28249         235 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28250         235 :   void *argp1 = 0 ;
   28251         235 :   int res1 = 0 ;
   28252         235 :   PyObject *swig_obj[1] ;
   28253         235 :   int result;
   28254             :   
   28255         235 :   if (!args) SWIG_fail;
   28256         235 :   swig_obj[0] = args;
   28257         235 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28258         235 :   if (!SWIG_IsOK(res1)) {
   28259           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28260             :   }
   28261         235 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28262         235 :   {
   28263         235 :     const int bLocalUseExceptions = GetUseExceptions();
   28264         235 :     if ( bLocalUseExceptions ) {
   28265         234 :       pushErrorHandler();
   28266             :     }
   28267         235 :     {
   28268         235 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28269         235 :       result = (int)GDALRasterAttributeTableShadow_GetRowCount(arg1);
   28270         235 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28271             :     }
   28272         235 :     if ( bLocalUseExceptions ) {
   28273         234 :       popErrorHandler();
   28274             :     }
   28275             : #ifndef SED_HACKS
   28276             :     if ( bLocalUseExceptions ) {
   28277             :       CPLErr eclass = CPLGetLastErrorType();
   28278             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28279             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28280             :       }
   28281             :     }
   28282             : #endif
   28283             :   }
   28284         235 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28285         235 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28286             :   return resultobj;
   28287             : fail:
   28288             :   return NULL;
   28289             : }
   28290             : 
   28291             : 
   28292          90 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28293          90 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28294          90 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28295          90 :   int arg2 ;
   28296          90 :   int arg3 ;
   28297          90 :   void *argp1 = 0 ;
   28298          90 :   int res1 = 0 ;
   28299          90 :   int val2 ;
   28300          90 :   int ecode2 = 0 ;
   28301          90 :   int val3 ;
   28302          90 :   int ecode3 = 0 ;
   28303          90 :   PyObject *swig_obj[3] ;
   28304          90 :   char *result = 0 ;
   28305             :   
   28306          90 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsString", 3, 3, swig_obj)) SWIG_fail;
   28307          90 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28308          90 :   if (!SWIG_IsOK(res1)) {
   28309           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28310             :   }
   28311          90 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28312          90 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28313          90 :   if (!SWIG_IsOK(ecode2)) {
   28314           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "2"" of type '" "int""'");
   28315             :   } 
   28316          90 :   arg2 = static_cast< int >(val2);
   28317          90 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28318          90 :   if (!SWIG_IsOK(ecode3)) {
   28319           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "3"" of type '" "int""'");
   28320             :   } 
   28321          90 :   arg3 = static_cast< int >(val3);
   28322          90 :   {
   28323          90 :     const int bLocalUseExceptions = GetUseExceptions();
   28324          90 :     if ( bLocalUseExceptions ) {
   28325          89 :       pushErrorHandler();
   28326             :     }
   28327          90 :     {
   28328          90 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28329          90 :       result = (char *)GDALRasterAttributeTableShadow_GetValueAsString(arg1,arg2,arg3);
   28330          90 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28331             :     }
   28332          90 :     if ( bLocalUseExceptions ) {
   28333          89 :       popErrorHandler();
   28334             :     }
   28335             : #ifndef SED_HACKS
   28336             :     if ( bLocalUseExceptions ) {
   28337             :       CPLErr eclass = CPLGetLastErrorType();
   28338             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28339             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28340             :       }
   28341             :     }
   28342             : #endif
   28343             :   }
   28344          90 :   resultobj = SWIG_FromCharPtr((const char *)result);
   28345          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; } }
   28346             :   return resultobj;
   28347             : fail:
   28348             :   return NULL;
   28349             : }
   28350             : 
   28351             : 
   28352         166 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28353         166 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28354         166 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28355         166 :   int arg2 ;
   28356         166 :   int arg3 ;
   28357         166 :   void *argp1 = 0 ;
   28358         166 :   int res1 = 0 ;
   28359         166 :   int val2 ;
   28360         166 :   int ecode2 = 0 ;
   28361         166 :   int val3 ;
   28362         166 :   int ecode3 = 0 ;
   28363         166 :   PyObject *swig_obj[3] ;
   28364         166 :   int result;
   28365             :   
   28366         166 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsInt", 3, 3, swig_obj)) SWIG_fail;
   28367         166 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28368         166 :   if (!SWIG_IsOK(res1)) {
   28369           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28370             :   }
   28371         166 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28372         166 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28373         166 :   if (!SWIG_IsOK(ecode2)) {
   28374           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "2"" of type '" "int""'");
   28375             :   } 
   28376         166 :   arg2 = static_cast< int >(val2);
   28377         166 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28378         166 :   if (!SWIG_IsOK(ecode3)) {
   28379           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "3"" of type '" "int""'");
   28380             :   } 
   28381         166 :   arg3 = static_cast< int >(val3);
   28382         166 :   {
   28383         166 :     const int bLocalUseExceptions = GetUseExceptions();
   28384         166 :     if ( bLocalUseExceptions ) {
   28385         164 :       pushErrorHandler();
   28386             :     }
   28387         166 :     {
   28388         166 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28389         166 :       result = (int)GDALRasterAttributeTableShadow_GetValueAsInt(arg1,arg2,arg3);
   28390         166 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28391             :     }
   28392         166 :     if ( bLocalUseExceptions ) {
   28393         164 :       popErrorHandler();
   28394             :     }
   28395             : #ifndef SED_HACKS
   28396             :     if ( bLocalUseExceptions ) {
   28397             :       CPLErr eclass = CPLGetLastErrorType();
   28398             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28399             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28400             :       }
   28401             :     }
   28402             : #endif
   28403             :   }
   28404         166 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28405         174 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28406             :   return resultobj;
   28407             : fail:
   28408             :   return NULL;
   28409             : }
   28410             : 
   28411             : 
   28412          92 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28413          92 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28414          92 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28415          92 :   int arg2 ;
   28416          92 :   int arg3 ;
   28417          92 :   void *argp1 = 0 ;
   28418          92 :   int res1 = 0 ;
   28419          92 :   int val2 ;
   28420          92 :   int ecode2 = 0 ;
   28421          92 :   int val3 ;
   28422          92 :   int ecode3 = 0 ;
   28423          92 :   PyObject *swig_obj[3] ;
   28424          92 :   double result;
   28425             :   
   28426          92 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsDouble", 3, 3, swig_obj)) SWIG_fail;
   28427          92 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28428          92 :   if (!SWIG_IsOK(res1)) {
   28429           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28430             :   }
   28431          92 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28432          92 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28433          92 :   if (!SWIG_IsOK(ecode2)) {
   28434           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "2"" of type '" "int""'");
   28435             :   } 
   28436          92 :   arg2 = static_cast< int >(val2);
   28437          92 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28438          92 :   if (!SWIG_IsOK(ecode3)) {
   28439           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "3"" of type '" "int""'");
   28440             :   } 
   28441          92 :   arg3 = static_cast< int >(val3);
   28442          92 :   {
   28443          92 :     const int bLocalUseExceptions = GetUseExceptions();
   28444          92 :     if ( bLocalUseExceptions ) {
   28445          91 :       pushErrorHandler();
   28446             :     }
   28447          92 :     {
   28448          92 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28449          92 :       result = (double)GDALRasterAttributeTableShadow_GetValueAsDouble(arg1,arg2,arg3);
   28450          92 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28451             :     }
   28452          92 :     if ( bLocalUseExceptions ) {
   28453          91 :       popErrorHandler();
   28454             :     }
   28455             : #ifndef SED_HACKS
   28456             :     if ( bLocalUseExceptions ) {
   28457             :       CPLErr eclass = CPLGetLastErrorType();
   28458             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28459             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28460             :       }
   28461             :     }
   28462             : #endif
   28463             :   }
   28464          92 :   resultobj = SWIG_From_double(static_cast< double >(result));
   28465         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; } }
   28466             :   return resultobj;
   28467             : fail:
   28468             :   return NULL;
   28469             : }
   28470             : 
   28471             : 
   28472           9 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28473           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28474           9 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28475           9 :   int arg2 ;
   28476           9 :   int arg3 ;
   28477           9 :   int arg4 ;
   28478           9 :   char **arg5 = (char **) 0 ;
   28479           9 :   void *argp1 = 0 ;
   28480           9 :   int res1 = 0 ;
   28481           9 :   int val2 ;
   28482           9 :   int ecode2 = 0 ;
   28483           9 :   int val3 ;
   28484           9 :   int ecode3 = 0 ;
   28485           9 :   int iLength4 ;
   28486           9 :   PyObject *swig_obj[4] ;
   28487           9 :   CPLErr result;
   28488             :   
   28489           9 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsString", 4, 4, swig_obj)) SWIG_fail;
   28490           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28491           9 :   if (!SWIG_IsOK(res1)) {
   28492           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28493             :   }
   28494           9 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28495           9 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28496           9 :   if (!SWIG_IsOK(ecode2)) {
   28497           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "2"" of type '" "int""'");
   28498             :   } 
   28499           9 :   arg2 = static_cast< int >(val2);
   28500           9 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28501           9 :   if (!SWIG_IsOK(ecode3)) {
   28502           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "3"" of type '" "int""'");
   28503             :   } 
   28504           9 :   arg3 = static_cast< int >(val3);
   28505           9 :   {
   28506             :     /* %typemap(in,numinputs=1) (int iLength4, char **ppszData) (int iLength4) */
   28507           9 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) )
   28508             :     {
   28509           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   28510           0 :       SWIG_fail;
   28511             :     }
   28512           9 :     if( iLength4 <= 0 || iLength4 > INT_MAX - 1 )
   28513             :     {
   28514           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   28515           1 :       SWIG_fail;
   28516             :     }
   28517           8 :     arg4 = iLength4;
   28518           8 :     arg5 = (char**)VSICalloc(iLength4 + 1, sizeof(char*));
   28519           8 :     if( !arg5 )
   28520             :     {
   28521           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   28522           0 :       SWIG_fail;
   28523             :     }
   28524             :   }
   28525           8 :   {
   28526           8 :     const int bLocalUseExceptions = GetUseExceptions();
   28527           8 :     if ( bLocalUseExceptions ) {
   28528           8 :       pushErrorHandler();
   28529             :     }
   28530           8 :     {
   28531           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28532           8 :       result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsString(arg1,arg2,arg3,arg4,arg5);
   28533           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28534             :     }
   28535           8 :     if ( bLocalUseExceptions ) {
   28536           8 :       popErrorHandler();
   28537             :     }
   28538             : #ifndef SED_HACKS
   28539             :     if ( bLocalUseExceptions ) {
   28540             :       CPLErr eclass = CPLGetLastErrorType();
   28541             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28542             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28543             :       }
   28544             :     }
   28545             : #endif
   28546             :   }
   28547           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28548           8 :   {
   28549             :     /* %typemap(argout) (int iLength, char **ppszData) */
   28550           8 :     Py_DECREF(resultobj);
   28551           8 :     PyObject *out = PyList_New( arg4 );
   28552           8 :     if( !out ) {
   28553           0 :       SWIG_fail;
   28554             :     }
   28555          27 :     for( int i=0; i<arg4; i++ ) {
   28556          19 :       if( arg5[i] )
   28557             :       {
   28558          13 :         PyObject *val = GDALPythonObjectFromCStr( arg5[i] );
   28559          13 :         PyList_SetItem( out, i, val );
   28560             :       }
   28561             :       else
   28562             :       {
   28563           6 :         Py_INCREF(Py_None);
   28564           6 :         PyList_SetItem( out, i, Py_None );
   28565             :       }
   28566             :     }
   28567           8 :     resultobj = out;
   28568             :   }
   28569           8 :   {
   28570             :     /* %typemap(freearg) (int iLength, char **ppszData) */
   28571           8 :     CSLDestroy(arg5);
   28572             :   }
   28573          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; } }
   28574             :   return resultobj;
   28575           1 : fail:
   28576           1 :   {
   28577             :     /* %typemap(freearg) (int iLength, char **ppszData) */
   28578           1 :     CSLDestroy(arg5);
   28579             :   }
   28580             :   return NULL;
   28581             : }
   28582             : 
   28583             : 
   28584          11 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28585          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28586          11 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28587          11 :   int arg2 ;
   28588          11 :   int arg3 ;
   28589          11 :   int arg4 ;
   28590          11 :   int *arg5 = (int *) 0 ;
   28591          11 :   void *argp1 = 0 ;
   28592          11 :   int res1 = 0 ;
   28593          11 :   int val2 ;
   28594          11 :   int ecode2 = 0 ;
   28595          11 :   int val3 ;
   28596          11 :   int ecode3 = 0 ;
   28597          11 :   int iLength4 ;
   28598          11 :   PyObject *swig_obj[4] ;
   28599          11 :   CPLErr result;
   28600             :   
   28601          11 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsInteger", 4, 4, swig_obj)) SWIG_fail;
   28602          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28603          11 :   if (!SWIG_IsOK(res1)) {
   28604           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28605             :   }
   28606          11 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28607          11 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28608          11 :   if (!SWIG_IsOK(ecode2)) {
   28609           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "2"" of type '" "int""'");
   28610             :   } 
   28611          11 :   arg2 = static_cast< int >(val2);
   28612          11 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28613          11 :   if (!SWIG_IsOK(ecode3)) {
   28614           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "3"" of type '" "int""'");
   28615             :   } 
   28616          11 :   arg3 = static_cast< int >(val3);
   28617          11 :   {
   28618             :     /* %typemap(in,numinputs=1) (int iLength4, int *pnData) (int iLength4) */
   28619          11 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) ) {
   28620           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   28621           0 :       SWIG_fail;
   28622             :     }
   28623          11 :     if( iLength4 <= 0 )
   28624             :     {
   28625           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   28626           1 :       SWIG_fail;
   28627             :     }
   28628          10 :     arg4 = iLength4;
   28629          10 :     arg5 = (int*)VSICalloc(iLength4, sizeof(int));
   28630          10 :     if( !arg5 )
   28631             :     {
   28632           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   28633           0 :       SWIG_fail;
   28634             :     }
   28635             :   }
   28636          10 :   {
   28637          10 :     const int bLocalUseExceptions = GetUseExceptions();
   28638          10 :     if ( bLocalUseExceptions ) {
   28639          10 :       pushErrorHandler();
   28640             :     }
   28641          10 :     {
   28642          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28643          10 :       result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsInteger(arg1,arg2,arg3,arg4,arg5);
   28644          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28645             :     }
   28646          10 :     if ( bLocalUseExceptions ) {
   28647          10 :       popErrorHandler();
   28648             :     }
   28649             : #ifndef SED_HACKS
   28650             :     if ( bLocalUseExceptions ) {
   28651             :       CPLErr eclass = CPLGetLastErrorType();
   28652             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28653             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28654             :       }
   28655             :     }
   28656             : #endif
   28657             :   }
   28658          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28659          10 :   {
   28660             :     /* %typemap(argout) (int iLength, int *pnData) */
   28661          10 :     Py_DECREF(resultobj);
   28662          10 :     PyObject *out = PyList_New( arg4 );
   28663          10 :     if( !out ) {
   28664           0 :       SWIG_fail;
   28665             :     }
   28666          39 :     for( int i=0; i<arg4; i++ ) {
   28667          29 :       PyObject *val = PyLong_FromLong( (arg5)[i] );
   28668          29 :       PyList_SetItem( out, i, val );
   28669             :     }
   28670          10 :     resultobj = out;
   28671             :   }
   28672          10 :   {
   28673             :     /* %typemap(freearg) (int iLength, int *pnData) */
   28674          10 :     CPLFree(arg5);
   28675             :   }
   28676          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; } }
   28677             :   return resultobj;
   28678           1 : fail:
   28679           1 :   {
   28680             :     /* %typemap(freearg) (int iLength, int *pnData) */
   28681           1 :     CPLFree(arg5);
   28682             :   }
   28683             :   return NULL;
   28684             : }
   28685             : 
   28686             : 
   28687           9 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28688           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28689           9 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28690           9 :   int arg2 ;
   28691           9 :   int arg3 ;
   28692           9 :   int arg4 ;
   28693           9 :   double *arg5 = (double *) 0 ;
   28694           9 :   void *argp1 = 0 ;
   28695           9 :   int res1 = 0 ;
   28696           9 :   int val2 ;
   28697           9 :   int ecode2 = 0 ;
   28698           9 :   int val3 ;
   28699           9 :   int ecode3 = 0 ;
   28700           9 :   int iLength4 ;
   28701           9 :   PyObject *swig_obj[4] ;
   28702           9 :   CPLErr result;
   28703             :   
   28704           9 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsDouble", 4, 4, swig_obj)) SWIG_fail;
   28705           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28706           9 :   if (!SWIG_IsOK(res1)) {
   28707           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28708             :   }
   28709           9 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28710           9 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28711           9 :   if (!SWIG_IsOK(ecode2)) {
   28712           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "2"" of type '" "int""'");
   28713             :   } 
   28714           9 :   arg2 = static_cast< int >(val2);
   28715           9 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28716           9 :   if (!SWIG_IsOK(ecode3)) {
   28717           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "3"" of type '" "int""'");
   28718             :   } 
   28719           9 :   arg3 = static_cast< int >(val3);
   28720           9 :   {
   28721             :     /* %typemap(in,numinputs=1) (int iLength4, double *pdfData) (int iLength4) */
   28722           9 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) ) {
   28723           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   28724           0 :       SWIG_fail;
   28725             :     }
   28726           9 :     if( iLength4 <= 0 )
   28727             :     {
   28728           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   28729           1 :       SWIG_fail;
   28730             :     }
   28731           8 :     arg4 = iLength4;
   28732           8 :     arg5 = (double*)CPLCalloc(iLength4, sizeof(double));
   28733           8 :     if( !arg5 )
   28734             :     {
   28735           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   28736           0 :       SWIG_fail;
   28737             :     }
   28738             :   }
   28739           8 :   {
   28740           8 :     const int bLocalUseExceptions = GetUseExceptions();
   28741           8 :     if ( bLocalUseExceptions ) {
   28742           8 :       pushErrorHandler();
   28743             :     }
   28744           8 :     {
   28745           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28746           8 :       result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsDouble(arg1,arg2,arg3,arg4,arg5);
   28747           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28748             :     }
   28749           8 :     if ( bLocalUseExceptions ) {
   28750           8 :       popErrorHandler();
   28751             :     }
   28752             : #ifndef SED_HACKS
   28753             :     if ( bLocalUseExceptions ) {
   28754             :       CPLErr eclass = CPLGetLastErrorType();
   28755             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28756             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28757             :       }
   28758             :     }
   28759             : #endif
   28760             :   }
   28761           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28762           8 :   {
   28763             :     /* %typemap(argout) (int iLength, double *pdfData)  */
   28764           8 :     Py_DECREF(resultobj);
   28765           8 :     PyObject *out = PyList_New( arg4 );
   28766           8 :     if( !out ) {
   28767           0 :       SWIG_fail;
   28768             :     }
   28769          27 :     for( int i=0; i<arg4; i++ ) {
   28770          19 :       PyObject *val = PyFloat_FromDouble( (arg5)[i] );
   28771          19 :       PyList_SetItem( out, i, val );
   28772             :     }
   28773           8 :     resultobj = out;
   28774             :   }
   28775           8 :   {
   28776             :     /* %typemap(freearg) (int iLength, double *pdfData) */
   28777           8 :     CPLFree(arg5);
   28778             :   }
   28779          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; } }
   28780             :   return resultobj;
   28781           1 : fail:
   28782           1 :   {
   28783             :     /* %typemap(freearg) (int iLength, double *pdfData) */
   28784           1 :     CPLFree(arg5);
   28785             :   }
   28786             :   return NULL;
   28787             : }
   28788             : 
   28789             : 
   28790          37 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28791          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28792          37 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28793          37 :   int arg2 ;
   28794          37 :   int arg3 ;
   28795          37 :   char *arg4 = (char *) 0 ;
   28796          37 :   void *argp1 = 0 ;
   28797          37 :   int res1 = 0 ;
   28798          37 :   int val2 ;
   28799          37 :   int ecode2 = 0 ;
   28800          37 :   int val3 ;
   28801          37 :   int ecode3 = 0 ;
   28802          37 :   PyObject *str4 = 0 ;
   28803          37 :   int bToFree4 = 0 ;
   28804          37 :   PyObject *swig_obj[4] ;
   28805             :   
   28806          37 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsString", 4, 4, swig_obj)) SWIG_fail;
   28807          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28808          37 :   if (!SWIG_IsOK(res1)) {
   28809           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28810             :   }
   28811          37 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28812          37 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28813          37 :   if (!SWIG_IsOK(ecode2)) {
   28814           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "2"" of type '" "int""'");
   28815             :   } 
   28816          37 :   arg2 = static_cast< int >(val2);
   28817          37 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28818          37 :   if (!SWIG_IsOK(ecode3)) {
   28819           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "3"" of type '" "int""'");
   28820             :   } 
   28821          37 :   arg3 = static_cast< int >(val3);
   28822          37 :   {
   28823             :     /* %typemap(in) (tostring argin) */
   28824          37 :     str4 = PyObject_Str( swig_obj[3] );
   28825          37 :     if ( str4 == 0 ) {
   28826           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   28827           0 :       SWIG_fail;
   28828             :     }
   28829             :     
   28830          37 :     arg4 = GDALPythonObjectToCStr(str4, &bToFree4);
   28831             :   }
   28832          37 :   {
   28833          37 :     const int bLocalUseExceptions = GetUseExceptions();
   28834          37 :     if ( bLocalUseExceptions ) {
   28835          37 :       pushErrorHandler();
   28836             :     }
   28837          37 :     {
   28838          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28839          37 :       GDALRasterAttributeTableShadow_SetValueAsString(arg1,arg2,arg3,(char const *)arg4);
   28840          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28841             :     }
   28842          37 :     if ( bLocalUseExceptions ) {
   28843          37 :       popErrorHandler();
   28844             :     }
   28845             : #ifndef SED_HACKS
   28846             :     if ( bLocalUseExceptions ) {
   28847             :       CPLErr eclass = CPLGetLastErrorType();
   28848             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28849             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28850             :       }
   28851             :     }
   28852             : #endif
   28853             :   }
   28854          37 :   resultobj = SWIG_Py_Void();
   28855          37 :   {
   28856             :     /* %typemap(freearg) (tostring argin) */
   28857          37 :     if ( str4 != NULL)
   28858             :     {
   28859          37 :       Py_DECREF(str4);
   28860             :     }
   28861          37 :     GDALPythonFreeCStr(arg4, bToFree4);
   28862             :   }
   28863          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; } }
   28864             :   return resultobj;
   28865           0 : fail:
   28866           0 :   {
   28867             :     /* %typemap(freearg) (tostring argin) */
   28868           0 :     if ( str4 != NULL)
   28869             :     {
   28870           0 :       Py_DECREF(str4);
   28871             :     }
   28872          37 :     GDALPythonFreeCStr(arg4, bToFree4);
   28873             :   }
   28874             :   return NULL;
   28875             : }
   28876             : 
   28877             : 
   28878          49 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28879          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28880          49 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28881          49 :   int arg2 ;
   28882          49 :   int arg3 ;
   28883          49 :   int arg4 ;
   28884          49 :   void *argp1 = 0 ;
   28885          49 :   int res1 = 0 ;
   28886          49 :   int val2 ;
   28887          49 :   int ecode2 = 0 ;
   28888          49 :   int val3 ;
   28889          49 :   int ecode3 = 0 ;
   28890          49 :   int val4 ;
   28891          49 :   int ecode4 = 0 ;
   28892          49 :   PyObject *swig_obj[4] ;
   28893             :   
   28894          49 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsInt", 4, 4, swig_obj)) SWIG_fail;
   28895          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28896          49 :   if (!SWIG_IsOK(res1)) {
   28897           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28898             :   }
   28899          49 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28900          49 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28901          49 :   if (!SWIG_IsOK(ecode2)) {
   28902           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "2"" of type '" "int""'");
   28903             :   } 
   28904          49 :   arg2 = static_cast< int >(val2);
   28905          49 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28906          49 :   if (!SWIG_IsOK(ecode3)) {
   28907           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "3"" of type '" "int""'");
   28908             :   } 
   28909          49 :   arg3 = static_cast< int >(val3);
   28910          49 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   28911          49 :   if (!SWIG_IsOK(ecode4)) {
   28912           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "4"" of type '" "int""'");
   28913             :   } 
   28914          49 :   arg4 = static_cast< int >(val4);
   28915          49 :   {
   28916          49 :     const int bLocalUseExceptions = GetUseExceptions();
   28917          49 :     if ( bLocalUseExceptions ) {
   28918          49 :       pushErrorHandler();
   28919             :     }
   28920          49 :     {
   28921          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28922          49 :       GDALRasterAttributeTableShadow_SetValueAsInt(arg1,arg2,arg3,arg4);
   28923          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28924             :     }
   28925          49 :     if ( bLocalUseExceptions ) {
   28926          49 :       popErrorHandler();
   28927             :     }
   28928             : #ifndef SED_HACKS
   28929             :     if ( bLocalUseExceptions ) {
   28930             :       CPLErr eclass = CPLGetLastErrorType();
   28931             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28932             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28933             :       }
   28934             :     }
   28935             : #endif
   28936             :   }
   28937          49 :   resultobj = SWIG_Py_Void();
   28938          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; } }
   28939             :   return resultobj;
   28940             : fail:
   28941             :   return NULL;
   28942             : }
   28943             : 
   28944             : 
   28945          35 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28946          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28947          35 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28948          35 :   int arg2 ;
   28949          35 :   int arg3 ;
   28950          35 :   double arg4 ;
   28951          35 :   void *argp1 = 0 ;
   28952          35 :   int res1 = 0 ;
   28953          35 :   int val2 ;
   28954          35 :   int ecode2 = 0 ;
   28955          35 :   int val3 ;
   28956          35 :   int ecode3 = 0 ;
   28957          35 :   double val4 ;
   28958          35 :   int ecode4 = 0 ;
   28959          35 :   PyObject *swig_obj[4] ;
   28960             :   
   28961          35 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsDouble", 4, 4, swig_obj)) SWIG_fail;
   28962          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28963          35 :   if (!SWIG_IsOK(res1)) {
   28964           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28965             :   }
   28966          35 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28967          35 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28968          35 :   if (!SWIG_IsOK(ecode2)) {
   28969           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "2"" of type '" "int""'");
   28970             :   } 
   28971          35 :   arg2 = static_cast< int >(val2);
   28972          35 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28973          35 :   if (!SWIG_IsOK(ecode3)) {
   28974           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "3"" of type '" "int""'");
   28975             :   } 
   28976          35 :   arg3 = static_cast< int >(val3);
   28977          35 :   ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   28978          35 :   if (!SWIG_IsOK(ecode4)) {
   28979           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "4"" of type '" "double""'");
   28980             :   } 
   28981          35 :   arg4 = static_cast< double >(val4);
   28982          35 :   {
   28983          35 :     const int bLocalUseExceptions = GetUseExceptions();
   28984          35 :     if ( bLocalUseExceptions ) {
   28985          35 :       pushErrorHandler();
   28986             :     }
   28987          35 :     {
   28988          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28989          35 :       GDALRasterAttributeTableShadow_SetValueAsDouble(arg1,arg2,arg3,arg4);
   28990          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28991             :     }
   28992          35 :     if ( bLocalUseExceptions ) {
   28993          35 :       popErrorHandler();
   28994             :     }
   28995             : #ifndef SED_HACKS
   28996             :     if ( bLocalUseExceptions ) {
   28997             :       CPLErr eclass = CPLGetLastErrorType();
   28998             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28999             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29000             :       }
   29001             :     }
   29002             : #endif
   29003             :   }
   29004          35 :   resultobj = SWIG_Py_Void();
   29005          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; } }
   29006             :   return resultobj;
   29007             : fail:
   29008             :   return NULL;
   29009             : }
   29010             : 
   29011             : 
   29012           7 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29013           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29014           7 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29015           7 :   int arg2 ;
   29016           7 :   void *argp1 = 0 ;
   29017           7 :   int res1 = 0 ;
   29018           7 :   int val2 ;
   29019           7 :   int ecode2 = 0 ;
   29020           7 :   PyObject *swig_obj[2] ;
   29021             :   
   29022           7 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetRowCount", 2, 2, swig_obj)) SWIG_fail;
   29023           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29024           7 :   if (!SWIG_IsOK(res1)) {
   29025           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29026             :   }
   29027           7 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29028           7 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   29029           7 :   if (!SWIG_IsOK(ecode2)) {
   29030           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "2"" of type '" "int""'");
   29031             :   } 
   29032           7 :   arg2 = static_cast< int >(val2);
   29033           7 :   {
   29034           7 :     const int bLocalUseExceptions = GetUseExceptions();
   29035           7 :     if ( bLocalUseExceptions ) {
   29036           7 :       pushErrorHandler();
   29037             :     }
   29038           7 :     {
   29039           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29040           7 :       GDALRasterAttributeTableShadow_SetRowCount(arg1,arg2);
   29041           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29042             :     }
   29043           7 :     if ( bLocalUseExceptions ) {
   29044           7 :       popErrorHandler();
   29045             :     }
   29046             : #ifndef SED_HACKS
   29047             :     if ( bLocalUseExceptions ) {
   29048             :       CPLErr eclass = CPLGetLastErrorType();
   29049             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29050             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29051             :       }
   29052             :     }
   29053             : #endif
   29054             :   }
   29055           7 :   resultobj = SWIG_Py_Void();
   29056           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; } }
   29057             :   return resultobj;
   29058             : fail:
   29059             :   return NULL;
   29060             : }
   29061             : 
   29062             : 
   29063          31 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_CreateColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29064          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29065          31 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29066          31 :   char *arg2 = (char *) 0 ;
   29067          31 :   GDALRATFieldType arg3 ;
   29068          31 :   GDALRATFieldUsage arg4 ;
   29069          31 :   void *argp1 = 0 ;
   29070          31 :   int res1 = 0 ;
   29071          31 :   int res2 ;
   29072          31 :   char *buf2 = 0 ;
   29073          31 :   int alloc2 = 0 ;
   29074          31 :   int val3 ;
   29075          31 :   int ecode3 = 0 ;
   29076          31 :   int val4 ;
   29077          31 :   int ecode4 = 0 ;
   29078          31 :   PyObject *swig_obj[4] ;
   29079          31 :   int result;
   29080             :   
   29081          31 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_CreateColumn", 4, 4, swig_obj)) SWIG_fail;
   29082          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29083          31 :   if (!SWIG_IsOK(res1)) {
   29084           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29085             :   }
   29086          31 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29087          31 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   29088          31 :   if (!SWIG_IsOK(res2)) {
   29089           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "2"" of type '" "char const *""'");
   29090             :   }
   29091          31 :   arg2 = reinterpret_cast< char * >(buf2);
   29092          31 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   29093          31 :   if (!SWIG_IsOK(ecode3)) {
   29094           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "3"" of type '" "GDALRATFieldType""'");
   29095             :   } 
   29096          31 :   arg3 = static_cast< GDALRATFieldType >(val3);
   29097          31 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   29098          31 :   if (!SWIG_IsOK(ecode4)) {
   29099           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "4"" of type '" "GDALRATFieldUsage""'");
   29100             :   } 
   29101          31 :   arg4 = static_cast< GDALRATFieldUsage >(val4);
   29102          31 :   {
   29103          31 :     const int bLocalUseExceptions = GetUseExceptions();
   29104          31 :     if ( bLocalUseExceptions ) {
   29105          31 :       pushErrorHandler();
   29106             :     }
   29107          31 :     {
   29108          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29109          31 :       result = (int)GDALRasterAttributeTableShadow_CreateColumn(arg1,(char const *)arg2,arg3,arg4);
   29110          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29111             :     }
   29112          31 :     if ( bLocalUseExceptions ) {
   29113          31 :       popErrorHandler();
   29114             :     }
   29115             : #ifndef SED_HACKS
   29116             :     if ( bLocalUseExceptions ) {
   29117             :       CPLErr eclass = CPLGetLastErrorType();
   29118             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29119             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29120             :       }
   29121             :     }
   29122             : #endif
   29123             :   }
   29124          31 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29125          31 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29126          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; } }
   29127             :   return resultobj;
   29128           0 : fail:
   29129           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29130             :   return NULL;
   29131             : }
   29132             : 
   29133             : 
   29134           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29135           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29136           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29137           1 :   double *arg2 = (double *) 0 ;
   29138           1 :   double *arg3 = (double *) 0 ;
   29139           1 :   void *argp1 = 0 ;
   29140           1 :   int res1 = 0 ;
   29141           1 :   double temp2 ;
   29142           1 :   int res2 = SWIG_TMPOBJ ;
   29143           1 :   double temp3 ;
   29144           1 :   int res3 = SWIG_TMPOBJ ;
   29145           1 :   PyObject *swig_obj[1] ;
   29146           1 :   bool result;
   29147             :   
   29148           1 :   arg2 = &temp2;
   29149           1 :   arg3 = &temp3;
   29150           1 :   if (!args) SWIG_fail;
   29151           1 :   swig_obj[0] = args;
   29152           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29153           1 :   if (!SWIG_IsOK(res1)) {
   29154           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29155             :   }
   29156           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29157           1 :   {
   29158           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29159           1 :     if ( bLocalUseExceptions ) {
   29160           1 :       pushErrorHandler();
   29161             :     }
   29162           1 :     {
   29163           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29164           1 :       result = (bool)GDALRasterAttributeTableShadow_GetLinearBinning(arg1,arg2,arg3);
   29165           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29166             :     }
   29167           1 :     if ( bLocalUseExceptions ) {
   29168           1 :       popErrorHandler();
   29169             :     }
   29170             : #ifndef SED_HACKS
   29171             :     if ( bLocalUseExceptions ) {
   29172             :       CPLErr eclass = CPLGetLastErrorType();
   29173             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29174             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29175             :       }
   29176             :     }
   29177             : #endif
   29178             :   }
   29179           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   29180           1 :   if (ReturnSame(SWIG_IsTmpObj(res2))) {
   29181           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
   29182             :   } else {
   29183           0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   29184           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
   29185             :   }
   29186           1 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   29187           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   29188             :   } else {
   29189           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   29190           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   29191             :   }
   29192           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; } }
   29193             :   return resultobj;
   29194             : fail:
   29195             :   return NULL;
   29196             : }
   29197             : 
   29198             : 
   29199           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29200           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29201           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29202           1 :   double arg2 ;
   29203           1 :   double arg3 ;
   29204           1 :   void *argp1 = 0 ;
   29205           1 :   int res1 = 0 ;
   29206           1 :   double val2 ;
   29207           1 :   int ecode2 = 0 ;
   29208           1 :   double val3 ;
   29209           1 :   int ecode3 = 0 ;
   29210           1 :   PyObject *swig_obj[3] ;
   29211           1 :   int result;
   29212             :   
   29213           1 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetLinearBinning", 3, 3, swig_obj)) SWIG_fail;
   29214           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29215           1 :   if (!SWIG_IsOK(res1)) {
   29216           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29217             :   }
   29218           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29219           1 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   29220           1 :   if (!SWIG_IsOK(ecode2)) {
   29221           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "2"" of type '" "double""'");
   29222             :   } 
   29223           1 :   arg2 = static_cast< double >(val2);
   29224           1 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   29225           1 :   if (!SWIG_IsOK(ecode3)) {
   29226           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "3"" of type '" "double""'");
   29227             :   } 
   29228           1 :   arg3 = static_cast< double >(val3);
   29229           1 :   {
   29230           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29231           1 :     if ( bLocalUseExceptions ) {
   29232           1 :       pushErrorHandler();
   29233             :     }
   29234           1 :     {
   29235           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29236           1 :       result = (int)GDALRasterAttributeTableShadow_SetLinearBinning(arg1,arg2,arg3);
   29237           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29238             :     }
   29239           1 :     if ( bLocalUseExceptions ) {
   29240           1 :       popErrorHandler();
   29241             :     }
   29242             : #ifndef SED_HACKS
   29243             :     if ( bLocalUseExceptions ) {
   29244             :       CPLErr eclass = CPLGetLastErrorType();
   29245             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29246             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29247             :       }
   29248             :     }
   29249             : #endif
   29250             :   }
   29251           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29252           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; } }
   29253             :   return resultobj;
   29254             : fail:
   29255             :   return NULL;
   29256             : }
   29257             : 
   29258             : 
   29259           3 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowOfValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29260           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29261           3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29262           3 :   double arg2 ;
   29263           3 :   void *argp1 = 0 ;
   29264           3 :   int res1 = 0 ;
   29265           3 :   double val2 ;
   29266           3 :   int ecode2 = 0 ;
   29267           3 :   PyObject *swig_obj[2] ;
   29268           3 :   int result;
   29269             :   
   29270           3 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetRowOfValue", 2, 2, swig_obj)) SWIG_fail;
   29271           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29272           3 :   if (!SWIG_IsOK(res1)) {
   29273           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29274             :   }
   29275           3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29276           3 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   29277           3 :   if (!SWIG_IsOK(ecode2)) {
   29278           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "2"" of type '" "double""'");
   29279             :   } 
   29280           3 :   arg2 = static_cast< double >(val2);
   29281           3 :   {
   29282           3 :     const int bLocalUseExceptions = GetUseExceptions();
   29283           3 :     if ( bLocalUseExceptions ) {
   29284           3 :       pushErrorHandler();
   29285             :     }
   29286           3 :     {
   29287           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29288           3 :       result = (int)GDALRasterAttributeTableShadow_GetRowOfValue(arg1,arg2);
   29289           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29290             :     }
   29291           3 :     if ( bLocalUseExceptions ) {
   29292           3 :       popErrorHandler();
   29293             :     }
   29294             : #ifndef SED_HACKS
   29295             :     if ( bLocalUseExceptions ) {
   29296             :       CPLErr eclass = CPLGetLastErrorType();
   29297             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29298             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29299             :       }
   29300             :     }
   29301             : #endif
   29302             :   }
   29303           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29304           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; } }
   29305             :   return resultobj;
   29306             : fail:
   29307             :   return NULL;
   29308             : }
   29309             : 
   29310             : 
   29311           2 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ChangesAreWrittenToFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29312           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29313           2 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29314           2 :   void *argp1 = 0 ;
   29315           2 :   int res1 = 0 ;
   29316           2 :   PyObject *swig_obj[1] ;
   29317           2 :   int result;
   29318             :   
   29319           2 :   if (!args) SWIG_fail;
   29320           2 :   swig_obj[0] = args;
   29321           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29322           2 :   if (!SWIG_IsOK(res1)) {
   29323           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ChangesAreWrittenToFile" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29324             :   }
   29325           2 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29326           2 :   {
   29327           2 :     const int bLocalUseExceptions = GetUseExceptions();
   29328           2 :     if ( bLocalUseExceptions ) {
   29329           2 :       pushErrorHandler();
   29330             :     }
   29331           2 :     {
   29332           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29333           2 :       result = (int)GDALRasterAttributeTableShadow_ChangesAreWrittenToFile(arg1);
   29334           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29335             :     }
   29336           2 :     if ( bLocalUseExceptions ) {
   29337           2 :       popErrorHandler();
   29338             :     }
   29339             : #ifndef SED_HACKS
   29340             :     if ( bLocalUseExceptions ) {
   29341             :       CPLErr eclass = CPLGetLastErrorType();
   29342             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29343             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29344             :       }
   29345             :     }
   29346             : #endif
   29347             :   }
   29348           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29349           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; } }
   29350             :   return resultobj;
   29351             : fail:
   29352             :   return NULL;
   29353             : }
   29354             : 
   29355             : 
   29356           0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_DumpReadable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29357           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29358           0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29359           0 :   void *argp1 = 0 ;
   29360           0 :   int res1 = 0 ;
   29361           0 :   PyObject *swig_obj[1] ;
   29362             :   
   29363           0 :   if (!args) SWIG_fail;
   29364           0 :   swig_obj[0] = args;
   29365           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29366           0 :   if (!SWIG_IsOK(res1)) {
   29367           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_DumpReadable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29368             :   }
   29369           0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29370           0 :   {
   29371           0 :     const int bLocalUseExceptions = GetUseExceptions();
   29372           0 :     if ( bLocalUseExceptions ) {
   29373           0 :       pushErrorHandler();
   29374             :     }
   29375           0 :     {
   29376           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29377           0 :       GDALRasterAttributeTableShadow_DumpReadable(arg1);
   29378           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29379             :     }
   29380           0 :     if ( bLocalUseExceptions ) {
   29381           0 :       popErrorHandler();
   29382             :     }
   29383             : #ifndef SED_HACKS
   29384             :     if ( bLocalUseExceptions ) {
   29385             :       CPLErr eclass = CPLGetLastErrorType();
   29386             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29387             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29388             :       }
   29389             :     }
   29390             : #endif
   29391             :   }
   29392           0 :   resultobj = SWIG_Py_Void();
   29393           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; } }
   29394             :   return resultobj;
   29395             : fail:
   29396             :   return NULL;
   29397             : }
   29398             : 
   29399             : 
   29400           3 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29401           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29402           3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29403           3 :   GDALRATTableType arg2 ;
   29404           3 :   void *argp1 = 0 ;
   29405           3 :   int res1 = 0 ;
   29406           3 :   int val2 ;
   29407           3 :   int ecode2 = 0 ;
   29408           3 :   PyObject *swig_obj[2] ;
   29409             :   
   29410           3 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetTableType", 2, 2, swig_obj)) SWIG_fail;
   29411           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29412           3 :   if (!SWIG_IsOK(res1)) {
   29413           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetTableType" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29414             :   }
   29415           3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29416           3 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   29417           3 :   if (!SWIG_IsOK(ecode2)) {
   29418           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetTableType" "', argument " "2"" of type '" "GDALRATTableType""'");
   29419             :   } 
   29420           3 :   arg2 = static_cast< GDALRATTableType >(val2);
   29421           3 :   {
   29422           3 :     const int bLocalUseExceptions = GetUseExceptions();
   29423           3 :     if ( bLocalUseExceptions ) {
   29424           3 :       pushErrorHandler();
   29425             :     }
   29426           3 :     {
   29427           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29428           3 :       GDALRasterAttributeTableShadow_SetTableType(arg1,arg2);
   29429           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29430             :     }
   29431           3 :     if ( bLocalUseExceptions ) {
   29432           3 :       popErrorHandler();
   29433             :     }
   29434             : #ifndef SED_HACKS
   29435             :     if ( bLocalUseExceptions ) {
   29436             :       CPLErr eclass = CPLGetLastErrorType();
   29437             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29438             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29439             :       }
   29440             :     }
   29441             : #endif
   29442             :   }
   29443           3 :   resultobj = SWIG_Py_Void();
   29444           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; } }
   29445             :   return resultobj;
   29446             : fail:
   29447             :   return NULL;
   29448             : }
   29449             : 
   29450             : 
   29451          10 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29452          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29453          10 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29454          10 :   void *argp1 = 0 ;
   29455          10 :   int res1 = 0 ;
   29456          10 :   PyObject *swig_obj[1] ;
   29457          10 :   GDALRATTableType result;
   29458             :   
   29459          10 :   if (!args) SWIG_fail;
   29460          10 :   swig_obj[0] = args;
   29461          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29462          10 :   if (!SWIG_IsOK(res1)) {
   29463           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTableType" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29464             :   }
   29465          10 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29466          10 :   {
   29467          10 :     const int bLocalUseExceptions = GetUseExceptions();
   29468          10 :     if ( bLocalUseExceptions ) {
   29469          10 :       pushErrorHandler();
   29470             :     }
   29471          10 :     {
   29472          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29473          10 :       result = (GDALRATTableType)GDALRasterAttributeTableShadow_GetTableType(arg1);
   29474          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29475             :     }
   29476          10 :     if ( bLocalUseExceptions ) {
   29477          10 :       popErrorHandler();
   29478             :     }
   29479             : #ifndef SED_HACKS
   29480             :     if ( bLocalUseExceptions ) {
   29481             :       CPLErr eclass = CPLGetLastErrorType();
   29482             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29483             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29484             :       }
   29485             :     }
   29486             : #endif
   29487             :   }
   29488          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29489          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; } }
   29490             :   return resultobj;
   29491             : fail:
   29492             :   return NULL;
   29493             : }
   29494             : 
   29495             : 
   29496           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_RemoveStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29497           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29498           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29499           1 :   void *argp1 = 0 ;
   29500           1 :   int res1 = 0 ;
   29501           1 :   PyObject *swig_obj[1] ;
   29502             :   
   29503           1 :   if (!args) SWIG_fail;
   29504           1 :   swig_obj[0] = args;
   29505           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29506           1 :   if (!SWIG_IsOK(res1)) {
   29507           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_RemoveStatistics" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29508             :   }
   29509           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29510           1 :   {
   29511           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29512           1 :     if ( bLocalUseExceptions ) {
   29513           1 :       pushErrorHandler();
   29514             :     }
   29515           1 :     {
   29516           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29517           1 :       GDALRasterAttributeTableShadow_RemoveStatistics(arg1);
   29518           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29519             :     }
   29520           1 :     if ( bLocalUseExceptions ) {
   29521           1 :       popErrorHandler();
   29522             :     }
   29523             : #ifndef SED_HACKS
   29524             :     if ( bLocalUseExceptions ) {
   29525             :       CPLErr eclass = CPLGetLastErrorType();
   29526             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29527             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29528             :       }
   29529             :     }
   29530             : #endif
   29531             :   }
   29532           1 :   resultobj = SWIG_Py_Void();
   29533           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; } }
   29534             :   return resultobj;
   29535             : fail:
   29536             :   return NULL;
   29537             : }
   29538             : 
   29539             : 
   29540         277 : SWIGINTERN PyObject *RasterAttributeTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29541         277 :   PyObject *obj;
   29542         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   29543         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_NewClientData(obj));
   29544         277 :   return SWIG_Py_Void();
   29545             : }
   29546             : 
   29547          12 : SWIGINTERN PyObject *RasterAttributeTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29548          12 :   return SWIG_Python_InitShadowInstance(args);
   29549             : }
   29550             : 
   29551        1450 : SWIGINTERN PyObject *_wrap_delete_Group(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29552        1450 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29553        1450 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29554        1450 :   void *argp1 = 0 ;
   29555        1450 :   int res1 = 0 ;
   29556        1450 :   PyObject *swig_obj[1] ;
   29557             :   
   29558        1450 :   if (!args) SWIG_fail;
   29559        1450 :   swig_obj[0] = args;
   29560        1450 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_DISOWN |  0 );
   29561        1450 :   if (!SWIG_IsOK(res1)) {
   29562           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Group" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29563             :   }
   29564        1450 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29565        1450 :   {
   29566        1450 :     const int bLocalUseExceptions = GetUseExceptions();
   29567        1450 :     if ( bLocalUseExceptions ) {
   29568         518 :       pushErrorHandler();
   29569             :     }
   29570        1450 :     {
   29571        1450 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29572        1450 :       delete_GDALGroupHS(arg1);
   29573        1450 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29574             :     }
   29575        1450 :     if ( bLocalUseExceptions ) {
   29576         518 :       popErrorHandler();
   29577             :     }
   29578             : #ifndef SED_HACKS
   29579             :     if ( bLocalUseExceptions ) {
   29580             :       CPLErr eclass = CPLGetLastErrorType();
   29581             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29582             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29583             :       }
   29584             :     }
   29585             : #endif
   29586             :   }
   29587        1450 :   resultobj = SWIG_Py_Void();
   29588        1450 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29589             :   return resultobj;
   29590             : fail:
   29591             :   return NULL;
   29592             : }
   29593             : 
   29594             : 
   29595          95 : SWIGINTERN PyObject *_wrap_Group_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29596          95 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29597          95 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29598          95 :   void *argp1 = 0 ;
   29599          95 :   int res1 = 0 ;
   29600          95 :   PyObject *swig_obj[1] ;
   29601          95 :   char *result = 0 ;
   29602             :   
   29603          95 :   if (!args) SWIG_fail;
   29604          95 :   swig_obj[0] = args;
   29605          95 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29606          95 :   if (!SWIG_IsOK(res1)) {
   29607           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetName" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29608             :   }
   29609          95 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29610          95 :   {
   29611          95 :     const int bLocalUseExceptions = GetUseExceptions();
   29612          95 :     if ( bLocalUseExceptions ) {
   29613          17 :       pushErrorHandler();
   29614             :     }
   29615          95 :     {
   29616          95 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29617          95 :       result = (char *)GDALGroupHS_GetName(arg1);
   29618          95 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29619             :     }
   29620          95 :     if ( bLocalUseExceptions ) {
   29621          17 :       popErrorHandler();
   29622             :     }
   29623             : #ifndef SED_HACKS
   29624             :     if ( bLocalUseExceptions ) {
   29625             :       CPLErr eclass = CPLGetLastErrorType();
   29626             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29627             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29628             :       }
   29629             :     }
   29630             : #endif
   29631             :   }
   29632          95 :   resultobj = SWIG_FromCharPtr((const char *)result);
   29633          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; } }
   29634             :   return resultobj;
   29635             : fail:
   29636             :   return NULL;
   29637             : }
   29638             : 
   29639             : 
   29640          47 : SWIGINTERN PyObject *_wrap_Group_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29641          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29642          47 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29643          47 :   void *argp1 = 0 ;
   29644          47 :   int res1 = 0 ;
   29645          47 :   PyObject *swig_obj[1] ;
   29646          47 :   char *result = 0 ;
   29647             :   
   29648          47 :   if (!args) SWIG_fail;
   29649          47 :   swig_obj[0] = args;
   29650          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29651          47 :   if (!SWIG_IsOK(res1)) {
   29652           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetFullName" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29653             :   }
   29654          47 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29655          47 :   {
   29656          47 :     const int bLocalUseExceptions = GetUseExceptions();
   29657          47 :     if ( bLocalUseExceptions ) {
   29658          17 :       pushErrorHandler();
   29659             :     }
   29660          47 :     {
   29661          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29662          47 :       result = (char *)GDALGroupHS_GetFullName(arg1);
   29663          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29664             :     }
   29665          47 :     if ( bLocalUseExceptions ) {
   29666          17 :       popErrorHandler();
   29667             :     }
   29668             : #ifndef SED_HACKS
   29669             :     if ( bLocalUseExceptions ) {
   29670             :       CPLErr eclass = CPLGetLastErrorType();
   29671             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29672             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29673             :       }
   29674             :     }
   29675             : #endif
   29676             :   }
   29677          47 :   resultobj = SWIG_FromCharPtr((const char *)result);
   29678          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; } }
   29679             :   return resultobj;
   29680             : fail:
   29681             :   return NULL;
   29682             : }
   29683             : 
   29684             : 
   29685         329 : SWIGINTERN PyObject *_wrap_Group_GetMDArrayNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29686         329 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29687         329 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29688         329 :   char **arg2 = (char **) 0 ;
   29689         329 :   void *argp1 = 0 ;
   29690         329 :   int res1 = 0 ;
   29691         329 :   PyObject *swig_obj[2] ;
   29692         329 :   char **result = 0 ;
   29693             :   
   29694         329 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetMDArrayNames", 1, 2, swig_obj)) SWIG_fail;
   29695         329 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29696         329 :   if (!SWIG_IsOK(res1)) {
   29697           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetMDArrayNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29698             :   }
   29699         329 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29700         329 :   if (swig_obj[1]) {
   29701         329 :     {
   29702             :       /* %typemap(in) char **dict */
   29703         329 :       arg2 = NULL;
   29704         329 :       if ( PySequence_Check( swig_obj[1] ) ) {
   29705         329 :         int bErr = FALSE;
   29706         329 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   29707         329 :         if ( bErr )
   29708             :         {
   29709           0 :           SWIG_fail;
   29710             :         }
   29711             :       }
   29712           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   29713           0 :         int bErr = FALSE;
   29714           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   29715           0 :         if ( bErr )
   29716             :         {
   29717           0 :           SWIG_fail;
   29718             :         }
   29719             :       }
   29720             :       else {
   29721           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29722           0 :         SWIG_fail;
   29723             :       }
   29724             :     }
   29725             :   }
   29726         329 :   {
   29727         329 :     const int bLocalUseExceptions = GetUseExceptions();
   29728         329 :     if ( bLocalUseExceptions ) {
   29729          74 :       pushErrorHandler();
   29730             :     }
   29731         329 :     {
   29732         329 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29733         329 :       result = (char **)GDALGroupHS_GetMDArrayNames(arg1,arg2);
   29734         329 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29735             :     }
   29736         329 :     if ( bLocalUseExceptions ) {
   29737          74 :       popErrorHandler();
   29738             :     }
   29739             : #ifndef SED_HACKS
   29740             :     if ( bLocalUseExceptions ) {
   29741             :       CPLErr eclass = CPLGetLastErrorType();
   29742             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29743             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29744             :       }
   29745             :     }
   29746             : #endif
   29747             :   }
   29748         329 :   {
   29749             :     /* %typemap(out) char **CSL -> ( string ) */
   29750         329 :     bool bErr = false;
   29751         329 :     resultobj = CSLToList(result, &bErr);
   29752         329 :     CSLDestroy(result);
   29753         329 :     if( bErr ) {
   29754           0 :       SWIG_fail;
   29755             :     }
   29756             :   }
   29757         329 :   {
   29758             :     /* %typemap(freearg) char **dict */
   29759         329 :     CSLDestroy( arg2 );
   29760             :   }
   29761         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; } }
   29762             :   return resultobj;
   29763           0 : fail:
   29764           0 :   {
   29765             :     /* %typemap(freearg) char **dict */
   29766           0 :     CSLDestroy( arg2 );
   29767             :   }
   29768             :   return NULL;
   29769             : }
   29770             : 
   29771             : 
   29772           1 : SWIGINTERN PyObject *_wrap_Group_GetMDArrayFullNamesRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29773           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29774           1 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29775           1 :   char **arg2 = (char **) 0 ;
   29776           1 :   char **arg3 = (char **) 0 ;
   29777           1 :   void *argp1 = 0 ;
   29778           1 :   int res1 = 0 ;
   29779           1 :   void *argp2 = 0 ;
   29780           1 :   int res2 = 0 ;
   29781           1 :   void *argp3 = 0 ;
   29782           1 :   int res3 = 0 ;
   29783           1 :   PyObject *swig_obj[3] ;
   29784           1 :   char **result = 0 ;
   29785             :   
   29786           1 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetMDArrayFullNamesRecursive", 1, 3, swig_obj)) SWIG_fail;
   29787           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29788           1 :   if (!SWIG_IsOK(res1)) {
   29789           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29790             :   }
   29791           1 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29792           1 :   if (swig_obj[1]) {
   29793           0 :     res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_p_char, 0 |  0 );
   29794           0 :     if (!SWIG_IsOK(res2)) {
   29795           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "2"" of type '" "char **""'"); 
   29796             :     }
   29797           0 :     arg2 = reinterpret_cast< char ** >(argp2);
   29798             :   }
   29799           1 :   if (swig_obj[2]) {
   29800           0 :     res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_p_char, 0 |  0 );
   29801           0 :     if (!SWIG_IsOK(res3)) {
   29802           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "3"" of type '" "char **""'"); 
   29803             :     }
   29804           0 :     arg3 = reinterpret_cast< char ** >(argp3);
   29805             :   }
   29806           1 :   {
   29807           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29808           1 :     if ( bLocalUseExceptions ) {
   29809           1 :       pushErrorHandler();
   29810             :     }
   29811           1 :     {
   29812           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29813           1 :       result = (char **)GDALGroupHS_GetMDArrayFullNamesRecursive(arg1,arg2,arg3);
   29814           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29815             :     }
   29816           1 :     if ( bLocalUseExceptions ) {
   29817           1 :       popErrorHandler();
   29818             :     }
   29819             : #ifndef SED_HACKS
   29820             :     if ( bLocalUseExceptions ) {
   29821             :       CPLErr eclass = CPLGetLastErrorType();
   29822             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29823             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29824             :       }
   29825             :     }
   29826             : #endif
   29827             :   }
   29828           1 :   {
   29829             :     /* %typemap(out) char **CSL -> ( string ) */
   29830           1 :     bool bErr = false;
   29831           1 :     resultobj = CSLToList(result, &bErr);
   29832           1 :     CSLDestroy(result);
   29833           1 :     if( bErr ) {
   29834           0 :       SWIG_fail;
   29835             :     }
   29836             :   }
   29837           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; } }
   29838             :   return resultobj;
   29839             : fail:
   29840             :   return NULL;
   29841             : }
   29842             : 
   29843             : 
   29844         807 : SWIGINTERN PyObject *_wrap_Group_OpenMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29845         807 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29846         807 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29847         807 :   char *arg2 = (char *) 0 ;
   29848         807 :   char **arg3 = (char **) 0 ;
   29849         807 :   void *argp1 = 0 ;
   29850         807 :   int res1 = 0 ;
   29851         807 :   int res2 ;
   29852         807 :   char *buf2 = 0 ;
   29853         807 :   int alloc2 = 0 ;
   29854         807 :   PyObject *swig_obj[3] ;
   29855         807 :   GDALMDArrayHS *result = 0 ;
   29856             :   
   29857         807 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenMDArray", 2, 3, swig_obj)) SWIG_fail;
   29858         807 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29859         807 :   if (!SWIG_IsOK(res1)) {
   29860           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29861             :   }
   29862         807 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29863         807 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   29864         807 :   if (!SWIG_IsOK(res2)) {
   29865           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenMDArray" "', argument " "2"" of type '" "char const *""'");
   29866             :   }
   29867         807 :   arg2 = reinterpret_cast< char * >(buf2);
   29868         807 :   if (swig_obj[2]) {
   29869          10 :     {
   29870             :       /* %typemap(in) char **dict */
   29871          10 :       arg3 = NULL;
   29872          10 :       if ( PySequence_Check( swig_obj[2] ) ) {
   29873          10 :         int bErr = FALSE;
   29874          10 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   29875          10 :         if ( bErr )
   29876             :         {
   29877           0 :           SWIG_fail;
   29878             :         }
   29879             :       }
   29880           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   29881           0 :         int bErr = FALSE;
   29882           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   29883           0 :         if ( bErr )
   29884             :         {
   29885           0 :           SWIG_fail;
   29886             :         }
   29887             :       }
   29888             :       else {
   29889           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29890           0 :         SWIG_fail;
   29891             :       }
   29892             :     }
   29893             :   }
   29894         807 :   {
   29895         807 :     if (!arg2) {
   29896           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   29897             :     }
   29898             :   }
   29899         807 :   {
   29900         807 :     const int bLocalUseExceptions = GetUseExceptions();
   29901         807 :     if ( bLocalUseExceptions ) {
   29902         228 :       pushErrorHandler();
   29903             :     }
   29904         807 :     {
   29905         807 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29906         807 :       result = (GDALMDArrayHS *)GDALGroupHS_OpenMDArray(arg1,(char const *)arg2,arg3);
   29907         807 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29908             :     }
   29909         807 :     if ( bLocalUseExceptions ) {
   29910         228 :       popErrorHandler();
   29911             :     }
   29912             : #ifndef SED_HACKS
   29913             :     if ( bLocalUseExceptions ) {
   29914             :       CPLErr eclass = CPLGetLastErrorType();
   29915             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29916             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29917             :       }
   29918             :     }
   29919             : #endif
   29920             :   }
   29921         807 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   29922         807 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29923         807 :   {
   29924             :     /* %typemap(freearg) char **dict */
   29925         807 :     CSLDestroy( arg3 );
   29926             :   }
   29927         841 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29928             :   return resultobj;
   29929           0 : fail:
   29930           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29931           0 :   {
   29932             :     /* %typemap(freearg) char **dict */
   29933           0 :     CSLDestroy( arg3 );
   29934             :   }
   29935             :   return NULL;
   29936             : }
   29937             : 
   29938             : 
   29939          17 : SWIGINTERN PyObject *_wrap_Group_OpenMDArrayFromFullname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29940          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29941          17 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29942          17 :   char *arg2 = (char *) 0 ;
   29943          17 :   char **arg3 = (char **) 0 ;
   29944          17 :   void *argp1 = 0 ;
   29945          17 :   int res1 = 0 ;
   29946          17 :   int res2 ;
   29947          17 :   char *buf2 = 0 ;
   29948          17 :   int alloc2 = 0 ;
   29949          17 :   PyObject *swig_obj[3] ;
   29950          17 :   GDALMDArrayHS *result = 0 ;
   29951             :   
   29952          17 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenMDArrayFromFullname", 2, 3, swig_obj)) SWIG_fail;
   29953          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29954          17 :   if (!SWIG_IsOK(res1)) {
   29955           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenMDArrayFromFullname" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29956             :   }
   29957          17 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29958          17 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   29959          17 :   if (!SWIG_IsOK(res2)) {
   29960           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenMDArrayFromFullname" "', argument " "2"" of type '" "char const *""'");
   29961             :   }
   29962          17 :   arg2 = reinterpret_cast< char * >(buf2);
   29963          17 :   if (swig_obj[2]) {
   29964           0 :     {
   29965             :       /* %typemap(in) char **dict */
   29966           0 :       arg3 = NULL;
   29967           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   29968           0 :         int bErr = FALSE;
   29969           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   29970           0 :         if ( bErr )
   29971             :         {
   29972           0 :           SWIG_fail;
   29973             :         }
   29974             :       }
   29975           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   29976           0 :         int bErr = FALSE;
   29977           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   29978           0 :         if ( bErr )
   29979             :         {
   29980           0 :           SWIG_fail;
   29981             :         }
   29982             :       }
   29983             :       else {
   29984           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29985           0 :         SWIG_fail;
   29986             :       }
   29987             :     }
   29988             :   }
   29989          17 :   {
   29990          17 :     if (!arg2) {
   29991           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   29992             :     }
   29993             :   }
   29994          17 :   {
   29995          17 :     const int bLocalUseExceptions = GetUseExceptions();
   29996          17 :     if ( bLocalUseExceptions ) {
   29997           9 :       pushErrorHandler();
   29998             :     }
   29999          17 :     {
   30000          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30001          17 :       result = (GDALMDArrayHS *)GDALGroupHS_OpenMDArrayFromFullname(arg1,(char const *)arg2,arg3);
   30002          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30003             :     }
   30004          17 :     if ( bLocalUseExceptions ) {
   30005           9 :       popErrorHandler();
   30006             :     }
   30007             : #ifndef SED_HACKS
   30008             :     if ( bLocalUseExceptions ) {
   30009             :       CPLErr eclass = CPLGetLastErrorType();
   30010             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30011             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30012             :       }
   30013             :     }
   30014             : #endif
   30015             :   }
   30016          17 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   30017          17 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30018          17 :   {
   30019             :     /* %typemap(freearg) char **dict */
   30020          17 :     CSLDestroy( arg3 );
   30021             :   }
   30022          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; } }
   30023             :   return resultobj;
   30024           0 : fail:
   30025           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30026           0 :   {
   30027             :     /* %typemap(freearg) char **dict */
   30028           0 :     CSLDestroy( arg3 );
   30029             :   }
   30030             :   return NULL;
   30031             : }
   30032             : 
   30033             : 
   30034          19 : SWIGINTERN PyObject *_wrap_Group_ResolveMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30035          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30036          19 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30037          19 :   char *arg2 = (char *) 0 ;
   30038          19 :   char *arg3 = (char *) 0 ;
   30039          19 :   char **arg4 = (char **) 0 ;
   30040          19 :   void *argp1 = 0 ;
   30041          19 :   int res1 = 0 ;
   30042          19 :   int res2 ;
   30043          19 :   char *buf2 = 0 ;
   30044          19 :   int alloc2 = 0 ;
   30045          19 :   int res3 ;
   30046          19 :   char *buf3 = 0 ;
   30047          19 :   int alloc3 = 0 ;
   30048          19 :   PyObject *swig_obj[4] ;
   30049          19 :   GDALMDArrayHS *result = 0 ;
   30050             :   
   30051          19 :   if (!SWIG_Python_UnpackTuple(args, "Group_ResolveMDArray", 3, 4, swig_obj)) SWIG_fail;
   30052          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30053          19 :   if (!SWIG_IsOK(res1)) {
   30054           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_ResolveMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30055             :   }
   30056          19 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30057          19 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30058          19 :   if (!SWIG_IsOK(res2)) {
   30059           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_ResolveMDArray" "', argument " "2"" of type '" "char const *""'");
   30060             :   }
   30061          19 :   arg2 = reinterpret_cast< char * >(buf2);
   30062          19 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   30063          19 :   if (!SWIG_IsOK(res3)) {
   30064           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_ResolveMDArray" "', argument " "3"" of type '" "char const *""'");
   30065             :   }
   30066          19 :   arg3 = reinterpret_cast< char * >(buf3);
   30067          19 :   if (swig_obj[3]) {
   30068           0 :     {
   30069             :       /* %typemap(in) char **dict */
   30070           0 :       arg4 = NULL;
   30071           0 :       if ( PySequence_Check( swig_obj[3] ) ) {
   30072           0 :         int bErr = FALSE;
   30073           0 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   30074           0 :         if ( bErr )
   30075             :         {
   30076           0 :           SWIG_fail;
   30077             :         }
   30078             :       }
   30079           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   30080           0 :         int bErr = FALSE;
   30081           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   30082           0 :         if ( bErr )
   30083             :         {
   30084           0 :           SWIG_fail;
   30085             :         }
   30086             :       }
   30087             :       else {
   30088           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30089           0 :         SWIG_fail;
   30090             :       }
   30091             :     }
   30092             :   }
   30093          19 :   {
   30094          19 :     if (!arg2) {
   30095           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30096             :     }
   30097             :   }
   30098          19 :   {
   30099          19 :     const int bLocalUseExceptions = GetUseExceptions();
   30100          19 :     if ( bLocalUseExceptions ) {
   30101           1 :       pushErrorHandler();
   30102             :     }
   30103          19 :     {
   30104          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30105          19 :       result = (GDALMDArrayHS *)GDALGroupHS_ResolveMDArray(arg1,(char const *)arg2,(char const *)arg3,arg4);
   30106          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30107             :     }
   30108          19 :     if ( bLocalUseExceptions ) {
   30109           1 :       popErrorHandler();
   30110             :     }
   30111             : #ifndef SED_HACKS
   30112             :     if ( bLocalUseExceptions ) {
   30113             :       CPLErr eclass = CPLGetLastErrorType();
   30114             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30115             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30116             :       }
   30117             :     }
   30118             : #endif
   30119             :   }
   30120          19 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   30121          19 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30122          19 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   30123          19 :   {
   30124             :     /* %typemap(freearg) char **dict */
   30125          19 :     CSLDestroy( arg4 );
   30126             :   }
   30127          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; } }
   30128             :   return resultobj;
   30129           0 : fail:
   30130           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30131           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   30132           0 :   {
   30133             :     /* %typemap(freearg) char **dict */
   30134           0 :     CSLDestroy( arg4 );
   30135             :   }
   30136             :   return NULL;
   30137             : }
   30138             : 
   30139             : 
   30140          97 : SWIGINTERN PyObject *_wrap_Group_GetGroupNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30141          97 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30142          97 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30143          97 :   char **arg2 = (char **) 0 ;
   30144          97 :   void *argp1 = 0 ;
   30145          97 :   int res1 = 0 ;
   30146          97 :   PyObject *swig_obj[2] ;
   30147          97 :   char **result = 0 ;
   30148             :   
   30149          97 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetGroupNames", 1, 2, swig_obj)) SWIG_fail;
   30150          97 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30151          97 :   if (!SWIG_IsOK(res1)) {
   30152           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetGroupNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30153             :   }
   30154          97 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30155          97 :   if (swig_obj[1]) {
   30156          97 :     {
   30157             :       /* %typemap(in) char **dict */
   30158          97 :       arg2 = NULL;
   30159          97 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30160          97 :         int bErr = FALSE;
   30161          97 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   30162          97 :         if ( bErr )
   30163             :         {
   30164           0 :           SWIG_fail;
   30165             :         }
   30166             :       }
   30167           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30168           0 :         int bErr = FALSE;
   30169           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   30170           0 :         if ( bErr )
   30171             :         {
   30172           0 :           SWIG_fail;
   30173             :         }
   30174             :       }
   30175             :       else {
   30176           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30177           0 :         SWIG_fail;
   30178             :       }
   30179             :     }
   30180             :   }
   30181          97 :   {
   30182          97 :     const int bLocalUseExceptions = GetUseExceptions();
   30183          97 :     if ( bLocalUseExceptions ) {
   30184          51 :       pushErrorHandler();
   30185             :     }
   30186          97 :     {
   30187          97 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30188          97 :       result = (char **)GDALGroupHS_GetGroupNames(arg1,arg2);
   30189          97 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30190             :     }
   30191          97 :     if ( bLocalUseExceptions ) {
   30192          51 :       popErrorHandler();
   30193             :     }
   30194             : #ifndef SED_HACKS
   30195             :     if ( bLocalUseExceptions ) {
   30196             :       CPLErr eclass = CPLGetLastErrorType();
   30197             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30198             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30199             :       }
   30200             :     }
   30201             : #endif
   30202             :   }
   30203          97 :   {
   30204             :     /* %typemap(out) char **CSL -> ( string ) */
   30205          97 :     bool bErr = false;
   30206          97 :     resultobj = CSLToList(result, &bErr);
   30207          97 :     CSLDestroy(result);
   30208          97 :     if( bErr ) {
   30209           0 :       SWIG_fail;
   30210             :     }
   30211             :   }
   30212          97 :   {
   30213             :     /* %typemap(freearg) char **dict */
   30214          97 :     CSLDestroy( arg2 );
   30215             :   }
   30216          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; } }
   30217             :   return resultobj;
   30218           0 : fail:
   30219           0 :   {
   30220             :     /* %typemap(freearg) char **dict */
   30221           0 :     CSLDestroy( arg2 );
   30222             :   }
   30223             :   return NULL;
   30224             : }
   30225             : 
   30226             : 
   30227         163 : SWIGINTERN PyObject *_wrap_Group_OpenGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30228         163 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30229         163 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30230         163 :   char *arg2 = (char *) 0 ;
   30231         163 :   char **arg3 = (char **) 0 ;
   30232         163 :   void *argp1 = 0 ;
   30233         163 :   int res1 = 0 ;
   30234         163 :   int res2 ;
   30235         163 :   char *buf2 = 0 ;
   30236         163 :   int alloc2 = 0 ;
   30237         163 :   PyObject *swig_obj[3] ;
   30238         163 :   GDALGroupHS *result = 0 ;
   30239             :   
   30240         163 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenGroup", 2, 3, swig_obj)) SWIG_fail;
   30241         163 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30242         163 :   if (!SWIG_IsOK(res1)) {
   30243           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30244             :   }
   30245         163 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30246         163 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30247         163 :   if (!SWIG_IsOK(res2)) {
   30248           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenGroup" "', argument " "2"" of type '" "char const *""'");
   30249             :   }
   30250         163 :   arg2 = reinterpret_cast< char * >(buf2);
   30251         163 :   if (swig_obj[2]) {
   30252           1 :     {
   30253             :       /* %typemap(in) char **dict */
   30254           1 :       arg3 = NULL;
   30255           1 :       if ( PySequence_Check( swig_obj[2] ) ) {
   30256           1 :         int bErr = FALSE;
   30257           1 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   30258           1 :         if ( bErr )
   30259             :         {
   30260           0 :           SWIG_fail;
   30261             :         }
   30262             :       }
   30263           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   30264           0 :         int bErr = FALSE;
   30265           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   30266           0 :         if ( bErr )
   30267             :         {
   30268           0 :           SWIG_fail;
   30269             :         }
   30270             :       }
   30271             :       else {
   30272           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30273           0 :         SWIG_fail;
   30274             :       }
   30275             :     }
   30276             :   }
   30277         163 :   {
   30278         163 :     if (!arg2) {
   30279           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30280             :     }
   30281             :   }
   30282         163 :   {
   30283         163 :     const int bLocalUseExceptions = GetUseExceptions();
   30284         163 :     if ( bLocalUseExceptions ) {
   30285          97 :       pushErrorHandler();
   30286             :     }
   30287         163 :     {
   30288         163 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30289         163 :       result = (GDALGroupHS *)GDALGroupHS_OpenGroup(arg1,(char const *)arg2,arg3);
   30290         163 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30291             :     }
   30292         163 :     if ( bLocalUseExceptions ) {
   30293          97 :       popErrorHandler();
   30294             :     }
   30295             : #ifndef SED_HACKS
   30296             :     if ( bLocalUseExceptions ) {
   30297             :       CPLErr eclass = CPLGetLastErrorType();
   30298             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30299             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30300             :       }
   30301             :     }
   30302             : #endif
   30303             :   }
   30304         163 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   30305         163 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30306         163 :   {
   30307             :     /* %typemap(freearg) char **dict */
   30308         163 :     CSLDestroy( arg3 );
   30309             :   }
   30310         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; } }
   30311             :   return resultobj;
   30312           0 : fail:
   30313           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30314           0 :   {
   30315             :     /* %typemap(freearg) char **dict */
   30316           0 :     CSLDestroy( arg3 );
   30317             :   }
   30318             :   return NULL;
   30319             : }
   30320             : 
   30321             : 
   30322           3 : SWIGINTERN PyObject *_wrap_Group_OpenGroupFromFullname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30323           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30324           3 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30325           3 :   char *arg2 = (char *) 0 ;
   30326           3 :   char **arg3 = (char **) 0 ;
   30327           3 :   void *argp1 = 0 ;
   30328           3 :   int res1 = 0 ;
   30329           3 :   int res2 ;
   30330           3 :   char *buf2 = 0 ;
   30331           3 :   int alloc2 = 0 ;
   30332           3 :   PyObject *swig_obj[3] ;
   30333           3 :   GDALGroupHS *result = 0 ;
   30334             :   
   30335           3 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenGroupFromFullname", 2, 3, swig_obj)) SWIG_fail;
   30336           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30337           3 :   if (!SWIG_IsOK(res1)) {
   30338           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenGroupFromFullname" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30339             :   }
   30340           3 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30341           3 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30342           3 :   if (!SWIG_IsOK(res2)) {
   30343           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenGroupFromFullname" "', argument " "2"" of type '" "char const *""'");
   30344             :   }
   30345           3 :   arg2 = reinterpret_cast< char * >(buf2);
   30346           3 :   if (swig_obj[2]) {
   30347           0 :     {
   30348             :       /* %typemap(in) char **dict */
   30349           0 :       arg3 = NULL;
   30350           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   30351           0 :         int bErr = FALSE;
   30352           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   30353           0 :         if ( bErr )
   30354             :         {
   30355           0 :           SWIG_fail;
   30356             :         }
   30357             :       }
   30358           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   30359           0 :         int bErr = FALSE;
   30360           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   30361           0 :         if ( bErr )
   30362             :         {
   30363           0 :           SWIG_fail;
   30364             :         }
   30365             :       }
   30366             :       else {
   30367           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30368           0 :         SWIG_fail;
   30369             :       }
   30370             :     }
   30371             :   }
   30372           3 :   {
   30373           3 :     if (!arg2) {
   30374           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30375             :     }
   30376             :   }
   30377           3 :   {
   30378           3 :     const int bLocalUseExceptions = GetUseExceptions();
   30379           3 :     if ( bLocalUseExceptions ) {
   30380           1 :       pushErrorHandler();
   30381             :     }
   30382           3 :     {
   30383           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30384           3 :       result = (GDALGroupHS *)GDALGroupHS_OpenGroupFromFullname(arg1,(char const *)arg2,arg3);
   30385           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30386             :     }
   30387           3 :     if ( bLocalUseExceptions ) {
   30388           1 :       popErrorHandler();
   30389             :     }
   30390             : #ifndef SED_HACKS
   30391             :     if ( bLocalUseExceptions ) {
   30392             :       CPLErr eclass = CPLGetLastErrorType();
   30393             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30394             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30395             :       }
   30396             :     }
   30397             : #endif
   30398             :   }
   30399           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   30400           3 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30401           3 :   {
   30402             :     /* %typemap(freearg) char **dict */
   30403           3 :     CSLDestroy( arg3 );
   30404             :   }
   30405           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; } }
   30406             :   return resultobj;
   30407           0 : fail:
   30408           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30409           0 :   {
   30410             :     /* %typemap(freearg) char **dict */
   30411           0 :     CSLDestroy( arg3 );
   30412             :   }
   30413             :   return NULL;
   30414             : }
   30415             : 
   30416             : 
   30417           8 : SWIGINTERN PyObject *_wrap_Group_GetVectorLayerNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30418           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30419           8 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30420           8 :   char **arg2 = (char **) 0 ;
   30421           8 :   void *argp1 = 0 ;
   30422           8 :   int res1 = 0 ;
   30423           8 :   PyObject *swig_obj[2] ;
   30424           8 :   char **result = 0 ;
   30425             :   
   30426           8 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetVectorLayerNames", 1, 2, swig_obj)) SWIG_fail;
   30427           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30428           8 :   if (!SWIG_IsOK(res1)) {
   30429           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetVectorLayerNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30430             :   }
   30431           8 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30432           8 :   if (swig_obj[1]) {
   30433           0 :     {
   30434             :       /* %typemap(in) char **dict */
   30435           0 :       arg2 = NULL;
   30436           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30437           0 :         int bErr = FALSE;
   30438           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   30439           0 :         if ( bErr )
   30440             :         {
   30441           0 :           SWIG_fail;
   30442             :         }
   30443             :       }
   30444           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30445           0 :         int bErr = FALSE;
   30446           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   30447           0 :         if ( bErr )
   30448             :         {
   30449           0 :           SWIG_fail;
   30450             :         }
   30451             :       }
   30452             :       else {
   30453           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30454           0 :         SWIG_fail;
   30455             :       }
   30456             :     }
   30457             :   }
   30458           8 :   {
   30459           8 :     const int bLocalUseExceptions = GetUseExceptions();
   30460           8 :     if ( bLocalUseExceptions ) {
   30461           0 :       pushErrorHandler();
   30462             :     }
   30463           8 :     {
   30464           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30465           8 :       result = (char **)GDALGroupHS_GetVectorLayerNames(arg1,arg2);
   30466           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30467             :     }
   30468           8 :     if ( bLocalUseExceptions ) {
   30469           0 :       popErrorHandler();
   30470             :     }
   30471             : #ifndef SED_HACKS
   30472             :     if ( bLocalUseExceptions ) {
   30473             :       CPLErr eclass = CPLGetLastErrorType();
   30474             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30475             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30476             :       }
   30477             :     }
   30478             : #endif
   30479             :   }
   30480           8 :   {
   30481             :     /* %typemap(out) char **CSL -> ( string ) */
   30482           8 :     bool bErr = false;
   30483           8 :     resultobj = CSLToList(result, &bErr);
   30484           8 :     CSLDestroy(result);
   30485           8 :     if( bErr ) {
   30486           0 :       SWIG_fail;
   30487             :     }
   30488             :   }
   30489           8 :   {
   30490             :     /* %typemap(freearg) char **dict */
   30491           8 :     CSLDestroy( arg2 );
   30492             :   }
   30493           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; } }
   30494             :   return resultobj;
   30495           0 : fail:
   30496           0 :   {
   30497             :     /* %typemap(freearg) char **dict */
   30498           0 :     CSLDestroy( arg2 );
   30499             :   }
   30500             :   return NULL;
   30501             : }
   30502             : 
   30503             : 
   30504          12 : SWIGINTERN PyObject *_wrap_Group_OpenVectorLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30505          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30506          12 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30507          12 :   char *arg2 = (char *) 0 ;
   30508          12 :   char **arg3 = (char **) 0 ;
   30509          12 :   void *argp1 = 0 ;
   30510          12 :   int res1 = 0 ;
   30511          12 :   int res2 ;
   30512          12 :   char *buf2 = 0 ;
   30513          12 :   int alloc2 = 0 ;
   30514          12 :   PyObject *swig_obj[3] ;
   30515          12 :   OGRLayerShadow *result = 0 ;
   30516             :   
   30517          12 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenVectorLayer", 2, 3, swig_obj)) SWIG_fail;
   30518          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30519          12 :   if (!SWIG_IsOK(res1)) {
   30520           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenVectorLayer" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30521             :   }
   30522          12 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30523          12 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30524          12 :   if (!SWIG_IsOK(res2)) {
   30525           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenVectorLayer" "', argument " "2"" of type '" "char const *""'");
   30526             :   }
   30527          12 :   arg2 = reinterpret_cast< char * >(buf2);
   30528          12 :   if (swig_obj[2]) {
   30529           0 :     {
   30530             :       /* %typemap(in) char **dict */
   30531           0 :       arg3 = NULL;
   30532           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   30533           0 :         int bErr = FALSE;
   30534           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   30535           0 :         if ( bErr )
   30536             :         {
   30537           0 :           SWIG_fail;
   30538             :         }
   30539             :       }
   30540           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   30541           0 :         int bErr = FALSE;
   30542           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   30543           0 :         if ( bErr )
   30544             :         {
   30545           0 :           SWIG_fail;
   30546             :         }
   30547             :       }
   30548             :       else {
   30549           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30550           0 :         SWIG_fail;
   30551             :       }
   30552             :     }
   30553             :   }
   30554          12 :   {
   30555          12 :     if (!arg2) {
   30556           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30557             :     }
   30558             :   }
   30559          12 :   {
   30560          12 :     const int bLocalUseExceptions = GetUseExceptions();
   30561          12 :     if ( bLocalUseExceptions ) {
   30562           1 :       pushErrorHandler();
   30563             :     }
   30564          12 :     {
   30565          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30566          12 :       result = (OGRLayerShadow *)GDALGroupHS_OpenVectorLayer(arg1,(char const *)arg2,arg3);
   30567          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30568             :     }
   30569          12 :     if ( bLocalUseExceptions ) {
   30570           1 :       popErrorHandler();
   30571             :     }
   30572             : #ifndef SED_HACKS
   30573             :     if ( bLocalUseExceptions ) {
   30574             :       CPLErr eclass = CPLGetLastErrorType();
   30575             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30576             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30577             :       }
   30578             :     }
   30579             : #endif
   30580             :   }
   30581          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   30582          12 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30583          12 :   {
   30584             :     /* %typemap(freearg) char **dict */
   30585          12 :     CSLDestroy( arg3 );
   30586             :   }
   30587          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; } }
   30588             :   return resultobj;
   30589           0 : fail:
   30590           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30591           0 :   {
   30592             :     /* %typemap(freearg) char **dict */
   30593           0 :     CSLDestroy( arg3 );
   30594             :   }
   30595             :   return NULL;
   30596             : }
   30597             : 
   30598             : 
   30599          73 : SWIGINTERN PyObject *_wrap_Group_GetDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30600          73 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30601          73 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30602          73 :   GDALDimensionHS ***arg2 = (GDALDimensionHS ***) 0 ;
   30603          73 :   size_t *arg3 = (size_t *) 0 ;
   30604          73 :   char **arg4 = (char **) 0 ;
   30605          73 :   void *argp1 = 0 ;
   30606          73 :   int res1 = 0 ;
   30607          73 :   GDALDimensionHS **dims2 = 0 ;
   30608          73 :   size_t nCount2 = 0 ;
   30609          73 :   PyObject *swig_obj[2] ;
   30610             :   
   30611          73 :   {
   30612             :     /* %typemap(in,numinputs=0) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30613          73 :     arg2 = &dims2;
   30614          73 :     arg3 = &nCount2;
   30615             :   }
   30616          73 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetDimensions", 1, 2, swig_obj)) SWIG_fail;
   30617          73 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30618          73 :   if (!SWIG_IsOK(res1)) {
   30619           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDimensions" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30620             :   }
   30621          73 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30622          73 :   if (swig_obj[1]) {
   30623           0 :     {
   30624             :       /* %typemap(in) char **dict */
   30625           0 :       arg4 = NULL;
   30626           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30627           0 :         int bErr = FALSE;
   30628           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   30629           0 :         if ( bErr )
   30630             :         {
   30631           0 :           SWIG_fail;
   30632             :         }
   30633             :       }
   30634           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30635           0 :         int bErr = FALSE;
   30636           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   30637           0 :         if ( bErr )
   30638             :         {
   30639           0 :           SWIG_fail;
   30640             :         }
   30641             :       }
   30642             :       else {
   30643           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30644           0 :         SWIG_fail;
   30645             :       }
   30646             :     }
   30647             :   }
   30648          73 :   {
   30649          73 :     const int bLocalUseExceptions = GetUseExceptions();
   30650          73 :     if ( bLocalUseExceptions ) {
   30651          40 :       pushErrorHandler();
   30652             :     }
   30653          73 :     {
   30654          73 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30655          73 :       GDALGroupHS_GetDimensions(arg1,arg2,arg3,arg4);
   30656          73 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30657             :     }
   30658          73 :     if ( bLocalUseExceptions ) {
   30659          40 :       popErrorHandler();
   30660             :     }
   30661             : #ifndef SED_HACKS
   30662             :     if ( bLocalUseExceptions ) {
   30663             :       CPLErr eclass = CPLGetLastErrorType();
   30664             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30665             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30666             :       }
   30667             :     }
   30668             : #endif
   30669             :   }
   30670          73 :   resultobj = SWIG_Py_Void();
   30671          73 :   {
   30672             :     /* %typemap(argout) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30673          73 :     Py_DECREF(resultobj);
   30674          73 :     resultobj = PyList_New( *arg3 );
   30675          73 :     if( !resultobj ) {
   30676           0 :       SWIG_fail;
   30677             :     }
   30678         230 :     for( size_t i = 0; i < *arg3; i++ ) {
   30679         157 :       PyList_SetItem(resultobj, i,
   30680         157 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALDimensionHS,SWIG_POINTER_OWN) );
   30681             :       /* We have borrowed the GDALDimensionHS */
   30682         157 :       (*arg2)[i] = NULL;
   30683             :     }
   30684             :   }
   30685          73 :   {
   30686             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30687          73 :     GDALReleaseDimensions(*arg2, *arg3);
   30688             :   }
   30689          73 :   {
   30690             :     /* %typemap(freearg) char **dict */
   30691          73 :     CSLDestroy( arg4 );
   30692             :   }
   30693          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; } }
   30694             :   return resultobj;
   30695           0 : fail:
   30696           0 :   {
   30697             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30698           0 :     GDALReleaseDimensions(*arg2, *arg3);
   30699             :   }
   30700           0 :   {
   30701             :     /* %typemap(freearg) char **dict */
   30702           0 :     CSLDestroy( arg4 );
   30703             :   }
   30704             :   return NULL;
   30705             : }
   30706             : 
   30707             : 
   30708          80 : SWIGINTERN PyObject *_wrap_Group_GetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30709          80 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30710          80 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30711          80 :   char *arg2 = (char *) 0 ;
   30712          80 :   void *argp1 = 0 ;
   30713          80 :   int res1 = 0 ;
   30714          80 :   int res2 ;
   30715          80 :   char *buf2 = 0 ;
   30716          80 :   int alloc2 = 0 ;
   30717          80 :   PyObject *swig_obj[2] ;
   30718          80 :   GDALAttributeHS *result = 0 ;
   30719             :   
   30720          80 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetAttribute", 2, 2, swig_obj)) SWIG_fail;
   30721          80 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30722          80 :   if (!SWIG_IsOK(res1)) {
   30723           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30724             :   }
   30725          80 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30726          80 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30727          80 :   if (!SWIG_IsOK(res2)) {
   30728           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_GetAttribute" "', argument " "2"" of type '" "char const *""'");
   30729             :   }
   30730          80 :   arg2 = reinterpret_cast< char * >(buf2);
   30731          80 :   {
   30732          80 :     if (!arg2) {
   30733           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30734             :     }
   30735             :   }
   30736          80 :   {
   30737          80 :     const int bLocalUseExceptions = GetUseExceptions();
   30738          80 :     if ( bLocalUseExceptions ) {
   30739          22 :       pushErrorHandler();
   30740             :     }
   30741          80 :     {
   30742          80 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30743          80 :       result = (GDALAttributeHS *)GDALGroupHS_GetAttribute(arg1,(char const *)arg2);
   30744          80 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30745             :     }
   30746          80 :     if ( bLocalUseExceptions ) {
   30747          22 :       popErrorHandler();
   30748             :     }
   30749             : #ifndef SED_HACKS
   30750             :     if ( bLocalUseExceptions ) {
   30751             :       CPLErr eclass = CPLGetLastErrorType();
   30752             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30753             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30754             :       }
   30755             :     }
   30756             : #endif
   30757             :   }
   30758          80 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   30759          80 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30760          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; } }
   30761             :   return resultobj;
   30762           0 : fail:
   30763           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30764             :   return NULL;
   30765             : }
   30766             : 
   30767             : 
   30768          71 : SWIGINTERN PyObject *_wrap_Group_GetAttributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30769          71 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30770          71 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30771          71 :   GDALAttributeHS ***arg2 = (GDALAttributeHS ***) 0 ;
   30772          71 :   size_t *arg3 = (size_t *) 0 ;
   30773          71 :   char **arg4 = (char **) 0 ;
   30774          71 :   void *argp1 = 0 ;
   30775          71 :   int res1 = 0 ;
   30776          71 :   GDALAttributeHS **attrs2 = 0 ;
   30777          71 :   size_t nCount2 = 0 ;
   30778          71 :   PyObject *swig_obj[2] ;
   30779             :   
   30780          71 :   {
   30781             :     /* %typemap(in,numinputs=0) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30782          71 :     arg2 = &attrs2;
   30783          71 :     arg3 = &nCount2;
   30784             :   }
   30785          71 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetAttributes", 1, 2, swig_obj)) SWIG_fail;
   30786          71 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30787          71 :   if (!SWIG_IsOK(res1)) {
   30788           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetAttributes" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30789             :   }
   30790          71 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30791          71 :   if (swig_obj[1]) {
   30792           0 :     {
   30793             :       /* %typemap(in) char **dict */
   30794           0 :       arg4 = NULL;
   30795           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30796           0 :         int bErr = FALSE;
   30797           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   30798           0 :         if ( bErr )
   30799             :         {
   30800           0 :           SWIG_fail;
   30801             :         }
   30802             :       }
   30803           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30804           0 :         int bErr = FALSE;
   30805           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   30806           0 :         if ( bErr )
   30807             :         {
   30808           0 :           SWIG_fail;
   30809             :         }
   30810             :       }
   30811             :       else {
   30812           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30813           0 :         SWIG_fail;
   30814             :       }
   30815             :     }
   30816             :   }
   30817          71 :   {
   30818          71 :     const int bLocalUseExceptions = GetUseExceptions();
   30819          71 :     if ( bLocalUseExceptions ) {
   30820          35 :       pushErrorHandler();
   30821             :     }
   30822          71 :     {
   30823          71 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30824          71 :       GDALGroupHS_GetAttributes(arg1,arg2,arg3,arg4);
   30825          71 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30826             :     }
   30827          71 :     if ( bLocalUseExceptions ) {
   30828          35 :       popErrorHandler();
   30829             :     }
   30830             : #ifndef SED_HACKS
   30831             :     if ( bLocalUseExceptions ) {
   30832             :       CPLErr eclass = CPLGetLastErrorType();
   30833             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30834             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30835             :       }
   30836             :     }
   30837             : #endif
   30838             :   }
   30839          71 :   resultobj = SWIG_Py_Void();
   30840          71 :   {
   30841             :     /* %typemap(argout) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30842          71 :     Py_DECREF(resultobj);
   30843          71 :     resultobj = PyList_New( *arg3 );
   30844          71 :     if( !resultobj ) {
   30845           0 :       SWIG_fail;
   30846             :     }
   30847         229 :     for( size_t i = 0; i < *arg3; i++ ) {
   30848         158 :       PyList_SetItem(resultobj, i,
   30849         158 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALAttributeHS,SWIG_POINTER_OWN) );
   30850             :       /* We have borrowed the GDALAttributeHS */
   30851         158 :       (*arg2)[i] = NULL;
   30852             :     }
   30853             :   }
   30854          71 :   {
   30855             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30856          71 :     GDALReleaseAttributes(*arg2, *arg3);
   30857             :   }
   30858          71 :   {
   30859             :     /* %typemap(freearg) char **dict */
   30860          71 :     CSLDestroy( arg4 );
   30861             :   }
   30862          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; } }
   30863             :   return resultobj;
   30864           0 : fail:
   30865           0 :   {
   30866             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30867           0 :     GDALReleaseAttributes(*arg2, *arg3);
   30868             :   }
   30869           0 :   {
   30870             :     /* %typemap(freearg) char **dict */
   30871           0 :     CSLDestroy( arg4 );
   30872             :   }
   30873             :   return NULL;
   30874             : }
   30875             : 
   30876             : 
   30877           4 : SWIGINTERN PyObject *_wrap_Group_GetStructuralInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30878           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30879           4 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30880           4 :   void *argp1 = 0 ;
   30881           4 :   int res1 = 0 ;
   30882           4 :   PyObject *swig_obj[1] ;
   30883           4 :   char **result = 0 ;
   30884             :   
   30885           4 :   if (!args) SWIG_fail;
   30886           4 :   swig_obj[0] = args;
   30887           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30888           4 :   if (!SWIG_IsOK(res1)) {
   30889           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetStructuralInfo" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30890             :   }
   30891           4 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30892           4 :   {
   30893           4 :     const int bLocalUseExceptions = GetUseExceptions();
   30894           4 :     if ( bLocalUseExceptions ) {
   30895           0 :       pushErrorHandler();
   30896             :     }
   30897           4 :     {
   30898           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30899           4 :       result = (char **)GDALGroupHS_GetStructuralInfo(arg1);
   30900           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30901             :     }
   30902           4 :     if ( bLocalUseExceptions ) {
   30903           0 :       popErrorHandler();
   30904             :     }
   30905             : #ifndef SED_HACKS
   30906             :     if ( bLocalUseExceptions ) {
   30907             :       CPLErr eclass = CPLGetLastErrorType();
   30908             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30909             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30910             :       }
   30911             :     }
   30912             : #endif
   30913             :   }
   30914           4 :   {
   30915             :     /* %typemap(out) char **dict */
   30916           4 :     resultobj = GetCSLStringAsPyDict(result, false);
   30917             :   }
   30918           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; } }
   30919             :   return resultobj;
   30920             : fail:
   30921             :   return NULL;
   30922             : }
   30923             : 
   30924             : 
   30925         180 : SWIGINTERN PyObject *_wrap_Group_CreateGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   30926         180 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30927         180 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30928         180 :   char *arg2 = (char *) 0 ;
   30929         180 :   char **arg3 = (char **) 0 ;
   30930         180 :   void *argp1 = 0 ;
   30931         180 :   int res1 = 0 ;
   30932         180 :   int res2 ;
   30933         180 :   char *buf2 = 0 ;
   30934         180 :   int alloc2 = 0 ;
   30935         180 :   PyObject * obj0 = 0 ;
   30936         180 :   PyObject * obj1 = 0 ;
   30937         180 :   PyObject * obj2 = 0 ;
   30938         180 :   char * kwnames[] = {
   30939             :     (char *)"self",  (char *)"name",  (char *)"options",  NULL 
   30940             :   };
   30941         180 :   GDALGroupHS *result = 0 ;
   30942             :   
   30943         180 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Group_CreateGroup", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   30944         180 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30945         180 :   if (!SWIG_IsOK(res1)) {
   30946           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30947             :   }
   30948         180 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30949         180 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   30950         180 :   if (!SWIG_IsOK(res2)) {
   30951           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateGroup" "', argument " "2"" of type '" "char const *""'");
   30952             :   }
   30953         180 :   arg2 = reinterpret_cast< char * >(buf2);
   30954         180 :   if (obj2) {
   30955           0 :     {
   30956             :       /* %typemap(in) char **dict */
   30957           0 :       arg3 = NULL;
   30958           0 :       if ( PySequence_Check( obj2 ) ) {
   30959           0 :         int bErr = FALSE;
   30960           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   30961           0 :         if ( bErr )
   30962             :         {
   30963           0 :           SWIG_fail;
   30964             :         }
   30965             :       }
   30966           0 :       else if ( PyMapping_Check( obj2 ) ) {
   30967           0 :         int bErr = FALSE;
   30968           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   30969           0 :         if ( bErr )
   30970             :         {
   30971           0 :           SWIG_fail;
   30972             :         }
   30973             :       }
   30974             :       else {
   30975           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30976           0 :         SWIG_fail;
   30977             :       }
   30978             :     }
   30979             :   }
   30980         180 :   {
   30981         180 :     if (!arg2) {
   30982           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30983             :     }
   30984             :   }
   30985         179 :   {
   30986         179 :     const int bLocalUseExceptions = GetUseExceptions();
   30987         179 :     if ( bLocalUseExceptions ) {
   30988          92 :       pushErrorHandler();
   30989             :     }
   30990         179 :     {
   30991         179 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30992         179 :       result = (GDALGroupHS *)GDALGroupHS_CreateGroup(arg1,(char const *)arg2,arg3);
   30993         179 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30994             :     }
   30995         179 :     if ( bLocalUseExceptions ) {
   30996          92 :       popErrorHandler();
   30997             :     }
   30998             : #ifndef SED_HACKS
   30999             :     if ( bLocalUseExceptions ) {
   31000             :       CPLErr eclass = CPLGetLastErrorType();
   31001             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31002             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31003             :       }
   31004             :     }
   31005             : #endif
   31006             :   }
   31007         179 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   31008         179 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31009         179 :   {
   31010             :     /* %typemap(freearg) char **dict */
   31011         179 :     CSLDestroy( arg3 );
   31012             :   }
   31013         186 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31014             :   return resultobj;
   31015           1 : fail:
   31016           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31017           1 :   {
   31018             :     /* %typemap(freearg) char **dict */
   31019           1 :     CSLDestroy( arg3 );
   31020             :   }
   31021             :   return NULL;
   31022             : }
   31023             : 
   31024             : 
   31025          20 : SWIGINTERN PyObject *_wrap_Group_DeleteGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31026          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31027          20 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31028          20 :   char *arg2 = (char *) 0 ;
   31029          20 :   char **arg3 = (char **) 0 ;
   31030          20 :   void *argp1 = 0 ;
   31031          20 :   int res1 = 0 ;
   31032          20 :   int res2 ;
   31033          20 :   char *buf2 = 0 ;
   31034          20 :   int alloc2 = 0 ;
   31035          20 :   PyObject *swig_obj[3] ;
   31036          20 :   CPLErr result;
   31037             :   
   31038          20 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteGroup", 2, 3, swig_obj)) SWIG_fail;
   31039          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31040          20 :   if (!SWIG_IsOK(res1)) {
   31041           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31042             :   }
   31043          20 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31044          20 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31045          20 :   if (!SWIG_IsOK(res2)) {
   31046           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteGroup" "', argument " "2"" of type '" "char const *""'");
   31047             :   }
   31048          20 :   arg2 = reinterpret_cast< char * >(buf2);
   31049          20 :   if (swig_obj[2]) {
   31050           0 :     {
   31051             :       /* %typemap(in) char **dict */
   31052           0 :       arg3 = NULL;
   31053           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   31054           0 :         int bErr = FALSE;
   31055           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   31056           0 :         if ( bErr )
   31057             :         {
   31058           0 :           SWIG_fail;
   31059             :         }
   31060             :       }
   31061           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   31062           0 :         int bErr = FALSE;
   31063           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   31064           0 :         if ( bErr )
   31065             :         {
   31066           0 :           SWIG_fail;
   31067             :         }
   31068             :       }
   31069             :       else {
   31070           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31071           0 :         SWIG_fail;
   31072             :       }
   31073             :     }
   31074             :   }
   31075          20 :   {
   31076          20 :     if (!arg2) {
   31077           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31078             :     }
   31079             :   }
   31080          20 :   {
   31081          20 :     const int bLocalUseExceptions = GetUseExceptions();
   31082          20 :     if ( bLocalUseExceptions ) {
   31083          20 :       pushErrorHandler();
   31084             :     }
   31085          20 :     {
   31086          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31087          20 :       result = (CPLErr)GDALGroupHS_DeleteGroup(arg1,(char const *)arg2,arg3);
   31088          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31089             :     }
   31090          20 :     if ( bLocalUseExceptions ) {
   31091          20 :       popErrorHandler();
   31092             :     }
   31093             : #ifndef SED_HACKS
   31094             :     if ( bLocalUseExceptions ) {
   31095             :       CPLErr eclass = CPLGetLastErrorType();
   31096             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31097             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31098             :       }
   31099             :     }
   31100             : #endif
   31101             :   }
   31102          20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31103          20 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31104          20 :   {
   31105             :     /* %typemap(freearg) char **dict */
   31106          20 :     CSLDestroy( arg3 );
   31107             :   }
   31108          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; } }
   31109             :   return resultobj;
   31110           0 : fail:
   31111           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31112           0 :   {
   31113             :     /* %typemap(freearg) char **dict */
   31114           0 :     CSLDestroy( arg3 );
   31115             :   }
   31116             :   return NULL;
   31117             : }
   31118             : 
   31119             : 
   31120         659 : SWIGINTERN PyObject *_wrap_Group_CreateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   31121         659 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31122         659 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31123         659 :   char *arg2 = (char *) 0 ;
   31124         659 :   char *arg3 = (char *) 0 ;
   31125         659 :   char *arg4 = (char *) 0 ;
   31126         659 :   GUIntBig arg5 ;
   31127         659 :   char **arg6 = (char **) 0 ;
   31128         659 :   void *argp1 = 0 ;
   31129         659 :   int res1 = 0 ;
   31130         659 :   int res2 ;
   31131         659 :   char *buf2 = 0 ;
   31132         659 :   int alloc2 = 0 ;
   31133         659 :   int res3 ;
   31134         659 :   char *buf3 = 0 ;
   31135         659 :   int alloc3 = 0 ;
   31136         659 :   int res4 ;
   31137         659 :   char *buf4 = 0 ;
   31138         659 :   int alloc4 = 0 ;
   31139         659 :   PyObject * obj0 = 0 ;
   31140         659 :   PyObject * obj1 = 0 ;
   31141         659 :   PyObject * obj2 = 0 ;
   31142         659 :   PyObject * obj3 = 0 ;
   31143         659 :   PyObject * obj4 = 0 ;
   31144         659 :   PyObject * obj5 = 0 ;
   31145         659 :   char * kwnames[] = {
   31146             :     (char *)"self",  (char *)"name",  (char *)"dim_type",  (char *)"direction",  (char *)"size",  (char *)"options",  NULL 
   31147             :   };
   31148         659 :   GDALDimensionHS *result = 0 ;
   31149             :   
   31150         659 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|O:Group_CreateDimension", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
   31151         659 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31152         659 :   if (!SWIG_IsOK(res1)) {
   31153           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateDimension" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31154             :   }
   31155         659 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31156         659 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   31157         659 :   if (!SWIG_IsOK(res2)) {
   31158           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateDimension" "', argument " "2"" of type '" "char const *""'");
   31159             :   }
   31160         659 :   arg2 = reinterpret_cast< char * >(buf2);
   31161         659 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   31162         659 :   if (!SWIG_IsOK(res3)) {
   31163           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_CreateDimension" "', argument " "3"" of type '" "char const *""'");
   31164             :   }
   31165         659 :   arg3 = reinterpret_cast< char * >(buf3);
   31166         659 :   res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   31167         659 :   if (!SWIG_IsOK(res4)) {
   31168           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Group_CreateDimension" "', argument " "4"" of type '" "char const *""'");
   31169             :   }
   31170         659 :   arg4 = reinterpret_cast< char * >(buf4);
   31171         659 :   {
   31172         659 :     arg5 = (GIntBig)PyLong_AsUnsignedLongLong(obj4);
   31173             :   }
   31174         659 :   if (obj5) {
   31175           7 :     {
   31176             :       /* %typemap(in) char **dict */
   31177           7 :       arg6 = NULL;
   31178           7 :       if ( PySequence_Check( obj5 ) ) {
   31179           7 :         int bErr = FALSE;
   31180           7 :         arg6 = CSLFromPySequence(obj5, &bErr);
   31181           7 :         if ( bErr )
   31182             :         {
   31183           0 :           SWIG_fail;
   31184             :         }
   31185             :       }
   31186           0 :       else if ( PyMapping_Check( obj5 ) ) {
   31187           0 :         int bErr = FALSE;
   31188           0 :         arg6 = CSLFromPyMapping(obj5, &bErr);
   31189           0 :         if ( bErr )
   31190             :         {
   31191           0 :           SWIG_fail;
   31192             :         }
   31193             :       }
   31194             :       else {
   31195           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31196           0 :         SWIG_fail;
   31197             :       }
   31198             :     }
   31199             :   }
   31200         659 :   {
   31201         659 :     if (!arg2) {
   31202           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31203             :     }
   31204             :   }
   31205         659 :   {
   31206         659 :     const int bLocalUseExceptions = GetUseExceptions();
   31207         659 :     if ( bLocalUseExceptions ) {
   31208         119 :       pushErrorHandler();
   31209             :     }
   31210         659 :     {
   31211         659 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31212         659 :       result = (GDALDimensionHS *)GDALGroupHS_CreateDimension(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6);
   31213         659 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31214             :     }
   31215         659 :     if ( bLocalUseExceptions ) {
   31216         119 :       popErrorHandler();
   31217             :     }
   31218             : #ifndef SED_HACKS
   31219             :     if ( bLocalUseExceptions ) {
   31220             :       CPLErr eclass = CPLGetLastErrorType();
   31221             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31222             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31223             :       }
   31224             :     }
   31225             : #endif
   31226             :   }
   31227         659 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_OWN |  0 );
   31228         659 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31229         659 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   31230         659 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   31231         659 :   {
   31232             :     /* %typemap(freearg) char **dict */
   31233         659 :     CSLDestroy( arg6 );
   31234             :   }
   31235         659 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31236             :   return resultobj;
   31237           0 : fail:
   31238           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31239           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   31240           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   31241           0 :   {
   31242             :     /* %typemap(freearg) char **dict */
   31243           0 :     CSLDestroy( arg6 );
   31244             :   }
   31245             :   return NULL;
   31246             : }
   31247             : 
   31248             : 
   31249         613 : SWIGINTERN PyObject *_wrap_Group_CreateMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31250         613 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31251         613 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31252         613 :   char *arg2 = (char *) 0 ;
   31253         613 :   int arg3 ;
   31254         613 :   GDALDimensionHS **arg4 = (GDALDimensionHS **) 0 ;
   31255         613 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   31256         613 :   char **arg6 = (char **) 0 ;
   31257         613 :   void *argp1 = 0 ;
   31258         613 :   int res1 = 0 ;
   31259         613 :   int res2 ;
   31260         613 :   char *buf2 = 0 ;
   31261         613 :   int alloc2 = 0 ;
   31262         613 :   void *argp5 = 0 ;
   31263         613 :   int res5 = 0 ;
   31264         613 :   PyObject *swig_obj[5] ;
   31265         613 :   GDALMDArrayHS *result = 0 ;
   31266             :   
   31267         613 :   if (!SWIG_Python_UnpackTuple(args, "Group_CreateMDArray", 4, 5, swig_obj)) SWIG_fail;
   31268         613 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31269         613 :   if (!SWIG_IsOK(res1)) {
   31270           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31271             :   }
   31272         613 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31273         613 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31274         613 :   if (!SWIG_IsOK(res2)) {
   31275           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateMDArray" "', argument " "2"" of type '" "char const *""'");
   31276             :   }
   31277         613 :   arg2 = reinterpret_cast< char * >(buf2);
   31278         613 :   {
   31279             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDimensionHS *optional_##GDALDimensionHS)*/
   31280         613 :     if ( !PySequence_Check(swig_obj[2]) ) {
   31281           1 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   31282           1 :       SWIG_fail;
   31283             :     }
   31284         612 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   31285         612 :     if( size > (Py_ssize_t)INT_MAX ) {
   31286           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   31287           0 :       SWIG_fail;
   31288             :     }
   31289         612 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDimensionHS*) ) {
   31290           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   31291           0 :       SWIG_fail;
   31292             :     }
   31293         612 :     arg3 = (int)size;
   31294         612 :     arg4 = (GDALDimensionHS**) VSIMalloc(arg3*sizeof(GDALDimensionHS*));
   31295         612 :     if( !arg4) {
   31296           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   31297           0 :       SWIG_fail;
   31298             :     }
   31299             :     
   31300        1435 :     for( int i = 0; i<arg3; i++ ) {
   31301         825 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   31302         825 :       GDALDimensionHS* rawobjectpointer = NULL;
   31303         825 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_EXCEPTION | 0 ));
   31304         825 :       if (!rawobjectpointer) {
   31305           2 :         Py_DECREF(o);
   31306           2 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDimensionHS");
   31307           2 :         SWIG_fail;
   31308             :       }
   31309         823 :       arg4[i] = rawobjectpointer;
   31310         823 :       Py_DECREF(o);
   31311             :       
   31312             :     }
   31313             :   }
   31314         610 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   31315         610 :   if (!SWIG_IsOK(res5)) {
   31316           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Group_CreateMDArray" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   31317             :   }
   31318         610 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   31319         610 :   if (swig_obj[4]) {
   31320         134 :     {
   31321             :       /* %typemap(in) char **dict */
   31322         134 :       arg6 = NULL;
   31323         134 :       if ( PySequence_Check( swig_obj[4] ) ) {
   31324         134 :         int bErr = FALSE;
   31325         134 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   31326         134 :         if ( bErr )
   31327             :         {
   31328           0 :           SWIG_fail;
   31329             :         }
   31330             :       }
   31331           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   31332           0 :         int bErr = FALSE;
   31333           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   31334           0 :         if ( bErr )
   31335             :         {
   31336           0 :           SWIG_fail;
   31337             :         }
   31338             :       }
   31339             :       else {
   31340           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31341           0 :         SWIG_fail;
   31342             :       }
   31343             :     }
   31344             :   }
   31345         610 :   {
   31346         610 :     if (!arg2) {
   31347           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31348             :     }
   31349             :   }
   31350         609 :   {
   31351         609 :     if (!arg5) {
   31352           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31353             :     }
   31354             :   }
   31355         608 :   {
   31356         608 :     const int bLocalUseExceptions = GetUseExceptions();
   31357         608 :     if ( bLocalUseExceptions ) {
   31358         163 :       pushErrorHandler();
   31359             :     }
   31360         608 :     {
   31361         608 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31362         608 :       result = (GDALMDArrayHS *)GDALGroupHS_CreateMDArray(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   31363         608 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31364             :     }
   31365         608 :     if ( bLocalUseExceptions ) {
   31366         163 :       popErrorHandler();
   31367             :     }
   31368             : #ifndef SED_HACKS
   31369             :     if ( bLocalUseExceptions ) {
   31370             :       CPLErr eclass = CPLGetLastErrorType();
   31371             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31372             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31373             :       }
   31374             :     }
   31375             : #endif
   31376             :   }
   31377         608 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   31378         608 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31379         608 :   {
   31380             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjects)*/
   31381         608 :     CPLFree( arg4 );
   31382             :   }
   31383         608 :   {
   31384             :     /* %typemap(freearg) char **dict */
   31385         608 :     CSLDestroy( arg6 );
   31386             :   }
   31387         625 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31388             :   return resultobj;
   31389           5 : fail:
   31390           5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31391           5 :   {
   31392             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjects)*/
   31393           5 :     CPLFree( arg4 );
   31394             :   }
   31395           5 :   {
   31396             :     /* %typemap(freearg) char **dict */
   31397           5 :     CSLDestroy( arg6 );
   31398             :   }
   31399             :   return NULL;
   31400             : }
   31401             : 
   31402             : 
   31403          20 : SWIGINTERN PyObject *_wrap_Group_DeleteMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31404          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31405          20 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31406          20 :   char *arg2 = (char *) 0 ;
   31407          20 :   char **arg3 = (char **) 0 ;
   31408          20 :   void *argp1 = 0 ;
   31409          20 :   int res1 = 0 ;
   31410          20 :   int res2 ;
   31411          20 :   char *buf2 = 0 ;
   31412          20 :   int alloc2 = 0 ;
   31413          20 :   PyObject *swig_obj[3] ;
   31414          20 :   CPLErr result;
   31415             :   
   31416          20 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteMDArray", 2, 3, swig_obj)) SWIG_fail;
   31417          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31418          20 :   if (!SWIG_IsOK(res1)) {
   31419           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31420             :   }
   31421          20 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31422          20 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31423          20 :   if (!SWIG_IsOK(res2)) {
   31424           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteMDArray" "', argument " "2"" of type '" "char const *""'");
   31425             :   }
   31426          20 :   arg2 = reinterpret_cast< char * >(buf2);
   31427          20 :   if (swig_obj[2]) {
   31428           0 :     {
   31429             :       /* %typemap(in) char **dict */
   31430           0 :       arg3 = NULL;
   31431           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   31432           0 :         int bErr = FALSE;
   31433           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   31434           0 :         if ( bErr )
   31435             :         {
   31436           0 :           SWIG_fail;
   31437             :         }
   31438             :       }
   31439           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   31440           0 :         int bErr = FALSE;
   31441           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   31442           0 :         if ( bErr )
   31443             :         {
   31444           0 :           SWIG_fail;
   31445             :         }
   31446             :       }
   31447             :       else {
   31448           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31449           0 :         SWIG_fail;
   31450             :       }
   31451             :     }
   31452             :   }
   31453          20 :   {
   31454          20 :     if (!arg2) {
   31455           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31456             :     }
   31457             :   }
   31458          20 :   {
   31459          20 :     const int bLocalUseExceptions = GetUseExceptions();
   31460          20 :     if ( bLocalUseExceptions ) {
   31461          20 :       pushErrorHandler();
   31462             :     }
   31463          20 :     {
   31464          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31465          20 :       result = (CPLErr)GDALGroupHS_DeleteMDArray(arg1,(char const *)arg2,arg3);
   31466          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31467             :     }
   31468          20 :     if ( bLocalUseExceptions ) {
   31469          20 :       popErrorHandler();
   31470             :     }
   31471             : #ifndef SED_HACKS
   31472             :     if ( bLocalUseExceptions ) {
   31473             :       CPLErr eclass = CPLGetLastErrorType();
   31474             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31475             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31476             :       }
   31477             :     }
   31478             : #endif
   31479             :   }
   31480          20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31481          20 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31482          20 :   {
   31483             :     /* %typemap(freearg) char **dict */
   31484          20 :     CSLDestroy( arg3 );
   31485             :   }
   31486          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; } }
   31487             :   return resultobj;
   31488           0 : fail:
   31489           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31490           0 :   {
   31491             :     /* %typemap(freearg) char **dict */
   31492           0 :     CSLDestroy( arg3 );
   31493             :   }
   31494             :   return NULL;
   31495             : }
   31496             : 
   31497             : 
   31498         126 : SWIGINTERN PyObject *_wrap_Group_CreateAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31499         126 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31500         126 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31501         126 :   char *arg2 = (char *) 0 ;
   31502         126 :   int arg3 ;
   31503         126 :   GUIntBig *arg4 = (GUIntBig *) 0 ;
   31504         126 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   31505         126 :   char **arg6 = (char **) 0 ;
   31506         126 :   void *argp1 = 0 ;
   31507         126 :   int res1 = 0 ;
   31508         126 :   int res2 ;
   31509         126 :   char *buf2 = 0 ;
   31510         126 :   int alloc2 = 0 ;
   31511         126 :   void *argp5 = 0 ;
   31512         126 :   int res5 = 0 ;
   31513         126 :   PyObject *swig_obj[5] ;
   31514         126 :   GDALAttributeHS *result = 0 ;
   31515             :   
   31516         126 :   if (!SWIG_Python_UnpackTuple(args, "Group_CreateAttribute", 4, 5, swig_obj)) SWIG_fail;
   31517         126 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31518         126 :   if (!SWIG_IsOK(res1)) {
   31519           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31520             :   }
   31521         126 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31522         126 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31523         126 :   if (!SWIG_IsOK(res2)) {
   31524           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateAttribute" "', argument " "2"" of type '" "char const *""'");
   31525             :   }
   31526         126 :   arg2 = reinterpret_cast< char * >(buf2);
   31527         126 :   {
   31528             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   31529         126 :     arg4 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg3);
   31530         126 :     if( arg3 < 0 ) {
   31531           0 :       SWIG_fail;
   31532             :     }
   31533             :   }
   31534         126 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   31535         126 :   if (!SWIG_IsOK(res5)) {
   31536           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Group_CreateAttribute" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   31537             :   }
   31538         126 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   31539         126 :   if (swig_obj[4]) {
   31540           6 :     {
   31541             :       /* %typemap(in) char **dict */
   31542           6 :       arg6 = NULL;
   31543           6 :       if ( PySequence_Check( swig_obj[4] ) ) {
   31544           6 :         int bErr = FALSE;
   31545           6 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   31546           6 :         if ( bErr )
   31547             :         {
   31548           0 :           SWIG_fail;
   31549             :         }
   31550             :       }
   31551           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   31552           0 :         int bErr = FALSE;
   31553           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   31554           0 :         if ( bErr )
   31555             :         {
   31556           0 :           SWIG_fail;
   31557             :         }
   31558             :       }
   31559             :       else {
   31560           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31561           0 :         SWIG_fail;
   31562             :       }
   31563             :     }
   31564             :   }
   31565         126 :   {
   31566         126 :     if (!arg2) {
   31567           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31568             :     }
   31569             :   }
   31570         125 :   {
   31571         125 :     if (!arg5) {
   31572           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31573             :     }
   31574             :   }
   31575         125 :   {
   31576         125 :     const int bLocalUseExceptions = GetUseExceptions();
   31577         125 :     if ( bLocalUseExceptions ) {
   31578          53 :       pushErrorHandler();
   31579             :     }
   31580         125 :     {
   31581         125 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31582         125 :       result = (GDALAttributeHS *)GDALGroupHS_CreateAttribute(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   31583         125 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31584             :     }
   31585         125 :     if ( bLocalUseExceptions ) {
   31586          53 :       popErrorHandler();
   31587             :     }
   31588             : #ifndef SED_HACKS
   31589             :     if ( bLocalUseExceptions ) {
   31590             :       CPLErr eclass = CPLGetLastErrorType();
   31591             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31592             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31593             :       }
   31594             :     }
   31595             : #endif
   31596             :   }
   31597         125 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   31598         125 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31599         125 :   {
   31600             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   31601         125 :     free(arg4);
   31602             :   }
   31603         125 :   {
   31604             :     /* %typemap(freearg) char **dict */
   31605         125 :     CSLDestroy( arg6 );
   31606             :   }
   31607         128 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31608             :   return resultobj;
   31609           1 : fail:
   31610           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31611           1 :   {
   31612             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   31613           1 :     free(arg4);
   31614             :   }
   31615           1 :   {
   31616             :     /* %typemap(freearg) char **dict */
   31617           1 :     CSLDestroy( arg6 );
   31618             :   }
   31619             :   return NULL;
   31620             : }
   31621             : 
   31622             : 
   31623          25 : SWIGINTERN PyObject *_wrap_Group_DeleteAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31624          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31625          25 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31626          25 :   char *arg2 = (char *) 0 ;
   31627          25 :   char **arg3 = (char **) 0 ;
   31628          25 :   void *argp1 = 0 ;
   31629          25 :   int res1 = 0 ;
   31630          25 :   int res2 ;
   31631          25 :   char *buf2 = 0 ;
   31632          25 :   int alloc2 = 0 ;
   31633          25 :   PyObject *swig_obj[3] ;
   31634          25 :   CPLErr result;
   31635             :   
   31636          25 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteAttribute", 2, 3, swig_obj)) SWIG_fail;
   31637          25 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31638          25 :   if (!SWIG_IsOK(res1)) {
   31639           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31640             :   }
   31641          25 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31642          25 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31643          25 :   if (!SWIG_IsOK(res2)) {
   31644           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteAttribute" "', argument " "2"" of type '" "char const *""'");
   31645             :   }
   31646          25 :   arg2 = reinterpret_cast< char * >(buf2);
   31647          25 :   if (swig_obj[2]) {
   31648           0 :     {
   31649             :       /* %typemap(in) char **dict */
   31650           0 :       arg3 = NULL;
   31651           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   31652           0 :         int bErr = FALSE;
   31653           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   31654           0 :         if ( bErr )
   31655             :         {
   31656           0 :           SWIG_fail;
   31657             :         }
   31658             :       }
   31659           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   31660           0 :         int bErr = FALSE;
   31661           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   31662           0 :         if ( bErr )
   31663             :         {
   31664           0 :           SWIG_fail;
   31665             :         }
   31666             :       }
   31667             :       else {
   31668           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31669           0 :         SWIG_fail;
   31670             :       }
   31671             :     }
   31672             :   }
   31673          25 :   {
   31674          25 :     if (!arg2) {
   31675           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31676             :     }
   31677             :   }
   31678          25 :   {
   31679          25 :     const int bLocalUseExceptions = GetUseExceptions();
   31680          25 :     if ( bLocalUseExceptions ) {
   31681          25 :       pushErrorHandler();
   31682             :     }
   31683          25 :     {
   31684          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31685          25 :       result = (CPLErr)GDALGroupHS_DeleteAttribute(arg1,(char const *)arg2,arg3);
   31686          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31687             :     }
   31688          25 :     if ( bLocalUseExceptions ) {
   31689          25 :       popErrorHandler();
   31690             :     }
   31691             : #ifndef SED_HACKS
   31692             :     if ( bLocalUseExceptions ) {
   31693             :       CPLErr eclass = CPLGetLastErrorType();
   31694             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31695             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31696             :       }
   31697             :     }
   31698             : #endif
   31699             :   }
   31700          25 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31701          25 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31702          25 :   {
   31703             :     /* %typemap(freearg) char **dict */
   31704          25 :     CSLDestroy( arg3 );
   31705             :   }
   31706          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; } }
   31707             :   return resultobj;
   31708           0 : fail:
   31709           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31710           0 :   {
   31711             :     /* %typemap(freearg) char **dict */
   31712           0 :     CSLDestroy( arg3 );
   31713             :   }
   31714             :   return NULL;
   31715             : }
   31716             : 
   31717             : 
   31718          45 : SWIGINTERN PyObject *_wrap_Group_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31719          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31720          45 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31721          45 :   char *arg2 = (char *) 0 ;
   31722          45 :   void *argp1 = 0 ;
   31723          45 :   int res1 = 0 ;
   31724          45 :   int res2 ;
   31725          45 :   char *buf2 = 0 ;
   31726          45 :   int alloc2 = 0 ;
   31727          45 :   PyObject *swig_obj[2] ;
   31728          45 :   CPLErr result;
   31729             :   
   31730          45 :   if (!SWIG_Python_UnpackTuple(args, "Group_Rename", 2, 2, swig_obj)) SWIG_fail;
   31731          45 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31732          45 :   if (!SWIG_IsOK(res1)) {
   31733           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_Rename" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31734             :   }
   31735          45 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31736          45 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31737          45 :   if (!SWIG_IsOK(res2)) {
   31738           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_Rename" "', argument " "2"" of type '" "char const *""'");
   31739             :   }
   31740          45 :   arg2 = reinterpret_cast< char * >(buf2);
   31741          45 :   {
   31742          45 :     const int bLocalUseExceptions = GetUseExceptions();
   31743          45 :     if ( bLocalUseExceptions ) {
   31744          45 :       pushErrorHandler();
   31745             :     }
   31746          45 :     {
   31747          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31748          45 :       result = (CPLErr)GDALGroupHS_Rename(arg1,(char const *)arg2);
   31749          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31750             :     }
   31751          45 :     if ( bLocalUseExceptions ) {
   31752          45 :       popErrorHandler();
   31753             :     }
   31754             : #ifndef SED_HACKS
   31755             :     if ( bLocalUseExceptions ) {
   31756             :       CPLErr eclass = CPLGetLastErrorType();
   31757             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31758             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31759             :       }
   31760             :     }
   31761             : #endif
   31762             :   }
   31763          45 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31764          45 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31765         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; } }
   31766             :   return resultobj;
   31767           0 : fail:
   31768           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31769             :   return NULL;
   31770             : }
   31771             : 
   31772             : 
   31773          14 : SWIGINTERN PyObject *_wrap_Group_SubsetDimensionFromSelection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31774          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31775          14 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31776          14 :   char *arg2 = (char *) 0 ;
   31777          14 :   char **arg3 = (char **) 0 ;
   31778          14 :   void *argp1 = 0 ;
   31779          14 :   int res1 = 0 ;
   31780          14 :   int res2 ;
   31781          14 :   char *buf2 = 0 ;
   31782          14 :   int alloc2 = 0 ;
   31783          14 :   PyObject *swig_obj[3] ;
   31784          14 :   GDALGroupHS *result = 0 ;
   31785             :   
   31786          14 :   if (!SWIG_Python_UnpackTuple(args, "Group_SubsetDimensionFromSelection", 2, 3, swig_obj)) SWIG_fail;
   31787          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31788          14 :   if (!SWIG_IsOK(res1)) {
   31789           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_SubsetDimensionFromSelection" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31790             :   }
   31791          14 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31792          14 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31793          14 :   if (!SWIG_IsOK(res2)) {
   31794           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_SubsetDimensionFromSelection" "', argument " "2"" of type '" "char const *""'");
   31795             :   }
   31796          14 :   arg2 = reinterpret_cast< char * >(buf2);
   31797          14 :   if (swig_obj[2]) {
   31798           0 :     {
   31799             :       /* %typemap(in) char **dict */
   31800           0 :       arg3 = NULL;
   31801           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   31802           0 :         int bErr = FALSE;
   31803           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   31804           0 :         if ( bErr )
   31805             :         {
   31806           0 :           SWIG_fail;
   31807             :         }
   31808             :       }
   31809           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   31810           0 :         int bErr = FALSE;
   31811           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   31812           0 :         if ( bErr )
   31813             :         {
   31814           0 :           SWIG_fail;
   31815             :         }
   31816             :       }
   31817             :       else {
   31818           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31819           0 :         SWIG_fail;
   31820             :       }
   31821             :     }
   31822             :   }
   31823          14 :   {
   31824          14 :     const int bLocalUseExceptions = GetUseExceptions();
   31825          14 :     if ( bLocalUseExceptions ) {
   31826          13 :       pushErrorHandler();
   31827             :     }
   31828          14 :     {
   31829          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31830          14 :       result = (GDALGroupHS *)GDALGroupHS_SubsetDimensionFromSelection(arg1,(char const *)arg2,arg3);
   31831          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31832             :     }
   31833          14 :     if ( bLocalUseExceptions ) {
   31834          13 :       popErrorHandler();
   31835             :     }
   31836             : #ifndef SED_HACKS
   31837             :     if ( bLocalUseExceptions ) {
   31838             :       CPLErr eclass = CPLGetLastErrorType();
   31839             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31840             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31841             :       }
   31842             :     }
   31843             : #endif
   31844             :   }
   31845          14 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   31846          14 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31847          14 :   {
   31848             :     /* %typemap(freearg) char **dict */
   31849          14 :     CSLDestroy( arg3 );
   31850             :   }
   31851          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; } }
   31852             :   return resultobj;
   31853           0 : fail:
   31854           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31855           0 :   {
   31856             :     /* %typemap(freearg) char **dict */
   31857           0 :     CSLDestroy( arg3 );
   31858             :   }
   31859             :   return NULL;
   31860             : }
   31861             : 
   31862             : 
   31863           2 : SWIGINTERN PyObject *_wrap_Group_GetDataTypeCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31864           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31865           2 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31866           2 :   void *argp1 = 0 ;
   31867           2 :   int res1 = 0 ;
   31868           2 :   PyObject *swig_obj[1] ;
   31869           2 :   size_t result;
   31870             :   
   31871           2 :   if (!args) SWIG_fail;
   31872           2 :   swig_obj[0] = args;
   31873           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31874           2 :   if (!SWIG_IsOK(res1)) {
   31875           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDataTypeCount" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31876             :   }
   31877           2 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31878           2 :   {
   31879           2 :     const int bLocalUseExceptions = GetUseExceptions();
   31880           2 :     if ( bLocalUseExceptions ) {
   31881           2 :       pushErrorHandler();
   31882             :     }
   31883           2 :     {
   31884           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31885           2 :       result = GDALGroupHS_GetDataTypeCount(arg1);
   31886           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31887             :     }
   31888           2 :     if ( bLocalUseExceptions ) {
   31889           2 :       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           2 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   31901           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; } }
   31902             :   return resultobj;
   31903             : fail:
   31904             :   return NULL;
   31905             : }
   31906             : 
   31907             : 
   31908           2 : SWIGINTERN PyObject *_wrap_Group_GetDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31909           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31910           2 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31911           2 :   size_t arg2 ;
   31912           2 :   void *argp1 = 0 ;
   31913           2 :   int res1 = 0 ;
   31914           2 :   size_t val2 ;
   31915           2 :   int ecode2 = 0 ;
   31916           2 :   PyObject *swig_obj[2] ;
   31917           2 :   GDALExtendedDataTypeHS *result = 0 ;
   31918             :   
   31919           2 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetDataType", 2, 2, swig_obj)) SWIG_fail;
   31920           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31921           2 :   if (!SWIG_IsOK(res1)) {
   31922           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDataType" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31923             :   }
   31924           2 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31925           2 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   31926           2 :   if (!SWIG_IsOK(ecode2)) {
   31927           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Group_GetDataType" "', argument " "2"" of type '" "size_t""'");
   31928             :   } 
   31929           2 :   arg2 = static_cast< size_t >(val2);
   31930           2 :   {
   31931           2 :     const int bLocalUseExceptions = GetUseExceptions();
   31932           2 :     if ( bLocalUseExceptions ) {
   31933           2 :       pushErrorHandler();
   31934             :     }
   31935           2 :     {
   31936           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31937           2 :       result = (GDALExtendedDataTypeHS *)GDALGroupHS_GetDataType(arg1,arg2);
   31938           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31939             :     }
   31940           2 :     if ( bLocalUseExceptions ) {
   31941           2 :       popErrorHandler();
   31942             :     }
   31943             : #ifndef SED_HACKS
   31944             :     if ( bLocalUseExceptions ) {
   31945             :       CPLErr eclass = CPLGetLastErrorType();
   31946             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31947             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31948             :       }
   31949             :     }
   31950             : #endif
   31951             :   }
   31952           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   31953           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; } }
   31954             :   return resultobj;
   31955             : fail:
   31956             :   return NULL;
   31957             : }
   31958             : 
   31959             : 
   31960         277 : SWIGINTERN PyObject *Group_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31961         277 :   PyObject *obj;
   31962         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   31963         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALGroupHS, SWIG_NewClientData(obj));
   31964         277 :   return SWIG_Py_Void();
   31965             : }
   31966             : 
   31967          12 : SWIGINTERN PyObject *_wrap_Statistics_min_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31968          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31969          12 :   Statistics *arg1 = (Statistics *) 0 ;
   31970          12 :   void *argp1 = 0 ;
   31971          12 :   int res1 = 0 ;
   31972          12 :   PyObject *swig_obj[1] ;
   31973          12 :   double result;
   31974             :   
   31975          12 :   if (!args) SWIG_fail;
   31976          12 :   swig_obj[0] = args;
   31977          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   31978          12 :   if (!SWIG_IsOK(res1)) {
   31979           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_min_get" "', argument " "1"" of type '" "Statistics *""'"); 
   31980             :   }
   31981          12 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   31982          12 :   {
   31983          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31984          12 :     result = (double) ((arg1)->min);
   31985          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   31986             :   }
   31987          12 :   resultobj = SWIG_From_double(static_cast< double >(result));
   31988          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; } }
   31989             :   return resultobj;
   31990             : fail:
   31991             :   return NULL;
   31992             : }
   31993             : 
   31994             : 
   31995          12 : SWIGINTERN PyObject *_wrap_Statistics_max_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31996          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31997          12 :   Statistics *arg1 = (Statistics *) 0 ;
   31998          12 :   void *argp1 = 0 ;
   31999          12 :   int res1 = 0 ;
   32000          12 :   PyObject *swig_obj[1] ;
   32001          12 :   double result;
   32002             :   
   32003          12 :   if (!args) SWIG_fail;
   32004          12 :   swig_obj[0] = args;
   32005          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   32006          12 :   if (!SWIG_IsOK(res1)) {
   32007           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_max_get" "', argument " "1"" of type '" "Statistics *""'"); 
   32008             :   }
   32009          12 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   32010          12 :   {
   32011          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32012          12 :     result = (double) ((arg1)->max);
   32013          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   32014             :   }
   32015          12 :   resultobj = SWIG_From_double(static_cast< double >(result));
   32016          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; } }
   32017             :   return resultobj;
   32018             : fail:
   32019             :   return NULL;
   32020             : }
   32021             : 
   32022             : 
   32023           5 : SWIGINTERN PyObject *_wrap_Statistics_mean_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32024           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32025           5 :   Statistics *arg1 = (Statistics *) 0 ;
   32026           5 :   void *argp1 = 0 ;
   32027           5 :   int res1 = 0 ;
   32028           5 :   PyObject *swig_obj[1] ;
   32029           5 :   double result;
   32030             :   
   32031           5 :   if (!args) SWIG_fail;
   32032           5 :   swig_obj[0] = args;
   32033           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   32034           5 :   if (!SWIG_IsOK(res1)) {
   32035           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_mean_get" "', argument " "1"" of type '" "Statistics *""'"); 
   32036             :   }
   32037           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   32038           5 :   {
   32039           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32040           5 :     result = (double) ((arg1)->mean);
   32041           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   32042             :   }
   32043           5 :   resultobj = SWIG_From_double(static_cast< double >(result));
   32044           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; } }
   32045             :   return resultobj;
   32046             : fail:
   32047             :   return NULL;
   32048             : }
   32049             : 
   32050             : 
   32051           5 : SWIGINTERN PyObject *_wrap_Statistics_std_dev_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32052           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32053           5 :   Statistics *arg1 = (Statistics *) 0 ;
   32054           5 :   void *argp1 = 0 ;
   32055           5 :   int res1 = 0 ;
   32056           5 :   PyObject *swig_obj[1] ;
   32057           5 :   double result;
   32058             :   
   32059           5 :   if (!args) SWIG_fail;
   32060           5 :   swig_obj[0] = args;
   32061           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   32062           5 :   if (!SWIG_IsOK(res1)) {
   32063           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_std_dev_get" "', argument " "1"" of type '" "Statistics *""'"); 
   32064             :   }
   32065           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   32066           5 :   {
   32067           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32068           5 :     result = (double) ((arg1)->std_dev);
   32069           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   32070             :   }
   32071           5 :   resultobj = SWIG_From_double(static_cast< double >(result));
   32072           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; } }
   32073             :   return resultobj;
   32074             : fail:
   32075             :   return NULL;
   32076             : }
   32077             : 
   32078             : 
   32079           5 : SWIGINTERN PyObject *_wrap_Statistics_valid_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32080           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32081           5 :   Statistics *arg1 = (Statistics *) 0 ;
   32082           5 :   void *argp1 = 0 ;
   32083           5 :   int res1 = 0 ;
   32084           5 :   PyObject *swig_obj[1] ;
   32085           5 :   GIntBig result;
   32086             :   
   32087           5 :   if (!args) SWIG_fail;
   32088           5 :   swig_obj[0] = args;
   32089           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   32090           5 :   if (!SWIG_IsOK(res1)) {
   32091           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_valid_count_get" "', argument " "1"" of type '" "Statistics *""'"); 
   32092             :   }
   32093           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   32094           5 :   {
   32095           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32096           5 :     result =  ((arg1)->valid_count);
   32097           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   32098             :   }
   32099           5 :   {
   32100           5 :     resultobj = PyLong_FromLongLong(result);
   32101             :   }
   32102           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; } }
   32103             :   return resultobj;
   32104             : fail:
   32105             :   return NULL;
   32106             : }
   32107             : 
   32108             : 
   32109           0 : SWIGINTERN PyObject *_wrap_delete_Statistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32110           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32111           0 :   Statistics *arg1 = (Statistics *) 0 ;
   32112           0 :   void *argp1 = 0 ;
   32113           0 :   int res1 = 0 ;
   32114           0 :   PyObject *swig_obj[1] ;
   32115             :   
   32116           0 :   if (!args) SWIG_fail;
   32117           0 :   swig_obj[0] = args;
   32118           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, SWIG_POINTER_DISOWN |  0 );
   32119           0 :   if (!SWIG_IsOK(res1)) {
   32120           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Statistics" "', argument " "1"" of type '" "Statistics *""'"); 
   32121             :   }
   32122           0 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   32123           0 :   {
   32124           0 :     const int bLocalUseExceptions = GetUseExceptions();
   32125           0 :     if ( bLocalUseExceptions ) {
   32126           0 :       pushErrorHandler();
   32127             :     }
   32128           0 :     {
   32129           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32130           0 :       delete_Statistics(arg1);
   32131           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32132             :     }
   32133           0 :     if ( bLocalUseExceptions ) {
   32134           0 :       popErrorHandler();
   32135             :     }
   32136             : #ifndef SED_HACKS
   32137             :     if ( bLocalUseExceptions ) {
   32138             :       CPLErr eclass = CPLGetLastErrorType();
   32139             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32140             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32141             :       }
   32142             :     }
   32143             : #endif
   32144             :   }
   32145           0 :   resultobj = SWIG_Py_Void();
   32146           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; } }
   32147             :   return resultobj;
   32148             : fail:
   32149             :   return NULL;
   32150             : }
   32151             : 
   32152             : 
   32153           0 : SWIGINTERN PyObject *_wrap_new_Statistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32154           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32155           0 :   Statistics *result = 0 ;
   32156             :   
   32157           0 :   if (!SWIG_Python_UnpackTuple(args, "new_Statistics", 0, 0, 0)) SWIG_fail;
   32158           0 :   {
   32159           0 :     const int bLocalUseExceptions = GetUseExceptions();
   32160           0 :     if ( bLocalUseExceptions ) {
   32161           0 :       pushErrorHandler();
   32162             :     }
   32163           0 :     {
   32164           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32165           0 :       result = (Statistics *)new Statistics();
   32166           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32167             :     }
   32168           0 :     if ( bLocalUseExceptions ) {
   32169           0 :       popErrorHandler();
   32170             :     }
   32171             : #ifndef SED_HACKS
   32172             :     if ( bLocalUseExceptions ) {
   32173             :       CPLErr eclass = CPLGetLastErrorType();
   32174             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32175             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32176             :       }
   32177             :     }
   32178             : #endif
   32179             :   }
   32180           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, SWIG_POINTER_NEW |  0 );
   32181           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; } }
   32182             :   return resultobj;
   32183           0 : fail:
   32184           0 :   return NULL;
   32185             : }
   32186             : 
   32187             : 
   32188         277 : SWIGINTERN PyObject *Statistics_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32189         277 :   PyObject *obj;
   32190         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   32191         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_Statistics, SWIG_NewClientData(obj));
   32192         277 :   return SWIG_Py_Void();
   32193             : }
   32194             : 
   32195           0 : SWIGINTERN PyObject *Statistics_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32196           0 :   return SWIG_Python_InitShadowInstance(args);
   32197             : }
   32198             : 
   32199        2024 : SWIGINTERN PyObject *_wrap_delete_MDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32200        2024 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32201        2024 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32202        2024 :   void *argp1 = 0 ;
   32203        2024 :   int res1 = 0 ;
   32204        2024 :   PyObject *swig_obj[1] ;
   32205             :   
   32206        2024 :   if (!args) SWIG_fail;
   32207        2024 :   swig_obj[0] = args;
   32208        2024 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_DISOWN |  0 );
   32209        2024 :   if (!SWIG_IsOK(res1)) {
   32210           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MDArray" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32211             :   }
   32212        2024 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32213        2024 :   {
   32214        2024 :     const int bLocalUseExceptions = GetUseExceptions();
   32215        2024 :     if ( bLocalUseExceptions ) {
   32216         445 :       pushErrorHandler();
   32217             :     }
   32218        2024 :     {
   32219        2024 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32220        2024 :       delete_GDALMDArrayHS(arg1);
   32221        2024 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32222             :     }
   32223        2024 :     if ( bLocalUseExceptions ) {
   32224         445 :       popErrorHandler();
   32225             :     }
   32226             : #ifndef SED_HACKS
   32227             :     if ( bLocalUseExceptions ) {
   32228             :       CPLErr eclass = CPLGetLastErrorType();
   32229             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32230             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32231             :       }
   32232             :     }
   32233             : #endif
   32234             :   }
   32235        2024 :   resultobj = SWIG_Py_Void();
   32236        2024 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32237             :   return resultobj;
   32238             : fail:
   32239             :   return NULL;
   32240             : }
   32241             : 
   32242             : 
   32243          83 : SWIGINTERN PyObject *_wrap_MDArray_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32244          83 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32245          83 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32246          83 :   void *argp1 = 0 ;
   32247          83 :   int res1 = 0 ;
   32248          83 :   PyObject *swig_obj[1] ;
   32249          83 :   char *result = 0 ;
   32250             :   
   32251          83 :   if (!args) SWIG_fail;
   32252          83 :   swig_obj[0] = args;
   32253          83 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32254          83 :   if (!SWIG_IsOK(res1)) {
   32255           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetName" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32256             :   }
   32257          83 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32258          83 :   {
   32259          83 :     const int bLocalUseExceptions = GetUseExceptions();
   32260          83 :     if ( bLocalUseExceptions ) {
   32261          27 :       pushErrorHandler();
   32262             :     }
   32263          83 :     {
   32264          83 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32265          83 :       result = (char *)GDALMDArrayHS_GetName(arg1);
   32266          83 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32267             :     }
   32268          83 :     if ( bLocalUseExceptions ) {
   32269          27 :       popErrorHandler();
   32270             :     }
   32271             : #ifndef SED_HACKS
   32272             :     if ( bLocalUseExceptions ) {
   32273             :       CPLErr eclass = CPLGetLastErrorType();
   32274             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32275             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32276             :       }
   32277             :     }
   32278             : #endif
   32279             :   }
   32280          83 :   resultobj = SWIG_FromCharPtr((const char *)result);
   32281          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; } }
   32282             :   return resultobj;
   32283             : fail:
   32284             :   return NULL;
   32285             : }
   32286             : 
   32287             : 
   32288          50 : SWIGINTERN PyObject *_wrap_MDArray_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32289          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32290          50 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32291          50 :   void *argp1 = 0 ;
   32292          50 :   int res1 = 0 ;
   32293          50 :   PyObject *swig_obj[1] ;
   32294          50 :   char *result = 0 ;
   32295             :   
   32296          50 :   if (!args) SWIG_fail;
   32297          50 :   swig_obj[0] = args;
   32298          50 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32299          50 :   if (!SWIG_IsOK(res1)) {
   32300           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetFullName" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32301             :   }
   32302          50 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32303          50 :   {
   32304          50 :     const int bLocalUseExceptions = GetUseExceptions();
   32305          50 :     if ( bLocalUseExceptions ) {
   32306          27 :       pushErrorHandler();
   32307             :     }
   32308          50 :     {
   32309          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32310          50 :       result = (char *)GDALMDArrayHS_GetFullName(arg1);
   32311          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32312             :     }
   32313          50 :     if ( bLocalUseExceptions ) {
   32314          27 :       popErrorHandler();
   32315             :     }
   32316             : #ifndef SED_HACKS
   32317             :     if ( bLocalUseExceptions ) {
   32318             :       CPLErr eclass = CPLGetLastErrorType();
   32319             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32320             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32321             :       }
   32322             :     }
   32323             : #endif
   32324             :   }
   32325          50 :   resultobj = SWIG_FromCharPtr((const char *)result);
   32326          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; } }
   32327             :   return resultobj;
   32328             : fail:
   32329             :   return NULL;
   32330             : }
   32331             : 
   32332             : 
   32333           6 : SWIGINTERN PyObject *_wrap_MDArray_GetTotalElementsCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32334           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32335           6 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32336           6 :   void *argp1 = 0 ;
   32337           6 :   int res1 = 0 ;
   32338           6 :   PyObject *swig_obj[1] ;
   32339           6 :   GUIntBig result;
   32340             :   
   32341           6 :   if (!args) SWIG_fail;
   32342           6 :   swig_obj[0] = args;
   32343           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32344           6 :   if (!SWIG_IsOK(res1)) {
   32345           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetTotalElementsCount" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32346             :   }
   32347           6 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32348           6 :   {
   32349           6 :     const int bLocalUseExceptions = GetUseExceptions();
   32350           6 :     if ( bLocalUseExceptions ) {
   32351           0 :       pushErrorHandler();
   32352             :     }
   32353           6 :     {
   32354           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32355           6 :       result = GDALMDArrayHS_GetTotalElementsCount(arg1);
   32356           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32357             :     }
   32358           6 :     if ( bLocalUseExceptions ) {
   32359           0 :       popErrorHandler();
   32360             :     }
   32361             : #ifndef SED_HACKS
   32362             :     if ( bLocalUseExceptions ) {
   32363             :       CPLErr eclass = CPLGetLastErrorType();
   32364             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32365             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32366             :       }
   32367             :     }
   32368             : #endif
   32369             :   }
   32370           6 :   {
   32371           6 :     resultobj = PyLong_FromUnsignedLongLong(result);
   32372             :   }
   32373           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; } }
   32374             :   return resultobj;
   32375             : fail:
   32376             :   return NULL;
   32377             : }
   32378             : 
   32379             : 
   32380        3514 : SWIGINTERN PyObject *_wrap_MDArray_GetDimensionCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32381        3514 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32382        3514 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32383        3514 :   void *argp1 = 0 ;
   32384        3514 :   int res1 = 0 ;
   32385        3514 :   PyObject *swig_obj[1] ;
   32386        3514 :   size_t result;
   32387             :   
   32388        3514 :   if (!args) SWIG_fail;
   32389        3514 :   swig_obj[0] = args;
   32390        3514 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32391        3514 :   if (!SWIG_IsOK(res1)) {
   32392           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDimensionCount" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32393             :   }
   32394        3514 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32395        3514 :   {
   32396        3514 :     const int bLocalUseExceptions = GetUseExceptions();
   32397        3514 :     if ( bLocalUseExceptions ) {
   32398         485 :       pushErrorHandler();
   32399             :     }
   32400        3514 :     {
   32401        3514 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32402        3514 :       result = GDALMDArrayHS_GetDimensionCount(arg1);
   32403        3514 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32404             :     }
   32405        3514 :     if ( bLocalUseExceptions ) {
   32406         485 :       popErrorHandler();
   32407             :     }
   32408             : #ifndef SED_HACKS
   32409             :     if ( bLocalUseExceptions ) {
   32410             :       CPLErr eclass = CPLGetLastErrorType();
   32411             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32412             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32413             :       }
   32414             :     }
   32415             : #endif
   32416             :   }
   32417        3514 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   32418        3514 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32419             :   return resultobj;
   32420             : fail:
   32421             :   return NULL;
   32422             : }
   32423             : 
   32424             : 
   32425        2285 : SWIGINTERN PyObject *_wrap_MDArray_GetDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32426        2285 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32427        2285 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32428        2285 :   GDALDimensionHS ***arg2 = (GDALDimensionHS ***) 0 ;
   32429        2285 :   size_t *arg3 = (size_t *) 0 ;
   32430        2285 :   void *argp1 = 0 ;
   32431        2285 :   int res1 = 0 ;
   32432        2285 :   GDALDimensionHS **dims2 = 0 ;
   32433        2285 :   size_t nCount2 = 0 ;
   32434        2285 :   PyObject *swig_obj[1] ;
   32435             :   
   32436        2285 :   {
   32437             :     /* %typemap(in,numinputs=0) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32438        2285 :     arg2 = &dims2;
   32439        2285 :     arg3 = &nCount2;
   32440             :   }
   32441        2285 :   if (!args) SWIG_fail;
   32442        2285 :   swig_obj[0] = args;
   32443        2285 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32444        2285 :   if (!SWIG_IsOK(res1)) {
   32445           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDimensions" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32446             :   }
   32447        2285 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32448        2285 :   {
   32449        2285 :     const int bLocalUseExceptions = GetUseExceptions();
   32450        2285 :     if ( bLocalUseExceptions ) {
   32451         322 :       pushErrorHandler();
   32452             :     }
   32453        2285 :     {
   32454        2285 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32455        2285 :       GDALMDArrayHS_GetDimensions(arg1,arg2,arg3);
   32456        2285 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32457             :     }
   32458        2285 :     if ( bLocalUseExceptions ) {
   32459         322 :       popErrorHandler();
   32460             :     }
   32461             : #ifndef SED_HACKS
   32462             :     if ( bLocalUseExceptions ) {
   32463             :       CPLErr eclass = CPLGetLastErrorType();
   32464             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32465             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32466             :       }
   32467             :     }
   32468             : #endif
   32469             :   }
   32470        2285 :   resultobj = SWIG_Py_Void();
   32471        2285 :   {
   32472             :     /* %typemap(argout) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32473        2285 :     Py_DECREF(resultobj);
   32474        2285 :     resultobj = PyList_New( *arg3 );
   32475        2285 :     if( !resultobj ) {
   32476           0 :       SWIG_fail;
   32477             :     }
   32478        6402 :     for( size_t i = 0; i < *arg3; i++ ) {
   32479        4117 :       PyList_SetItem(resultobj, i,
   32480        4117 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALDimensionHS,SWIG_POINTER_OWN) );
   32481             :       /* We have borrowed the GDALDimensionHS */
   32482        4117 :       (*arg2)[i] = NULL;
   32483             :     }
   32484             :   }
   32485        2285 :   {
   32486             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32487        2285 :     GDALReleaseDimensions(*arg2, *arg3);
   32488             :   }
   32489        2285 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32490             :   return resultobj;
   32491           0 : fail:
   32492           0 :   {
   32493             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32494           0 :     GDALReleaseDimensions(*arg2, *arg3);
   32495             :   }
   32496             :   return NULL;
   32497             : }
   32498             : 
   32499             : 
   32500          13 : SWIGINTERN PyObject *_wrap_MDArray_GetCoordinateVariables(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32501          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32502          13 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32503          13 :   GDALMDArrayHS ***arg2 = (GDALMDArrayHS ***) 0 ;
   32504          13 :   size_t *arg3 = (size_t *) 0 ;
   32505          13 :   void *argp1 = 0 ;
   32506          13 :   int res1 = 0 ;
   32507          13 :   GDALMDArrayHS **arrays2 = 0 ;
   32508          13 :   size_t nCount2 = 0 ;
   32509          13 :   PyObject *swig_obj[1] ;
   32510             :   
   32511          13 :   {
   32512             :     /* %typemap(in,numinputs=0) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32513          13 :     arg2 = &arrays2;
   32514          13 :     arg3 = &nCount2;
   32515             :   }
   32516          13 :   if (!args) SWIG_fail;
   32517          13 :   swig_obj[0] = args;
   32518          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32519          13 :   if (!SWIG_IsOK(res1)) {
   32520           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetCoordinateVariables" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32521             :   }
   32522          13 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32523          13 :   {
   32524          13 :     const int bLocalUseExceptions = GetUseExceptions();
   32525          13 :     if ( bLocalUseExceptions ) {
   32526           3 :       pushErrorHandler();
   32527             :     }
   32528          13 :     {
   32529          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32530          13 :       GDALMDArrayHS_GetCoordinateVariables(arg1,arg2,arg3);
   32531          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32532             :     }
   32533          13 :     if ( bLocalUseExceptions ) {
   32534           3 :       popErrorHandler();
   32535             :     }
   32536             : #ifndef SED_HACKS
   32537             :     if ( bLocalUseExceptions ) {
   32538             :       CPLErr eclass = CPLGetLastErrorType();
   32539             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32540             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32541             :       }
   32542             :     }
   32543             : #endif
   32544             :   }
   32545          13 :   resultobj = SWIG_Py_Void();
   32546          13 :   {
   32547             :     /* %typemap(argout) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32548          13 :     Py_DECREF(resultobj);
   32549          13 :     resultobj = PyList_New( *arg3 );
   32550          13 :     if( !resultobj ) {
   32551           0 :       SWIG_fail;
   32552             :     }
   32553          29 :     for( size_t i = 0; i < *arg3; i++ ) {
   32554          16 :       PyList_SetItem(resultobj, i,
   32555          16 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALMDArrayHS,SWIG_POINTER_OWN) );
   32556             :       /* We have borrowed the GDALMDArrayHS */
   32557          16 :       (*arg2)[i] = NULL;
   32558             :     }
   32559             :   }
   32560          13 :   {
   32561             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32562          13 :     GDALReleaseArrays(*arg2, *arg3);
   32563             :   }
   32564          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; } }
   32565             :   return resultobj;
   32566           0 : fail:
   32567           0 :   {
   32568             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32569           0 :     GDALReleaseArrays(*arg2, *arg3);
   32570             :   }
   32571             :   return NULL;
   32572             : }
   32573             : 
   32574             : 
   32575          93 : SWIGINTERN PyObject *_wrap_MDArray_GetBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32576          93 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32577          93 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32578          93 :   GUIntBig **arg2 = (GUIntBig **) 0 ;
   32579          93 :   size_t *arg3 = (size_t *) 0 ;
   32580          93 :   void *argp1 = 0 ;
   32581          93 :   int res1 = 0 ;
   32582          93 :   GUIntBig *vals2 = 0 ;
   32583          93 :   size_t nCount2 = 0 ;
   32584          93 :   PyObject *swig_obj[1] ;
   32585             :   
   32586          93 :   {
   32587             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   32588          93 :     arg2 = &vals2;
   32589          93 :     arg3 = &nCount2;
   32590             :   }
   32591          93 :   if (!args) SWIG_fail;
   32592          93 :   swig_obj[0] = args;
   32593          93 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32594          93 :   if (!SWIG_IsOK(res1)) {
   32595           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetBlockSize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32596             :   }
   32597          93 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32598          93 :   {
   32599          93 :     const int bLocalUseExceptions = GetUseExceptions();
   32600          93 :     if ( bLocalUseExceptions ) {
   32601           3 :       pushErrorHandler();
   32602             :     }
   32603          93 :     {
   32604          93 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32605          93 :       GDALMDArrayHS_GetBlockSize(arg1,arg2,arg3);
   32606          93 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32607             :     }
   32608          93 :     if ( bLocalUseExceptions ) {
   32609           3 :       popErrorHandler();
   32610             :     }
   32611             : #ifndef SED_HACKS
   32612             :     if ( bLocalUseExceptions ) {
   32613             :       CPLErr eclass = CPLGetLastErrorType();
   32614             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32615             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32616             :       }
   32617             :     }
   32618             : #endif
   32619             :   }
   32620          93 :   resultobj = SWIG_Py_Void();
   32621          93 :   {
   32622             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   32623          93 :     Py_DECREF(resultobj);
   32624          93 :     resultobj = PyList_New( *arg3 );
   32625          93 :     if( !resultobj ) {
   32626           0 :       SWIG_fail;
   32627             :     }
   32628         285 :     for( size_t i = 0; i < *arg3; i++ ) {
   32629         192 :       char szTmp[32];
   32630         192 :       snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg2)[i]);
   32631         192 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   32632         192 :       PyList_SetItem(resultobj, i, o );
   32633             :     }
   32634             :   }
   32635          93 :   {
   32636             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32637          93 :     CPLFree(*arg2);
   32638             :   }
   32639          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; } }
   32640             :   return resultobj;
   32641           0 : fail:
   32642           0 :   {
   32643             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32644           0 :     CPLFree(*arg2);
   32645             :   }
   32646             :   return NULL;
   32647             : }
   32648             : 
   32649             : 
   32650           1 : SWIGINTERN PyObject *_wrap_MDArray_GetProcessingChunkSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32651           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32652           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32653           1 :   size_t arg2 ;
   32654           1 :   GUIntBig **arg3 = (GUIntBig **) 0 ;
   32655           1 :   size_t *arg4 = (size_t *) 0 ;
   32656           1 :   void *argp1 = 0 ;
   32657           1 :   int res1 = 0 ;
   32658           1 :   size_t val2 ;
   32659           1 :   int ecode2 = 0 ;
   32660           1 :   GUIntBig *vals3 = 0 ;
   32661           1 :   size_t nCount3 = 0 ;
   32662           1 :   PyObject *swig_obj[2] ;
   32663             :   
   32664           1 :   {
   32665             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   32666           1 :     arg3 = &vals3;
   32667           1 :     arg4 = &nCount3;
   32668             :   }
   32669           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetProcessingChunkSize", 2, 2, swig_obj)) SWIG_fail;
   32670           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32671           1 :   if (!SWIG_IsOK(res1)) {
   32672           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetProcessingChunkSize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32673             :   }
   32674           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32675           1 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   32676           1 :   if (!SWIG_IsOK(ecode2)) {
   32677           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_GetProcessingChunkSize" "', argument " "2"" of type '" "size_t""'");
   32678             :   } 
   32679           1 :   arg2 = static_cast< size_t >(val2);
   32680           1 :   {
   32681           1 :     const int bLocalUseExceptions = GetUseExceptions();
   32682           1 :     if ( bLocalUseExceptions ) {
   32683           0 :       pushErrorHandler();
   32684             :     }
   32685           1 :     {
   32686           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32687           1 :       GDALMDArrayHS_GetProcessingChunkSize(arg1,arg2,arg3,arg4);
   32688           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32689             :     }
   32690           1 :     if ( bLocalUseExceptions ) {
   32691           0 :       popErrorHandler();
   32692             :     }
   32693             : #ifndef SED_HACKS
   32694             :     if ( bLocalUseExceptions ) {
   32695             :       CPLErr eclass = CPLGetLastErrorType();
   32696             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32697             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32698             :       }
   32699             :     }
   32700             : #endif
   32701             :   }
   32702           1 :   resultobj = SWIG_Py_Void();
   32703           1 :   {
   32704             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   32705           1 :     Py_DECREF(resultobj);
   32706           1 :     resultobj = PyList_New( *arg4 );
   32707           1 :     if( !resultobj ) {
   32708           0 :       SWIG_fail;
   32709             :     }
   32710           3 :     for( size_t i = 0; i < *arg4; i++ ) {
   32711           2 :       char szTmp[32];
   32712           2 :       snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg3)[i]);
   32713           2 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   32714           2 :       PyList_SetItem(resultobj, i, o );
   32715             :     }
   32716             :   }
   32717           1 :   {
   32718             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32719           1 :     CPLFree(*arg3);
   32720             :   }
   32721           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; } }
   32722             :   return resultobj;
   32723           0 : fail:
   32724           0 :   {
   32725             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32726           0 :     CPLFree(*arg3);
   32727             :   }
   32728             :   return NULL;
   32729             : }
   32730             : 
   32731             : 
   32732        1977 : SWIGINTERN PyObject *_wrap_MDArray_GetDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32733        1977 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32734        1977 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32735        1977 :   void *argp1 = 0 ;
   32736        1977 :   int res1 = 0 ;
   32737        1977 :   PyObject *swig_obj[1] ;
   32738        1977 :   GDALExtendedDataTypeHS *result = 0 ;
   32739             :   
   32740        1977 :   if (!args) SWIG_fail;
   32741        1977 :   swig_obj[0] = args;
   32742        1977 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32743        1977 :   if (!SWIG_IsOK(res1)) {
   32744           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDataType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32745             :   }
   32746        1977 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32747        1977 :   {
   32748        1977 :     const int bLocalUseExceptions = GetUseExceptions();
   32749        1977 :     if ( bLocalUseExceptions ) {
   32750         407 :       pushErrorHandler();
   32751             :     }
   32752        1977 :     {
   32753        1977 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32754        1977 :       result = (GDALExtendedDataTypeHS *)GDALMDArrayHS_GetDataType(arg1);
   32755        1977 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32756             :     }
   32757        1977 :     if ( bLocalUseExceptions ) {
   32758         407 :       popErrorHandler();
   32759             :     }
   32760             : #ifndef SED_HACKS
   32761             :     if ( bLocalUseExceptions ) {
   32762             :       CPLErr eclass = CPLGetLastErrorType();
   32763             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32764             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32765             :       }
   32766             :     }
   32767             : #endif
   32768             :   }
   32769        1977 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   32770        1977 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32771             :   return resultobj;
   32772             : fail:
   32773             :   return NULL;
   32774             : }
   32775             : 
   32776             : 
   32777          15 : SWIGINTERN PyObject *_wrap_MDArray_GetStructuralInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32778          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32779          15 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32780          15 :   void *argp1 = 0 ;
   32781          15 :   int res1 = 0 ;
   32782          15 :   PyObject *swig_obj[1] ;
   32783          15 :   char **result = 0 ;
   32784             :   
   32785          15 :   if (!args) SWIG_fail;
   32786          15 :   swig_obj[0] = args;
   32787          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32788          15 :   if (!SWIG_IsOK(res1)) {
   32789           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetStructuralInfo" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32790             :   }
   32791          15 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32792          15 :   {
   32793          15 :     const int bLocalUseExceptions = GetUseExceptions();
   32794          15 :     if ( bLocalUseExceptions ) {
   32795           2 :       pushErrorHandler();
   32796             :     }
   32797          15 :     {
   32798          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32799          15 :       result = (char **)GDALMDArrayHS_GetStructuralInfo(arg1);
   32800          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32801             :     }
   32802          15 :     if ( bLocalUseExceptions ) {
   32803           2 :       popErrorHandler();
   32804             :     }
   32805             : #ifndef SED_HACKS
   32806             :     if ( bLocalUseExceptions ) {
   32807             :       CPLErr eclass = CPLGetLastErrorType();
   32808             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32809             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32810             :       }
   32811             :     }
   32812             : #endif
   32813             :   }
   32814          15 :   {
   32815             :     /* %typemap(out) char **dict */
   32816          15 :     resultobj = GetCSLStringAsPyDict(result, false);
   32817             :   }
   32818          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; } }
   32819             :   return resultobj;
   32820             : fail:
   32821             :   return NULL;
   32822             : }
   32823             : 
   32824             : 
   32825          44 : SWIGINTERN PyObject *_wrap_MDArray_Resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32826          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32827          44 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32828          44 :   int arg2 ;
   32829          44 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   32830          44 :   char **arg4 = (char **) NULL ;
   32831          44 :   void *argp1 = 0 ;
   32832          44 :   int res1 = 0 ;
   32833          44 :   PyObject *swig_obj[3] ;
   32834          44 :   CPLErr result;
   32835             :   
   32836          44 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Resize", 2, 3, swig_obj)) SWIG_fail;
   32837          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32838          44 :   if (!SWIG_IsOK(res1)) {
   32839           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Resize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32840             :   }
   32841          44 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32842          44 :   {
   32843             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   32844          44 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   32845          44 :     if( arg2 < 0 ) {
   32846           0 :       SWIG_fail;
   32847             :     }
   32848             :   }
   32849          44 :   if (swig_obj[2]) {
   32850           0 :     {
   32851             :       /* %typemap(in) char **dict */
   32852           0 :       arg4 = NULL;
   32853           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   32854           0 :         int bErr = FALSE;
   32855           0 :         arg4 = CSLFromPySequence(swig_obj[2], &bErr);
   32856           0 :         if ( bErr )
   32857             :         {
   32858           0 :           SWIG_fail;
   32859             :         }
   32860             :       }
   32861           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   32862           0 :         int bErr = FALSE;
   32863           0 :         arg4 = CSLFromPyMapping(swig_obj[2], &bErr);
   32864           0 :         if ( bErr )
   32865             :         {
   32866           0 :           SWIG_fail;
   32867             :         }
   32868             :       }
   32869             :       else {
   32870           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   32871           0 :         SWIG_fail;
   32872             :       }
   32873             :     }
   32874             :   }
   32875          44 :   {
   32876          44 :     const int bLocalUseExceptions = GetUseExceptions();
   32877          44 :     if ( bLocalUseExceptions ) {
   32878           0 :       pushErrorHandler();
   32879             :     }
   32880          44 :     {
   32881          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32882          44 :       result = (CPLErr)GDALMDArrayHS_Resize(arg1,arg2,arg3,arg4);
   32883          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32884             :     }
   32885          44 :     if ( bLocalUseExceptions ) {
   32886           0 :       popErrorHandler();
   32887             :     }
   32888             : #ifndef SED_HACKS
   32889             :     if ( bLocalUseExceptions ) {
   32890             :       CPLErr eclass = CPLGetLastErrorType();
   32891             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32892             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32893             :       }
   32894             :     }
   32895             : #endif
   32896             :   }
   32897          44 :   resultobj = SWIG_From_int(static_cast< int >(result));
   32898          44 :   {
   32899             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32900          44 :     free(arg3);
   32901             :   }
   32902          44 :   {
   32903             :     /* %typemap(freearg) char **dict */
   32904          44 :     CSLDestroy( arg4 );
   32905             :   }
   32906          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; } }
   32907             :   return resultobj;
   32908           0 : fail:
   32909           0 :   {
   32910             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32911           0 :     free(arg3);
   32912             :   }
   32913           0 :   {
   32914             :     /* %typemap(freearg) char **dict */
   32915           0 :     CSLDestroy( arg4 );
   32916             :   }
   32917             :   return NULL;
   32918             : }
   32919             : 
   32920             : 
   32921        1893 : SWIGINTERN PyObject *_wrap_MDArray_Read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32922        1893 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32923        1893 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32924        1893 :   int arg2 ;
   32925        1893 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   32926        1893 :   int arg4 ;
   32927        1893 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   32928        1893 :   int arg6 ;
   32929        1893 :   GIntBig *arg7 = (GIntBig *) 0 ;
   32930        1893 :   int arg8 ;
   32931        1893 :   GIntBig *arg9 = (GIntBig *) 0 ;
   32932        1893 :   GDALExtendedDataTypeHS *arg10 = (GDALExtendedDataTypeHS *) 0 ;
   32933        1893 :   void **arg11 = (void **) 0 ;
   32934        1893 :   void *argp1 = 0 ;
   32935        1893 :   int res1 = 0 ;
   32936        1893 :   void *argp10 = 0 ;
   32937        1893 :   int res10 = 0 ;
   32938        1893 :   void *pyObject11 = NULL ;
   32939        1893 :   PyObject *swig_obj[6] ;
   32940        1893 :   CPLErr result;
   32941             :   
   32942        1893 :   {
   32943             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject11 = NULL ) */
   32944        1893 :     arg11 = &pyObject11;
   32945             :   }
   32946        1893 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Read", 6, 6, swig_obj)) SWIG_fail;
   32947        1893 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32948        1893 :   if (!SWIG_IsOK(res1)) {
   32949           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Read" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32950             :   }
   32951        1893 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32952        1893 :   {
   32953             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   32954        1893 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   32955        1893 :     if( arg2 < 0 ) {
   32956           0 :       SWIG_fail;
   32957             :     }
   32958             :   }
   32959        1893 :   {
   32960             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   32961        1893 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   32962        1893 :     if( arg4 < 0 ) {
   32963           0 :       SWIG_fail;
   32964             :     }
   32965             :   }
   32966        1893 :   {
   32967             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   32968        1893 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   32969        1893 :     if( arg6 < 0 ) {
   32970           0 :       SWIG_fail;
   32971             :     }
   32972             :   }
   32973        1893 :   {
   32974             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   32975        1893 :     arg9 = CreateCGIntBigListFromSequence(swig_obj[4], &arg8);
   32976        1893 :     if( arg8 < 0 ) {
   32977           0 :       SWIG_fail;
   32978             :     }
   32979             :   }
   32980        1893 :   res10 = SWIG_ConvertPtr(swig_obj[5], &argp10,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   32981        1893 :   if (!SWIG_IsOK(res10)) {
   32982           0 :     SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "MDArray_Read" "', argument " "10"" of type '" "GDALExtendedDataTypeHS *""'"); 
   32983             :   }
   32984        1893 :   arg10 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp10);
   32985        1893 :   {
   32986        1893 :     if (!arg10) {
   32987           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   32988             :     }
   32989             :   }
   32990        1893 :   {
   32991        1893 :     const int bLocalUseExceptions = GetUseExceptions();
   32992        1893 :     if ( bLocalUseExceptions ) {
   32993         156 :       pushErrorHandler();
   32994             :     }
   32995        1893 :     {
   32996        1893 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32997        1893 :       result = (CPLErr)GDALMDArrayHS_Read(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   32998        1893 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32999             :     }
   33000        1893 :     if ( bLocalUseExceptions ) {
   33001         156 :       popErrorHandler();
   33002             :     }
   33003             : #ifndef SED_HACKS
   33004             :     if ( bLocalUseExceptions ) {
   33005             :       CPLErr eclass = CPLGetLastErrorType();
   33006             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33007             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33008             :       }
   33009             :     }
   33010             : #endif
   33011             :   }
   33012        1893 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33013        1893 :   {
   33014             :     /* %typemap(argout) ( void **outPythonObject ) */
   33015        1893 :     Py_XDECREF(resultobj);
   33016        1893 :     if (*arg11)
   33017             :     {
   33018             :       resultobj = (PyObject*)*arg11;
   33019             :     }
   33020             :     else
   33021             :     {
   33022          40 :       resultobj = Py_None;
   33023          40 :       Py_INCREF(resultobj);
   33024             :     }
   33025             :   }
   33026        1893 :   {
   33027             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33028        1893 :     free(arg3);
   33029             :   }
   33030        1893 :   {
   33031             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33032        1893 :     free(arg5);
   33033             :   }
   33034        1893 :   {
   33035             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33036        1893 :     free(arg7);
   33037             :   }
   33038        1893 :   {
   33039             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33040        1893 :     free(arg9);
   33041             :   }
   33042        1899 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33043             :   return resultobj;
   33044           0 : fail:
   33045           0 :   {
   33046             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33047           0 :     free(arg3);
   33048             :   }
   33049           0 :   {
   33050             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33051           0 :     free(arg5);
   33052             :   }
   33053           0 :   {
   33054             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33055           0 :     free(arg7);
   33056             :   }
   33057           0 :   {
   33058             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33059           0 :     free(arg9);
   33060             :   }
   33061           0 :   return NULL;
   33062             : }
   33063             : 
   33064             : 
   33065          13 : SWIGINTERN PyObject *_wrap_MDArray_WriteStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33066          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33067          13 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33068          13 :   int arg2 ;
   33069          13 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   33070          13 :   int arg4 ;
   33071          13 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   33072          13 :   int arg6 ;
   33073          13 :   GIntBig *arg7 = (GIntBig *) 0 ;
   33074          13 :   GDALExtendedDataTypeHS *arg8 = (GDALExtendedDataTypeHS *) 0 ;
   33075          13 :   char **arg9 = (char **) 0 ;
   33076          13 :   void *argp1 = 0 ;
   33077          13 :   int res1 = 0 ;
   33078          13 :   void *argp8 = 0 ;
   33079          13 :   int res8 = 0 ;
   33080          13 :   PyObject *swig_obj[6] ;
   33081          13 :   CPLErr result;
   33082             :   
   33083          13 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_WriteStringArray", 6, 6, swig_obj)) SWIG_fail;
   33084          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33085          13 :   if (!SWIG_IsOK(res1)) {
   33086           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_WriteStringArray" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33087             :   }
   33088          13 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33089          13 :   {
   33090             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33091          13 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   33092          13 :     if( arg2 < 0 ) {
   33093           0 :       SWIG_fail;
   33094             :     }
   33095             :   }
   33096          13 :   {
   33097             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33098          13 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   33099          13 :     if( arg4 < 0 ) {
   33100           0 :       SWIG_fail;
   33101             :     }
   33102             :   }
   33103          13 :   {
   33104             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   33105          13 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   33106          13 :     if( arg6 < 0 ) {
   33107           0 :       SWIG_fail;
   33108             :     }
   33109             :   }
   33110          13 :   res8 = SWIG_ConvertPtr(swig_obj[4], &argp8,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   33111          13 :   if (!SWIG_IsOK(res8)) {
   33112           0 :     SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "MDArray_WriteStringArray" "', argument " "8"" of type '" "GDALExtendedDataTypeHS *""'"); 
   33113             :   }
   33114          13 :   arg8 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp8);
   33115          13 :   {
   33116             :     /* %typemap(in) char **dict */
   33117          13 :     arg9 = NULL;
   33118          13 :     if ( PySequence_Check( swig_obj[5] ) ) {
   33119          13 :       int bErr = FALSE;
   33120          13 :       arg9 = CSLFromPySequence(swig_obj[5], &bErr);
   33121          13 :       if ( bErr )
   33122             :       {
   33123           0 :         SWIG_fail;
   33124             :       }
   33125             :     }
   33126           0 :     else if ( PyMapping_Check( swig_obj[5] ) ) {
   33127           0 :       int bErr = FALSE;
   33128           0 :       arg9 = CSLFromPyMapping(swig_obj[5], &bErr);
   33129           0 :       if ( bErr )
   33130             :       {
   33131           0 :         SWIG_fail;
   33132             :       }
   33133             :     }
   33134             :     else {
   33135           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33136           0 :       SWIG_fail;
   33137             :     }
   33138             :   }
   33139          13 :   {
   33140          13 :     if (!arg8) {
   33141           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33142             :     }
   33143             :   }
   33144          13 :   {
   33145          13 :     const int bLocalUseExceptions = GetUseExceptions();
   33146          13 :     if ( bLocalUseExceptions ) {
   33147           3 :       pushErrorHandler();
   33148             :     }
   33149          13 :     {
   33150          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33151          13 :       result = (CPLErr)GDALMDArrayHS_WriteStringArray(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   33152          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33153             :     }
   33154          13 :     if ( bLocalUseExceptions ) {
   33155           3 :       popErrorHandler();
   33156             :     }
   33157             : #ifndef SED_HACKS
   33158             :     if ( bLocalUseExceptions ) {
   33159             :       CPLErr eclass = CPLGetLastErrorType();
   33160             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33161             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33162             :       }
   33163             :     }
   33164             : #endif
   33165             :   }
   33166          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33167          13 :   {
   33168             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33169          13 :     free(arg3);
   33170             :   }
   33171          13 :   {
   33172             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33173          13 :     free(arg5);
   33174             :   }
   33175          13 :   {
   33176             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33177          13 :     free(arg7);
   33178             :   }
   33179          13 :   {
   33180             :     /* %typemap(freearg) char **dict */
   33181          13 :     CSLDestroy( arg9 );
   33182             :   }
   33183          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; } }
   33184             :   return resultobj;
   33185           0 : fail:
   33186           0 :   {
   33187             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33188           0 :     free(arg3);
   33189             :   }
   33190           0 :   {
   33191             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33192           0 :     free(arg5);
   33193             :   }
   33194           0 :   {
   33195             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33196           0 :     free(arg7);
   33197             :   }
   33198           0 :   {
   33199             :     /* %typemap(freearg) char **dict */
   33200           0 :     CSLDestroy( arg9 );
   33201             :   }
   33202             :   return NULL;
   33203             : }
   33204             : 
   33205             : 
   33206         516 : SWIGINTERN PyObject *_wrap_MDArray_Write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33207         516 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33208         516 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33209         516 :   int arg2 ;
   33210         516 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   33211         516 :   int arg4 ;
   33212         516 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   33213         516 :   int arg6 ;
   33214         516 :   GIntBig *arg7 = (GIntBig *) 0 ;
   33215         516 :   int arg8 ;
   33216         516 :   GIntBig *arg9 = (GIntBig *) 0 ;
   33217         516 :   GDALExtendedDataTypeHS *arg10 = (GDALExtendedDataTypeHS *) 0 ;
   33218         516 :   GIntBig arg11 ;
   33219         516 :   char *arg12 = (char *) 0 ;
   33220         516 :   void *argp1 = 0 ;
   33221         516 :   int res1 = 0 ;
   33222         516 :   void *argp10 = 0 ;
   33223         516 :   int res10 = 0 ;
   33224         516 :   int alloc11 = 0 ;
   33225         516 :   bool viewIsValid11 = false ;
   33226         516 :   Py_buffer view11 ;
   33227         516 :   PyObject *swig_obj[7] ;
   33228         516 :   CPLErr result;
   33229             :   
   33230         516 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Write", 7, 7, swig_obj)) SWIG_fail;
   33231         516 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33232         516 :   if (!SWIG_IsOK(res1)) {
   33233           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Write" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33234             :   }
   33235         516 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33236         516 :   {
   33237             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33238         516 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   33239         516 :     if( arg2 < 0 ) {
   33240           0 :       SWIG_fail;
   33241             :     }
   33242             :   }
   33243         516 :   {
   33244             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33245         516 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   33246         516 :     if( arg4 < 0 ) {
   33247           0 :       SWIG_fail;
   33248             :     }
   33249             :   }
   33250         516 :   {
   33251             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   33252         516 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   33253         516 :     if( arg6 < 0 ) {
   33254           0 :       SWIG_fail;
   33255             :     }
   33256             :   }
   33257         516 :   {
   33258             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   33259         516 :     arg9 = CreateCGIntBigListFromSequence(swig_obj[4], &arg8);
   33260         516 :     if( arg8 < 0 ) {
   33261           0 :       SWIG_fail;
   33262             :     }
   33263             :   }
   33264         516 :   res10 = SWIG_ConvertPtr(swig_obj[5], &argp10,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   33265         516 :   if (!SWIG_IsOK(res10)) {
   33266           0 :     SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "MDArray_Write" "', argument " "10"" of type '" "GDALExtendedDataTypeHS *""'"); 
   33267             :   }
   33268         516 :   arg10 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp10);
   33269         516 :   {
   33270             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   33271         516 :     char* ptr = NULL;
   33272         516 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[6], &arg11, &ptr, &alloc11, &viewIsValid11, &view11) ) {
   33273           0 :       SWIG_fail;
   33274             :     }
   33275         516 :     arg12 = (char *)ptr;
   33276             :   }
   33277         516 :   {
   33278         516 :     if (!arg10) {
   33279           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33280             :     }
   33281             :   }
   33282         516 :   {
   33283         516 :     const int bLocalUseExceptions = GetUseExceptions();
   33284         516 :     if ( bLocalUseExceptions ) {
   33285          45 :       pushErrorHandler();
   33286             :     }
   33287         516 :     {
   33288         516 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33289         516 :       result = (CPLErr)GDALMDArrayHS_Write(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   33290         516 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33291             :     }
   33292         516 :     if ( bLocalUseExceptions ) {
   33293          45 :       popErrorHandler();
   33294             :     }
   33295             : #ifndef SED_HACKS
   33296             :     if ( bLocalUseExceptions ) {
   33297             :       CPLErr eclass = CPLGetLastErrorType();
   33298             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33299             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33300             :       }
   33301             :     }
   33302             : #endif
   33303             :   }
   33304         516 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33305         516 :   {
   33306             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33307         516 :     free(arg3);
   33308             :   }
   33309         516 :   {
   33310             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33311         516 :     free(arg5);
   33312             :   }
   33313         516 :   {
   33314             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33315         516 :     free(arg7);
   33316             :   }
   33317         516 :   {
   33318             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33319         516 :     free(arg9);
   33320             :   }
   33321         516 :   {
   33322             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   33323         516 :     if( viewIsValid11 ) {
   33324         515 :       PyBuffer_Release(&view11);
   33325             :     }
   33326           1 :     else if( alloc11 == SWIG_NEWOBJ ) {
   33327           1 :       delete[] arg12;
   33328             :     }
   33329             :   }
   33330         518 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33331             :   return resultobj;
   33332           0 : fail:
   33333           0 :   {
   33334             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33335           0 :     free(arg3);
   33336             :   }
   33337           0 :   {
   33338             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33339           0 :     free(arg5);
   33340             :   }
   33341           0 :   {
   33342             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33343           0 :     free(arg7);
   33344             :   }
   33345           0 :   {
   33346             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33347           0 :     free(arg9);
   33348             :   }
   33349           0 :   {
   33350             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   33351           0 :     if( viewIsValid11 ) {
   33352           0 :       PyBuffer_Release(&view11);
   33353             :     }
   33354           0 :     else if( alloc11 == SWIG_NEWOBJ ) {
   33355           0 :       delete[] arg12;
   33356             :     }
   33357             :   }
   33358             :   return NULL;
   33359             : }
   33360             : 
   33361             : 
   33362          22 : SWIGINTERN PyObject *_wrap_MDArray_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33363          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33364          22 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33365          22 :   int arg2 ;
   33366          22 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   33367          22 :   int arg4 ;
   33368          22 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   33369          22 :   char **arg6 = (char **) 0 ;
   33370          22 :   void *argp1 = 0 ;
   33371          22 :   int res1 = 0 ;
   33372          22 :   PyObject *swig_obj[4] ;
   33373          22 :   CPLErr result;
   33374             :   
   33375          22 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_AdviseRead", 3, 4, swig_obj)) SWIG_fail;
   33376          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33377          22 :   if (!SWIG_IsOK(res1)) {
   33378           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_AdviseRead" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33379             :   }
   33380          22 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33381          22 :   {
   33382             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33383          22 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   33384          22 :     if( arg2 < 0 ) {
   33385           0 :       SWIG_fail;
   33386             :     }
   33387             :   }
   33388          22 :   {
   33389             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33390          22 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   33391          22 :     if( arg4 < 0 ) {
   33392           0 :       SWIG_fail;
   33393             :     }
   33394             :   }
   33395          22 :   if (swig_obj[3]) {
   33396          22 :     {
   33397             :       /* %typemap(in) char **dict */
   33398          22 :       arg6 = NULL;
   33399          22 :       if ( PySequence_Check( swig_obj[3] ) ) {
   33400          22 :         int bErr = FALSE;
   33401          22 :         arg6 = CSLFromPySequence(swig_obj[3], &bErr);
   33402          22 :         if ( bErr )
   33403             :         {
   33404           0 :           SWIG_fail;
   33405             :         }
   33406             :       }
   33407           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   33408           0 :         int bErr = FALSE;
   33409           0 :         arg6 = CSLFromPyMapping(swig_obj[3], &bErr);
   33410           0 :         if ( bErr )
   33411             :         {
   33412           0 :           SWIG_fail;
   33413             :         }
   33414             :       }
   33415             :       else {
   33416           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33417           0 :         SWIG_fail;
   33418             :       }
   33419             :     }
   33420             :   }
   33421          22 :   {
   33422          22 :     const int bLocalUseExceptions = GetUseExceptions();
   33423          22 :     if ( bLocalUseExceptions ) {
   33424           0 :       pushErrorHandler();
   33425             :     }
   33426          22 :     {
   33427          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33428          22 :       result = (CPLErr)GDALMDArrayHS_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6);
   33429          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33430             :     }
   33431          22 :     if ( bLocalUseExceptions ) {
   33432           0 :       popErrorHandler();
   33433             :     }
   33434             : #ifndef SED_HACKS
   33435             :     if ( bLocalUseExceptions ) {
   33436             :       CPLErr eclass = CPLGetLastErrorType();
   33437             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33438             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33439             :       }
   33440             :     }
   33441             : #endif
   33442             :   }
   33443          22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33444          22 :   {
   33445             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33446          22 :     free(arg3);
   33447             :   }
   33448          22 :   {
   33449             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33450          22 :     free(arg5);
   33451             :   }
   33452          22 :   {
   33453             :     /* %typemap(freearg) char **dict */
   33454          22 :     CSLDestroy( arg6 );
   33455             :   }
   33456          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; } }
   33457             :   return resultobj;
   33458           0 : fail:
   33459           0 :   {
   33460             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33461           0 :     free(arg3);
   33462             :   }
   33463           0 :   {
   33464             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33465           0 :     free(arg5);
   33466             :   }
   33467           0 :   {
   33468             :     /* %typemap(freearg) char **dict */
   33469           0 :     CSLDestroy( arg6 );
   33470             :   }
   33471             :   return NULL;
   33472             : }
   33473             : 
   33474             : 
   33475         119 : SWIGINTERN PyObject *_wrap_MDArray_GetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33476         119 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33477         119 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33478         119 :   char *arg2 = (char *) 0 ;
   33479         119 :   void *argp1 = 0 ;
   33480         119 :   int res1 = 0 ;
   33481         119 :   int res2 ;
   33482         119 :   char *buf2 = 0 ;
   33483         119 :   int alloc2 = 0 ;
   33484         119 :   PyObject *swig_obj[2] ;
   33485         119 :   GDALAttributeHS *result = 0 ;
   33486             :   
   33487         119 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetAttribute", 2, 2, swig_obj)) SWIG_fail;
   33488         119 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33489         119 :   if (!SWIG_IsOK(res1)) {
   33490           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33491             :   }
   33492         119 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33493         119 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33494         119 :   if (!SWIG_IsOK(res2)) {
   33495           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetAttribute" "', argument " "2"" of type '" "char const *""'");
   33496             :   }
   33497         119 :   arg2 = reinterpret_cast< char * >(buf2);
   33498         119 :   {
   33499         119 :     if (!arg2) {
   33500           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33501             :     }
   33502             :   }
   33503         119 :   {
   33504         119 :     const int bLocalUseExceptions = GetUseExceptions();
   33505         119 :     if ( bLocalUseExceptions ) {
   33506          59 :       pushErrorHandler();
   33507             :     }
   33508         119 :     {
   33509         119 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33510         119 :       result = (GDALAttributeHS *)GDALMDArrayHS_GetAttribute(arg1,(char const *)arg2);
   33511         119 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33512             :     }
   33513         119 :     if ( bLocalUseExceptions ) {
   33514          59 :       popErrorHandler();
   33515             :     }
   33516             : #ifndef SED_HACKS
   33517             :     if ( bLocalUseExceptions ) {
   33518             :       CPLErr eclass = CPLGetLastErrorType();
   33519             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33520             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33521             :       }
   33522             :     }
   33523             : #endif
   33524             :   }
   33525         119 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   33526         119 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33527         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; } }
   33528             :   return resultobj;
   33529           0 : fail:
   33530           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33531             :   return NULL;
   33532             : }
   33533             : 
   33534             : 
   33535          58 : SWIGINTERN PyObject *_wrap_MDArray_GetAttributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33536          58 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33537          58 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33538          58 :   GDALAttributeHS ***arg2 = (GDALAttributeHS ***) 0 ;
   33539          58 :   size_t *arg3 = (size_t *) 0 ;
   33540          58 :   char **arg4 = (char **) 0 ;
   33541          58 :   void *argp1 = 0 ;
   33542          58 :   int res1 = 0 ;
   33543          58 :   GDALAttributeHS **attrs2 = 0 ;
   33544          58 :   size_t nCount2 = 0 ;
   33545          58 :   PyObject *swig_obj[2] ;
   33546             :   
   33547          58 :   {
   33548             :     /* %typemap(in,numinputs=0) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33549          58 :     arg2 = &attrs2;
   33550          58 :     arg3 = &nCount2;
   33551             :   }
   33552          58 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetAttributes", 1, 2, swig_obj)) SWIG_fail;
   33553          58 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33554          58 :   if (!SWIG_IsOK(res1)) {
   33555           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetAttributes" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33556             :   }
   33557          58 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33558          58 :   if (swig_obj[1]) {
   33559           0 :     {
   33560             :       /* %typemap(in) char **dict */
   33561           0 :       arg4 = NULL;
   33562           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   33563           0 :         int bErr = FALSE;
   33564           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   33565           0 :         if ( bErr )
   33566             :         {
   33567           0 :           SWIG_fail;
   33568             :         }
   33569             :       }
   33570           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   33571           0 :         int bErr = FALSE;
   33572           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   33573           0 :         if ( bErr )
   33574             :         {
   33575           0 :           SWIG_fail;
   33576             :         }
   33577             :       }
   33578             :       else {
   33579           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33580           0 :         SWIG_fail;
   33581             :       }
   33582             :     }
   33583             :   }
   33584          58 :   {
   33585          58 :     const int bLocalUseExceptions = GetUseExceptions();
   33586          58 :     if ( bLocalUseExceptions ) {
   33587          42 :       pushErrorHandler();
   33588             :     }
   33589          58 :     {
   33590          58 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33591          58 :       GDALMDArrayHS_GetAttributes(arg1,arg2,arg3,arg4);
   33592          58 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33593             :     }
   33594          58 :     if ( bLocalUseExceptions ) {
   33595          42 :       popErrorHandler();
   33596             :     }
   33597             : #ifndef SED_HACKS
   33598             :     if ( bLocalUseExceptions ) {
   33599             :       CPLErr eclass = CPLGetLastErrorType();
   33600             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33601             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33602             :       }
   33603             :     }
   33604             : #endif
   33605             :   }
   33606          58 :   resultobj = SWIG_Py_Void();
   33607          58 :   {
   33608             :     /* %typemap(argout) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33609          58 :     Py_DECREF(resultobj);
   33610          58 :     resultobj = PyList_New( *arg3 );
   33611          58 :     if( !resultobj ) {
   33612           0 :       SWIG_fail;
   33613             :     }
   33614         187 :     for( size_t i = 0; i < *arg3; i++ ) {
   33615         129 :       PyList_SetItem(resultobj, i,
   33616         129 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALAttributeHS,SWIG_POINTER_OWN) );
   33617             :       /* We have borrowed the GDALAttributeHS */
   33618         129 :       (*arg2)[i] = NULL;
   33619             :     }
   33620             :   }
   33621          58 :   {
   33622             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33623          58 :     GDALReleaseAttributes(*arg2, *arg3);
   33624             :   }
   33625          58 :   {
   33626             :     /* %typemap(freearg) char **dict */
   33627          58 :     CSLDestroy( arg4 );
   33628             :   }
   33629          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; } }
   33630             :   return resultobj;
   33631           0 : fail:
   33632           0 :   {
   33633             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33634           0 :     GDALReleaseAttributes(*arg2, *arg3);
   33635             :   }
   33636           0 :   {
   33637             :     /* %typemap(freearg) char **dict */
   33638           0 :     CSLDestroy( arg4 );
   33639             :   }
   33640             :   return NULL;
   33641             : }
   33642             : 
   33643             : 
   33644         163 : SWIGINTERN PyObject *_wrap_MDArray_CreateAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33645         163 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33646         163 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33647         163 :   char *arg2 = (char *) 0 ;
   33648         163 :   int arg3 ;
   33649         163 :   GUIntBig *arg4 = (GUIntBig *) 0 ;
   33650         163 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   33651         163 :   char **arg6 = (char **) 0 ;
   33652         163 :   void *argp1 = 0 ;
   33653         163 :   int res1 = 0 ;
   33654         163 :   int res2 ;
   33655         163 :   char *buf2 = 0 ;
   33656         163 :   int alloc2 = 0 ;
   33657         163 :   void *argp5 = 0 ;
   33658         163 :   int res5 = 0 ;
   33659         163 :   PyObject *swig_obj[5] ;
   33660         163 :   GDALAttributeHS *result = 0 ;
   33661             :   
   33662         163 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_CreateAttribute", 4, 5, swig_obj)) SWIG_fail;
   33663         163 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33664         163 :   if (!SWIG_IsOK(res1)) {
   33665           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_CreateAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33666             :   }
   33667         163 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33668         163 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33669         163 :   if (!SWIG_IsOK(res2)) {
   33670           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_CreateAttribute" "', argument " "2"" of type '" "char const *""'");
   33671             :   }
   33672         163 :   arg2 = reinterpret_cast< char * >(buf2);
   33673         163 :   {
   33674             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33675         163 :     arg4 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg3);
   33676         163 :     if( arg3 < 0 ) {
   33677           0 :       SWIG_fail;
   33678             :     }
   33679             :   }
   33680         163 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   33681         163 :   if (!SWIG_IsOK(res5)) {
   33682           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MDArray_CreateAttribute" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   33683             :   }
   33684         163 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   33685         163 :   if (swig_obj[4]) {
   33686           0 :     {
   33687             :       /* %typemap(in) char **dict */
   33688           0 :       arg6 = NULL;
   33689           0 :       if ( PySequence_Check( swig_obj[4] ) ) {
   33690           0 :         int bErr = FALSE;
   33691           0 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   33692           0 :         if ( bErr )
   33693             :         {
   33694           0 :           SWIG_fail;
   33695             :         }
   33696             :       }
   33697           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   33698           0 :         int bErr = FALSE;
   33699           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   33700           0 :         if ( bErr )
   33701             :         {
   33702           0 :           SWIG_fail;
   33703             :         }
   33704             :       }
   33705             :       else {
   33706           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33707           0 :         SWIG_fail;
   33708             :       }
   33709             :     }
   33710             :   }
   33711         163 :   {
   33712         163 :     if (!arg2) {
   33713           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33714             :     }
   33715             :   }
   33716         162 :   {
   33717         162 :     if (!arg5) {
   33718           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33719             :     }
   33720             :   }
   33721         162 :   {
   33722         162 :     const int bLocalUseExceptions = GetUseExceptions();
   33723         162 :     if ( bLocalUseExceptions ) {
   33724         118 :       pushErrorHandler();
   33725             :     }
   33726         162 :     {
   33727         162 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33728         162 :       result = (GDALAttributeHS *)GDALMDArrayHS_CreateAttribute(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   33729         162 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33730             :     }
   33731         162 :     if ( bLocalUseExceptions ) {
   33732         118 :       popErrorHandler();
   33733             :     }
   33734             : #ifndef SED_HACKS
   33735             :     if ( bLocalUseExceptions ) {
   33736             :       CPLErr eclass = CPLGetLastErrorType();
   33737             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33738             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33739             :       }
   33740             :     }
   33741             : #endif
   33742             :   }
   33743         162 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   33744         162 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33745         162 :   {
   33746             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33747         162 :     free(arg4);
   33748             :   }
   33749         162 :   {
   33750             :     /* %typemap(freearg) char **dict */
   33751         162 :     CSLDestroy( arg6 );
   33752             :   }
   33753         165 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33754             :   return resultobj;
   33755           1 : fail:
   33756           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33757           1 :   {
   33758             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33759           1 :     free(arg4);
   33760             :   }
   33761           1 :   {
   33762             :     /* %typemap(freearg) char **dict */
   33763           1 :     CSLDestroy( arg6 );
   33764             :   }
   33765             :   return NULL;
   33766             : }
   33767             : 
   33768             : 
   33769          24 : SWIGINTERN PyObject *_wrap_MDArray_DeleteAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33770          24 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33771          24 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33772          24 :   char *arg2 = (char *) 0 ;
   33773          24 :   char **arg3 = (char **) 0 ;
   33774          24 :   void *argp1 = 0 ;
   33775          24 :   int res1 = 0 ;
   33776          24 :   int res2 ;
   33777          24 :   char *buf2 = 0 ;
   33778          24 :   int alloc2 = 0 ;
   33779          24 :   PyObject *swig_obj[3] ;
   33780          24 :   CPLErr result;
   33781             :   
   33782          24 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_DeleteAttribute", 2, 3, swig_obj)) SWIG_fail;
   33783          24 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33784          24 :   if (!SWIG_IsOK(res1)) {
   33785           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_DeleteAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33786             :   }
   33787          24 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33788          24 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33789          24 :   if (!SWIG_IsOK(res2)) {
   33790           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_DeleteAttribute" "', argument " "2"" of type '" "char const *""'");
   33791             :   }
   33792          24 :   arg2 = reinterpret_cast< char * >(buf2);
   33793          24 :   if (swig_obj[2]) {
   33794           0 :     {
   33795             :       /* %typemap(in) char **dict */
   33796           0 :       arg3 = NULL;
   33797           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   33798           0 :         int bErr = FALSE;
   33799           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   33800           0 :         if ( bErr )
   33801             :         {
   33802           0 :           SWIG_fail;
   33803             :         }
   33804             :       }
   33805           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   33806           0 :         int bErr = FALSE;
   33807           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   33808           0 :         if ( bErr )
   33809             :         {
   33810           0 :           SWIG_fail;
   33811             :         }
   33812             :       }
   33813             :       else {
   33814           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33815           0 :         SWIG_fail;
   33816             :       }
   33817             :     }
   33818             :   }
   33819          24 :   {
   33820          24 :     if (!arg2) {
   33821           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33822             :     }
   33823             :   }
   33824          24 :   {
   33825          24 :     const int bLocalUseExceptions = GetUseExceptions();
   33826          24 :     if ( bLocalUseExceptions ) {
   33827          24 :       pushErrorHandler();
   33828             :     }
   33829          24 :     {
   33830          24 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33831          24 :       result = (CPLErr)GDALMDArrayHS_DeleteAttribute(arg1,(char const *)arg2,arg3);
   33832          24 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33833             :     }
   33834          24 :     if ( bLocalUseExceptions ) {
   33835          24 :       popErrorHandler();
   33836             :     }
   33837             : #ifndef SED_HACKS
   33838             :     if ( bLocalUseExceptions ) {
   33839             :       CPLErr eclass = CPLGetLastErrorType();
   33840             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33841             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33842             :       }
   33843             :     }
   33844             : #endif
   33845             :   }
   33846          24 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33847          24 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33848          24 :   {
   33849             :     /* %typemap(freearg) char **dict */
   33850          24 :     CSLDestroy( arg3 );
   33851             :   }
   33852          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; } }
   33853             :   return resultobj;
   33854           0 : fail:
   33855           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33856           0 :   {
   33857             :     /* %typemap(freearg) char **dict */
   33858           0 :     CSLDestroy( arg3 );
   33859             :   }
   33860             :   return NULL;
   33861             : }
   33862             : 
   33863             : 
   33864          72 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33865          72 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33866          72 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33867          72 :   void **arg2 = (void **) 0 ;
   33868          72 :   void *argp1 = 0 ;
   33869          72 :   int res1 = 0 ;
   33870          72 :   void *pyObject2 = NULL ;
   33871          72 :   PyObject *swig_obj[1] ;
   33872          72 :   CPLErr result;
   33873             :   
   33874          72 :   {
   33875             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   33876          72 :     arg2 = &pyObject2;
   33877             :   }
   33878          72 :   if (!args) SWIG_fail;
   33879          72 :   swig_obj[0] = args;
   33880          72 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33881          72 :   if (!SWIG_IsOK(res1)) {
   33882           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsRaw" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33883             :   }
   33884          72 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33885          72 :   {
   33886          72 :     const int bLocalUseExceptions = GetUseExceptions();
   33887          72 :     if ( bLocalUseExceptions ) {
   33888          20 :       pushErrorHandler();
   33889             :     }
   33890          72 :     {
   33891          72 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33892          72 :       result = (CPLErr)GDALMDArrayHS_GetNoDataValueAsRaw(arg1,arg2);
   33893          72 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33894             :     }
   33895          72 :     if ( bLocalUseExceptions ) {
   33896          20 :       popErrorHandler();
   33897             :     }
   33898             : #ifndef SED_HACKS
   33899             :     if ( bLocalUseExceptions ) {
   33900             :       CPLErr eclass = CPLGetLastErrorType();
   33901             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33902             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33903             :       }
   33904             :     }
   33905             : #endif
   33906             :   }
   33907          72 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33908          72 :   {
   33909             :     /* %typemap(argout) ( void **outPythonObject ) */
   33910          72 :     Py_XDECREF(resultobj);
   33911          72 :     if (*arg2)
   33912             :     {
   33913             :       resultobj = (PyObject*)*arg2;
   33914             :     }
   33915             :     else
   33916             :     {
   33917          36 :       resultobj = Py_None;
   33918          36 :       Py_INCREF(resultobj);
   33919             :     }
   33920             :   }
   33921          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; } }
   33922             :   return resultobj;
   33923             : fail:
   33924             :   return NULL;
   33925             : }
   33926             : 
   33927             : 
   33928         120 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33929         120 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33930         120 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33931         120 :   double *arg2 = (double *) 0 ;
   33932         120 :   int *arg3 = (int *) 0 ;
   33933         120 :   void *argp1 = 0 ;
   33934         120 :   int res1 = 0 ;
   33935         120 :   double tmpval2 ;
   33936         120 :   int tmphasval2 ;
   33937         120 :   PyObject *swig_obj[1] ;
   33938             :   
   33939         120 :   {
   33940             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   33941         120 :     arg2 = &tmpval2;
   33942         120 :     arg3 = &tmphasval2;
   33943             :   }
   33944         120 :   if (!args) SWIG_fail;
   33945         120 :   swig_obj[0] = args;
   33946         120 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33947         120 :   if (!SWIG_IsOK(res1)) {
   33948           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsDouble" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33949             :   }
   33950         120 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33951         120 :   {
   33952         120 :     const int bLocalUseExceptions = GetUseExceptions();
   33953         120 :     if ( bLocalUseExceptions ) {
   33954           8 :       pushErrorHandler();
   33955             :     }
   33956         120 :     {
   33957         120 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33958         120 :       GDALMDArrayHS_GetNoDataValueAsDouble(arg1,arg2,arg3);
   33959         120 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33960             :     }
   33961         120 :     if ( bLocalUseExceptions ) {
   33962           8 :       popErrorHandler();
   33963             :     }
   33964             : #ifndef SED_HACKS
   33965             :     if ( bLocalUseExceptions ) {
   33966             :       CPLErr eclass = CPLGetLastErrorType();
   33967             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33968             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33969             :       }
   33970             :     }
   33971             : #endif
   33972             :   }
   33973         120 :   resultobj = SWIG_Py_Void();
   33974         120 :   {
   33975             :     /* %typemap(python,argout) (double *val, int *hasval) */
   33976         120 :     PyObject *r;
   33977         120 :     if ( !*arg3 ) {
   33978          48 :       Py_INCREF(Py_None);
   33979          48 :       r = Py_None;
   33980             :     }
   33981             :     else {
   33982          72 :       r = PyFloat_FromDouble( *arg2 );
   33983             :     }
   33984             : #if SWIG_VERSION >= 0x040300
   33985             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   33986             : #else
   33987         120 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   33988             : #endif
   33989             :   }
   33990         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; } }
   33991             :   return resultobj;
   33992             : fail:
   33993             :   return NULL;
   33994             : }
   33995             : 
   33996             : 
   33997          11 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33998          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33999          11 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34000          11 :   GIntBig *arg2 = (GIntBig *) 0 ;
   34001          11 :   int *arg3 = (int *) 0 ;
   34002          11 :   void *argp1 = 0 ;
   34003          11 :   int res1 = 0 ;
   34004          11 :   GIntBig tmpval2 ;
   34005          11 :   int tmphasval2 ;
   34006          11 :   PyObject *swig_obj[1] ;
   34007             :   
   34008          11 :   {
   34009             :     /* %typemap(python,in,numinputs=0) (GIntBig *val, int *hasval) */
   34010          11 :     arg2 = &tmpval2;
   34011          11 :     arg3 = &tmphasval2;
   34012             :   }
   34013          11 :   if (!args) SWIG_fail;
   34014          11 :   swig_obj[0] = args;
   34015          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34016          11 :   if (!SWIG_IsOK(res1)) {
   34017           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34018             :   }
   34019          11 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34020          11 :   {
   34021          11 :     const int bLocalUseExceptions = GetUseExceptions();
   34022          11 :     if ( bLocalUseExceptions ) {
   34023           0 :       pushErrorHandler();
   34024             :     }
   34025          11 :     {
   34026          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34027          11 :       GDALMDArrayHS_GetNoDataValueAsInt64(arg1,arg2,arg3);
   34028          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34029             :     }
   34030          11 :     if ( bLocalUseExceptions ) {
   34031           0 :       popErrorHandler();
   34032             :     }
   34033             : #ifndef SED_HACKS
   34034             :     if ( bLocalUseExceptions ) {
   34035             :       CPLErr eclass = CPLGetLastErrorType();
   34036             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34037             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34038             :       }
   34039             :     }
   34040             : #endif
   34041             :   }
   34042          11 :   resultobj = SWIG_Py_Void();
   34043          11 :   {
   34044             :     /* %typemap(python,argout) (GIntBig *val, int *hasval) */
   34045          11 :     PyObject *r;
   34046          11 :     if ( !*arg3 ) {
   34047           4 :       Py_INCREF(Py_None);
   34048           4 :       r = Py_None;
   34049             :     }
   34050             :     else {
   34051           7 :       r = PyLong_FromLongLong( *arg2 );
   34052             :     }
   34053             : #if SWIG_VERSION >= 0x040300
   34054             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   34055             : #else
   34056          11 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   34057             : #endif
   34058             :   }
   34059          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; } }
   34060             :   return resultobj;
   34061             : fail:
   34062             :   return NULL;
   34063             : }
   34064             : 
   34065             : 
   34066           7 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34067           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34068           7 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34069           7 :   GUIntBig *arg2 = (GUIntBig *) 0 ;
   34070           7 :   int *arg3 = (int *) 0 ;
   34071           7 :   void *argp1 = 0 ;
   34072           7 :   int res1 = 0 ;
   34073           7 :   GUIntBig tmpval2 ;
   34074           7 :   int tmphasval2 ;
   34075           7 :   PyObject *swig_obj[1] ;
   34076             :   
   34077           7 :   {
   34078             :     /* %typemap(python,in,numinputs=0) (GUIntBig *val, int *hasval) */
   34079           7 :     arg2 = &tmpval2;
   34080           7 :     arg3 = &tmphasval2;
   34081             :   }
   34082           7 :   if (!args) SWIG_fail;
   34083           7 :   swig_obj[0] = args;
   34084           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34085           7 :   if (!SWIG_IsOK(res1)) {
   34086           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34087             :   }
   34088           7 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34089           7 :   {
   34090           7 :     const int bLocalUseExceptions = GetUseExceptions();
   34091           7 :     if ( bLocalUseExceptions ) {
   34092           0 :       pushErrorHandler();
   34093             :     }
   34094           7 :     {
   34095           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34096           7 :       GDALMDArrayHS_GetNoDataValueAsUInt64(arg1,arg2,arg3);
   34097           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34098             :     }
   34099           7 :     if ( bLocalUseExceptions ) {
   34100           0 :       popErrorHandler();
   34101             :     }
   34102             : #ifndef SED_HACKS
   34103             :     if ( bLocalUseExceptions ) {
   34104             :       CPLErr eclass = CPLGetLastErrorType();
   34105             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34106             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34107             :       }
   34108             :     }
   34109             : #endif
   34110             :   }
   34111           7 :   resultobj = SWIG_Py_Void();
   34112           7 :   {
   34113             :     /* %typemap(python,argout) (GUIntBig *val, int *hasval) */
   34114           7 :     PyObject *r;
   34115           7 :     if ( !*arg3 ) {
   34116           2 :       Py_INCREF(Py_None);
   34117           2 :       r = Py_None;
   34118             :     }
   34119             :     else {
   34120           5 :       r = PyLong_FromUnsignedLongLong( *arg2 );
   34121             :     }
   34122             : #if SWIG_VERSION >= 0x040300
   34123             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   34124             : #else
   34125           7 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   34126             : #endif
   34127             :   }
   34128           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; } }
   34129             :   return resultobj;
   34130             : fail:
   34131             :   return NULL;
   34132             : }
   34133             : 
   34134             : 
   34135           5 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34136           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34137           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34138           5 :   void *argp1 = 0 ;
   34139           5 :   int res1 = 0 ;
   34140           5 :   PyObject *swig_obj[1] ;
   34141           5 :   retStringAndCPLFree *result = 0 ;
   34142             :   
   34143           5 :   if (!args) SWIG_fail;
   34144           5 :   swig_obj[0] = args;
   34145           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34146           5 :   if (!SWIG_IsOK(res1)) {
   34147           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsString" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34148             :   }
   34149           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34150           5 :   {
   34151           5 :     const int bLocalUseExceptions = GetUseExceptions();
   34152           5 :     if ( bLocalUseExceptions ) {
   34153           0 :       pushErrorHandler();
   34154             :     }
   34155           5 :     {
   34156           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34157           5 :       result = (retStringAndCPLFree *)GDALMDArrayHS_GetNoDataValueAsString(arg1);
   34158           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34159             :     }
   34160           5 :     if ( bLocalUseExceptions ) {
   34161           0 :       popErrorHandler();
   34162             :     }
   34163             : #ifndef SED_HACKS
   34164             :     if ( bLocalUseExceptions ) {
   34165             :       CPLErr eclass = CPLGetLastErrorType();
   34166             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34167             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34168             :       }
   34169             :     }
   34170             : #endif
   34171             :   }
   34172           5 :   {
   34173             :     /* %typemap(out) (retStringAndCPLFree*) */
   34174           5 :     Py_XDECREF(resultobj);
   34175           5 :     if(result)
   34176             :     {
   34177           2 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   34178           2 :       CPLFree(result);
   34179             :     }
   34180             :     else
   34181             :     {
   34182           3 :       resultobj = Py_None;
   34183           3 :       Py_INCREF(resultobj);
   34184             :     }
   34185             :   }
   34186           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; } }
   34187             :   return resultobj;
   34188             : fail:
   34189             :   return NULL;
   34190             : }
   34191             : 
   34192             : 
   34193          51 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34194          51 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34195          51 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34196          51 :   double arg2 ;
   34197          51 :   void *argp1 = 0 ;
   34198          51 :   int res1 = 0 ;
   34199          51 :   double val2 ;
   34200          51 :   int ecode2 = 0 ;
   34201          51 :   PyObject *swig_obj[2] ;
   34202          51 :   CPLErr result;
   34203             :   
   34204          51 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueDouble", 2, 2, swig_obj)) SWIG_fail;
   34205          51 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34206          51 :   if (!SWIG_IsOK(res1)) {
   34207           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueDouble" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34208             :   }
   34209          51 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34210          51 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   34211          51 :   if (!SWIG_IsOK(ecode2)) {
   34212           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetNoDataValueDouble" "', argument " "2"" of type '" "double""'");
   34213             :   } 
   34214          51 :   arg2 = static_cast< double >(val2);
   34215          51 :   {
   34216          51 :     const int bLocalUseExceptions = GetUseExceptions();
   34217          51 :     if ( bLocalUseExceptions ) {
   34218           4 :       pushErrorHandler();
   34219             :     }
   34220          51 :     {
   34221          51 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34222          51 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueDouble(arg1,arg2);
   34223          51 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34224             :     }
   34225          51 :     if ( bLocalUseExceptions ) {
   34226           4 :       popErrorHandler();
   34227             :     }
   34228             : #ifndef SED_HACKS
   34229             :     if ( bLocalUseExceptions ) {
   34230             :       CPLErr eclass = CPLGetLastErrorType();
   34231             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34232             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34233             :       }
   34234             :     }
   34235             : #endif
   34236             :   }
   34237          51 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34238          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; } }
   34239             :   return resultobj;
   34240             : fail:
   34241             :   return NULL;
   34242             : }
   34243             : 
   34244             : 
   34245           1 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34246           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34247           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34248           1 :   GIntBig arg2 ;
   34249           1 :   void *argp1 = 0 ;
   34250           1 :   int res1 = 0 ;
   34251           1 :   PyObject *swig_obj[2] ;
   34252           1 :   CPLErr result;
   34253             :   
   34254           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueInt64", 2, 2, swig_obj)) SWIG_fail;
   34255           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34256           1 :   if (!SWIG_IsOK(res1)) {
   34257           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34258             :   }
   34259           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34260           1 :   {
   34261           1 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   34262             :   }
   34263           1 :   {
   34264           1 :     const int bLocalUseExceptions = GetUseExceptions();
   34265           1 :     if ( bLocalUseExceptions ) {
   34266           0 :       pushErrorHandler();
   34267             :     }
   34268           1 :     {
   34269           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34270           1 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueInt64(arg1,arg2);
   34271           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34272             :     }
   34273           1 :     if ( bLocalUseExceptions ) {
   34274           0 :       popErrorHandler();
   34275             :     }
   34276             : #ifndef SED_HACKS
   34277             :     if ( bLocalUseExceptions ) {
   34278             :       CPLErr eclass = CPLGetLastErrorType();
   34279             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34280             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34281             :       }
   34282             :     }
   34283             : #endif
   34284             :   }
   34285           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34286           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; } }
   34287             :   return resultobj;
   34288             : fail:
   34289             :   return NULL;
   34290             : }
   34291             : 
   34292             : 
   34293           1 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34294           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34295           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34296           1 :   GUIntBig arg2 ;
   34297           1 :   void *argp1 = 0 ;
   34298           1 :   int res1 = 0 ;
   34299           1 :   PyObject *swig_obj[2] ;
   34300           1 :   CPLErr result;
   34301             :   
   34302           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueUInt64", 2, 2, swig_obj)) SWIG_fail;
   34303           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34304           1 :   if (!SWIG_IsOK(res1)) {
   34305           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueUInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34306             :   }
   34307           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34308           1 :   {
   34309           1 :     arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
   34310             :   }
   34311           1 :   {
   34312           1 :     const int bLocalUseExceptions = GetUseExceptions();
   34313           1 :     if ( bLocalUseExceptions ) {
   34314           0 :       pushErrorHandler();
   34315             :     }
   34316           1 :     {
   34317           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34318           1 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueUInt64(arg1,arg2);
   34319           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34320             :     }
   34321           1 :     if ( bLocalUseExceptions ) {
   34322           0 :       popErrorHandler();
   34323             :     }
   34324             : #ifndef SED_HACKS
   34325             :     if ( bLocalUseExceptions ) {
   34326             :       CPLErr eclass = CPLGetLastErrorType();
   34327             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34328             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34329             :       }
   34330             :     }
   34331             : #endif
   34332             :   }
   34333           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34334           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; } }
   34335             :   return resultobj;
   34336             : fail:
   34337             :   return NULL;
   34338             : }
   34339             : 
   34340             : 
   34341           3 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34342           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34343           3 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34344           3 :   char *arg2 = (char *) 0 ;
   34345           3 :   void *argp1 = 0 ;
   34346           3 :   int res1 = 0 ;
   34347           3 :   int res2 ;
   34348           3 :   char *buf2 = 0 ;
   34349           3 :   int alloc2 = 0 ;
   34350           3 :   PyObject *swig_obj[2] ;
   34351           3 :   CPLErr result;
   34352             :   
   34353           3 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueString", 2, 2, swig_obj)) SWIG_fail;
   34354           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34355           3 :   if (!SWIG_IsOK(res1)) {
   34356           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueString" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34357             :   }
   34358           3 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34359           3 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   34360           3 :   if (!SWIG_IsOK(res2)) {
   34361           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetNoDataValueString" "', argument " "2"" of type '" "char const *""'");
   34362             :   }
   34363           3 :   arg2 = reinterpret_cast< char * >(buf2);
   34364           3 :   {
   34365           3 :     const int bLocalUseExceptions = GetUseExceptions();
   34366           3 :     if ( bLocalUseExceptions ) {
   34367           0 :       pushErrorHandler();
   34368             :     }
   34369           3 :     {
   34370           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34371           3 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueString(arg1,(char const *)arg2);
   34372           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34373             :     }
   34374           3 :     if ( bLocalUseExceptions ) {
   34375           0 :       popErrorHandler();
   34376             :     }
   34377             : #ifndef SED_HACKS
   34378             :     if ( bLocalUseExceptions ) {
   34379             :       CPLErr eclass = CPLGetLastErrorType();
   34380             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34381             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34382             :       }
   34383             :     }
   34384             : #endif
   34385             :   }
   34386           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34387           3 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34388           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; } }
   34389             :   return resultobj;
   34390           0 : fail:
   34391           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34392             :   return NULL;
   34393             : }
   34394             : 
   34395             : 
   34396           8 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34397           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34398           8 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34399           8 :   GIntBig arg2 ;
   34400           8 :   char *arg3 = (char *) 0 ;
   34401           8 :   void *argp1 = 0 ;
   34402           8 :   int res1 = 0 ;
   34403           8 :   int alloc2 = 0 ;
   34404           8 :   bool viewIsValid2 = false ;
   34405           8 :   Py_buffer view2 ;
   34406           8 :   PyObject *swig_obj[2] ;
   34407           8 :   CPLErr result;
   34408             :   
   34409           8 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueRaw", 2, 2, swig_obj)) SWIG_fail;
   34410           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34411           8 :   if (!SWIG_IsOK(res1)) {
   34412           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueRaw" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34413             :   }
   34414           8 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34415           8 :   {
   34416             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   34417           8 :     char* ptr = NULL;
   34418           8 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   34419           0 :       SWIG_fail;
   34420             :     }
   34421           8 :     arg3 = (char *)ptr;
   34422             :   }
   34423           8 :   {
   34424           8 :     const int bLocalUseExceptions = GetUseExceptions();
   34425           8 :     if ( bLocalUseExceptions ) {
   34426           1 :       pushErrorHandler();
   34427             :     }
   34428           8 :     {
   34429           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34430           8 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueRaw(arg1,arg2,arg3);
   34431           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34432             :     }
   34433           8 :     if ( bLocalUseExceptions ) {
   34434           1 :       popErrorHandler();
   34435             :     }
   34436             : #ifndef SED_HACKS
   34437             :     if ( bLocalUseExceptions ) {
   34438             :       CPLErr eclass = CPLGetLastErrorType();
   34439             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34440             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34441             :       }
   34442             :     }
   34443             : #endif
   34444             :   }
   34445           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34446           8 :   {
   34447             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   34448           8 :     if( viewIsValid2 ) {
   34449           8 :       PyBuffer_Release(&view2);
   34450             :     }
   34451           0 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   34452           0 :       delete[] arg3;
   34453             :     }
   34454             :   }
   34455           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; } }
   34456             :   return resultobj;
   34457           0 : fail:
   34458           0 :   {
   34459             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   34460           0 :     if( viewIsValid2 ) {
   34461           0 :       PyBuffer_Release(&view2);
   34462             :     }
   34463           8 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   34464             :       delete[] arg3;
   34465             :     }
   34466             :   }
   34467             :   return NULL;
   34468             : }
   34469             : 
   34470             : 
   34471           4 : SWIGINTERN PyObject *_wrap_MDArray_DeleteNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34472           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34473           4 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34474           4 :   void *argp1 = 0 ;
   34475           4 :   int res1 = 0 ;
   34476           4 :   PyObject *swig_obj[1] ;
   34477           4 :   CPLErr result;
   34478             :   
   34479           4 :   if (!args) SWIG_fail;
   34480           4 :   swig_obj[0] = args;
   34481           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34482           4 :   if (!SWIG_IsOK(res1)) {
   34483           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_DeleteNoDataValue" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34484             :   }
   34485           4 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34486           4 :   {
   34487           4 :     const int bLocalUseExceptions = GetUseExceptions();
   34488           4 :     if ( bLocalUseExceptions ) {
   34489           0 :       pushErrorHandler();
   34490             :     }
   34491           4 :     {
   34492           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34493           4 :       result = (CPLErr)GDALMDArrayHS_DeleteNoDataValue(arg1);
   34494           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34495             :     }
   34496           4 :     if ( bLocalUseExceptions ) {
   34497           0 :       popErrorHandler();
   34498             :     }
   34499             : #ifndef SED_HACKS
   34500             :     if ( bLocalUseExceptions ) {
   34501             :       CPLErr eclass = CPLGetLastErrorType();
   34502             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34503             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34504             :       }
   34505             :     }
   34506             : #endif
   34507             :   }
   34508           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34509           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; } }
   34510             :   return resultobj;
   34511             : fail:
   34512             :   return NULL;
   34513             : }
   34514             : 
   34515             : 
   34516         100 : SWIGINTERN PyObject *_wrap_MDArray_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34517         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34518         100 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34519         100 :   double *arg2 = (double *) 0 ;
   34520         100 :   int *arg3 = (int *) 0 ;
   34521         100 :   void *argp1 = 0 ;
   34522         100 :   int res1 = 0 ;
   34523         100 :   double tmpval2 ;
   34524         100 :   int tmphasval2 ;
   34525         100 :   PyObject *swig_obj[1] ;
   34526             :   
   34527         100 :   {
   34528             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   34529         100 :     arg2 = &tmpval2;
   34530         100 :     arg3 = &tmphasval2;
   34531             :   }
   34532         100 :   if (!args) SWIG_fail;
   34533         100 :   swig_obj[0] = args;
   34534         100 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34535         100 :   if (!SWIG_IsOK(res1)) {
   34536           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetOffset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34537             :   }
   34538         100 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34539         100 :   {
   34540         100 :     const int bLocalUseExceptions = GetUseExceptions();
   34541         100 :     if ( bLocalUseExceptions ) {
   34542           1 :       pushErrorHandler();
   34543             :     }
   34544         100 :     {
   34545         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34546         100 :       GDALMDArrayHS_GetOffset(arg1,arg2,arg3);
   34547         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34548             :     }
   34549         100 :     if ( bLocalUseExceptions ) {
   34550           1 :       popErrorHandler();
   34551             :     }
   34552             : #ifndef SED_HACKS
   34553             :     if ( bLocalUseExceptions ) {
   34554             :       CPLErr eclass = CPLGetLastErrorType();
   34555             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34556             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34557             :       }
   34558             :     }
   34559             : #endif
   34560             :   }
   34561         100 :   resultobj = SWIG_Py_Void();
   34562         100 :   {
   34563             :     /* %typemap(python,argout) (double *val, int *hasval) */
   34564         100 :     PyObject *r;
   34565         100 :     if ( !*arg3 ) {
   34566          82 :       Py_INCREF(Py_None);
   34567          82 :       r = Py_None;
   34568             :     }
   34569             :     else {
   34570          18 :       r = PyFloat_FromDouble( *arg2 );
   34571             :     }
   34572             : #if SWIG_VERSION >= 0x040300
   34573             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   34574             : #else
   34575         100 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   34576             : #endif
   34577             :   }
   34578         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; } }
   34579             :   return resultobj;
   34580             : fail:
   34581             :   return NULL;
   34582             : }
   34583             : 
   34584             : 
   34585           5 : SWIGINTERN PyObject *_wrap_MDArray_GetOffsetStorageType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34586           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34587           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34588           5 :   void *argp1 = 0 ;
   34589           5 :   int res1 = 0 ;
   34590           5 :   PyObject *swig_obj[1] ;
   34591           5 :   GDALDataType result;
   34592             :   
   34593           5 :   if (!args) SWIG_fail;
   34594           5 :   swig_obj[0] = args;
   34595           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34596           5 :   if (!SWIG_IsOK(res1)) {
   34597           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetOffsetStorageType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34598             :   }
   34599           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34600           5 :   {
   34601           5 :     const int bLocalUseExceptions = GetUseExceptions();
   34602           5 :     if ( bLocalUseExceptions ) {
   34603           0 :       pushErrorHandler();
   34604             :     }
   34605           5 :     {
   34606           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34607           5 :       result = (GDALDataType)GDALMDArrayHS_GetOffsetStorageType(arg1);
   34608           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34609             :     }
   34610           5 :     if ( bLocalUseExceptions ) {
   34611           0 :       popErrorHandler();
   34612             :     }
   34613             : #ifndef SED_HACKS
   34614             :     if ( bLocalUseExceptions ) {
   34615             :       CPLErr eclass = CPLGetLastErrorType();
   34616             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34617             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34618             :       }
   34619             :     }
   34620             : #endif
   34621             :   }
   34622           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34623           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; } }
   34624             :   return resultobj;
   34625             : fail:
   34626             :   return NULL;
   34627             : }
   34628             : 
   34629             : 
   34630         103 : SWIGINTERN PyObject *_wrap_MDArray_GetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34631         103 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34632         103 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34633         103 :   double *arg2 = (double *) 0 ;
   34634         103 :   int *arg3 = (int *) 0 ;
   34635         103 :   void *argp1 = 0 ;
   34636         103 :   int res1 = 0 ;
   34637         103 :   double tmpval2 ;
   34638         103 :   int tmphasval2 ;
   34639         103 :   PyObject *swig_obj[1] ;
   34640             :   
   34641         103 :   {
   34642             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   34643         103 :     arg2 = &tmpval2;
   34644         103 :     arg3 = &tmphasval2;
   34645             :   }
   34646         103 :   if (!args) SWIG_fail;
   34647         103 :   swig_obj[0] = args;
   34648         103 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34649         103 :   if (!SWIG_IsOK(res1)) {
   34650           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetScale" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34651             :   }
   34652         103 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34653         103 :   {
   34654         103 :     const int bLocalUseExceptions = GetUseExceptions();
   34655         103 :     if ( bLocalUseExceptions ) {
   34656           1 :       pushErrorHandler();
   34657             :     }
   34658         103 :     {
   34659         103 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34660         103 :       GDALMDArrayHS_GetScale(arg1,arg2,arg3);
   34661         103 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34662             :     }
   34663         103 :     if ( bLocalUseExceptions ) {
   34664           1 :       popErrorHandler();
   34665             :     }
   34666             : #ifndef SED_HACKS
   34667             :     if ( bLocalUseExceptions ) {
   34668             :       CPLErr eclass = CPLGetLastErrorType();
   34669             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34670             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34671             :       }
   34672             :     }
   34673             : #endif
   34674             :   }
   34675         103 :   resultobj = SWIG_Py_Void();
   34676         103 :   {
   34677             :     /* %typemap(python,argout) (double *val, int *hasval) */
   34678         103 :     PyObject *r;
   34679         103 :     if ( !*arg3 ) {
   34680          82 :       Py_INCREF(Py_None);
   34681          82 :       r = Py_None;
   34682             :     }
   34683             :     else {
   34684          21 :       r = PyFloat_FromDouble( *arg2 );
   34685             :     }
   34686             : #if SWIG_VERSION >= 0x040300
   34687             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   34688             : #else
   34689         103 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   34690             : #endif
   34691             :   }
   34692         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; } }
   34693             :   return resultobj;
   34694             : fail:
   34695             :   return NULL;
   34696             : }
   34697             : 
   34698             : 
   34699           5 : SWIGINTERN PyObject *_wrap_MDArray_GetScaleStorageType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34700           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34701           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34702           5 :   void *argp1 = 0 ;
   34703           5 :   int res1 = 0 ;
   34704           5 :   PyObject *swig_obj[1] ;
   34705           5 :   GDALDataType result;
   34706             :   
   34707           5 :   if (!args) SWIG_fail;
   34708           5 :   swig_obj[0] = args;
   34709           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34710           5 :   if (!SWIG_IsOK(res1)) {
   34711           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetScaleStorageType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34712             :   }
   34713           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34714           5 :   {
   34715           5 :     const int bLocalUseExceptions = GetUseExceptions();
   34716           5 :     if ( bLocalUseExceptions ) {
   34717           0 :       pushErrorHandler();
   34718             :     }
   34719           5 :     {
   34720           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34721           5 :       result = (GDALDataType)GDALMDArrayHS_GetScaleStorageType(arg1);
   34722           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34723             :     }
   34724           5 :     if ( bLocalUseExceptions ) {
   34725           0 :       popErrorHandler();
   34726             :     }
   34727             : #ifndef SED_HACKS
   34728             :     if ( bLocalUseExceptions ) {
   34729             :       CPLErr eclass = CPLGetLastErrorType();
   34730             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34731             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34732             :       }
   34733             :     }
   34734             : #endif
   34735             :   }
   34736           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34737           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; } }
   34738             :   return resultobj;
   34739             : fail:
   34740             :   return NULL;
   34741             : }
   34742             : 
   34743             : 
   34744          21 : SWIGINTERN PyObject *_wrap_MDArray_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   34745          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34746          21 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34747          21 :   double arg2 ;
   34748          21 :   GDALDataType arg3 = (GDALDataType) GDT_Unknown ;
   34749          21 :   void *argp1 = 0 ;
   34750          21 :   int res1 = 0 ;
   34751          21 :   double val2 ;
   34752          21 :   int ecode2 = 0 ;
   34753          21 :   PyObject * obj0 = 0 ;
   34754          21 :   PyObject * obj1 = 0 ;
   34755          21 :   PyObject * obj2 = 0 ;
   34756          21 :   char * kwnames[] = {
   34757             :     (char *)"self",  (char *)"val",  (char *)"storageType",  NULL 
   34758             :   };
   34759          21 :   CPLErr result;
   34760             :   
   34761          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:MDArray_SetOffset", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   34762          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34763          21 :   if (!SWIG_IsOK(res1)) {
   34764           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetOffset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34765             :   }
   34766          21 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34767          21 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   34768          21 :   if (!SWIG_IsOK(ecode2)) {
   34769           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetOffset" "', argument " "2"" of type '" "double""'");
   34770             :   } 
   34771          21 :   arg2 = static_cast< double >(val2);
   34772          21 :   if (obj2) {
   34773           2 :     {
   34774             :       // %typemap(in) GDALDataType
   34775           2 :       int val = 0;
   34776           2 :       int ecode = SWIG_AsVal_int(obj2, &val);
   34777           2 :       if (!SWIG_IsOK(ecode)) {
   34778           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   34779             :       }
   34780           2 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   34781             :       {
   34782           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   34783             :       }
   34784             :       arg3 = static_cast<GDALDataType>(val);
   34785             :     }
   34786             :   }
   34787          21 :   {
   34788          21 :     const int bLocalUseExceptions = GetUseExceptions();
   34789          21 :     if ( bLocalUseExceptions ) {
   34790           2 :       pushErrorHandler();
   34791             :     }
   34792          21 :     {
   34793          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34794          21 :       result = (CPLErr)GDALMDArrayHS_SetOffset(arg1,arg2,arg3);
   34795          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34796             :     }
   34797          21 :     if ( bLocalUseExceptions ) {
   34798           2 :       popErrorHandler();
   34799             :     }
   34800             : #ifndef SED_HACKS
   34801             :     if ( bLocalUseExceptions ) {
   34802             :       CPLErr eclass = CPLGetLastErrorType();
   34803             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34804             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34805             :       }
   34806             :     }
   34807             : #endif
   34808             :   }
   34809          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34810          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; } }
   34811             :   return resultobj;
   34812             : fail:
   34813             :   return NULL;
   34814             : }
   34815             : 
   34816             : 
   34817          21 : SWIGINTERN PyObject *_wrap_MDArray_SetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   34818          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34819          21 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34820          21 :   double arg2 ;
   34821          21 :   GDALDataType arg3 = (GDALDataType) GDT_Unknown ;
   34822          21 :   void *argp1 = 0 ;
   34823          21 :   int res1 = 0 ;
   34824          21 :   double val2 ;
   34825          21 :   int ecode2 = 0 ;
   34826          21 :   PyObject * obj0 = 0 ;
   34827          21 :   PyObject * obj1 = 0 ;
   34828          21 :   PyObject * obj2 = 0 ;
   34829          21 :   char * kwnames[] = {
   34830             :     (char *)"self",  (char *)"val",  (char *)"storageType",  NULL 
   34831             :   };
   34832          21 :   CPLErr result;
   34833             :   
   34834          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:MDArray_SetScale", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   34835          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34836          21 :   if (!SWIG_IsOK(res1)) {
   34837           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetScale" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34838             :   }
   34839          21 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34840          21 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   34841          21 :   if (!SWIG_IsOK(ecode2)) {
   34842           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetScale" "', argument " "2"" of type '" "double""'");
   34843             :   } 
   34844          21 :   arg2 = static_cast< double >(val2);
   34845          21 :   if (obj2) {
   34846           2 :     {
   34847             :       // %typemap(in) GDALDataType
   34848           2 :       int val = 0;
   34849           2 :       int ecode = SWIG_AsVal_int(obj2, &val);
   34850           2 :       if (!SWIG_IsOK(ecode)) {
   34851           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   34852             :       }
   34853           2 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   34854             :       {
   34855           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   34856             :       }
   34857             :       arg3 = static_cast<GDALDataType>(val);
   34858             :     }
   34859             :   }
   34860          21 :   {
   34861          21 :     const int bLocalUseExceptions = GetUseExceptions();
   34862          21 :     if ( bLocalUseExceptions ) {
   34863           2 :       pushErrorHandler();
   34864             :     }
   34865          21 :     {
   34866          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34867          21 :       result = (CPLErr)GDALMDArrayHS_SetScale(arg1,arg2,arg3);
   34868          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34869             :     }
   34870          21 :     if ( bLocalUseExceptions ) {
   34871           2 :       popErrorHandler();
   34872             :     }
   34873             : #ifndef SED_HACKS
   34874             :     if ( bLocalUseExceptions ) {
   34875             :       CPLErr eclass = CPLGetLastErrorType();
   34876             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34877             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34878             :       }
   34879             :     }
   34880             : #endif
   34881             :   }
   34882          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34883          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; } }
   34884             :   return resultobj;
   34885             : fail:
   34886             :   return NULL;
   34887             : }
   34888             : 
   34889             : 
   34890          15 : SWIGINTERN PyObject *_wrap_MDArray_SetUnit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34891          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34892          15 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34893          15 :   char *arg2 = (char *) 0 ;
   34894          15 :   void *argp1 = 0 ;
   34895          15 :   int res1 = 0 ;
   34896          15 :   int res2 ;
   34897          15 :   char *buf2 = 0 ;
   34898          15 :   int alloc2 = 0 ;
   34899          15 :   PyObject *swig_obj[2] ;
   34900          15 :   CPLErr result;
   34901             :   
   34902          15 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetUnit", 2, 2, swig_obj)) SWIG_fail;
   34903          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34904          15 :   if (!SWIG_IsOK(res1)) {
   34905           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetUnit" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34906             :   }
   34907          15 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34908          15 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   34909          15 :   if (!SWIG_IsOK(res2)) {
   34910           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetUnit" "', argument " "2"" of type '" "char const *""'");
   34911             :   }
   34912          15 :   arg2 = reinterpret_cast< char * >(buf2);
   34913          15 :   {
   34914          15 :     const int bLocalUseExceptions = GetUseExceptions();
   34915          15 :     if ( bLocalUseExceptions ) {
   34916           4 :       pushErrorHandler();
   34917             :     }
   34918          15 :     {
   34919          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34920          15 :       result = (CPLErr)GDALMDArrayHS_SetUnit(arg1,(char const *)arg2);
   34921          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34922             :     }
   34923          15 :     if ( bLocalUseExceptions ) {
   34924           4 :       popErrorHandler();
   34925             :     }
   34926             : #ifndef SED_HACKS
   34927             :     if ( bLocalUseExceptions ) {
   34928             :       CPLErr eclass = CPLGetLastErrorType();
   34929             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34930             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34931             :       }
   34932             :     }
   34933             : #endif
   34934             :   }
   34935          15 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34936          15 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34937          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; } }
   34938             :   return resultobj;
   34939           0 : fail:
   34940           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34941             :   return NULL;
   34942             : }
   34943             : 
   34944             : 
   34945         111 : SWIGINTERN PyObject *_wrap_MDArray_GetUnit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34946         111 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34947         111 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34948         111 :   void *argp1 = 0 ;
   34949         111 :   int res1 = 0 ;
   34950         111 :   PyObject *swig_obj[1] ;
   34951         111 :   char *result = 0 ;
   34952             :   
   34953         111 :   if (!args) SWIG_fail;
   34954         111 :   swig_obj[0] = args;
   34955         111 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34956         111 :   if (!SWIG_IsOK(res1)) {
   34957           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetUnit" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34958             :   }
   34959         111 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34960         111 :   {
   34961         111 :     const int bLocalUseExceptions = GetUseExceptions();
   34962         111 :     if ( bLocalUseExceptions ) {
   34963           7 :       pushErrorHandler();
   34964             :     }
   34965         111 :     {
   34966         111 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34967         111 :       result = (char *)GDALMDArrayHS_GetUnit(arg1);
   34968         111 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34969             :     }
   34970         111 :     if ( bLocalUseExceptions ) {
   34971           7 :       popErrorHandler();
   34972             :     }
   34973             : #ifndef SED_HACKS
   34974             :     if ( bLocalUseExceptions ) {
   34975             :       CPLErr eclass = CPLGetLastErrorType();
   34976             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34977             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34978             :       }
   34979             :     }
   34980             : #endif
   34981             :   }
   34982         111 :   resultobj = SWIG_FromCharPtr((const char *)result);
   34983         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; } }
   34984             :   return resultobj;
   34985             : fail:
   34986             :   return NULL;
   34987             : }
   34988             : 
   34989             : 
   34990          30 : SWIGINTERN PyObject *_wrap_MDArray_SetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34991          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34992          30 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34993          30 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
   34994          30 :   void *argp1 = 0 ;
   34995          30 :   int res1 = 0 ;
   34996          30 :   void *argp2 = 0 ;
   34997          30 :   int res2 = 0 ;
   34998          30 :   PyObject *swig_obj[2] ;
   34999          30 :   OGRErr result;
   35000             :   
   35001          30 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
   35002          30 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35003          30 :   if (!SWIG_IsOK(res1)) {
   35004           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetSpatialRef" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35005             :   }
   35006          30 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35007          30 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   35008          30 :   if (!SWIG_IsOK(res2)) {
   35009           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   35010             :   }
   35011          30 :   arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   35012          30 :   {
   35013          30 :     const int bLocalUseExceptions = GetUseExceptions();
   35014          30 :     if ( bLocalUseExceptions ) {
   35015           4 :       pushErrorHandler();
   35016             :     }
   35017          30 :     {
   35018          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35019          30 :       result = (OGRErr)GDALMDArrayHS_SetSpatialRef(arg1,arg2);
   35020          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35021             :     }
   35022          30 :     if ( bLocalUseExceptions ) {
   35023           4 :       popErrorHandler();
   35024             :     }
   35025             : #ifndef SED_HACKS
   35026             :     if ( bLocalUseExceptions ) {
   35027             :       CPLErr eclass = CPLGetLastErrorType();
   35028             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35029             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35030             :       }
   35031             :     }
   35032             : #endif
   35033             :   }
   35034          30 :   {
   35035             :     /* %typemap(out) OGRErr */
   35036          30 :     if ( result != 0 && GetUseExceptions()) {
   35037           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   35038           0 :       if( pszMessage[0] != '\0' )
   35039           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   35040             :       else
   35041           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   35042           0 :       SWIG_fail;
   35043             :     }
   35044             :   }
   35045          30 :   {
   35046             :     /* %typemap(ret) OGRErr */
   35047          30 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   35048          30 :       resultobj = PyInt_FromLong( result );
   35049             :     }
   35050             :   }
   35051          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; } }
   35052             :   return resultobj;
   35053             : fail:
   35054             :   return NULL;
   35055             : }
   35056             : 
   35057             : 
   35058          77 : SWIGINTERN PyObject *_wrap_MDArray_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35059          77 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35060          77 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35061          77 :   void *argp1 = 0 ;
   35062          77 :   int res1 = 0 ;
   35063          77 :   PyObject *swig_obj[1] ;
   35064          77 :   OSRSpatialReferenceShadow *result = 0 ;
   35065             :   
   35066          77 :   if (!args) SWIG_fail;
   35067          77 :   swig_obj[0] = args;
   35068          77 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35069          77 :   if (!SWIG_IsOK(res1)) {
   35070           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetSpatialRef" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35071             :   }
   35072          77 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35073          77 :   {
   35074          77 :     const int bLocalUseExceptions = GetUseExceptions();
   35075          77 :     if ( bLocalUseExceptions ) {
   35076          13 :       pushErrorHandler();
   35077             :     }
   35078          77 :     {
   35079          77 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35080          77 :       result = (OSRSpatialReferenceShadow *)GDALMDArrayHS_GetSpatialRef(arg1);
   35081          77 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35082             :     }
   35083          77 :     if ( bLocalUseExceptions ) {
   35084          13 :       popErrorHandler();
   35085             :     }
   35086             : #ifndef SED_HACKS
   35087             :     if ( bLocalUseExceptions ) {
   35088             :       CPLErr eclass = CPLGetLastErrorType();
   35089             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35090             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35091             :       }
   35092             :     }
   35093             : #endif
   35094             :   }
   35095          77 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   35096          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; } }
   35097             :   return resultobj;
   35098             : fail:
   35099             :   return NULL;
   35100             : }
   35101             : 
   35102             : 
   35103         431 : SWIGINTERN PyObject *_wrap_MDArray_GetView(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35104         431 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35105         431 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35106         431 :   char *arg2 = (char *) 0 ;
   35107         431 :   void *argp1 = 0 ;
   35108         431 :   int res1 = 0 ;
   35109         431 :   int res2 ;
   35110         431 :   char *buf2 = 0 ;
   35111         431 :   int alloc2 = 0 ;
   35112         431 :   PyObject *swig_obj[2] ;
   35113         431 :   GDALMDArrayHS *result = 0 ;
   35114             :   
   35115         431 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetView", 2, 2, swig_obj)) SWIG_fail;
   35116         431 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35117         431 :   if (!SWIG_IsOK(res1)) {
   35118           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetView" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35119             :   }
   35120         431 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35121         431 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   35122         431 :   if (!SWIG_IsOK(res2)) {
   35123           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetView" "', argument " "2"" of type '" "char const *""'");
   35124             :   }
   35125         431 :   arg2 = reinterpret_cast< char * >(buf2);
   35126         431 :   {
   35127         431 :     if (!arg2) {
   35128           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   35129             :     }
   35130             :   }
   35131         430 :   {
   35132         430 :     const int bLocalUseExceptions = GetUseExceptions();
   35133         430 :     if ( bLocalUseExceptions ) {
   35134           8 :       pushErrorHandler();
   35135             :     }
   35136         430 :     {
   35137         430 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35138         430 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetView(arg1,(char const *)arg2);
   35139         430 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35140             :     }
   35141         430 :     if ( bLocalUseExceptions ) {
   35142           8 :       popErrorHandler();
   35143             :     }
   35144             : #ifndef SED_HACKS
   35145             :     if ( bLocalUseExceptions ) {
   35146             :       CPLErr eclass = CPLGetLastErrorType();
   35147             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35148             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35149             :       }
   35150             :     }
   35151             : #endif
   35152             :   }
   35153         430 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35154         430 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35155         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; } }
   35156             :   return resultobj;
   35157           1 : fail:
   35158           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35159             :   return NULL;
   35160             : }
   35161             : 
   35162             : 
   35163          44 : SWIGINTERN PyObject *_wrap_MDArray_Transpose(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35164          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35165          44 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35166          44 :   int arg2 ;
   35167          44 :   int *arg3 = (int *) 0 ;
   35168          44 :   void *argp1 = 0 ;
   35169          44 :   int res1 = 0 ;
   35170          44 :   PyObject *swig_obj[2] ;
   35171          44 :   GDALMDArrayHS *result = 0 ;
   35172             :   
   35173          44 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Transpose", 2, 2, swig_obj)) SWIG_fail;
   35174          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35175          44 :   if (!SWIG_IsOK(res1)) {
   35176           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Transpose" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35177             :   }
   35178          44 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35179          44 :   {
   35180             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   35181          44 :     arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
   35182          44 :     if( arg2 < 0 ) {
   35183           0 :       SWIG_fail;
   35184             :     }
   35185             :   }
   35186          44 :   {
   35187          44 :     const int bLocalUseExceptions = GetUseExceptions();
   35188          44 :     if ( bLocalUseExceptions ) {
   35189           1 :       pushErrorHandler();
   35190             :     }
   35191          44 :     {
   35192          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35193          44 :       result = (GDALMDArrayHS *)GDALMDArrayHS_Transpose(arg1,arg2,arg3);
   35194          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35195             :     }
   35196          44 :     if ( bLocalUseExceptions ) {
   35197           1 :       popErrorHandler();
   35198             :     }
   35199             : #ifndef SED_HACKS
   35200             :     if ( bLocalUseExceptions ) {
   35201             :       CPLErr eclass = CPLGetLastErrorType();
   35202             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35203             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35204             :       }
   35205             :     }
   35206             : #endif
   35207             :   }
   35208          44 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35209          44 :   {
   35210             :     /* %typemap(freearg) (int nList, int* pList) */
   35211          44 :     free(arg3);
   35212             :   }
   35213          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; } }
   35214             :   return resultobj;
   35215           0 : fail:
   35216           0 :   {
   35217             :     /* %typemap(freearg) (int nList, int* pList) */
   35218           0 :     free(arg3);
   35219             :   }
   35220           0 :   return NULL;
   35221             : }
   35222             : 
   35223             : 
   35224          13 : SWIGINTERN PyObject *_wrap_MDArray_GetUnscaled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35225          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35226          13 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35227          13 :   void *argp1 = 0 ;
   35228          13 :   int res1 = 0 ;
   35229          13 :   PyObject *swig_obj[1] ;
   35230          13 :   GDALMDArrayHS *result = 0 ;
   35231             :   
   35232          13 :   if (!args) SWIG_fail;
   35233          13 :   swig_obj[0] = args;
   35234          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35235          13 :   if (!SWIG_IsOK(res1)) {
   35236           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetUnscaled" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35237             :   }
   35238          13 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35239          13 :   {
   35240          13 :     const int bLocalUseExceptions = GetUseExceptions();
   35241          13 :     if ( bLocalUseExceptions ) {
   35242           0 :       pushErrorHandler();
   35243             :     }
   35244          13 :     {
   35245          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35246          13 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetUnscaled(arg1);
   35247          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35248             :     }
   35249          13 :     if ( bLocalUseExceptions ) {
   35250           0 :       popErrorHandler();
   35251             :     }
   35252             : #ifndef SED_HACKS
   35253             :     if ( bLocalUseExceptions ) {
   35254             :       CPLErr eclass = CPLGetLastErrorType();
   35255             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35256             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35257             :       }
   35258             :     }
   35259             : #endif
   35260             :   }
   35261          13 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35262          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; } }
   35263             :   return resultobj;
   35264             : fail:
   35265             :   return NULL;
   35266             : }
   35267             : 
   35268             : 
   35269          35 : SWIGINTERN PyObject *_wrap_MDArray_GetMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35270          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35271          35 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35272          35 :   char **arg2 = (char **) 0 ;
   35273          35 :   void *argp1 = 0 ;
   35274          35 :   int res1 = 0 ;
   35275          35 :   PyObject *swig_obj[2] ;
   35276          35 :   GDALMDArrayHS *result = 0 ;
   35277             :   
   35278          35 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetMask", 1, 2, swig_obj)) SWIG_fail;
   35279          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35280          35 :   if (!SWIG_IsOK(res1)) {
   35281           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetMask" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35282             :   }
   35283          35 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35284          35 :   if (swig_obj[1]) {
   35285          14 :     {
   35286             :       /* %typemap(in) char **dict */
   35287          14 :       arg2 = NULL;
   35288          14 :       if ( PySequence_Check( swig_obj[1] ) ) {
   35289          14 :         int bErr = FALSE;
   35290          14 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   35291          14 :         if ( bErr )
   35292             :         {
   35293           0 :           SWIG_fail;
   35294             :         }
   35295             :       }
   35296           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   35297           0 :         int bErr = FALSE;
   35298           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   35299           0 :         if ( bErr )
   35300             :         {
   35301           0 :           SWIG_fail;
   35302             :         }
   35303             :       }
   35304             :       else {
   35305           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35306           0 :         SWIG_fail;
   35307             :       }
   35308             :     }
   35309             :   }
   35310          35 :   {
   35311          35 :     const int bLocalUseExceptions = GetUseExceptions();
   35312          35 :     if ( bLocalUseExceptions ) {
   35313          14 :       pushErrorHandler();
   35314             :     }
   35315          35 :     {
   35316          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35317          35 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetMask(arg1,arg2);
   35318          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35319             :     }
   35320          35 :     if ( bLocalUseExceptions ) {
   35321          14 :       popErrorHandler();
   35322             :     }
   35323             : #ifndef SED_HACKS
   35324             :     if ( bLocalUseExceptions ) {
   35325             :       CPLErr eclass = CPLGetLastErrorType();
   35326             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35327             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35328             :       }
   35329             :     }
   35330             : #endif
   35331             :   }
   35332          35 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35333          35 :   {
   35334             :     /* %typemap(freearg) char **dict */
   35335          35 :     CSLDestroy( arg2 );
   35336             :   }
   35337          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; } }
   35338             :   return resultobj;
   35339           0 : fail:
   35340           0 :   {
   35341             :     /* %typemap(freearg) char **dict */
   35342           0 :     CSLDestroy( arg2 );
   35343             :   }
   35344             :   return NULL;
   35345             : }
   35346             : 
   35347             : 
   35348          22 : SWIGINTERN PyObject *_wrap_MDArray_GetGridded(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   35349          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35350          22 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35351          22 :   char *arg2 = (char *) 0 ;
   35352          22 :   GDALMDArrayHS *arg3 = (GDALMDArrayHS *) NULL ;
   35353          22 :   GDALMDArrayHS *arg4 = (GDALMDArrayHS *) NULL ;
   35354          22 :   char **arg5 = (char **) 0 ;
   35355          22 :   void *argp1 = 0 ;
   35356          22 :   int res1 = 0 ;
   35357          22 :   int res2 ;
   35358          22 :   char *buf2 = 0 ;
   35359          22 :   int alloc2 = 0 ;
   35360          22 :   void *argp3 = 0 ;
   35361          22 :   int res3 = 0 ;
   35362          22 :   void *argp4 = 0 ;
   35363          22 :   int res4 = 0 ;
   35364          22 :   PyObject * obj0 = 0 ;
   35365          22 :   PyObject * obj1 = 0 ;
   35366          22 :   PyObject * obj2 = 0 ;
   35367          22 :   PyObject * obj3 = 0 ;
   35368          22 :   PyObject * obj4 = 0 ;
   35369          22 :   char * kwnames[] = {
   35370             :     (char *)"self",  (char *)"pszGridOptions",  (char *)"xArray",  (char *)"yArray",  (char *)"options",  NULL 
   35371             :   };
   35372          22 :   GDALMDArrayHS *result = 0 ;
   35373             :   
   35374          22 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:MDArray_GetGridded", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   35375          22 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35376          22 :   if (!SWIG_IsOK(res1)) {
   35377           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetGridded" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35378             :   }
   35379          22 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35380          22 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   35381          22 :   if (!SWIG_IsOK(res2)) {
   35382           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetGridded" "', argument " "2"" of type '" "char const *""'");
   35383             :   }
   35384          22 :   arg2 = reinterpret_cast< char * >(buf2);
   35385          22 :   if (obj2) {
   35386          14 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35387          14 :     if (!SWIG_IsOK(res3)) {
   35388           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MDArray_GetGridded" "', argument " "3"" of type '" "GDALMDArrayHS *""'"); 
   35389             :     }
   35390          14 :     arg3 = reinterpret_cast< GDALMDArrayHS * >(argp3);
   35391             :   }
   35392          22 :   if (obj3) {
   35393          13 :     res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35394          13 :     if (!SWIG_IsOK(res4)) {
   35395           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MDArray_GetGridded" "', argument " "4"" of type '" "GDALMDArrayHS *""'"); 
   35396             :     }
   35397          13 :     arg4 = reinterpret_cast< GDALMDArrayHS * >(argp4);
   35398             :   }
   35399          22 :   if (obj4) {
   35400           3 :     {
   35401             :       /* %typemap(in) char **dict */
   35402           3 :       arg5 = NULL;
   35403           3 :       if ( PySequence_Check( obj4 ) ) {
   35404           3 :         int bErr = FALSE;
   35405           3 :         arg5 = CSLFromPySequence(obj4, &bErr);
   35406           3 :         if ( bErr )
   35407             :         {
   35408           0 :           SWIG_fail;
   35409             :         }
   35410             :       }
   35411           0 :       else if ( PyMapping_Check( obj4 ) ) {
   35412           0 :         int bErr = FALSE;
   35413           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   35414           0 :         if ( bErr )
   35415             :         {
   35416           0 :           SWIG_fail;
   35417             :         }
   35418             :       }
   35419             :       else {
   35420           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35421           0 :         SWIG_fail;
   35422             :       }
   35423             :     }
   35424             :   }
   35425          22 :   {
   35426          22 :     if (!arg2) {
   35427           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   35428             :     }
   35429             :   }
   35430          22 :   {
   35431          22 :     const int bLocalUseExceptions = GetUseExceptions();
   35432          22 :     if ( bLocalUseExceptions ) {
   35433           0 :       pushErrorHandler();
   35434             :     }
   35435          22 :     {
   35436          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35437          22 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetGridded(arg1,(char const *)arg2,arg3,arg4,arg5);
   35438          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35439             :     }
   35440          22 :     if ( bLocalUseExceptions ) {
   35441           0 :       popErrorHandler();
   35442             :     }
   35443             : #ifndef SED_HACKS
   35444             :     if ( bLocalUseExceptions ) {
   35445             :       CPLErr eclass = CPLGetLastErrorType();
   35446             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35447             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35448             :       }
   35449             :     }
   35450             : #endif
   35451             :   }
   35452          22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35453          22 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35454          22 :   {
   35455             :     /* %typemap(freearg) char **dict */
   35456          22 :     CSLDestroy( arg5 );
   35457             :   }
   35458          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; } }
   35459             :   return resultobj;
   35460           0 : fail:
   35461           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35462           0 :   {
   35463             :     /* %typemap(freearg) char **dict */
   35464           0 :     CSLDestroy( arg5 );
   35465             :   }
   35466             :   return NULL;
   35467             : }
   35468             : 
   35469             : 
   35470          93 : SWIGINTERN PyObject *_wrap_MDArray_AsClassicDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35471          93 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35472          93 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35473          93 :   size_t arg2 ;
   35474          93 :   size_t arg3 ;
   35475          93 :   GDALGroupHS *arg4 = (GDALGroupHS *) NULL ;
   35476          93 :   char **arg5 = (char **) 0 ;
   35477          93 :   void *argp1 = 0 ;
   35478          93 :   int res1 = 0 ;
   35479          93 :   size_t val2 ;
   35480          93 :   int ecode2 = 0 ;
   35481          93 :   size_t val3 ;
   35482          93 :   int ecode3 = 0 ;
   35483          93 :   void *argp4 = 0 ;
   35484          93 :   int res4 = 0 ;
   35485          93 :   PyObject *swig_obj[5] ;
   35486          93 :   GDALDatasetShadow *result = 0 ;
   35487             :   
   35488          93 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_AsClassicDataset", 3, 5, swig_obj)) SWIG_fail;
   35489          93 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35490          93 :   if (!SWIG_IsOK(res1)) {
   35491           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_AsClassicDataset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35492             :   }
   35493          93 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35494          93 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   35495          93 :   if (!SWIG_IsOK(ecode2)) {
   35496           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_AsClassicDataset" "', argument " "2"" of type '" "size_t""'");
   35497             :   } 
   35498          93 :   arg2 = static_cast< size_t >(val2);
   35499          93 :   ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
   35500          93 :   if (!SWIG_IsOK(ecode3)) {
   35501           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MDArray_AsClassicDataset" "', argument " "3"" of type '" "size_t""'");
   35502             :   } 
   35503          93 :   arg3 = static_cast< size_t >(val3);
   35504          93 :   if (swig_obj[3]) {
   35505          52 :     res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   35506          52 :     if (!SWIG_IsOK(res4)) {
   35507           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MDArray_AsClassicDataset" "', argument " "4"" of type '" "GDALGroupHS *""'"); 
   35508             :     }
   35509          52 :     arg4 = reinterpret_cast< GDALGroupHS * >(argp4);
   35510             :   }
   35511          93 :   if (swig_obj[4]) {
   35512          52 :     {
   35513             :       /* %typemap(in) char **dict */
   35514          52 :       arg5 = NULL;
   35515          52 :       if ( PySequence_Check( swig_obj[4] ) ) {
   35516          52 :         int bErr = FALSE;
   35517          52 :         arg5 = CSLFromPySequence(swig_obj[4], &bErr);
   35518          52 :         if ( bErr )
   35519             :         {
   35520           0 :           SWIG_fail;
   35521             :         }
   35522             :       }
   35523           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   35524           0 :         int bErr = FALSE;
   35525           0 :         arg5 = CSLFromPyMapping(swig_obj[4], &bErr);
   35526           0 :         if ( bErr )
   35527             :         {
   35528           0 :           SWIG_fail;
   35529             :         }
   35530             :       }
   35531             :       else {
   35532           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35533           0 :         SWIG_fail;
   35534             :       }
   35535             :     }
   35536             :   }
   35537          93 :   {
   35538          93 :     const int bLocalUseExceptions = GetUseExceptions();
   35539          93 :     if ( bLocalUseExceptions ) {
   35540          65 :       pushErrorHandler();
   35541             :     }
   35542          93 :     {
   35543          93 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35544          93 :       result = (GDALDatasetShadow *)GDALMDArrayHS_AsClassicDataset(arg1,arg2,arg3,arg4,arg5);
   35545          93 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35546             :     }
   35547          93 :     if ( bLocalUseExceptions ) {
   35548          65 :       popErrorHandler();
   35549             :     }
   35550             : #ifndef SED_HACKS
   35551             :     if ( bLocalUseExceptions ) {
   35552             :       CPLErr eclass = CPLGetLastErrorType();
   35553             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35554             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35555             :       }
   35556             :     }
   35557             : #endif
   35558             :   }
   35559          93 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   35560          93 :   {
   35561             :     /* %typemap(freearg) char **dict */
   35562          93 :     CSLDestroy( arg5 );
   35563             :   }
   35564         179 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   35565             :   return resultobj;
   35566           0 : fail:
   35567           0 :   {
   35568             :     /* %typemap(freearg) char **dict */
   35569           0 :     CSLDestroy( arg5 );
   35570             :   }
   35571             :   return NULL;
   35572             : }
   35573             : 
   35574             : 
   35575          15 : SWIGINTERN PyObject *_wrap_MDArray_GetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   35576          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35577          15 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35578          15 :   bool arg2 = (bool) FALSE ;
   35579          15 :   bool arg3 = (bool) TRUE ;
   35580          15 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   35581          15 :   void *arg5 = (void *) NULL ;
   35582          15 :   void *argp1 = 0 ;
   35583          15 :   int res1 = 0 ;
   35584          15 :   bool val2 ;
   35585          15 :   int ecode2 = 0 ;
   35586          15 :   bool val3 ;
   35587          15 :   int ecode3 = 0 ;
   35588          15 :   PyObject * obj0 = 0 ;
   35589          15 :   PyObject * obj1 = 0 ;
   35590          15 :   PyObject * obj2 = 0 ;
   35591          15 :   PyObject * obj3 = 0 ;
   35592          15 :   PyObject * obj4 = 0 ;
   35593          15 :   char * kwnames[] = {
   35594             :     (char *)"self",  (char *)"approx_ok",  (char *)"force",  (char *)"callback",  (char *)"callback_data",  NULL 
   35595             :   };
   35596          15 :   Statistics *result = 0 ;
   35597             :   
   35598             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   35599          15 :   PyProgressData *psProgressInfo;
   35600          15 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   35601          15 :   psProgressInfo->nLastReported = -1;
   35602          15 :   psProgressInfo->psPyCallback = NULL;
   35603          15 :   psProgressInfo->psPyCallbackData = NULL;
   35604          15 :   arg5 = psProgressInfo;
   35605          15 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:MDArray_GetStatistics", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   35606          15 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35607          15 :   if (!SWIG_IsOK(res1)) {
   35608           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetStatistics" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35609             :   }
   35610          15 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35611          15 :   if (obj1) {
   35612          13 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   35613          13 :     if (!SWIG_IsOK(ecode2)) {
   35614           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_GetStatistics" "', argument " "2"" of type '" "bool""'");
   35615             :     } 
   35616             :     arg2 = static_cast< bool >(val2);
   35617             :   }
   35618          15 :   if (obj2) {
   35619          13 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   35620          13 :     if (!SWIG_IsOK(ecode3)) {
   35621           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MDArray_GetStatistics" "', argument " "3"" of type '" "bool""'");
   35622             :     } 
   35623             :     arg3 = static_cast< bool >(val3);
   35624             :   }
   35625          15 :   if (obj3) {
   35626           0 :     {
   35627             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   35628             :       /* callback_func typemap */
   35629             :       
   35630             :       /* In some cases 0 is passed instead of None. */
   35631             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   35632           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   35633             :       {
   35634           0 :         if( PyLong_AsLong(obj3) == 0 )
   35635             :         {
   35636           0 :           obj3 = Py_None;
   35637             :         }
   35638             :       }
   35639             :       
   35640           0 :       if (obj3 && obj3 != Py_None ) {
   35641           0 :         void* cbfunction = NULL;
   35642           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   35643             :             (void**)&cbfunction,
   35644             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   35645             :             SWIG_POINTER_EXCEPTION | 0 ));
   35646             :         
   35647           0 :         if ( cbfunction == GDALTermProgress ) {
   35648             :           arg4 = GDALTermProgress;
   35649             :         } else {
   35650           0 :           if (!PyCallable_Check(obj3)) {
   35651           0 :             PyErr_SetString( PyExc_RuntimeError,
   35652             :               "Object given is not a Python function" );
   35653           0 :             SWIG_fail;
   35654             :           }
   35655           0 :           psProgressInfo->psPyCallback = obj3;
   35656           0 :           arg4 = PyProgressProxy;
   35657             :         }
   35658             :         
   35659             :       }
   35660             :       
   35661             :     }
   35662             :   }
   35663          15 :   if (obj4) {
   35664           0 :     {
   35665             :       /* %typemap(in) ( void* callback_data=NULL)  */
   35666           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   35667             :     }
   35668             :   }
   35669          15 :   {
   35670          15 :     const int bLocalUseExceptions = GetUseExceptions();
   35671          15 :     if ( bLocalUseExceptions ) {
   35672           5 :       pushErrorHandler();
   35673             :     }
   35674          15 :     {
   35675          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35676          15 :       result = (Statistics *)GDALMDArrayHS_GetStatistics(arg1,arg2,arg3,arg4,arg5);
   35677          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35678             :     }
   35679          15 :     if ( bLocalUseExceptions ) {
   35680           5 :       popErrorHandler();
   35681             :     }
   35682             : #ifndef SED_HACKS
   35683             :     if ( bLocalUseExceptions ) {
   35684             :       CPLErr eclass = CPLGetLastErrorType();
   35685             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35686             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35687             :       }
   35688             :     }
   35689             : #endif
   35690             :   }
   35691          15 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, 0 |  0 );
   35692          15 :   {
   35693             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35694             :     
   35695          15 :     CPLFree(psProgressInfo);
   35696             :     
   35697             :   }
   35698          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; } }
   35699             :   return resultobj;
   35700           0 : fail:
   35701           0 :   {
   35702             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35703             :     
   35704           0 :     CPLFree(psProgressInfo);
   35705             :     
   35706             :   }
   35707             :   return NULL;
   35708             : }
   35709             : 
   35710             : 
   35711           4 : SWIGINTERN PyObject *_wrap_MDArray_ComputeStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   35712           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35713           4 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35714           4 :   bool arg2 = (bool) FALSE ;
   35715           4 :   GDALProgressFunc arg3 = (GDALProgressFunc) NULL ;
   35716           4 :   void *arg4 = (void *) NULL ;
   35717           4 :   char **arg5 = (char **) 0 ;
   35718           4 :   void *argp1 = 0 ;
   35719           4 :   int res1 = 0 ;
   35720           4 :   bool val2 ;
   35721           4 :   int ecode2 = 0 ;
   35722           4 :   PyObject * obj0 = 0 ;
   35723           4 :   PyObject * obj1 = 0 ;
   35724           4 :   PyObject * obj2 = 0 ;
   35725           4 :   PyObject * obj3 = 0 ;
   35726           4 :   PyObject * obj4 = 0 ;
   35727           4 :   char * kwnames[] = {
   35728             :     (char *)"self",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   35729             :   };
   35730           4 :   Statistics *result = 0 ;
   35731             :   
   35732             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   35733           4 :   PyProgressData *psProgressInfo;
   35734           4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   35735           4 :   psProgressInfo->nLastReported = -1;
   35736           4 :   psProgressInfo->psPyCallback = NULL;
   35737           4 :   psProgressInfo->psPyCallbackData = NULL;
   35738           4 :   arg4 = psProgressInfo;
   35739           4 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:MDArray_ComputeStatistics", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   35740           4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35741           4 :   if (!SWIG_IsOK(res1)) {
   35742           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_ComputeStatistics" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35743             :   }
   35744           4 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35745           4 :   if (obj1) {
   35746           2 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   35747           2 :     if (!SWIG_IsOK(ecode2)) {
   35748           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
   35749             :     } 
   35750             :     arg2 = static_cast< bool >(val2);
   35751             :   }
   35752           4 :   if (obj2) {
   35753           0 :     {
   35754             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   35755             :       /* callback_func typemap */
   35756             :       
   35757             :       /* In some cases 0 is passed instead of None. */
   35758             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   35759           0 :       if ( PyLong_Check(obj2) || PyInt_Check(obj2) )
   35760             :       {
   35761           0 :         if( PyLong_AsLong(obj2) == 0 )
   35762             :         {
   35763           0 :           obj2 = Py_None;
   35764             :         }
   35765             :       }
   35766             :       
   35767           0 :       if (obj2 && obj2 != Py_None ) {
   35768           0 :         void* cbfunction = NULL;
   35769           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj2,
   35770             :             (void**)&cbfunction,
   35771             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   35772             :             SWIG_POINTER_EXCEPTION | 0 ));
   35773             :         
   35774           0 :         if ( cbfunction == GDALTermProgress ) {
   35775             :           arg3 = GDALTermProgress;
   35776             :         } else {
   35777           0 :           if (!PyCallable_Check(obj2)) {
   35778           0 :             PyErr_SetString( PyExc_RuntimeError,
   35779             :               "Object given is not a Python function" );
   35780           0 :             SWIG_fail;
   35781             :           }
   35782           0 :           psProgressInfo->psPyCallback = obj2;
   35783           0 :           arg3 = PyProgressProxy;
   35784             :         }
   35785             :         
   35786             :       }
   35787             :       
   35788             :     }
   35789             :   }
   35790           4 :   if (obj3) {
   35791           0 :     {
   35792             :       /* %typemap(in) ( void* callback_data=NULL)  */
   35793           0 :       psProgressInfo->psPyCallbackData = obj3 ;
   35794             :     }
   35795             :   }
   35796           4 :   if (obj4) {
   35797           2 :     {
   35798             :       /* %typemap(in) char **dict */
   35799           2 :       arg5 = NULL;
   35800           2 :       if ( PySequence_Check( obj4 ) ) {
   35801           2 :         int bErr = FALSE;
   35802           2 :         arg5 = CSLFromPySequence(obj4, &bErr);
   35803           2 :         if ( bErr )
   35804             :         {
   35805           0 :           SWIG_fail;
   35806             :         }
   35807             :       }
   35808           0 :       else if ( PyMapping_Check( obj4 ) ) {
   35809           0 :         int bErr = FALSE;
   35810           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   35811           0 :         if ( bErr )
   35812             :         {
   35813           0 :           SWIG_fail;
   35814             :         }
   35815             :       }
   35816             :       else {
   35817           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35818           0 :         SWIG_fail;
   35819             :       }
   35820             :     }
   35821             :   }
   35822           4 :   {
   35823           4 :     const int bLocalUseExceptions = GetUseExceptions();
   35824           4 :     if ( bLocalUseExceptions ) {
   35825           2 :       pushErrorHandler();
   35826             :     }
   35827           4 :     {
   35828           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35829           4 :       result = (Statistics *)GDALMDArrayHS_ComputeStatistics(arg1,arg2,arg3,arg4,arg5);
   35830           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35831             :     }
   35832           4 :     if ( bLocalUseExceptions ) {
   35833           2 :       popErrorHandler();
   35834             :     }
   35835             : #ifndef SED_HACKS
   35836             :     if ( bLocalUseExceptions ) {
   35837             :       CPLErr eclass = CPLGetLastErrorType();
   35838             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35839             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35840             :       }
   35841             :     }
   35842             : #endif
   35843             :   }
   35844           4 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, 0 |  0 );
   35845           4 :   {
   35846             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35847             :     
   35848           4 :     CPLFree(psProgressInfo);
   35849             :     
   35850             :   }
   35851           4 :   {
   35852             :     /* %typemap(freearg) char **dict */
   35853           4 :     CSLDestroy( arg5 );
   35854             :   }
   35855           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; } }
   35856             :   return resultobj;
   35857           0 : fail:
   35858           0 :   {
   35859             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35860             :     
   35861           0 :     CPLFree(psProgressInfo);
   35862             :     
   35863             :   }
   35864           0 :   {
   35865             :     /* %typemap(freearg) char **dict */
   35866           0 :     CSLDestroy( arg5 );
   35867             :   }
   35868             :   return NULL;
   35869             : }
   35870             : 
   35871             : 
   35872          34 : SWIGINTERN PyObject *_wrap_MDArray_GetResampled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35873          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35874          34 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35875          34 :   int arg2 ;
   35876          34 :   GDALDimensionHS **arg3 = (GDALDimensionHS **) 0 ;
   35877          34 :   GDALRIOResampleAlg arg4 ;
   35878          34 :   OSRSpatialReferenceShadow **arg5 = (OSRSpatialReferenceShadow **) 0 ;
   35879          34 :   char **arg6 = (char **) 0 ;
   35880          34 :   void *argp1 = 0 ;
   35881          34 :   int res1 = 0 ;
   35882          34 :   OSRSpatialReferenceShadow *val5 ;
   35883          34 :   PyObject *swig_obj[5] ;
   35884          34 :   GDALMDArrayHS *result = 0 ;
   35885             :   
   35886          34 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetResampled", 4, 5, swig_obj)) SWIG_fail;
   35887          34 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35888          34 :   if (!SWIG_IsOK(res1)) {
   35889           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetResampled" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35890             :   }
   35891          34 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35892          34 :   {
   35893             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDimensionHS *optional_##GDALDimensionHS)*/
   35894          34 :     if ( !PySequence_Check(swig_obj[1]) ) {
   35895           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   35896           0 :       SWIG_fail;
   35897             :     }
   35898          34 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   35899          34 :     if( size > (Py_ssize_t)INT_MAX ) {
   35900           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   35901           0 :       SWIG_fail;
   35902             :     }
   35903          34 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDimensionHS*) ) {
   35904           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   35905           0 :       SWIG_fail;
   35906             :     }
   35907          34 :     arg2 = (int)size;
   35908          34 :     arg3 = (GDALDimensionHS**) VSIMalloc(arg2*sizeof(GDALDimensionHS*));
   35909          34 :     if( !arg3) {
   35910           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   35911           0 :       SWIG_fail;
   35912             :     }
   35913             :     
   35914         112 :     for( int i = 0; i<arg2; i++ ) {
   35915          78 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   35916          78 :       GDALDimensionHS* rawobjectpointer = NULL;
   35917          78 :       if( o != Py_None )
   35918             :       {
   35919           8 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_EXCEPTION | 0 ));
   35920           8 :         if (!rawobjectpointer) {
   35921           0 :           Py_DECREF(o);
   35922           0 :           PyErr_SetString(PyExc_TypeError, "object of wrong GDALDimensionHS");
   35923           0 :           SWIG_fail;
   35924             :         }
   35925             :       }
   35926          78 :       arg3[i] = rawobjectpointer;
   35927          78 :       Py_DECREF(o);
   35928             :       
   35929             :     }
   35930             :   }
   35931          34 :   {
   35932             :     // %typemap(in) GDALRIOResampleAlg
   35933          34 :     int val = 0;
   35934          34 :     int ecode = SWIG_AsVal_int(swig_obj[2], &val);
   35935          34 :     if (!SWIG_IsOK(ecode)) {
   35936           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   35937             :     }
   35938          34 :     if( val < 0 ||
   35939          34 :       ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   35940          34 :         val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   35941             :       val > static_cast<int>(GRIORA_LAST) )
   35942             :     {
   35943           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   35944             :     }
   35945          34 :     arg4 = static_cast< GDALRIOResampleAlg >(val);
   35946             :   }
   35947          34 :   {
   35948             :     /* %typemap(in) (OSRSpatialReferenceShadow** optional_OSRSpatialReferenceShadow) */
   35949          34 :     if ( swig_obj[3] == Py_None ) {
   35950             :       arg5 = NULL;
   35951             :     }
   35952             :     else {
   35953           1 :       void* argp = NULL;
   35954           1 :       int res = SWIG_ConvertPtr(swig_obj[3], &argp, SWIGTYPE_p_OSRSpatialReferenceShadow,  0  | 0);
   35955           1 :       if (!SWIG_IsOK(res)) {
   35956           0 :         SWIG_exception_fail(SWIG_ArgError(res), "argument of type != OSRSpatialReferenceShadow");
   35957             :       }
   35958           1 :       val5 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp);
   35959           1 :       arg5 = &val5;
   35960             :     }
   35961             :   }
   35962          34 :   if (swig_obj[4]) {
   35963           5 :     {
   35964             :       /* %typemap(in) char **dict */
   35965           5 :       arg6 = NULL;
   35966           5 :       if ( PySequence_Check( swig_obj[4] ) ) {
   35967           5 :         int bErr = FALSE;
   35968           5 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   35969           5 :         if ( bErr )
   35970             :         {
   35971           0 :           SWIG_fail;
   35972             :         }
   35973             :       }
   35974           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   35975           0 :         int bErr = FALSE;
   35976           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   35977           0 :         if ( bErr )
   35978             :         {
   35979           0 :           SWIG_fail;
   35980             :         }
   35981             :       }
   35982             :       else {
   35983           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35984           0 :         SWIG_fail;
   35985             :       }
   35986             :     }
   35987             :   }
   35988          34 :   {
   35989          34 :     const int bLocalUseExceptions = GetUseExceptions();
   35990          34 :     if ( bLocalUseExceptions ) {
   35991           0 :       pushErrorHandler();
   35992             :     }
   35993          34 :     {
   35994          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35995          34 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetResampled(arg1,arg2,arg3,arg4,arg5,arg6);
   35996          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35997             :     }
   35998          34 :     if ( bLocalUseExceptions ) {
   35999           0 :       popErrorHandler();
   36000             :     }
   36001             : #ifndef SED_HACKS
   36002             :     if ( bLocalUseExceptions ) {
   36003             :       CPLErr eclass = CPLGetLastErrorType();
   36004             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36005             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36006             :       }
   36007             :     }
   36008             : #endif
   36009             :   }
   36010          34 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   36011          34 :   {
   36012             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjectsItemMaybeNull)*/
   36013          34 :     CPLFree( arg3 );
   36014             :   }
   36015          34 :   {
   36016             :     /* %typemap(freearg) char **dict */
   36017          34 :     CSLDestroy( arg6 );
   36018             :   }
   36019          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; } }
   36020             :   return resultobj;
   36021           0 : fail:
   36022           0 :   {
   36023             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjectsItemMaybeNull)*/
   36024           0 :     CPLFree( arg3 );
   36025             :   }
   36026           0 :   {
   36027             :     /* %typemap(freearg) char **dict */
   36028           0 :     CSLDestroy( arg6 );
   36029             :   }
   36030             :   return NULL;
   36031             : }
   36032             : 
   36033             : 
   36034           7 : SWIGINTERN PyObject *_wrap_MDArray_GetMeshGrid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36035           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36036           7 :   int arg1 ;
   36037           7 :   GDALMDArrayHS **arg2 = (GDALMDArrayHS **) 0 ;
   36038           7 :   GDALMDArrayHS ***arg3 = (GDALMDArrayHS ***) 0 ;
   36039           7 :   size_t *arg4 = (size_t *) 0 ;
   36040           7 :   char **arg5 = (char **) 0 ;
   36041           7 :   GDALMDArrayHS **arrays3 = 0 ;
   36042           7 :   size_t nCount3 = 0 ;
   36043           7 :   PyObject *swig_obj[2] ;
   36044             :   
   36045           7 :   {
   36046             :     /* %typemap(in,numinputs=0) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   36047           7 :     arg3 = &arrays3;
   36048           7 :     arg4 = &nCount3;
   36049             :   }
   36050           7 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetMeshGrid", 1, 2, swig_obj)) SWIG_fail;
   36051           7 :   {
   36052             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALMDArrayHS *optional_##GDALMDArrayHS)*/
   36053           7 :     if ( !PySequence_Check(swig_obj[0]) ) {
   36054           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   36055           0 :       SWIG_fail;
   36056             :     }
   36057           7 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   36058           7 :     if( size > (Py_ssize_t)INT_MAX ) {
   36059           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   36060           0 :       SWIG_fail;
   36061             :     }
   36062           7 :     if( (size_t)size > SIZE_MAX / sizeof(GDALMDArrayHS*) ) {
   36063           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   36064           0 :       SWIG_fail;
   36065             :     }
   36066           7 :     arg1 = (int)size;
   36067           7 :     arg2 = (GDALMDArrayHS**) VSIMalloc(arg1*sizeof(GDALMDArrayHS*));
   36068           7 :     if( !arg2) {
   36069           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   36070           0 :       SWIG_fail;
   36071             :     }
   36072             :     
   36073          20 :     for( int i = 0; i<arg1; i++ ) {
   36074          13 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   36075          13 :       GDALMDArrayHS* rawobjectpointer = NULL;
   36076          13 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_EXCEPTION | 0 ));
   36077          13 :       if (!rawobjectpointer) {
   36078           0 :         Py_DECREF(o);
   36079           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALMDArrayHS");
   36080           0 :         SWIG_fail;
   36081             :       }
   36082          13 :       arg2[i] = rawobjectpointer;
   36083          13 :       Py_DECREF(o);
   36084             :       
   36085             :     }
   36086             :   }
   36087           7 :   if (swig_obj[1]) {
   36088           5 :     {
   36089             :       /* %typemap(in) char **dict */
   36090           5 :       arg5 = NULL;
   36091           5 :       if ( PySequence_Check( swig_obj[1] ) ) {
   36092           5 :         int bErr = FALSE;
   36093           5 :         arg5 = CSLFromPySequence(swig_obj[1], &bErr);
   36094           5 :         if ( bErr )
   36095             :         {
   36096           0 :           SWIG_fail;
   36097             :         }
   36098             :       }
   36099           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   36100           0 :         int bErr = FALSE;
   36101           0 :         arg5 = CSLFromPyMapping(swig_obj[1], &bErr);
   36102           0 :         if ( bErr )
   36103             :         {
   36104           0 :           SWIG_fail;
   36105             :         }
   36106             :       }
   36107             :       else {
   36108           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   36109           0 :         SWIG_fail;
   36110             :       }
   36111             :     }
   36112             :   }
   36113           7 :   {
   36114           7 :     const int bLocalUseExceptions = GetUseExceptions();
   36115           7 :     if ( bLocalUseExceptions ) {
   36116           7 :       pushErrorHandler();
   36117             :     }
   36118           7 :     {
   36119           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36120           7 :       GDALMDArrayHS_GetMeshGrid(arg1,arg2,arg3,arg4,arg5);
   36121           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36122             :     }
   36123           7 :     if ( bLocalUseExceptions ) {
   36124           7 :       popErrorHandler();
   36125             :     }
   36126             : #ifndef SED_HACKS
   36127             :     if ( bLocalUseExceptions ) {
   36128             :       CPLErr eclass = CPLGetLastErrorType();
   36129             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36130             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36131             :       }
   36132             :     }
   36133             : #endif
   36134             :   }
   36135           7 :   resultobj = SWIG_Py_Void();
   36136           7 :   {
   36137             :     /* %typemap(argout) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   36138           7 :     Py_DECREF(resultobj);
   36139           7 :     resultobj = PyList_New( *arg4 );
   36140           7 :     if( !resultobj ) {
   36141           0 :       SWIG_fail;
   36142             :     }
   36143          17 :     for( size_t i = 0; i < *arg4; i++ ) {
   36144          10 :       PyList_SetItem(resultobj, i,
   36145          10 :         SWIG_NewPointerObj((void*)(*arg3)[i],SWIGTYPE_p_GDALMDArrayHS,SWIG_POINTER_OWN) );
   36146             :       /* We have borrowed the GDALMDArrayHS */
   36147          10 :       (*arg3)[i] = NULL;
   36148             :     }
   36149             :   }
   36150           7 :   {
   36151             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   36152           7 :     CPLFree( arg2 );
   36153             :   }
   36154           7 :   {
   36155             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   36156           7 :     GDALReleaseArrays(*arg3, *arg4);
   36157             :   }
   36158           7 :   {
   36159             :     /* %typemap(freearg) char **dict */
   36160           7 :     CSLDestroy( arg5 );
   36161             :   }
   36162          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; } }
   36163             :   return resultobj;
   36164           0 : fail:
   36165           0 :   {
   36166             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   36167           0 :     CPLFree( arg2 );
   36168             :   }
   36169           0 :   {
   36170             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   36171           0 :     GDALReleaseArrays(*arg3, *arg4);
   36172             :   }
   36173           0 :   {
   36174             :     /* %typemap(freearg) char **dict */
   36175           0 :     CSLDestroy( arg5 );
   36176             :   }
   36177             :   return NULL;
   36178             : }
   36179             : 
   36180             : 
   36181           7 : SWIGINTERN PyObject *_wrap_MDArray_Cache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36182           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36183           7 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   36184           7 :   char **arg2 = (char **) NULL ;
   36185           7 :   void *argp1 = 0 ;
   36186           7 :   int res1 = 0 ;
   36187           7 :   PyObject *swig_obj[2] ;
   36188           7 :   bool result;
   36189             :   
   36190           7 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Cache", 1, 2, swig_obj)) SWIG_fail;
   36191           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   36192           7 :   if (!SWIG_IsOK(res1)) {
   36193           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Cache" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   36194             :   }
   36195           7 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   36196           7 :   if (swig_obj[1]) {
   36197           1 :     {
   36198             :       /* %typemap(in) char **dict */
   36199           1 :       arg2 = NULL;
   36200           1 :       if ( PySequence_Check( swig_obj[1] ) ) {
   36201           1 :         int bErr = FALSE;
   36202           1 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   36203           1 :         if ( bErr )
   36204             :         {
   36205           0 :           SWIG_fail;
   36206             :         }
   36207             :       }
   36208           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   36209           0 :         int bErr = FALSE;
   36210           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   36211           0 :         if ( bErr )
   36212             :         {
   36213           0 :           SWIG_fail;
   36214             :         }
   36215             :       }
   36216             :       else {
   36217           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   36218           0 :         SWIG_fail;
   36219             :       }
   36220             :     }
   36221             :   }
   36222           7 :   {
   36223           7 :     const int bLocalUseExceptions = GetUseExceptions();
   36224           7 :     if ( bLocalUseExceptions ) {
   36225           1 :       pushErrorHandler();
   36226             :     }
   36227           7 :     {
   36228           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36229           7 :       result = (bool)GDALMDArrayHS_Cache(arg1,arg2);
   36230           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36231             :     }
   36232           7 :     if ( bLocalUseExceptions ) {
   36233           1 :       popErrorHandler();
   36234             :     }
   36235             : #ifndef SED_HACKS
   36236             :     if ( bLocalUseExceptions ) {
   36237             :       CPLErr eclass = CPLGetLastErrorType();
   36238             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36239             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36240             :       }
   36241             :     }
   36242             : #endif
   36243             :   }
   36244           7 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   36245           7 :   {
   36246             :     /* %typemap(freearg) char **dict */
   36247           7 :     CSLDestroy( arg2 );
   36248             :   }
   36249           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; } }
   36250             :   return resultobj;
   36251           0 : fail:
   36252           0 :   {
   36253             :     /* %typemap(freearg) char **dict */
   36254           0 :     CSLDestroy( arg2 );
   36255             :   }
   36256             :   return NULL;
   36257             : }
   36258             : 
   36259             : 
   36260          28 : SWIGINTERN PyObject *_wrap_MDArray_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36261          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36262          28 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   36263          28 :   char *arg2 = (char *) 0 ;
   36264          28 :   void *argp1 = 0 ;
   36265          28 :   int res1 = 0 ;
   36266          28 :   int res2 ;
   36267          28 :   char *buf2 = 0 ;
   36268          28 :   int alloc2 = 0 ;
   36269          28 :   PyObject *swig_obj[2] ;
   36270          28 :   CPLErr result;
   36271             :   
   36272          28 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Rename", 2, 2, swig_obj)) SWIG_fail;
   36273          28 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   36274          28 :   if (!SWIG_IsOK(res1)) {
   36275           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Rename" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   36276             :   }
   36277          28 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   36278          28 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   36279          28 :   if (!SWIG_IsOK(res2)) {
   36280           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_Rename" "', argument " "2"" of type '" "char const *""'");
   36281             :   }
   36282          28 :   arg2 = reinterpret_cast< char * >(buf2);
   36283          28 :   {
   36284          28 :     const int bLocalUseExceptions = GetUseExceptions();
   36285          28 :     if ( bLocalUseExceptions ) {
   36286          28 :       pushErrorHandler();
   36287             :     }
   36288          28 :     {
   36289          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36290          28 :       result = (CPLErr)GDALMDArrayHS_Rename(arg1,(char const *)arg2);
   36291          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36292             :     }
   36293          28 :     if ( bLocalUseExceptions ) {
   36294          28 :       popErrorHandler();
   36295             :     }
   36296             : #ifndef SED_HACKS
   36297             :     if ( bLocalUseExceptions ) {
   36298             :       CPLErr eclass = CPLGetLastErrorType();
   36299             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36300             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36301             :       }
   36302             :     }
   36303             : #endif
   36304             :   }
   36305          28 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36306          28 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   36307          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; } }
   36308             :   return resultobj;
   36309           0 : fail:
   36310           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   36311             :   return NULL;
   36312             : }
   36313             : 
   36314             : 
   36315         277 : SWIGINTERN PyObject *MDArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36316         277 :   PyObject *obj;
   36317         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   36318         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMDArrayHS, SWIG_NewClientData(obj));
   36319         277 :   return SWIG_Py_Void();
   36320             : }
   36321             : 
   36322         737 : SWIGINTERN PyObject *_wrap_delete_Attribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36323         737 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36324         737 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36325         737 :   void *argp1 = 0 ;
   36326         737 :   int res1 = 0 ;
   36327         737 :   PyObject *swig_obj[1] ;
   36328             :   
   36329         737 :   if (!args) SWIG_fail;
   36330         737 :   swig_obj[0] = args;
   36331         737 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_DISOWN |  0 );
   36332         737 :   if (!SWIG_IsOK(res1)) {
   36333           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Attribute" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36334             :   }
   36335         737 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36336         737 :   {
   36337         737 :     const int bLocalUseExceptions = GetUseExceptions();
   36338         737 :     if ( bLocalUseExceptions ) {
   36339         372 :       pushErrorHandler();
   36340             :     }
   36341         737 :     {
   36342         737 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36343         737 :       delete_GDALAttributeHS(arg1);
   36344         737 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36345             :     }
   36346         737 :     if ( bLocalUseExceptions ) {
   36347         372 :       popErrorHandler();
   36348             :     }
   36349             : #ifndef SED_HACKS
   36350             :     if ( bLocalUseExceptions ) {
   36351             :       CPLErr eclass = CPLGetLastErrorType();
   36352             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36353             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36354             :       }
   36355             :     }
   36356             : #endif
   36357             :   }
   36358         737 :   resultobj = SWIG_Py_Void();
   36359         737 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36360             :   return resultobj;
   36361             : fail:
   36362             :   return NULL;
   36363             : }
   36364             : 
   36365             : 
   36366         361 : SWIGINTERN PyObject *_wrap_Attribute_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36367         361 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36368         361 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36369         361 :   void *argp1 = 0 ;
   36370         361 :   int res1 = 0 ;
   36371         361 :   PyObject *swig_obj[1] ;
   36372         361 :   char *result = 0 ;
   36373             :   
   36374         361 :   if (!args) SWIG_fail;
   36375         361 :   swig_obj[0] = args;
   36376         361 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36377         361 :   if (!SWIG_IsOK(res1)) {
   36378           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetName" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36379             :   }
   36380         361 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36381         361 :   {
   36382         361 :     const int bLocalUseExceptions = GetUseExceptions();
   36383         361 :     if ( bLocalUseExceptions ) {
   36384         149 :       pushErrorHandler();
   36385             :     }
   36386         361 :     {
   36387         361 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36388         361 :       result = (char *)GDALAttributeHS_GetName(arg1);
   36389         361 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36390             :     }
   36391         361 :     if ( bLocalUseExceptions ) {
   36392         149 :       popErrorHandler();
   36393             :     }
   36394             : #ifndef SED_HACKS
   36395             :     if ( bLocalUseExceptions ) {
   36396             :       CPLErr eclass = CPLGetLastErrorType();
   36397             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36398             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36399             :       }
   36400             :     }
   36401             : #endif
   36402             :   }
   36403         361 :   resultobj = SWIG_FromCharPtr((const char *)result);
   36404         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; } }
   36405             :   return resultobj;
   36406             : fail:
   36407             :   return NULL;
   36408             : }
   36409             : 
   36410             : 
   36411          49 : SWIGINTERN PyObject *_wrap_Attribute_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36412          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36413          49 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36414          49 :   void *argp1 = 0 ;
   36415          49 :   int res1 = 0 ;
   36416          49 :   PyObject *swig_obj[1] ;
   36417          49 :   char *result = 0 ;
   36418             :   
   36419          49 :   if (!args) SWIG_fail;
   36420          49 :   swig_obj[0] = args;
   36421          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36422          49 :   if (!SWIG_IsOK(res1)) {
   36423           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetFullName" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36424             :   }
   36425          49 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36426          49 :   {
   36427          49 :     const int bLocalUseExceptions = GetUseExceptions();
   36428          49 :     if ( bLocalUseExceptions ) {
   36429          41 :       pushErrorHandler();
   36430             :     }
   36431          49 :     {
   36432          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36433          49 :       result = (char *)GDALAttributeHS_GetFullName(arg1);
   36434          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36435             :     }
   36436          49 :     if ( bLocalUseExceptions ) {
   36437          41 :       popErrorHandler();
   36438             :     }
   36439             : #ifndef SED_HACKS
   36440             :     if ( bLocalUseExceptions ) {
   36441             :       CPLErr eclass = CPLGetLastErrorType();
   36442             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36443             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36444             :       }
   36445             :     }
   36446             : #endif
   36447             :   }
   36448          49 :   resultobj = SWIG_FromCharPtr((const char *)result);
   36449          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; } }
   36450             :   return resultobj;
   36451             : fail:
   36452             :   return NULL;
   36453             : }
   36454             : 
   36455             : 
   36456         176 : SWIGINTERN PyObject *_wrap_Attribute_GetTotalElementsCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36457         176 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36458         176 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36459         176 :   void *argp1 = 0 ;
   36460         176 :   int res1 = 0 ;
   36461         176 :   PyObject *swig_obj[1] ;
   36462         176 :   GUIntBig result;
   36463             :   
   36464         176 :   if (!args) SWIG_fail;
   36465         176 :   swig_obj[0] = args;
   36466         176 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36467         176 :   if (!SWIG_IsOK(res1)) {
   36468           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetTotalElementsCount" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36469             :   }
   36470         176 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36471         176 :   {
   36472         176 :     const int bLocalUseExceptions = GetUseExceptions();
   36473         176 :     if ( bLocalUseExceptions ) {
   36474          52 :       pushErrorHandler();
   36475             :     }
   36476         176 :     {
   36477         176 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36478         176 :       result = GDALAttributeHS_GetTotalElementsCount(arg1);
   36479         176 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36480             :     }
   36481         176 :     if ( bLocalUseExceptions ) {
   36482          52 :       popErrorHandler();
   36483             :     }
   36484             : #ifndef SED_HACKS
   36485             :     if ( bLocalUseExceptions ) {
   36486             :       CPLErr eclass = CPLGetLastErrorType();
   36487             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36488             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36489             :       }
   36490             :     }
   36491             : #endif
   36492             :   }
   36493         176 :   {
   36494         176 :     resultobj = PyLong_FromUnsignedLongLong(result);
   36495             :   }
   36496         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; } }
   36497             :   return resultobj;
   36498             : fail:
   36499             :   return NULL;
   36500             : }
   36501             : 
   36502             : 
   36503          12 : SWIGINTERN PyObject *_wrap_Attribute_GetDimensionCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36504          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36505          12 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36506          12 :   void *argp1 = 0 ;
   36507          12 :   int res1 = 0 ;
   36508          12 :   PyObject *swig_obj[1] ;
   36509          12 :   size_t result;
   36510             :   
   36511          12 :   if (!args) SWIG_fail;
   36512          12 :   swig_obj[0] = args;
   36513          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36514          12 :   if (!SWIG_IsOK(res1)) {
   36515           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDimensionCount" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36516             :   }
   36517          12 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36518          12 :   {
   36519          12 :     const int bLocalUseExceptions = GetUseExceptions();
   36520          12 :     if ( bLocalUseExceptions ) {
   36521           6 :       pushErrorHandler();
   36522             :     }
   36523          12 :     {
   36524          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36525          12 :       result = GDALAttributeHS_GetDimensionCount(arg1);
   36526          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36527             :     }
   36528          12 :     if ( bLocalUseExceptions ) {
   36529           6 :       popErrorHandler();
   36530             :     }
   36531             : #ifndef SED_HACKS
   36532             :     if ( bLocalUseExceptions ) {
   36533             :       CPLErr eclass = CPLGetLastErrorType();
   36534             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36535             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36536             :       }
   36537             :     }
   36538             : #endif
   36539             :   }
   36540          12 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   36541          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; } }
   36542             :   return resultobj;
   36543             : fail:
   36544             :   return NULL;
   36545             : }
   36546             : 
   36547             : 
   36548          11 : SWIGINTERN PyObject *_wrap_Attribute_GetDimensionsSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36549          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36550          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36551          11 :   GUIntBig **arg2 = (GUIntBig **) 0 ;
   36552          11 :   size_t *arg3 = (size_t *) 0 ;
   36553          11 :   void *argp1 = 0 ;
   36554          11 :   int res1 = 0 ;
   36555          11 :   GUIntBig *vals2 = 0 ;
   36556          11 :   size_t nCount2 = 0 ;
   36557          11 :   PyObject *swig_obj[1] ;
   36558             :   
   36559          11 :   {
   36560             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   36561          11 :     arg2 = &vals2;
   36562          11 :     arg3 = &nCount2;
   36563             :   }
   36564          11 :   if (!args) SWIG_fail;
   36565          11 :   swig_obj[0] = args;
   36566          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36567          11 :   if (!SWIG_IsOK(res1)) {
   36568           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDimensionsSize" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36569             :   }
   36570          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36571          11 :   {
   36572          11 :     const int bLocalUseExceptions = GetUseExceptions();
   36573          11 :     if ( bLocalUseExceptions ) {
   36574           5 :       pushErrorHandler();
   36575             :     }
   36576          11 :     {
   36577          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36578          11 :       GDALAttributeHS_GetDimensionsSize(arg1,arg2,arg3);
   36579          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36580             :     }
   36581          11 :     if ( bLocalUseExceptions ) {
   36582           5 :       popErrorHandler();
   36583             :     }
   36584             : #ifndef SED_HACKS
   36585             :     if ( bLocalUseExceptions ) {
   36586             :       CPLErr eclass = CPLGetLastErrorType();
   36587             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36588             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36589             :       }
   36590             :     }
   36591             : #endif
   36592             :   }
   36593          11 :   resultobj = SWIG_Py_Void();
   36594          11 :   {
   36595             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   36596          11 :     Py_DECREF(resultobj);
   36597          11 :     resultobj = PyList_New( *arg3 );
   36598          11 :     if( !resultobj ) {
   36599           0 :       SWIG_fail;
   36600             :     }
   36601          22 :     for( size_t i = 0; i < *arg3; i++ ) {
   36602          11 :       char szTmp[32];
   36603          11 :       snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg2)[i]);
   36604          11 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   36605          11 :       PyList_SetItem(resultobj, i, o );
   36606             :     }
   36607             :   }
   36608          11 :   {
   36609             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   36610          11 :     CPLFree(*arg2);
   36611             :   }
   36612          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; } }
   36613             :   return resultobj;
   36614           0 : fail:
   36615           0 :   {
   36616             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   36617           0 :     CPLFree(*arg2);
   36618             :   }
   36619             :   return NULL;
   36620             : }
   36621             : 
   36622             : 
   36623         418 : SWIGINTERN PyObject *_wrap_Attribute_GetDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36624         418 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36625         418 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36626         418 :   void *argp1 = 0 ;
   36627         418 :   int res1 = 0 ;
   36628         418 :   PyObject *swig_obj[1] ;
   36629         418 :   GDALExtendedDataTypeHS *result = 0 ;
   36630             :   
   36631         418 :   if (!args) SWIG_fail;
   36632         418 :   swig_obj[0] = args;
   36633         418 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36634         418 :   if (!SWIG_IsOK(res1)) {
   36635           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDataType" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36636             :   }
   36637         418 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36638         418 :   {
   36639         418 :     const int bLocalUseExceptions = GetUseExceptions();
   36640         418 :     if ( bLocalUseExceptions ) {
   36641         203 :       pushErrorHandler();
   36642             :     }
   36643         418 :     {
   36644         418 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36645         418 :       result = (GDALExtendedDataTypeHS *)GDALAttributeHS_GetDataType(arg1);
   36646         418 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36647             :     }
   36648         418 :     if ( bLocalUseExceptions ) {
   36649         203 :       popErrorHandler();
   36650             :     }
   36651             : #ifndef SED_HACKS
   36652             :     if ( bLocalUseExceptions ) {
   36653             :       CPLErr eclass = CPLGetLastErrorType();
   36654             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36655             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36656             :       }
   36657             :     }
   36658             : #endif
   36659             :   }
   36660         418 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   36661         418 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36662             :   return resultobj;
   36663             : fail:
   36664             :   return NULL;
   36665             : }
   36666             : 
   36667             : 
   36668          10 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36669          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36670          10 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36671          10 :   void **arg2 = (void **) 0 ;
   36672          10 :   void *argp1 = 0 ;
   36673          10 :   int res1 = 0 ;
   36674          10 :   void *pyObject2 = NULL ;
   36675          10 :   PyObject *swig_obj[1] ;
   36676          10 :   CPLErr result;
   36677             :   
   36678          10 :   {
   36679             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   36680          10 :     arg2 = &pyObject2;
   36681             :   }
   36682          10 :   if (!args) SWIG_fail;
   36683          10 :   swig_obj[0] = args;
   36684          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36685          10 :   if (!SWIG_IsOK(res1)) {
   36686           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsRaw" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36687             :   }
   36688          10 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36689          10 :   {
   36690          10 :     const int bLocalUseExceptions = GetUseExceptions();
   36691          10 :     if ( bLocalUseExceptions ) {
   36692           4 :       pushErrorHandler();
   36693             :     }
   36694          10 :     {
   36695          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36696          10 :       result = (CPLErr)GDALAttributeHS_ReadAsRaw(arg1,arg2);
   36697          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36698             :     }
   36699          10 :     if ( bLocalUseExceptions ) {
   36700           4 :       popErrorHandler();
   36701             :     }
   36702             : #ifndef SED_HACKS
   36703             :     if ( bLocalUseExceptions ) {
   36704             :       CPLErr eclass = CPLGetLastErrorType();
   36705             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36706             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36707             :       }
   36708             :     }
   36709             : #endif
   36710             :   }
   36711          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36712          10 :   {
   36713             :     /* %typemap(argout) ( void **outPythonObject ) */
   36714          10 :     Py_XDECREF(resultobj);
   36715          10 :     if (*arg2)
   36716             :     {
   36717             :       resultobj = (PyObject*)*arg2;
   36718             :     }
   36719             :     else
   36720             :     {
   36721           4 :       resultobj = Py_None;
   36722           4 :       Py_INCREF(resultobj);
   36723             :     }
   36724             :   }
   36725          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; } }
   36726             :   return resultobj;
   36727             : fail:
   36728             :   return NULL;
   36729             : }
   36730             : 
   36731             : 
   36732         107 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36733         107 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36734         107 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36735         107 :   void *argp1 = 0 ;
   36736         107 :   int res1 = 0 ;
   36737         107 :   PyObject *swig_obj[1] ;
   36738         107 :   char *result = 0 ;
   36739             :   
   36740         107 :   if (!args) SWIG_fail;
   36741         107 :   swig_obj[0] = args;
   36742         107 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36743         107 :   if (!SWIG_IsOK(res1)) {
   36744           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsString" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36745             :   }
   36746         107 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36747         107 :   {
   36748         107 :     const int bLocalUseExceptions = GetUseExceptions();
   36749         107 :     if ( bLocalUseExceptions ) {
   36750          31 :       pushErrorHandler();
   36751             :     }
   36752         107 :     {
   36753         107 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36754         107 :       result = (char *)GDALAttributeHS_ReadAsString(arg1);
   36755         107 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36756             :     }
   36757         107 :     if ( bLocalUseExceptions ) {
   36758          31 :       popErrorHandler();
   36759             :     }
   36760             : #ifndef SED_HACKS
   36761             :     if ( bLocalUseExceptions ) {
   36762             :       CPLErr eclass = CPLGetLastErrorType();
   36763             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36764             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36765             :       }
   36766             :     }
   36767             : #endif
   36768             :   }
   36769         107 :   resultobj = SWIG_FromCharPtr((const char *)result);
   36770         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; } }
   36771             :   return resultobj;
   36772             : fail:
   36773             :   return NULL;
   36774             : }
   36775             : 
   36776             : 
   36777          22 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36778          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36779          22 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36780          22 :   void *argp1 = 0 ;
   36781          22 :   int res1 = 0 ;
   36782          22 :   PyObject *swig_obj[1] ;
   36783          22 :   int result;
   36784             :   
   36785          22 :   if (!args) SWIG_fail;
   36786          22 :   swig_obj[0] = args;
   36787          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36788          22 :   if (!SWIG_IsOK(res1)) {
   36789           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36790             :   }
   36791          22 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36792          22 :   {
   36793          22 :     const int bLocalUseExceptions = GetUseExceptions();
   36794          22 :     if ( bLocalUseExceptions ) {
   36795           9 :       pushErrorHandler();
   36796             :     }
   36797          22 :     {
   36798          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36799          22 :       result = (int)GDALAttributeHS_ReadAsInt(arg1);
   36800          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36801             :     }
   36802          22 :     if ( bLocalUseExceptions ) {
   36803           9 :       popErrorHandler();
   36804             :     }
   36805             : #ifndef SED_HACKS
   36806             :     if ( bLocalUseExceptions ) {
   36807             :       CPLErr eclass = CPLGetLastErrorType();
   36808             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36809             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36810             :       }
   36811             :     }
   36812             : #endif
   36813             :   }
   36814          22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36815          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; } }
   36816             :   return resultobj;
   36817             : fail:
   36818             :   return NULL;
   36819             : }
   36820             : 
   36821             : 
   36822          15 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36823          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36824          15 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36825          15 :   void *argp1 = 0 ;
   36826          15 :   int res1 = 0 ;
   36827          15 :   PyObject *swig_obj[1] ;
   36828          15 :   long long result;
   36829             :   
   36830          15 :   if (!args) SWIG_fail;
   36831          15 :   swig_obj[0] = args;
   36832          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36833          15 :   if (!SWIG_IsOK(res1)) {
   36834           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt64" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36835             :   }
   36836          15 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36837          15 :   {
   36838          15 :     const int bLocalUseExceptions = GetUseExceptions();
   36839          15 :     if ( bLocalUseExceptions ) {
   36840           1 :       pushErrorHandler();
   36841             :     }
   36842          15 :     {
   36843          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36844          15 :       result = (long long)GDALAttributeHS_ReadAsInt64(arg1);
   36845          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36846             :     }
   36847          15 :     if ( bLocalUseExceptions ) {
   36848           1 :       popErrorHandler();
   36849             :     }
   36850             : #ifndef SED_HACKS
   36851             :     if ( bLocalUseExceptions ) {
   36852             :       CPLErr eclass = CPLGetLastErrorType();
   36853             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36854             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36855             :       }
   36856             :     }
   36857             : #endif
   36858             :   }
   36859          15 :   resultobj = SWIG_From_long_SS_long(static_cast< long long >(result));
   36860          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; } }
   36861             :   return resultobj;
   36862             : fail:
   36863             :   return NULL;
   36864             : }
   36865             : 
   36866             : 
   36867          40 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36868          40 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36869          40 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36870          40 :   void *argp1 = 0 ;
   36871          40 :   int res1 = 0 ;
   36872          40 :   PyObject *swig_obj[1] ;
   36873          40 :   double result;
   36874             :   
   36875          40 :   if (!args) SWIG_fail;
   36876          40 :   swig_obj[0] = args;
   36877          40 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36878          40 :   if (!SWIG_IsOK(res1)) {
   36879           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsDouble" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36880             :   }
   36881          40 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36882          40 :   {
   36883          40 :     const int bLocalUseExceptions = GetUseExceptions();
   36884          40 :     if ( bLocalUseExceptions ) {
   36885           6 :       pushErrorHandler();
   36886             :     }
   36887          40 :     {
   36888          40 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36889          40 :       result = (double)GDALAttributeHS_ReadAsDouble(arg1);
   36890          40 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36891             :     }
   36892          40 :     if ( bLocalUseExceptions ) {
   36893           6 :       popErrorHandler();
   36894             :     }
   36895             : #ifndef SED_HACKS
   36896             :     if ( bLocalUseExceptions ) {
   36897             :       CPLErr eclass = CPLGetLastErrorType();
   36898             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36899             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36900             :       }
   36901             :     }
   36902             : #endif
   36903             :   }
   36904          40 :   resultobj = SWIG_From_double(static_cast< double >(result));
   36905          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; } }
   36906             :   return resultobj;
   36907             : fail:
   36908             :   return NULL;
   36909             : }
   36910             : 
   36911             : 
   36912          19 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36913          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36914          19 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36915          19 :   void *argp1 = 0 ;
   36916          19 :   int res1 = 0 ;
   36917          19 :   PyObject *swig_obj[1] ;
   36918          19 :   char **result = 0 ;
   36919             :   
   36920          19 :   if (!args) SWIG_fail;
   36921          19 :   swig_obj[0] = args;
   36922          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36923          19 :   if (!SWIG_IsOK(res1)) {
   36924           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsStringArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36925             :   }
   36926          19 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36927          19 :   {
   36928          19 :     const int bLocalUseExceptions = GetUseExceptions();
   36929          19 :     if ( bLocalUseExceptions ) {
   36930           4 :       pushErrorHandler();
   36931             :     }
   36932          19 :     {
   36933          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36934          19 :       result = (char **)GDALAttributeHS_ReadAsStringArray(arg1);
   36935          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36936             :     }
   36937          19 :     if ( bLocalUseExceptions ) {
   36938           4 :       popErrorHandler();
   36939             :     }
   36940             : #ifndef SED_HACKS
   36941             :     if ( bLocalUseExceptions ) {
   36942             :       CPLErr eclass = CPLGetLastErrorType();
   36943             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36944             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36945             :       }
   36946             :     }
   36947             : #endif
   36948             :   }
   36949          19 :   {
   36950             :     /* %typemap(out) char **CSL -> ( string ) */
   36951          19 :     bool bErr = false;
   36952          19 :     resultobj = CSLToList(result, &bErr);
   36953          19 :     CSLDestroy(result);
   36954          19 :     if( bErr ) {
   36955           0 :       SWIG_fail;
   36956             :     }
   36957             :   }
   36958          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; } }
   36959             :   return resultobj;
   36960             : fail:
   36961             :   return NULL;
   36962             : }
   36963             : 
   36964             : 
   36965          15 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsIntArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36966          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36967          15 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36968          15 :   int **arg2 = (int **) 0 ;
   36969          15 :   size_t *arg3 = (size_t *) 0 ;
   36970          15 :   void *argp1 = 0 ;
   36971          15 :   int res1 = 0 ;
   36972          15 :   int *vals2 = 0 ;
   36973          15 :   size_t nCount2 = 0 ;
   36974          15 :   PyObject *swig_obj[1] ;
   36975             :   
   36976          15 :   {
   36977             :     /* %typemap(in,numinputs=0) (int** pvals, size_t* pnCount) */
   36978          15 :     arg2 = &vals2;
   36979          15 :     arg3 = &nCount2;
   36980             :   }
   36981          15 :   if (!args) SWIG_fail;
   36982          15 :   swig_obj[0] = args;
   36983          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36984          15 :   if (!SWIG_IsOK(res1)) {
   36985           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsIntArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36986             :   }
   36987          15 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36988          15 :   {
   36989          15 :     const int bLocalUseExceptions = GetUseExceptions();
   36990          15 :     if ( bLocalUseExceptions ) {
   36991           4 :       pushErrorHandler();
   36992             :     }
   36993          15 :     {
   36994          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36995          15 :       GDALAttributeHS_ReadAsIntArray(arg1,arg2,arg3);
   36996          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36997             :     }
   36998          15 :     if ( bLocalUseExceptions ) {
   36999           4 :       popErrorHandler();
   37000             :     }
   37001             : #ifndef SED_HACKS
   37002             :     if ( bLocalUseExceptions ) {
   37003             :       CPLErr eclass = CPLGetLastErrorType();
   37004             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37005             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37006             :       }
   37007             :     }
   37008             : #endif
   37009             :   }
   37010          15 :   resultobj = SWIG_Py_Void();
   37011          15 :   {
   37012             :     /* %typemap(argout) (int** pvals, size_t* pnCount) */
   37013          15 :     PyObject *list = CreateTupleFromIntArray(*arg2, *arg3);
   37014          15 :     Py_DECREF(resultobj);
   37015          15 :     resultobj = list;
   37016             :   }
   37017          15 :   {
   37018             :     /* %typemap(freearg) (int** pvals, size_t* pnCount) */
   37019          15 :     CPLFree(*arg2);
   37020             :   }
   37021          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; } }
   37022             :   return resultobj;
   37023           0 : fail:
   37024           0 :   {
   37025             :     /* %typemap(freearg) (int** pvals, size_t* pnCount) */
   37026           0 :     CPLFree(*arg2);
   37027             :   }
   37028             :   return NULL;
   37029             : }
   37030             : 
   37031             : 
   37032          14 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt64Array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37033          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37034          14 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37035          14 :   long long **arg2 = (long long **) 0 ;
   37036          14 :   size_t *arg3 = (size_t *) 0 ;
   37037          14 :   void *argp1 = 0 ;
   37038          14 :   int res1 = 0 ;
   37039          14 :   long long *vals2 = 0 ;
   37040          14 :   size_t nCount2 = 0 ;
   37041          14 :   PyObject *swig_obj[1] ;
   37042             :   
   37043          14 :   {
   37044             :     /* %typemap(in,numinputs=0) (long long** pvals, size_t* pnCount) */
   37045          14 :     arg2 = &vals2;
   37046          14 :     arg3 = &nCount2;
   37047             :   }
   37048          14 :   if (!args) SWIG_fail;
   37049          14 :   swig_obj[0] = args;
   37050          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37051          14 :   if (!SWIG_IsOK(res1)) {
   37052           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt64Array" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37053             :   }
   37054          14 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37055          14 :   {
   37056          14 :     const int bLocalUseExceptions = GetUseExceptions();
   37057          14 :     if ( bLocalUseExceptions ) {
   37058           1 :       pushErrorHandler();
   37059             :     }
   37060          14 :     {
   37061          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37062          14 :       GDALAttributeHS_ReadAsInt64Array(arg1,arg2,arg3);
   37063          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37064             :     }
   37065          14 :     if ( bLocalUseExceptions ) {
   37066           1 :       popErrorHandler();
   37067             :     }
   37068             : #ifndef SED_HACKS
   37069             :     if ( bLocalUseExceptions ) {
   37070             :       CPLErr eclass = CPLGetLastErrorType();
   37071             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37072             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37073             :       }
   37074             :     }
   37075             : #endif
   37076             :   }
   37077          14 :   resultobj = SWIG_Py_Void();
   37078          14 :   {
   37079             :     /* %typemap(argout) (int** pvals, size_t* pnCount) */
   37080          14 :     PyObject *list = CreateTupleFromInt64Array(*arg2, *arg3);
   37081          14 :     Py_DECREF(resultobj);
   37082          14 :     resultobj = list;
   37083             :   }
   37084          14 :   {
   37085             :     /* %typemap(freearg) (long long** pvals, size_t* pnCount) */
   37086          14 :     CPLFree(*arg2);
   37087             :   }
   37088          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; } }
   37089             :   return resultobj;
   37090           0 : fail:
   37091           0 :   {
   37092             :     /* %typemap(freearg) (long long** pvals, size_t* pnCount) */
   37093           0 :     CPLFree(*arg2);
   37094             :   }
   37095             :   return NULL;
   37096             : }
   37097             : 
   37098             : 
   37099          29 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsDoubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37100          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37101          29 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37102          29 :   double **arg2 = (double **) 0 ;
   37103          29 :   size_t *arg3 = (size_t *) 0 ;
   37104          29 :   void *argp1 = 0 ;
   37105          29 :   int res1 = 0 ;
   37106          29 :   double *vals2 = 0 ;
   37107          29 :   size_t nCount2 = 0 ;
   37108          29 :   PyObject *swig_obj[1] ;
   37109             :   
   37110          29 :   {
   37111             :     /* %typemap(in,numinputs=0) (double** pvals, size_t* pnCount) */
   37112          29 :     arg2 = &vals2;
   37113          29 :     arg3 = &nCount2;
   37114             :   }
   37115          29 :   if (!args) SWIG_fail;
   37116          29 :   swig_obj[0] = args;
   37117          29 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37118          29 :   if (!SWIG_IsOK(res1)) {
   37119           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsDoubleArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37120             :   }
   37121          29 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37122          29 :   {
   37123          29 :     const int bLocalUseExceptions = GetUseExceptions();
   37124          29 :     if ( bLocalUseExceptions ) {
   37125           3 :       pushErrorHandler();
   37126             :     }
   37127          29 :     {
   37128          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37129          29 :       GDALAttributeHS_ReadAsDoubleArray(arg1,arg2,arg3);
   37130          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37131             :     }
   37132          29 :     if ( bLocalUseExceptions ) {
   37133           3 :       popErrorHandler();
   37134             :     }
   37135             : #ifndef SED_HACKS
   37136             :     if ( bLocalUseExceptions ) {
   37137             :       CPLErr eclass = CPLGetLastErrorType();
   37138             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37139             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37140             :       }
   37141             :     }
   37142             : #endif
   37143             :   }
   37144          29 :   resultobj = SWIG_Py_Void();
   37145          29 :   {
   37146             :     /* %typemap(argout) (double** pvals, size_t* pnCount) */
   37147          29 :     PyObject *list = CreateTupleFromDoubleArray(*arg2, *arg3);
   37148          29 :     Py_DECREF(resultobj);
   37149          29 :     resultobj = list;
   37150             :   }
   37151          29 :   {
   37152             :     /* %typemap(freearg) (double** pvals, size_t* pnCount) */
   37153          29 :     CPLFree(*arg2);
   37154             :   }
   37155          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; } }
   37156             :   return resultobj;
   37157           0 : fail:
   37158           0 :   {
   37159             :     /* %typemap(freearg) (double** pvals, size_t* pnCount) */
   37160           0 :     CPLFree(*arg2);
   37161             :   }
   37162             :   return NULL;
   37163             : }
   37164             : 
   37165             : 
   37166           5 : SWIGINTERN PyObject *_wrap_Attribute_WriteRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37167           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37168           5 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37169           5 :   GIntBig arg2 ;
   37170           5 :   char *arg3 = (char *) 0 ;
   37171           5 :   void *argp1 = 0 ;
   37172           5 :   int res1 = 0 ;
   37173           5 :   int alloc2 = 0 ;
   37174           5 :   bool viewIsValid2 = false ;
   37175           5 :   Py_buffer view2 ;
   37176           5 :   PyObject *swig_obj[2] ;
   37177           5 :   CPLErr result;
   37178             :   
   37179           5 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteRaw", 2, 2, swig_obj)) SWIG_fail;
   37180           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37181           5 :   if (!SWIG_IsOK(res1)) {
   37182           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteRaw" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37183             :   }
   37184           5 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37185           5 :   {
   37186             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   37187           5 :     char* ptr = NULL;
   37188           5 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   37189           0 :       SWIG_fail;
   37190             :     }
   37191           5 :     arg3 = (char *)ptr;
   37192             :   }
   37193           5 :   {
   37194           5 :     const int bLocalUseExceptions = GetUseExceptions();
   37195           5 :     if ( bLocalUseExceptions ) {
   37196           4 :       pushErrorHandler();
   37197             :     }
   37198           5 :     {
   37199           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37200           5 :       result = (CPLErr)GDALAttributeHS_WriteRaw(arg1,arg2,arg3);
   37201           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37202             :     }
   37203           5 :     if ( bLocalUseExceptions ) {
   37204           4 :       popErrorHandler();
   37205             :     }
   37206             : #ifndef SED_HACKS
   37207             :     if ( bLocalUseExceptions ) {
   37208             :       CPLErr eclass = CPLGetLastErrorType();
   37209             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37210             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37211             :       }
   37212             :     }
   37213             : #endif
   37214             :   }
   37215           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37216           5 :   {
   37217             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   37218           5 :     if( viewIsValid2 ) {
   37219           5 :       PyBuffer_Release(&view2);
   37220             :     }
   37221           0 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   37222           0 :       delete[] arg3;
   37223             :     }
   37224             :   }
   37225           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; } }
   37226             :   return resultobj;
   37227           0 : fail:
   37228           0 :   {
   37229             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   37230           0 :     if( viewIsValid2 ) {
   37231           0 :       PyBuffer_Release(&view2);
   37232             :     }
   37233           5 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   37234             :       delete[] arg3;
   37235             :     }
   37236             :   }
   37237             :   return NULL;
   37238             : }
   37239             : 
   37240             : 
   37241         181 : SWIGINTERN PyObject *_wrap_Attribute_WriteString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37242         181 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37243         181 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37244         181 :   char *arg2 = (char *) 0 ;
   37245         181 :   void *argp1 = 0 ;
   37246         181 :   int res1 = 0 ;
   37247         181 :   int res2 ;
   37248         181 :   char *buf2 = 0 ;
   37249         181 :   int alloc2 = 0 ;
   37250         181 :   PyObject *swig_obj[2] ;
   37251         181 :   CPLErr result;
   37252             :   
   37253         181 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteString", 2, 2, swig_obj)) SWIG_fail;
   37254         181 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37255         181 :   if (!SWIG_IsOK(res1)) {
   37256           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteString" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37257             :   }
   37258         181 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37259         181 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   37260         181 :   if (!SWIG_IsOK(res2)) {
   37261           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_WriteString" "', argument " "2"" of type '" "char const *""'");
   37262             :   }
   37263         181 :   arg2 = reinterpret_cast< char * >(buf2);
   37264         181 :   {
   37265         181 :     const int bLocalUseExceptions = GetUseExceptions();
   37266         181 :     if ( bLocalUseExceptions ) {
   37267         138 :       pushErrorHandler();
   37268             :     }
   37269         181 :     {
   37270         181 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37271         181 :       result = (CPLErr)GDALAttributeHS_WriteString(arg1,(char const *)arg2);
   37272         181 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37273             :     }
   37274         181 :     if ( bLocalUseExceptions ) {
   37275         138 :       popErrorHandler();
   37276             :     }
   37277             : #ifndef SED_HACKS
   37278             :     if ( bLocalUseExceptions ) {
   37279             :       CPLErr eclass = CPLGetLastErrorType();
   37280             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37281             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37282             :       }
   37283             :     }
   37284             : #endif
   37285             :   }
   37286         181 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37287         181 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37288         207 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37289             :   return resultobj;
   37290           0 : fail:
   37291           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37292             :   return NULL;
   37293             : }
   37294             : 
   37295             : 
   37296           8 : SWIGINTERN PyObject *_wrap_Attribute_WriteStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37297           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37298           8 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37299           8 :   char **arg2 = (char **) 0 ;
   37300           8 :   void *argp1 = 0 ;
   37301           8 :   int res1 = 0 ;
   37302           8 :   PyObject *swig_obj[2] ;
   37303           8 :   CPLErr result;
   37304             :   
   37305           8 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteStringArray", 2, 2, swig_obj)) SWIG_fail;
   37306           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37307           8 :   if (!SWIG_IsOK(res1)) {
   37308           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteStringArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37309             :   }
   37310           8 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37311           8 :   {
   37312             :     /* %typemap(in) char **dict */
   37313           8 :     arg2 = NULL;
   37314           8 :     if ( PySequence_Check( swig_obj[1] ) ) {
   37315           8 :       int bErr = FALSE;
   37316           8 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   37317           8 :       if ( bErr )
   37318             :       {
   37319           0 :         SWIG_fail;
   37320             :       }
   37321             :     }
   37322           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   37323           0 :       int bErr = FALSE;
   37324           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   37325           0 :       if ( bErr )
   37326             :       {
   37327           0 :         SWIG_fail;
   37328             :       }
   37329             :     }
   37330             :     else {
   37331           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   37332           0 :       SWIG_fail;
   37333             :     }
   37334             :   }
   37335           8 :   {
   37336           8 :     const int bLocalUseExceptions = GetUseExceptions();
   37337           8 :     if ( bLocalUseExceptions ) {
   37338           0 :       pushErrorHandler();
   37339             :     }
   37340           8 :     {
   37341           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37342           8 :       result = (CPLErr)GDALAttributeHS_WriteStringArray(arg1,arg2);
   37343           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37344             :     }
   37345           8 :     if ( bLocalUseExceptions ) {
   37346           0 :       popErrorHandler();
   37347             :     }
   37348             : #ifndef SED_HACKS
   37349             :     if ( bLocalUseExceptions ) {
   37350             :       CPLErr eclass = CPLGetLastErrorType();
   37351             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37352             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37353             :       }
   37354             :     }
   37355             : #endif
   37356             :   }
   37357           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37358           8 :   {
   37359             :     /* %typemap(freearg) char **dict */
   37360           8 :     CSLDestroy( arg2 );
   37361             :   }
   37362           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; } }
   37363             :   return resultobj;
   37364           0 : fail:
   37365           0 :   {
   37366             :     /* %typemap(freearg) char **dict */
   37367           0 :     CSLDestroy( arg2 );
   37368             :   }
   37369             :   return NULL;
   37370             : }
   37371             : 
   37372             : 
   37373          22 : SWIGINTERN PyObject *_wrap_Attribute_WriteInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37374          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37375          22 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37376          22 :   int arg2 ;
   37377          22 :   void *argp1 = 0 ;
   37378          22 :   int res1 = 0 ;
   37379          22 :   int val2 ;
   37380          22 :   int ecode2 = 0 ;
   37381          22 :   PyObject *swig_obj[2] ;
   37382          22 :   CPLErr result;
   37383             :   
   37384          22 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt", 2, 2, swig_obj)) SWIG_fail;
   37385          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37386          22 :   if (!SWIG_IsOK(res1)) {
   37387           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37388             :   }
   37389          22 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37390          22 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   37391          22 :   if (!SWIG_IsOK(ecode2)) {
   37392           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteInt" "', argument " "2"" of type '" "int""'");
   37393             :   } 
   37394          22 :   arg2 = static_cast< int >(val2);
   37395          22 :   {
   37396          22 :     const int bLocalUseExceptions = GetUseExceptions();
   37397          22 :     if ( bLocalUseExceptions ) {
   37398           4 :       pushErrorHandler();
   37399             :     }
   37400          22 :     {
   37401          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37402          22 :       result = (CPLErr)GDALAttributeHS_WriteInt(arg1,arg2);
   37403          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37404             :     }
   37405          22 :     if ( bLocalUseExceptions ) {
   37406           4 :       popErrorHandler();
   37407             :     }
   37408             : #ifndef SED_HACKS
   37409             :     if ( bLocalUseExceptions ) {
   37410             :       CPLErr eclass = CPLGetLastErrorType();
   37411             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37412             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37413             :       }
   37414             :     }
   37415             : #endif
   37416             :   }
   37417          22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37418          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; } }
   37419             :   return resultobj;
   37420             : fail:
   37421             :   return NULL;
   37422             : }
   37423             : 
   37424             : 
   37425          11 : SWIGINTERN PyObject *_wrap_Attribute_WriteInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37426          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37427          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37428          11 :   long long arg2 ;
   37429          11 :   void *argp1 = 0 ;
   37430          11 :   int res1 = 0 ;
   37431          11 :   long long val2 ;
   37432          11 :   int ecode2 = 0 ;
   37433          11 :   PyObject *swig_obj[2] ;
   37434          11 :   CPLErr result;
   37435             :   
   37436          11 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt64", 2, 2, swig_obj)) SWIG_fail;
   37437          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37438          11 :   if (!SWIG_IsOK(res1)) {
   37439           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt64" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37440             :   }
   37441          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37442          11 :   ecode2 = SWIG_AsVal_long_SS_long(swig_obj[1], &val2);
   37443          11 :   if (!SWIG_IsOK(ecode2)) {
   37444           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteInt64" "', argument " "2"" of type '" "long long""'");
   37445             :   } 
   37446          11 :   arg2 = static_cast< long long >(val2);
   37447          11 :   {
   37448          11 :     const int bLocalUseExceptions = GetUseExceptions();
   37449          11 :     if ( bLocalUseExceptions ) {
   37450           0 :       pushErrorHandler();
   37451             :     }
   37452          11 :     {
   37453          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37454          11 :       result = (CPLErr)GDALAttributeHS_WriteInt64(arg1,arg2);
   37455          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37456             :     }
   37457          11 :     if ( bLocalUseExceptions ) {
   37458           0 :       popErrorHandler();
   37459             :     }
   37460             : #ifndef SED_HACKS
   37461             :     if ( bLocalUseExceptions ) {
   37462             :       CPLErr eclass = CPLGetLastErrorType();
   37463             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37464             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37465             :       }
   37466             :     }
   37467             : #endif
   37468             :   }
   37469          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37470          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; } }
   37471             :   return resultobj;
   37472             : fail:
   37473             :   return NULL;
   37474             : }
   37475             : 
   37476             : 
   37477          11 : SWIGINTERN PyObject *_wrap_Attribute_WriteDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37478          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37479          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37480          11 :   double arg2 ;
   37481          11 :   void *argp1 = 0 ;
   37482          11 :   int res1 = 0 ;
   37483          11 :   double val2 ;
   37484          11 :   int ecode2 = 0 ;
   37485          11 :   PyObject *swig_obj[2] ;
   37486          11 :   CPLErr result;
   37487             :   
   37488          11 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteDouble", 2, 2, swig_obj)) SWIG_fail;
   37489          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37490          11 :   if (!SWIG_IsOK(res1)) {
   37491           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteDouble" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37492             :   }
   37493          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37494          11 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   37495          11 :   if (!SWIG_IsOK(ecode2)) {
   37496           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteDouble" "', argument " "2"" of type '" "double""'");
   37497             :   } 
   37498          11 :   arg2 = static_cast< double >(val2);
   37499          11 :   {
   37500          11 :     const int bLocalUseExceptions = GetUseExceptions();
   37501          11 :     if ( bLocalUseExceptions ) {
   37502           1 :       pushErrorHandler();
   37503             :     }
   37504          11 :     {
   37505          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37506          11 :       result = (CPLErr)GDALAttributeHS_WriteDouble(arg1,arg2);
   37507          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37508             :     }
   37509          11 :     if ( bLocalUseExceptions ) {
   37510           1 :       popErrorHandler();
   37511             :     }
   37512             : #ifndef SED_HACKS
   37513             :     if ( bLocalUseExceptions ) {
   37514             :       CPLErr eclass = CPLGetLastErrorType();
   37515             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37516             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37517             :       }
   37518             :     }
   37519             : #endif
   37520             :   }
   37521          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37522          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; } }
   37523             :   return resultobj;
   37524             : fail:
   37525             :   return NULL;
   37526             : }
   37527             : 
   37528             : 
   37529          11 : SWIGINTERN PyObject *_wrap_Attribute_WriteIntArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37530          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37531          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37532          11 :   int arg2 ;
   37533          11 :   int *arg3 = (int *) 0 ;
   37534          11 :   void *argp1 = 0 ;
   37535          11 :   int res1 = 0 ;
   37536          11 :   PyObject *swig_obj[2] ;
   37537          11 :   CPLErr result;
   37538             :   
   37539          11 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteIntArray", 2, 2, swig_obj)) SWIG_fail;
   37540          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37541          11 :   if (!SWIG_IsOK(res1)) {
   37542           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteIntArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37543             :   }
   37544          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37545          11 :   {
   37546             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   37547          11 :     arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
   37548          11 :     if( arg2 < 0 ) {
   37549           0 :       SWIG_fail;
   37550             :     }
   37551             :   }
   37552          11 :   {
   37553          11 :     const int bLocalUseExceptions = GetUseExceptions();
   37554          11 :     if ( bLocalUseExceptions ) {
   37555           3 :       pushErrorHandler();
   37556             :     }
   37557          11 :     {
   37558          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37559          11 :       result = (CPLErr)GDALAttributeHS_WriteIntArray(arg1,arg2,arg3);
   37560          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37561             :     }
   37562          11 :     if ( bLocalUseExceptions ) {
   37563           3 :       popErrorHandler();
   37564             :     }
   37565             : #ifndef SED_HACKS
   37566             :     if ( bLocalUseExceptions ) {
   37567             :       CPLErr eclass = CPLGetLastErrorType();
   37568             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37569             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37570             :       }
   37571             :     }
   37572             : #endif
   37573             :   }
   37574          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37575          11 :   {
   37576             :     /* %typemap(freearg) (int nList, int* pList) */
   37577          11 :     free(arg3);
   37578             :   }
   37579          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; } }
   37580             :   return resultobj;
   37581           0 : fail:
   37582           0 :   {
   37583             :     /* %typemap(freearg) (int nList, int* pList) */
   37584           0 :     free(arg3);
   37585             :   }
   37586           0 :   return NULL;
   37587             : }
   37588             : 
   37589             : 
   37590          10 : SWIGINTERN PyObject *_wrap_Attribute_WriteInt64Array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37591          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37592          10 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37593          10 :   int arg2 ;
   37594          10 :   long long *arg3 = (long long *) 0 ;
   37595          10 :   void *argp1 = 0 ;
   37596          10 :   int res1 = 0 ;
   37597          10 :   PyObject *swig_obj[2] ;
   37598          10 :   CPLErr result;
   37599             :   
   37600          10 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt64Array", 2, 2, swig_obj)) SWIG_fail;
   37601          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37602          10 :   if (!SWIG_IsOK(res1)) {
   37603           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt64Array" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37604             :   }
   37605          10 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37606          10 :   {
   37607             :     /* %typemap(in,numinputs=1) (int nList, long long* pList)*/
   37608          10 :     arg3 = CreateCInt64ListFromSequence(swig_obj[1], &arg2);
   37609          10 :     if( arg2 < 0 ) {
   37610           0 :       SWIG_fail;
   37611             :     }
   37612             :   }
   37613          10 :   {
   37614          10 :     const int bLocalUseExceptions = GetUseExceptions();
   37615          10 :     if ( bLocalUseExceptions ) {
   37616           0 :       pushErrorHandler();
   37617             :     }
   37618          10 :     {
   37619          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37620          10 :       result = (CPLErr)GDALAttributeHS_WriteInt64Array(arg1,arg2,arg3);
   37621          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37622             :     }
   37623          10 :     if ( bLocalUseExceptions ) {
   37624           0 :       popErrorHandler();
   37625             :     }
   37626             : #ifndef SED_HACKS
   37627             :     if ( bLocalUseExceptions ) {
   37628             :       CPLErr eclass = CPLGetLastErrorType();
   37629             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37630             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37631             :       }
   37632             :     }
   37633             : #endif
   37634             :   }
   37635          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37636          10 :   {
   37637             :     /* %typemap(freearg) (int nList, long long* pList) */
   37638          10 :     free(arg3);
   37639             :   }
   37640          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; } }
   37641             :   return resultobj;
   37642           0 : fail:
   37643           0 :   {
   37644             :     /* %typemap(freearg) (int nList, long long* pList) */
   37645           0 :     free(arg3);
   37646             :   }
   37647           0 :   return NULL;
   37648             : }
   37649             : 
   37650             : 
   37651           7 : SWIGINTERN PyObject *_wrap_Attribute_WriteDoubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37652           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37653           7 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37654           7 :   int arg2 ;
   37655           7 :   double *arg3 = (double *) 0 ;
   37656           7 :   void *argp1 = 0 ;
   37657           7 :   int res1 = 0 ;
   37658           7 :   PyObject *swig_obj[2] ;
   37659           7 :   CPLErr result;
   37660             :   
   37661           7 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteDoubleArray", 2, 2, swig_obj)) SWIG_fail;
   37662           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37663           7 :   if (!SWIG_IsOK(res1)) {
   37664           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteDoubleArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37665             :   }
   37666           7 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37667           7 :   {
   37668             :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   37669           7 :     arg3 = CreateCDoubleListFromSequence(swig_obj[1], &arg2);
   37670           7 :     if( arg2 < 0 ) {
   37671           0 :       SWIG_fail;
   37672             :     }
   37673             :   }
   37674           7 :   {
   37675           7 :     const int bLocalUseExceptions = GetUseExceptions();
   37676           7 :     if ( bLocalUseExceptions ) {
   37677           0 :       pushErrorHandler();
   37678             :     }
   37679           7 :     {
   37680           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37681           7 :       result = (CPLErr)GDALAttributeHS_WriteDoubleArray(arg1,arg2,arg3);
   37682           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37683             :     }
   37684           7 :     if ( bLocalUseExceptions ) {
   37685           0 :       popErrorHandler();
   37686             :     }
   37687             : #ifndef SED_HACKS
   37688             :     if ( bLocalUseExceptions ) {
   37689             :       CPLErr eclass = CPLGetLastErrorType();
   37690             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37691             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37692             :       }
   37693             :     }
   37694             : #endif
   37695             :   }
   37696           7 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37697           7 :   {
   37698             :     /* %typemap(freearg) (int nList, double* pList) */
   37699           7 :     free(arg3);
   37700             :   }
   37701           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; } }
   37702             :   return resultobj;
   37703           0 : fail:
   37704           0 :   {
   37705             :     /* %typemap(freearg) (int nList, double* pList) */
   37706           0 :     free(arg3);
   37707             :   }
   37708           0 :   return NULL;
   37709             : }
   37710             : 
   37711             : 
   37712          27 : SWIGINTERN PyObject *_wrap_Attribute_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37713          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37714          27 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37715          27 :   char *arg2 = (char *) 0 ;
   37716          27 :   void *argp1 = 0 ;
   37717          27 :   int res1 = 0 ;
   37718          27 :   int res2 ;
   37719          27 :   char *buf2 = 0 ;
   37720          27 :   int alloc2 = 0 ;
   37721          27 :   PyObject *swig_obj[2] ;
   37722          27 :   CPLErr result;
   37723             :   
   37724          27 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_Rename", 2, 2, swig_obj)) SWIG_fail;
   37725          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37726          27 :   if (!SWIG_IsOK(res1)) {
   37727           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_Rename" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37728             :   }
   37729          27 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37730          27 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   37731          27 :   if (!SWIG_IsOK(res2)) {
   37732           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_Rename" "', argument " "2"" of type '" "char const *""'");
   37733             :   }
   37734          27 :   arg2 = reinterpret_cast< char * >(buf2);
   37735          27 :   {
   37736          27 :     const int bLocalUseExceptions = GetUseExceptions();
   37737          27 :     if ( bLocalUseExceptions ) {
   37738          27 :       pushErrorHandler();
   37739             :     }
   37740          27 :     {
   37741          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37742          27 :       result = (CPLErr)GDALAttributeHS_Rename(arg1,(char const *)arg2);
   37743          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37744             :     }
   37745          27 :     if ( bLocalUseExceptions ) {
   37746          27 :       popErrorHandler();
   37747             :     }
   37748             : #ifndef SED_HACKS
   37749             :     if ( bLocalUseExceptions ) {
   37750             :       CPLErr eclass = CPLGetLastErrorType();
   37751             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37752             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37753             :       }
   37754             :     }
   37755             : #endif
   37756             :   }
   37757          27 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37758          27 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37759          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; } }
   37760             :   return resultobj;
   37761           0 : fail:
   37762           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37763             :   return NULL;
   37764             : }
   37765             : 
   37766             : 
   37767         277 : SWIGINTERN PyObject *Attribute_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37768         277 :   PyObject *obj;
   37769         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   37770         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAttributeHS, SWIG_NewClientData(obj));
   37771         277 :   return SWIG_Py_Void();
   37772             : }
   37773             : 
   37774        4924 : SWIGINTERN PyObject *_wrap_delete_Dimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37775        4924 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37776        4924 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37777        4924 :   void *argp1 = 0 ;
   37778        4924 :   int res1 = 0 ;
   37779        4924 :   PyObject *swig_obj[1] ;
   37780             :   
   37781        4924 :   if (!args) SWIG_fail;
   37782        4924 :   swig_obj[0] = args;
   37783        4924 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_DISOWN |  0 );
   37784        4924 :   if (!SWIG_IsOK(res1)) {
   37785           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dimension" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37786             :   }
   37787        4924 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37788        4924 :   {
   37789        4924 :     const int bLocalUseExceptions = GetUseExceptions();
   37790        4924 :     if ( bLocalUseExceptions ) {
   37791         737 :       pushErrorHandler();
   37792             :     }
   37793        4924 :     {
   37794        4924 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37795        4924 :       delete_GDALDimensionHS(arg1);
   37796        4924 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37797             :     }
   37798        4924 :     if ( bLocalUseExceptions ) {
   37799         737 :       popErrorHandler();
   37800             :     }
   37801             : #ifndef SED_HACKS
   37802             :     if ( bLocalUseExceptions ) {
   37803             :       CPLErr eclass = CPLGetLastErrorType();
   37804             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37805             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37806             :       }
   37807             :     }
   37808             : #endif
   37809             :   }
   37810        4924 :   resultobj = SWIG_Py_Void();
   37811        4924 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37812             :   return resultobj;
   37813             : fail:
   37814             :   return NULL;
   37815             : }
   37816             : 
   37817             : 
   37818         276 : SWIGINTERN PyObject *_wrap_Dimension_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37819         276 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37820         276 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37821         276 :   void *argp1 = 0 ;
   37822         276 :   int res1 = 0 ;
   37823         276 :   PyObject *swig_obj[1] ;
   37824         276 :   char *result = 0 ;
   37825             :   
   37826         276 :   if (!args) SWIG_fail;
   37827         276 :   swig_obj[0] = args;
   37828         276 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37829         276 :   if (!SWIG_IsOK(res1)) {
   37830           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetName" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37831             :   }
   37832         276 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37833         276 :   {
   37834         276 :     const int bLocalUseExceptions = GetUseExceptions();
   37835         276 :     if ( bLocalUseExceptions ) {
   37836         134 :       pushErrorHandler();
   37837             :     }
   37838         276 :     {
   37839         276 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37840         276 :       result = (char *)GDALDimensionHS_GetName(arg1);
   37841         276 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37842             :     }
   37843         276 :     if ( bLocalUseExceptions ) {
   37844         134 :       popErrorHandler();
   37845             :     }
   37846             : #ifndef SED_HACKS
   37847             :     if ( bLocalUseExceptions ) {
   37848             :       CPLErr eclass = CPLGetLastErrorType();
   37849             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37850             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37851             :       }
   37852             :     }
   37853             : #endif
   37854             :   }
   37855         276 :   resultobj = SWIG_FromCharPtr((const char *)result);
   37856         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; } }
   37857             :   return resultobj;
   37858             : fail:
   37859             :   return NULL;
   37860             : }
   37861             : 
   37862             : 
   37863          82 : SWIGINTERN PyObject *_wrap_Dimension_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37864          82 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37865          82 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37866          82 :   void *argp1 = 0 ;
   37867          82 :   int res1 = 0 ;
   37868          82 :   PyObject *swig_obj[1] ;
   37869          82 :   char *result = 0 ;
   37870             :   
   37871          82 :   if (!args) SWIG_fail;
   37872          82 :   swig_obj[0] = args;
   37873          82 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37874          82 :   if (!SWIG_IsOK(res1)) {
   37875           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetFullName" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37876             :   }
   37877          82 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37878          82 :   {
   37879          82 :     const int bLocalUseExceptions = GetUseExceptions();
   37880          82 :     if ( bLocalUseExceptions ) {
   37881          51 :       pushErrorHandler();
   37882             :     }
   37883          82 :     {
   37884          82 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37885          82 :       result = (char *)GDALDimensionHS_GetFullName(arg1);
   37886          82 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37887             :     }
   37888          82 :     if ( bLocalUseExceptions ) {
   37889          51 :       popErrorHandler();
   37890             :     }
   37891             : #ifndef SED_HACKS
   37892             :     if ( bLocalUseExceptions ) {
   37893             :       CPLErr eclass = CPLGetLastErrorType();
   37894             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37895             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37896             :       }
   37897             :     }
   37898             : #endif
   37899             :   }
   37900          82 :   resultobj = SWIG_FromCharPtr((const char *)result);
   37901          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; } }
   37902             :   return resultobj;
   37903             : fail:
   37904             :   return NULL;
   37905             : }
   37906             : 
   37907             : 
   37908          54 : SWIGINTERN PyObject *_wrap_Dimension_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37909          54 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37910          54 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37911          54 :   void *argp1 = 0 ;
   37912          54 :   int res1 = 0 ;
   37913          54 :   PyObject *swig_obj[1] ;
   37914          54 :   char *result = 0 ;
   37915             :   
   37916          54 :   if (!args) SWIG_fail;
   37917          54 :   swig_obj[0] = args;
   37918          54 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37919          54 :   if (!SWIG_IsOK(res1)) {
   37920           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetType" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37921             :   }
   37922          54 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37923          54 :   {
   37924          54 :     const int bLocalUseExceptions = GetUseExceptions();
   37925          54 :     if ( bLocalUseExceptions ) {
   37926           8 :       pushErrorHandler();
   37927             :     }
   37928          54 :     {
   37929          54 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37930          54 :       result = (char *)GDALDimensionHS_GetType(arg1);
   37931          54 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37932             :     }
   37933          54 :     if ( bLocalUseExceptions ) {
   37934           8 :       popErrorHandler();
   37935             :     }
   37936             : #ifndef SED_HACKS
   37937             :     if ( bLocalUseExceptions ) {
   37938             :       CPLErr eclass = CPLGetLastErrorType();
   37939             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37940             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37941             :       }
   37942             :     }
   37943             : #endif
   37944             :   }
   37945          54 :   resultobj = SWIG_FromCharPtr((const char *)result);
   37946          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; } }
   37947             :   return resultobj;
   37948             : fail:
   37949             :   return NULL;
   37950             : }
   37951             : 
   37952             : 
   37953          22 : SWIGINTERN PyObject *_wrap_Dimension_GetDirection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37954          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37955          22 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37956          22 :   void *argp1 = 0 ;
   37957          22 :   int res1 = 0 ;
   37958          22 :   PyObject *swig_obj[1] ;
   37959          22 :   char *result = 0 ;
   37960             :   
   37961          22 :   if (!args) SWIG_fail;
   37962          22 :   swig_obj[0] = args;
   37963          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37964          22 :   if (!SWIG_IsOK(res1)) {
   37965           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetDirection" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37966             :   }
   37967          22 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37968          22 :   {
   37969          22 :     const int bLocalUseExceptions = GetUseExceptions();
   37970          22 :     if ( bLocalUseExceptions ) {
   37971           2 :       pushErrorHandler();
   37972             :     }
   37973          22 :     {
   37974          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37975          22 :       result = (char *)GDALDimensionHS_GetDirection(arg1);
   37976          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37977             :     }
   37978          22 :     if ( bLocalUseExceptions ) {
   37979           2 :       popErrorHandler();
   37980             :     }
   37981             : #ifndef SED_HACKS
   37982             :     if ( bLocalUseExceptions ) {
   37983             :       CPLErr eclass = CPLGetLastErrorType();
   37984             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37985             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37986             :       }
   37987             :     }
   37988             : #endif
   37989             :   }
   37990          22 :   resultobj = SWIG_FromCharPtr((const char *)result);
   37991          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; } }
   37992             :   return resultobj;
   37993             : fail:
   37994             :   return NULL;
   37995             : }
   37996             : 
   37997             : 
   37998        3686 : SWIGINTERN PyObject *_wrap_Dimension_GetSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37999        3686 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38000        3686 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   38001        3686 :   void *argp1 = 0 ;
   38002        3686 :   int res1 = 0 ;
   38003        3686 :   PyObject *swig_obj[1] ;
   38004        3686 :   GUIntBig result;
   38005             :   
   38006        3686 :   if (!args) SWIG_fail;
   38007        3686 :   swig_obj[0] = args;
   38008        3686 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   38009        3686 :   if (!SWIG_IsOK(res1)) {
   38010           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetSize" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   38011             :   }
   38012        3686 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   38013        3686 :   {
   38014        3686 :     const int bLocalUseExceptions = GetUseExceptions();
   38015        3686 :     if ( bLocalUseExceptions ) {
   38016         495 :       pushErrorHandler();
   38017             :     }
   38018        3686 :     {
   38019        3686 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38020        3686 :       result = GDALDimensionHS_GetSize(arg1);
   38021        3686 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38022             :     }
   38023        3686 :     if ( bLocalUseExceptions ) {
   38024         495 :       popErrorHandler();
   38025             :     }
   38026             : #ifndef SED_HACKS
   38027             :     if ( bLocalUseExceptions ) {
   38028             :       CPLErr eclass = CPLGetLastErrorType();
   38029             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38030             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38031             :       }
   38032             :     }
   38033             : #endif
   38034             :   }
   38035        3686 :   {
   38036        3686 :     resultobj = PyLong_FromUnsignedLongLong(result);
   38037             :   }
   38038        3686 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38039             :   return resultobj;
   38040             : fail:
   38041             :   return NULL;
   38042             : }
   38043             : 
   38044             : 
   38045         120 : SWIGINTERN PyObject *_wrap_Dimension_GetIndexingVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38046         120 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38047         120 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   38048         120 :   void *argp1 = 0 ;
   38049         120 :   int res1 = 0 ;
   38050         120 :   PyObject *swig_obj[1] ;
   38051         120 :   GDALMDArrayHS *result = 0 ;
   38052             :   
   38053         120 :   if (!args) SWIG_fail;
   38054         120 :   swig_obj[0] = args;
   38055         120 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   38056         120 :   if (!SWIG_IsOK(res1)) {
   38057           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetIndexingVariable" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   38058             :   }
   38059         120 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   38060         120 :   {
   38061         120 :     const int bLocalUseExceptions = GetUseExceptions();
   38062         120 :     if ( bLocalUseExceptions ) {
   38063          46 :       pushErrorHandler();
   38064             :     }
   38065         120 :     {
   38066         120 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38067         120 :       result = (GDALMDArrayHS *)GDALDimensionHS_GetIndexingVariable(arg1);
   38068         120 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38069             :     }
   38070         120 :     if ( bLocalUseExceptions ) {
   38071          46 :       popErrorHandler();
   38072             :     }
   38073             : #ifndef SED_HACKS
   38074             :     if ( bLocalUseExceptions ) {
   38075             :       CPLErr eclass = CPLGetLastErrorType();
   38076             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38077             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38078             :       }
   38079             :     }
   38080             : #endif
   38081             :   }
   38082         120 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   38083         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; } }
   38084             :   return resultobj;
   38085             : fail:
   38086             :   return NULL;
   38087             : }
   38088             : 
   38089             : 
   38090          23 : SWIGINTERN PyObject *_wrap_Dimension_SetIndexingVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38091          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38092          23 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   38093          23 :   GDALMDArrayHS *arg2 = (GDALMDArrayHS *) 0 ;
   38094          23 :   void *argp1 = 0 ;
   38095          23 :   int res1 = 0 ;
   38096          23 :   void *argp2 = 0 ;
   38097          23 :   int res2 = 0 ;
   38098          23 :   PyObject *swig_obj[2] ;
   38099          23 :   bool result;
   38100             :   
   38101          23 :   if (!SWIG_Python_UnpackTuple(args, "Dimension_SetIndexingVariable", 2, 2, swig_obj)) SWIG_fail;
   38102          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   38103          23 :   if (!SWIG_IsOK(res1)) {
   38104           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_SetIndexingVariable" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   38105             :   }
   38106          23 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   38107          23 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   38108          23 :   if (!SWIG_IsOK(res2)) {
   38109           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dimension_SetIndexingVariable" "', argument " "2"" of type '" "GDALMDArrayHS *""'"); 
   38110             :   }
   38111          23 :   arg2 = reinterpret_cast< GDALMDArrayHS * >(argp2);
   38112          23 :   {
   38113          23 :     const int bLocalUseExceptions = GetUseExceptions();
   38114          23 :     if ( bLocalUseExceptions ) {
   38115           9 :       pushErrorHandler();
   38116             :     }
   38117          23 :     {
   38118          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38119          23 :       result = (bool)GDALDimensionHS_SetIndexingVariable(arg1,arg2);
   38120          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38121             :     }
   38122          23 :     if ( bLocalUseExceptions ) {
   38123           9 :       popErrorHandler();
   38124             :     }
   38125             : #ifndef SED_HACKS
   38126             :     if ( bLocalUseExceptions ) {
   38127             :       CPLErr eclass = CPLGetLastErrorType();
   38128             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38129             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38130             :       }
   38131             :     }
   38132             : #endif
   38133             :   }
   38134          23 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   38135          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; } }
   38136             :   return resultobj;
   38137             : fail:
   38138             :   return NULL;
   38139             : }
   38140             : 
   38141             : 
   38142          31 : SWIGINTERN PyObject *_wrap_Dimension_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38143          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38144          31 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   38145          31 :   char *arg2 = (char *) 0 ;
   38146          31 :   void *argp1 = 0 ;
   38147          31 :   int res1 = 0 ;
   38148          31 :   int res2 ;
   38149          31 :   char *buf2 = 0 ;
   38150          31 :   int alloc2 = 0 ;
   38151          31 :   PyObject *swig_obj[2] ;
   38152          31 :   CPLErr result;
   38153             :   
   38154          31 :   if (!SWIG_Python_UnpackTuple(args, "Dimension_Rename", 2, 2, swig_obj)) SWIG_fail;
   38155          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   38156          31 :   if (!SWIG_IsOK(res1)) {
   38157           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_Rename" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   38158             :   }
   38159          31 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   38160          31 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   38161          31 :   if (!SWIG_IsOK(res2)) {
   38162           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dimension_Rename" "', argument " "2"" of type '" "char const *""'");
   38163             :   }
   38164          31 :   arg2 = reinterpret_cast< char * >(buf2);
   38165          31 :   {
   38166          31 :     const int bLocalUseExceptions = GetUseExceptions();
   38167          31 :     if ( bLocalUseExceptions ) {
   38168          31 :       pushErrorHandler();
   38169             :     }
   38170          31 :     {
   38171          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38172          31 :       result = (CPLErr)GDALDimensionHS_Rename(arg1,(char const *)arg2);
   38173          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38174             :     }
   38175          31 :     if ( bLocalUseExceptions ) {
   38176          31 :       popErrorHandler();
   38177             :     }
   38178             : #ifndef SED_HACKS
   38179             :     if ( bLocalUseExceptions ) {
   38180             :       CPLErr eclass = CPLGetLastErrorType();
   38181             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38182             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38183             :       }
   38184             :     }
   38185             : #endif
   38186             :   }
   38187          31 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38188          31 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   38189          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; } }
   38190             :   return resultobj;
   38191           0 : fail:
   38192           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   38193             :   return NULL;
   38194             : }
   38195             : 
   38196             : 
   38197         277 : SWIGINTERN PyObject *Dimension_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38198         277 :   PyObject *obj;
   38199         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   38200         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDimensionHS, SWIG_NewClientData(obj));
   38201         277 :   return SWIG_Py_Void();
   38202             : }
   38203             : 
   38204        4607 : SWIGINTERN PyObject *_wrap_delete_ExtendedDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38205        4607 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38206        4607 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38207        4607 :   void *argp1 = 0 ;
   38208        4607 :   int res1 = 0 ;
   38209        4607 :   PyObject *swig_obj[1] ;
   38210             :   
   38211        4607 :   if (!args) SWIG_fail;
   38212        4607 :   swig_obj[0] = args;
   38213        4607 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_DISOWN |  0 );
   38214        4607 :   if (!SWIG_IsOK(res1)) {
   38215           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExtendedDataType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38216             :   }
   38217        4607 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38218        4607 :   {
   38219        4607 :     const int bLocalUseExceptions = GetUseExceptions();
   38220        4607 :     if ( bLocalUseExceptions ) {
   38221        1130 :       pushErrorHandler();
   38222             :     }
   38223        4607 :     {
   38224        4607 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38225        4607 :       delete_GDALExtendedDataTypeHS(arg1);
   38226        4607 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38227             :     }
   38228        4607 :     if ( bLocalUseExceptions ) {
   38229        1130 :       popErrorHandler();
   38230             :     }
   38231             : #ifndef SED_HACKS
   38232             :     if ( bLocalUseExceptions ) {
   38233             :       CPLErr eclass = CPLGetLastErrorType();
   38234             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38235             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38236             :       }
   38237             :     }
   38238             : #endif
   38239             :   }
   38240        4607 :   resultobj = SWIG_Py_Void();
   38241        4607 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38242             :   return resultobj;
   38243             : fail:
   38244             :   return NULL;
   38245             : }
   38246             : 
   38247             : 
   38248        1972 : SWIGINTERN PyObject *_wrap_ExtendedDataType_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38249        1972 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38250        1972 :   GDALDataType arg1 ;
   38251        1972 :   PyObject *swig_obj[1] ;
   38252        1972 :   GDALExtendedDataTypeHS *result = 0 ;
   38253             :   
   38254        1972 :   if (!args) SWIG_fail;
   38255        1972 :   swig_obj[0] = args;
   38256        1972 :   {
   38257             :     // %typemap(in) GDALDataType
   38258        1972 :     int val = 0;
   38259        1972 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   38260        1972 :     if (!SWIG_IsOK(ecode)) {
   38261           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   38262             :     }
   38263        1972 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   38264             :     {
   38265           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   38266             :     }
   38267        1972 :     arg1 = static_cast<GDALDataType>(val);
   38268             :   }
   38269        1972 :   {
   38270        1972 :     const int bLocalUseExceptions = GetUseExceptions();
   38271        1972 :     if ( bLocalUseExceptions ) {
   38272         393 :       pushErrorHandler();
   38273             :     }
   38274        1972 :     {
   38275        1972 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38276        1972 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_Create(arg1);
   38277        1972 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38278             :     }
   38279        1972 :     if ( bLocalUseExceptions ) {
   38280         393 :       popErrorHandler();
   38281             :     }
   38282             : #ifndef SED_HACKS
   38283             :     if ( bLocalUseExceptions ) {
   38284             :       CPLErr eclass = CPLGetLastErrorType();
   38285             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38286             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38287             :       }
   38288             :     }
   38289             : #endif
   38290             :   }
   38291        1972 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   38292        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; } }
   38293             :   return resultobj;
   38294             : fail:
   38295             :   return NULL;
   38296             : }
   38297             : 
   38298             : 
   38299         195 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CreateString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38300         195 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38301         195 :   size_t arg1 = (size_t) 0 ;
   38302         195 :   GDALExtendedDataTypeSubType arg2 = (GDALExtendedDataTypeSubType) GEDTST_NONE ;
   38303         195 :   size_t val1 ;
   38304         195 :   int ecode1 = 0 ;
   38305         195 :   int val2 ;
   38306         195 :   int ecode2 = 0 ;
   38307         195 :   PyObject *swig_obj[2] ;
   38308         195 :   GDALExtendedDataTypeHS *result = 0 ;
   38309             :   
   38310         195 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CreateString", 0, 2, swig_obj)) SWIG_fail;
   38311         195 :   if (swig_obj[0]) {
   38312          11 :     ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1);
   38313          11 :     if (!SWIG_IsOK(ecode1)) {
   38314           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ExtendedDataType_CreateString" "', argument " "1"" of type '" "size_t""'");
   38315             :     } 
   38316             :     arg1 = static_cast< size_t >(val1);
   38317             :   }
   38318         195 :   if (swig_obj[1]) {
   38319           4 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   38320           4 :     if (!SWIG_IsOK(ecode2)) {
   38321           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExtendedDataType_CreateString" "', argument " "2"" of type '" "GDALExtendedDataTypeSubType""'");
   38322             :     } 
   38323           4 :     arg2 = static_cast< GDALExtendedDataTypeSubType >(val2);
   38324             :   }
   38325         195 :   {
   38326         195 :     const int bLocalUseExceptions = GetUseExceptions();
   38327         195 :     if ( bLocalUseExceptions ) {
   38328         120 :       pushErrorHandler();
   38329             :     }
   38330         195 :     {
   38331         195 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38332         195 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_CreateString(arg1,arg2);
   38333         195 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38334             :     }
   38335         195 :     if ( bLocalUseExceptions ) {
   38336         120 :       popErrorHandler();
   38337             :     }
   38338             : #ifndef SED_HACKS
   38339             :     if ( bLocalUseExceptions ) {
   38340             :       CPLErr eclass = CPLGetLastErrorType();
   38341             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38342             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38343             :       }
   38344             :     }
   38345             : #endif
   38346             :   }
   38347         195 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   38348         195 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38349             :   return resultobj;
   38350             : fail:
   38351             :   return NULL;
   38352             : }
   38353             : 
   38354             : 
   38355          22 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CreateCompound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38356          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38357          22 :   char *arg1 = (char *) 0 ;
   38358          22 :   size_t arg2 ;
   38359          22 :   int arg3 ;
   38360          22 :   GDALEDTComponentHS **arg4 = (GDALEDTComponentHS **) 0 ;
   38361          22 :   int res1 ;
   38362          22 :   char *buf1 = 0 ;
   38363          22 :   int alloc1 = 0 ;
   38364          22 :   size_t val2 ;
   38365          22 :   int ecode2 = 0 ;
   38366          22 :   PyObject *swig_obj[3] ;
   38367          22 :   GDALExtendedDataTypeHS *result = 0 ;
   38368             :   
   38369          22 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CreateCompound", 3, 3, swig_obj)) SWIG_fail;
   38370          22 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   38371          22 :   if (!SWIG_IsOK(res1)) {
   38372           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_CreateCompound" "', argument " "1"" of type '" "char const *""'");
   38373             :   }
   38374          22 :   arg1 = reinterpret_cast< char * >(buf1);
   38375          22 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   38376          22 :   if (!SWIG_IsOK(ecode2)) {
   38377           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExtendedDataType_CreateCompound" "', argument " "2"" of type '" "size_t""'");
   38378             :   } 
   38379          22 :   arg2 = static_cast< size_t >(val2);
   38380          22 :   {
   38381             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALEDTComponentHS *optional_##GDALEDTComponentHS)*/
   38382          22 :     if ( !PySequence_Check(swig_obj[2]) ) {
   38383           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   38384           0 :       SWIG_fail;
   38385             :     }
   38386          22 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   38387          22 :     if( size > (Py_ssize_t)INT_MAX ) {
   38388           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   38389           0 :       SWIG_fail;
   38390             :     }
   38391          22 :     if( (size_t)size > SIZE_MAX / sizeof(GDALEDTComponentHS*) ) {
   38392           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   38393           0 :       SWIG_fail;
   38394             :     }
   38395          22 :     arg3 = (int)size;
   38396          22 :     arg4 = (GDALEDTComponentHS**) VSIMalloc(arg3*sizeof(GDALEDTComponentHS*));
   38397          22 :     if( !arg4) {
   38398           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   38399           0 :       SWIG_fail;
   38400             :     }
   38401             :     
   38402          54 :     for( int i = 0; i<arg3; i++ ) {
   38403          32 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   38404          32 :       GDALEDTComponentHS* rawobjectpointer = NULL;
   38405          32 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_EXCEPTION | 0 ));
   38406          32 :       if (!rawobjectpointer) {
   38407           0 :         Py_DECREF(o);
   38408           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALEDTComponentHS");
   38409           0 :         SWIG_fail;
   38410             :       }
   38411          32 :       arg4[i] = rawobjectpointer;
   38412          32 :       Py_DECREF(o);
   38413             :       
   38414             :     }
   38415             :   }
   38416          22 :   {
   38417          22 :     if (!arg1) {
   38418           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38419             :     }
   38420             :   }
   38421          22 :   {
   38422          22 :     const int bLocalUseExceptions = GetUseExceptions();
   38423          22 :     if ( bLocalUseExceptions ) {
   38424           6 :       pushErrorHandler();
   38425             :     }
   38426          22 :     {
   38427          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38428          22 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_CreateCompound((char const *)arg1,arg2,arg3,arg4);
   38429          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38430             :     }
   38431          22 :     if ( bLocalUseExceptions ) {
   38432           6 :       popErrorHandler();
   38433             :     }
   38434             : #ifndef SED_HACKS
   38435             :     if ( bLocalUseExceptions ) {
   38436             :       CPLErr eclass = CPLGetLastErrorType();
   38437             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38438             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38439             :       }
   38440             :     }
   38441             : #endif
   38442             :   }
   38443          22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   38444          22 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   38445          22 :   {
   38446             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALEDTComponentHS **poObjects)*/
   38447          22 :     CPLFree( arg4 );
   38448             :   }
   38449          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; } }
   38450             :   return resultobj;
   38451           0 : fail:
   38452           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   38453           0 :   {
   38454             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALEDTComponentHS **poObjects)*/
   38455           0 :     CPLFree( arg4 );
   38456             :   }
   38457             :   return NULL;
   38458             : }
   38459             : 
   38460             : 
   38461           8 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38462           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38463           8 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38464           8 :   void *argp1 = 0 ;
   38465           8 :   int res1 = 0 ;
   38466           8 :   PyObject *swig_obj[1] ;
   38467           8 :   char *result = 0 ;
   38468             :   
   38469           8 :   if (!args) SWIG_fail;
   38470           8 :   swig_obj[0] = args;
   38471           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38472           8 :   if (!SWIG_IsOK(res1)) {
   38473           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetName" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38474             :   }
   38475           8 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38476           8 :   {
   38477           8 :     const int bLocalUseExceptions = GetUseExceptions();
   38478           8 :     if ( bLocalUseExceptions ) {
   38479           2 :       pushErrorHandler();
   38480             :     }
   38481           8 :     {
   38482           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38483           8 :       result = (char *)GDALExtendedDataTypeHS_GetName(arg1);
   38484           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38485             :     }
   38486           8 :     if ( bLocalUseExceptions ) {
   38487           2 :       popErrorHandler();
   38488             :     }
   38489             : #ifndef SED_HACKS
   38490             :     if ( bLocalUseExceptions ) {
   38491             :       CPLErr eclass = CPLGetLastErrorType();
   38492             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38493             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38494             :       }
   38495             :     }
   38496             : #endif
   38497             :   }
   38498           8 :   resultobj = SWIG_FromCharPtr((const char *)result);
   38499           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; } }
   38500             :   return resultobj;
   38501             : fail:
   38502             :   return NULL;
   38503             : }
   38504             : 
   38505             : 
   38506        2900 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetClass(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38507        2900 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38508        2900 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38509        2900 :   void *argp1 = 0 ;
   38510        2900 :   int res1 = 0 ;
   38511        2900 :   PyObject *swig_obj[1] ;
   38512        2900 :   GDALExtendedDataTypeClass result;
   38513             :   
   38514        2900 :   if (!args) SWIG_fail;
   38515        2900 :   swig_obj[0] = args;
   38516        2900 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38517        2900 :   if (!SWIG_IsOK(res1)) {
   38518           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetClass" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38519             :   }
   38520        2900 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38521        2900 :   {
   38522        2900 :     const int bLocalUseExceptions = GetUseExceptions();
   38523        2900 :     if ( bLocalUseExceptions ) {
   38524         634 :       pushErrorHandler();
   38525             :     }
   38526        2900 :     {
   38527        2900 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38528        2900 :       result = (GDALExtendedDataTypeClass)GDALExtendedDataTypeHS_GetClass(arg1);
   38529        2900 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38530             :     }
   38531        2900 :     if ( bLocalUseExceptions ) {
   38532         634 :       popErrorHandler();
   38533             :     }
   38534             : #ifndef SED_HACKS
   38535             :     if ( bLocalUseExceptions ) {
   38536             :       CPLErr eclass = CPLGetLastErrorType();
   38537             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38538             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38539             :       }
   38540             :     }
   38541             : #endif
   38542             :   }
   38543        2900 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38544        2900 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38545             :   return resultobj;
   38546             : fail:
   38547             :   return NULL;
   38548             : }
   38549             : 
   38550             : 
   38551        2077 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetNumericDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38552        2077 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38553        2077 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38554        2077 :   void *argp1 = 0 ;
   38555        2077 :   int res1 = 0 ;
   38556        2077 :   PyObject *swig_obj[1] ;
   38557        2077 :   GDALDataType result;
   38558             :   
   38559        2077 :   if (!args) SWIG_fail;
   38560        2077 :   swig_obj[0] = args;
   38561        2077 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38562        2077 :   if (!SWIG_IsOK(res1)) {
   38563           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetNumericDataType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38564             :   }
   38565        2077 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38566        2077 :   {
   38567        2077 :     const int bLocalUseExceptions = GetUseExceptions();
   38568        2077 :     if ( bLocalUseExceptions ) {
   38569         427 :       pushErrorHandler();
   38570             :     }
   38571        2077 :     {
   38572        2077 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38573        2077 :       result = (GDALDataType)GDALExtendedDataTypeHS_GetNumericDataType(arg1);
   38574        2077 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38575             :     }
   38576        2077 :     if ( bLocalUseExceptions ) {
   38577         427 :       popErrorHandler();
   38578             :     }
   38579             : #ifndef SED_HACKS
   38580             :     if ( bLocalUseExceptions ) {
   38581             :       CPLErr eclass = CPLGetLastErrorType();
   38582             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38583             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38584             :       }
   38585             :     }
   38586             : #endif
   38587             :   }
   38588        2077 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38589        2077 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38590             :   return resultobj;
   38591             : fail:
   38592             :   return NULL;
   38593             : }
   38594             : 
   38595             : 
   38596          51 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38597          51 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38598          51 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38599          51 :   void *argp1 = 0 ;
   38600          51 :   int res1 = 0 ;
   38601          51 :   PyObject *swig_obj[1] ;
   38602          51 :   size_t result;
   38603             :   
   38604          51 :   if (!args) SWIG_fail;
   38605          51 :   swig_obj[0] = args;
   38606          51 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38607          51 :   if (!SWIG_IsOK(res1)) {
   38608           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetSize" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38609             :   }
   38610          51 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38611          51 :   {
   38612          51 :     const int bLocalUseExceptions = GetUseExceptions();
   38613          51 :     if ( bLocalUseExceptions ) {
   38614          34 :       pushErrorHandler();
   38615             :     }
   38616          51 :     {
   38617          51 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38618          51 :       result = GDALExtendedDataTypeHS_GetSize(arg1);
   38619          51 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38620             :     }
   38621          51 :     if ( bLocalUseExceptions ) {
   38622          34 :       popErrorHandler();
   38623             :     }
   38624             : #ifndef SED_HACKS
   38625             :     if ( bLocalUseExceptions ) {
   38626             :       CPLErr eclass = CPLGetLastErrorType();
   38627             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38628             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38629             :       }
   38630             :     }
   38631             : #endif
   38632             :   }
   38633          51 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   38634          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; } }
   38635             :   return resultobj;
   38636             : fail:
   38637             :   return NULL;
   38638             : }
   38639             : 
   38640             : 
   38641           3 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetMaxStringLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38642           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38643           3 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38644           3 :   void *argp1 = 0 ;
   38645           3 :   int res1 = 0 ;
   38646           3 :   PyObject *swig_obj[1] ;
   38647           3 :   size_t result;
   38648             :   
   38649           3 :   if (!args) SWIG_fail;
   38650           3 :   swig_obj[0] = args;
   38651           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38652           3 :   if (!SWIG_IsOK(res1)) {
   38653           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetMaxStringLength" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38654             :   }
   38655           3 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38656           3 :   {
   38657           3 :     const int bLocalUseExceptions = GetUseExceptions();
   38658           3 :     if ( bLocalUseExceptions ) {
   38659           0 :       pushErrorHandler();
   38660             :     }
   38661           3 :     {
   38662           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38663           3 :       result = GDALExtendedDataTypeHS_GetMaxStringLength(arg1);
   38664           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38665             :     }
   38666           3 :     if ( bLocalUseExceptions ) {
   38667           0 :       popErrorHandler();
   38668             :     }
   38669             : #ifndef SED_HACKS
   38670             :     if ( bLocalUseExceptions ) {
   38671             :       CPLErr eclass = CPLGetLastErrorType();
   38672             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38673             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38674             :       }
   38675             :     }
   38676             : #endif
   38677             :   }
   38678           3 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   38679           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; } }
   38680             :   return resultobj;
   38681             : fail:
   38682             :   return NULL;
   38683             : }
   38684             : 
   38685             : 
   38686         104 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetSubType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38687         104 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38688         104 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38689         104 :   void *argp1 = 0 ;
   38690         104 :   int res1 = 0 ;
   38691         104 :   PyObject *swig_obj[1] ;
   38692         104 :   GDALExtendedDataTypeSubType result;
   38693             :   
   38694         104 :   if (!args) SWIG_fail;
   38695         104 :   swig_obj[0] = args;
   38696         104 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38697         104 :   if (!SWIG_IsOK(res1)) {
   38698           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetSubType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38699             :   }
   38700         104 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38701         104 :   {
   38702         104 :     const int bLocalUseExceptions = GetUseExceptions();
   38703         104 :     if ( bLocalUseExceptions ) {
   38704          29 :       pushErrorHandler();
   38705             :     }
   38706         104 :     {
   38707         104 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38708         104 :       result = (GDALExtendedDataTypeSubType)GDALExtendedDataTypeHS_GetSubType(arg1);
   38709         104 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38710             :     }
   38711         104 :     if ( bLocalUseExceptions ) {
   38712          29 :       popErrorHandler();
   38713             :     }
   38714             : #ifndef SED_HACKS
   38715             :     if ( bLocalUseExceptions ) {
   38716             :       CPLErr eclass = CPLGetLastErrorType();
   38717             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38718             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38719             :       }
   38720             :     }
   38721             : #endif
   38722             :   }
   38723         104 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38724         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; } }
   38725             :   return resultobj;
   38726             : fail:
   38727             :   return NULL;
   38728             : }
   38729             : 
   38730             : 
   38731           1 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38732           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38733           1 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38734           1 :   void *argp1 = 0 ;
   38735           1 :   int res1 = 0 ;
   38736           1 :   PyObject *swig_obj[1] ;
   38737           1 :   GDALRasterAttributeTableShadow *result = 0 ;
   38738             :   
   38739           1 :   if (!args) SWIG_fail;
   38740           1 :   swig_obj[0] = args;
   38741           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38742           1 :   if (!SWIG_IsOK(res1)) {
   38743           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetRAT" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38744             :   }
   38745           1 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38746           1 :   {
   38747           1 :     const int bLocalUseExceptions = GetUseExceptions();
   38748           1 :     if ( bLocalUseExceptions ) {
   38749           1 :       pushErrorHandler();
   38750             :     }
   38751           1 :     {
   38752           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38753           1 :       result = (GDALRasterAttributeTableShadow *)GDALExtendedDataTypeHS_GetRAT(arg1);
   38754           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38755             :     }
   38756           1 :     if ( bLocalUseExceptions ) {
   38757           1 :       popErrorHandler();
   38758             :     }
   38759             : #ifndef SED_HACKS
   38760             :     if ( bLocalUseExceptions ) {
   38761             :       CPLErr eclass = CPLGetLastErrorType();
   38762             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38763             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38764             :       }
   38765             :     }
   38766             : #endif
   38767             :   }
   38768           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   38769           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; } }
   38770             :   return resultobj;
   38771             : fail:
   38772             :   return NULL;
   38773             : }
   38774             : 
   38775             : 
   38776          21 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetComponents(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38777          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38778          21 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38779          21 :   GDALEDTComponentHS ***arg2 = (GDALEDTComponentHS ***) 0 ;
   38780          21 :   size_t *arg3 = (size_t *) 0 ;
   38781          21 :   void *argp1 = 0 ;
   38782          21 :   int res1 = 0 ;
   38783          21 :   GDALEDTComponentHS **comps2 = 0 ;
   38784          21 :   size_t nCount2 = 0 ;
   38785          21 :   PyObject *swig_obj[1] ;
   38786             :   
   38787          21 :   {
   38788             :     /* %typemap(in,numinputs=0) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38789          21 :     arg2 = &comps2;
   38790          21 :     arg3 = &nCount2;
   38791             :   }
   38792          21 :   if (!args) SWIG_fail;
   38793          21 :   swig_obj[0] = args;
   38794          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38795          21 :   if (!SWIG_IsOK(res1)) {
   38796           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetComponents" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38797             :   }
   38798          21 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38799          21 :   {
   38800          21 :     const int bLocalUseExceptions = GetUseExceptions();
   38801          21 :     if ( bLocalUseExceptions ) {
   38802           6 :       pushErrorHandler();
   38803             :     }
   38804          21 :     {
   38805          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38806          21 :       GDALExtendedDataTypeHS_GetComponents(arg1,arg2,arg3);
   38807          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38808             :     }
   38809          21 :     if ( bLocalUseExceptions ) {
   38810           6 :       popErrorHandler();
   38811             :     }
   38812             : #ifndef SED_HACKS
   38813             :     if ( bLocalUseExceptions ) {
   38814             :       CPLErr eclass = CPLGetLastErrorType();
   38815             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38816             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38817             :       }
   38818             :     }
   38819             : #endif
   38820             :   }
   38821          21 :   resultobj = SWIG_Py_Void();
   38822          21 :   {
   38823             :     /* %typemap(argout) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38824          21 :     Py_DECREF(resultobj);
   38825          21 :     resultobj = PyList_New( *arg3 );
   38826          21 :     if( !resultobj ) {
   38827           0 :       SWIG_fail;
   38828             :     }
   38829          62 :     for( size_t i = 0; i < *arg3; i++ ) {
   38830          41 :       PyList_SetItem(resultobj, i,
   38831          41 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALEDTComponentHS,SWIG_POINTER_OWN) );
   38832             :       /* We have borrowed the GDALEDTComponentHS */
   38833          41 :       (*arg2)[i] = NULL;
   38834             :     }
   38835             :   }
   38836          21 :   {
   38837             :     /* %typemap(freearg) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38838          21 :     GDALExtendedDataTypeFreeComponents(*arg2, *arg3);
   38839             :   }
   38840          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; } }
   38841             :   return resultobj;
   38842           0 : fail:
   38843           0 :   {
   38844             :     /* %typemap(freearg) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38845           0 :     GDALExtendedDataTypeFreeComponents(*arg2, *arg3);
   38846             :   }
   38847             :   return NULL;
   38848             : }
   38849             : 
   38850             : 
   38851           8 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CanConvertTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38852           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38853           8 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38854           8 :   GDALExtendedDataTypeHS *arg2 = (GDALExtendedDataTypeHS *) 0 ;
   38855           8 :   void *argp1 = 0 ;
   38856           8 :   int res1 = 0 ;
   38857           8 :   void *argp2 = 0 ;
   38858           8 :   int res2 = 0 ;
   38859           8 :   PyObject *swig_obj[2] ;
   38860           8 :   bool result;
   38861             :   
   38862           8 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CanConvertTo", 2, 2, swig_obj)) SWIG_fail;
   38863           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38864           8 :   if (!SWIG_IsOK(res1)) {
   38865           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_CanConvertTo" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38866             :   }
   38867           8 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38868           8 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38869           8 :   if (!SWIG_IsOK(res2)) {
   38870           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExtendedDataType_CanConvertTo" "', argument " "2"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38871             :   }
   38872           8 :   arg2 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp2);
   38873           8 :   {
   38874           8 :     if (!arg2) {
   38875           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38876             :     }
   38877             :   }
   38878           7 :   {
   38879           7 :     const int bLocalUseExceptions = GetUseExceptions();
   38880           7 :     if ( bLocalUseExceptions ) {
   38881           0 :       pushErrorHandler();
   38882             :     }
   38883           7 :     {
   38884           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38885           7 :       result = (bool)GDALExtendedDataTypeHS_CanConvertTo(arg1,arg2);
   38886           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38887             :     }
   38888           7 :     if ( bLocalUseExceptions ) {
   38889           0 :       popErrorHandler();
   38890             :     }
   38891             : #ifndef SED_HACKS
   38892             :     if ( bLocalUseExceptions ) {
   38893             :       CPLErr eclass = CPLGetLastErrorType();
   38894             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38895             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38896             :       }
   38897             :     }
   38898             : #endif
   38899             :   }
   38900           7 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   38901           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; } }
   38902             :   return resultobj;
   38903             : fail:
   38904             :   return NULL;
   38905             : }
   38906             : 
   38907             : 
   38908         101 : SWIGINTERN PyObject *_wrap_ExtendedDataType_Equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38909         101 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38910         101 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38911         101 :   GDALExtendedDataTypeHS *arg2 = (GDALExtendedDataTypeHS *) 0 ;
   38912         101 :   void *argp1 = 0 ;
   38913         101 :   int res1 = 0 ;
   38914         101 :   void *argp2 = 0 ;
   38915         101 :   int res2 = 0 ;
   38916         101 :   PyObject *swig_obj[2] ;
   38917         101 :   bool result;
   38918             :   
   38919         101 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_Equals", 2, 2, swig_obj)) SWIG_fail;
   38920         101 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38921         101 :   if (!SWIG_IsOK(res1)) {
   38922           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_Equals" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38923             :   }
   38924         101 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38925         101 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38926         101 :   if (!SWIG_IsOK(res2)) {
   38927           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExtendedDataType_Equals" "', argument " "2"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38928             :   }
   38929         101 :   arg2 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp2);
   38930         101 :   {
   38931         101 :     if (!arg2) {
   38932           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38933             :     }
   38934             :   }
   38935         100 :   {
   38936         100 :     const int bLocalUseExceptions = GetUseExceptions();
   38937         100 :     if ( bLocalUseExceptions ) {
   38938          38 :       pushErrorHandler();
   38939             :     }
   38940         100 :     {
   38941         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38942         100 :       result = (bool)GDALExtendedDataTypeHS_Equals(arg1,arg2);
   38943         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38944             :     }
   38945         100 :     if ( bLocalUseExceptions ) {
   38946          38 :       popErrorHandler();
   38947             :     }
   38948             : #ifndef SED_HACKS
   38949             :     if ( bLocalUseExceptions ) {
   38950             :       CPLErr eclass = CPLGetLastErrorType();
   38951             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38952             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38953             :       }
   38954             :     }
   38955             : #endif
   38956             :   }
   38957         100 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   38958         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; } }
   38959             :   return resultobj;
   38960             : fail:
   38961             :   return NULL;
   38962             : }
   38963             : 
   38964             : 
   38965         277 : SWIGINTERN PyObject *ExtendedDataType_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38966         277 :   PyObject *obj;
   38967         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   38968         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_NewClientData(obj));
   38969         277 :   return SWIG_Py_Void();
   38970             : }
   38971             : 
   38972          61 : SWIGINTERN PyObject *_wrap_delete_EDTComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38973          61 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38974          61 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   38975          61 :   void *argp1 = 0 ;
   38976          61 :   int res1 = 0 ;
   38977          61 :   PyObject *swig_obj[1] ;
   38978             :   
   38979          61 :   if (!args) SWIG_fail;
   38980          61 :   swig_obj[0] = args;
   38981          61 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_DISOWN |  0 );
   38982          61 :   if (!SWIG_IsOK(res1)) {
   38983           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EDTComponent" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   38984             :   }
   38985          61 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   38986          61 :   {
   38987          61 :     const int bLocalUseExceptions = GetUseExceptions();
   38988          61 :     if ( bLocalUseExceptions ) {
   38989          23 :       pushErrorHandler();
   38990             :     }
   38991          61 :     {
   38992          61 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38993          61 :       delete_GDALEDTComponentHS(arg1);
   38994          61 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38995             :     }
   38996          61 :     if ( bLocalUseExceptions ) {
   38997          23 :       popErrorHandler();
   38998             :     }
   38999             : #ifndef SED_HACKS
   39000             :     if ( bLocalUseExceptions ) {
   39001             :       CPLErr eclass = CPLGetLastErrorType();
   39002             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39003             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39004             :       }
   39005             :     }
   39006             : #endif
   39007             :   }
   39008          61 :   resultobj = SWIG_Py_Void();
   39009          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; } }
   39010             :   return resultobj;
   39011             : fail:
   39012             :   return NULL;
   39013             : }
   39014             : 
   39015             : 
   39016          20 : SWIGINTERN PyObject *_wrap_EDTComponent_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39017          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39018          20 :   char *arg1 = (char *) 0 ;
   39019          20 :   size_t arg2 ;
   39020          20 :   GDALExtendedDataTypeHS *arg3 = (GDALExtendedDataTypeHS *) 0 ;
   39021          20 :   int res1 ;
   39022          20 :   char *buf1 = 0 ;
   39023          20 :   int alloc1 = 0 ;
   39024          20 :   size_t val2 ;
   39025          20 :   int ecode2 = 0 ;
   39026          20 :   void *argp3 = 0 ;
   39027          20 :   int res3 = 0 ;
   39028          20 :   PyObject *swig_obj[3] ;
   39029          20 :   GDALEDTComponentHS *result = 0 ;
   39030             :   
   39031          20 :   if (!SWIG_Python_UnpackTuple(args, "EDTComponent_Create", 3, 3, swig_obj)) SWIG_fail;
   39032          20 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   39033          20 :   if (!SWIG_IsOK(res1)) {
   39034           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_Create" "', argument " "1"" of type '" "char const *""'");
   39035             :   }
   39036          20 :   arg1 = reinterpret_cast< char * >(buf1);
   39037          20 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   39038          20 :   if (!SWIG_IsOK(ecode2)) {
   39039           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EDTComponent_Create" "', argument " "2"" of type '" "size_t""'");
   39040             :   } 
   39041          20 :   arg2 = static_cast< size_t >(val2);
   39042          20 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   39043          20 :   if (!SWIG_IsOK(res3)) {
   39044           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EDTComponent_Create" "', argument " "3"" of type '" "GDALExtendedDataTypeHS *""'"); 
   39045             :   }
   39046          20 :   arg3 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp3);
   39047          20 :   {
   39048          20 :     if (!arg1) {
   39049           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   39050             :     }
   39051             :   }
   39052          20 :   {
   39053          20 :     if (!arg3) {
   39054           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   39055             :     }
   39056             :   }
   39057          20 :   {
   39058          20 :     const int bLocalUseExceptions = GetUseExceptions();
   39059          20 :     if ( bLocalUseExceptions ) {
   39060          10 :       pushErrorHandler();
   39061             :     }
   39062          20 :     {
   39063          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39064          20 :       result = (GDALEDTComponentHS *)GDALEDTComponentHS_Create((char const *)arg1,arg2,arg3);
   39065          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39066             :     }
   39067          20 :     if ( bLocalUseExceptions ) {
   39068          10 :       popErrorHandler();
   39069             :     }
   39070             : #ifndef SED_HACKS
   39071             :     if ( bLocalUseExceptions ) {
   39072             :       CPLErr eclass = CPLGetLastErrorType();
   39073             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39074             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39075             :       }
   39076             :     }
   39077             : #endif
   39078             :   }
   39079          20 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_OWN |  0 );
   39080          20 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   39081          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; } }
   39082             :   return resultobj;
   39083           0 : fail:
   39084           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   39085             :   return NULL;
   39086             : }
   39087             : 
   39088             : 
   39089          33 : SWIGINTERN PyObject *_wrap_EDTComponent_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39090          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39091          33 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   39092          33 :   void *argp1 = 0 ;
   39093          33 :   int res1 = 0 ;
   39094          33 :   PyObject *swig_obj[1] ;
   39095          33 :   char *result = 0 ;
   39096             :   
   39097          33 :   if (!args) SWIG_fail;
   39098          33 :   swig_obj[0] = args;
   39099          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   39100          33 :   if (!SWIG_IsOK(res1)) {
   39101           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetName" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   39102             :   }
   39103          33 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   39104          33 :   {
   39105          33 :     const int bLocalUseExceptions = GetUseExceptions();
   39106          33 :     if ( bLocalUseExceptions ) {
   39107          13 :       pushErrorHandler();
   39108             :     }
   39109          33 :     {
   39110          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39111          33 :       result = (char *)GDALEDTComponentHS_GetName(arg1);
   39112          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39113             :     }
   39114          33 :     if ( bLocalUseExceptions ) {
   39115          13 :       popErrorHandler();
   39116             :     }
   39117             : #ifndef SED_HACKS
   39118             :     if ( bLocalUseExceptions ) {
   39119             :       CPLErr eclass = CPLGetLastErrorType();
   39120             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39121             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39122             :       }
   39123             :     }
   39124             : #endif
   39125             :   }
   39126          33 :   resultobj = SWIG_FromCharPtr((const char *)result);
   39127          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; } }
   39128             :   return resultobj;
   39129             : fail:
   39130             :   return NULL;
   39131             : }
   39132             : 
   39133             : 
   39134          31 : SWIGINTERN PyObject *_wrap_EDTComponent_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39135          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39136          31 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   39137          31 :   void *argp1 = 0 ;
   39138          31 :   int res1 = 0 ;
   39139          31 :   PyObject *swig_obj[1] ;
   39140          31 :   size_t result;
   39141             :   
   39142          31 :   if (!args) SWIG_fail;
   39143          31 :   swig_obj[0] = args;
   39144          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   39145          31 :   if (!SWIG_IsOK(res1)) {
   39146           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetOffset" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   39147             :   }
   39148          31 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   39149          31 :   {
   39150          31 :     const int bLocalUseExceptions = GetUseExceptions();
   39151          31 :     if ( bLocalUseExceptions ) {
   39152          13 :       pushErrorHandler();
   39153             :     }
   39154          31 :     {
   39155          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39156          31 :       result = GDALEDTComponentHS_GetOffset(arg1);
   39157          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39158             :     }
   39159          31 :     if ( bLocalUseExceptions ) {
   39160          13 :       popErrorHandler();
   39161             :     }
   39162             : #ifndef SED_HACKS
   39163             :     if ( bLocalUseExceptions ) {
   39164             :       CPLErr eclass = CPLGetLastErrorType();
   39165             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39166             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39167             :       }
   39168             :     }
   39169             : #endif
   39170             :   }
   39171          31 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   39172          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; } }
   39173             :   return resultobj;
   39174             : fail:
   39175             :   return NULL;
   39176             : }
   39177             : 
   39178             : 
   39179          49 : SWIGINTERN PyObject *_wrap_EDTComponent_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39180          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39181          49 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   39182          49 :   void *argp1 = 0 ;
   39183          49 :   int res1 = 0 ;
   39184          49 :   PyObject *swig_obj[1] ;
   39185          49 :   GDALExtendedDataTypeHS *result = 0 ;
   39186             :   
   39187          49 :   if (!args) SWIG_fail;
   39188          49 :   swig_obj[0] = args;
   39189          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   39190          49 :   if (!SWIG_IsOK(res1)) {
   39191           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetType" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   39192             :   }
   39193          49 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   39194          49 :   {
   39195          49 :     const int bLocalUseExceptions = GetUseExceptions();
   39196          49 :     if ( bLocalUseExceptions ) {
   39197          21 :       pushErrorHandler();
   39198             :     }
   39199          49 :     {
   39200          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39201          49 :       result = (GDALExtendedDataTypeHS *)GDALEDTComponentHS_GetType(arg1);
   39202          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39203             :     }
   39204          49 :     if ( bLocalUseExceptions ) {
   39205          21 :       popErrorHandler();
   39206             :     }
   39207             : #ifndef SED_HACKS
   39208             :     if ( bLocalUseExceptions ) {
   39209             :       CPLErr eclass = CPLGetLastErrorType();
   39210             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39211             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39212             :       }
   39213             :     }
   39214             : #endif
   39215             :   }
   39216          49 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   39217          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; } }
   39218             :   return resultobj;
   39219             : fail:
   39220             :   return NULL;
   39221             : }
   39222             : 
   39223             : 
   39224         277 : SWIGINTERN PyObject *EDTComponent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39225         277 :   PyObject *obj;
   39226         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   39227         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALEDTComponentHS, SWIG_NewClientData(obj));
   39228         277 :   return SWIG_Py_Void();
   39229             : }
   39230             : 
   39231          13 : SWIGINTERN PyObject *_wrap_CreateRasterAttributeTableFromMDArrays(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39232          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39233          13 :   GDALRATTableType arg1 ;
   39234          13 :   int arg2 ;
   39235          13 :   GDALMDArrayHS **arg3 = (GDALMDArrayHS **) 0 ;
   39236          13 :   int arg4 = (int) 0 ;
   39237          13 :   GDALRATFieldUsage *arg5 = (GDALRATFieldUsage *) NULL ;
   39238          13 :   int val1 ;
   39239          13 :   int ecode1 = 0 ;
   39240          13 :   PyObject *swig_obj[3] ;
   39241          13 :   GDALRasterAttributeTableShadow *result = 0 ;
   39242             :   
   39243          13 :   if (!SWIG_Python_UnpackTuple(args, "CreateRasterAttributeTableFromMDArrays", 2, 3, swig_obj)) SWIG_fail;
   39244          13 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   39245          13 :   if (!SWIG_IsOK(ecode1)) {
   39246           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "CreateRasterAttributeTableFromMDArrays" "', argument " "1"" of type '" "GDALRATTableType""'");
   39247             :   } 
   39248          13 :   arg1 = static_cast< GDALRATTableType >(val1);
   39249          13 :   {
   39250             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALMDArrayHS *optional_##GDALMDArrayHS)*/
   39251          13 :     if ( !PySequence_Check(swig_obj[1]) ) {
   39252           1 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   39253           1 :       SWIG_fail;
   39254             :     }
   39255          12 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   39256          12 :     if( size > (Py_ssize_t)INT_MAX ) {
   39257           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   39258           0 :       SWIG_fail;
   39259             :     }
   39260          12 :     if( (size_t)size > SIZE_MAX / sizeof(GDALMDArrayHS*) ) {
   39261           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   39262           0 :       SWIG_fail;
   39263             :     }
   39264          12 :     arg2 = (int)size;
   39265          12 :     arg3 = (GDALMDArrayHS**) VSIMalloc(arg2*sizeof(GDALMDArrayHS*));
   39266          12 :     if( !arg3) {
   39267           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   39268           0 :       SWIG_fail;
   39269             :     }
   39270             :     
   39271          26 :     for( int i = 0; i<arg2; i++ ) {
   39272          16 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   39273          16 :       GDALMDArrayHS* rawobjectpointer = NULL;
   39274          16 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_EXCEPTION | 0 ));
   39275          16 :       if (!rawobjectpointer) {
   39276           2 :         Py_DECREF(o);
   39277           2 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALMDArrayHS");
   39278           2 :         SWIG_fail;
   39279             :       }
   39280          14 :       arg3[i] = rawobjectpointer;
   39281          14 :       Py_DECREF(o);
   39282             :       
   39283             :     }
   39284             :   }
   39285          10 :   if (swig_obj[2]) {
   39286           6 :     {
   39287             :       /*  %typemap(in) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   39288           6 :       if ( !PySequence_Check(swig_obj[2]) ) {
   39289           1 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   39290           1 :         SWIG_fail;
   39291             :       }
   39292           5 :       Py_ssize_t size = PySequence_Size(swig_obj[2]);
   39293           5 :       if( size > (Py_ssize_t)INT_MAX ) {
   39294           0 :         PyErr_SetString(PyExc_TypeError, "too big sequence");
   39295           0 :         SWIG_fail;
   39296             :       }
   39297           5 :       if( (size_t)size > SIZE_MAX / sizeof(int) ) {
   39298           0 :         PyErr_SetString(PyExc_TypeError, "too big sequence");
   39299           0 :         SWIG_fail;
   39300             :       }
   39301           5 :       arg4 = (int)size;
   39302           5 :       arg5 = (GDALRATFieldUsage*) VSIMalloc(arg4*sizeof(GDALRATFieldUsage));
   39303           5 :       if( !arg5) {
   39304           0 :         PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   39305           0 :         SWIG_fail;
   39306             :       }
   39307             :       
   39308          10 :       for( int i = 0; i<arg4; i++ ) {
   39309           8 :         PyObject *o = PySequence_GetItem(swig_obj[2],i);
   39310           8 :         int nVal = 0;
   39311           8 :         if ( !PyArg_Parse(o,"i",&nVal) ) {
   39312           1 :           PyErr_SetString(PyExc_TypeError, "not a valid GDALRATFieldUsage");
   39313           1 :           Py_DECREF(o);
   39314           3 :           SWIG_fail;
   39315             :         }
   39316           7 :         Py_DECREF(o);
   39317           7 :         if( nVal < 0 || nVal >= GFU_MaxCount )
   39318             :         {
   39319           2 :           PyErr_SetString(PyExc_TypeError, "not a valid GDALRATFieldUsage");
   39320           2 :           SWIG_fail;
   39321             :         }
   39322           5 :         (arg5)[i] = static_cast<GDALRATFieldUsage>(nVal);
   39323             :       }
   39324             :     }
   39325             :   }
   39326           6 :   {
   39327           6 :     const int bLocalUseExceptions = GetUseExceptions();
   39328           6 :     if ( bLocalUseExceptions ) {
   39329           6 :       pushErrorHandler();
   39330             :     }
   39331           6 :     {
   39332           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39333           6 :       result = (GDALRasterAttributeTableShadow *)CreateRasterAttributeTableFromMDArrays(arg1,arg2,arg3,arg4,arg5);
   39334           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39335             :     }
   39336           6 :     if ( bLocalUseExceptions ) {
   39337           6 :       popErrorHandler();
   39338             :     }
   39339             : #ifndef SED_HACKS
   39340             :     if ( bLocalUseExceptions ) {
   39341             :       CPLErr eclass = CPLGetLastErrorType();
   39342             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39343             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39344             :       }
   39345             :     }
   39346             : #endif
   39347             :   }
   39348           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
   39349           6 :   {
   39350             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   39351           6 :     CPLFree( arg3 );
   39352             :   }
   39353           6 :   {
   39354             :     /* %typemap(freearg) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   39355           6 :     CPLFree( arg5 );
   39356             :   }
   39357          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; } }
   39358             :   return resultobj;
   39359           7 : fail:
   39360           7 :   {
   39361             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   39362           7 :     CPLFree( arg3 );
   39363             :   }
   39364           7 :   {
   39365             :     /* %typemap(freearg) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   39366           7 :     CPLFree( arg5 );
   39367             :   }
   39368             :   return NULL;
   39369             : }
   39370             : 
   39371             : 
   39372       17974 : SWIGINTERN PyObject *_wrap_Band_XSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39373       17974 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39374       17974 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39375       17974 :   void *argp1 = 0 ;
   39376       17974 :   int res1 = 0 ;
   39377       17974 :   PyObject *swig_obj[1] ;
   39378       17974 :   int result;
   39379             :   
   39380       17974 :   if (!args) SWIG_fail;
   39381       17974 :   swig_obj[0] = args;
   39382       17974 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39383       17974 :   if (!SWIG_IsOK(res1)) {
   39384           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_XSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39385             :   }
   39386       17974 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39387       17974 :   {
   39388       17974 :     const int bLocalUseExceptions = GetUseExceptions();
   39389       17974 :     if ( bLocalUseExceptions ) {
   39390       14828 :       pushErrorHandler();
   39391             :     }
   39392       17974 :     {
   39393       17974 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39394       17974 :       result = (int)GDALRasterBandShadow_XSize_get(arg1);
   39395       17974 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39396             :     }
   39397       17974 :     if ( bLocalUseExceptions ) {
   39398       14828 :       popErrorHandler();
   39399             :     }
   39400             : #ifndef SED_HACKS
   39401             :     if ( bLocalUseExceptions ) {
   39402             :       CPLErr eclass = CPLGetLastErrorType();
   39403             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39404             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39405             :       }
   39406             :     }
   39407             : #endif
   39408             :   }
   39409       17974 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39410       17974 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39411             :   return resultobj;
   39412             : fail:
   39413             :   return NULL;
   39414             : }
   39415             : 
   39416             : 
   39417       16835 : SWIGINTERN PyObject *_wrap_Band_YSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39418       16835 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39419       16835 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39420       16835 :   void *argp1 = 0 ;
   39421       16835 :   int res1 = 0 ;
   39422       16835 :   PyObject *swig_obj[1] ;
   39423       16835 :   int result;
   39424             :   
   39425       16835 :   if (!args) SWIG_fail;
   39426       16835 :   swig_obj[0] = args;
   39427       16835 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39428       16835 :   if (!SWIG_IsOK(res1)) {
   39429           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_YSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39430             :   }
   39431       16835 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39432       16835 :   {
   39433       16835 :     const int bLocalUseExceptions = GetUseExceptions();
   39434       16835 :     if ( bLocalUseExceptions ) {
   39435       13751 :       pushErrorHandler();
   39436             :     }
   39437       16835 :     {
   39438       16835 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39439       16835 :       result = (int)GDALRasterBandShadow_YSize_get(arg1);
   39440       16835 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39441             :     }
   39442       16835 :     if ( bLocalUseExceptions ) {
   39443       13751 :       popErrorHandler();
   39444             :     }
   39445             : #ifndef SED_HACKS
   39446             :     if ( bLocalUseExceptions ) {
   39447             :       CPLErr eclass = CPLGetLastErrorType();
   39448             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39449             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39450             :       }
   39451             :     }
   39452             : #endif
   39453             :   }
   39454       16835 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39455       16835 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39456             :   return resultobj;
   39457             : fail:
   39458             :   return NULL;
   39459             : }
   39460             : 
   39461             : 
   39462      849590 : SWIGINTERN PyObject *_wrap_Band_DataType_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39463      849590 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39464      849590 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39465      849590 :   void *argp1 = 0 ;
   39466      849590 :   int res1 = 0 ;
   39467      849590 :   PyObject *swig_obj[1] ;
   39468      849590 :   GDALDataType result;
   39469             :   
   39470      849590 :   if (!args) SWIG_fail;
   39471      849590 :   swig_obj[0] = args;
   39472      849590 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39473      849590 :   if (!SWIG_IsOK(res1)) {
   39474           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DataType_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39475             :   }
   39476      849590 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39477      849590 :   {
   39478      849590 :     const int bLocalUseExceptions = GetUseExceptions();
   39479      849590 :     if ( bLocalUseExceptions ) {
   39480      837498 :       pushErrorHandler();
   39481             :     }
   39482      849590 :     {
   39483      849590 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39484      849590 :       result = (GDALDataType)GDALRasterBandShadow_DataType_get(arg1);
   39485      849590 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39486             :     }
   39487      849590 :     if ( bLocalUseExceptions ) {
   39488      837498 :       popErrorHandler();
   39489             :     }
   39490             : #ifndef SED_HACKS
   39491             :     if ( bLocalUseExceptions ) {
   39492             :       CPLErr eclass = CPLGetLastErrorType();
   39493             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39494             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39495             :       }
   39496             :     }
   39497             : #endif
   39498             :   }
   39499      849590 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39500      849590 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39501             :   return resultobj;
   39502             : fail:
   39503             :   return NULL;
   39504             : }
   39505             : 
   39506             : 
   39507          68 : SWIGINTERN PyObject *_wrap_Band_GetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39508          68 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39509          68 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39510          68 :   void *argp1 = 0 ;
   39511          68 :   int res1 = 0 ;
   39512          68 :   PyObject *swig_obj[1] ;
   39513          68 :   GDALDatasetShadow *result = 0 ;
   39514             :   
   39515          68 :   if (!args) SWIG_fail;
   39516          68 :   swig_obj[0] = args;
   39517          68 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39518          68 :   if (!SWIG_IsOK(res1)) {
   39519           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDataset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39520             :   }
   39521          68 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39522          68 :   {
   39523          68 :     const int bLocalUseExceptions = GetUseExceptions();
   39524          68 :     if ( bLocalUseExceptions ) {
   39525           8 :       pushErrorHandler();
   39526             :     }
   39527          68 :     {
   39528          68 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39529          68 :       result = (GDALDatasetShadow *)GDALRasterBandShadow_GetDataset(arg1);
   39530          68 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39531             :     }
   39532          68 :     if ( bLocalUseExceptions ) {
   39533           8 :       popErrorHandler();
   39534             :     }
   39535             : #ifndef SED_HACKS
   39536             :     if ( bLocalUseExceptions ) {
   39537             :       CPLErr eclass = CPLGetLastErrorType();
   39538             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39539             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39540             :       }
   39541             :     }
   39542             : #endif
   39543             :   }
   39544          68 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   39545          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; } }
   39546             :   return resultobj;
   39547             : fail:
   39548             :   return NULL;
   39549             : }
   39550             : 
   39551             : 
   39552           8 : SWIGINTERN PyObject *_wrap_Band_GetBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39553           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39554           8 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39555           8 :   void *argp1 = 0 ;
   39556           8 :   int res1 = 0 ;
   39557           8 :   PyObject *swig_obj[1] ;
   39558           8 :   int result;
   39559             :   
   39560           8 :   if (!args) SWIG_fail;
   39561           8 :   swig_obj[0] = args;
   39562           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39563           8 :   if (!SWIG_IsOK(res1)) {
   39564           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39565             :   }
   39566           8 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39567           8 :   {
   39568           8 :     const int bLocalUseExceptions = GetUseExceptions();
   39569           8 :     if ( bLocalUseExceptions ) {
   39570           8 :       pushErrorHandler();
   39571             :     }
   39572           8 :     {
   39573           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39574           8 :       result = (int)GDALRasterBandShadow_GetBand(arg1);
   39575           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39576             :     }
   39577           8 :     if ( bLocalUseExceptions ) {
   39578           8 :       popErrorHandler();
   39579             :     }
   39580             : #ifndef SED_HACKS
   39581             :     if ( bLocalUseExceptions ) {
   39582             :       CPLErr eclass = CPLGetLastErrorType();
   39583             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39584             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39585             :       }
   39586             :     }
   39587             : #endif
   39588             :   }
   39589           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39590           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; } }
   39591             :   return resultobj;
   39592             : fail:
   39593             :   return NULL;
   39594             : }
   39595             : 
   39596             : 
   39597         491 : SWIGINTERN PyObject *_wrap_Band_GetBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39598         491 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39599         491 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39600         491 :   int *arg2 = (int *) 0 ;
   39601         491 :   int *arg3 = (int *) 0 ;
   39602         491 :   void *argp1 = 0 ;
   39603         491 :   int res1 = 0 ;
   39604         491 :   int temp2 ;
   39605         491 :   int res2 = SWIG_TMPOBJ ;
   39606         491 :   int temp3 ;
   39607         491 :   int res3 = SWIG_TMPOBJ ;
   39608         491 :   PyObject *swig_obj[1] ;
   39609             :   
   39610         491 :   arg2 = &temp2;
   39611         491 :   arg3 = &temp3;
   39612         491 :   if (!args) SWIG_fail;
   39613         491 :   swig_obj[0] = args;
   39614         491 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39615         491 :   if (!SWIG_IsOK(res1)) {
   39616           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39617             :   }
   39618         491 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39619         491 :   {
   39620         491 :     const int bLocalUseExceptions = GetUseExceptions();
   39621         491 :     if ( bLocalUseExceptions ) {
   39622         207 :       pushErrorHandler();
   39623             :     }
   39624         491 :     {
   39625         491 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39626         491 :       GDALRasterBandShadow_GetBlockSize(arg1,arg2,arg3);
   39627         491 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39628             :     }
   39629         491 :     if ( bLocalUseExceptions ) {
   39630         207 :       popErrorHandler();
   39631             :     }
   39632             : #ifndef SED_HACKS
   39633             :     if ( bLocalUseExceptions ) {
   39634             :       CPLErr eclass = CPLGetLastErrorType();
   39635             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39636             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39637             :       }
   39638             :     }
   39639             : #endif
   39640             :   }
   39641         491 :   resultobj = SWIG_Py_Void();
   39642         491 :   if (ReturnSame(SWIG_IsTmpObj(res2))) {
   39643         491 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
   39644             :   } else {
   39645           0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   39646           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
   39647             :   }
   39648         491 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   39649         491 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   39650             :   } else {
   39651           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   39652           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   39653             :   }
   39654         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; } }
   39655             :   return resultobj;
   39656             : fail:
   39657             :   return NULL;
   39658             : }
   39659             : 
   39660             : 
   39661           6 : SWIGINTERN PyObject *_wrap_Band_GetActualBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39662           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39663           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39664           6 :   int arg2 ;
   39665           6 :   int arg3 ;
   39666           6 :   int *arg4 = (int *) 0 ;
   39667           6 :   int *arg5 = (int *) 0 ;
   39668           6 :   int *arg6 = (int *) 0 ;
   39669           6 :   void *argp1 = 0 ;
   39670           6 :   int res1 = 0 ;
   39671           6 :   int val2 ;
   39672           6 :   int ecode2 = 0 ;
   39673           6 :   int val3 ;
   39674           6 :   int ecode3 = 0 ;
   39675           6 :   int nxvalid4 = 0 ;
   39676           6 :   int nyvalid4 = 0 ;
   39677           6 :   int isvalid4 = 0 ;
   39678           6 :   PyObject *swig_obj[3] ;
   39679             :   
   39680           6 :   {
   39681             :     /* %typemap(in) (int *pnxvalid, int *pnyvalid, int* pisvalid) */
   39682           6 :     arg4 = &nxvalid4;
   39683           6 :     arg5 = &nyvalid4;
   39684           6 :     arg6 = &isvalid4;
   39685             :   }
   39686           6 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetActualBlockSize", 3, 3, swig_obj)) SWIG_fail;
   39687           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39688           6 :   if (!SWIG_IsOK(res1)) {
   39689           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetActualBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39690             :   }
   39691           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39692           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   39693           6 :   if (!SWIG_IsOK(ecode2)) {
   39694           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetActualBlockSize" "', argument " "2"" of type '" "int""'");
   39695             :   } 
   39696           6 :   arg2 = static_cast< int >(val2);
   39697           6 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   39698           6 :   if (!SWIG_IsOK(ecode3)) {
   39699           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetActualBlockSize" "', argument " "3"" of type '" "int""'");
   39700             :   } 
   39701           6 :   arg3 = static_cast< int >(val3);
   39702           6 :   {
   39703           6 :     const int bLocalUseExceptions = GetUseExceptions();
   39704           6 :     if ( bLocalUseExceptions ) {
   39705           0 :       pushErrorHandler();
   39706             :     }
   39707           6 :     {
   39708           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39709           6 :       GDALRasterBandShadow_GetActualBlockSize(arg1,arg2,arg3,arg4,arg5,arg6);
   39710           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39711             :     }
   39712           6 :     if ( bLocalUseExceptions ) {
   39713           0 :       popErrorHandler();
   39714             :     }
   39715             : #ifndef SED_HACKS
   39716             :     if ( bLocalUseExceptions ) {
   39717             :       CPLErr eclass = CPLGetLastErrorType();
   39718             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39719             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39720             :       }
   39721             :     }
   39722             : #endif
   39723             :   }
   39724           6 :   resultobj = SWIG_Py_Void();
   39725           6 :   {
   39726             :     /* %typemap(argout) (int *pnxvalid, int *pnyvalid, int* pisvalid)  */
   39727           6 :     PyObject *r;
   39728           6 :     if ( !*arg6 ) {
   39729           4 :       Py_INCREF(Py_None);
   39730           4 :       r = Py_None;
   39731             :     }
   39732             :     else {
   39733           2 :       r = PyTuple_New( 2 );
   39734           2 :       PyTuple_SetItem( r, 0, PyLong_FromLong(*arg4) );
   39735           2 :       PyTuple_SetItem( r, 1, PyLong_FromLong(*arg5) );
   39736             :     }
   39737             : #if SWIG_VERSION >= 0x040300
   39738             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   39739             : #else
   39740           6 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   39741             : #endif
   39742             :   }
   39743           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; } }
   39744             :   return resultobj;
   39745             : fail:
   39746             :   return NULL;
   39747             : }
   39748             : 
   39749             : 
   39750         839 : SWIGINTERN PyObject *_wrap_Band_GetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39751         839 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39752         839 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39753         839 :   void *argp1 = 0 ;
   39754         839 :   int res1 = 0 ;
   39755         839 :   PyObject *swig_obj[1] ;
   39756         839 :   GDALColorInterp result;
   39757             :   
   39758         839 :   if (!args) SWIG_fail;
   39759         839 :   swig_obj[0] = args;
   39760         839 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39761         839 :   if (!SWIG_IsOK(res1)) {
   39762           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39763             :   }
   39764         839 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39765         839 :   {
   39766         839 :     const int bLocalUseExceptions = GetUseExceptions();
   39767         839 :     if ( bLocalUseExceptions ) {
   39768         293 :       pushErrorHandler();
   39769             :     }
   39770         839 :     {
   39771         839 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39772         839 :       result = (GDALColorInterp)GDALRasterBandShadow_GetColorInterpretation(arg1);
   39773         839 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39774             :     }
   39775         839 :     if ( bLocalUseExceptions ) {
   39776         293 :       popErrorHandler();
   39777             :     }
   39778             : #ifndef SED_HACKS
   39779             :     if ( bLocalUseExceptions ) {
   39780             :       CPLErr eclass = CPLGetLastErrorType();
   39781             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39782             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39783             :       }
   39784             :     }
   39785             : #endif
   39786             :   }
   39787         839 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39788         839 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39789             :   return resultobj;
   39790             : fail:
   39791             :   return NULL;
   39792             : }
   39793             : 
   39794             : 
   39795         182 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39796         182 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39797         182 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39798         182 :   void *argp1 = 0 ;
   39799         182 :   int res1 = 0 ;
   39800         182 :   PyObject *swig_obj[1] ;
   39801         182 :   GDALColorInterp result;
   39802             :   
   39803         182 :   if (!args) SWIG_fail;
   39804         182 :   swig_obj[0] = args;
   39805         182 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39806         182 :   if (!SWIG_IsOK(res1)) {
   39807           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39808             :   }
   39809         182 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39810         182 :   {
   39811         182 :     const int bLocalUseExceptions = GetUseExceptions();
   39812         182 :     if ( bLocalUseExceptions ) {
   39813          64 :       pushErrorHandler();
   39814             :     }
   39815         182 :     {
   39816         182 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39817         182 :       result = (GDALColorInterp)GDALRasterBandShadow_GetRasterColorInterpretation(arg1);
   39818         182 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39819             :     }
   39820         182 :     if ( bLocalUseExceptions ) {
   39821          64 :       popErrorHandler();
   39822             :     }
   39823             : #ifndef SED_HACKS
   39824             :     if ( bLocalUseExceptions ) {
   39825             :       CPLErr eclass = CPLGetLastErrorType();
   39826             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39827             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39828             :       }
   39829             :     }
   39830             : #endif
   39831             :   }
   39832         182 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39833         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; } }
   39834             :   return resultobj;
   39835             : fail:
   39836             :   return NULL;
   39837             : }
   39838             : 
   39839             : 
   39840         684 : SWIGINTERN PyObject *_wrap_Band_SetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39841         684 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39842         684 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39843         684 :   GDALColorInterp arg2 ;
   39844         684 :   void *argp1 = 0 ;
   39845         684 :   int res1 = 0 ;
   39846         684 :   int val2 ;
   39847         684 :   int ecode2 = 0 ;
   39848         684 :   PyObject *swig_obj[2] ;
   39849         684 :   CPLErr result;
   39850             :   
   39851         684 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetColorInterpretation", 2, 2, swig_obj)) SWIG_fail;
   39852         684 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39853         684 :   if (!SWIG_IsOK(res1)) {
   39854           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39855             :   }
   39856         684 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39857         684 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   39858         684 :   if (!SWIG_IsOK(ecode2)) {
   39859           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   39860             :   } 
   39861         684 :   arg2 = static_cast< GDALColorInterp >(val2);
   39862         684 :   {
   39863         684 :     const int bLocalUseExceptions = GetUseExceptions();
   39864         684 :     if ( bLocalUseExceptions ) {
   39865         324 :       pushErrorHandler();
   39866             :     }
   39867         684 :     {
   39868         684 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39869         684 :       result = (CPLErr)GDALRasterBandShadow_SetColorInterpretation(arg1,arg2);
   39870         684 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39871             :     }
   39872         684 :     if ( bLocalUseExceptions ) {
   39873         324 :       popErrorHandler();
   39874             :     }
   39875             : #ifndef SED_HACKS
   39876             :     if ( bLocalUseExceptions ) {
   39877             :       CPLErr eclass = CPLGetLastErrorType();
   39878             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39879             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39880             :       }
   39881             :     }
   39882             : #endif
   39883             :   }
   39884         684 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39885         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; } }
   39886             :   return resultobj;
   39887             : fail:
   39888             :   return NULL;
   39889             : }
   39890             : 
   39891             : 
   39892         409 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39893         409 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39894         409 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39895         409 :   GDALColorInterp arg2 ;
   39896         409 :   void *argp1 = 0 ;
   39897         409 :   int res1 = 0 ;
   39898         409 :   int val2 ;
   39899         409 :   int ecode2 = 0 ;
   39900         409 :   PyObject *swig_obj[2] ;
   39901         409 :   CPLErr result;
   39902             :   
   39903         409 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterColorInterpretation", 2, 2, swig_obj)) SWIG_fail;
   39904         409 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39905         409 :   if (!SWIG_IsOK(res1)) {
   39906           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39907             :   }
   39908         409 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39909         409 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   39910         409 :   if (!SWIG_IsOK(ecode2)) {
   39911           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetRasterColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   39912             :   } 
   39913         409 :   arg2 = static_cast< GDALColorInterp >(val2);
   39914         409 :   {
   39915         409 :     const int bLocalUseExceptions = GetUseExceptions();
   39916         409 :     if ( bLocalUseExceptions ) {
   39917         355 :       pushErrorHandler();
   39918             :     }
   39919         409 :     {
   39920         409 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39921         409 :       result = (CPLErr)GDALRasterBandShadow_SetRasterColorInterpretation(arg1,arg2);
   39922         409 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39923             :     }
   39924         409 :     if ( bLocalUseExceptions ) {
   39925         355 :       popErrorHandler();
   39926             :     }
   39927             : #ifndef SED_HACKS
   39928             :     if ( bLocalUseExceptions ) {
   39929             :       CPLErr eclass = CPLGetLastErrorType();
   39930             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39931             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39932             :       }
   39933             :     }
   39934             : #endif
   39935             :   }
   39936         409 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39937         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; } }
   39938             :   return resultobj;
   39939             : fail:
   39940             :   return NULL;
   39941             : }
   39942             : 
   39943             : 
   39944      410201 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39945      410201 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39946      410201 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39947      410201 :   double *arg2 = (double *) 0 ;
   39948      410201 :   int *arg3 = (int *) 0 ;
   39949      410201 :   void *argp1 = 0 ;
   39950      410201 :   int res1 = 0 ;
   39951      410201 :   double tmpval2 ;
   39952      410201 :   int tmphasval2 ;
   39953      410201 :   PyObject *swig_obj[1] ;
   39954             :   
   39955      410201 :   {
   39956             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   39957      410201 :     arg2 = &tmpval2;
   39958      410201 :     arg3 = &tmphasval2;
   39959             :   }
   39960      410201 :   if (!args) SWIG_fail;
   39961      410201 :   swig_obj[0] = args;
   39962      410201 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39963      410201 :   if (!SWIG_IsOK(res1)) {
   39964           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39965             :   }
   39966      410201 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39967      410201 :   {
   39968      410201 :     const int bLocalUseExceptions = GetUseExceptions();
   39969      410201 :     if ( bLocalUseExceptions ) {
   39970      409999 :       pushErrorHandler();
   39971             :     }
   39972      410201 :     {
   39973      410201 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39974      410201 :       GDALRasterBandShadow_GetNoDataValue(arg1,arg2,arg3);
   39975      410201 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39976             :     }
   39977      410201 :     if ( bLocalUseExceptions ) {
   39978      409999 :       popErrorHandler();
   39979             :     }
   39980             : #ifndef SED_HACKS
   39981             :     if ( bLocalUseExceptions ) {
   39982             :       CPLErr eclass = CPLGetLastErrorType();
   39983             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39984             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39985             :       }
   39986             :     }
   39987             : #endif
   39988             :   }
   39989      410201 :   resultobj = SWIG_Py_Void();
   39990      410201 :   {
   39991             :     /* %typemap(python,argout) (double *val, int *hasval) */
   39992      410201 :     PyObject *r;
   39993      410201 :     if ( !*arg3 ) {
   39994         462 :       Py_INCREF(Py_None);
   39995         462 :       r = Py_None;
   39996             :     }
   39997             :     else {
   39998      409739 :       r = PyFloat_FromDouble( *arg2 );
   39999             :     }
   40000             : #if SWIG_VERSION >= 0x040300
   40001             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40002             : #else
   40003      410201 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40004             : #endif
   40005             :   }
   40006      410201 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40007             :   return resultobj;
   40008             : fail:
   40009             :   return NULL;
   40010             : }
   40011             : 
   40012             : 
   40013          31 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40014          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40015          31 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40016          31 :   GIntBig *arg2 = (GIntBig *) 0 ;
   40017          31 :   int *arg3 = (int *) 0 ;
   40018          31 :   void *argp1 = 0 ;
   40019          31 :   int res1 = 0 ;
   40020          31 :   GIntBig tmpval2 ;
   40021          31 :   int tmphasval2 ;
   40022          31 :   PyObject *swig_obj[1] ;
   40023             :   
   40024          31 :   {
   40025             :     /* %typemap(python,in,numinputs=0) (GIntBig *val, int *hasval) */
   40026          31 :     arg2 = &tmpval2;
   40027          31 :     arg3 = &tmphasval2;
   40028             :   }
   40029          31 :   if (!args) SWIG_fail;
   40030          31 :   swig_obj[0] = args;
   40031          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40032          31 :   if (!SWIG_IsOK(res1)) {
   40033           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40034             :   }
   40035          31 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40036          31 :   {
   40037          31 :     const int bLocalUseExceptions = GetUseExceptions();
   40038          31 :     if ( bLocalUseExceptions ) {
   40039          22 :       pushErrorHandler();
   40040             :     }
   40041          31 :     {
   40042          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40043          31 :       GDALRasterBandShadow_GetNoDataValueAsInt64(arg1,arg2,arg3);
   40044          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40045             :     }
   40046          31 :     if ( bLocalUseExceptions ) {
   40047          22 :       popErrorHandler();
   40048             :     }
   40049             : #ifndef SED_HACKS
   40050             :     if ( bLocalUseExceptions ) {
   40051             :       CPLErr eclass = CPLGetLastErrorType();
   40052             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40053             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40054             :       }
   40055             :     }
   40056             : #endif
   40057             :   }
   40058          31 :   resultobj = SWIG_Py_Void();
   40059          31 :   {
   40060             :     /* %typemap(python,argout) (GIntBig *val, int *hasval) */
   40061          31 :     PyObject *r;
   40062          31 :     if ( !*arg3 ) {
   40063          10 :       Py_INCREF(Py_None);
   40064          10 :       r = Py_None;
   40065             :     }
   40066             :     else {
   40067          21 :       r = PyLong_FromLongLong( *arg2 );
   40068             :     }
   40069             : #if SWIG_VERSION >= 0x040300
   40070             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40071             : #else
   40072          31 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40073             : #endif
   40074             :   }
   40075          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; } }
   40076             :   return resultobj;
   40077             : fail:
   40078             :   return NULL;
   40079             : }
   40080             : 
   40081             : 
   40082          22 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40083          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40084          22 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40085          22 :   GUIntBig *arg2 = (GUIntBig *) 0 ;
   40086          22 :   int *arg3 = (int *) 0 ;
   40087          22 :   void *argp1 = 0 ;
   40088          22 :   int res1 = 0 ;
   40089          22 :   GUIntBig tmpval2 ;
   40090          22 :   int tmphasval2 ;
   40091          22 :   PyObject *swig_obj[1] ;
   40092             :   
   40093          22 :   {
   40094             :     /* %typemap(python,in,numinputs=0) (GUIntBig *val, int *hasval) */
   40095          22 :     arg2 = &tmpval2;
   40096          22 :     arg3 = &tmphasval2;
   40097             :   }
   40098          22 :   if (!args) SWIG_fail;
   40099          22 :   swig_obj[0] = args;
   40100          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40101          22 :   if (!SWIG_IsOK(res1)) {
   40102           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40103             :   }
   40104          22 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40105          22 :   {
   40106          22 :     const int bLocalUseExceptions = GetUseExceptions();
   40107          22 :     if ( bLocalUseExceptions ) {
   40108          13 :       pushErrorHandler();
   40109             :     }
   40110          22 :     {
   40111          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40112          22 :       GDALRasterBandShadow_GetNoDataValueAsUInt64(arg1,arg2,arg3);
   40113          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40114             :     }
   40115          22 :     if ( bLocalUseExceptions ) {
   40116          13 :       popErrorHandler();
   40117             :     }
   40118             : #ifndef SED_HACKS
   40119             :     if ( bLocalUseExceptions ) {
   40120             :       CPLErr eclass = CPLGetLastErrorType();
   40121             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40122             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40123             :       }
   40124             :     }
   40125             : #endif
   40126             :   }
   40127          22 :   resultobj = SWIG_Py_Void();
   40128          22 :   {
   40129             :     /* %typemap(python,argout) (GUIntBig *val, int *hasval) */
   40130          22 :     PyObject *r;
   40131          22 :     if ( !*arg3 ) {
   40132           4 :       Py_INCREF(Py_None);
   40133           4 :       r = Py_None;
   40134             :     }
   40135             :     else {
   40136          18 :       r = PyLong_FromUnsignedLongLong( *arg2 );
   40137             :     }
   40138             : #if SWIG_VERSION >= 0x040300
   40139             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40140             : #else
   40141          22 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40142             : #endif
   40143             :   }
   40144          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; } }
   40145             :   return resultobj;
   40146             : fail:
   40147             :   return NULL;
   40148             : }
   40149             : 
   40150             : 
   40151         610 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40152         610 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40153         610 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40154         610 :   double arg2 ;
   40155         610 :   void *argp1 = 0 ;
   40156         610 :   int res1 = 0 ;
   40157         610 :   double val2 ;
   40158         610 :   int ecode2 = 0 ;
   40159         610 :   PyObject *swig_obj[2] ;
   40160         610 :   CPLErr result;
   40161             :   
   40162         610 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValue", 2, 2, swig_obj)) SWIG_fail;
   40163         610 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40164         610 :   if (!SWIG_IsOK(res1)) {
   40165           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40166             :   }
   40167         610 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40168         610 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   40169         610 :   if (!SWIG_IsOK(ecode2)) {
   40170           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetNoDataValue" "', argument " "2"" of type '" "double""'");
   40171             :   } 
   40172         610 :   arg2 = static_cast< double >(val2);
   40173         610 :   {
   40174         610 :     const int bLocalUseExceptions = GetUseExceptions();
   40175         610 :     if ( bLocalUseExceptions ) {
   40176         443 :       pushErrorHandler();
   40177             :     }
   40178         610 :     {
   40179         610 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40180         610 :       result = (CPLErr)GDALRasterBandShadow_SetNoDataValue(arg1,arg2);
   40181         610 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40182             :     }
   40183         610 :     if ( bLocalUseExceptions ) {
   40184         443 :       popErrorHandler();
   40185             :     }
   40186             : #ifndef SED_HACKS
   40187             :     if ( bLocalUseExceptions ) {
   40188             :       CPLErr eclass = CPLGetLastErrorType();
   40189             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40190             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40191             :       }
   40192             :     }
   40193             : #endif
   40194             :   }
   40195         610 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40196         622 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40197             :   return resultobj;
   40198             : fail:
   40199             :   return NULL;
   40200             : }
   40201             : 
   40202             : 
   40203          21 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40204          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40205          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40206          21 :   GIntBig arg2 ;
   40207          21 :   void *argp1 = 0 ;
   40208          21 :   int res1 = 0 ;
   40209          21 :   PyObject *swig_obj[2] ;
   40210          21 :   CPLErr result;
   40211             :   
   40212          21 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValueAsInt64", 2, 2, swig_obj)) SWIG_fail;
   40213          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40214          21 :   if (!SWIG_IsOK(res1)) {
   40215           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40216             :   }
   40217          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40218          21 :   {
   40219          21 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   40220             :   }
   40221          21 :   {
   40222          21 :     const int bLocalUseExceptions = GetUseExceptions();
   40223          21 :     if ( bLocalUseExceptions ) {
   40224          10 :       pushErrorHandler();
   40225             :     }
   40226          21 :     {
   40227          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40228          21 :       result = (CPLErr)GDALRasterBandShadow_SetNoDataValueAsInt64(arg1,arg2);
   40229          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40230             :     }
   40231          21 :     if ( bLocalUseExceptions ) {
   40232          10 :       popErrorHandler();
   40233             :     }
   40234             : #ifndef SED_HACKS
   40235             :     if ( bLocalUseExceptions ) {
   40236             :       CPLErr eclass = CPLGetLastErrorType();
   40237             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40238             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40239             :       }
   40240             :     }
   40241             : #endif
   40242             :   }
   40243          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40244          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; } }
   40245             :   return resultobj;
   40246             : fail:
   40247             :   return NULL;
   40248             : }
   40249             : 
   40250             : 
   40251          20 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40252          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40253          20 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40254          20 :   GUIntBig arg2 ;
   40255          20 :   void *argp1 = 0 ;
   40256          20 :   int res1 = 0 ;
   40257          20 :   PyObject *swig_obj[2] ;
   40258          20 :   CPLErr result;
   40259             :   
   40260          20 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValueAsUInt64", 2, 2, swig_obj)) SWIG_fail;
   40261          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40262          20 :   if (!SWIG_IsOK(res1)) {
   40263           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40264             :   }
   40265          20 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40266          20 :   {
   40267          20 :     arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
   40268             :   }
   40269          20 :   {
   40270          20 :     const int bLocalUseExceptions = GetUseExceptions();
   40271          20 :     if ( bLocalUseExceptions ) {
   40272           9 :       pushErrorHandler();
   40273             :     }
   40274          20 :     {
   40275          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40276          20 :       result = (CPLErr)GDALRasterBandShadow_SetNoDataValueAsUInt64(arg1,arg2);
   40277          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40278             :     }
   40279          20 :     if ( bLocalUseExceptions ) {
   40280           9 :       popErrorHandler();
   40281             :     }
   40282             : #ifndef SED_HACKS
   40283             :     if ( bLocalUseExceptions ) {
   40284             :       CPLErr eclass = CPLGetLastErrorType();
   40285             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40286             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40287             :       }
   40288             :     }
   40289             : #endif
   40290             :   }
   40291          20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40292          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; } }
   40293             :   return resultobj;
   40294             : fail:
   40295             :   return NULL;
   40296             : }
   40297             : 
   40298             : 
   40299          53 : SWIGINTERN PyObject *_wrap_Band_DeleteNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40300          53 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40301          53 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40302          53 :   void *argp1 = 0 ;
   40303          53 :   int res1 = 0 ;
   40304          53 :   PyObject *swig_obj[1] ;
   40305          53 :   CPLErr result;
   40306             :   
   40307          53 :   if (!args) SWIG_fail;
   40308          53 :   swig_obj[0] = args;
   40309          53 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40310          53 :   if (!SWIG_IsOK(res1)) {
   40311           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DeleteNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40312             :   }
   40313          53 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40314          53 :   {
   40315          53 :     const int bLocalUseExceptions = GetUseExceptions();
   40316          53 :     if ( bLocalUseExceptions ) {
   40317          42 :       pushErrorHandler();
   40318             :     }
   40319          53 :     {
   40320          53 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40321          53 :       result = (CPLErr)GDALRasterBandShadow_DeleteNoDataValue(arg1);
   40322          53 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40323             :     }
   40324          53 :     if ( bLocalUseExceptions ) {
   40325          42 :       popErrorHandler();
   40326             :     }
   40327             : #ifndef SED_HACKS
   40328             :     if ( bLocalUseExceptions ) {
   40329             :       CPLErr eclass = CPLGetLastErrorType();
   40330             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40331             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40332             :       }
   40333             :     }
   40334             : #endif
   40335             :   }
   40336          53 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40337          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; } }
   40338             :   return resultobj;
   40339             : fail:
   40340             :   return NULL;
   40341             : }
   40342             : 
   40343             : 
   40344          69 : SWIGINTERN PyObject *_wrap_Band_GetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40345          69 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40346          69 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40347          69 :   void *argp1 = 0 ;
   40348          69 :   int res1 = 0 ;
   40349          69 :   PyObject *swig_obj[1] ;
   40350          69 :   char *result = 0 ;
   40351             :   
   40352          69 :   if (!args) SWIG_fail;
   40353          69 :   swig_obj[0] = args;
   40354          69 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40355          69 :   if (!SWIG_IsOK(res1)) {
   40356           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40357             :   }
   40358          69 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40359          69 :   {
   40360          69 :     const int bLocalUseExceptions = GetUseExceptions();
   40361          69 :     if ( bLocalUseExceptions ) {
   40362          38 :       pushErrorHandler();
   40363             :     }
   40364          69 :     {
   40365          69 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40366          69 :       result = (char *)GDALRasterBandShadow_GetUnitType(arg1);
   40367          69 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40368             :     }
   40369          69 :     if ( bLocalUseExceptions ) {
   40370          38 :       popErrorHandler();
   40371             :     }
   40372             : #ifndef SED_HACKS
   40373             :     if ( bLocalUseExceptions ) {
   40374             :       CPLErr eclass = CPLGetLastErrorType();
   40375             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40376             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40377             :       }
   40378             :     }
   40379             : #endif
   40380             :   }
   40381          69 :   resultobj = SWIG_FromCharPtr((const char *)result);
   40382          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; } }
   40383             :   return resultobj;
   40384             : fail:
   40385             :   return NULL;
   40386             : }
   40387             : 
   40388             : 
   40389          27 : SWIGINTERN PyObject *_wrap_Band_SetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40390          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40391          27 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40392          27 :   char *arg2 = (char *) 0 ;
   40393          27 :   void *argp1 = 0 ;
   40394          27 :   int res1 = 0 ;
   40395          27 :   int res2 ;
   40396          27 :   char *buf2 = 0 ;
   40397          27 :   int alloc2 = 0 ;
   40398          27 :   PyObject *swig_obj[2] ;
   40399          27 :   CPLErr result;
   40400             :   
   40401          27 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetUnitType", 2, 2, swig_obj)) SWIG_fail;
   40402          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40403          27 :   if (!SWIG_IsOK(res1)) {
   40404           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40405             :   }
   40406          27 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40407          27 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   40408          27 :   if (!SWIG_IsOK(res2)) {
   40409           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetUnitType" "', argument " "2"" of type '" "char const *""'");
   40410             :   }
   40411          27 :   arg2 = reinterpret_cast< char * >(buf2);
   40412          27 :   {
   40413          27 :     const int bLocalUseExceptions = GetUseExceptions();
   40414          27 :     if ( bLocalUseExceptions ) {
   40415          18 :       pushErrorHandler();
   40416             :     }
   40417          27 :     {
   40418          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40419          27 :       result = (CPLErr)GDALRasterBandShadow_SetUnitType(arg1,(char const *)arg2);
   40420          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40421             :     }
   40422          27 :     if ( bLocalUseExceptions ) {
   40423          18 :       popErrorHandler();
   40424             :     }
   40425             : #ifndef SED_HACKS
   40426             :     if ( bLocalUseExceptions ) {
   40427             :       CPLErr eclass = CPLGetLastErrorType();
   40428             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40429             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40430             :       }
   40431             :     }
   40432             : #endif
   40433             :   }
   40434          27 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40435          27 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   40436          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; } }
   40437             :   return resultobj;
   40438           0 : fail:
   40439           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   40440             :   return NULL;
   40441             : }
   40442             : 
   40443             : 
   40444          17 : SWIGINTERN PyObject *_wrap_Band_GetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40445          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40446          17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40447          17 :   void *argp1 = 0 ;
   40448          17 :   int res1 = 0 ;
   40449          17 :   PyObject *swig_obj[1] ;
   40450          17 :   char **result = 0 ;
   40451             :   
   40452          17 :   if (!args) SWIG_fail;
   40453          17 :   swig_obj[0] = args;
   40454          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40455          17 :   if (!SWIG_IsOK(res1)) {
   40456           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40457             :   }
   40458          17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40459          17 :   {
   40460          17 :     const int bLocalUseExceptions = GetUseExceptions();
   40461          17 :     if ( bLocalUseExceptions ) {
   40462           0 :       pushErrorHandler();
   40463             :     }
   40464          17 :     {
   40465          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40466          17 :       result = (char **)GDALRasterBandShadow_GetRasterCategoryNames(arg1);
   40467          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40468             :     }
   40469          17 :     if ( bLocalUseExceptions ) {
   40470           0 :       popErrorHandler();
   40471             :     }
   40472             : #ifndef SED_HACKS
   40473             :     if ( bLocalUseExceptions ) {
   40474             :       CPLErr eclass = CPLGetLastErrorType();
   40475             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40476             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40477             :       }
   40478             :     }
   40479             : #endif
   40480             :   }
   40481          17 :   {
   40482             :     /* %typemap(out) char **options -> ( string ) */
   40483          17 :     bool bErr = false;
   40484          17 :     resultobj = CSLToList(result, &bErr);
   40485          17 :     if( bErr ) {
   40486           0 :       SWIG_fail;
   40487             :     }
   40488             :   }
   40489          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; } }
   40490             :   return resultobj;
   40491             : fail:
   40492             :   return NULL;
   40493             : }
   40494             : 
   40495             : 
   40496           0 : SWIGINTERN PyObject *_wrap_Band_SetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40497           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40498           0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40499           0 :   char **arg2 = (char **) 0 ;
   40500           0 :   void *argp1 = 0 ;
   40501           0 :   int res1 = 0 ;
   40502           0 :   PyObject *swig_obj[2] ;
   40503           0 :   CPLErr result;
   40504             :   
   40505           0 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterCategoryNames", 2, 2, swig_obj)) SWIG_fail;
   40506           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40507           0 :   if (!SWIG_IsOK(res1)) {
   40508           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40509             :   }
   40510           0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40511           0 :   {
   40512             :     /* %typemap(in) char **dict */
   40513           0 :     arg2 = NULL;
   40514           0 :     if ( PySequence_Check( swig_obj[1] ) ) {
   40515           0 :       int bErr = FALSE;
   40516           0 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   40517           0 :       if ( bErr )
   40518             :       {
   40519           0 :         SWIG_fail;
   40520             :       }
   40521             :     }
   40522           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   40523           0 :       int bErr = FALSE;
   40524           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   40525           0 :       if ( bErr )
   40526             :       {
   40527           0 :         SWIG_fail;
   40528             :       }
   40529             :     }
   40530             :     else {
   40531           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   40532           0 :       SWIG_fail;
   40533             :     }
   40534             :   }
   40535           0 :   {
   40536           0 :     const int bLocalUseExceptions = GetUseExceptions();
   40537           0 :     if ( bLocalUseExceptions ) {
   40538           0 :       pushErrorHandler();
   40539             :     }
   40540           0 :     {
   40541           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40542           0 :       result = (CPLErr)GDALRasterBandShadow_SetRasterCategoryNames(arg1,arg2);
   40543           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40544             :     }
   40545           0 :     if ( bLocalUseExceptions ) {
   40546           0 :       popErrorHandler();
   40547             :     }
   40548             : #ifndef SED_HACKS
   40549             :     if ( bLocalUseExceptions ) {
   40550             :       CPLErr eclass = CPLGetLastErrorType();
   40551             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40552             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40553             :       }
   40554             :     }
   40555             : #endif
   40556             :   }
   40557           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40558           0 :   {
   40559             :     /* %typemap(freearg) char **dict */
   40560           0 :     CSLDestroy( arg2 );
   40561             :   }
   40562           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; } }
   40563             :   return resultobj;
   40564           0 : fail:
   40565           0 :   {
   40566             :     /* %typemap(freearg) char **dict */
   40567           0 :     CSLDestroy( arg2 );
   40568             :   }
   40569             :   return NULL;
   40570             : }
   40571             : 
   40572             : 
   40573          97 : SWIGINTERN PyObject *_wrap_Band_GetMinimum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40574          97 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40575          97 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40576          97 :   double *arg2 = (double *) 0 ;
   40577          97 :   int *arg3 = (int *) 0 ;
   40578          97 :   void *argp1 = 0 ;
   40579          97 :   int res1 = 0 ;
   40580          97 :   double tmpval2 ;
   40581          97 :   int tmphasval2 ;
   40582          97 :   PyObject *swig_obj[1] ;
   40583             :   
   40584          97 :   {
   40585             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40586          97 :     arg2 = &tmpval2;
   40587          97 :     arg3 = &tmphasval2;
   40588             :   }
   40589          97 :   if (!args) SWIG_fail;
   40590          97 :   swig_obj[0] = args;
   40591          97 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40592          97 :   if (!SWIG_IsOK(res1)) {
   40593           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMinimum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40594             :   }
   40595          97 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40596          97 :   {
   40597          97 :     const int bLocalUseExceptions = GetUseExceptions();
   40598          97 :     if ( bLocalUseExceptions ) {
   40599          61 :       pushErrorHandler();
   40600             :     }
   40601          97 :     {
   40602          97 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40603          97 :       GDALRasterBandShadow_GetMinimum(arg1,arg2,arg3);
   40604          97 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40605             :     }
   40606          97 :     if ( bLocalUseExceptions ) {
   40607          61 :       popErrorHandler();
   40608             :     }
   40609             : #ifndef SED_HACKS
   40610             :     if ( bLocalUseExceptions ) {
   40611             :       CPLErr eclass = CPLGetLastErrorType();
   40612             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40613             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40614             :       }
   40615             :     }
   40616             : #endif
   40617             :   }
   40618          97 :   resultobj = SWIG_Py_Void();
   40619          97 :   {
   40620             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40621          97 :     PyObject *r;
   40622          97 :     if ( !*arg3 ) {
   40623          28 :       Py_INCREF(Py_None);
   40624          28 :       r = Py_None;
   40625             :     }
   40626             :     else {
   40627          69 :       r = PyFloat_FromDouble( *arg2 );
   40628             :     }
   40629             : #if SWIG_VERSION >= 0x040300
   40630             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40631             : #else
   40632          97 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40633             : #endif
   40634             :   }
   40635          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; } }
   40636             :   return resultobj;
   40637             : fail:
   40638             :   return NULL;
   40639             : }
   40640             : 
   40641             : 
   40642          87 : SWIGINTERN PyObject *_wrap_Band_GetMaximum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40643          87 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40644          87 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40645          87 :   double *arg2 = (double *) 0 ;
   40646          87 :   int *arg3 = (int *) 0 ;
   40647          87 :   void *argp1 = 0 ;
   40648          87 :   int res1 = 0 ;
   40649          87 :   double tmpval2 ;
   40650          87 :   int tmphasval2 ;
   40651          87 :   PyObject *swig_obj[1] ;
   40652             :   
   40653          87 :   {
   40654             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40655          87 :     arg2 = &tmpval2;
   40656          87 :     arg3 = &tmphasval2;
   40657             :   }
   40658          87 :   if (!args) SWIG_fail;
   40659          87 :   swig_obj[0] = args;
   40660          87 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40661          87 :   if (!SWIG_IsOK(res1)) {
   40662           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaximum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40663             :   }
   40664          87 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40665          87 :   {
   40666          87 :     const int bLocalUseExceptions = GetUseExceptions();
   40667          87 :     if ( bLocalUseExceptions ) {
   40668          57 :       pushErrorHandler();
   40669             :     }
   40670          87 :     {
   40671          87 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40672          87 :       GDALRasterBandShadow_GetMaximum(arg1,arg2,arg3);
   40673          87 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40674             :     }
   40675          87 :     if ( bLocalUseExceptions ) {
   40676          57 :       popErrorHandler();
   40677             :     }
   40678             : #ifndef SED_HACKS
   40679             :     if ( bLocalUseExceptions ) {
   40680             :       CPLErr eclass = CPLGetLastErrorType();
   40681             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40682             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40683             :       }
   40684             :     }
   40685             : #endif
   40686             :   }
   40687          87 :   resultobj = SWIG_Py_Void();
   40688          87 :   {
   40689             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40690          87 :     PyObject *r;
   40691          87 :     if ( !*arg3 ) {
   40692          25 :       Py_INCREF(Py_None);
   40693          25 :       r = Py_None;
   40694             :     }
   40695             :     else {
   40696          62 :       r = PyFloat_FromDouble( *arg2 );
   40697             :     }
   40698             : #if SWIG_VERSION >= 0x040300
   40699             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40700             : #else
   40701          87 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40702             : #endif
   40703             :   }
   40704          87 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40705             :   return resultobj;
   40706             : fail:
   40707             :   return NULL;
   40708             : }
   40709             : 
   40710             : 
   40711         151 : SWIGINTERN PyObject *_wrap_Band_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40712         151 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40713         151 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40714         151 :   double *arg2 = (double *) 0 ;
   40715         151 :   int *arg3 = (int *) 0 ;
   40716         151 :   void *argp1 = 0 ;
   40717         151 :   int res1 = 0 ;
   40718         151 :   double tmpval2 ;
   40719         151 :   int tmphasval2 ;
   40720         151 :   PyObject *swig_obj[1] ;
   40721             :   
   40722         151 :   {
   40723             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40724         151 :     arg2 = &tmpval2;
   40725         151 :     arg3 = &tmphasval2;
   40726             :   }
   40727         151 :   if (!args) SWIG_fail;
   40728         151 :   swig_obj[0] = args;
   40729         151 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40730         151 :   if (!SWIG_IsOK(res1)) {
   40731           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40732             :   }
   40733         151 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40734         151 :   {
   40735         151 :     const int bLocalUseExceptions = GetUseExceptions();
   40736         151 :     if ( bLocalUseExceptions ) {
   40737          98 :       pushErrorHandler();
   40738             :     }
   40739         151 :     {
   40740         151 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40741         151 :       GDALRasterBandShadow_GetOffset(arg1,arg2,arg3);
   40742         151 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40743             :     }
   40744         151 :     if ( bLocalUseExceptions ) {
   40745          98 :       popErrorHandler();
   40746             :     }
   40747             : #ifndef SED_HACKS
   40748             :     if ( bLocalUseExceptions ) {
   40749             :       CPLErr eclass = CPLGetLastErrorType();
   40750             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40751             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40752             :       }
   40753             :     }
   40754             : #endif
   40755             :   }
   40756         151 :   resultobj = SWIG_Py_Void();
   40757         151 :   {
   40758             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40759         151 :     PyObject *r;
   40760         151 :     if ( !*arg3 ) {
   40761          47 :       Py_INCREF(Py_None);
   40762          47 :       r = Py_None;
   40763             :     }
   40764             :     else {
   40765         104 :       r = PyFloat_FromDouble( *arg2 );
   40766             :     }
   40767             : #if SWIG_VERSION >= 0x040300
   40768             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40769             : #else
   40770         151 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40771             : #endif
   40772             :   }
   40773         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; } }
   40774             :   return resultobj;
   40775             : fail:
   40776             :   return NULL;
   40777             : }
   40778             : 
   40779             : 
   40780         149 : SWIGINTERN PyObject *_wrap_Band_GetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40781         149 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40782         149 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40783         149 :   double *arg2 = (double *) 0 ;
   40784         149 :   int *arg3 = (int *) 0 ;
   40785         149 :   void *argp1 = 0 ;
   40786         149 :   int res1 = 0 ;
   40787         149 :   double tmpval2 ;
   40788         149 :   int tmphasval2 ;
   40789         149 :   PyObject *swig_obj[1] ;
   40790             :   
   40791         149 :   {
   40792             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40793         149 :     arg2 = &tmpval2;
   40794         149 :     arg3 = &tmphasval2;
   40795             :   }
   40796         149 :   if (!args) SWIG_fail;
   40797         149 :   swig_obj[0] = args;
   40798         149 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40799         149 :   if (!SWIG_IsOK(res1)) {
   40800           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40801             :   }
   40802         149 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40803         149 :   {
   40804         149 :     const int bLocalUseExceptions = GetUseExceptions();
   40805         149 :     if ( bLocalUseExceptions ) {
   40806          97 :       pushErrorHandler();
   40807             :     }
   40808         149 :     {
   40809         149 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40810         149 :       GDALRasterBandShadow_GetScale(arg1,arg2,arg3);
   40811         149 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40812             :     }
   40813         149 :     if ( bLocalUseExceptions ) {
   40814          97 :       popErrorHandler();
   40815             :     }
   40816             : #ifndef SED_HACKS
   40817             :     if ( bLocalUseExceptions ) {
   40818             :       CPLErr eclass = CPLGetLastErrorType();
   40819             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40820             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40821             :       }
   40822             :     }
   40823             : #endif
   40824             :   }
   40825         149 :   resultobj = SWIG_Py_Void();
   40826         149 :   {
   40827             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40828         149 :     PyObject *r;
   40829         149 :     if ( !*arg3 ) {
   40830          47 :       Py_INCREF(Py_None);
   40831          47 :       r = Py_None;
   40832             :     }
   40833             :     else {
   40834         102 :       r = PyFloat_FromDouble( *arg2 );
   40835             :     }
   40836             : #if SWIG_VERSION >= 0x040300
   40837             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40838             : #else
   40839         149 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40840             : #endif
   40841             :   }
   40842         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; } }
   40843             :   return resultobj;
   40844             : fail:
   40845             :   return NULL;
   40846             : }
   40847             : 
   40848             : 
   40849          75 : SWIGINTERN PyObject *_wrap_Band_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40850          75 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40851          75 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40852          75 :   double arg2 ;
   40853          75 :   void *argp1 = 0 ;
   40854          75 :   int res1 = 0 ;
   40855          75 :   double val2 ;
   40856          75 :   int ecode2 = 0 ;
   40857          75 :   PyObject *swig_obj[2] ;
   40858          75 :   CPLErr result;
   40859             :   
   40860          75 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetOffset", 2, 2, swig_obj)) SWIG_fail;
   40861          75 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40862          75 :   if (!SWIG_IsOK(res1)) {
   40863           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40864             :   }
   40865          75 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40866          75 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   40867          75 :   if (!SWIG_IsOK(ecode2)) {
   40868           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetOffset" "', argument " "2"" of type '" "double""'");
   40869             :   } 
   40870          75 :   arg2 = static_cast< double >(val2);
   40871          75 :   {
   40872          75 :     const int bLocalUseExceptions = GetUseExceptions();
   40873          75 :     if ( bLocalUseExceptions ) {
   40874          64 :       pushErrorHandler();
   40875             :     }
   40876          75 :     {
   40877          75 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40878          75 :       result = (CPLErr)GDALRasterBandShadow_SetOffset(arg1,arg2);
   40879          75 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40880             :     }
   40881          75 :     if ( bLocalUseExceptions ) {
   40882          64 :       popErrorHandler();
   40883             :     }
   40884             : #ifndef SED_HACKS
   40885             :     if ( bLocalUseExceptions ) {
   40886             :       CPLErr eclass = CPLGetLastErrorType();
   40887             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40888             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40889             :       }
   40890             :     }
   40891             : #endif
   40892             :   }
   40893          75 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40894          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; } }
   40895             :   return resultobj;
   40896             : fail:
   40897             :   return NULL;
   40898             : }
   40899             : 
   40900             : 
   40901          76 : SWIGINTERN PyObject *_wrap_Band_SetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40902          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40903          76 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40904          76 :   double arg2 ;
   40905          76 :   void *argp1 = 0 ;
   40906          76 :   int res1 = 0 ;
   40907          76 :   double val2 ;
   40908          76 :   int ecode2 = 0 ;
   40909          76 :   PyObject *swig_obj[2] ;
   40910          76 :   CPLErr result;
   40911             :   
   40912          76 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetScale", 2, 2, swig_obj)) SWIG_fail;
   40913          76 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40914          76 :   if (!SWIG_IsOK(res1)) {
   40915           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40916             :   }
   40917          76 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40918          76 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   40919          76 :   if (!SWIG_IsOK(ecode2)) {
   40920           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetScale" "', argument " "2"" of type '" "double""'");
   40921             :   } 
   40922          76 :   arg2 = static_cast< double >(val2);
   40923          76 :   {
   40924          76 :     const int bLocalUseExceptions = GetUseExceptions();
   40925          76 :     if ( bLocalUseExceptions ) {
   40926          64 :       pushErrorHandler();
   40927             :     }
   40928          76 :     {
   40929          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40930          76 :       result = (CPLErr)GDALRasterBandShadow_SetScale(arg1,arg2);
   40931          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40932             :     }
   40933          76 :     if ( bLocalUseExceptions ) {
   40934          64 :       popErrorHandler();
   40935             :     }
   40936             : #ifndef SED_HACKS
   40937             :     if ( bLocalUseExceptions ) {
   40938             :       CPLErr eclass = CPLGetLastErrorType();
   40939             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40940             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40941             :       }
   40942             :     }
   40943             : #endif
   40944             :   }
   40945          76 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40946          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; } }
   40947             :   return resultobj;
   40948             : fail:
   40949             :   return NULL;
   40950             : }
   40951             : 
   40952             : 
   40953         112 : SWIGINTERN PyObject *_wrap_Band_GetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40954         112 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40955         112 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40956         112 :   int arg2 ;
   40957         112 :   int arg3 ;
   40958         112 :   double *arg4 = (double *) 0 ;
   40959         112 :   double *arg5 = (double *) 0 ;
   40960         112 :   double *arg6 = (double *) 0 ;
   40961         112 :   double *arg7 = (double *) 0 ;
   40962         112 :   void *argp1 = 0 ;
   40963         112 :   int res1 = 0 ;
   40964         112 :   int val2 ;
   40965         112 :   int ecode2 = 0 ;
   40966         112 :   int val3 ;
   40967         112 :   int ecode3 = 0 ;
   40968         112 :   double temp4 ;
   40969         112 :   int res4 = SWIG_TMPOBJ ;
   40970         112 :   double temp5 ;
   40971         112 :   int res5 = SWIG_TMPOBJ ;
   40972         112 :   double temp6 ;
   40973         112 :   int res6 = SWIG_TMPOBJ ;
   40974         112 :   double temp7 ;
   40975         112 :   int res7 = SWIG_TMPOBJ ;
   40976         112 :   PyObject *swig_obj[3] ;
   40977         112 :   CPLErr result;
   40978             :   
   40979         112 :   arg4 = &temp4;
   40980         112 :   arg5 = &temp5;
   40981         112 :   arg6 = &temp6;
   40982         112 :   arg7 = &temp7;
   40983         112 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetStatistics", 3, 3, swig_obj)) SWIG_fail;
   40984         112 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40985         112 :   if (!SWIG_IsOK(res1)) {
   40986           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40987             :   }
   40988         112 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40989         112 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   40990         112 :   if (!SWIG_IsOK(ecode2)) {
   40991           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetStatistics" "', argument " "2"" of type '" "int""'");
   40992             :   } 
   40993         112 :   arg2 = static_cast< int >(val2);
   40994         112 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   40995         112 :   if (!SWIG_IsOK(ecode3)) {
   40996           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetStatistics" "', argument " "3"" of type '" "int""'");
   40997             :   } 
   40998         112 :   arg3 = static_cast< int >(val3);
   40999         112 :   {
   41000         112 :     const int bLocalUseExceptions = GetUseExceptions();
   41001         112 :     if ( bLocalUseExceptions ) {
   41002          80 :       pushErrorHandler();
   41003             :     }
   41004         112 :     {
   41005         112 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41006         112 :       result = (CPLErr)GDALRasterBandShadow_GetStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   41007         112 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41008             :     }
   41009         112 :     if ( bLocalUseExceptions ) {
   41010          80 :       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         112 :   {
   41022             :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   41023             :   }
   41024         112 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   41025         112 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   41026             :   } else {
   41027           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41028           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   41029             :   }
   41030         112 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   41031         112 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   41032             :   } else {
   41033           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41034           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   41035             :   }
   41036         112 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   41037         112 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   41038             :   } else {
   41039           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41040           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   41041             :   }
   41042         112 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   41043         112 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   41044             :   } else {
   41045           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41046           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   41047             :   }
   41048         112 :   {
   41049             :     /* %typemap(ret) IF_ERROR_RETURN_NONE */
   41050         112 :     if (result != CE_None ) {
   41051          29 :       Py_XDECREF( resultobj );
   41052          29 :       resultobj = Py_None;
   41053          29 :       Py_INCREF(resultobj);
   41054             :     }
   41055             :   }
   41056         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; } }
   41057             :   return resultobj;
   41058             : fail:
   41059             :   return NULL;
   41060             : }
   41061             : 
   41062             : 
   41063         156 : SWIGINTERN PyObject *_wrap_Band_ComputeStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   41064         156 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41065         156 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41066         156 :   bool arg2 ;
   41067         156 :   double *arg3 = (double *) 0 ;
   41068         156 :   double *arg4 = (double *) 0 ;
   41069         156 :   double *arg5 = (double *) 0 ;
   41070         156 :   double *arg6 = (double *) 0 ;
   41071         156 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   41072         156 :   void *arg8 = (void *) NULL ;
   41073         156 :   void *argp1 = 0 ;
   41074         156 :   int res1 = 0 ;
   41075         156 :   bool val2 ;
   41076         156 :   int ecode2 = 0 ;
   41077         156 :   double temp3 ;
   41078         156 :   int res3 = SWIG_TMPOBJ ;
   41079         156 :   double temp4 ;
   41080         156 :   int res4 = SWIG_TMPOBJ ;
   41081         156 :   double temp5 ;
   41082         156 :   int res5 = SWIG_TMPOBJ ;
   41083         156 :   double temp6 ;
   41084         156 :   int res6 = SWIG_TMPOBJ ;
   41085         156 :   PyObject * obj0 = 0 ;
   41086         156 :   PyObject * obj1 = 0 ;
   41087         156 :   PyObject * obj2 = 0 ;
   41088         156 :   PyObject * obj3 = 0 ;
   41089         156 :   char * kwnames[] = {
   41090             :     (char *)"self",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  NULL 
   41091             :   };
   41092         156 :   CPLErr result;
   41093             :   
   41094             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   41095         156 :   PyProgressData *psProgressInfo;
   41096         156 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   41097         156 :   psProgressInfo->nLastReported = -1;
   41098         156 :   psProgressInfo->psPyCallback = NULL;
   41099         156 :   psProgressInfo->psPyCallbackData = NULL;
   41100         156 :   arg8 = psProgressInfo;
   41101         156 :   arg3 = &temp3;
   41102         156 :   arg4 = &temp4;
   41103         156 :   arg5 = &temp5;
   41104         156 :   arg6 = &temp6;
   41105         156 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Band_ComputeStatistics", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   41106         156 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41107         156 :   if (!SWIG_IsOK(res1)) {
   41108           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41109             :   }
   41110         156 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41111         156 :   ecode2 = SWIG_AsVal_bool(obj1, &val2);
   41112         156 :   if (!SWIG_IsOK(ecode2)) {
   41113           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
   41114             :   } 
   41115         156 :   arg2 = static_cast< bool >(val2);
   41116         156 :   if (obj2) {
   41117           3 :     {
   41118             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   41119             :       /* callback_func typemap */
   41120             :       
   41121             :       /* In some cases 0 is passed instead of None. */
   41122             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   41123           3 :       if ( PyLong_Check(obj2) || PyInt_Check(obj2) )
   41124             :       {
   41125           0 :         if( PyLong_AsLong(obj2) == 0 )
   41126             :         {
   41127           0 :           obj2 = Py_None;
   41128             :         }
   41129             :       }
   41130             :       
   41131           3 :       if (obj2 && obj2 != Py_None ) {
   41132           3 :         void* cbfunction = NULL;
   41133           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj2,
   41134             :             (void**)&cbfunction,
   41135             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   41136             :             SWIG_POINTER_EXCEPTION | 0 ));
   41137             :         
   41138           3 :         if ( cbfunction == GDALTermProgress ) {
   41139             :           arg7 = GDALTermProgress;
   41140             :         } else {
   41141           3 :           if (!PyCallable_Check(obj2)) {
   41142           0 :             PyErr_SetString( PyExc_RuntimeError,
   41143             :               "Object given is not a Python function" );
   41144           0 :             SWIG_fail;
   41145             :           }
   41146           3 :           psProgressInfo->psPyCallback = obj2;
   41147           3 :           arg7 = PyProgressProxy;
   41148             :         }
   41149             :         
   41150             :       }
   41151             :       
   41152             :     }
   41153             :   }
   41154         156 :   if (obj3) {
   41155           3 :     {
   41156             :       /* %typemap(in) ( void* callback_data=NULL)  */
   41157           3 :       psProgressInfo->psPyCallbackData = obj3 ;
   41158             :     }
   41159             :   }
   41160         156 :   {
   41161         156 :     const int bLocalUseExceptions = GetUseExceptions();
   41162         156 :     if ( bLocalUseExceptions ) {
   41163          71 :       pushErrorHandler();
   41164             :     }
   41165         156 :     {
   41166         156 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41167         156 :       result = (CPLErr)GDALRasterBandShadow_ComputeStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   41168         156 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41169             :     }
   41170         156 :     if ( bLocalUseExceptions ) {
   41171          71 :       popErrorHandler();
   41172             :     }
   41173             : #ifndef SED_HACKS
   41174             :     if ( bLocalUseExceptions ) {
   41175             :       CPLErr eclass = CPLGetLastErrorType();
   41176             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41177             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41178             :       }
   41179             :     }
   41180             : #endif
   41181             :   }
   41182         156 :   {
   41183             :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   41184             :   }
   41185         156 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   41186         156 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   41187             :   } else {
   41188           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41189           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   41190             :   }
   41191         156 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   41192         156 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   41193             :   } else {
   41194           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41195           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   41196             :   }
   41197         156 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   41198         156 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   41199             :   } else {
   41200           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41201           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   41202             :   }
   41203         156 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   41204         156 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   41205             :   } else {
   41206           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41207           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   41208             :   }
   41209         156 :   {
   41210             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   41211             :     
   41212         156 :     CPLFree(psProgressInfo);
   41213             :     
   41214             :   }
   41215         156 :   {
   41216             :     /* %typemap(ret) IF_ERROR_RETURN_NONE */
   41217         156 :     if (result != CE_None ) {
   41218           1 :       Py_XDECREF( resultobj );
   41219           1 :       resultobj = Py_None;
   41220           1 :       Py_INCREF(resultobj);
   41221             :     }
   41222             :   }
   41223         156 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41224             :   return resultobj;
   41225           0 : fail:
   41226           0 :   {
   41227             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   41228             :     
   41229           0 :     CPLFree(psProgressInfo);
   41230             :     
   41231             :   }
   41232             :   return NULL;
   41233             : }
   41234             : 
   41235             : 
   41236           2 : SWIGINTERN PyObject *_wrap_Band_SetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41237           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41238           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41239           2 :   double arg2 ;
   41240           2 :   double arg3 ;
   41241           2 :   double arg4 ;
   41242           2 :   double arg5 ;
   41243           2 :   void *argp1 = 0 ;
   41244           2 :   int res1 = 0 ;
   41245           2 :   double val2 ;
   41246           2 :   int ecode2 = 0 ;
   41247           2 :   double val3 ;
   41248           2 :   int ecode3 = 0 ;
   41249           2 :   double val4 ;
   41250           2 :   int ecode4 = 0 ;
   41251           2 :   double val5 ;
   41252           2 :   int ecode5 = 0 ;
   41253           2 :   PyObject *swig_obj[5] ;
   41254           2 :   CPLErr result;
   41255             :   
   41256           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetStatistics", 5, 5, swig_obj)) SWIG_fail;
   41257           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41258           2 :   if (!SWIG_IsOK(res1)) {
   41259           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41260             :   }
   41261           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41262           2 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   41263           2 :   if (!SWIG_IsOK(ecode2)) {
   41264           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetStatistics" "', argument " "2"" of type '" "double""'");
   41265             :   } 
   41266           2 :   arg2 = static_cast< double >(val2);
   41267           2 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   41268           2 :   if (!SWIG_IsOK(ecode3)) {
   41269           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetStatistics" "', argument " "3"" of type '" "double""'");
   41270             :   } 
   41271           2 :   arg3 = static_cast< double >(val3);
   41272           2 :   ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   41273           2 :   if (!SWIG_IsOK(ecode4)) {
   41274           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_SetStatistics" "', argument " "4"" of type '" "double""'");
   41275             :   } 
   41276           2 :   arg4 = static_cast< double >(val4);
   41277           2 :   ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   41278           2 :   if (!SWIG_IsOK(ecode5)) {
   41279           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_SetStatistics" "', argument " "5"" of type '" "double""'");
   41280             :   } 
   41281           2 :   arg5 = static_cast< double >(val5);
   41282           2 :   {
   41283           2 :     const int bLocalUseExceptions = GetUseExceptions();
   41284           2 :     if ( bLocalUseExceptions ) {
   41285           2 :       pushErrorHandler();
   41286             :     }
   41287           2 :     {
   41288           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41289           2 :       result = (CPLErr)GDALRasterBandShadow_SetStatistics(arg1,arg2,arg3,arg4,arg5);
   41290           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41291             :     }
   41292           2 :     if ( bLocalUseExceptions ) {
   41293           2 :       popErrorHandler();
   41294             :     }
   41295             : #ifndef SED_HACKS
   41296             :     if ( bLocalUseExceptions ) {
   41297             :       CPLErr eclass = CPLGetLastErrorType();
   41298             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41299             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41300             :       }
   41301             :     }
   41302             : #endif
   41303             :   }
   41304           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41305           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; } }
   41306             :   return resultobj;
   41307             : fail:
   41308             :   return NULL;
   41309             : }
   41310             : 
   41311             : 
   41312         535 : SWIGINTERN PyObject *_wrap_Band_GetOverviewCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41313         535 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41314         535 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41315         535 :   void *argp1 = 0 ;
   41316         535 :   int res1 = 0 ;
   41317         535 :   PyObject *swig_obj[1] ;
   41318         535 :   int result;
   41319             :   
   41320         535 :   if (!args) SWIG_fail;
   41321         535 :   swig_obj[0] = args;
   41322         535 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41323         535 :   if (!SWIG_IsOK(res1)) {
   41324           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverviewCount" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41325             :   }
   41326         535 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41327         535 :   {
   41328         535 :     const int bLocalUseExceptions = GetUseExceptions();
   41329         535 :     if ( bLocalUseExceptions ) {
   41330         344 :       pushErrorHandler();
   41331             :     }
   41332         535 :     {
   41333         535 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41334         535 :       result = (int)GDALRasterBandShadow_GetOverviewCount(arg1);
   41335         535 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41336             :     }
   41337         535 :     if ( bLocalUseExceptions ) {
   41338         344 :       popErrorHandler();
   41339             :     }
   41340             : #ifndef SED_HACKS
   41341             :     if ( bLocalUseExceptions ) {
   41342             :       CPLErr eclass = CPLGetLastErrorType();
   41343             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41344             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41345             :       }
   41346             :     }
   41347             : #endif
   41348             :   }
   41349         535 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41350         545 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41351             :   return resultobj;
   41352             : fail:
   41353             :   return NULL;
   41354             : }
   41355             : 
   41356             : 
   41357        5612 : SWIGINTERN PyObject *_wrap_Band_GetOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41358        5612 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41359        5612 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41360        5612 :   int arg2 ;
   41361        5612 :   void *argp1 = 0 ;
   41362        5612 :   int res1 = 0 ;
   41363        5612 :   int val2 ;
   41364        5612 :   int ecode2 = 0 ;
   41365        5612 :   PyObject *swig_obj[2] ;
   41366        5612 :   GDALRasterBandShadow *result = 0 ;
   41367             :   
   41368        5612 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetOverview", 2, 2, swig_obj)) SWIG_fail;
   41369        5612 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41370        5612 :   if (!SWIG_IsOK(res1)) {
   41371           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41372             :   }
   41373        5612 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41374        5612 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   41375        5612 :   if (!SWIG_IsOK(ecode2)) {
   41376           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetOverview" "', argument " "2"" of type '" "int""'");
   41377             :   } 
   41378        5612 :   arg2 = static_cast< int >(val2);
   41379        5612 :   {
   41380        5612 :     const int bLocalUseExceptions = GetUseExceptions();
   41381        5612 :     if ( bLocalUseExceptions ) {
   41382        4599 :       pushErrorHandler();
   41383             :     }
   41384        5612 :     {
   41385        5612 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41386        5612 :       result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetOverview(arg1,arg2);
   41387        5612 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41388             :     }
   41389        5612 :     if ( bLocalUseExceptions ) {
   41390        4599 :       popErrorHandler();
   41391             :     }
   41392             : #ifndef SED_HACKS
   41393             :     if ( bLocalUseExceptions ) {
   41394             :       CPLErr eclass = CPLGetLastErrorType();
   41395             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41396             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41397             :       }
   41398             :     }
   41399             : #endif
   41400             :   }
   41401        5612 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41402        5614 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41403             :   return resultobj;
   41404             : fail:
   41405             :   return NULL;
   41406             : }
   41407             : 
   41408             : 
   41409        2000 : SWIGINTERN PyObject *_wrap_Band_GetSampleOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41410        2000 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41411        2000 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41412        2000 :   GUIntBig arg2 ;
   41413        2000 :   void *argp1 = 0 ;
   41414        2000 :   int res1 = 0 ;
   41415        2000 :   PyObject *swig_obj[2] ;
   41416        2000 :   GDALRasterBandShadow *result = 0 ;
   41417             :   
   41418        2000 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetSampleOverview", 2, 2, swig_obj)) SWIG_fail;
   41419        2000 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41420        2000 :   if (!SWIG_IsOK(res1)) {
   41421           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetSampleOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41422             :   }
   41423        2000 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41424        2000 :   {
   41425        2000 :     arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
   41426             :   }
   41427        2000 :   {
   41428        2000 :     const int bLocalUseExceptions = GetUseExceptions();
   41429        2000 :     if ( bLocalUseExceptions ) {
   41430        2000 :       pushErrorHandler();
   41431             :     }
   41432        2000 :     {
   41433        2000 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41434        2000 :       result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetSampleOverview(arg1,arg2);
   41435        2000 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41436             :     }
   41437        2000 :     if ( bLocalUseExceptions ) {
   41438        2000 :       popErrorHandler();
   41439             :     }
   41440             : #ifndef SED_HACKS
   41441             :     if ( bLocalUseExceptions ) {
   41442             :       CPLErr eclass = CPLGetLastErrorType();
   41443             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41444             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41445             :       }
   41446             :     }
   41447             : #endif
   41448             :   }
   41449        2000 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41450        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; } }
   41451             :   return resultobj;
   41452             : fail:
   41453             :   return NULL;
   41454             : }
   41455             : 
   41456             : 
   41457       38735 : SWIGINTERN PyObject *_wrap_Band_Checksum(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   41458       38735 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41459       38735 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41460       38735 :   int arg2 = (int) 0 ;
   41461       38735 :   int arg3 = (int) 0 ;
   41462       38735 :   int *arg4 = (int *) 0 ;
   41463       38735 :   int *arg5 = (int *) 0 ;
   41464       38735 :   void *argp1 = 0 ;
   41465       38735 :   int res1 = 0 ;
   41466       38735 :   int val2 ;
   41467       38735 :   int ecode2 = 0 ;
   41468       38735 :   int val3 ;
   41469       38735 :   int ecode3 = 0 ;
   41470       38735 :   int val4 ;
   41471       38735 :   int val5 ;
   41472       38735 :   PyObject * obj0 = 0 ;
   41473       38735 :   PyObject * obj1 = 0 ;
   41474       38735 :   PyObject * obj2 = 0 ;
   41475       38735 :   PyObject * obj3 = 0 ;
   41476       38735 :   PyObject * obj4 = 0 ;
   41477       38735 :   char * kwnames[] = {
   41478             :     (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"xsize",  (char *)"ysize",  NULL 
   41479             :   };
   41480       38735 :   int result;
   41481             :   
   41482       38735 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Band_Checksum", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   41483       38735 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41484       38735 :   if (!SWIG_IsOK(res1)) {
   41485          12 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Checksum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41486             :   }
   41487       38729 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41488       38729 :   if (obj1) {
   41489         366 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   41490         366 :     if (!SWIG_IsOK(ecode2)) {
   41491           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Checksum" "', argument " "2"" of type '" "int""'");
   41492             :     } 
   41493             :     arg2 = static_cast< int >(val2);
   41494             :   }
   41495       38729 :   if (obj2) {
   41496         366 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   41497         366 :     if (!SWIG_IsOK(ecode3)) {
   41498           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Checksum" "', argument " "3"" of type '" "int""'");
   41499             :     } 
   41500             :     arg3 = static_cast< int >(val3);
   41501             :   }
   41502       38729 :   if (obj3) {
   41503         366 :     {
   41504             :       /* %typemap(in) (int *optional_##int) */
   41505         366 :       if ( obj3 == Py_None ) {
   41506             :         arg4 = 0;
   41507             :       }
   41508         366 :       else if ( PyArg_Parse( obj3,"i" ,&val4 ) ) {
   41509             :         arg4 = (int *) &val4;
   41510             :       }
   41511             :       else {
   41512           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41513           0 :         SWIG_fail;
   41514             :       }
   41515             :     }
   41516             :   }
   41517       38729 :   if (obj4) {
   41518         366 :     {
   41519             :       /* %typemap(in) (int *optional_##int) */
   41520         366 :       if ( obj4 == Py_None ) {
   41521             :         arg5 = 0;
   41522             :       }
   41523         366 :       else if ( PyArg_Parse( obj4,"i" ,&val5 ) ) {
   41524             :         arg5 = (int *) &val5;
   41525             :       }
   41526             :       else {
   41527           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41528           0 :         SWIG_fail;
   41529             :       }
   41530             :     }
   41531             :   }
   41532       38729 :   {
   41533       38729 :     const int bLocalUseExceptions = GetUseExceptions();
   41534       38729 :     if ( bLocalUseExceptions ) {
   41535       35187 :       pushErrorHandler();
   41536             :     }
   41537       38729 :     {
   41538       38729 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41539       38729 :       result = (int)GDALRasterBandShadow_Checksum(arg1,arg2,arg3,arg4,arg5);
   41540       38729 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41541             :     }
   41542       38729 :     if ( bLocalUseExceptions ) {
   41543       35187 :       popErrorHandler();
   41544             :     }
   41545             : #ifndef SED_HACKS
   41546             :     if ( bLocalUseExceptions ) {
   41547             :       CPLErr eclass = CPLGetLastErrorType();
   41548             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41549             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41550             :       }
   41551             :     }
   41552             : #endif
   41553             :   }
   41554       38729 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41555       38853 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41556             :   return resultobj;
   41557             : fail:
   41558             :   return NULL;
   41559             : }
   41560             : 
   41561             : 
   41562        1502 : SWIGINTERN PyObject *_wrap_Band_ComputeRasterMinMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   41563        1502 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41564        1502 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41565        1502 :   double *arg2 ;
   41566        1502 :   int *arg3 = (int *) 0 ;
   41567        1502 :   bool arg4 = (bool) false ;
   41568        1502 :   bool arg5 = (bool) false ;
   41569        1502 :   void *argp1 = 0 ;
   41570        1502 :   int res1 = 0 ;
   41571        1502 :   double argout2[2] ;
   41572        1502 :   int isvalid2 ;
   41573        1502 :   bool val4 ;
   41574        1502 :   int ecode4 = 0 ;
   41575        1502 :   bool val5 ;
   41576        1502 :   int ecode5 = 0 ;
   41577        1502 :   PyObject * obj0 = 0 ;
   41578        1502 :   PyObject * obj1 = 0 ;
   41579        1502 :   PyObject * obj2 = 0 ;
   41580        1502 :   char * kwnames[] = {
   41581             :     (char *)"self",  (char *)"approx_ok",  (char *)"can_return_none",  NULL 
   41582             :   };
   41583             :   
   41584        1502 :   {
   41585             :     /* %typemap(in,numinputs=0) (double argout2[2], int* isvalid2) */
   41586        1502 :     arg2 = argout2;
   41587        1502 :     arg3 = &isvalid2;
   41588             :   }
   41589        1502 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Band_ComputeRasterMinMax", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   41590        1502 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41591        1502 :   if (!SWIG_IsOK(res1)) {
   41592           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeRasterMinMax" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41593             :   }
   41594        1502 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41595        1502 :   if (obj1) {
   41596         201 :     ecode4 = SWIG_AsVal_bool(obj1, &val4);
   41597         201 :     if (!SWIG_IsOK(ecode4)) {
   41598           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ComputeRasterMinMax" "', argument " "4"" of type '" "bool""'");
   41599             :     } 
   41600             :     arg4 = static_cast< bool >(val4);
   41601             :   }
   41602        1502 :   if (obj2) {
   41603          13 :     ecode5 = SWIG_AsVal_bool(obj2, &val5);
   41604          13 :     if (!SWIG_IsOK(ecode5)) {
   41605           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ComputeRasterMinMax" "', argument " "5"" of type '" "bool""'");
   41606             :     } 
   41607             :     arg5 = static_cast< bool >(val5);
   41608             :   }
   41609        1502 :   {
   41610        1502 :     const int bLocalUseExceptions = GetUseExceptions();
   41611        1502 :     if ( bLocalUseExceptions ) {
   41612        1004 :       pushErrorHandler();
   41613             :     }
   41614        1502 :     {
   41615        1502 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41616        1502 :       GDALRasterBandShadow_ComputeRasterMinMax(arg1,arg2,arg3,arg4,arg5);
   41617        1502 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41618             :     }
   41619        1502 :     if ( bLocalUseExceptions ) {
   41620        1004 :       popErrorHandler();
   41621             :     }
   41622             : #ifndef SED_HACKS
   41623             :     if ( bLocalUseExceptions ) {
   41624             :       CPLErr eclass = CPLGetLastErrorType();
   41625             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41626             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41627             :       }
   41628             :     }
   41629             : #endif
   41630             :   }
   41631        1502 :   resultobj = SWIG_Py_Void();
   41632        1502 :   {
   41633             :     /* %typemap(argout) (double argout[2], int* isvalid)  */
   41634        1502 :     PyObject *r;
   41635        1502 :     if ( !*arg3 ) {
   41636           6 :       Py_INCREF(Py_None);
   41637           6 :       r = Py_None;
   41638             :     }
   41639             :     else {
   41640        1496 :       r = CreateTupleFromDoubleArray(arg2, 2);
   41641             :     }
   41642             : #if 0x040001 >= 0x040300
   41643             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   41644             : #else
   41645        1502 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   41646             : #endif
   41647             :   }
   41648        1516 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41649             :   return resultobj;
   41650             : fail:
   41651             :   return NULL;
   41652             : }
   41653             : 
   41654             : 
   41655          18 : SWIGINTERN PyObject *_wrap_Band_ComputeBandStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41656          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41657          18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41658          18 :   double *arg2 ;
   41659          18 :   int arg3 = (int) 1 ;
   41660          18 :   void *argp1 = 0 ;
   41661          18 :   int res1 = 0 ;
   41662          18 :   double argout2[2] ;
   41663          18 :   int val3 ;
   41664          18 :   int ecode3 = 0 ;
   41665          18 :   PyObject *swig_obj[2] ;
   41666             :   
   41667          18 :   {
   41668             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   41669          18 :     memset(argout2, 0, sizeof(argout2));
   41670          18 :     arg2 = argout2;
   41671             :   }
   41672          18 :   if (!SWIG_Python_UnpackTuple(args, "Band_ComputeBandStats", 1, 2, swig_obj)) SWIG_fail;
   41673          18 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41674          18 :   if (!SWIG_IsOK(res1)) {
   41675           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeBandStats" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41676             :   }
   41677          18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41678          18 :   if (swig_obj[1]) {
   41679           0 :     ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   41680           0 :     if (!SWIG_IsOK(ecode3)) {
   41681           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ComputeBandStats" "', argument " "3"" of type '" "int""'");
   41682             :     } 
   41683             :     arg3 = static_cast< int >(val3);
   41684             :   }
   41685          18 :   {
   41686          18 :     const int bLocalUseExceptions = GetUseExceptions();
   41687          18 :     if ( bLocalUseExceptions ) {
   41688          11 :       pushErrorHandler();
   41689             :     }
   41690          18 :     {
   41691          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41692          18 :       GDALRasterBandShadow_ComputeBandStats(arg1,arg2,arg3);
   41693          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41694             :     }
   41695          18 :     if ( bLocalUseExceptions ) {
   41696          11 :       popErrorHandler();
   41697             :     }
   41698             : #ifndef SED_HACKS
   41699             :     if ( bLocalUseExceptions ) {
   41700             :       CPLErr eclass = CPLGetLastErrorType();
   41701             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41702             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41703             :       }
   41704             :     }
   41705             : #endif
   41706             :   }
   41707          18 :   resultobj = SWIG_Py_Void();
   41708          18 :   {
   41709             :     /* %typemap(argout) (double argout[ANY]) */
   41710          18 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 2 );
   41711             : #if SWIG_VERSION >= 0x040300
   41712             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   41713             : #else
   41714          18 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   41715             : #endif
   41716             :   }
   41717          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; } }
   41718             :   return resultobj;
   41719             : fail:
   41720             :   return NULL;
   41721             : }
   41722             : 
   41723             : 
   41724      268565 : SWIGINTERN PyObject *_wrap_Band_Fill(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41725      268565 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41726      268565 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41727      268565 :   double arg2 ;
   41728      268565 :   double arg3 = (double) 0.0 ;
   41729      268565 :   void *argp1 = 0 ;
   41730      268565 :   int res1 = 0 ;
   41731      268565 :   double val2 ;
   41732      268565 :   int ecode2 = 0 ;
   41733      268565 :   double val3 ;
   41734      268565 :   int ecode3 = 0 ;
   41735      268565 :   PyObject *swig_obj[3] ;
   41736      268565 :   CPLErr result;
   41737             :   
   41738      268565 :   if (!SWIG_Python_UnpackTuple(args, "Band_Fill", 2, 3, swig_obj)) SWIG_fail;
   41739      268565 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41740      268565 :   if (!SWIG_IsOK(res1)) {
   41741           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Fill" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41742             :   }
   41743      268565 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41744      268565 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   41745      268565 :   if (!SWIG_IsOK(ecode2)) {
   41746           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Fill" "', argument " "2"" of type '" "double""'");
   41747             :   } 
   41748      268565 :   arg2 = static_cast< double >(val2);
   41749      268565 :   if (swig_obj[2]) {
   41750         266 :     ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   41751         266 :     if (!SWIG_IsOK(ecode3)) {
   41752           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Fill" "', argument " "3"" of type '" "double""'");
   41753             :     } 
   41754         266 :     arg3 = static_cast< double >(val3);
   41755             :   }
   41756      268565 :   {
   41757      268565 :     const int bLocalUseExceptions = GetUseExceptions();
   41758      268565 :     if ( bLocalUseExceptions ) {
   41759      168684 :       pushErrorHandler();
   41760             :     }
   41761      268565 :     {
   41762      268565 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41763      268565 :       result = (CPLErr)GDALRasterBandShadow_Fill(arg1,arg2,arg3);
   41764      268565 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41765             :     }
   41766      268565 :     if ( bLocalUseExceptions ) {
   41767      168684 :       popErrorHandler();
   41768             :     }
   41769             : #ifndef SED_HACKS
   41770             :     if ( bLocalUseExceptions ) {
   41771             :       CPLErr eclass = CPLGetLastErrorType();
   41772             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41773             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41774             :       }
   41775             :     }
   41776             : #endif
   41777             :   }
   41778      268565 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41779      268575 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41780             :   return resultobj;
   41781             : fail:
   41782             :   return NULL;
   41783             : }
   41784             : 
   41785             : 
   41786        9109 : SWIGINTERN PyObject *_wrap_Band_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   41787        9109 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41788        9109 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41789        9109 :   int arg2 ;
   41790        9109 :   int arg3 ;
   41791        9109 :   int arg4 ;
   41792        9109 :   int arg5 ;
   41793        9109 :   GIntBig arg6 ;
   41794        9109 :   char *arg7 = (char *) 0 ;
   41795        9109 :   int *arg8 = (int *) 0 ;
   41796        9109 :   int *arg9 = (int *) 0 ;
   41797        9109 :   GDALDataType *arg10 = (GDALDataType *) 0 ;
   41798        9109 :   GIntBig *arg11 = (GIntBig *) 0 ;
   41799        9109 :   GIntBig *arg12 = (GIntBig *) 0 ;
   41800        9109 :   void *argp1 = 0 ;
   41801        9109 :   int res1 = 0 ;
   41802        9109 :   int val2 ;
   41803        9109 :   int ecode2 = 0 ;
   41804        9109 :   int val3 ;
   41805        9109 :   int ecode3 = 0 ;
   41806        9109 :   int val4 ;
   41807        9109 :   int ecode4 = 0 ;
   41808        9109 :   int val5 ;
   41809        9109 :   int ecode5 = 0 ;
   41810        9109 :   int alloc6 = 0 ;
   41811        9109 :   bool viewIsValid6 = false ;
   41812        9109 :   Py_buffer view6 ;
   41813        9109 :   int val8 ;
   41814        9109 :   int val9 ;
   41815        9109 :   GDALDataType val10 ;
   41816        9109 :   GIntBig val11 ;
   41817        9109 :   GIntBig val12 ;
   41818        9109 :   PyObject * obj0 = 0 ;
   41819        9109 :   PyObject * obj1 = 0 ;
   41820        9109 :   PyObject * obj2 = 0 ;
   41821        9109 :   PyObject * obj3 = 0 ;
   41822        9109 :   PyObject * obj4 = 0 ;
   41823        9109 :   PyObject * obj5 = 0 ;
   41824        9109 :   PyObject * obj6 = 0 ;
   41825        9109 :   PyObject * obj7 = 0 ;
   41826        9109 :   PyObject * obj8 = 0 ;
   41827        9109 :   PyObject * obj9 = 0 ;
   41828        9109 :   PyObject * obj10 = 0 ;
   41829        9109 :   char * kwnames[] = {
   41830             :     (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 
   41831             :   };
   41832        9109 :   CPLErr result;
   41833             :   
   41834        9109 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO|OOOOO:Band_WriteRaster", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   41835        9109 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41836        9109 :   if (!SWIG_IsOK(res1)) {
   41837           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_WriteRaster" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41838             :   }
   41839        9109 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41840        9109 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   41841        9109 :   if (!SWIG_IsOK(ecode2)) {
   41842           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_WriteRaster" "', argument " "2"" of type '" "int""'");
   41843             :   } 
   41844        9109 :   arg2 = static_cast< int >(val2);
   41845        9109 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   41846        9109 :   if (!SWIG_IsOK(ecode3)) {
   41847           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_WriteRaster" "', argument " "3"" of type '" "int""'");
   41848             :   } 
   41849        9109 :   arg3 = static_cast< int >(val3);
   41850        9109 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   41851        9109 :   if (!SWIG_IsOK(ecode4)) {
   41852           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_WriteRaster" "', argument " "4"" of type '" "int""'");
   41853             :   } 
   41854        9109 :   arg4 = static_cast< int >(val4);
   41855        9109 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   41856        9109 :   if (!SWIG_IsOK(ecode5)) {
   41857           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_WriteRaster" "', argument " "5"" of type '" "int""'");
   41858             :   } 
   41859        9109 :   arg5 = static_cast< int >(val5);
   41860        9109 :   {
   41861             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   41862        9109 :     char* ptr = NULL;
   41863        9109 :     if( !GetBufferAsCharPtrGIntBigSize(obj5, &arg6, &ptr, &alloc6, &viewIsValid6, &view6) ) {
   41864           1 :       SWIG_fail;
   41865             :     }
   41866        9108 :     arg7 = (char *)ptr;
   41867             :   }
   41868        9108 :   if (obj6) {
   41869        9108 :     {
   41870             :       /* %typemap(in) (int *optional_##int) */
   41871        9108 :       if ( obj6 == Py_None ) {
   41872             :         arg8 = 0;
   41873             :       }
   41874        9108 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   41875             :         arg8 = (int *) &val8;
   41876             :       }
   41877             :       else {
   41878           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41879           0 :         SWIG_fail;
   41880             :       }
   41881             :     }
   41882             :   }
   41883        9108 :   if (obj7) {
   41884        9108 :     {
   41885             :       /* %typemap(in) (int *optional_##int) */
   41886        9108 :       if ( obj7 == Py_None ) {
   41887             :         arg9 = 0;
   41888             :       }
   41889        9108 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   41890             :         arg9 = (int *) &val9;
   41891             :       }
   41892             :       else {
   41893           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41894           0 :         SWIG_fail;
   41895             :       }
   41896             :     }
   41897             :   }
   41898        9108 :   if (obj8) {
   41899        9108 :     {
   41900             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   41901        9108 :       int intval = 0;
   41902        9108 :       if ( obj8 == Py_None ) {
   41903             :         arg10 = NULL;
   41904             :       }
   41905       18216 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj8, &intval)) ) {
   41906        9108 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   41907             :         {
   41908           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   41909             :         }
   41910        9108 :         val10 = static_cast<GDALDataType>(intval);
   41911        9108 :         arg10 = &val10;
   41912             :       }
   41913             :       else {
   41914           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41915           0 :         SWIG_fail;
   41916             :       }
   41917             :     }
   41918             :   }
   41919        9108 :   if (obj9) {
   41920        9108 :     {
   41921             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   41922        9108 :       if ( obj9 == Py_None ) {
   41923             :         arg11 = 0;
   41924             :       }
   41925          16 :       else if ( PyArg_Parse( obj9,"L" ,&val11 ) ) {
   41926             :         arg11 = (GIntBig *) &val11;
   41927             :       }
   41928             :       else {
   41929           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41930           0 :         SWIG_fail;
   41931             :       }
   41932             :     }
   41933             :   }
   41934        9108 :   if (obj10) {
   41935        9108 :     {
   41936             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   41937        9108 :       if ( obj10 == Py_None ) {
   41938             :         arg12 = 0;
   41939             :       }
   41940          12 :       else if ( PyArg_Parse( obj10,"L" ,&val12 ) ) {
   41941             :         arg12 = (GIntBig *) &val12;
   41942             :       }
   41943             :       else {
   41944           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41945           0 :         SWIG_fail;
   41946             :       }
   41947             :     }
   41948             :   }
   41949        9108 :   {
   41950        9108 :     const int bLocalUseExceptions = GetUseExceptions();
   41951        9108 :     if ( bLocalUseExceptions ) {
   41952        8360 :       pushErrorHandler();
   41953             :     }
   41954        9108 :     {
   41955        9108 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41956        9108 :       result = (CPLErr)GDALRasterBandShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   41957        9108 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41958             :     }
   41959        9108 :     if ( bLocalUseExceptions ) {
   41960        8360 :       popErrorHandler();
   41961             :     }
   41962             : #ifndef SED_HACKS
   41963             :     if ( bLocalUseExceptions ) {
   41964             :       CPLErr eclass = CPLGetLastErrorType();
   41965             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41966             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41967             :       }
   41968             :     }
   41969             : #endif
   41970             :   }
   41971        9108 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41972        9108 :   {
   41973             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   41974        9108 :     if( viewIsValid6 ) {
   41975        3046 :       PyBuffer_Release(&view6);
   41976             :     }
   41977        6062 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   41978        6062 :       delete[] arg7;
   41979             :     }
   41980             :   }
   41981        9116 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41982             :   return resultobj;
   41983           1 : fail:
   41984           1 :   {
   41985             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   41986           1 :     if( viewIsValid6 ) {
   41987           0 :       PyBuffer_Release(&view6);
   41988             :     }
   41989        9109 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   41990           0 :       delete[] arg7;
   41991             :     }
   41992             :   }
   41993             :   return NULL;
   41994             : }
   41995             : 
   41996             : 
   41997         391 : SWIGINTERN PyObject *_wrap_Band_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41998         391 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41999         391 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42000         391 :   void *argp1 = 0 ;
   42001         391 :   int res1 = 0 ;
   42002         391 :   PyObject *swig_obj[1] ;
   42003             :   
   42004         391 :   if (!args) SWIG_fail;
   42005         391 :   swig_obj[0] = args;
   42006         391 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42007         391 :   if (!SWIG_IsOK(res1)) {
   42008           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_FlushCache" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42009             :   }
   42010         391 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42011         391 :   {
   42012         391 :     const int bLocalUseExceptions = GetUseExceptions();
   42013         391 :     if ( bLocalUseExceptions ) {
   42014           5 :       pushErrorHandler();
   42015             :     }
   42016         391 :     {
   42017         391 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42018         391 :       GDALRasterBandShadow_FlushCache(arg1);
   42019         391 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42020             :     }
   42021         391 :     if ( bLocalUseExceptions ) {
   42022           5 :       popErrorHandler();
   42023             :     }
   42024             : #ifndef SED_HACKS
   42025             :     if ( bLocalUseExceptions ) {
   42026             :       CPLErr eclass = CPLGetLastErrorType();
   42027             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42028             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42029             :       }
   42030             :     }
   42031             : #endif
   42032             :   }
   42033         391 :   resultobj = SWIG_Py_Void();
   42034         391 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42035             :   return resultobj;
   42036             : fail:
   42037             :   return NULL;
   42038             : }
   42039             : 
   42040             : 
   42041         130 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42042         130 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42043         130 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42044         130 :   void *argp1 = 0 ;
   42045         130 :   int res1 = 0 ;
   42046         130 :   PyObject *swig_obj[1] ;
   42047         130 :   GDALColorTableShadow *result = 0 ;
   42048             :   
   42049         130 :   if (!args) SWIG_fail;
   42050         130 :   swig_obj[0] = args;
   42051         130 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42052         130 :   if (!SWIG_IsOK(res1)) {
   42053           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42054             :   }
   42055         130 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42056         130 :   {
   42057         130 :     const int bLocalUseExceptions = GetUseExceptions();
   42058         130 :     if ( bLocalUseExceptions ) {
   42059          91 :       pushErrorHandler();
   42060             :     }
   42061         130 :     {
   42062         130 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42063         130 :       result = (GDALColorTableShadow *)GDALRasterBandShadow_GetRasterColorTable(arg1);
   42064         130 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42065             :     }
   42066         130 :     if ( bLocalUseExceptions ) {
   42067          91 :       popErrorHandler();
   42068             :     }
   42069             : #ifndef SED_HACKS
   42070             :     if ( bLocalUseExceptions ) {
   42071             :       CPLErr eclass = CPLGetLastErrorType();
   42072             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42073             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42074             :       }
   42075             :     }
   42076             : #endif
   42077             :   }
   42078         130 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   42079         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; } }
   42080             :   return resultobj;
   42081             : fail:
   42082             :   return NULL;
   42083             : }
   42084             : 
   42085             : 
   42086         131 : SWIGINTERN PyObject *_wrap_Band_GetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42087         131 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42088         131 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42089         131 :   void *argp1 = 0 ;
   42090         131 :   int res1 = 0 ;
   42091         131 :   PyObject *swig_obj[1] ;
   42092         131 :   GDALColorTableShadow *result = 0 ;
   42093             :   
   42094         131 :   if (!args) SWIG_fail;
   42095         131 :   swig_obj[0] = args;
   42096         131 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42097         131 :   if (!SWIG_IsOK(res1)) {
   42098           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42099             :   }
   42100         131 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42101         131 :   {
   42102         131 :     const int bLocalUseExceptions = GetUseExceptions();
   42103         131 :     if ( bLocalUseExceptions ) {
   42104         107 :       pushErrorHandler();
   42105             :     }
   42106         131 :     {
   42107         131 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42108         131 :       result = (GDALColorTableShadow *)GDALRasterBandShadow_GetColorTable(arg1);
   42109         131 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42110             :     }
   42111         131 :     if ( bLocalUseExceptions ) {
   42112         107 :       popErrorHandler();
   42113             :     }
   42114             : #ifndef SED_HACKS
   42115             :     if ( bLocalUseExceptions ) {
   42116             :       CPLErr eclass = CPLGetLastErrorType();
   42117             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42118             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42119             :       }
   42120             :     }
   42121             : #endif
   42122             :   }
   42123         131 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   42124         139 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42125             :   return resultobj;
   42126             : fail:
   42127             :   return NULL;
   42128             : }
   42129             : 
   42130             : 
   42131          46 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42132          46 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42133          46 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42134          46 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   42135          46 :   void *argp1 = 0 ;
   42136          46 :   int res1 = 0 ;
   42137          46 :   void *argp2 = 0 ;
   42138          46 :   int res2 = 0 ;
   42139          46 :   PyObject *swig_obj[2] ;
   42140          46 :   int result;
   42141             :   
   42142          46 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterColorTable", 2, 2, swig_obj)) SWIG_fail;
   42143          46 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42144          46 :   if (!SWIG_IsOK(res1)) {
   42145           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42146             :   }
   42147          46 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42148          46 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   42149          46 :   if (!SWIG_IsOK(res2)) {
   42150           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetRasterColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   42151             :   }
   42152          46 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   42153          46 :   {
   42154          46 :     const int bLocalUseExceptions = GetUseExceptions();
   42155          46 :     if ( bLocalUseExceptions ) {
   42156          24 :       pushErrorHandler();
   42157             :     }
   42158          46 :     {
   42159          46 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42160          46 :       result = (int)GDALRasterBandShadow_SetRasterColorTable(arg1,arg2);
   42161          46 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42162             :     }
   42163          46 :     if ( bLocalUseExceptions ) {
   42164          24 :       popErrorHandler();
   42165             :     }
   42166             : #ifndef SED_HACKS
   42167             :     if ( bLocalUseExceptions ) {
   42168             :       CPLErr eclass = CPLGetLastErrorType();
   42169             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42170             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42171             :       }
   42172             :     }
   42173             : #endif
   42174             :   }
   42175          46 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42176          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; } }
   42177             :   return resultobj;
   42178             : fail:
   42179             :   return NULL;
   42180             : }
   42181             : 
   42182             : 
   42183          30 : SWIGINTERN PyObject *_wrap_Band_SetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42184          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42185          30 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42186          30 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   42187          30 :   void *argp1 = 0 ;
   42188          30 :   int res1 = 0 ;
   42189          30 :   void *argp2 = 0 ;
   42190          30 :   int res2 = 0 ;
   42191          30 :   PyObject *swig_obj[2] ;
   42192          30 :   int result;
   42193             :   
   42194          30 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetColorTable", 2, 2, swig_obj)) SWIG_fail;
   42195          30 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42196          30 :   if (!SWIG_IsOK(res1)) {
   42197           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42198             :   }
   42199          30 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42200          30 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   42201          30 :   if (!SWIG_IsOK(res2)) {
   42202           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   42203             :   }
   42204          30 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   42205          30 :   {
   42206          30 :     const int bLocalUseExceptions = GetUseExceptions();
   42207          30 :     if ( bLocalUseExceptions ) {
   42208          14 :       pushErrorHandler();
   42209             :     }
   42210          30 :     {
   42211          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42212          30 :       result = (int)GDALRasterBandShadow_SetColorTable(arg1,arg2);
   42213          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42214             :     }
   42215          30 :     if ( bLocalUseExceptions ) {
   42216          14 :       popErrorHandler();
   42217             :     }
   42218             : #ifndef SED_HACKS
   42219             :     if ( bLocalUseExceptions ) {
   42220             :       CPLErr eclass = CPLGetLastErrorType();
   42221             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42222             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42223             :       }
   42224             :     }
   42225             : #endif
   42226             :   }
   42227          30 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42228          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; } }
   42229             :   return resultobj;
   42230             : fail:
   42231             :   return NULL;
   42232             : }
   42233             : 
   42234             : 
   42235          70 : SWIGINTERN PyObject *_wrap_Band_GetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42236          70 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42237          70 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42238          70 :   void *argp1 = 0 ;
   42239          70 :   int res1 = 0 ;
   42240          70 :   PyObject *swig_obj[1] ;
   42241          70 :   GDALRasterAttributeTableShadow *result = 0 ;
   42242             :   
   42243          70 :   if (!args) SWIG_fail;
   42244          70 :   swig_obj[0] = args;
   42245          70 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42246          70 :   if (!SWIG_IsOK(res1)) {
   42247           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42248             :   }
   42249          70 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42250          70 :   {
   42251          70 :     const int bLocalUseExceptions = GetUseExceptions();
   42252          70 :     if ( bLocalUseExceptions ) {
   42253          69 :       pushErrorHandler();
   42254             :     }
   42255          70 :     {
   42256          70 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42257          70 :       result = (GDALRasterAttributeTableShadow *)GDALRasterBandShadow_GetDefaultRAT(arg1);
   42258          70 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42259             :     }
   42260          70 :     if ( bLocalUseExceptions ) {
   42261          69 :       popErrorHandler();
   42262             :     }
   42263             : #ifndef SED_HACKS
   42264             :     if ( bLocalUseExceptions ) {
   42265             :       CPLErr eclass = CPLGetLastErrorType();
   42266             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42267             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42268             :       }
   42269             :     }
   42270             : #endif
   42271             :   }
   42272          70 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   42273          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; } }
   42274             :   return resultobj;
   42275             : fail:
   42276             :   return NULL;
   42277             : }
   42278             : 
   42279             : 
   42280          18 : SWIGINTERN PyObject *_wrap_Band_SetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42281          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42282          18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42283          18 :   GDALRasterAttributeTableShadow *arg2 = (GDALRasterAttributeTableShadow *) 0 ;
   42284          18 :   void *argp1 = 0 ;
   42285          18 :   int res1 = 0 ;
   42286          18 :   void *argp2 = 0 ;
   42287          18 :   int res2 = 0 ;
   42288          18 :   PyObject *swig_obj[2] ;
   42289          18 :   int result;
   42290             :   
   42291          18 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetDefaultRAT", 2, 2, swig_obj)) SWIG_fail;
   42292          18 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42293          18 :   if (!SWIG_IsOK(res1)) {
   42294           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42295             :   }
   42296          18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42297          18 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   42298          18 :   if (!SWIG_IsOK(res2)) {
   42299           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetDefaultRAT" "', argument " "2"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   42300             :   }
   42301          18 :   arg2 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp2);
   42302          18 :   {
   42303          18 :     const int bLocalUseExceptions = GetUseExceptions();
   42304          18 :     if ( bLocalUseExceptions ) {
   42305          18 :       pushErrorHandler();
   42306             :     }
   42307          18 :     {
   42308          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42309          18 :       result = (int)GDALRasterBandShadow_SetDefaultRAT(arg1,arg2);
   42310          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42311             :     }
   42312          18 :     if ( bLocalUseExceptions ) {
   42313          18 :       popErrorHandler();
   42314             :     }
   42315             : #ifndef SED_HACKS
   42316             :     if ( bLocalUseExceptions ) {
   42317             :       CPLErr eclass = CPLGetLastErrorType();
   42318             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42319             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42320             :       }
   42321             :     }
   42322             : #endif
   42323             :   }
   42324          18 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42325          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; } }
   42326             :   return resultobj;
   42327             : fail:
   42328             :   return NULL;
   42329             : }
   42330             : 
   42331             : 
   42332       10828 : SWIGINTERN PyObject *_wrap_Band_GetMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42333       10828 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42334       10828 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42335       10828 :   void *argp1 = 0 ;
   42336       10828 :   int res1 = 0 ;
   42337       10828 :   PyObject *swig_obj[1] ;
   42338       10828 :   GDALRasterBandShadow *result = 0 ;
   42339             :   
   42340       10828 :   if (!args) SWIG_fail;
   42341       10828 :   swig_obj[0] = args;
   42342       10828 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42343       10828 :   if (!SWIG_IsOK(res1)) {
   42344           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42345             :   }
   42346       10828 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42347       10828 :   {
   42348       10828 :     const int bLocalUseExceptions = GetUseExceptions();
   42349       10828 :     if ( bLocalUseExceptions ) {
   42350       10462 :       pushErrorHandler();
   42351             :     }
   42352       10828 :     {
   42353       10828 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42354       10828 :       result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetMaskBand(arg1);
   42355       10828 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42356             :     }
   42357       10828 :     if ( bLocalUseExceptions ) {
   42358       10462 :       popErrorHandler();
   42359             :     }
   42360             : #ifndef SED_HACKS
   42361             :     if ( bLocalUseExceptions ) {
   42362             :       CPLErr eclass = CPLGetLastErrorType();
   42363             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42364             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42365             :       }
   42366             :     }
   42367             : #endif
   42368             :   }
   42369       10828 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42370       10828 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42371             :   return resultobj;
   42372             : fail:
   42373             :   return NULL;
   42374             : }
   42375             : 
   42376             : 
   42377         456 : SWIGINTERN PyObject *_wrap_Band_GetMaskFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42378         456 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42379         456 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42380         456 :   void *argp1 = 0 ;
   42381         456 :   int res1 = 0 ;
   42382         456 :   PyObject *swig_obj[1] ;
   42383         456 :   int result;
   42384             :   
   42385         456 :   if (!args) SWIG_fail;
   42386         456 :   swig_obj[0] = args;
   42387         456 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42388         456 :   if (!SWIG_IsOK(res1)) {
   42389           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskFlags" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42390             :   }
   42391         456 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42392         456 :   {
   42393         456 :     const int bLocalUseExceptions = GetUseExceptions();
   42394         456 :     if ( bLocalUseExceptions ) {
   42395         293 :       pushErrorHandler();
   42396             :     }
   42397         456 :     {
   42398         456 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42399         456 :       result = (int)GDALRasterBandShadow_GetMaskFlags(arg1);
   42400         456 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42401             :     }
   42402         456 :     if ( bLocalUseExceptions ) {
   42403         293 :       popErrorHandler();
   42404             :     }
   42405             : #ifndef SED_HACKS
   42406             :     if ( bLocalUseExceptions ) {
   42407             :       CPLErr eclass = CPLGetLastErrorType();
   42408             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42409             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42410             :       }
   42411             :     }
   42412             : #endif
   42413             :   }
   42414         456 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42415         456 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42416             :   return resultobj;
   42417             : fail:
   42418             :   return NULL;
   42419             : }
   42420             : 
   42421             : 
   42422          33 : SWIGINTERN PyObject *_wrap_Band_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42423          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42424          33 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42425          33 :   int arg2 ;
   42426          33 :   void *argp1 = 0 ;
   42427          33 :   int res1 = 0 ;
   42428          33 :   int val2 ;
   42429          33 :   int ecode2 = 0 ;
   42430          33 :   PyObject *swig_obj[2] ;
   42431          33 :   CPLErr result;
   42432             :   
   42433          33 :   if (!SWIG_Python_UnpackTuple(args, "Band_CreateMaskBand", 2, 2, swig_obj)) SWIG_fail;
   42434          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42435          33 :   if (!SWIG_IsOK(res1)) {
   42436           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_CreateMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42437             :   }
   42438          33 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42439          33 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   42440          33 :   if (!SWIG_IsOK(ecode2)) {
   42441           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   42442             :   } 
   42443          33 :   arg2 = static_cast< int >(val2);
   42444          33 :   {
   42445          33 :     const int bLocalUseExceptions = GetUseExceptions();
   42446          33 :     if ( bLocalUseExceptions ) {
   42447          17 :       pushErrorHandler();
   42448             :     }
   42449          33 :     {
   42450          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42451          33 :       result = (CPLErr)GDALRasterBandShadow_CreateMaskBand(arg1,arg2);
   42452          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42453             :     }
   42454          33 :     if ( bLocalUseExceptions ) {
   42455          17 :       popErrorHandler();
   42456             :     }
   42457             : #ifndef SED_HACKS
   42458             :     if ( bLocalUseExceptions ) {
   42459             :       CPLErr eclass = CPLGetLastErrorType();
   42460             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42461             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42462             :       }
   42463             :     }
   42464             : #endif
   42465             :   }
   42466          33 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42467          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; } }
   42468             :   return resultobj;
   42469             : fail:
   42470             :   return NULL;
   42471             : }
   42472             : 
   42473             : 
   42474          37 : SWIGINTERN PyObject *_wrap_Band_IsMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42475          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42476          37 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42477          37 :   void *argp1 = 0 ;
   42478          37 :   int res1 = 0 ;
   42479          37 :   PyObject *swig_obj[1] ;
   42480          37 :   bool result;
   42481             :   
   42482          37 :   if (!args) SWIG_fail;
   42483          37 :   swig_obj[0] = args;
   42484          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42485          37 :   if (!SWIG_IsOK(res1)) {
   42486           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_IsMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42487             :   }
   42488          37 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42489          37 :   {
   42490          37 :     const int bLocalUseExceptions = GetUseExceptions();
   42491          37 :     if ( bLocalUseExceptions ) {
   42492           9 :       pushErrorHandler();
   42493             :     }
   42494          37 :     {
   42495          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42496          37 :       result = (bool)GDALRasterBandShadow_IsMaskBand(arg1);
   42497          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42498             :     }
   42499          37 :     if ( bLocalUseExceptions ) {
   42500           9 :       popErrorHandler();
   42501             :     }
   42502             : #ifndef SED_HACKS
   42503             :     if ( bLocalUseExceptions ) {
   42504             :       CPLErr eclass = CPLGetLastErrorType();
   42505             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42506             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42507             :       }
   42508             :     }
   42509             : #endif
   42510             :   }
   42511          37 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   42512          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; } }
   42513             :   return resultobj;
   42514             : fail:
   42515             :   return NULL;
   42516             : }
   42517             : 
   42518             : 
   42519          27 : SWIGINTERN PyObject *_wrap_Band_GetHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   42520          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42521          27 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42522          27 :   double arg2 = (double) -0.5 ;
   42523          27 :   double arg3 = (double) 255.5 ;
   42524          27 :   int arg4 = (int) 256 ;
   42525          27 :   GUIntBig *arg5 = (GUIntBig *) NULL ;
   42526          27 :   int arg6 = (int) 0 ;
   42527          27 :   int arg7 = (int) 1 ;
   42528          27 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   42529          27 :   void *arg9 = (void *) NULL ;
   42530          27 :   void *argp1 = 0 ;
   42531          27 :   int res1 = 0 ;
   42532          27 :   double val2 ;
   42533          27 :   int ecode2 = 0 ;
   42534          27 :   double val3 ;
   42535          27 :   int ecode3 = 0 ;
   42536          27 :   int val6 ;
   42537          27 :   int ecode6 = 0 ;
   42538          27 :   int val7 ;
   42539          27 :   int ecode7 = 0 ;
   42540          27 :   PyObject * obj0 = 0 ;
   42541          27 :   PyObject * obj1 = 0 ;
   42542          27 :   PyObject * obj2 = 0 ;
   42543          27 :   PyObject * obj3 = 0 ;
   42544          27 :   PyObject * obj4 = 0 ;
   42545          27 :   PyObject * obj5 = 0 ;
   42546          27 :   PyObject * obj6 = 0 ;
   42547          27 :   PyObject * obj7 = 0 ;
   42548          27 :   char * kwnames[] = {
   42549             :     (char *)"self",  (char *)"min",  (char *)"max",  (char *)"buckets",  (char *)"include_out_of_range",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  NULL 
   42550             :   };
   42551          27 :   CPLErr result;
   42552             :   
   42553          27 :   {
   42554             :     /* %typemap(in) int buckets, GUIntBig* panHistogram -> list */
   42555          27 :     arg5 = (GUIntBig *) VSICalloc(sizeof(GUIntBig),arg4);
   42556             :   }
   42557             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   42558          27 :   PyProgressData *psProgressInfo;
   42559          27 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   42560          27 :   psProgressInfo->nLastReported = -1;
   42561          27 :   psProgressInfo->psPyCallback = NULL;
   42562          27 :   psProgressInfo->psPyCallbackData = NULL;
   42563          27 :   arg9 = psProgressInfo;
   42564          27 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOOOO:Band_GetHistogram", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   42565          27 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42566          27 :   if (!SWIG_IsOK(res1)) {
   42567           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42568             :   }
   42569          27 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42570          27 :   if (obj1) {
   42571          18 :     ecode2 = SWIG_AsVal_double(obj1, &val2);
   42572          18 :     if (!SWIG_IsOK(ecode2)) {
   42573           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetHistogram" "', argument " "2"" of type '" "double""'");
   42574             :     } 
   42575          18 :     arg2 = static_cast< double >(val2);
   42576             :   }
   42577          27 :   if (obj2) {
   42578          16 :     ecode3 = SWIG_AsVal_double(obj2, &val3);
   42579          16 :     if (!SWIG_IsOK(ecode3)) {
   42580           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetHistogram" "', argument " "3"" of type '" "double""'");
   42581             :     } 
   42582          16 :     arg3 = static_cast< double >(val3);
   42583             :   }
   42584          27 :   if (obj3) {
   42585          16 :     {
   42586             :       /* %typemap(in) int buckets, GUIntBig* panHistogram -> list */
   42587          16 :       int requested_buckets = 0;
   42588          32 :       CPL_IGNORE_RET_VAL(SWIG_AsVal_int(obj3, &requested_buckets));
   42589          16 :       if( requested_buckets != arg4 )
   42590             :       {
   42591          16 :         arg4 = requested_buckets;
   42592          16 :         if (requested_buckets <= 0 || (size_t)requested_buckets > SIZE_MAX / sizeof(GUIntBig))
   42593             :         {
   42594           1 :           PyErr_SetString( PyExc_RuntimeError, "Bad value for buckets" );
   42595           1 :           SWIG_fail;
   42596             :         }
   42597          15 :         void* tmp = VSIRealloc(arg5, sizeof(GUIntBig) * requested_buckets);
   42598          15 :         if( !tmp) {
   42599           0 :           PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   42600           0 :           SWIG_fail;
   42601             :         }
   42602             :         arg5 = (GUIntBig *)tmp;
   42603             :       }
   42604          15 :       if (arg5 == NULL)
   42605             :       {
   42606           0 :         PyErr_SetString( PyExc_RuntimeError, "Cannot allocate buckets" );
   42607           0 :         SWIG_fail;
   42608             :       }
   42609             :     }
   42610             :   }
   42611          26 :   if (obj4) {
   42612          15 :     ecode6 = SWIG_AsVal_int(obj4, &val6);
   42613          15 :     if (!SWIG_IsOK(ecode6)) {
   42614           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetHistogram" "', argument " "6"" of type '" "int""'");
   42615             :     } 
   42616             :     arg6 = static_cast< int >(val6);
   42617             :   }
   42618          26 :   if (obj5) {
   42619          17 :     ecode7 = SWIG_AsVal_int(obj5, &val7);
   42620          17 :     if (!SWIG_IsOK(ecode7)) {
   42621           0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetHistogram" "', argument " "7"" of type '" "int""'");
   42622             :     } 
   42623             :     arg7 = static_cast< int >(val7);
   42624             :   }
   42625          26 :   if (obj6) {
   42626           0 :     {
   42627             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   42628             :       /* callback_func typemap */
   42629             :       
   42630             :       /* In some cases 0 is passed instead of None. */
   42631             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   42632           0 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   42633             :       {
   42634           0 :         if( PyLong_AsLong(obj6) == 0 )
   42635             :         {
   42636           0 :           obj6 = Py_None;
   42637             :         }
   42638             :       }
   42639             :       
   42640           0 :       if (obj6 && obj6 != Py_None ) {
   42641           0 :         void* cbfunction = NULL;
   42642           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   42643             :             (void**)&cbfunction,
   42644             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   42645             :             SWIG_POINTER_EXCEPTION | 0 ));
   42646             :         
   42647           0 :         if ( cbfunction == GDALTermProgress ) {
   42648             :           arg8 = GDALTermProgress;
   42649             :         } else {
   42650           0 :           if (!PyCallable_Check(obj6)) {
   42651           0 :             PyErr_SetString( PyExc_RuntimeError,
   42652             :               "Object given is not a Python function" );
   42653           0 :             SWIG_fail;
   42654             :           }
   42655           0 :           psProgressInfo->psPyCallback = obj6;
   42656           0 :           arg8 = PyProgressProxy;
   42657             :         }
   42658             :         
   42659             :       }
   42660             :       
   42661             :     }
   42662             :   }
   42663          26 :   if (obj7) {
   42664           0 :     {
   42665             :       /* %typemap(in) ( void* callback_data=NULL)  */
   42666           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   42667             :     }
   42668             :   }
   42669          26 :   {
   42670          26 :     const int bLocalUseExceptions = GetUseExceptions();
   42671          26 :     if ( bLocalUseExceptions ) {
   42672           4 :       pushErrorHandler();
   42673             :     }
   42674          26 :     {
   42675          26 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42676          26 :       result = (CPLErr)GDALRasterBandShadow_GetHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   42677          26 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42678             :     }
   42679          26 :     if ( bLocalUseExceptions ) {
   42680           4 :       popErrorHandler();
   42681             :     }
   42682             : #ifndef SED_HACKS
   42683             :     if ( bLocalUseExceptions ) {
   42684             :       CPLErr eclass = CPLGetLastErrorType();
   42685             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42686             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42687             :       }
   42688             :     }
   42689             : #endif
   42690             :   }
   42691          26 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42692          26 :   {
   42693             :     /* %typemap(out) int buckets, GUIntBig* panHistogram -> list */
   42694          26 :     GUIntBig *integerarray = arg5;
   42695          26 :     Py_DECREF( resultobj );
   42696          26 :     if ( integerarray == NULL ) {
   42697           0 :       resultobj = Py_None;
   42698           0 :       Py_INCREF( resultobj );
   42699             :     }
   42700             :     else {
   42701          26 :       resultobj = PyList_New( arg4 );
   42702          26 :       if( !resultobj ) {
   42703           0 :         SWIG_fail;
   42704             :       }
   42705        2924 :       for ( int i = 0; i < arg4; ++i ) {
   42706        2898 :         char szTmp[32];
   42707        2898 :         snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, integerarray[i]);
   42708        2898 :         PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   42709        2898 :         PyList_SetItem(resultobj, i, o );
   42710             :       }
   42711             :     }
   42712             :   }
   42713          26 :   {
   42714             :     /* %typemap(freearg) (int buckets, GUIntBig* panHistogram)*/
   42715          26 :     VSIFree( arg5 );
   42716             :   }
   42717          26 :   {
   42718             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   42719             :     
   42720          26 :     CPLFree(psProgressInfo);
   42721             :     
   42722             :   }
   42723          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; } }
   42724             :   return resultobj;
   42725           1 : fail:
   42726           1 :   {
   42727             :     /* %typemap(freearg) (int buckets, GUIntBig* panHistogram)*/
   42728           1 :     VSIFree( arg5 );
   42729             :   }
   42730           1 :   {
   42731             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   42732             :     
   42733           1 :     CPLFree(psProgressInfo);
   42734             :     
   42735             :   }
   42736             :   return NULL;
   42737             : }
   42738             : 
   42739             : 
   42740          13 : SWIGINTERN PyObject *_wrap_Band_GetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   42741          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42742          13 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42743          13 :   double *arg2 = (double *) NULL ;
   42744          13 :   double *arg3 = (double *) NULL ;
   42745          13 :   int *arg4 = (int *) NULL ;
   42746          13 :   GUIntBig **arg5 = (GUIntBig **) NULL ;
   42747          13 :   int arg6 = (int) 1 ;
   42748          13 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   42749          13 :   void *arg8 = (void *) NULL ;
   42750          13 :   void *argp1 = 0 ;
   42751          13 :   int res1 = 0 ;
   42752          13 :   double val2 ;
   42753          13 :   double val3 ;
   42754          13 :   void *argp4 = 0 ;
   42755          13 :   int res4 = 0 ;
   42756          13 :   void *argp5 = 0 ;
   42757          13 :   int res5 = 0 ;
   42758          13 :   int val6 ;
   42759          13 :   int ecode6 = 0 ;
   42760          13 :   PyObject * obj0 = 0 ;
   42761          13 :   PyObject * obj1 = 0 ;
   42762          13 :   PyObject * obj2 = 0 ;
   42763          13 :   PyObject * obj3 = 0 ;
   42764          13 :   PyObject * obj4 = 0 ;
   42765          13 :   PyObject * obj5 = 0 ;
   42766          13 :   PyObject * obj6 = 0 ;
   42767          13 :   PyObject * obj7 = 0 ;
   42768          13 :   char * kwnames[] = {
   42769             :     (char *)"self",  (char *)"min_ret",  (char *)"max_ret",  (char *)"buckets_ret",  (char *)"ppanHistogram",  (char *)"force",  (char *)"callback",  (char *)"callback_data",  NULL 
   42770             :   };
   42771          13 :   CPLErr result;
   42772             :   
   42773          13 :   double min_val = 0.0, max_val = 0.0;
   42774          13 :   int buckets_val = 0;
   42775          13 :   GUIntBig *panHistogram = NULL;
   42776             :   
   42777          13 :   arg2 = &min_val;
   42778          13 :   arg3 = &max_val;
   42779          13 :   arg4 = &buckets_val;
   42780          13 :   arg5 = &panHistogram;
   42781             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   42782          13 :   PyProgressData *psProgressInfo;
   42783          13 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   42784          13 :   psProgressInfo->nLastReported = -1;
   42785          13 :   psProgressInfo->psPyCallback = NULL;
   42786          13 :   psProgressInfo->psPyCallbackData = NULL;
   42787          13 :   arg8 = psProgressInfo;
   42788          13 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOOOO:Band_GetDefaultHistogram", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   42789          13 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42790          13 :   if (!SWIG_IsOK(res1)) {
   42791           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42792             :   }
   42793          13 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42794          13 :   if (obj1) {
   42795           0 :     {
   42796             :       /* %typemap(in) (double *optional_##double) */
   42797           0 :       if ( obj1 == Py_None ) {
   42798             :         arg2 = 0;
   42799             :       }
   42800           0 :       else if ( PyArg_Parse( obj1,"d" ,&val2 ) ) {
   42801             :         arg2 = (double *) &val2;
   42802             :       }
   42803             :       else {
   42804           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   42805           0 :         SWIG_fail;
   42806             :       }
   42807             :     }
   42808             :   }
   42809          13 :   if (obj2) {
   42810           0 :     {
   42811             :       /* %typemap(in) (double *optional_##double) */
   42812           0 :       if ( obj2 == Py_None ) {
   42813             :         arg3 = 0;
   42814             :       }
   42815           0 :       else if ( PyArg_Parse( obj2,"d" ,&val3 ) ) {
   42816             :         arg3 = (double *) &val3;
   42817             :       }
   42818             :       else {
   42819           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   42820           0 :         SWIG_fail;
   42821             :       }
   42822             :     }
   42823             :   }
   42824          13 :   if (obj3) {
   42825           0 :     res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
   42826           0 :     if (!SWIG_IsOK(res4)) {
   42827           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Band_GetDefaultHistogram" "', argument " "4"" of type '" "int *""'"); 
   42828             :     }
   42829           0 :     arg4 = reinterpret_cast< int * >(argp4);
   42830             :   }
   42831          13 :   if (obj4) {
   42832           0 :     res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_p_GUIntBig, 0 |  0 );
   42833           0 :     if (!SWIG_IsOK(res5)) {
   42834           0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Band_GetDefaultHistogram" "', argument " "5"" of type '" "GUIntBig **""'"); 
   42835             :     }
   42836           0 :     arg5 = reinterpret_cast< GUIntBig ** >(argp5);
   42837             :   }
   42838          13 :   if (obj5) {
   42839           5 :     ecode6 = SWIG_AsVal_int(obj5, &val6);
   42840           5 :     if (!SWIG_IsOK(ecode6)) {
   42841           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDefaultHistogram" "', argument " "6"" of type '" "int""'");
   42842             :     } 
   42843             :     arg6 = static_cast< int >(val6);
   42844             :   }
   42845          13 :   if (obj6) {
   42846           1 :     {
   42847             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   42848             :       /* callback_func typemap */
   42849             :       
   42850             :       /* In some cases 0 is passed instead of None. */
   42851             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   42852           1 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   42853             :       {
   42854           0 :         if( PyLong_AsLong(obj6) == 0 )
   42855             :         {
   42856           0 :           obj6 = Py_None;
   42857             :         }
   42858             :       }
   42859             :       
   42860           1 :       if (obj6 && obj6 != Py_None ) {
   42861           1 :         void* cbfunction = NULL;
   42862           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   42863             :             (void**)&cbfunction,
   42864             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   42865             :             SWIG_POINTER_EXCEPTION | 0 ));
   42866             :         
   42867           1 :         if ( cbfunction == GDALTermProgress ) {
   42868             :           arg7 = GDALTermProgress;
   42869             :         } else {
   42870           1 :           if (!PyCallable_Check(obj6)) {
   42871           0 :             PyErr_SetString( PyExc_RuntimeError,
   42872             :               "Object given is not a Python function" );
   42873           0 :             SWIG_fail;
   42874             :           }
   42875           1 :           psProgressInfo->psPyCallback = obj6;
   42876           1 :           arg7 = PyProgressProxy;
   42877             :         }
   42878             :         
   42879             :       }
   42880             :       
   42881             :     }
   42882             :   }
   42883          13 :   if (obj7) {
   42884           0 :     {
   42885             :       /* %typemap(in) ( void* callback_data=NULL)  */
   42886           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   42887             :     }
   42888             :   }
   42889          13 :   {
   42890          13 :     const int bLocalUseExceptions = GetUseExceptions();
   42891          13 :     if ( bLocalUseExceptions ) {
   42892           4 :       pushErrorHandler();
   42893             :     }
   42894          13 :     {
   42895          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42896          13 :       result = (CPLErr)GDALRasterBandShadow_GetDefaultHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   42897          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42898             :     }
   42899          13 :     if ( bLocalUseExceptions ) {
   42900           4 :       popErrorHandler();
   42901             :     }
   42902             : #ifndef SED_HACKS
   42903             :     if ( bLocalUseExceptions ) {
   42904             :       CPLErr eclass = CPLGetLastErrorType();
   42905             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42906             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42907             :       }
   42908             :     }
   42909             : #endif
   42910             :   }
   42911          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42912          13 :   {
   42913          13 :     int i;
   42914          13 :     PyObject *psList = NULL;
   42915             :     
   42916          13 :     Py_XDECREF(resultobj);
   42917             :     
   42918          13 :     if (panHistogram)
   42919             :     {
   42920          12 :       psList = PyList_New(buckets_val);
   42921          12 :       if( !psList ) {
   42922           0 :         SWIG_fail;
   42923             :       }
   42924        2321 :       for( i = 0; i < buckets_val; i++ )
   42925        2309 :       PyList_SetItem(psList, i, Py_BuildValue("K", panHistogram[i] ));
   42926             :       
   42927          12 :       CPLFree( panHistogram );
   42928             :       
   42929          12 :       resultobj = Py_BuildValue( "(ddiO)", min_val, max_val, buckets_val, psList );
   42930          12 :       Py_XDECREF(psList);
   42931             :     }
   42932             :     else
   42933             :     {
   42934           1 :       resultobj = Py_None;
   42935           1 :       Py_INCREF(resultobj);
   42936             :     }
   42937             :   }
   42938          13 :   {
   42939             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   42940             :     
   42941          13 :     CPLFree(psProgressInfo);
   42942             :     
   42943             :   }
   42944          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; } }
   42945             :   return resultobj;
   42946           0 : fail:
   42947           0 :   {
   42948             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   42949             :     
   42950           0 :     CPLFree(psProgressInfo);
   42951             :     
   42952             :   }
   42953             :   return NULL;
   42954             : }
   42955             : 
   42956             : 
   42957           5 : SWIGINTERN PyObject *_wrap_Band_SetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42958           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42959           5 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42960           5 :   double arg2 ;
   42961           5 :   double arg3 ;
   42962           5 :   int arg4 ;
   42963           5 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   42964           5 :   void *argp1 = 0 ;
   42965           5 :   int res1 = 0 ;
   42966           5 :   double val2 ;
   42967           5 :   int ecode2 = 0 ;
   42968           5 :   double val3 ;
   42969           5 :   int ecode3 = 0 ;
   42970           5 :   PyObject *swig_obj[4] ;
   42971           5 :   CPLErr result;
   42972             :   
   42973           5 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetDefaultHistogram", 4, 4, swig_obj)) SWIG_fail;
   42974           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42975           5 :   if (!SWIG_IsOK(res1)) {
   42976           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42977             :   }
   42978           5 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42979           5 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   42980           5 :   if (!SWIG_IsOK(ecode2)) {
   42981           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetDefaultHistogram" "', argument " "2"" of type '" "double""'");
   42982             :   } 
   42983           5 :   arg2 = static_cast< double >(val2);
   42984           5 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   42985           5 :   if (!SWIG_IsOK(ecode3)) {
   42986           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetDefaultHistogram" "', argument " "3"" of type '" "double""'");
   42987             :   } 
   42988           5 :   arg3 = static_cast< double >(val3);
   42989           5 :   {
   42990             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   42991           5 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[3], &arg4);
   42992           5 :     if( arg4 < 0 ) {
   42993           0 :       SWIG_fail;
   42994             :     }
   42995             :   }
   42996           5 :   {
   42997           5 :     const int bLocalUseExceptions = GetUseExceptions();
   42998           5 :     if ( bLocalUseExceptions ) {
   42999           5 :       pushErrorHandler();
   43000             :     }
   43001           5 :     {
   43002           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43003           5 :       result = (CPLErr)GDALRasterBandShadow_SetDefaultHistogram(arg1,arg2,arg3,arg4,arg5);
   43004           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43005             :     }
   43006           5 :     if ( bLocalUseExceptions ) {
   43007           5 :       popErrorHandler();
   43008             :     }
   43009             : #ifndef SED_HACKS
   43010             :     if ( bLocalUseExceptions ) {
   43011             :       CPLErr eclass = CPLGetLastErrorType();
   43012             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43013             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43014             :       }
   43015             :     }
   43016             : #endif
   43017             :   }
   43018           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43019           5 :   {
   43020             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   43021           5 :     free(arg5);
   43022             :   }
   43023           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; } }
   43024             :   return resultobj;
   43025           0 : fail:
   43026           0 :   {
   43027             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   43028           0 :     free(arg5);
   43029             :   }
   43030           0 :   return NULL;
   43031             : }
   43032             : 
   43033             : 
   43034          17 : SWIGINTERN PyObject *_wrap_Band_HasArbitraryOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43035          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43036          17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43037          17 :   void *argp1 = 0 ;
   43038          17 :   int res1 = 0 ;
   43039          17 :   PyObject *swig_obj[1] ;
   43040          17 :   bool result;
   43041             :   
   43042          17 :   if (!args) SWIG_fail;
   43043          17 :   swig_obj[0] = args;
   43044          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43045          17 :   if (!SWIG_IsOK(res1)) {
   43046           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_HasArbitraryOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43047             :   }
   43048          17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43049          17 :   {
   43050          17 :     const int bLocalUseExceptions = GetUseExceptions();
   43051          17 :     if ( bLocalUseExceptions ) {
   43052           0 :       pushErrorHandler();
   43053             :     }
   43054          17 :     {
   43055          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43056          17 :       result = (bool)GDALRasterBandShadow_HasArbitraryOverviews(arg1);
   43057          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43058             :     }
   43059          17 :     if ( bLocalUseExceptions ) {
   43060           0 :       popErrorHandler();
   43061             :     }
   43062             : #ifndef SED_HACKS
   43063             :     if ( bLocalUseExceptions ) {
   43064             :       CPLErr eclass = CPLGetLastErrorType();
   43065             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43066             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43067             :       }
   43068             :     }
   43069             : #endif
   43070             :   }
   43071          17 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   43072          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; } }
   43073             :   return resultobj;
   43074             : fail:
   43075             :   return NULL;
   43076             : }
   43077             : 
   43078             : 
   43079          10 : SWIGINTERN PyObject *_wrap_Band_GetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43080          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43081          10 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43082          10 :   void *argp1 = 0 ;
   43083          10 :   int res1 = 0 ;
   43084          10 :   PyObject *swig_obj[1] ;
   43085          10 :   char **result = 0 ;
   43086             :   
   43087          10 :   if (!args) SWIG_fail;
   43088          10 :   swig_obj[0] = args;
   43089          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43090          10 :   if (!SWIG_IsOK(res1)) {
   43091           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43092             :   }
   43093          10 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43094          10 :   {
   43095          10 :     const int bLocalUseExceptions = GetUseExceptions();
   43096          10 :     if ( bLocalUseExceptions ) {
   43097           8 :       pushErrorHandler();
   43098             :     }
   43099          10 :     {
   43100          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43101          10 :       result = (char **)GDALRasterBandShadow_GetCategoryNames(arg1);
   43102          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43103             :     }
   43104          10 :     if ( bLocalUseExceptions ) {
   43105           8 :       popErrorHandler();
   43106             :     }
   43107             : #ifndef SED_HACKS
   43108             :     if ( bLocalUseExceptions ) {
   43109             :       CPLErr eclass = CPLGetLastErrorType();
   43110             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43111             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43112             :       }
   43113             :     }
   43114             : #endif
   43115             :   }
   43116          10 :   {
   43117             :     /* %typemap(out) char **options -> ( string ) */
   43118          10 :     bool bErr = false;
   43119          10 :     resultobj = CSLToList(result, &bErr);
   43120          10 :     if( bErr ) {
   43121           0 :       SWIG_fail;
   43122             :     }
   43123             :   }
   43124          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; } }
   43125             :   return resultobj;
   43126             : fail:
   43127             :   return NULL;
   43128             : }
   43129             : 
   43130             : 
   43131           2 : SWIGINTERN PyObject *_wrap_Band_SetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43132           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43133           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43134           2 :   char **arg2 = (char **) 0 ;
   43135           2 :   void *argp1 = 0 ;
   43136           2 :   int res1 = 0 ;
   43137           2 :   PyObject *swig_obj[2] ;
   43138           2 :   CPLErr result;
   43139             :   
   43140           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetCategoryNames", 2, 2, swig_obj)) SWIG_fail;
   43141           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43142           2 :   if (!SWIG_IsOK(res1)) {
   43143           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43144             :   }
   43145           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43146           2 :   {
   43147             :     /* %typemap(in) char **dict */
   43148           2 :     arg2 = NULL;
   43149           2 :     if ( PySequence_Check( swig_obj[1] ) ) {
   43150           2 :       int bErr = FALSE;
   43151           2 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   43152           2 :       if ( bErr )
   43153             :       {
   43154           0 :         SWIG_fail;
   43155             :       }
   43156             :     }
   43157           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   43158           0 :       int bErr = FALSE;
   43159           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   43160           0 :       if ( bErr )
   43161             :       {
   43162           0 :         SWIG_fail;
   43163             :       }
   43164             :     }
   43165             :     else {
   43166           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43167           0 :       SWIG_fail;
   43168             :     }
   43169             :   }
   43170           2 :   {
   43171           2 :     const int bLocalUseExceptions = GetUseExceptions();
   43172           2 :     if ( bLocalUseExceptions ) {
   43173           2 :       pushErrorHandler();
   43174             :     }
   43175           2 :     {
   43176           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43177           2 :       result = (CPLErr)GDALRasterBandShadow_SetCategoryNames(arg1,arg2);
   43178           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43179             :     }
   43180           2 :     if ( bLocalUseExceptions ) {
   43181           2 :       popErrorHandler();
   43182             :     }
   43183             : #ifndef SED_HACKS
   43184             :     if ( bLocalUseExceptions ) {
   43185             :       CPLErr eclass = CPLGetLastErrorType();
   43186             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43187             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43188             :       }
   43189             :     }
   43190             : #endif
   43191             :   }
   43192           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43193           2 :   {
   43194             :     /* %typemap(freearg) char **dict */
   43195           2 :     CSLDestroy( arg2 );
   43196             :   }
   43197           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; } }
   43198             :   return resultobj;
   43199           0 : fail:
   43200           0 :   {
   43201             :     /* %typemap(freearg) char **dict */
   43202           0 :     CSLDestroy( arg2 );
   43203             :   }
   43204             :   return NULL;
   43205             : }
   43206             : 
   43207             : 
   43208           1 : SWIGINTERN PyObject *_wrap_Band_GetVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43209           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43210           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43211           1 :   GDALRWFlag arg2 ;
   43212           1 :   int arg3 ;
   43213           1 :   int arg4 ;
   43214           1 :   int arg5 ;
   43215           1 :   int arg6 ;
   43216           1 :   int arg7 ;
   43217           1 :   int arg8 ;
   43218           1 :   GDALDataType arg9 ;
   43219           1 :   size_t arg10 ;
   43220           1 :   size_t arg11 ;
   43221           1 :   char **arg12 = (char **) NULL ;
   43222           1 :   void *argp1 = 0 ;
   43223           1 :   int res1 = 0 ;
   43224           1 :   int val2 ;
   43225           1 :   int ecode2 = 0 ;
   43226           1 :   int val3 ;
   43227           1 :   int ecode3 = 0 ;
   43228           1 :   int val4 ;
   43229           1 :   int ecode4 = 0 ;
   43230           1 :   int val5 ;
   43231           1 :   int ecode5 = 0 ;
   43232           1 :   int val6 ;
   43233           1 :   int ecode6 = 0 ;
   43234           1 :   int val7 ;
   43235           1 :   int ecode7 = 0 ;
   43236           1 :   int val8 ;
   43237           1 :   int ecode8 = 0 ;
   43238           1 :   size_t val10 ;
   43239           1 :   int ecode10 = 0 ;
   43240           1 :   size_t val11 ;
   43241           1 :   int ecode11 = 0 ;
   43242           1 :   PyObject * obj0 = 0 ;
   43243           1 :   PyObject * obj1 = 0 ;
   43244           1 :   PyObject * obj2 = 0 ;
   43245           1 :   PyObject * obj3 = 0 ;
   43246           1 :   PyObject * obj4 = 0 ;
   43247           1 :   PyObject * obj5 = 0 ;
   43248           1 :   PyObject * obj6 = 0 ;
   43249           1 :   PyObject * obj7 = 0 ;
   43250           1 :   PyObject * obj8 = 0 ;
   43251           1 :   PyObject * obj9 = 0 ;
   43252           1 :   PyObject * obj10 = 0 ;
   43253           1 :   PyObject * obj11 = 0 ;
   43254           1 :   char * kwnames[] = {
   43255             :     (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 
   43256             :   };
   43257           1 :   CPLVirtualMemShadow *result = 0 ;
   43258             :   
   43259           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;
   43260           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43261           1 :   if (!SWIG_IsOK(res1)) {
   43262           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetVirtualMem" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43263             :   }
   43264           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43265           1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   43266           1 :   if (!SWIG_IsOK(ecode2)) {
   43267           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   43268             :   } 
   43269           1 :   arg2 = static_cast< GDALRWFlag >(val2);
   43270           1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   43271           1 :   if (!SWIG_IsOK(ecode3)) {
   43272           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetVirtualMem" "', argument " "3"" of type '" "int""'");
   43273             :   } 
   43274           1 :   arg3 = static_cast< int >(val3);
   43275           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   43276           1 :   if (!SWIG_IsOK(ecode4)) {
   43277           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetVirtualMem" "', argument " "4"" of type '" "int""'");
   43278             :   } 
   43279           1 :   arg4 = static_cast< int >(val4);
   43280           1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   43281           1 :   if (!SWIG_IsOK(ecode5)) {
   43282           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetVirtualMem" "', argument " "5"" of type '" "int""'");
   43283             :   } 
   43284           1 :   arg5 = static_cast< int >(val5);
   43285           1 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   43286           1 :   if (!SWIG_IsOK(ecode6)) {
   43287           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetVirtualMem" "', argument " "6"" of type '" "int""'");
   43288             :   } 
   43289           1 :   arg6 = static_cast< int >(val6);
   43290           1 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   43291           1 :   if (!SWIG_IsOK(ecode7)) {
   43292           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetVirtualMem" "', argument " "7"" of type '" "int""'");
   43293             :   } 
   43294           1 :   arg7 = static_cast< int >(val7);
   43295           1 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   43296           1 :   if (!SWIG_IsOK(ecode8)) {
   43297           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Band_GetVirtualMem" "', argument " "8"" of type '" "int""'");
   43298             :   } 
   43299           1 :   arg8 = static_cast< int >(val8);
   43300           1 :   {
   43301             :     // %typemap(in) GDALDataType
   43302           1 :     int val = 0;
   43303           1 :     int ecode = SWIG_AsVal_int(obj8, &val);
   43304           1 :     if (!SWIG_IsOK(ecode)) {
   43305           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   43306             :     }
   43307           1 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   43308             :     {
   43309           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   43310             :     }
   43311           1 :     arg9 = static_cast<GDALDataType>(val);
   43312             :   }
   43313           1 :   ecode10 = SWIG_AsVal_size_t(obj9, &val10);
   43314           1 :   if (!SWIG_IsOK(ecode10)) {
   43315           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Band_GetVirtualMem" "', argument " "10"" of type '" "size_t""'");
   43316             :   } 
   43317           1 :   arg10 = static_cast< size_t >(val10);
   43318           1 :   ecode11 = SWIG_AsVal_size_t(obj10, &val11);
   43319           1 :   if (!SWIG_IsOK(ecode11)) {
   43320           0 :     SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "Band_GetVirtualMem" "', argument " "11"" of type '" "size_t""'");
   43321             :   } 
   43322           1 :   arg11 = static_cast< size_t >(val11);
   43323           1 :   if (obj11) {
   43324           0 :     {
   43325             :       /* %typemap(in) char **dict */
   43326           0 :       arg12 = NULL;
   43327           0 :       if ( PySequence_Check( obj11 ) ) {
   43328           0 :         int bErr = FALSE;
   43329           0 :         arg12 = CSLFromPySequence(obj11, &bErr);
   43330           0 :         if ( bErr )
   43331             :         {
   43332           0 :           SWIG_fail;
   43333             :         }
   43334             :       }
   43335           0 :       else if ( PyMapping_Check( obj11 ) ) {
   43336           0 :         int bErr = FALSE;
   43337           0 :         arg12 = CSLFromPyMapping(obj11, &bErr);
   43338           0 :         if ( bErr )
   43339             :         {
   43340           0 :           SWIG_fail;
   43341             :         }
   43342             :       }
   43343             :       else {
   43344           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43345           0 :         SWIG_fail;
   43346             :       }
   43347             :     }
   43348             :   }
   43349           1 :   {
   43350           1 :     const int bLocalUseExceptions = GetUseExceptions();
   43351           1 :     if ( bLocalUseExceptions ) {
   43352           1 :       pushErrorHandler();
   43353             :     }
   43354           1 :     {
   43355           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43356           1 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   43357           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43358             :     }
   43359           1 :     if ( bLocalUseExceptions ) {
   43360           1 :       popErrorHandler();
   43361             :     }
   43362             : #ifndef SED_HACKS
   43363             :     if ( bLocalUseExceptions ) {
   43364             :       CPLErr eclass = CPLGetLastErrorType();
   43365             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43366             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43367             :       }
   43368             :     }
   43369             : #endif
   43370             :   }
   43371           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   43372           1 :   {
   43373             :     /* %typemap(freearg) char **dict */
   43374           1 :     CSLDestroy( arg12 );
   43375             :   }
   43376           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; } }
   43377             :   return resultobj;
   43378           0 : fail:
   43379           0 :   {
   43380             :     /* %typemap(freearg) char **dict */
   43381           0 :     CSLDestroy( arg12 );
   43382             :   }
   43383             :   return NULL;
   43384             : }
   43385             : 
   43386             : 
   43387          21 : SWIGINTERN PyObject *_wrap_Band_GetVirtualMemAuto(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43388          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43389          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43390          21 :   GDALRWFlag arg2 ;
   43391          21 :   char **arg3 = (char **) NULL ;
   43392          21 :   void *argp1 = 0 ;
   43393          21 :   int res1 = 0 ;
   43394          21 :   int val2 ;
   43395          21 :   int ecode2 = 0 ;
   43396          21 :   PyObject * obj0 = 0 ;
   43397          21 :   PyObject * obj1 = 0 ;
   43398          21 :   PyObject * obj2 = 0 ;
   43399          21 :   char * kwnames[] = {
   43400             :     (char *)"self",  (char *)"eRWFlag",  (char *)"options",  NULL 
   43401             :   };
   43402          21 :   CPLVirtualMemShadow *result = 0 ;
   43403             :   
   43404          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Band_GetVirtualMemAuto", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   43405          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43406          21 :   if (!SWIG_IsOK(res1)) {
   43407           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetVirtualMemAuto" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43408             :   }
   43409          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43410          21 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   43411          21 :   if (!SWIG_IsOK(ecode2)) {
   43412           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetVirtualMemAuto" "', argument " "2"" of type '" "GDALRWFlag""'");
   43413             :   } 
   43414          21 :   arg2 = static_cast< GDALRWFlag >(val2);
   43415          21 :   if (obj2) {
   43416           0 :     {
   43417             :       /* %typemap(in) char **dict */
   43418           0 :       arg3 = NULL;
   43419           0 :       if ( PySequence_Check( obj2 ) ) {
   43420           0 :         int bErr = FALSE;
   43421           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   43422           0 :         if ( bErr )
   43423             :         {
   43424           0 :           SWIG_fail;
   43425             :         }
   43426             :       }
   43427           0 :       else if ( PyMapping_Check( obj2 ) ) {
   43428           0 :         int bErr = FALSE;
   43429           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   43430           0 :         if ( bErr )
   43431             :         {
   43432           0 :           SWIG_fail;
   43433             :         }
   43434             :       }
   43435             :       else {
   43436           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43437           0 :         SWIG_fail;
   43438             :       }
   43439             :     }
   43440             :   }
   43441          21 :   {
   43442          21 :     const int bLocalUseExceptions = GetUseExceptions();
   43443          21 :     if ( bLocalUseExceptions ) {
   43444          21 :       pushErrorHandler();
   43445             :     }
   43446          21 :     {
   43447          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43448          21 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetVirtualMemAuto(arg1,arg2,arg3);
   43449          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43450             :     }
   43451          21 :     if ( bLocalUseExceptions ) {
   43452          21 :       popErrorHandler();
   43453             :     }
   43454             : #ifndef SED_HACKS
   43455             :     if ( bLocalUseExceptions ) {
   43456             :       CPLErr eclass = CPLGetLastErrorType();
   43457             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43458             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43459             :       }
   43460             :     }
   43461             : #endif
   43462             :   }
   43463          21 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   43464          21 :   {
   43465             :     /* %typemap(freearg) char **dict */
   43466          21 :     CSLDestroy( arg3 );
   43467             :   }
   43468          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; } }
   43469             :   return resultobj;
   43470           0 : fail:
   43471           0 :   {
   43472             :     /* %typemap(freearg) char **dict */
   43473           0 :     CSLDestroy( arg3 );
   43474             :   }
   43475             :   return NULL;
   43476             : }
   43477             : 
   43478             : 
   43479           1 : SWIGINTERN PyObject *_wrap_Band_GetTiledVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43480           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43481           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43482           1 :   GDALRWFlag arg2 ;
   43483           1 :   int arg3 ;
   43484           1 :   int arg4 ;
   43485           1 :   int arg5 ;
   43486           1 :   int arg6 ;
   43487           1 :   int arg7 ;
   43488           1 :   int arg8 ;
   43489           1 :   GDALDataType arg9 ;
   43490           1 :   size_t arg10 ;
   43491           1 :   char **arg11 = (char **) NULL ;
   43492           1 :   void *argp1 = 0 ;
   43493           1 :   int res1 = 0 ;
   43494           1 :   int val2 ;
   43495           1 :   int ecode2 = 0 ;
   43496           1 :   int val3 ;
   43497           1 :   int ecode3 = 0 ;
   43498           1 :   int val4 ;
   43499           1 :   int ecode4 = 0 ;
   43500           1 :   int val5 ;
   43501           1 :   int ecode5 = 0 ;
   43502           1 :   int val6 ;
   43503           1 :   int ecode6 = 0 ;
   43504           1 :   int val7 ;
   43505           1 :   int ecode7 = 0 ;
   43506           1 :   int val8 ;
   43507           1 :   int ecode8 = 0 ;
   43508           1 :   size_t val10 ;
   43509           1 :   int ecode10 = 0 ;
   43510           1 :   PyObject * obj0 = 0 ;
   43511           1 :   PyObject * obj1 = 0 ;
   43512           1 :   PyObject * obj2 = 0 ;
   43513           1 :   PyObject * obj3 = 0 ;
   43514           1 :   PyObject * obj4 = 0 ;
   43515           1 :   PyObject * obj5 = 0 ;
   43516           1 :   PyObject * obj6 = 0 ;
   43517           1 :   PyObject * obj7 = 0 ;
   43518           1 :   PyObject * obj8 = 0 ;
   43519           1 :   PyObject * obj9 = 0 ;
   43520           1 :   PyObject * obj10 = 0 ;
   43521           1 :   char * kwnames[] = {
   43522             :     (char *)"self",  (char *)"eRWFlag",  (char *)"nXOff",  (char *)"nYOff",  (char *)"nXSize",  (char *)"nYSize",  (char *)"nTileXSize",  (char *)"nTileYSize",  (char *)"eBufType",  (char *)"nCacheSize",  (char *)"options",  NULL 
   43523             :   };
   43524           1 :   CPLVirtualMemShadow *result = 0 ;
   43525             :   
   43526           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOO|O:Band_GetTiledVirtualMem", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   43527           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43528           1 :   if (!SWIG_IsOK(res1)) {
   43529           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetTiledVirtualMem" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43530             :   }
   43531           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43532           1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   43533           1 :   if (!SWIG_IsOK(ecode2)) {
   43534           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetTiledVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   43535             :   } 
   43536           1 :   arg2 = static_cast< GDALRWFlag >(val2);
   43537           1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   43538           1 :   if (!SWIG_IsOK(ecode3)) {
   43539           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetTiledVirtualMem" "', argument " "3"" of type '" "int""'");
   43540             :   } 
   43541           1 :   arg3 = static_cast< int >(val3);
   43542           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   43543           1 :   if (!SWIG_IsOK(ecode4)) {
   43544           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetTiledVirtualMem" "', argument " "4"" of type '" "int""'");
   43545             :   } 
   43546           1 :   arg4 = static_cast< int >(val4);
   43547           1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   43548           1 :   if (!SWIG_IsOK(ecode5)) {
   43549           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetTiledVirtualMem" "', argument " "5"" of type '" "int""'");
   43550             :   } 
   43551           1 :   arg5 = static_cast< int >(val5);
   43552           1 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   43553           1 :   if (!SWIG_IsOK(ecode6)) {
   43554           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetTiledVirtualMem" "', argument " "6"" of type '" "int""'");
   43555             :   } 
   43556           1 :   arg6 = static_cast< int >(val6);
   43557           1 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   43558           1 :   if (!SWIG_IsOK(ecode7)) {
   43559           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetTiledVirtualMem" "', argument " "7"" of type '" "int""'");
   43560             :   } 
   43561           1 :   arg7 = static_cast< int >(val7);
   43562           1 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   43563           1 :   if (!SWIG_IsOK(ecode8)) {
   43564           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Band_GetTiledVirtualMem" "', argument " "8"" of type '" "int""'");
   43565             :   } 
   43566           1 :   arg8 = static_cast< int >(val8);
   43567           1 :   {
   43568             :     // %typemap(in) GDALDataType
   43569           1 :     int val = 0;
   43570           1 :     int ecode = SWIG_AsVal_int(obj8, &val);
   43571           1 :     if (!SWIG_IsOK(ecode)) {
   43572           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   43573             :     }
   43574           1 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   43575             :     {
   43576           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   43577             :     }
   43578           1 :     arg9 = static_cast<GDALDataType>(val);
   43579             :   }
   43580           1 :   ecode10 = SWIG_AsVal_size_t(obj9, &val10);
   43581           1 :   if (!SWIG_IsOK(ecode10)) {
   43582           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Band_GetTiledVirtualMem" "', argument " "10"" of type '" "size_t""'");
   43583             :   } 
   43584           1 :   arg10 = static_cast< size_t >(val10);
   43585           1 :   if (obj10) {
   43586           0 :     {
   43587             :       /* %typemap(in) char **dict */
   43588           0 :       arg11 = NULL;
   43589           0 :       if ( PySequence_Check( obj10 ) ) {
   43590           0 :         int bErr = FALSE;
   43591           0 :         arg11 = CSLFromPySequence(obj10, &bErr);
   43592           0 :         if ( bErr )
   43593             :         {
   43594           0 :           SWIG_fail;
   43595             :         }
   43596             :       }
   43597           0 :       else if ( PyMapping_Check( obj10 ) ) {
   43598           0 :         int bErr = FALSE;
   43599           0 :         arg11 = CSLFromPyMapping(obj10, &bErr);
   43600           0 :         if ( bErr )
   43601             :         {
   43602           0 :           SWIG_fail;
   43603             :         }
   43604             :       }
   43605             :       else {
   43606           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43607           0 :         SWIG_fail;
   43608             :       }
   43609             :     }
   43610             :   }
   43611           1 :   {
   43612           1 :     const int bLocalUseExceptions = GetUseExceptions();
   43613           1 :     if ( bLocalUseExceptions ) {
   43614           1 :       pushErrorHandler();
   43615             :     }
   43616           1 :     {
   43617           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43618           1 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetTiledVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   43619           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43620             :     }
   43621           1 :     if ( bLocalUseExceptions ) {
   43622           1 :       popErrorHandler();
   43623             :     }
   43624             : #ifndef SED_HACKS
   43625             :     if ( bLocalUseExceptions ) {
   43626             :       CPLErr eclass = CPLGetLastErrorType();
   43627             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43628             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43629             :       }
   43630             :     }
   43631             : #endif
   43632             :   }
   43633           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   43634           1 :   {
   43635             :     /* %typemap(freearg) char **dict */
   43636           1 :     CSLDestroy( arg11 );
   43637             :   }
   43638           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; } }
   43639             :   return resultobj;
   43640           0 : fail:
   43641           0 :   {
   43642             :     /* %typemap(freearg) char **dict */
   43643           0 :     CSLDestroy( arg11 );
   43644             :   }
   43645             :   return NULL;
   43646             : }
   43647             : 
   43648             : 
   43649          26 : SWIGINTERN PyObject *_wrap_Band_GetDataCoverageStatus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43650          26 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43651          26 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43652          26 :   int arg2 ;
   43653          26 :   int arg3 ;
   43654          26 :   int arg4 ;
   43655          26 :   int arg5 ;
   43656          26 :   int arg6 = (int) 0 ;
   43657          26 :   double *arg7 = (double *) NULL ;
   43658          26 :   void *argp1 = 0 ;
   43659          26 :   int res1 = 0 ;
   43660          26 :   int val2 ;
   43661          26 :   int ecode2 = 0 ;
   43662          26 :   int val3 ;
   43663          26 :   int ecode3 = 0 ;
   43664          26 :   int val4 ;
   43665          26 :   int ecode4 = 0 ;
   43666          26 :   int val5 ;
   43667          26 :   int ecode5 = 0 ;
   43668          26 :   int val6 ;
   43669          26 :   int ecode6 = 0 ;
   43670          26 :   double temp7 ;
   43671          26 :   int res7 = SWIG_TMPOBJ ;
   43672          26 :   PyObject *swig_obj[6] ;
   43673          26 :   int result;
   43674             :   
   43675          26 :   arg7 = &temp7;
   43676          26 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetDataCoverageStatus", 5, 6, swig_obj)) SWIG_fail;
   43677          26 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43678          26 :   if (!SWIG_IsOK(res1)) {
   43679           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDataCoverageStatus" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43680             :   }
   43681          26 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43682          26 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   43683          26 :   if (!SWIG_IsOK(ecode2)) {
   43684           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetDataCoverageStatus" "', argument " "2"" of type '" "int""'");
   43685             :   } 
   43686          26 :   arg2 = static_cast< int >(val2);
   43687          26 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   43688          26 :   if (!SWIG_IsOK(ecode3)) {
   43689           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetDataCoverageStatus" "', argument " "3"" of type '" "int""'");
   43690             :   } 
   43691          26 :   arg3 = static_cast< int >(val3);
   43692          26 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   43693          26 :   if (!SWIG_IsOK(ecode4)) {
   43694           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetDataCoverageStatus" "', argument " "4"" of type '" "int""'");
   43695             :   } 
   43696          26 :   arg4 = static_cast< int >(val4);
   43697          26 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   43698          26 :   if (!SWIG_IsOK(ecode5)) {
   43699           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetDataCoverageStatus" "', argument " "5"" of type '" "int""'");
   43700             :   } 
   43701          26 :   arg5 = static_cast< int >(val5);
   43702          26 :   if (swig_obj[5]) {
   43703           0 :     ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
   43704           0 :     if (!SWIG_IsOK(ecode6)) {
   43705           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDataCoverageStatus" "', argument " "6"" of type '" "int""'");
   43706             :     } 
   43707             :     arg6 = static_cast< int >(val6);
   43708             :   }
   43709          26 :   {
   43710          26 :     const int bLocalUseExceptions = GetUseExceptions();
   43711          26 :     if ( bLocalUseExceptions ) {
   43712           6 :       pushErrorHandler();
   43713             :     }
   43714          26 :     {
   43715          26 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43716          26 :       result = (int)GDALRasterBandShadow_GetDataCoverageStatus(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   43717          26 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43718             :     }
   43719          26 :     if ( bLocalUseExceptions ) {
   43720           6 :       popErrorHandler();
   43721             :     }
   43722             : #ifndef SED_HACKS
   43723             :     if ( bLocalUseExceptions ) {
   43724             :       CPLErr eclass = CPLGetLastErrorType();
   43725             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43726             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43727             :       }
   43728             :     }
   43729             : #endif
   43730             :   }
   43731          26 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43732          26 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   43733          26 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   43734             :   } else {
   43735           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43736           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   43737             :   }
   43738          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; } }
   43739             :   return resultobj;
   43740             : fail:
   43741             :   return NULL;
   43742             : }
   43743             : 
   43744             : 
   43745           2 : SWIGINTERN PyObject *_wrap_Band_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43746           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43747           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43748           2 :   int arg2 ;
   43749           2 :   int arg3 ;
   43750           2 :   int arg4 ;
   43751           2 :   int arg5 ;
   43752           2 :   int *arg6 = (int *) 0 ;
   43753           2 :   int *arg7 = (int *) 0 ;
   43754           2 :   GDALDataType *arg8 = (GDALDataType *) 0 ;
   43755           2 :   char **arg9 = (char **) NULL ;
   43756           2 :   void *argp1 = 0 ;
   43757           2 :   int res1 = 0 ;
   43758           2 :   int val2 ;
   43759           2 :   int ecode2 = 0 ;
   43760           2 :   int val3 ;
   43761           2 :   int ecode3 = 0 ;
   43762           2 :   int val4 ;
   43763           2 :   int ecode4 = 0 ;
   43764           2 :   int val5 ;
   43765           2 :   int ecode5 = 0 ;
   43766           2 :   void *argp6 = 0 ;
   43767           2 :   int res6 = 0 ;
   43768           2 :   void *argp7 = 0 ;
   43769           2 :   int res7 = 0 ;
   43770           2 :   int val8 ;
   43771           2 :   PyObject *swig_obj[9] ;
   43772           2 :   CPLErr result;
   43773             :   
   43774           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_AdviseRead", 5, 9, swig_obj)) SWIG_fail;
   43775           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43776           2 :   if (!SWIG_IsOK(res1)) {
   43777           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AdviseRead" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43778             :   }
   43779           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43780           2 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   43781           2 :   if (!SWIG_IsOK(ecode2)) {
   43782           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_AdviseRead" "', argument " "2"" of type '" "int""'");
   43783             :   } 
   43784           2 :   arg2 = static_cast< int >(val2);
   43785           2 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   43786           2 :   if (!SWIG_IsOK(ecode3)) {
   43787           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_AdviseRead" "', argument " "3"" of type '" "int""'");
   43788             :   } 
   43789           2 :   arg3 = static_cast< int >(val3);
   43790           2 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   43791           2 :   if (!SWIG_IsOK(ecode4)) {
   43792           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_AdviseRead" "', argument " "4"" of type '" "int""'");
   43793             :   } 
   43794           2 :   arg4 = static_cast< int >(val4);
   43795           2 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   43796           2 :   if (!SWIG_IsOK(ecode5)) {
   43797           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_AdviseRead" "', argument " "5"" of type '" "int""'");
   43798             :   } 
   43799           2 :   arg5 = static_cast< int >(val5);
   43800           2 :   if (swig_obj[5]) {
   43801           0 :     res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
   43802           0 :     if (!SWIG_IsOK(res6)) {
   43803           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Band_AdviseRead" "', argument " "6"" of type '" "int *""'"); 
   43804             :     }
   43805           0 :     arg6 = reinterpret_cast< int * >(argp6);
   43806             :   }
   43807           2 :   if (swig_obj[6]) {
   43808           0 :     res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
   43809           0 :     if (!SWIG_IsOK(res7)) {
   43810           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Band_AdviseRead" "', argument " "7"" of type '" "int *""'"); 
   43811             :     }
   43812           0 :     arg7 = reinterpret_cast< int * >(argp7);
   43813             :   }
   43814           2 :   if (swig_obj[7]) {
   43815           0 :     {
   43816             :       /* %typemap(in) (int *optional_##int) */
   43817           0 :       if ( swig_obj[7] == Py_None ) {
   43818             :         arg8 = 0;
   43819             :       }
   43820           0 :       else if ( PyArg_Parse( swig_obj[7],"i" ,&val8 ) ) {
   43821             :         arg8 = (GDALDataType *) &val8;
   43822             :       }
   43823             :       else {
   43824           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   43825           0 :         SWIG_fail;
   43826             :       }
   43827             :     }
   43828             :   }
   43829           2 :   if (swig_obj[8]) {
   43830           0 :     {
   43831             :       /* %typemap(in) char **dict */
   43832           0 :       arg9 = NULL;
   43833           0 :       if ( PySequence_Check( swig_obj[8] ) ) {
   43834           0 :         int bErr = FALSE;
   43835           0 :         arg9 = CSLFromPySequence(swig_obj[8], &bErr);
   43836           0 :         if ( bErr )
   43837             :         {
   43838           0 :           SWIG_fail;
   43839             :         }
   43840             :       }
   43841           0 :       else if ( PyMapping_Check( swig_obj[8] ) ) {
   43842           0 :         int bErr = FALSE;
   43843           0 :         arg9 = CSLFromPyMapping(swig_obj[8], &bErr);
   43844           0 :         if ( bErr )
   43845             :         {
   43846           0 :           SWIG_fail;
   43847             :         }
   43848             :       }
   43849             :       else {
   43850           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43851           0 :         SWIG_fail;
   43852             :       }
   43853             :     }
   43854             :   }
   43855           2 :   {
   43856           2 :     const int bLocalUseExceptions = GetUseExceptions();
   43857           2 :     if ( bLocalUseExceptions ) {
   43858           0 :       pushErrorHandler();
   43859             :     }
   43860           2 :     {
   43861           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43862           2 :       result = (CPLErr)GDALRasterBandShadow_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   43863           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43864             :     }
   43865           2 :     if ( bLocalUseExceptions ) {
   43866           0 :       popErrorHandler();
   43867             :     }
   43868             : #ifndef SED_HACKS
   43869             :     if ( bLocalUseExceptions ) {
   43870             :       CPLErr eclass = CPLGetLastErrorType();
   43871             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43872             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43873             :       }
   43874             :     }
   43875             : #endif
   43876             :   }
   43877           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43878           2 :   {
   43879             :     /* %typemap(freearg) char **dict */
   43880           2 :     CSLDestroy( arg9 );
   43881             :   }
   43882           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; } }
   43883             :   return resultobj;
   43884           0 : fail:
   43885           0 :   {
   43886             :     /* %typemap(freearg) char **dict */
   43887           0 :     CSLDestroy( arg9 );
   43888             :   }
   43889             :   return NULL;
   43890             : }
   43891             : 
   43892             : 
   43893          69 : SWIGINTERN PyObject *_wrap_Band_InterpolateAtPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43894          69 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43895          69 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43896          69 :   double arg2 ;
   43897          69 :   double arg3 ;
   43898          69 :   GDALRIOResampleAlg arg4 ;
   43899          69 :   double *arg5 = (double *) 0 ;
   43900          69 :   double *arg6 = (double *) 0 ;
   43901          69 :   void *argp1 = 0 ;
   43902          69 :   int res1 = 0 ;
   43903          69 :   double val2 ;
   43904          69 :   int ecode2 = 0 ;
   43905          69 :   double val3 ;
   43906          69 :   int ecode3 = 0 ;
   43907          69 :   double temp5 ;
   43908          69 :   int res5 = SWIG_TMPOBJ ;
   43909          69 :   double temp6 ;
   43910          69 :   int res6 = SWIG_TMPOBJ ;
   43911          69 :   PyObject *swig_obj[4] ;
   43912          69 :   CPLErr result;
   43913             :   
   43914          69 :   arg5 = &temp5;
   43915          69 :   arg6 = &temp6;
   43916          69 :   if (!SWIG_Python_UnpackTuple(args, "Band_InterpolateAtPoint", 4, 4, swig_obj)) SWIG_fail;
   43917          69 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43918          69 :   if (!SWIG_IsOK(res1)) {
   43919           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_InterpolateAtPoint" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43920             :   }
   43921          69 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43922          69 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   43923          69 :   if (!SWIG_IsOK(ecode2)) {
   43924           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_InterpolateAtPoint" "', argument " "2"" of type '" "double""'");
   43925             :   } 
   43926          69 :   arg2 = static_cast< double >(val2);
   43927          69 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   43928          69 :   if (!SWIG_IsOK(ecode3)) {
   43929           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_InterpolateAtPoint" "', argument " "3"" of type '" "double""'");
   43930             :   } 
   43931          69 :   arg3 = static_cast< double >(val3);
   43932          69 :   {
   43933             :     // %typemap(in) GDALRIOResampleAlg
   43934          69 :     int val = 0;
   43935          69 :     int ecode = SWIG_AsVal_int(swig_obj[3], &val);
   43936          69 :     if (!SWIG_IsOK(ecode)) {
   43937           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   43938             :     }
   43939          69 :     if( val < 0 ||
   43940          69 :       ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   43941          69 :         val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   43942             :       val > static_cast<int>(GRIORA_LAST) )
   43943             :     {
   43944           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   43945             :     }
   43946          69 :     arg4 = static_cast< GDALRIOResampleAlg >(val);
   43947             :   }
   43948          69 :   {
   43949          69 :     const int bLocalUseExceptions = GetUseExceptions();
   43950          69 :     if ( bLocalUseExceptions ) {
   43951          68 :       pushErrorHandler();
   43952             :     }
   43953          69 :     {
   43954          69 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43955          69 :       result = (CPLErr)GDALRasterBandShadow_InterpolateAtPoint(arg1,arg2,arg3,arg4,arg5,arg6);
   43956          69 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43957             :     }
   43958          69 :     if ( bLocalUseExceptions ) {
   43959          68 :       popErrorHandler();
   43960             :     }
   43961             : #ifndef SED_HACKS
   43962             :     if ( bLocalUseExceptions ) {
   43963             :       CPLErr eclass = CPLGetLastErrorType();
   43964             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43965             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43966             :       }
   43967             :     }
   43968             : #endif
   43969             :   }
   43970          69 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43971          69 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   43972          69 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   43973             :   } else {
   43974           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43975           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   43976             :   }
   43977          69 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   43978          69 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   43979             :   } else {
   43980           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43981           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   43982             :   }
   43983          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; } }
   43984             :   return resultobj;
   43985             : fail:
   43986             :   return NULL;
   43987             : }
   43988             : 
   43989             : 
   43990          15 : SWIGINTERN PyObject *_wrap_Band_InterpolateAtGeolocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43991          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43992          15 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43993          15 :   double arg2 ;
   43994          15 :   double arg3 ;
   43995          15 :   OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
   43996          15 :   GDALRIOResampleAlg arg5 ;
   43997          15 :   double *arg6 = (double *) 0 ;
   43998          15 :   double *arg7 = (double *) 0 ;
   43999          15 :   char **arg8 = (char **) NULL ;
   44000          15 :   void *argp1 = 0 ;
   44001          15 :   int res1 = 0 ;
   44002          15 :   double val2 ;
   44003          15 :   int ecode2 = 0 ;
   44004          15 :   double val3 ;
   44005          15 :   int ecode3 = 0 ;
   44006          15 :   void *argp4 = 0 ;
   44007          15 :   int res4 = 0 ;
   44008          15 :   double temp6 ;
   44009          15 :   int res6 = SWIG_TMPOBJ ;
   44010          15 :   double temp7 ;
   44011          15 :   int res7 = SWIG_TMPOBJ ;
   44012          15 :   PyObject *swig_obj[6] ;
   44013          15 :   CPLErr result;
   44014             :   
   44015          15 :   arg6 = &temp6;
   44016          15 :   arg7 = &temp7;
   44017          15 :   if (!SWIG_Python_UnpackTuple(args, "Band_InterpolateAtGeolocation", 5, 6, swig_obj)) SWIG_fail;
   44018          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44019          15 :   if (!SWIG_IsOK(res1)) {
   44020           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_InterpolateAtGeolocation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44021             :   }
   44022          15 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44023          15 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   44024          15 :   if (!SWIG_IsOK(ecode2)) {
   44025           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_InterpolateAtGeolocation" "', argument " "2"" of type '" "double""'");
   44026             :   } 
   44027          15 :   arg2 = static_cast< double >(val2);
   44028          15 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   44029          15 :   if (!SWIG_IsOK(ecode3)) {
   44030           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_InterpolateAtGeolocation" "', argument " "3"" of type '" "double""'");
   44031             :   } 
   44032          15 :   arg3 = static_cast< double >(val3);
   44033          15 :   res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   44034          15 :   if (!SWIG_IsOK(res4)) {
   44035           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Band_InterpolateAtGeolocation" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
   44036             :   }
   44037          15 :   arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
   44038          15 :   {
   44039             :     // %typemap(in) GDALRIOResampleAlg
   44040          15 :     int val = 0;
   44041          15 :     int ecode = SWIG_AsVal_int(swig_obj[4], &val);
   44042          15 :     if (!SWIG_IsOK(ecode)) {
   44043           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   44044             :     }
   44045          15 :     if( val < 0 ||
   44046          15 :       ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   44047          15 :         val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   44048             :       val > static_cast<int>(GRIORA_LAST) )
   44049             :     {
   44050           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   44051             :     }
   44052          15 :     arg5 = static_cast< GDALRIOResampleAlg >(val);
   44053             :   }
   44054          15 :   if (swig_obj[5]) {
   44055           0 :     {
   44056             :       /* %typemap(in) char **dict */
   44057           0 :       arg8 = NULL;
   44058           0 :       if ( PySequence_Check( swig_obj[5] ) ) {
   44059           0 :         int bErr = FALSE;
   44060           0 :         arg8 = CSLFromPySequence(swig_obj[5], &bErr);
   44061           0 :         if ( bErr )
   44062             :         {
   44063           0 :           SWIG_fail;
   44064             :         }
   44065             :       }
   44066           0 :       else if ( PyMapping_Check( swig_obj[5] ) ) {
   44067           0 :         int bErr = FALSE;
   44068           0 :         arg8 = CSLFromPyMapping(swig_obj[5], &bErr);
   44069           0 :         if ( bErr )
   44070             :         {
   44071           0 :           SWIG_fail;
   44072             :         }
   44073             :       }
   44074             :       else {
   44075           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   44076           0 :         SWIG_fail;
   44077             :       }
   44078             :     }
   44079             :   }
   44080          15 :   {
   44081          15 :     const int bLocalUseExceptions = GetUseExceptions();
   44082          15 :     if ( bLocalUseExceptions ) {
   44083          15 :       pushErrorHandler();
   44084             :     }
   44085          15 :     {
   44086          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44087          15 :       result = (CPLErr)GDALRasterBandShadow_InterpolateAtGeolocation(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   44088          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44089             :     }
   44090          15 :     if ( bLocalUseExceptions ) {
   44091          15 :       popErrorHandler();
   44092             :     }
   44093             : #ifndef SED_HACKS
   44094             :     if ( bLocalUseExceptions ) {
   44095             :       CPLErr eclass = CPLGetLastErrorType();
   44096             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44097             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44098             :       }
   44099             :     }
   44100             : #endif
   44101             :   }
   44102          15 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44103          15 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   44104          15 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   44105             :   } else {
   44106           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44107           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   44108             :   }
   44109          15 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   44110          15 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   44111             :   } else {
   44112           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44113           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   44114             :   }
   44115          15 :   {
   44116             :     /* %typemap(freearg) char **dict */
   44117          15 :     CSLDestroy( arg8 );
   44118             :   }
   44119          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; } }
   44120             :   return resultobj;
   44121           0 : fail:
   44122           0 :   {
   44123             :     /* %typemap(freearg) char **dict */
   44124           0 :     CSLDestroy( arg8 );
   44125             :   }
   44126             :   return NULL;
   44127             : }
   44128             : 
   44129             : 
   44130           2 : SWIGINTERN PyObject *_wrap_Band_ComputeMinMaxLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44131           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44132           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44133           2 :   double *arg2 = (double *) 0 ;
   44134           2 :   double *arg3 = (double *) 0 ;
   44135           2 :   int *arg4 = (int *) 0 ;
   44136           2 :   int *arg5 = (int *) 0 ;
   44137           2 :   int *arg6 = (int *) 0 ;
   44138           2 :   int *arg7 = (int *) 0 ;
   44139           2 :   void *argp1 = 0 ;
   44140           2 :   int res1 = 0 ;
   44141           2 :   double temp2 ;
   44142           2 :   int res2 = SWIG_TMPOBJ ;
   44143           2 :   double temp3 ;
   44144           2 :   int res3 = SWIG_TMPOBJ ;
   44145           2 :   int temp4 ;
   44146           2 :   int res4 = SWIG_TMPOBJ ;
   44147           2 :   int temp5 ;
   44148           2 :   int res5 = SWIG_TMPOBJ ;
   44149           2 :   int temp6 ;
   44150           2 :   int res6 = SWIG_TMPOBJ ;
   44151           2 :   int temp7 ;
   44152           2 :   int res7 = SWIG_TMPOBJ ;
   44153           2 :   PyObject *swig_obj[1] ;
   44154           2 :   CPLErr result;
   44155             :   
   44156           2 :   arg2 = &temp2;
   44157           2 :   arg3 = &temp3;
   44158           2 :   arg4 = &temp4;
   44159           2 :   arg5 = &temp5;
   44160           2 :   arg6 = &temp6;
   44161           2 :   arg7 = &temp7;
   44162           2 :   if (!args) SWIG_fail;
   44163           2 :   swig_obj[0] = args;
   44164           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44165           2 :   if (!SWIG_IsOK(res1)) {
   44166           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeMinMaxLocation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44167             :   }
   44168           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44169           2 :   {
   44170           2 :     const int bLocalUseExceptions = GetUseExceptions();
   44171           2 :     if ( bLocalUseExceptions ) {
   44172           0 :       pushErrorHandler();
   44173             :     }
   44174           2 :     {
   44175           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44176           2 :       result = (CPLErr)GDALRasterBandShadow_ComputeMinMaxLocation(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   44177           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44178             :     }
   44179           2 :     if ( bLocalUseExceptions ) {
   44180           0 :       popErrorHandler();
   44181             :     }
   44182             : #ifndef SED_HACKS
   44183             :     if ( bLocalUseExceptions ) {
   44184             :       CPLErr eclass = CPLGetLastErrorType();
   44185             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44186             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44187             :       }
   44188             :     }
   44189             : #endif
   44190             :   }
   44191           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44192           2 :   if (ReturnSame(SWIG_IsTmpObj(res2))) {
   44193           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
   44194             :   } else {
   44195           0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44196           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
   44197             :   }
   44198           2 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   44199           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   44200             :   } else {
   44201           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44202           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   44203             :   }
   44204           2 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   44205           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
   44206             :   } else {
   44207           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44208           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
   44209             :   }
   44210           2 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   44211           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
   44212             :   } else {
   44213           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44214           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
   44215             :   }
   44216           2 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   44217           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
   44218             :   } else {
   44219           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44220           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
   44221             :   }
   44222           2 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   44223           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)));
   44224             :   } else {
   44225           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44226           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags));
   44227             :   }
   44228           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; } }
   44229             :   return resultobj;
   44230             : fail:
   44231             :   return NULL;
   44232             : }
   44233             : 
   44234             : 
   44235          21 : SWIGINTERN PyObject *_wrap_Band_AsMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44236          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44237          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44238          21 :   void *argp1 = 0 ;
   44239          21 :   int res1 = 0 ;
   44240          21 :   PyObject *swig_obj[1] ;
   44241          21 :   GDALMDArrayHS *result = 0 ;
   44242             :   
   44243          21 :   if (!args) SWIG_fail;
   44244          21 :   swig_obj[0] = args;
   44245          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44246          21 :   if (!SWIG_IsOK(res1)) {
   44247           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AsMDArray" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44248             :   }
   44249          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44250          21 :   {
   44251          21 :     const int bLocalUseExceptions = GetUseExceptions();
   44252          21 :     if ( bLocalUseExceptions ) {
   44253           0 :       pushErrorHandler();
   44254             :     }
   44255          21 :     {
   44256          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44257          21 :       result = (GDALMDArrayHS *)GDALRasterBandShadow_AsMDArray(arg1);
   44258          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44259             :     }
   44260          21 :     if ( bLocalUseExceptions ) {
   44261           0 :       popErrorHandler();
   44262             :     }
   44263             : #ifndef SED_HACKS
   44264             :     if ( bLocalUseExceptions ) {
   44265             :       CPLErr eclass = CPLGetLastErrorType();
   44266             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44267             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44268             :       }
   44269             :     }
   44270             : #endif
   44271             :   }
   44272          21 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   44273          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; } }
   44274             :   return resultobj;
   44275             : fail:
   44276             :   return NULL;
   44277             : }
   44278             : 
   44279             : 
   44280        4884 : SWIGINTERN PyObject *_wrap_Band__EnablePixelTypeSignedByteWarning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44281        4884 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44282        4884 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44283        4884 :   bool arg2 ;
   44284        4884 :   void *argp1 = 0 ;
   44285        4884 :   int res1 = 0 ;
   44286        4884 :   bool val2 ;
   44287        4884 :   int ecode2 = 0 ;
   44288        4884 :   PyObject *swig_obj[2] ;
   44289             :   
   44290        4884 :   if (!SWIG_Python_UnpackTuple(args, "Band__EnablePixelTypeSignedByteWarning", 2, 2, swig_obj)) SWIG_fail;
   44291        4884 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44292        4884 :   if (!SWIG_IsOK(res1)) {
   44293           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band__EnablePixelTypeSignedByteWarning" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44294             :   }
   44295        4884 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44296        4884 :   ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
   44297        4884 :   if (!SWIG_IsOK(ecode2)) {
   44298           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band__EnablePixelTypeSignedByteWarning" "', argument " "2"" of type '" "bool""'");
   44299             :   } 
   44300        4884 :   arg2 = static_cast< bool >(val2);
   44301        4884 :   {
   44302        4884 :     const int bLocalUseExceptions = GetUseExceptions();
   44303        4884 :     if ( bLocalUseExceptions ) {
   44304        4476 :       pushErrorHandler();
   44305             :     }
   44306        4884 :     {
   44307        4884 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44308        4884 :       GDALRasterBandShadow__EnablePixelTypeSignedByteWarning(arg1,arg2);
   44309        4884 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44310             :     }
   44311        4884 :     if ( bLocalUseExceptions ) {
   44312        4476 :       popErrorHandler();
   44313             :     }
   44314             : #ifndef SED_HACKS
   44315             :     if ( bLocalUseExceptions ) {
   44316             :       CPLErr eclass = CPLGetLastErrorType();
   44317             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44318             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44319             :       }
   44320             :     }
   44321             : #endif
   44322             :   }
   44323        4884 :   resultobj = SWIG_Py_Void();
   44324        4884 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44325             :   return resultobj;
   44326             : fail:
   44327             :   return NULL;
   44328             : }
   44329             : 
   44330             : 
   44331           6 : SWIGINTERN PyObject *_wrap_Band_UnaryOp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44332           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44333           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44334           6 :   GDALRasterAlgebraUnaryOperation arg2 ;
   44335           6 :   void *argp1 = 0 ;
   44336           6 :   int res1 = 0 ;
   44337           6 :   int val2 ;
   44338           6 :   int ecode2 = 0 ;
   44339           6 :   PyObject *swig_obj[2] ;
   44340           6 :   GDALComputedRasterBandShadow *result = 0 ;
   44341             :   
   44342           6 :   if (!SWIG_Python_UnpackTuple(args, "Band_UnaryOp", 2, 2, swig_obj)) SWIG_fail;
   44343           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44344           6 :   if (!SWIG_IsOK(res1)) {
   44345           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_UnaryOp" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44346             :   }
   44347           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44348           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44349           6 :   if (!SWIG_IsOK(ecode2)) {
   44350           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_UnaryOp" "', argument " "2"" of type '" "GDALRasterAlgebraUnaryOperation""'");
   44351             :   } 
   44352           6 :   arg2 = static_cast< GDALRasterAlgebraUnaryOperation >(val2);
   44353           6 :   {
   44354           6 :     const int bLocalUseExceptions = GetUseExceptions();
   44355           6 :     if ( bLocalUseExceptions ) {
   44356           6 :       pushErrorHandler();
   44357             :     }
   44358           6 :     {
   44359           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44360           6 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_UnaryOp(arg1,arg2);
   44361           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44362             :     }
   44363           6 :     if ( bLocalUseExceptions ) {
   44364           6 :       popErrorHandler();
   44365             :     }
   44366             : #ifndef SED_HACKS
   44367             :     if ( bLocalUseExceptions ) {
   44368             :       CPLErr eclass = CPLGetLastErrorType();
   44369             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44370             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44371             :       }
   44372             :     }
   44373             : #endif
   44374             :   }
   44375           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44376           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; } }
   44377             :   return resultobj;
   44378             : fail:
   44379             :   return NULL;
   44380             : }
   44381             : 
   44382             : 
   44383          57 : SWIGINTERN PyObject *_wrap_Band_BinaryOpBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44384          57 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44385          57 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44386          57 :   GDALRasterAlgebraBinaryOperation arg2 ;
   44387          57 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   44388          57 :   void *argp1 = 0 ;
   44389          57 :   int res1 = 0 ;
   44390          57 :   int val2 ;
   44391          57 :   int ecode2 = 0 ;
   44392          57 :   void *argp3 = 0 ;
   44393          57 :   int res3 = 0 ;
   44394          57 :   PyObject *swig_obj[3] ;
   44395          57 :   GDALComputedRasterBandShadow *result = 0 ;
   44396             :   
   44397          57 :   if (!SWIG_Python_UnpackTuple(args, "Band_BinaryOpBand", 3, 3, swig_obj)) SWIG_fail;
   44398          57 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44399          57 :   if (!SWIG_IsOK(res1)) {
   44400           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_BinaryOpBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44401             :   }
   44402          57 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44403          57 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44404          57 :   if (!SWIG_IsOK(ecode2)) {
   44405           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_BinaryOpBand" "', argument " "2"" of type '" "GDALRasterAlgebraBinaryOperation""'");
   44406             :   } 
   44407          57 :   arg2 = static_cast< GDALRasterAlgebraBinaryOperation >(val2);
   44408          57 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44409          57 :   if (!SWIG_IsOK(res3)) {
   44410           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_BinaryOpBand" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   44411             :   }
   44412          57 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   44413          57 :   {
   44414          57 :     if (!arg3) {
   44415           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44416             :     }
   44417             :   }
   44418          57 :   {
   44419          57 :     const int bLocalUseExceptions = GetUseExceptions();
   44420          57 :     if ( bLocalUseExceptions ) {
   44421          57 :       pushErrorHandler();
   44422             :     }
   44423          57 :     {
   44424          57 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44425          57 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_BinaryOpBand(arg1,arg2,arg3);
   44426          57 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44427             :     }
   44428          57 :     if ( bLocalUseExceptions ) {
   44429          57 :       popErrorHandler();
   44430             :     }
   44431             : #ifndef SED_HACKS
   44432             :     if ( bLocalUseExceptions ) {
   44433             :       CPLErr eclass = CPLGetLastErrorType();
   44434             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44435             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44436             :       }
   44437             :     }
   44438             : #endif
   44439             :   }
   44440          57 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44441          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; } }
   44442             :   return resultobj;
   44443             : fail:
   44444             :   return NULL;
   44445             : }
   44446             : 
   44447             : 
   44448          59 : SWIGINTERN PyObject *_wrap_Band_BinaryOpDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44449          59 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44450          59 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44451          59 :   GDALRasterAlgebraBinaryOperation arg2 ;
   44452          59 :   double arg3 ;
   44453          59 :   void *argp1 = 0 ;
   44454          59 :   int res1 = 0 ;
   44455          59 :   int val2 ;
   44456          59 :   int ecode2 = 0 ;
   44457          59 :   double val3 ;
   44458          59 :   int ecode3 = 0 ;
   44459          59 :   PyObject *swig_obj[3] ;
   44460          59 :   GDALComputedRasterBandShadow *result = 0 ;
   44461             :   
   44462          59 :   if (!SWIG_Python_UnpackTuple(args, "Band_BinaryOpDouble", 3, 3, swig_obj)) SWIG_fail;
   44463          59 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44464          59 :   if (!SWIG_IsOK(res1)) {
   44465           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_BinaryOpDouble" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44466             :   }
   44467          59 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44468          59 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44469          59 :   if (!SWIG_IsOK(ecode2)) {
   44470           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_BinaryOpDouble" "', argument " "2"" of type '" "GDALRasterAlgebraBinaryOperation""'");
   44471             :   } 
   44472          59 :   arg2 = static_cast< GDALRasterAlgebraBinaryOperation >(val2);
   44473          59 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   44474          59 :   if (!SWIG_IsOK(ecode3)) {
   44475           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_BinaryOpDouble" "', argument " "3"" of type '" "double""'");
   44476             :   } 
   44477          59 :   arg3 = static_cast< double >(val3);
   44478          59 :   {
   44479          59 :     const int bLocalUseExceptions = GetUseExceptions();
   44480          59 :     if ( bLocalUseExceptions ) {
   44481          59 :       pushErrorHandler();
   44482             :     }
   44483          59 :     {
   44484          59 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44485          59 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_BinaryOpDouble(arg1,arg2,arg3);
   44486          59 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44487             :     }
   44488          59 :     if ( bLocalUseExceptions ) {
   44489          59 :       popErrorHandler();
   44490             :     }
   44491             : #ifndef SED_HACKS
   44492             :     if ( bLocalUseExceptions ) {
   44493             :       CPLErr eclass = CPLGetLastErrorType();
   44494             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44495             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44496             :       }
   44497             :     }
   44498             : #endif
   44499             :   }
   44500          59 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44501          59 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44502             :   return resultobj;
   44503             : fail:
   44504             :   return NULL;
   44505             : }
   44506             : 
   44507             : 
   44508          18 : SWIGINTERN PyObject *_wrap_Band_BinaryOpDoubleToBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44509          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44510          18 :   double arg1 ;
   44511          18 :   GDALRasterAlgebraBinaryOperation arg2 ;
   44512          18 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   44513          18 :   double val1 ;
   44514          18 :   int ecode1 = 0 ;
   44515          18 :   int val2 ;
   44516          18 :   int ecode2 = 0 ;
   44517          18 :   void *argp3 = 0 ;
   44518          18 :   int res3 = 0 ;
   44519          18 :   PyObject *swig_obj[3] ;
   44520          18 :   GDALComputedRasterBandShadow *result = 0 ;
   44521             :   
   44522          18 :   if (!SWIG_Python_UnpackTuple(args, "Band_BinaryOpDoubleToBand", 3, 3, swig_obj)) SWIG_fail;
   44523          18 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   44524          18 :   if (!SWIG_IsOK(ecode1)) {
   44525           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Band_BinaryOpDoubleToBand" "', argument " "1"" of type '" "double""'");
   44526             :   } 
   44527          18 :   arg1 = static_cast< double >(val1);
   44528          18 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44529          18 :   if (!SWIG_IsOK(ecode2)) {
   44530           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_BinaryOpDoubleToBand" "', argument " "2"" of type '" "GDALRasterAlgebraBinaryOperation""'");
   44531             :   } 
   44532          18 :   arg2 = static_cast< GDALRasterAlgebraBinaryOperation >(val2);
   44533          18 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44534          18 :   if (!SWIG_IsOK(res3)) {
   44535           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_BinaryOpDoubleToBand" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   44536             :   }
   44537          18 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   44538          18 :   {
   44539          18 :     if (!arg3) {
   44540           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44541             :     }
   44542             :   }
   44543          18 :   {
   44544          18 :     const int bLocalUseExceptions = GetUseExceptions();
   44545          18 :     if ( bLocalUseExceptions ) {
   44546          18 :       pushErrorHandler();
   44547             :     }
   44548          18 :     {
   44549          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44550          18 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_BinaryOpDoubleToBand(arg1,arg2,arg3);
   44551          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44552             :     }
   44553          18 :     if ( bLocalUseExceptions ) {
   44554          18 :       popErrorHandler();
   44555             :     }
   44556             : #ifndef SED_HACKS
   44557             :     if ( bLocalUseExceptions ) {
   44558             :       CPLErr eclass = CPLGetLastErrorType();
   44559             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44560             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44561             :       }
   44562             :     }
   44563             : #endif
   44564             :   }
   44565          18 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44566          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; } }
   44567             :   return resultobj;
   44568             : fail:
   44569             :   return NULL;
   44570             : }
   44571             : 
   44572             : 
   44573          12 : SWIGINTERN PyObject *_wrap_Band_IfThenElse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44574          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44575          12 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44576          12 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   44577          12 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   44578          12 :   void *argp1 = 0 ;
   44579          12 :   int res1 = 0 ;
   44580          12 :   void *argp2 = 0 ;
   44581          12 :   int res2 = 0 ;
   44582          12 :   void *argp3 = 0 ;
   44583          12 :   int res3 = 0 ;
   44584          12 :   PyObject *swig_obj[3] ;
   44585          12 :   GDALComputedRasterBandShadow *result = 0 ;
   44586             :   
   44587          12 :   if (!SWIG_Python_UnpackTuple(args, "Band_IfThenElse", 3, 3, swig_obj)) SWIG_fail;
   44588          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44589          12 :   if (!SWIG_IsOK(res1)) {
   44590           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_IfThenElse" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44591             :   }
   44592          12 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44593          12 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44594          12 :   if (!SWIG_IsOK(res2)) {
   44595           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_IfThenElse" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   44596             :   }
   44597          12 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   44598          12 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44599          12 :   if (!SWIG_IsOK(res3)) {
   44600           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_IfThenElse" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   44601             :   }
   44602          12 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   44603          12 :   {
   44604          12 :     if (!arg1) {
   44605           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44606             :     }
   44607             :   }
   44608          12 :   {
   44609          12 :     if (!arg2) {
   44610           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44611             :     }
   44612             :   }
   44613          12 :   {
   44614          12 :     if (!arg3) {
   44615           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44616             :     }
   44617             :   }
   44618          12 :   {
   44619          12 :     const int bLocalUseExceptions = GetUseExceptions();
   44620          12 :     if ( bLocalUseExceptions ) {
   44621          12 :       pushErrorHandler();
   44622             :     }
   44623          12 :     {
   44624          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44625          12 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_IfThenElse(arg1,arg2,arg3);
   44626          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44627             :     }
   44628          12 :     if ( bLocalUseExceptions ) {
   44629          12 :       popErrorHandler();
   44630             :     }
   44631             : #ifndef SED_HACKS
   44632             :     if ( bLocalUseExceptions ) {
   44633             :       CPLErr eclass = CPLGetLastErrorType();
   44634             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44635             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44636             :       }
   44637             :     }
   44638             : #endif
   44639             :   }
   44640          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44641          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; } }
   44642             :   return resultobj;
   44643             : fail:
   44644             :   return NULL;
   44645             : }
   44646             : 
   44647             : 
   44648          16 : SWIGINTERN PyObject *_wrap_Band_AsType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44649          16 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44650          16 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44651          16 :   GDALDataType arg2 ;
   44652          16 :   void *argp1 = 0 ;
   44653          16 :   int res1 = 0 ;
   44654          16 :   PyObject *swig_obj[2] ;
   44655          16 :   GDALComputedRasterBandShadow *result = 0 ;
   44656             :   
   44657          16 :   if (!SWIG_Python_UnpackTuple(args, "Band_AsType", 2, 2, swig_obj)) SWIG_fail;
   44658          16 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44659          16 :   if (!SWIG_IsOK(res1)) {
   44660           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AsType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44661             :   }
   44662          16 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44663          16 :   {
   44664             :     // %typemap(in) GDALDataType
   44665          16 :     int val = 0;
   44666          16 :     int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   44667          16 :     if (!SWIG_IsOK(ecode)) {
   44668           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   44669             :     }
   44670          16 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   44671             :     {
   44672           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   44673             :     }
   44674          16 :     arg2 = static_cast<GDALDataType>(val);
   44675             :   }
   44676          16 :   {
   44677          16 :     const int bLocalUseExceptions = GetUseExceptions();
   44678          16 :     if ( bLocalUseExceptions ) {
   44679          16 :       pushErrorHandler();
   44680             :     }
   44681          16 :     {
   44682          16 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44683          16 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_AsType(arg1,arg2);
   44684          16 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44685             :     }
   44686          16 :     if ( bLocalUseExceptions ) {
   44687          16 :       popErrorHandler();
   44688             :     }
   44689             : #ifndef SED_HACKS
   44690             :     if ( bLocalUseExceptions ) {
   44691             :       CPLErr eclass = CPLGetLastErrorType();
   44692             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44693             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44694             :       }
   44695             :     }
   44696             : #endif
   44697             :   }
   44698          16 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44699          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; } }
   44700             :   return resultobj;
   44701             : fail:
   44702             :   return NULL;
   44703             : }
   44704             : 
   44705             : 
   44706           4 : SWIGINTERN PyObject *_wrap_Band_MaximumOfNBands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44707           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44708           4 :   int arg1 ;
   44709           4 :   GDALRasterBandShadow **arg2 = (GDALRasterBandShadow **) 0 ;
   44710           4 :   PyObject *swig_obj[1] ;
   44711           4 :   GDALComputedRasterBandShadow *result = 0 ;
   44712             :   
   44713           4 :   if (!args) SWIG_fail;
   44714           4 :   swig_obj[0] = args;
   44715           4 :   {
   44716             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   44717           4 :     if ( !PySequence_Check(swig_obj[0]) ) {
   44718           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   44719           0 :       SWIG_fail;
   44720             :     }
   44721           4 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   44722           4 :     if( size > (Py_ssize_t)INT_MAX ) {
   44723           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44724           0 :       SWIG_fail;
   44725             :     }
   44726           4 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   44727           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44728           0 :       SWIG_fail;
   44729             :     }
   44730           4 :     arg1 = (int)size;
   44731           4 :     arg2 = (GDALRasterBandShadow**) VSIMalloc(arg1*sizeof(GDALRasterBandShadow*));
   44732           4 :     if( !arg2) {
   44733           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   44734           0 :       SWIG_fail;
   44735             :     }
   44736             :     
   44737          12 :     for( int i = 0; i<arg1; i++ ) {
   44738           8 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   44739           8 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   44740           8 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   44741           8 :       if (!rawobjectpointer) {
   44742           0 :         Py_DECREF(o);
   44743           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   44744           0 :         SWIG_fail;
   44745             :       }
   44746           8 :       arg2[i] = rawobjectpointer;
   44747           8 :       Py_DECREF(o);
   44748             :       
   44749             :     }
   44750             :   }
   44751           4 :   {
   44752           4 :     const int bLocalUseExceptions = GetUseExceptions();
   44753           4 :     if ( bLocalUseExceptions ) {
   44754           4 :       pushErrorHandler();
   44755             :     }
   44756           4 :     {
   44757           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44758           4 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MaximumOfNBands(arg1,arg2);
   44759           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44760             :     }
   44761           4 :     if ( bLocalUseExceptions ) {
   44762           4 :       popErrorHandler();
   44763             :     }
   44764             : #ifndef SED_HACKS
   44765             :     if ( bLocalUseExceptions ) {
   44766             :       CPLErr eclass = CPLGetLastErrorType();
   44767             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44768             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44769             :       }
   44770             :     }
   44771             : #endif
   44772             :   }
   44773           4 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44774           4 :   {
   44775             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44776           4 :     CPLFree( arg2 );
   44777             :   }
   44778           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; } }
   44779             :   return resultobj;
   44780           0 : fail:
   44781           0 :   {
   44782             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44783           0 :     CPLFree( arg2 );
   44784             :   }
   44785             :   return NULL;
   44786             : }
   44787             : 
   44788             : 
   44789           2 : SWIGINTERN PyObject *_wrap_Band_MaxConstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44790           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44791           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44792           2 :   double arg2 ;
   44793           2 :   void *argp1 = 0 ;
   44794           2 :   int res1 = 0 ;
   44795           2 :   double val2 ;
   44796           2 :   int ecode2 = 0 ;
   44797           2 :   PyObject *swig_obj[2] ;
   44798           2 :   GDALComputedRasterBandShadow *result = 0 ;
   44799             :   
   44800           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_MaxConstant", 2, 2, swig_obj)) SWIG_fail;
   44801           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44802           2 :   if (!SWIG_IsOK(res1)) {
   44803           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_MaxConstant" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44804             :   }
   44805           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44806           2 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   44807           2 :   if (!SWIG_IsOK(ecode2)) {
   44808           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_MaxConstant" "', argument " "2"" of type '" "double""'");
   44809             :   } 
   44810           2 :   arg2 = static_cast< double >(val2);
   44811           2 :   {
   44812           2 :     const int bLocalUseExceptions = GetUseExceptions();
   44813           2 :     if ( bLocalUseExceptions ) {
   44814           2 :       pushErrorHandler();
   44815             :     }
   44816           2 :     {
   44817           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44818           2 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MaxConstant(arg1,arg2);
   44819           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44820             :     }
   44821           2 :     if ( bLocalUseExceptions ) {
   44822           2 :       popErrorHandler();
   44823             :     }
   44824             : #ifndef SED_HACKS
   44825             :     if ( bLocalUseExceptions ) {
   44826             :       CPLErr eclass = CPLGetLastErrorType();
   44827             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44828             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44829             :       }
   44830             :     }
   44831             : #endif
   44832             :   }
   44833           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44834           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; } }
   44835             :   return resultobj;
   44836             : fail:
   44837             :   return NULL;
   44838             : }
   44839             : 
   44840             : 
   44841           4 : SWIGINTERN PyObject *_wrap_Band_MinimumOfNBands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44842           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44843           4 :   int arg1 ;
   44844           4 :   GDALRasterBandShadow **arg2 = (GDALRasterBandShadow **) 0 ;
   44845           4 :   PyObject *swig_obj[1] ;
   44846           4 :   GDALComputedRasterBandShadow *result = 0 ;
   44847             :   
   44848           4 :   if (!args) SWIG_fail;
   44849           4 :   swig_obj[0] = args;
   44850           4 :   {
   44851             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   44852           4 :     if ( !PySequence_Check(swig_obj[0]) ) {
   44853           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   44854           0 :       SWIG_fail;
   44855             :     }
   44856           4 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   44857           4 :     if( size > (Py_ssize_t)INT_MAX ) {
   44858           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44859           0 :       SWIG_fail;
   44860             :     }
   44861           4 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   44862           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44863           0 :       SWIG_fail;
   44864             :     }
   44865           4 :     arg1 = (int)size;
   44866           4 :     arg2 = (GDALRasterBandShadow**) VSIMalloc(arg1*sizeof(GDALRasterBandShadow*));
   44867           4 :     if( !arg2) {
   44868           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   44869           0 :       SWIG_fail;
   44870             :     }
   44871             :     
   44872          12 :     for( int i = 0; i<arg1; i++ ) {
   44873           8 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   44874           8 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   44875           8 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   44876           8 :       if (!rawobjectpointer) {
   44877           0 :         Py_DECREF(o);
   44878           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   44879           0 :         SWIG_fail;
   44880             :       }
   44881           8 :       arg2[i] = rawobjectpointer;
   44882           8 :       Py_DECREF(o);
   44883             :       
   44884             :     }
   44885             :   }
   44886           4 :   {
   44887           4 :     const int bLocalUseExceptions = GetUseExceptions();
   44888           4 :     if ( bLocalUseExceptions ) {
   44889           4 :       pushErrorHandler();
   44890             :     }
   44891           4 :     {
   44892           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44893           4 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MinimumOfNBands(arg1,arg2);
   44894           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44895             :     }
   44896           4 :     if ( bLocalUseExceptions ) {
   44897           4 :       popErrorHandler();
   44898             :     }
   44899             : #ifndef SED_HACKS
   44900             :     if ( bLocalUseExceptions ) {
   44901             :       CPLErr eclass = CPLGetLastErrorType();
   44902             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44903             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44904             :       }
   44905             :     }
   44906             : #endif
   44907             :   }
   44908           4 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44909           4 :   {
   44910             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44911           4 :     CPLFree( arg2 );
   44912             :   }
   44913           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; } }
   44914             :   return resultobj;
   44915           0 : fail:
   44916           0 :   {
   44917             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44918           0 :     CPLFree( arg2 );
   44919             :   }
   44920             :   return NULL;
   44921             : }
   44922             : 
   44923             : 
   44924           2 : SWIGINTERN PyObject *_wrap_Band_MinConstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44925           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44926           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44927           2 :   double arg2 ;
   44928           2 :   void *argp1 = 0 ;
   44929           2 :   int res1 = 0 ;
   44930           2 :   double val2 ;
   44931           2 :   int ecode2 = 0 ;
   44932           2 :   PyObject *swig_obj[2] ;
   44933           2 :   GDALComputedRasterBandShadow *result = 0 ;
   44934             :   
   44935           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_MinConstant", 2, 2, swig_obj)) SWIG_fail;
   44936           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44937           2 :   if (!SWIG_IsOK(res1)) {
   44938           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_MinConstant" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44939             :   }
   44940           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44941           2 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   44942           2 :   if (!SWIG_IsOK(ecode2)) {
   44943           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_MinConstant" "', argument " "2"" of type '" "double""'");
   44944             :   } 
   44945           2 :   arg2 = static_cast< double >(val2);
   44946           2 :   {
   44947           2 :     const int bLocalUseExceptions = GetUseExceptions();
   44948           2 :     if ( bLocalUseExceptions ) {
   44949           2 :       pushErrorHandler();
   44950             :     }
   44951           2 :     {
   44952           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44953           2 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MinConstant(arg1,arg2);
   44954           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44955             :     }
   44956           2 :     if ( bLocalUseExceptions ) {
   44957           2 :       popErrorHandler();
   44958             :     }
   44959             : #ifndef SED_HACKS
   44960             :     if ( bLocalUseExceptions ) {
   44961             :       CPLErr eclass = CPLGetLastErrorType();
   44962             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44963             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44964             :       }
   44965             :     }
   44966             : #endif
   44967             :   }
   44968           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44969           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; } }
   44970             :   return resultobj;
   44971             : fail:
   44972             :   return NULL;
   44973             : }
   44974             : 
   44975             : 
   44976           3 : SWIGINTERN PyObject *_wrap_Band_MeanOfNBands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44977           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44978           3 :   int arg1 ;
   44979           3 :   GDALRasterBandShadow **arg2 = (GDALRasterBandShadow **) 0 ;
   44980           3 :   PyObject *swig_obj[1] ;
   44981           3 :   GDALComputedRasterBandShadow *result = 0 ;
   44982             :   
   44983           3 :   if (!args) SWIG_fail;
   44984           3 :   swig_obj[0] = args;
   44985           3 :   {
   44986             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   44987           3 :     if ( !PySequence_Check(swig_obj[0]) ) {
   44988           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   44989           0 :       SWIG_fail;
   44990             :     }
   44991           3 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   44992           3 :     if( size > (Py_ssize_t)INT_MAX ) {
   44993           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44994           0 :       SWIG_fail;
   44995             :     }
   44996           3 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   44997           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44998           0 :       SWIG_fail;
   44999             :     }
   45000           3 :     arg1 = (int)size;
   45001           3 :     arg2 = (GDALRasterBandShadow**) VSIMalloc(arg1*sizeof(GDALRasterBandShadow*));
   45002           3 :     if( !arg2) {
   45003           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   45004           0 :       SWIG_fail;
   45005             :     }
   45006             :     
   45007           7 :     for( int i = 0; i<arg1; i++ ) {
   45008           4 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   45009           4 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   45010           4 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   45011           4 :       if (!rawobjectpointer) {
   45012           0 :         Py_DECREF(o);
   45013           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   45014           0 :         SWIG_fail;
   45015             :       }
   45016           4 :       arg2[i] = rawobjectpointer;
   45017           4 :       Py_DECREF(o);
   45018             :       
   45019             :     }
   45020             :   }
   45021           3 :   {
   45022           3 :     const int bLocalUseExceptions = GetUseExceptions();
   45023           3 :     if ( bLocalUseExceptions ) {
   45024           3 :       pushErrorHandler();
   45025             :     }
   45026           3 :     {
   45027           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45028           3 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MeanOfNBands(arg1,arg2);
   45029           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45030             :     }
   45031           3 :     if ( bLocalUseExceptions ) {
   45032           3 :       popErrorHandler();
   45033             :     }
   45034             : #ifndef SED_HACKS
   45035             :     if ( bLocalUseExceptions ) {
   45036             :       CPLErr eclass = CPLGetLastErrorType();
   45037             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45038             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45039             :       }
   45040             :     }
   45041             : #endif
   45042             :   }
   45043           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   45044           3 :   {
   45045             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   45046           3 :     CPLFree( arg2 );
   45047             :   }
   45048           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; } }
   45049             :   return resultobj;
   45050           0 : fail:
   45051           0 :   {
   45052             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   45053           0 :     CPLFree( arg2 );
   45054             :   }
   45055             :   return NULL;
   45056             : }
   45057             : 
   45058             : 
   45059       10239 : SWIGINTERN PyObject *_wrap_Band_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   45060       10239 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45061       10239 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   45062       10239 :   double arg2 ;
   45063       10239 :   double arg3 ;
   45064       10239 :   double arg4 ;
   45065       10239 :   double arg5 ;
   45066       10239 :   void **arg6 = (void **) 0 ;
   45067       10239 :   int *arg7 = (int *) 0 ;
   45068       10239 :   int *arg8 = (int *) 0 ;
   45069       10239 :   GDALDataType *arg9 = (GDALDataType *) 0 ;
   45070       10239 :   GIntBig *arg10 = (GIntBig *) 0 ;
   45071       10239 :   GIntBig *arg11 = (GIntBig *) 0 ;
   45072       10239 :   GDALRIOResampleAlg arg12 = (GDALRIOResampleAlg) GRIORA_NearestNeighbour ;
   45073       10239 :   GDALProgressFunc arg13 = (GDALProgressFunc) NULL ;
   45074       10239 :   void *arg14 = (void *) NULL ;
   45075       10239 :   void *arg15 = (void *) NULL ;
   45076       10239 :   void *argp1 = 0 ;
   45077       10239 :   int res1 = 0 ;
   45078       10239 :   double val2 ;
   45079       10239 :   int ecode2 = 0 ;
   45080       10239 :   double val3 ;
   45081       10239 :   int ecode3 = 0 ;
   45082       10239 :   double val4 ;
   45083       10239 :   int ecode4 = 0 ;
   45084       10239 :   double val5 ;
   45085       10239 :   int ecode5 = 0 ;
   45086       10239 :   void *pyObject6 = NULL ;
   45087       10239 :   int val7 ;
   45088       10239 :   int val8 ;
   45089       10239 :   GDALDataType val9 ;
   45090       10239 :   GIntBig val10 ;
   45091       10239 :   GIntBig val11 ;
   45092       10239 :   PyObject * obj0 = 0 ;
   45093       10239 :   PyObject * obj1 = 0 ;
   45094       10239 :   PyObject * obj2 = 0 ;
   45095       10239 :   PyObject * obj3 = 0 ;
   45096       10239 :   PyObject * obj4 = 0 ;
   45097       10239 :   PyObject * obj5 = 0 ;
   45098       10239 :   PyObject * obj6 = 0 ;
   45099       10239 :   PyObject * obj7 = 0 ;
   45100       10239 :   PyObject * obj8 = 0 ;
   45101       10239 :   PyObject * obj9 = 0 ;
   45102       10239 :   PyObject * obj10 = 0 ;
   45103       10239 :   PyObject * obj11 = 0 ;
   45104       10239 :   PyObject * obj12 = 0 ;
   45105       10239 :   PyObject * obj13 = 0 ;
   45106       10239 :   char * kwnames[] = {
   45107             :     (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 
   45108             :   };
   45109       10239 :   CPLErr result;
   45110             :   
   45111             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   45112       10239 :   PyProgressData *psProgressInfo;
   45113       10239 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   45114       10239 :   psProgressInfo->nLastReported = -1;
   45115       10239 :   psProgressInfo->psPyCallback = NULL;
   45116       10239 :   psProgressInfo->psPyCallbackData = NULL;
   45117       10239 :   arg14 = psProgressInfo;
   45118       10239 :   {
   45119             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   45120       10239 :     arg6 = &pyObject6;
   45121             :   }
   45122       10239 :   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;
   45123       10239 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   45124       10239 :   if (!SWIG_IsOK(res1)) {
   45125           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadRaster1" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   45126             :   }
   45127       10239 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   45128       10239 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   45129       10239 :   if (!SWIG_IsOK(ecode2)) {
   45130           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadRaster1" "', argument " "2"" of type '" "double""'");
   45131             :   } 
   45132       10239 :   arg2 = static_cast< double >(val2);
   45133       10239 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   45134       10239 :   if (!SWIG_IsOK(ecode3)) {
   45135           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadRaster1" "', argument " "3"" of type '" "double""'");
   45136             :   } 
   45137       10239 :   arg3 = static_cast< double >(val3);
   45138       10239 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   45139       10239 :   if (!SWIG_IsOK(ecode4)) {
   45140           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ReadRaster1" "', argument " "4"" of type '" "double""'");
   45141             :   } 
   45142       10239 :   arg4 = static_cast< double >(val4);
   45143       10239 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   45144       10239 :   if (!SWIG_IsOK(ecode5)) {
   45145           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ReadRaster1" "', argument " "5"" of type '" "double""'");
   45146             :   } 
   45147       10239 :   arg5 = static_cast< double >(val5);
   45148       10239 :   if (obj5) {
   45149       10239 :     {
   45150             :       /* %typemap(in) (int *optional_##int) */
   45151       10239 :       if ( obj5 == Py_None ) {
   45152             :         arg7 = 0;
   45153             :       }
   45154        1563 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   45155             :         arg7 = (int *) &val7;
   45156             :       }
   45157             :       else {
   45158           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45159           0 :         SWIG_fail;
   45160             :       }
   45161             :     }
   45162             :   }
   45163       10239 :   if (obj6) {
   45164       10239 :     {
   45165             :       /* %typemap(in) (int *optional_##int) */
   45166       10239 :       if ( obj6 == Py_None ) {
   45167             :         arg8 = 0;
   45168             :       }
   45169        1561 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   45170             :         arg8 = (int *) &val8;
   45171             :       }
   45172             :       else {
   45173           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45174           0 :         SWIG_fail;
   45175             :       }
   45176             :     }
   45177             :   }
   45178       10239 :   if (obj7) {
   45179       10239 :     {
   45180             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   45181       10239 :       int intval = 0;
   45182       10239 :       if ( obj7 == Py_None ) {
   45183             :         arg9 = NULL;
   45184             :       }
   45185        2304 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj7, &intval)) ) {
   45186        1152 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   45187             :         {
   45188           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   45189             :         }
   45190        1152 :         val9 = static_cast<GDALDataType>(intval);
   45191        1152 :         arg9 = &val9;
   45192             :       }
   45193             :       else {
   45194           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45195           0 :         SWIG_fail;
   45196             :       }
   45197             :     }
   45198             :   }
   45199       10239 :   if (obj8) {
   45200       10239 :     {
   45201             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   45202       10239 :       if ( obj8 == Py_None ) {
   45203             :         arg10 = 0;
   45204             :       }
   45205         181 :       else if ( PyArg_Parse( obj8,"L" ,&val10 ) ) {
   45206             :         arg10 = (GIntBig *) &val10;
   45207             :       }
   45208             :       else {
   45209           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45210           0 :         SWIG_fail;
   45211             :       }
   45212             :     }
   45213             :   }
   45214       10239 :   if (obj9) {
   45215       10239 :     {
   45216             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   45217       10239 :       if ( obj9 == Py_None ) {
   45218             :         arg11 = 0;
   45219             :       }
   45220          36 :       else if ( PyArg_Parse( obj9,"L" ,&val11 ) ) {
   45221             :         arg11 = (GIntBig *) &val11;
   45222             :       }
   45223             :       else {
   45224           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45225           0 :         SWIG_fail;
   45226             :       }
   45227             :     }
   45228             :   }
   45229       10239 :   if (obj10) {
   45230       10239 :     {
   45231             :       // %typemap(in) GDALRIOResampleAlg
   45232       10239 :       int val = 0;
   45233       10239 :       int ecode = SWIG_AsVal_int(obj10, &val);
   45234       10239 :       if (!SWIG_IsOK(ecode)) {
   45235           1 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   45236             :       }
   45237       10238 :       if( val < 0 ||
   45238       10237 :         ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   45239       10236 :           val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   45240             :         val > static_cast<int>(GRIORA_LAST) )
   45241             :       {
   45242           2 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   45243             :       }
   45244             :       arg12 = static_cast< GDALRIOResampleAlg >(val);
   45245             :     }
   45246             :   }
   45247       10236 :   if (obj11) {
   45248       10236 :     {
   45249             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   45250             :       /* callback_func typemap */
   45251             :       
   45252             :       /* In some cases 0 is passed instead of None. */
   45253             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   45254       10236 :       if ( PyLong_Check(obj11) || PyInt_Check(obj11) )
   45255             :       {
   45256           0 :         if( PyLong_AsLong(obj11) == 0 )
   45257             :         {
   45258           0 :           obj11 = Py_None;
   45259             :         }
   45260             :       }
   45261             :       
   45262       10236 :       if (obj11 && obj11 != Py_None ) {
   45263          19 :         void* cbfunction = NULL;
   45264          19 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj11,
   45265             :             (void**)&cbfunction,
   45266             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   45267             :             SWIG_POINTER_EXCEPTION | 0 ));
   45268             :         
   45269          19 :         if ( cbfunction == GDALTermProgress ) {
   45270             :           arg13 = GDALTermProgress;
   45271             :         } else {
   45272          19 :           if (!PyCallable_Check(obj11)) {
   45273           0 :             PyErr_SetString( PyExc_RuntimeError,
   45274             :               "Object given is not a Python function" );
   45275           0 :             SWIG_fail;
   45276             :           }
   45277          19 :           psProgressInfo->psPyCallback = obj11;
   45278          19 :           arg13 = PyProgressProxy;
   45279             :         }
   45280             :         
   45281             :       }
   45282             :       
   45283             :     }
   45284             :   }
   45285       10236 :   if (obj12) {
   45286       10236 :     {
   45287             :       /* %typemap(in) ( void* callback_data=NULL)  */
   45288       10236 :       psProgressInfo->psPyCallbackData = obj12 ;
   45289             :     }
   45290             :   }
   45291       10236 :   if (obj13) {
   45292       10236 :     {
   45293             :       /* %typemap(in) ( void *inPythonObject ) */
   45294       10236 :       arg15 = obj13;
   45295             :     }
   45296             :   }
   45297       10236 :   {
   45298       10236 :     const int bLocalUseExceptions = GetUseExceptions();
   45299       10236 :     if ( bLocalUseExceptions ) {
   45300        4837 :       pushErrorHandler();
   45301             :     }
   45302       10236 :     {
   45303       10236 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45304       10236 :       result = (CPLErr)GDALRasterBandShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   45305       10236 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45306             :     }
   45307       10236 :     if ( bLocalUseExceptions ) {
   45308        4837 :       popErrorHandler();
   45309             :     }
   45310             : #ifndef SED_HACKS
   45311             :     if ( bLocalUseExceptions ) {
   45312             :       CPLErr eclass = CPLGetLastErrorType();
   45313             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45314             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45315             :       }
   45316             :     }
   45317             : #endif
   45318             :   }
   45319       10236 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45320       10236 :   {
   45321             :     /* %typemap(argout) ( void **outPythonObject ) */
   45322       10236 :     Py_XDECREF(resultobj);
   45323       10236 :     if (*arg6)
   45324             :     {
   45325             :       resultobj = (PyObject*)*arg6;
   45326             :     }
   45327             :     else
   45328             :     {
   45329          50 :       resultobj = Py_None;
   45330          50 :       Py_INCREF(resultobj);
   45331             :     }
   45332             :   }
   45333       10236 :   {
   45334             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   45335             :     
   45336       10236 :     CPLFree(psProgressInfo);
   45337             :     
   45338             :   }
   45339       10251 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45340             :   return resultobj;
   45341           3 : fail:
   45342           3 :   {
   45343             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   45344             :     
   45345           3 :     CPLFree(psProgressInfo);
   45346             :     
   45347             :   }
   45348             :   return NULL;
   45349             : }
   45350             : 
   45351             : 
   45352          90 : SWIGINTERN PyObject *_wrap_Band_ReadBlock(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   45353          90 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45354          90 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   45355          90 :   int arg2 ;
   45356          90 :   int arg3 ;
   45357          90 :   void **arg4 = (void **) 0 ;
   45358          90 :   void *arg5 = (void *) NULL ;
   45359          90 :   void *argp1 = 0 ;
   45360          90 :   int res1 = 0 ;
   45361          90 :   int val2 ;
   45362          90 :   int ecode2 = 0 ;
   45363          90 :   int val3 ;
   45364          90 :   int ecode3 = 0 ;
   45365          90 :   void *pyObject4 = NULL ;
   45366          90 :   PyObject * obj0 = 0 ;
   45367          90 :   PyObject * obj1 = 0 ;
   45368          90 :   PyObject * obj2 = 0 ;
   45369          90 :   PyObject * obj3 = 0 ;
   45370          90 :   char * kwnames[] = {
   45371             :     (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"buf_obj",  NULL 
   45372             :   };
   45373          90 :   CPLErr result;
   45374             :   
   45375          90 :   {
   45376             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject4 = NULL ) */
   45377          90 :     arg4 = &pyObject4;
   45378             :   }
   45379          90 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:Band_ReadBlock", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   45380          90 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   45381          90 :   if (!SWIG_IsOK(res1)) {
   45382           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadBlock" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   45383             :   }
   45384          90 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   45385          90 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   45386          90 :   if (!SWIG_IsOK(ecode2)) {
   45387           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadBlock" "', argument " "2"" of type '" "int""'");
   45388             :   } 
   45389          90 :   arg2 = static_cast< int >(val2);
   45390          90 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   45391          90 :   if (!SWIG_IsOK(ecode3)) {
   45392           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadBlock" "', argument " "3"" of type '" "int""'");
   45393             :   } 
   45394          90 :   arg3 = static_cast< int >(val3);
   45395          90 :   if (obj3) {
   45396          25 :     {
   45397             :       /* %typemap(in) ( void *inPythonObject ) */
   45398          25 :       arg5 = obj3;
   45399             :     }
   45400             :   }
   45401          90 :   {
   45402          90 :     const int bLocalUseExceptions = GetUseExceptions();
   45403          90 :     if ( bLocalUseExceptions ) {
   45404          34 :       pushErrorHandler();
   45405             :     }
   45406          90 :     {
   45407          90 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45408          90 :       result = (CPLErr)GDALRasterBandShadow_ReadBlock(arg1,arg2,arg3,arg4,arg5);
   45409          90 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45410             :     }
   45411          90 :     if ( bLocalUseExceptions ) {
   45412          34 :       popErrorHandler();
   45413             :     }
   45414             : #ifndef SED_HACKS
   45415             :     if ( bLocalUseExceptions ) {
   45416             :       CPLErr eclass = CPLGetLastErrorType();
   45417             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45418             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45419             :       }
   45420             :     }
   45421             : #endif
   45422             :   }
   45423          90 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45424          90 :   {
   45425             :     /* %typemap(argout) ( void **outPythonObject ) */
   45426          90 :     Py_XDECREF(resultobj);
   45427          90 :     if (*arg4)
   45428             :     {
   45429             :       resultobj = (PyObject*)*arg4;
   45430             :     }
   45431             :     else
   45432             :     {
   45433          16 :       resultobj = Py_None;
   45434          16 :       Py_INCREF(resultobj);
   45435             :     }
   45436             :   }
   45437          90 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45438             :   return resultobj;
   45439             : fail:
   45440             :   return NULL;
   45441             : }
   45442             : 
   45443             : 
   45444         277 : SWIGINTERN PyObject *Band_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45445         277 :   PyObject *obj;
   45446         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   45447         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterBandShadow, SWIG_NewClientData(obj));
   45448         277 :   return SWIG_Py_Void();
   45449             : }
   45450             : 
   45451         163 : SWIGINTERN PyObject *_wrap_delete_ComputedBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45452         163 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45453         163 :   GDALComputedRasterBandShadow *arg1 = (GDALComputedRasterBandShadow *) 0 ;
   45454         163 :   void *argp1 = 0 ;
   45455         163 :   int res1 = 0 ;
   45456         163 :   PyObject *swig_obj[1] ;
   45457             :   
   45458         163 :   if (!args) SWIG_fail;
   45459         163 :   swig_obj[0] = args;
   45460         163 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_DISOWN |  0 );
   45461         163 :   if (!SWIG_IsOK(res1)) {
   45462           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ComputedBand" "', argument " "1"" of type '" "GDALComputedRasterBandShadow *""'"); 
   45463             :   }
   45464         163 :   arg1 = reinterpret_cast< GDALComputedRasterBandShadow * >(argp1);
   45465         163 :   {
   45466         163 :     const int bLocalUseExceptions = GetUseExceptions();
   45467         163 :     if ( bLocalUseExceptions ) {
   45468         163 :       pushErrorHandler();
   45469             :     }
   45470         163 :     {
   45471         163 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45472         163 :       delete_GDALComputedRasterBandShadow(arg1);
   45473         163 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45474             :     }
   45475         163 :     if ( bLocalUseExceptions ) {
   45476         163 :       popErrorHandler();
   45477             :     }
   45478             : #ifndef SED_HACKS
   45479             :     if ( bLocalUseExceptions ) {
   45480             :       CPLErr eclass = CPLGetLastErrorType();
   45481             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45482             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45483             :       }
   45484             :     }
   45485             : #endif
   45486             :   }
   45487         163 :   resultobj = SWIG_Py_Void();
   45488         163 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45489             :   return resultobj;
   45490             : fail:
   45491             :   return NULL;
   45492             : }
   45493             : 
   45494             : 
   45495         277 : SWIGINTERN PyObject *ComputedBand_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45496         277 :   PyObject *obj;
   45497         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   45498         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_NewClientData(obj));
   45499         277 :   return SWIG_Py_Void();
   45500             : }
   45501             : 
   45502          56 : SWIGINTERN PyObject *_wrap_new_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   45503          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45504          56 :   GDALPaletteInterp arg1 = (GDALPaletteInterp) GPI_RGB ;
   45505          56 :   int val1 ;
   45506          56 :   int ecode1 = 0 ;
   45507          56 :   PyObject * obj0 = 0 ;
   45508          56 :   char * kwnames[] = {
   45509             :     (char *)"palette",  NULL 
   45510             :   };
   45511          56 :   GDALColorTableShadow *result = 0 ;
   45512             :   
   45513          56 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:new_ColorTable", kwnames, &obj0)) SWIG_fail;
   45514          56 :   if (obj0) {
   45515           0 :     ecode1 = SWIG_AsVal_int(obj0, &val1);
   45516           0 :     if (!SWIG_IsOK(ecode1)) {
   45517           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ColorTable" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   45518             :     } 
   45519           0 :     arg1 = static_cast< GDALPaletteInterp >(val1);
   45520             :   }
   45521          56 :   {
   45522          56 :     const int bLocalUseExceptions = GetUseExceptions();
   45523          56 :     if ( bLocalUseExceptions ) {
   45524          28 :       pushErrorHandler();
   45525             :     }
   45526          56 :     {
   45527          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45528          56 :       result = (GDALColorTableShadow *)new_GDALColorTableShadow(arg1);
   45529          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45530             :     }
   45531          56 :     if ( bLocalUseExceptions ) {
   45532          28 :       popErrorHandler();
   45533             :     }
   45534             : #ifndef SED_HACKS
   45535             :     if ( bLocalUseExceptions ) {
   45536             :       CPLErr eclass = CPLGetLastErrorType();
   45537             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45538             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45539             :       }
   45540             :     }
   45541             : #endif
   45542             :   }
   45543          56 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_NEW |  0 );
   45544          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; } }
   45545             :   return resultobj;
   45546             : fail:
   45547             :   return NULL;
   45548             : }
   45549             : 
   45550             : 
   45551          68 : SWIGINTERN PyObject *_wrap_delete_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45552          68 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45553          68 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45554          68 :   void *argp1 = 0 ;
   45555          68 :   int res1 = 0 ;
   45556          68 :   PyObject *swig_obj[1] ;
   45557             :   
   45558          68 :   if (!args) SWIG_fail;
   45559          68 :   swig_obj[0] = args;
   45560          68 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_DISOWN |  0 );
   45561          68 :   if (!SWIG_IsOK(res1)) {
   45562           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ColorTable" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45563             :   }
   45564          68 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45565          68 :   {
   45566          68 :     const int bLocalUseExceptions = GetUseExceptions();
   45567          68 :     if ( bLocalUseExceptions ) {
   45568          36 :       pushErrorHandler();
   45569             :     }
   45570          68 :     {
   45571          68 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45572          68 :       delete_GDALColorTableShadow(arg1);
   45573          68 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45574             :     }
   45575          68 :     if ( bLocalUseExceptions ) {
   45576          36 :       popErrorHandler();
   45577             :     }
   45578             : #ifndef SED_HACKS
   45579             :     if ( bLocalUseExceptions ) {
   45580             :       CPLErr eclass = CPLGetLastErrorType();
   45581             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45582             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45583             :       }
   45584             :     }
   45585             : #endif
   45586             :   }
   45587          68 :   resultobj = SWIG_Py_Void();
   45588          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; } }
   45589             :   return resultobj;
   45590             : fail:
   45591             :   return NULL;
   45592             : }
   45593             : 
   45594             : 
   45595          12 : SWIGINTERN PyObject *_wrap_ColorTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45596          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45597          12 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45598          12 :   void *argp1 = 0 ;
   45599          12 :   int res1 = 0 ;
   45600          12 :   PyObject *swig_obj[1] ;
   45601          12 :   GDALColorTableShadow *result = 0 ;
   45602             :   
   45603          12 :   if (!args) SWIG_fail;
   45604          12 :   swig_obj[0] = args;
   45605          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45606          12 :   if (!SWIG_IsOK(res1)) {
   45607           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_Clone" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45608             :   }
   45609          12 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45610          12 :   {
   45611          12 :     const int bLocalUseExceptions = GetUseExceptions();
   45612          12 :     if ( bLocalUseExceptions ) {
   45613           8 :       pushErrorHandler();
   45614             :     }
   45615          12 :     {
   45616          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45617          12 :       result = (GDALColorTableShadow *)GDALColorTableShadow_Clone(arg1);
   45618          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45619             :     }
   45620          12 :     if ( bLocalUseExceptions ) {
   45621           8 :       popErrorHandler();
   45622             :     }
   45623             : #ifndef SED_HACKS
   45624             :     if ( bLocalUseExceptions ) {
   45625             :       CPLErr eclass = CPLGetLastErrorType();
   45626             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45627             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45628             :       }
   45629             :     }
   45630             : #endif
   45631             :   }
   45632          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_OWN |  0 );
   45633          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; } }
   45634             :   return resultobj;
   45635             : fail:
   45636             :   return NULL;
   45637             : }
   45638             : 
   45639             : 
   45640           2 : SWIGINTERN PyObject *_wrap_ColorTable_GetPaletteInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45641           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45642           2 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45643           2 :   void *argp1 = 0 ;
   45644           2 :   int res1 = 0 ;
   45645           2 :   PyObject *swig_obj[1] ;
   45646           2 :   GDALPaletteInterp result;
   45647             :   
   45648           2 :   if (!args) SWIG_fail;
   45649           2 :   swig_obj[0] = args;
   45650           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45651           2 :   if (!SWIG_IsOK(res1)) {
   45652           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetPaletteInterpretation" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45653             :   }
   45654           2 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45655           2 :   {
   45656           2 :     const int bLocalUseExceptions = GetUseExceptions();
   45657           2 :     if ( bLocalUseExceptions ) {
   45658           0 :       pushErrorHandler();
   45659             :     }
   45660           2 :     {
   45661           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45662           2 :       result = (GDALPaletteInterp)GDALColorTableShadow_GetPaletteInterpretation(arg1);
   45663           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45664             :     }
   45665           2 :     if ( bLocalUseExceptions ) {
   45666           0 :       popErrorHandler();
   45667             :     }
   45668             : #ifndef SED_HACKS
   45669             :     if ( bLocalUseExceptions ) {
   45670             :       CPLErr eclass = CPLGetLastErrorType();
   45671             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45672             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45673             :       }
   45674             :     }
   45675             : #endif
   45676             :   }
   45677           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45678           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; } }
   45679             :   return resultobj;
   45680             : fail:
   45681             :   return NULL;
   45682             : }
   45683             : 
   45684             : 
   45685          73 : SWIGINTERN PyObject *_wrap_ColorTable_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45686          73 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45687          73 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45688          73 :   void *argp1 = 0 ;
   45689          73 :   int res1 = 0 ;
   45690          73 :   PyObject *swig_obj[1] ;
   45691          73 :   int result;
   45692             :   
   45693          73 :   if (!args) SWIG_fail;
   45694          73 :   swig_obj[0] = args;
   45695          73 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45696          73 :   if (!SWIG_IsOK(res1)) {
   45697           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetCount" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45698             :   }
   45699          73 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45700          73 :   {
   45701          73 :     const int bLocalUseExceptions = GetUseExceptions();
   45702          73 :     if ( bLocalUseExceptions ) {
   45703          52 :       pushErrorHandler();
   45704             :     }
   45705          73 :     {
   45706          73 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45707          73 :       result = (int)GDALColorTableShadow_GetColorEntryCount(arg1);
   45708          73 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45709             :     }
   45710          73 :     if ( bLocalUseExceptions ) {
   45711          52 :       popErrorHandler();
   45712             :     }
   45713             : #ifndef SED_HACKS
   45714             :     if ( bLocalUseExceptions ) {
   45715             :       CPLErr eclass = CPLGetLastErrorType();
   45716             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45717             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45718             :       }
   45719             :     }
   45720             : #endif
   45721             :   }
   45722          73 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45723          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; } }
   45724             :   return resultobj;
   45725             : fail:
   45726             :   return NULL;
   45727             : }
   45728             : 
   45729             : 
   45730        4719 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45731        4719 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45732        4719 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45733        4719 :   int arg2 ;
   45734        4719 :   void *argp1 = 0 ;
   45735        4719 :   int res1 = 0 ;
   45736        4719 :   int val2 ;
   45737        4719 :   int ecode2 = 0 ;
   45738        4719 :   PyObject *swig_obj[2] ;
   45739        4719 :   GDALColorEntry *result = 0 ;
   45740             :   
   45741        4719 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_GetColorEntry", 2, 2, swig_obj)) SWIG_fail;
   45742        4719 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45743        4719 :   if (!SWIG_IsOK(res1)) {
   45744           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45745             :   }
   45746        4719 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45747        4719 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   45748        4719 :   if (!SWIG_IsOK(ecode2)) {
   45749           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntry" "', argument " "2"" of type '" "int""'");
   45750             :   } 
   45751        4719 :   arg2 = static_cast< int >(val2);
   45752        4719 :   {
   45753        4719 :     const int bLocalUseExceptions = GetUseExceptions();
   45754        4719 :     if ( bLocalUseExceptions ) {
   45755        4634 :       pushErrorHandler();
   45756             :     }
   45757        4719 :     {
   45758        4719 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45759        4719 :       result = (GDALColorEntry *)GDALColorTableShadow_GetColorEntry(arg1,arg2);
   45760        4719 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45761             :     }
   45762        4719 :     if ( bLocalUseExceptions ) {
   45763        4634 :       popErrorHandler();
   45764             :     }
   45765             : #ifndef SED_HACKS
   45766             :     if ( bLocalUseExceptions ) {
   45767             :       CPLErr eclass = CPLGetLastErrorType();
   45768             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45769             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45770             :       }
   45771             :     }
   45772             : #endif
   45773             :   }
   45774        4719 :   {
   45775             :     /* %typemap(out) GDALColorEntry* */
   45776        4719 :     if ( result != NULL )
   45777        4719 :     resultobj = Py_BuildValue( "(hhhh)", (*result).c1,(*result).c2,(*result).c3,(*result).c4);
   45778             :     else
   45779             :     resultobj = NULL;
   45780             :   }
   45781        4719 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45782             :   return resultobj;
   45783             : fail:
   45784             :   return NULL;
   45785             : }
   45786             : 
   45787             : 
   45788           0 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntryAsRGB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45789           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45790           0 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45791           0 :   int arg2 ;
   45792           0 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   45793           0 :   void *argp1 = 0 ;
   45794           0 :   int res1 = 0 ;
   45795           0 :   int val2 ;
   45796           0 :   int ecode2 = 0 ;
   45797           0 :   GDALColorEntry ce3 ;
   45798           0 :   PyObject *swig_obj[3] ;
   45799           0 :   int result;
   45800             :   
   45801           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_GetColorEntryAsRGB", 3, 3, swig_obj)) SWIG_fail;
   45802           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45803           0 :   if (!SWIG_IsOK(res1)) {
   45804           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45805             :   }
   45806           0 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45807           0 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   45808           0 :   if (!SWIG_IsOK(ecode2)) {
   45809           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "2"" of type '" "int""'");
   45810             :   } 
   45811           0 :   arg2 = static_cast< int >(val2);
   45812           0 :   {
   45813             :     /* %typemap(in) GDALColorEntry* */
   45814           0 :     ce3.c4 = 255;
   45815           0 :     if (! PySequence_Check(swig_obj[2]) ) {
   45816           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   45817           0 :       SWIG_fail;
   45818             :     }
   45819           0 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   45820           0 :     if ( size > 4 ) {
   45821           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   45822           0 :       SWIG_fail;
   45823             :     }
   45824           0 :     if ( size < 3 ) {
   45825           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   45826           0 :       SWIG_fail;
   45827             :     }
   45828           0 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   45829           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   45830           0 :       SWIG_fail;
   45831             :     }
   45832           0 :     arg3 = &ce3;
   45833             :   }
   45834           0 :   {
   45835           0 :     const int bLocalUseExceptions = GetUseExceptions();
   45836           0 :     if ( bLocalUseExceptions ) {
   45837           0 :       pushErrorHandler();
   45838             :     }
   45839           0 :     {
   45840           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45841           0 :       result = (int)GDALColorTableShadow_GetColorEntryAsRGB(arg1,arg2,arg3);
   45842           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45843             :     }
   45844           0 :     if ( bLocalUseExceptions ) {
   45845           0 :       popErrorHandler();
   45846             :     }
   45847             : #ifndef SED_HACKS
   45848             :     if ( bLocalUseExceptions ) {
   45849             :       CPLErr eclass = CPLGetLastErrorType();
   45850             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45851             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45852             :       }
   45853             :     }
   45854             : #endif
   45855             :   }
   45856           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45857           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; } }
   45858             :   return resultobj;
   45859             : fail:
   45860             :   return NULL;
   45861             : }
   45862             : 
   45863             : 
   45864        1379 : SWIGINTERN PyObject *_wrap_ColorTable_SetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45865        1379 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45866        1379 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45867        1379 :   int arg2 ;
   45868        1379 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   45869        1379 :   void *argp1 = 0 ;
   45870        1379 :   int res1 = 0 ;
   45871        1379 :   int val2 ;
   45872        1379 :   int ecode2 = 0 ;
   45873        1379 :   GDALColorEntry ce3 ;
   45874        1379 :   PyObject *swig_obj[3] ;
   45875             :   
   45876        1379 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_SetColorEntry", 3, 3, swig_obj)) SWIG_fail;
   45877        1379 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45878        1379 :   if (!SWIG_IsOK(res1)) {
   45879           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_SetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45880             :   }
   45881        1379 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45882        1379 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   45883        1379 :   if (!SWIG_IsOK(ecode2)) {
   45884           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_SetColorEntry" "', argument " "2"" of type '" "int""'");
   45885             :   } 
   45886        1379 :   arg2 = static_cast< int >(val2);
   45887        1379 :   {
   45888             :     /* %typemap(in) GDALColorEntry* */
   45889        1379 :     ce3.c4 = 255;
   45890        1379 :     if (! PySequence_Check(swig_obj[2]) ) {
   45891           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   45892           0 :       SWIG_fail;
   45893             :     }
   45894        1379 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   45895        1379 :     if ( size > 4 ) {
   45896           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   45897           0 :       SWIG_fail;
   45898             :     }
   45899        1379 :     if ( size < 3 ) {
   45900           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   45901           0 :       SWIG_fail;
   45902             :     }
   45903        1379 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   45904           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   45905           0 :       SWIG_fail;
   45906             :     }
   45907        1379 :     arg3 = &ce3;
   45908             :   }
   45909        1379 :   {
   45910        1379 :     const int bLocalUseExceptions = GetUseExceptions();
   45911        1379 :     if ( bLocalUseExceptions ) {
   45912        1313 :       pushErrorHandler();
   45913             :     }
   45914        1379 :     {
   45915        1379 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45916        1379 :       GDALColorTableShadow_SetColorEntry(arg1,arg2,(GDALColorEntry const *)arg3);
   45917        1379 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45918             :     }
   45919        1379 :     if ( bLocalUseExceptions ) {
   45920        1313 :       popErrorHandler();
   45921             :     }
   45922             : #ifndef SED_HACKS
   45923             :     if ( bLocalUseExceptions ) {
   45924             :       CPLErr eclass = CPLGetLastErrorType();
   45925             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45926             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45927             :       }
   45928             :     }
   45929             : #endif
   45930             :   }
   45931        1379 :   resultobj = SWIG_Py_Void();
   45932        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; } }
   45933             :   return resultobj;
   45934             : fail:
   45935             :   return NULL;
   45936             : }
   45937             : 
   45938             : 
   45939           1 : SWIGINTERN PyObject *_wrap_ColorTable_CreateColorRamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45940           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45941           1 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45942           1 :   int arg2 ;
   45943           1 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   45944           1 :   int arg4 ;
   45945           1 :   GDALColorEntry *arg5 = (GDALColorEntry *) 0 ;
   45946           1 :   void *argp1 = 0 ;
   45947           1 :   int res1 = 0 ;
   45948           1 :   int val2 ;
   45949           1 :   int ecode2 = 0 ;
   45950           1 :   GDALColorEntry ce3 ;
   45951           1 :   int val4 ;
   45952           1 :   int ecode4 = 0 ;
   45953           1 :   GDALColorEntry ce5 ;
   45954           1 :   PyObject *swig_obj[5] ;
   45955             :   
   45956           1 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_CreateColorRamp", 5, 5, swig_obj)) SWIG_fail;
   45957           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45958           1 :   if (!SWIG_IsOK(res1)) {
   45959           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_CreateColorRamp" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45960             :   }
   45961           1 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45962           1 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   45963           1 :   if (!SWIG_IsOK(ecode2)) {
   45964           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_CreateColorRamp" "', argument " "2"" of type '" "int""'");
   45965             :   } 
   45966           1 :   arg2 = static_cast< int >(val2);
   45967           1 :   {
   45968             :     /* %typemap(in) GDALColorEntry* */
   45969           1 :     ce3.c4 = 255;
   45970           1 :     if (! PySequence_Check(swig_obj[2]) ) {
   45971           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   45972           0 :       SWIG_fail;
   45973             :     }
   45974           1 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   45975           1 :     if ( size > 4 ) {
   45976           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   45977           0 :       SWIG_fail;
   45978             :     }
   45979           1 :     if ( size < 3 ) {
   45980           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   45981           0 :       SWIG_fail;
   45982             :     }
   45983           1 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   45984           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   45985           0 :       SWIG_fail;
   45986             :     }
   45987           1 :     arg3 = &ce3;
   45988             :   }
   45989           1 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   45990           1 :   if (!SWIG_IsOK(ecode4)) {
   45991           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ColorTable_CreateColorRamp" "', argument " "4"" of type '" "int""'");
   45992             :   } 
   45993           1 :   arg4 = static_cast< int >(val4);
   45994           1 :   {
   45995             :     /* %typemap(in) GDALColorEntry* */
   45996           1 :     ce5.c4 = 255;
   45997           1 :     if (! PySequence_Check(swig_obj[4]) ) {
   45998           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   45999           0 :       SWIG_fail;
   46000             :     }
   46001           1 :     Py_ssize_t size = PySequence_Size(swig_obj[4]);
   46002           1 :     if ( size > 4 ) {
   46003           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   46004           0 :       SWIG_fail;
   46005             :     }
   46006           1 :     if ( size < 3 ) {
   46007           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   46008           0 :       SWIG_fail;
   46009             :     }
   46010           1 :     if ( !PyArg_ParseTuple( swig_obj[4],"hhh|h", &ce5.c1, &ce5.c2, &ce5.c3, &ce5.c4 ) ) {
   46011           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   46012           0 :       SWIG_fail;
   46013             :     }
   46014           1 :     arg5 = &ce5;
   46015             :   }
   46016           1 :   {
   46017           1 :     const int bLocalUseExceptions = GetUseExceptions();
   46018           1 :     if ( bLocalUseExceptions ) {
   46019           1 :       pushErrorHandler();
   46020             :     }
   46021           1 :     {
   46022           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46023           1 :       GDALColorTableShadow_CreateColorRamp(arg1,arg2,(GDALColorEntry const *)arg3,arg4,(GDALColorEntry const *)arg5);
   46024           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46025             :     }
   46026           1 :     if ( bLocalUseExceptions ) {
   46027           1 :       popErrorHandler();
   46028             :     }
   46029             : #ifndef SED_HACKS
   46030             :     if ( bLocalUseExceptions ) {
   46031             :       CPLErr eclass = CPLGetLastErrorType();
   46032             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46033             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46034             :       }
   46035             :     }
   46036             : #endif
   46037             :   }
   46038           1 :   resultobj = SWIG_Py_Void();
   46039           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; } }
   46040             :   return resultobj;
   46041             : fail:
   46042             :   return NULL;
   46043             : }
   46044             : 
   46045             : 
   46046         277 : SWIGINTERN PyObject *ColorTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46047         277 :   PyObject *obj;
   46048         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   46049         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorTableShadow, SWIG_NewClientData(obj));
   46050         277 :   return SWIG_Py_Void();
   46051             : }
   46052             : 
   46053          56 : SWIGINTERN PyObject *ColorTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46054          56 :   return SWIG_Python_InitShadowInstance(args);
   46055             : }
   46056             : 
   46057          60 : SWIGINTERN PyObject *_wrap_delete_SubdatasetInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46058          60 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46059          60 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   46060          60 :   void *argp1 = 0 ;
   46061          60 :   int res1 = 0 ;
   46062          60 :   PyObject *swig_obj[1] ;
   46063             :   
   46064          60 :   if (!args) SWIG_fail;
   46065          60 :   swig_obj[0] = args;
   46066          60 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, SWIG_POINTER_DISOWN |  0 );
   46067          60 :   if (!SWIG_IsOK(res1)) {
   46068           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SubdatasetInfo" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   46069             :   }
   46070          60 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   46071          60 :   {
   46072          60 :     const int bLocalUseExceptions = GetUseExceptions();
   46073          60 :     if ( bLocalUseExceptions ) {
   46074          36 :       pushErrorHandler();
   46075             :     }
   46076          60 :     {
   46077          60 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46078          60 :       delete_GDALSubdatasetInfoShadow(arg1);
   46079          60 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46080             :     }
   46081          60 :     if ( bLocalUseExceptions ) {
   46082          36 :       popErrorHandler();
   46083             :     }
   46084             : #ifndef SED_HACKS
   46085             :     if ( bLocalUseExceptions ) {
   46086             :       CPLErr eclass = CPLGetLastErrorType();
   46087             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46088             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46089             :       }
   46090             :     }
   46091             : #endif
   46092             :   }
   46093          60 :   resultobj = SWIG_Py_Void();
   46094          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; } }
   46095             :   return resultobj;
   46096             : fail:
   46097             :   return NULL;
   46098             : }
   46099             : 
   46100             : 
   46101          35 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_GetPathComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46102          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46103          35 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   46104          35 :   void *argp1 = 0 ;
   46105          35 :   int res1 = 0 ;
   46106          35 :   PyObject *swig_obj[1] ;
   46107          35 :   retStringAndCPLFree *result = 0 ;
   46108             :   
   46109          35 :   if (!args) SWIG_fail;
   46110          35 :   swig_obj[0] = args;
   46111          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   46112          35 :   if (!SWIG_IsOK(res1)) {
   46113           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_GetPathComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   46114             :   }
   46115          35 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   46116          35 :   {
   46117          35 :     const int bLocalUseExceptions = GetUseExceptions();
   46118          35 :     if ( bLocalUseExceptions ) {
   46119          19 :       pushErrorHandler();
   46120             :     }
   46121          35 :     {
   46122          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46123          35 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_GetPathComponent(arg1);
   46124          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46125             :     }
   46126          35 :     if ( bLocalUseExceptions ) {
   46127          19 :       popErrorHandler();
   46128             :     }
   46129             : #ifndef SED_HACKS
   46130             :     if ( bLocalUseExceptions ) {
   46131             :       CPLErr eclass = CPLGetLastErrorType();
   46132             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46133             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46134             :       }
   46135             :     }
   46136             : #endif
   46137             :   }
   46138          35 :   {
   46139             :     /* %typemap(out) (retStringAndCPLFree*) */
   46140          35 :     Py_XDECREF(resultobj);
   46141          35 :     if(result)
   46142             :     {
   46143          35 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   46144          35 :       CPLFree(result);
   46145             :     }
   46146             :     else
   46147             :     {
   46148           0 :       resultobj = Py_None;
   46149           0 :       Py_INCREF(resultobj);
   46150             :     }
   46151             :   }
   46152          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; } }
   46153             :   return resultobj;
   46154             : fail:
   46155             :   return NULL;
   46156             : }
   46157             : 
   46158             : 
   46159          39 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_GetSubdatasetComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46160          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46161          39 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   46162          39 :   void *argp1 = 0 ;
   46163          39 :   int res1 = 0 ;
   46164          39 :   PyObject *swig_obj[1] ;
   46165          39 :   retStringAndCPLFree *result = 0 ;
   46166             :   
   46167          39 :   if (!args) SWIG_fail;
   46168          39 :   swig_obj[0] = args;
   46169          39 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   46170          39 :   if (!SWIG_IsOK(res1)) {
   46171           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_GetSubdatasetComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   46172             :   }
   46173          39 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   46174          39 :   {
   46175          39 :     const int bLocalUseExceptions = GetUseExceptions();
   46176          39 :     if ( bLocalUseExceptions ) {
   46177          23 :       pushErrorHandler();
   46178             :     }
   46179          39 :     {
   46180          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46181          39 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_GetSubdatasetComponent(arg1);
   46182          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46183             :     }
   46184          39 :     if ( bLocalUseExceptions ) {
   46185          23 :       popErrorHandler();
   46186             :     }
   46187             : #ifndef SED_HACKS
   46188             :     if ( bLocalUseExceptions ) {
   46189             :       CPLErr eclass = CPLGetLastErrorType();
   46190             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46191             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46192             :       }
   46193             :     }
   46194             : #endif
   46195             :   }
   46196          39 :   {
   46197             :     /* %typemap(out) (retStringAndCPLFree*) */
   46198          39 :     Py_XDECREF(resultobj);
   46199          39 :     if(result)
   46200             :     {
   46201          39 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   46202          39 :       CPLFree(result);
   46203             :     }
   46204             :     else
   46205             :     {
   46206           0 :       resultobj = Py_None;
   46207           0 :       Py_INCREF(resultobj);
   46208             :     }
   46209             :   }
   46210          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; } }
   46211             :   return resultobj;
   46212             : fail:
   46213             :   return NULL;
   46214             : }
   46215             : 
   46216             : 
   46217          21 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_ModifyPathComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46218          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46219          21 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   46220          21 :   char *arg2 = (char *) 0 ;
   46221          21 :   void *argp1 = 0 ;
   46222          21 :   int res1 = 0 ;
   46223          21 :   int res2 ;
   46224          21 :   char *buf2 = 0 ;
   46225          21 :   int alloc2 = 0 ;
   46226          21 :   PyObject *swig_obj[2] ;
   46227          21 :   retStringAndCPLFree *result = 0 ;
   46228             :   
   46229          21 :   if (!SWIG_Python_UnpackTuple(args, "SubdatasetInfo_ModifyPathComponent", 2, 2, swig_obj)) SWIG_fail;
   46230          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   46231          21 :   if (!SWIG_IsOK(res1)) {
   46232           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_ModifyPathComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   46233             :   }
   46234          21 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   46235          21 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   46236          21 :   if (!SWIG_IsOK(res2)) {
   46237           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SubdatasetInfo_ModifyPathComponent" "', argument " "2"" of type '" "char const *""'");
   46238             :   }
   46239          21 :   arg2 = reinterpret_cast< char * >(buf2);
   46240          21 :   {
   46241          21 :     const int bLocalUseExceptions = GetUseExceptions();
   46242          21 :     if ( bLocalUseExceptions ) {
   46243          11 :       pushErrorHandler();
   46244             :     }
   46245          21 :     {
   46246          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46247          21 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_ModifyPathComponent(arg1,(char const *)arg2);
   46248          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46249             :     }
   46250          21 :     if ( bLocalUseExceptions ) {
   46251          11 :       popErrorHandler();
   46252             :     }
   46253             : #ifndef SED_HACKS
   46254             :     if ( bLocalUseExceptions ) {
   46255             :       CPLErr eclass = CPLGetLastErrorType();
   46256             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46257             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46258             :       }
   46259             :     }
   46260             : #endif
   46261             :   }
   46262          21 :   {
   46263             :     /* %typemap(out) (retStringAndCPLFree*) */
   46264          21 :     Py_XDECREF(resultobj);
   46265          21 :     if(result)
   46266             :     {
   46267          21 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   46268          21 :       CPLFree(result);
   46269             :     }
   46270             :     else
   46271             :     {
   46272           0 :       resultobj = Py_None;
   46273           0 :       Py_INCREF(resultobj);
   46274             :     }
   46275             :   }
   46276          21 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46277          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; } }
   46278             :   return resultobj;
   46279           0 : fail:
   46280           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46281             :   return NULL;
   46282             : }
   46283             : 
   46284             : 
   46285         277 : SWIGINTERN PyObject *SubdatasetInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46286         277 :   PyObject *obj;
   46287         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   46288         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALSubdatasetInfo, SWIG_NewClientData(obj));
   46289         277 :   return SWIG_Py_Void();
   46290             : }
   46291             : 
   46292          83 : SWIGINTERN PyObject *_wrap_GetSubdatasetInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46293          83 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46294          83 :   char *arg1 = (char *) 0 ;
   46295          83 :   int res1 ;
   46296          83 :   char *buf1 = 0 ;
   46297          83 :   int alloc1 = 0 ;
   46298          83 :   PyObject *swig_obj[1] ;
   46299          83 :   GDALSubdatasetInfoShadow *result = 0 ;
   46300             :   
   46301          83 :   if (!args) SWIG_fail;
   46302          83 :   swig_obj[0] = args;
   46303          83 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   46304          83 :   if (!SWIG_IsOK(res1)) {
   46305           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetSubdatasetInfo" "', argument " "1"" of type '" "char const *""'");
   46306             :   }
   46307          83 :   arg1 = reinterpret_cast< char * >(buf1);
   46308          83 :   {
   46309          83 :     const int bLocalUseExceptions = GetUseExceptions();
   46310          83 :     if ( bLocalUseExceptions ) {
   46311          51 :       pushErrorHandler();
   46312             :     }
   46313          83 :     {
   46314          83 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46315          83 :       result = (GDALSubdatasetInfoShadow *)GetSubdatasetInfo((char const *)arg1);
   46316          83 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46317             :     }
   46318          83 :     if ( bLocalUseExceptions ) {
   46319          51 :       popErrorHandler();
   46320             :     }
   46321             : #ifndef SED_HACKS
   46322             :     if ( bLocalUseExceptions ) {
   46323             :       CPLErr eclass = CPLGetLastErrorType();
   46324             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46325             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46326             :       }
   46327             :     }
   46328             : #endif
   46329             :   }
   46330          83 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALSubdatasetInfo, SWIG_POINTER_OWN |  0 );
   46331          83 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   46332          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; } }
   46333             :   return resultobj;
   46334           0 : fail:
   46335           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   46336             :   return NULL;
   46337             : }
   46338             : 
   46339             : 
   46340          30 : SWIGINTERN PyObject *_wrap_new_Relationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46341          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46342          30 :   char *arg1 = (char *) 0 ;
   46343          30 :   char *arg2 = (char *) 0 ;
   46344          30 :   char *arg3 = (char *) 0 ;
   46345          30 :   GDALRelationshipCardinality arg4 ;
   46346          30 :   int res1 ;
   46347          30 :   char *buf1 = 0 ;
   46348          30 :   int alloc1 = 0 ;
   46349          30 :   int res2 ;
   46350          30 :   char *buf2 = 0 ;
   46351          30 :   int alloc2 = 0 ;
   46352          30 :   int res3 ;
   46353          30 :   char *buf3 = 0 ;
   46354          30 :   int alloc3 = 0 ;
   46355          30 :   int val4 ;
   46356          30 :   int ecode4 = 0 ;
   46357          30 :   PyObject *swig_obj[4] ;
   46358          30 :   GDALRelationshipShadow *result = 0 ;
   46359             :   
   46360          30 :   if (!SWIG_Python_UnpackTuple(args, "new_Relationship", 4, 4, swig_obj)) SWIG_fail;
   46361          30 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   46362          30 :   if (!SWIG_IsOK(res1)) {
   46363           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Relationship" "', argument " "1"" of type '" "char const *""'");
   46364             :   }
   46365          30 :   arg1 = reinterpret_cast< char * >(buf1);
   46366          30 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   46367          30 :   if (!SWIG_IsOK(res2)) {
   46368           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Relationship" "', argument " "2"" of type '" "char const *""'");
   46369             :   }
   46370          30 :   arg2 = reinterpret_cast< char * >(buf2);
   46371          30 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   46372          30 :   if (!SWIG_IsOK(res3)) {
   46373           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Relationship" "', argument " "3"" of type '" "char const *""'");
   46374             :   }
   46375          30 :   arg3 = reinterpret_cast< char * >(buf3);
   46376          30 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   46377          30 :   if (!SWIG_IsOK(ecode4)) {
   46378           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Relationship" "', argument " "4"" of type '" "GDALRelationshipCardinality""'");
   46379             :   } 
   46380          30 :   arg4 = static_cast< GDALRelationshipCardinality >(val4);
   46381          30 :   {
   46382          30 :     if (!arg1) {
   46383           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46384             :     }
   46385             :   }
   46386          29 :   {
   46387          29 :     const int bLocalUseExceptions = GetUseExceptions();
   46388          29 :     if ( bLocalUseExceptions ) {
   46389           2 :       pushErrorHandler();
   46390             :     }
   46391          29 :     {
   46392          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46393          29 :       result = (GDALRelationshipShadow *)new_GDALRelationshipShadow((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4);
   46394          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46395             :     }
   46396          29 :     if ( bLocalUseExceptions ) {
   46397           2 :       popErrorHandler();
   46398             :     }
   46399             : #ifndef SED_HACKS
   46400             :     if ( bLocalUseExceptions ) {
   46401             :       CPLErr eclass = CPLGetLastErrorType();
   46402             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46403             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46404             :       }
   46405             :     }
   46406             : #endif
   46407             :   }
   46408          29 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRelationshipShadow, SWIG_POINTER_NEW |  0 );
   46409          29 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   46410          29 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46411          29 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   46412          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; } }
   46413             :   return resultobj;
   46414           1 : fail:
   46415           1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   46416           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46417           1 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   46418             :   return NULL;
   46419             : }
   46420             : 
   46421             : 
   46422          29 : SWIGINTERN PyObject *_wrap_delete_Relationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46423          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46424          29 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46425          29 :   void *argp1 = 0 ;
   46426          29 :   int res1 = 0 ;
   46427          29 :   PyObject *swig_obj[1] ;
   46428             :   
   46429          29 :   if (!args) SWIG_fail;
   46430          29 :   swig_obj[0] = args;
   46431          29 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, SWIG_POINTER_DISOWN |  0 );
   46432          29 :   if (!SWIG_IsOK(res1)) {
   46433           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Relationship" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46434             :   }
   46435          29 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46436          29 :   {
   46437          29 :     const int bLocalUseExceptions = GetUseExceptions();
   46438          29 :     if ( bLocalUseExceptions ) {
   46439           2 :       pushErrorHandler();
   46440             :     }
   46441          29 :     {
   46442          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46443          29 :       delete_GDALRelationshipShadow(arg1);
   46444          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46445             :     }
   46446          29 :     if ( bLocalUseExceptions ) {
   46447           2 :       popErrorHandler();
   46448             :     }
   46449             : #ifndef SED_HACKS
   46450             :     if ( bLocalUseExceptions ) {
   46451             :       CPLErr eclass = CPLGetLastErrorType();
   46452             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46453             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46454             :       }
   46455             :     }
   46456             : #endif
   46457             :   }
   46458          29 :   resultobj = SWIG_Py_Void();
   46459          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; } }
   46460             :   return resultobj;
   46461             : fail:
   46462             :   return NULL;
   46463             : }
   46464             : 
   46465             : 
   46466          31 : SWIGINTERN PyObject *_wrap_Relationship_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46467          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46468          31 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46469          31 :   void *argp1 = 0 ;
   46470          31 :   int res1 = 0 ;
   46471          31 :   PyObject *swig_obj[1] ;
   46472          31 :   char *result = 0 ;
   46473             :   
   46474          31 :   if (!args) SWIG_fail;
   46475          31 :   swig_obj[0] = args;
   46476          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46477          31 :   if (!SWIG_IsOK(res1)) {
   46478           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46479             :   }
   46480          31 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46481          31 :   {
   46482          31 :     const int bLocalUseExceptions = GetUseExceptions();
   46483          31 :     if ( bLocalUseExceptions ) {
   46484           8 :       pushErrorHandler();
   46485             :     }
   46486          31 :     {
   46487          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46488          31 :       result = (char *)GDALRelationshipShadow_GetName(arg1);
   46489          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46490             :     }
   46491          31 :     if ( bLocalUseExceptions ) {
   46492           8 :       popErrorHandler();
   46493             :     }
   46494             : #ifndef SED_HACKS
   46495             :     if ( bLocalUseExceptions ) {
   46496             :       CPLErr eclass = CPLGetLastErrorType();
   46497             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46498             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46499             :       }
   46500             :     }
   46501             : #endif
   46502             :   }
   46503          31 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46504          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; } }
   46505             :   return resultobj;
   46506             : fail:
   46507             :   return NULL;
   46508             : }
   46509             : 
   46510             : 
   46511          47 : SWIGINTERN PyObject *_wrap_Relationship_GetCardinality(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46512          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46513          47 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46514          47 :   void *argp1 = 0 ;
   46515          47 :   int res1 = 0 ;
   46516          47 :   PyObject *swig_obj[1] ;
   46517          47 :   GDALRelationshipCardinality result;
   46518             :   
   46519          47 :   if (!args) SWIG_fail;
   46520          47 :   swig_obj[0] = args;
   46521          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46522          47 :   if (!SWIG_IsOK(res1)) {
   46523           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetCardinality" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46524             :   }
   46525          47 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46526          47 :   {
   46527          47 :     const int bLocalUseExceptions = GetUseExceptions();
   46528          47 :     if ( bLocalUseExceptions ) {
   46529           9 :       pushErrorHandler();
   46530             :     }
   46531          47 :     {
   46532          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46533          47 :       result = (GDALRelationshipCardinality)GDALRelationshipShadow_GetCardinality(arg1);
   46534          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46535             :     }
   46536          47 :     if ( bLocalUseExceptions ) {
   46537           9 :       popErrorHandler();
   46538             :     }
   46539             : #ifndef SED_HACKS
   46540             :     if ( bLocalUseExceptions ) {
   46541             :       CPLErr eclass = CPLGetLastErrorType();
   46542             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46543             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46544             :       }
   46545             :     }
   46546             : #endif
   46547             :   }
   46548          47 :   resultobj = SWIG_From_int(static_cast< int >(result));
   46549          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; } }
   46550             :   return resultobj;
   46551             : fail:
   46552             :   return NULL;
   46553             : }
   46554             : 
   46555             : 
   46556          49 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46557          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46558          49 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46559          49 :   void *argp1 = 0 ;
   46560          49 :   int res1 = 0 ;
   46561          49 :   PyObject *swig_obj[1] ;
   46562          49 :   char *result = 0 ;
   46563             :   
   46564          49 :   if (!args) SWIG_fail;
   46565          49 :   swig_obj[0] = args;
   46566          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46567          49 :   if (!SWIG_IsOK(res1)) {
   46568           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46569             :   }
   46570          49 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46571          49 :   {
   46572          49 :     const int bLocalUseExceptions = GetUseExceptions();
   46573          49 :     if ( bLocalUseExceptions ) {
   46574          10 :       pushErrorHandler();
   46575             :     }
   46576          49 :     {
   46577          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46578          49 :       result = (char *)GDALRelationshipShadow_GetLeftTableName(arg1);
   46579          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46580             :     }
   46581          49 :     if ( bLocalUseExceptions ) {
   46582          10 :       popErrorHandler();
   46583             :     }
   46584             : #ifndef SED_HACKS
   46585             :     if ( bLocalUseExceptions ) {
   46586             :       CPLErr eclass = CPLGetLastErrorType();
   46587             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46588             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46589             :       }
   46590             :     }
   46591             : #endif
   46592             :   }
   46593          49 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46594          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; } }
   46595             :   return resultobj;
   46596             : fail:
   46597             :   return NULL;
   46598             : }
   46599             : 
   46600             : 
   46601          49 : SWIGINTERN PyObject *_wrap_Relationship_GetRightTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46602          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46603          49 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46604          49 :   void *argp1 = 0 ;
   46605          49 :   int res1 = 0 ;
   46606          49 :   PyObject *swig_obj[1] ;
   46607          49 :   char *result = 0 ;
   46608             :   
   46609          49 :   if (!args) SWIG_fail;
   46610          49 :   swig_obj[0] = args;
   46611          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46612          49 :   if (!SWIG_IsOK(res1)) {
   46613           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46614             :   }
   46615          49 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46616          49 :   {
   46617          49 :     const int bLocalUseExceptions = GetUseExceptions();
   46618          49 :     if ( bLocalUseExceptions ) {
   46619          10 :       pushErrorHandler();
   46620             :     }
   46621          49 :     {
   46622          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46623          49 :       result = (char *)GDALRelationshipShadow_GetRightTableName(arg1);
   46624          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46625             :     }
   46626          49 :     if ( bLocalUseExceptions ) {
   46627          10 :       popErrorHandler();
   46628             :     }
   46629             : #ifndef SED_HACKS
   46630             :     if ( bLocalUseExceptions ) {
   46631             :       CPLErr eclass = CPLGetLastErrorType();
   46632             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46633             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46634             :       }
   46635             :     }
   46636             : #endif
   46637             :   }
   46638          49 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46639          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; } }
   46640             :   return resultobj;
   46641             : fail:
   46642             :   return NULL;
   46643             : }
   46644             : 
   46645             : 
   46646          34 : SWIGINTERN PyObject *_wrap_Relationship_GetMappingTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46647          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46648          34 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46649          34 :   void *argp1 = 0 ;
   46650          34 :   int res1 = 0 ;
   46651          34 :   PyObject *swig_obj[1] ;
   46652          34 :   char *result = 0 ;
   46653             :   
   46654          34 :   if (!args) SWIG_fail;
   46655          34 :   swig_obj[0] = args;
   46656          34 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46657          34 :   if (!SWIG_IsOK(res1)) {
   46658           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetMappingTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46659             :   }
   46660          34 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46661          34 :   {
   46662          34 :     const int bLocalUseExceptions = GetUseExceptions();
   46663          34 :     if ( bLocalUseExceptions ) {
   46664          11 :       pushErrorHandler();
   46665             :     }
   46666          34 :     {
   46667          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46668          34 :       result = (char *)GDALRelationshipShadow_GetMappingTableName(arg1);
   46669          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46670             :     }
   46671          34 :     if ( bLocalUseExceptions ) {
   46672          11 :       popErrorHandler();
   46673             :     }
   46674             : #ifndef SED_HACKS
   46675             :     if ( bLocalUseExceptions ) {
   46676             :       CPLErr eclass = CPLGetLastErrorType();
   46677             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46678             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46679             :       }
   46680             :     }
   46681             : #endif
   46682             :   }
   46683          34 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46684          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; } }
   46685             :   return resultobj;
   46686             : fail:
   46687             :   return NULL;
   46688             : }
   46689             : 
   46690             : 
   46691          14 : SWIGINTERN PyObject *_wrap_Relationship_SetMappingTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46692          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46693          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46694          14 :   char *arg2 = (char *) 0 ;
   46695          14 :   void *argp1 = 0 ;
   46696          14 :   int res1 = 0 ;
   46697          14 :   PyObject *str2 = 0 ;
   46698          14 :   int bToFree2 = 0 ;
   46699          14 :   PyObject *swig_obj[2] ;
   46700             :   
   46701          14 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetMappingTableName", 2, 2, swig_obj)) SWIG_fail;
   46702          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46703          14 :   if (!SWIG_IsOK(res1)) {
   46704           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetMappingTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46705             :   }
   46706          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46707          14 :   {
   46708             :     /* %typemap(in) (tostring argin) */
   46709          14 :     str2 = PyObject_Str( swig_obj[1] );
   46710          14 :     if ( str2 == 0 ) {
   46711           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   46712           0 :       SWIG_fail;
   46713             :     }
   46714             :     
   46715          14 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   46716             :   }
   46717          14 :   {
   46718          14 :     const int bLocalUseExceptions = GetUseExceptions();
   46719          14 :     if ( bLocalUseExceptions ) {
   46720           1 :       pushErrorHandler();
   46721             :     }
   46722          14 :     {
   46723          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46724          14 :       GDALRelationshipShadow_SetMappingTableName(arg1,(char const *)arg2);
   46725          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46726             :     }
   46727          14 :     if ( bLocalUseExceptions ) {
   46728           1 :       popErrorHandler();
   46729             :     }
   46730             : #ifndef SED_HACKS
   46731             :     if ( bLocalUseExceptions ) {
   46732             :       CPLErr eclass = CPLGetLastErrorType();
   46733             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46734             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46735             :       }
   46736             :     }
   46737             : #endif
   46738             :   }
   46739          14 :   resultobj = SWIG_Py_Void();
   46740          14 :   {
   46741             :     /* %typemap(freearg) (tostring argin) */
   46742          14 :     if ( str2 != NULL)
   46743             :     {
   46744          14 :       Py_DECREF(str2);
   46745             :     }
   46746          14 :     GDALPythonFreeCStr(arg2, bToFree2);
   46747             :   }
   46748          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; } }
   46749             :   return resultobj;
   46750           0 : fail:
   46751           0 :   {
   46752             :     /* %typemap(freearg) (tostring argin) */
   46753           0 :     if ( str2 != NULL)
   46754             :     {
   46755           0 :       Py_DECREF(str2);
   46756             :     }
   46757          14 :     GDALPythonFreeCStr(arg2, bToFree2);
   46758             :   }
   46759             :   return NULL;
   46760             : }
   46761             : 
   46762             : 
   46763          48 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46764          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46765          48 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46766          48 :   void *argp1 = 0 ;
   46767          48 :   int res1 = 0 ;
   46768          48 :   PyObject *swig_obj[1] ;
   46769          48 :   char **result = 0 ;
   46770             :   
   46771          48 :   if (!args) SWIG_fail;
   46772          48 :   swig_obj[0] = args;
   46773          48 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46774          48 :   if (!SWIG_IsOK(res1)) {
   46775           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46776             :   }
   46777          48 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46778          48 :   {
   46779          48 :     const int bLocalUseExceptions = GetUseExceptions();
   46780          48 :     if ( bLocalUseExceptions ) {
   46781           9 :       pushErrorHandler();
   46782             :     }
   46783          48 :     {
   46784          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46785          48 :       result = (char **)GDALRelationshipShadow_GetLeftTableFields(arg1);
   46786          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46787             :     }
   46788          48 :     if ( bLocalUseExceptions ) {
   46789           9 :       popErrorHandler();
   46790             :     }
   46791             : #ifndef SED_HACKS
   46792             :     if ( bLocalUseExceptions ) {
   46793             :       CPLErr eclass = CPLGetLastErrorType();
   46794             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46795             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46796             :       }
   46797             :     }
   46798             : #endif
   46799             :   }
   46800          48 :   {
   46801             :     /* %typemap(out) char **CSL -> ( string ) */
   46802          48 :     bool bErr = false;
   46803          48 :     resultobj = CSLToList(result, &bErr);
   46804          48 :     CSLDestroy(result);
   46805          48 :     if( bErr ) {
   46806           0 :       SWIG_fail;
   46807             :     }
   46808             :   }
   46809          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; } }
   46810             :   return resultobj;
   46811             : fail:
   46812             :   return NULL;
   46813             : }
   46814             : 
   46815             : 
   46816          48 : SWIGINTERN PyObject *_wrap_Relationship_GetRightTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46817          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46818          48 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46819          48 :   void *argp1 = 0 ;
   46820          48 :   int res1 = 0 ;
   46821          48 :   PyObject *swig_obj[1] ;
   46822          48 :   char **result = 0 ;
   46823             :   
   46824          48 :   if (!args) SWIG_fail;
   46825          48 :   swig_obj[0] = args;
   46826          48 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46827          48 :   if (!SWIG_IsOK(res1)) {
   46828           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46829             :   }
   46830          48 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46831          48 :   {
   46832          48 :     const int bLocalUseExceptions = GetUseExceptions();
   46833          48 :     if ( bLocalUseExceptions ) {
   46834           9 :       pushErrorHandler();
   46835             :     }
   46836          48 :     {
   46837          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46838          48 :       result = (char **)GDALRelationshipShadow_GetRightTableFields(arg1);
   46839          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46840             :     }
   46841          48 :     if ( bLocalUseExceptions ) {
   46842           9 :       popErrorHandler();
   46843             :     }
   46844             : #ifndef SED_HACKS
   46845             :     if ( bLocalUseExceptions ) {
   46846             :       CPLErr eclass = CPLGetLastErrorType();
   46847             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46848             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46849             :       }
   46850             :     }
   46851             : #endif
   46852             :   }
   46853          48 :   {
   46854             :     /* %typemap(out) char **CSL -> ( string ) */
   46855          48 :     bool bErr = false;
   46856          48 :     resultobj = CSLToList(result, &bErr);
   46857          48 :     CSLDestroy(result);
   46858          48 :     if( bErr ) {
   46859           0 :       SWIG_fail;
   46860             :     }
   46861             :   }
   46862          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; } }
   46863             :   return resultobj;
   46864             : fail:
   46865             :   return NULL;
   46866             : }
   46867             : 
   46868             : 
   46869          37 : SWIGINTERN PyObject *_wrap_Relationship_SetLeftTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46870          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46871          37 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46872          37 :   char **arg2 = (char **) 0 ;
   46873          37 :   void *argp1 = 0 ;
   46874          37 :   int res1 = 0 ;
   46875          37 :   PyObject *swig_obj[2] ;
   46876             :   
   46877          37 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetLeftTableFields", 2, 2, swig_obj)) SWIG_fail;
   46878          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46879          37 :   if (!SWIG_IsOK(res1)) {
   46880           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetLeftTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46881             :   }
   46882          37 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46883          37 :   {
   46884             :     /* %typemap(in) char **dict */
   46885          37 :     arg2 = NULL;
   46886          37 :     if ( PySequence_Check( swig_obj[1] ) ) {
   46887          37 :       int bErr = FALSE;
   46888          37 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   46889          37 :       if ( bErr )
   46890             :       {
   46891           0 :         SWIG_fail;
   46892             :       }
   46893             :     }
   46894           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   46895           0 :       int bErr = FALSE;
   46896           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   46897           0 :       if ( bErr )
   46898             :       {
   46899           0 :         SWIG_fail;
   46900             :       }
   46901             :     }
   46902             :     else {
   46903           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   46904           0 :       SWIG_fail;
   46905             :     }
   46906             :   }
   46907          37 :   {
   46908          37 :     const int bLocalUseExceptions = GetUseExceptions();
   46909          37 :     if ( bLocalUseExceptions ) {
   46910           1 :       pushErrorHandler();
   46911             :     }
   46912          37 :     {
   46913          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46914          37 :       GDALRelationshipShadow_SetLeftTableFields(arg1,arg2);
   46915          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46916             :     }
   46917          37 :     if ( bLocalUseExceptions ) {
   46918           1 :       popErrorHandler();
   46919             :     }
   46920             : #ifndef SED_HACKS
   46921             :     if ( bLocalUseExceptions ) {
   46922             :       CPLErr eclass = CPLGetLastErrorType();
   46923             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46924             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46925             :       }
   46926             :     }
   46927             : #endif
   46928             :   }
   46929          37 :   resultobj = SWIG_Py_Void();
   46930          37 :   {
   46931             :     /* %typemap(freearg) char **dict */
   46932          37 :     CSLDestroy( arg2 );
   46933             :   }
   46934          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; } }
   46935             :   return resultobj;
   46936           0 : fail:
   46937           0 :   {
   46938             :     /* %typemap(freearg) char **dict */
   46939           0 :     CSLDestroy( arg2 );
   46940             :   }
   46941             :   return NULL;
   46942             : }
   46943             : 
   46944             : 
   46945          38 : SWIGINTERN PyObject *_wrap_Relationship_SetRightTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46946          38 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46947          38 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46948          38 :   char **arg2 = (char **) 0 ;
   46949          38 :   void *argp1 = 0 ;
   46950          38 :   int res1 = 0 ;
   46951          38 :   PyObject *swig_obj[2] ;
   46952             :   
   46953          38 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRightTableFields", 2, 2, swig_obj)) SWIG_fail;
   46954          38 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46955          38 :   if (!SWIG_IsOK(res1)) {
   46956           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRightTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46957             :   }
   46958          38 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46959          38 :   {
   46960             :     /* %typemap(in) char **dict */
   46961          38 :     arg2 = NULL;
   46962          38 :     if ( PySequence_Check( swig_obj[1] ) ) {
   46963          38 :       int bErr = FALSE;
   46964          38 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   46965          38 :       if ( bErr )
   46966             :       {
   46967           0 :         SWIG_fail;
   46968             :       }
   46969             :     }
   46970           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   46971           0 :       int bErr = FALSE;
   46972           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   46973           0 :       if ( bErr )
   46974             :       {
   46975           0 :         SWIG_fail;
   46976             :       }
   46977             :     }
   46978             :     else {
   46979           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   46980           0 :       SWIG_fail;
   46981             :     }
   46982             :   }
   46983          38 :   {
   46984          38 :     const int bLocalUseExceptions = GetUseExceptions();
   46985          38 :     if ( bLocalUseExceptions ) {
   46986           1 :       pushErrorHandler();
   46987             :     }
   46988          38 :     {
   46989          38 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46990          38 :       GDALRelationshipShadow_SetRightTableFields(arg1,arg2);
   46991          38 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46992             :     }
   46993          38 :     if ( bLocalUseExceptions ) {
   46994           1 :       popErrorHandler();
   46995             :     }
   46996             : #ifndef SED_HACKS
   46997             :     if ( bLocalUseExceptions ) {
   46998             :       CPLErr eclass = CPLGetLastErrorType();
   46999             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47000             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47001             :       }
   47002             :     }
   47003             : #endif
   47004             :   }
   47005          38 :   resultobj = SWIG_Py_Void();
   47006          38 :   {
   47007             :     /* %typemap(freearg) char **dict */
   47008          38 :     CSLDestroy( arg2 );
   47009             :   }
   47010          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; } }
   47011             :   return resultobj;
   47012           0 : fail:
   47013           0 :   {
   47014             :     /* %typemap(freearg) char **dict */
   47015           0 :     CSLDestroy( arg2 );
   47016             :   }
   47017             :   return NULL;
   47018             : }
   47019             : 
   47020             : 
   47021          23 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47022          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47023          23 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47024          23 :   void *argp1 = 0 ;
   47025          23 :   int res1 = 0 ;
   47026          23 :   PyObject *swig_obj[1] ;
   47027          23 :   char **result = 0 ;
   47028             :   
   47029          23 :   if (!args) SWIG_fail;
   47030          23 :   swig_obj[0] = args;
   47031          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47032          23 :   if (!SWIG_IsOK(res1)) {
   47033           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47034             :   }
   47035          23 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47036          23 :   {
   47037          23 :     const int bLocalUseExceptions = GetUseExceptions();
   47038          23 :     if ( bLocalUseExceptions ) {
   47039           5 :       pushErrorHandler();
   47040             :     }
   47041          23 :     {
   47042          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47043          23 :       result = (char **)GDALRelationshipShadow_GetLeftMappingTableFields(arg1);
   47044          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47045             :     }
   47046          23 :     if ( bLocalUseExceptions ) {
   47047           5 :       popErrorHandler();
   47048             :     }
   47049             : #ifndef SED_HACKS
   47050             :     if ( bLocalUseExceptions ) {
   47051             :       CPLErr eclass = CPLGetLastErrorType();
   47052             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47053             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47054             :       }
   47055             :     }
   47056             : #endif
   47057             :   }
   47058          23 :   {
   47059             :     /* %typemap(out) char **CSL -> ( string ) */
   47060          23 :     bool bErr = false;
   47061          23 :     resultobj = CSLToList(result, &bErr);
   47062          23 :     CSLDestroy(result);
   47063          23 :     if( bErr ) {
   47064           0 :       SWIG_fail;
   47065             :     }
   47066             :   }
   47067          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; } }
   47068             :   return resultobj;
   47069             : fail:
   47070             :   return NULL;
   47071             : }
   47072             : 
   47073             : 
   47074          23 : SWIGINTERN PyObject *_wrap_Relationship_GetRightMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47075          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47076          23 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47077          23 :   void *argp1 = 0 ;
   47078          23 :   int res1 = 0 ;
   47079          23 :   PyObject *swig_obj[1] ;
   47080          23 :   char **result = 0 ;
   47081             :   
   47082          23 :   if (!args) SWIG_fail;
   47083          23 :   swig_obj[0] = args;
   47084          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47085          23 :   if (!SWIG_IsOK(res1)) {
   47086           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47087             :   }
   47088          23 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47089          23 :   {
   47090          23 :     const int bLocalUseExceptions = GetUseExceptions();
   47091          23 :     if ( bLocalUseExceptions ) {
   47092           5 :       pushErrorHandler();
   47093             :     }
   47094          23 :     {
   47095          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47096          23 :       result = (char **)GDALRelationshipShadow_GetRightMappingTableFields(arg1);
   47097          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47098             :     }
   47099          23 :     if ( bLocalUseExceptions ) {
   47100           5 :       popErrorHandler();
   47101             :     }
   47102             : #ifndef SED_HACKS
   47103             :     if ( bLocalUseExceptions ) {
   47104             :       CPLErr eclass = CPLGetLastErrorType();
   47105             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47106             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47107             :       }
   47108             :     }
   47109             : #endif
   47110             :   }
   47111          23 :   {
   47112             :     /* %typemap(out) char **CSL -> ( string ) */
   47113          23 :     bool bErr = false;
   47114          23 :     resultobj = CSLToList(result, &bErr);
   47115          23 :     CSLDestroy(result);
   47116          23 :     if( bErr ) {
   47117           0 :       SWIG_fail;
   47118             :     }
   47119             :   }
   47120          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; } }
   47121             :   return resultobj;
   47122             : fail:
   47123             :   return NULL;
   47124             : }
   47125             : 
   47126             : 
   47127           9 : SWIGINTERN PyObject *_wrap_Relationship_SetLeftMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47128           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47129           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47130           9 :   char **arg2 = (char **) 0 ;
   47131           9 :   void *argp1 = 0 ;
   47132           9 :   int res1 = 0 ;
   47133           9 :   PyObject *swig_obj[2] ;
   47134             :   
   47135           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetLeftMappingTableFields", 2, 2, swig_obj)) SWIG_fail;
   47136           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47137           9 :   if (!SWIG_IsOK(res1)) {
   47138           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetLeftMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47139             :   }
   47140           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47141           9 :   {
   47142             :     /* %typemap(in) char **dict */
   47143           9 :     arg2 = NULL;
   47144           9 :     if ( PySequence_Check( swig_obj[1] ) ) {
   47145           9 :       int bErr = FALSE;
   47146           9 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   47147           9 :       if ( bErr )
   47148             :       {
   47149           0 :         SWIG_fail;
   47150             :       }
   47151             :     }
   47152           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   47153           0 :       int bErr = FALSE;
   47154           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   47155           0 :       if ( bErr )
   47156             :       {
   47157           0 :         SWIG_fail;
   47158             :       }
   47159             :     }
   47160             :     else {
   47161           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   47162           0 :       SWIG_fail;
   47163             :     }
   47164             :   }
   47165           9 :   {
   47166           9 :     const int bLocalUseExceptions = GetUseExceptions();
   47167           9 :     if ( bLocalUseExceptions ) {
   47168           1 :       pushErrorHandler();
   47169             :     }
   47170           9 :     {
   47171           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47172           9 :       GDALRelationshipShadow_SetLeftMappingTableFields(arg1,arg2);
   47173           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47174             :     }
   47175           9 :     if ( bLocalUseExceptions ) {
   47176           1 :       popErrorHandler();
   47177             :     }
   47178             : #ifndef SED_HACKS
   47179             :     if ( bLocalUseExceptions ) {
   47180             :       CPLErr eclass = CPLGetLastErrorType();
   47181             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47182             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47183             :       }
   47184             :     }
   47185             : #endif
   47186             :   }
   47187           9 :   resultobj = SWIG_Py_Void();
   47188           9 :   {
   47189             :     /* %typemap(freearg) char **dict */
   47190           9 :     CSLDestroy( arg2 );
   47191             :   }
   47192           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; } }
   47193             :   return resultobj;
   47194           0 : fail:
   47195           0 :   {
   47196             :     /* %typemap(freearg) char **dict */
   47197           0 :     CSLDestroy( arg2 );
   47198             :   }
   47199             :   return NULL;
   47200             : }
   47201             : 
   47202             : 
   47203           9 : SWIGINTERN PyObject *_wrap_Relationship_SetRightMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47204           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47205           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47206           9 :   char **arg2 = (char **) 0 ;
   47207           9 :   void *argp1 = 0 ;
   47208           9 :   int res1 = 0 ;
   47209           9 :   PyObject *swig_obj[2] ;
   47210             :   
   47211           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRightMappingTableFields", 2, 2, swig_obj)) SWIG_fail;
   47212           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47213           9 :   if (!SWIG_IsOK(res1)) {
   47214           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRightMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47215             :   }
   47216           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47217           9 :   {
   47218             :     /* %typemap(in) char **dict */
   47219           9 :     arg2 = NULL;
   47220           9 :     if ( PySequence_Check( swig_obj[1] ) ) {
   47221           9 :       int bErr = FALSE;
   47222           9 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   47223           9 :       if ( bErr )
   47224             :       {
   47225           0 :         SWIG_fail;
   47226             :       }
   47227             :     }
   47228           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   47229           0 :       int bErr = FALSE;
   47230           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   47231           0 :       if ( bErr )
   47232             :       {
   47233           0 :         SWIG_fail;
   47234             :       }
   47235             :     }
   47236             :     else {
   47237           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   47238           0 :       SWIG_fail;
   47239             :     }
   47240             :   }
   47241           9 :   {
   47242           9 :     const int bLocalUseExceptions = GetUseExceptions();
   47243           9 :     if ( bLocalUseExceptions ) {
   47244           1 :       pushErrorHandler();
   47245             :     }
   47246           9 :     {
   47247           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47248           9 :       GDALRelationshipShadow_SetRightMappingTableFields(arg1,arg2);
   47249           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47250             :     }
   47251           9 :     if ( bLocalUseExceptions ) {
   47252           1 :       popErrorHandler();
   47253             :     }
   47254             : #ifndef SED_HACKS
   47255             :     if ( bLocalUseExceptions ) {
   47256             :       CPLErr eclass = CPLGetLastErrorType();
   47257             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47258             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47259             :       }
   47260             :     }
   47261             : #endif
   47262             :   }
   47263           9 :   resultobj = SWIG_Py_Void();
   47264           9 :   {
   47265             :     /* %typemap(freearg) char **dict */
   47266           9 :     CSLDestroy( arg2 );
   47267             :   }
   47268           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; } }
   47269             :   return resultobj;
   47270           0 : fail:
   47271           0 :   {
   47272             :     /* %typemap(freearg) char **dict */
   47273           0 :     CSLDestroy( arg2 );
   47274             :   }
   47275             :   return NULL;
   47276             : }
   47277             : 
   47278             : 
   47279          47 : SWIGINTERN PyObject *_wrap_Relationship_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47280          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47281          47 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47282          47 :   void *argp1 = 0 ;
   47283          47 :   int res1 = 0 ;
   47284          47 :   PyObject *swig_obj[1] ;
   47285          47 :   GDALRelationshipType result;
   47286             :   
   47287          47 :   if (!args) SWIG_fail;
   47288          47 :   swig_obj[0] = args;
   47289          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47290          47 :   if (!SWIG_IsOK(res1)) {
   47291           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47292             :   }
   47293          47 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47294          47 :   {
   47295          47 :     const int bLocalUseExceptions = GetUseExceptions();
   47296          47 :     if ( bLocalUseExceptions ) {
   47297           9 :       pushErrorHandler();
   47298             :     }
   47299          47 :     {
   47300          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47301          47 :       result = (GDALRelationshipType)GDALRelationshipShadow_GetType(arg1);
   47302          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47303             :     }
   47304          47 :     if ( bLocalUseExceptions ) {
   47305           9 :       popErrorHandler();
   47306             :     }
   47307             : #ifndef SED_HACKS
   47308             :     if ( bLocalUseExceptions ) {
   47309             :       CPLErr eclass = CPLGetLastErrorType();
   47310             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47311             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47312             :       }
   47313             :     }
   47314             : #endif
   47315             :   }
   47316          47 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47317          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; } }
   47318             :   return resultobj;
   47319             : fail:
   47320             :   return NULL;
   47321             : }
   47322             : 
   47323             : 
   47324          10 : SWIGINTERN PyObject *_wrap_Relationship_SetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47325          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47326          10 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47327          10 :   GDALRelationshipType arg2 ;
   47328          10 :   void *argp1 = 0 ;
   47329          10 :   int res1 = 0 ;
   47330          10 :   int val2 ;
   47331          10 :   int ecode2 = 0 ;
   47332          10 :   PyObject *swig_obj[2] ;
   47333             :   
   47334          10 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetType", 2, 2, swig_obj)) SWIG_fail;
   47335          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47336          10 :   if (!SWIG_IsOK(res1)) {
   47337           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47338             :   }
   47339          10 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47340          10 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   47341          10 :   if (!SWIG_IsOK(ecode2)) {
   47342           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Relationship_SetType" "', argument " "2"" of type '" "GDALRelationshipType""'");
   47343             :   } 
   47344          10 :   arg2 = static_cast< GDALRelationshipType >(val2);
   47345          10 :   {
   47346          10 :     const int bLocalUseExceptions = GetUseExceptions();
   47347          10 :     if ( bLocalUseExceptions ) {
   47348           1 :       pushErrorHandler();
   47349             :     }
   47350          10 :     {
   47351          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47352          10 :       GDALRelationshipShadow_SetType(arg1,arg2);
   47353          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47354             :     }
   47355          10 :     if ( bLocalUseExceptions ) {
   47356           1 :       popErrorHandler();
   47357             :     }
   47358             : #ifndef SED_HACKS
   47359             :     if ( bLocalUseExceptions ) {
   47360             :       CPLErr eclass = CPLGetLastErrorType();
   47361             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47362             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47363             :       }
   47364             :     }
   47365             : #endif
   47366             :   }
   47367          10 :   resultobj = SWIG_Py_Void();
   47368          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; } }
   47369             :   return resultobj;
   47370             : fail:
   47371             :   return NULL;
   47372             : }
   47373             : 
   47374             : 
   47375          14 : SWIGINTERN PyObject *_wrap_Relationship_GetForwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47376          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47377          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47378          14 :   void *argp1 = 0 ;
   47379          14 :   int res1 = 0 ;
   47380          14 :   PyObject *swig_obj[1] ;
   47381          14 :   char *result = 0 ;
   47382             :   
   47383          14 :   if (!args) SWIG_fail;
   47384          14 :   swig_obj[0] = args;
   47385          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47386          14 :   if (!SWIG_IsOK(res1)) {
   47387           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetForwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47388             :   }
   47389          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47390          14 :   {
   47391          14 :     const int bLocalUseExceptions = GetUseExceptions();
   47392          14 :     if ( bLocalUseExceptions ) {
   47393           4 :       pushErrorHandler();
   47394             :     }
   47395          14 :     {
   47396          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47397          14 :       result = (char *)GDALRelationshipShadow_GetForwardPathLabel(arg1);
   47398          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47399             :     }
   47400          14 :     if ( bLocalUseExceptions ) {
   47401           4 :       popErrorHandler();
   47402             :     }
   47403             : #ifndef SED_HACKS
   47404             :     if ( bLocalUseExceptions ) {
   47405             :       CPLErr eclass = CPLGetLastErrorType();
   47406             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47407             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47408             :       }
   47409             :     }
   47410             : #endif
   47411             :   }
   47412          14 :   resultobj = SWIG_FromCharPtr((const char *)result);
   47413          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; } }
   47414             :   return resultobj;
   47415             : fail:
   47416             :   return NULL;
   47417             : }
   47418             : 
   47419             : 
   47420           9 : SWIGINTERN PyObject *_wrap_Relationship_SetForwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47421           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47422           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47423           9 :   char *arg2 = (char *) 0 ;
   47424           9 :   void *argp1 = 0 ;
   47425           9 :   int res1 = 0 ;
   47426           9 :   PyObject *str2 = 0 ;
   47427           9 :   int bToFree2 = 0 ;
   47428           9 :   PyObject *swig_obj[2] ;
   47429             :   
   47430           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetForwardPathLabel", 2, 2, swig_obj)) SWIG_fail;
   47431           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47432           9 :   if (!SWIG_IsOK(res1)) {
   47433           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetForwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47434             :   }
   47435           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47436           9 :   {
   47437             :     /* %typemap(in) (tostring argin) */
   47438           9 :     str2 = PyObject_Str( swig_obj[1] );
   47439           9 :     if ( str2 == 0 ) {
   47440           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   47441           0 :       SWIG_fail;
   47442             :     }
   47443             :     
   47444           9 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   47445             :   }
   47446           9 :   {
   47447           9 :     const int bLocalUseExceptions = GetUseExceptions();
   47448           9 :     if ( bLocalUseExceptions ) {
   47449           1 :       pushErrorHandler();
   47450             :     }
   47451           9 :     {
   47452           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47453           9 :       GDALRelationshipShadow_SetForwardPathLabel(arg1,(char const *)arg2);
   47454           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47455             :     }
   47456           9 :     if ( bLocalUseExceptions ) {
   47457           1 :       popErrorHandler();
   47458             :     }
   47459             : #ifndef SED_HACKS
   47460             :     if ( bLocalUseExceptions ) {
   47461             :       CPLErr eclass = CPLGetLastErrorType();
   47462             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47463             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47464             :       }
   47465             :     }
   47466             : #endif
   47467             :   }
   47468           9 :   resultobj = SWIG_Py_Void();
   47469           9 :   {
   47470             :     /* %typemap(freearg) (tostring argin) */
   47471           9 :     if ( str2 != NULL)
   47472             :     {
   47473           9 :       Py_DECREF(str2);
   47474             :     }
   47475           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   47476             :   }
   47477           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; } }
   47478             :   return resultobj;
   47479           0 : fail:
   47480           0 :   {
   47481             :     /* %typemap(freearg) (tostring argin) */
   47482           0 :     if ( str2 != NULL)
   47483             :     {
   47484           0 :       Py_DECREF(str2);
   47485             :     }
   47486           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   47487             :   }
   47488             :   return NULL;
   47489             : }
   47490             : 
   47491             : 
   47492          14 : SWIGINTERN PyObject *_wrap_Relationship_GetBackwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47493          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47494          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47495          14 :   void *argp1 = 0 ;
   47496          14 :   int res1 = 0 ;
   47497          14 :   PyObject *swig_obj[1] ;
   47498          14 :   char *result = 0 ;
   47499             :   
   47500          14 :   if (!args) SWIG_fail;
   47501          14 :   swig_obj[0] = args;
   47502          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47503          14 :   if (!SWIG_IsOK(res1)) {
   47504           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetBackwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47505             :   }
   47506          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47507          14 :   {
   47508          14 :     const int bLocalUseExceptions = GetUseExceptions();
   47509          14 :     if ( bLocalUseExceptions ) {
   47510           4 :       pushErrorHandler();
   47511             :     }
   47512          14 :     {
   47513          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47514          14 :       result = (char *)GDALRelationshipShadow_GetBackwardPathLabel(arg1);
   47515          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47516             :     }
   47517          14 :     if ( bLocalUseExceptions ) {
   47518           4 :       popErrorHandler();
   47519             :     }
   47520             : #ifndef SED_HACKS
   47521             :     if ( bLocalUseExceptions ) {
   47522             :       CPLErr eclass = CPLGetLastErrorType();
   47523             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47524             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47525             :       }
   47526             :     }
   47527             : #endif
   47528             :   }
   47529          14 :   resultobj = SWIG_FromCharPtr((const char *)result);
   47530          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; } }
   47531             :   return resultobj;
   47532             : fail:
   47533             :   return NULL;
   47534             : }
   47535             : 
   47536             : 
   47537           9 : SWIGINTERN PyObject *_wrap_Relationship_SetBackwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47538           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47539           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47540           9 :   char *arg2 = (char *) 0 ;
   47541           9 :   void *argp1 = 0 ;
   47542           9 :   int res1 = 0 ;
   47543           9 :   PyObject *str2 = 0 ;
   47544           9 :   int bToFree2 = 0 ;
   47545           9 :   PyObject *swig_obj[2] ;
   47546             :   
   47547           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetBackwardPathLabel", 2, 2, swig_obj)) SWIG_fail;
   47548           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47549           9 :   if (!SWIG_IsOK(res1)) {
   47550           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetBackwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47551             :   }
   47552           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47553           9 :   {
   47554             :     /* %typemap(in) (tostring argin) */
   47555           9 :     str2 = PyObject_Str( swig_obj[1] );
   47556           9 :     if ( str2 == 0 ) {
   47557           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   47558           0 :       SWIG_fail;
   47559             :     }
   47560             :     
   47561           9 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   47562             :   }
   47563           9 :   {
   47564           9 :     const int bLocalUseExceptions = GetUseExceptions();
   47565           9 :     if ( bLocalUseExceptions ) {
   47566           1 :       pushErrorHandler();
   47567             :     }
   47568           9 :     {
   47569           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47570           9 :       GDALRelationshipShadow_SetBackwardPathLabel(arg1,(char const *)arg2);
   47571           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47572             :     }
   47573           9 :     if ( bLocalUseExceptions ) {
   47574           1 :       popErrorHandler();
   47575             :     }
   47576             : #ifndef SED_HACKS
   47577             :     if ( bLocalUseExceptions ) {
   47578             :       CPLErr eclass = CPLGetLastErrorType();
   47579             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47580             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47581             :       }
   47582             :     }
   47583             : #endif
   47584             :   }
   47585           9 :   resultobj = SWIG_Py_Void();
   47586           9 :   {
   47587             :     /* %typemap(freearg) (tostring argin) */
   47588           9 :     if ( str2 != NULL)
   47589             :     {
   47590           9 :       Py_DECREF(str2);
   47591             :     }
   47592           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   47593             :   }
   47594           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; } }
   47595             :   return resultobj;
   47596           0 : fail:
   47597           0 :   {
   47598             :     /* %typemap(freearg) (tostring argin) */
   47599           0 :     if ( str2 != NULL)
   47600             :     {
   47601           0 :       Py_DECREF(str2);
   47602             :     }
   47603           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   47604             :   }
   47605             :   return NULL;
   47606             : }
   47607             : 
   47608             : 
   47609          44 : SWIGINTERN PyObject *_wrap_Relationship_GetRelatedTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47610          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47611          44 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47612          44 :   void *argp1 = 0 ;
   47613          44 :   int res1 = 0 ;
   47614          44 :   PyObject *swig_obj[1] ;
   47615          44 :   char *result = 0 ;
   47616             :   
   47617          44 :   if (!args) SWIG_fail;
   47618          44 :   swig_obj[0] = args;
   47619          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47620          44 :   if (!SWIG_IsOK(res1)) {
   47621           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRelatedTableType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47622             :   }
   47623          44 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47624          44 :   {
   47625          44 :     const int bLocalUseExceptions = GetUseExceptions();
   47626          44 :     if ( bLocalUseExceptions ) {
   47627           9 :       pushErrorHandler();
   47628             :     }
   47629          44 :     {
   47630          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47631          44 :       result = (char *)GDALRelationshipShadow_GetRelatedTableType(arg1);
   47632          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47633             :     }
   47634          44 :     if ( bLocalUseExceptions ) {
   47635           9 :       popErrorHandler();
   47636             :     }
   47637             : #ifndef SED_HACKS
   47638             :     if ( bLocalUseExceptions ) {
   47639             :       CPLErr eclass = CPLGetLastErrorType();
   47640             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47641             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47642             :       }
   47643             :     }
   47644             : #endif
   47645             :   }
   47646          44 :   resultobj = SWIG_FromCharPtr((const char *)result);
   47647          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; } }
   47648             :   return resultobj;
   47649             : fail:
   47650             :   return NULL;
   47651             : }
   47652             : 
   47653             : 
   47654          20 : SWIGINTERN PyObject *_wrap_Relationship_SetRelatedTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47655          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47656          20 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47657          20 :   char *arg2 = (char *) 0 ;
   47658          20 :   void *argp1 = 0 ;
   47659          20 :   int res1 = 0 ;
   47660          20 :   PyObject *str2 = 0 ;
   47661          20 :   int bToFree2 = 0 ;
   47662          20 :   PyObject *swig_obj[2] ;
   47663             :   
   47664          20 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRelatedTableType", 2, 2, swig_obj)) SWIG_fail;
   47665          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47666          20 :   if (!SWIG_IsOK(res1)) {
   47667           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRelatedTableType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47668             :   }
   47669          20 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47670          20 :   {
   47671             :     /* %typemap(in) (tostring argin) */
   47672          20 :     str2 = PyObject_Str( swig_obj[1] );
   47673          20 :     if ( str2 == 0 ) {
   47674           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   47675           0 :       SWIG_fail;
   47676             :     }
   47677             :     
   47678          20 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   47679             :   }
   47680          20 :   {
   47681          20 :     const int bLocalUseExceptions = GetUseExceptions();
   47682          20 :     if ( bLocalUseExceptions ) {
   47683           1 :       pushErrorHandler();
   47684             :     }
   47685          20 :     {
   47686          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47687          20 :       GDALRelationshipShadow_SetRelatedTableType(arg1,(char const *)arg2);
   47688          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47689             :     }
   47690          20 :     if ( bLocalUseExceptions ) {
   47691           1 :       popErrorHandler();
   47692             :     }
   47693             : #ifndef SED_HACKS
   47694             :     if ( bLocalUseExceptions ) {
   47695             :       CPLErr eclass = CPLGetLastErrorType();
   47696             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47697             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47698             :       }
   47699             :     }
   47700             : #endif
   47701             :   }
   47702          20 :   resultobj = SWIG_Py_Void();
   47703          20 :   {
   47704             :     /* %typemap(freearg) (tostring argin) */
   47705          20 :     if ( str2 != NULL)
   47706             :     {
   47707          20 :       Py_DECREF(str2);
   47708             :     }
   47709          20 :     GDALPythonFreeCStr(arg2, bToFree2);
   47710             :   }
   47711          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; } }
   47712             :   return resultobj;
   47713           0 : fail:
   47714           0 :   {
   47715             :     /* %typemap(freearg) (tostring argin) */
   47716           0 :     if ( str2 != NULL)
   47717             :     {
   47718           0 :       Py_DECREF(str2);
   47719             :     }
   47720          20 :     GDALPythonFreeCStr(arg2, bToFree2);
   47721             :   }
   47722             :   return NULL;
   47723             : }
   47724             : 
   47725             : 
   47726         277 : SWIGINTERN PyObject *Relationship_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47727         277 :   PyObject *obj;
   47728         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   47729         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRelationshipShadow, SWIG_NewClientData(obj));
   47730         277 :   return SWIG_Py_Void();
   47731             : }
   47732             : 
   47733          29 : SWIGINTERN PyObject *Relationship_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47734          29 :   return SWIG_Python_InitShadowInstance(args);
   47735             : }
   47736             : 
   47737        3713 : SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   47738        3713 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47739        3713 :   double arg1 ;
   47740        3713 :   char *arg2 = (char *) NULL ;
   47741        3713 :   void *arg3 = (void *) NULL ;
   47742        3713 :   double val1 ;
   47743        3713 :   int ecode1 = 0 ;
   47744        3713 :   int res2 ;
   47745        3713 :   char *buf2 = 0 ;
   47746        3713 :   int alloc2 = 0 ;
   47747        3713 :   int res3 ;
   47748        3713 :   PyObject * obj0 = 0 ;
   47749        3713 :   PyObject * obj1 = 0 ;
   47750        3713 :   PyObject * obj2 = 0 ;
   47751        3713 :   char * kwnames[] = {
   47752             :     (char *)"dfProgress",  (char *)"pszMessage",  (char *)"pData",  NULL 
   47753             :   };
   47754        3713 :   int result;
   47755             :   
   47756        3713 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:TermProgress_nocb", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   47757        3713 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   47758        3713 :   if (!SWIG_IsOK(ecode1)) {
   47759           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
   47760             :   } 
   47761        3713 :   arg1 = static_cast< double >(val1);
   47762        3713 :   if (obj1) {
   47763        1347 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   47764        1347 :     if (!SWIG_IsOK(res2)) {
   47765           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
   47766             :     }
   47767        1347 :     arg2 = reinterpret_cast< char * >(buf2);
   47768             :   }
   47769        3713 :   if (obj2) {
   47770        1347 :     res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
   47771        1347 :     if (!SWIG_IsOK(res3)) {
   47772           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'"); 
   47773             :     }
   47774             :   }
   47775        3713 :   {
   47776        3713 :     const int bLocalUseExceptions = GetUseExceptions();
   47777        3713 :     if ( bLocalUseExceptions ) {
   47778        3710 :       pushErrorHandler();
   47779             :     }
   47780        3713 :     {
   47781        3713 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47782        3713 :       result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
   47783        3713 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47784             :     }
   47785        3713 :     if ( bLocalUseExceptions ) {
   47786        3710 :       popErrorHandler();
   47787             :     }
   47788             : #ifndef SED_HACKS
   47789             :     if ( bLocalUseExceptions ) {
   47790             :       CPLErr eclass = CPLGetLastErrorType();
   47791             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47792             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47793             :       }
   47794             :     }
   47795             : #endif
   47796             :   }
   47797        3713 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47798        3713 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   47799        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; } }
   47800             :   return resultobj;
   47801           0 : fail:
   47802           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   47803             :   return NULL;
   47804             : }
   47805             : 
   47806             : 
   47807           4 : SWIGINTERN PyObject *_wrap_ComputeMedianCutPCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   47808           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47809           4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   47810           4 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   47811           4 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   47812           4 :   int arg4 ;
   47813           4 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   47814           4 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   47815           4 :   void *arg7 = (void *) NULL ;
   47816           4 :   void *argp1 = 0 ;
   47817           4 :   int res1 = 0 ;
   47818           4 :   void *argp2 = 0 ;
   47819           4 :   int res2 = 0 ;
   47820           4 :   void *argp3 = 0 ;
   47821           4 :   int res3 = 0 ;
   47822           4 :   int val4 ;
   47823           4 :   int ecode4 = 0 ;
   47824           4 :   void *argp5 = 0 ;
   47825           4 :   int res5 = 0 ;
   47826           4 :   PyObject * obj0 = 0 ;
   47827           4 :   PyObject * obj1 = 0 ;
   47828           4 :   PyObject * obj2 = 0 ;
   47829           4 :   PyObject * obj3 = 0 ;
   47830           4 :   PyObject * obj4 = 0 ;
   47831           4 :   PyObject * obj5 = 0 ;
   47832           4 :   PyObject * obj6 = 0 ;
   47833           4 :   char * kwnames[] = {
   47834             :     (char *)"red",  (char *)"green",  (char *)"blue",  (char *)"num_colors",  (char *)"colors",  (char *)"callback",  (char *)"callback_data",  NULL 
   47835             :   };
   47836           4 :   int result;
   47837             :   
   47838             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   47839           4 :   PyProgressData *psProgressInfo;
   47840           4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   47841           4 :   psProgressInfo->nLastReported = -1;
   47842           4 :   psProgressInfo->psPyCallback = NULL;
   47843           4 :   psProgressInfo->psPyCallbackData = NULL;
   47844           4 :   arg7 = psProgressInfo;
   47845           4 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OO:ComputeMedianCutPCT", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   47846           4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47847           4 :   if (!SWIG_IsOK(res1)) {
   47848           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeMedianCutPCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   47849             :   }
   47850           4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   47851           4 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47852           4 :   if (!SWIG_IsOK(res2)) {
   47853           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeMedianCutPCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   47854             :   }
   47855           4 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   47856           4 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47857           4 :   if (!SWIG_IsOK(res3)) {
   47858           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ComputeMedianCutPCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   47859             :   }
   47860           4 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   47861           4 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   47862           4 :   if (!SWIG_IsOK(ecode4)) {
   47863           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ComputeMedianCutPCT" "', argument " "4"" of type '" "int""'");
   47864             :   } 
   47865           4 :   arg4 = static_cast< int >(val4);
   47866           4 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   47867           4 :   if (!SWIG_IsOK(res5)) {
   47868           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ComputeMedianCutPCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   47869             :   }
   47870           4 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   47871           4 :   if (obj5) {
   47872           3 :     {
   47873             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   47874             :       /* callback_func typemap */
   47875             :       
   47876             :       /* In some cases 0 is passed instead of None. */
   47877             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   47878           3 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   47879             :       {
   47880           0 :         if( PyLong_AsLong(obj5) == 0 )
   47881             :         {
   47882           0 :           obj5 = Py_None;
   47883             :         }
   47884             :       }
   47885             :       
   47886           3 :       if (obj5 && obj5 != Py_None ) {
   47887           3 :         void* cbfunction = NULL;
   47888           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   47889             :             (void**)&cbfunction,
   47890             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   47891             :             SWIG_POINTER_EXCEPTION | 0 ));
   47892             :         
   47893           3 :         if ( cbfunction == GDALTermProgress ) {
   47894             :           arg6 = GDALTermProgress;
   47895             :         } else {
   47896           3 :           if (!PyCallable_Check(obj5)) {
   47897           0 :             PyErr_SetString( PyExc_RuntimeError,
   47898             :               "Object given is not a Python function" );
   47899           0 :             SWIG_fail;
   47900             :           }
   47901           3 :           psProgressInfo->psPyCallback = obj5;
   47902           3 :           arg6 = PyProgressProxy;
   47903             :         }
   47904             :         
   47905             :       }
   47906             :       
   47907             :     }
   47908             :   }
   47909           4 :   if (obj6) {
   47910           0 :     {
   47911             :       /* %typemap(in) ( void* callback_data=NULL)  */
   47912           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   47913             :     }
   47914             :   }
   47915           4 :   {
   47916           4 :     if (!arg1) {
   47917           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47918             :     }
   47919             :   }
   47920           4 :   {
   47921           4 :     if (!arg2) {
   47922           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47923             :     }
   47924             :   }
   47925           4 :   {
   47926           4 :     if (!arg3) {
   47927           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47928             :     }
   47929             :   }
   47930           4 :   {
   47931           4 :     if (!arg5) {
   47932           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47933             :     }
   47934             :   }
   47935           4 :   {
   47936           4 :     const int bLocalUseExceptions = GetUseExceptions();
   47937           4 :     if ( bLocalUseExceptions ) {
   47938           4 :       pushErrorHandler();
   47939             :     }
   47940           4 :     {
   47941           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47942           4 :       result = (int)ComputeMedianCutPCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   47943           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47944             :     }
   47945           4 :     if ( bLocalUseExceptions ) {
   47946           4 :       popErrorHandler();
   47947             :     }
   47948             : #ifndef SED_HACKS
   47949             :     if ( bLocalUseExceptions ) {
   47950             :       CPLErr eclass = CPLGetLastErrorType();
   47951             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47952             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47953             :       }
   47954             :     }
   47955             : #endif
   47956             :   }
   47957           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47958           4 :   {
   47959             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   47960             :     
   47961           4 :     CPLFree(psProgressInfo);
   47962             :     
   47963             :   }
   47964           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; } }
   47965             :   return resultobj;
   47966           0 : fail:
   47967           0 :   {
   47968             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   47969             :     
   47970           0 :     CPLFree(psProgressInfo);
   47971             :     
   47972             :   }
   47973             :   return NULL;
   47974             : }
   47975             : 
   47976             : 
   47977           7 : SWIGINTERN PyObject *_wrap_DitherRGB2PCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   47978           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47979           7 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   47980           7 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   47981           7 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   47982           7 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   47983           7 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   47984           7 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   47985           7 :   void *arg7 = (void *) NULL ;
   47986           7 :   void *argp1 = 0 ;
   47987           7 :   int res1 = 0 ;
   47988           7 :   void *argp2 = 0 ;
   47989           7 :   int res2 = 0 ;
   47990           7 :   void *argp3 = 0 ;
   47991           7 :   int res3 = 0 ;
   47992           7 :   void *argp4 = 0 ;
   47993           7 :   int res4 = 0 ;
   47994           7 :   void *argp5 = 0 ;
   47995           7 :   int res5 = 0 ;
   47996           7 :   PyObject * obj0 = 0 ;
   47997           7 :   PyObject * obj1 = 0 ;
   47998           7 :   PyObject * obj2 = 0 ;
   47999           7 :   PyObject * obj3 = 0 ;
   48000           7 :   PyObject * obj4 = 0 ;
   48001           7 :   PyObject * obj5 = 0 ;
   48002           7 :   PyObject * obj6 = 0 ;
   48003           7 :   char * kwnames[] = {
   48004             :     (char *)"red",  (char *)"green",  (char *)"blue",  (char *)"target",  (char *)"colors",  (char *)"callback",  (char *)"callback_data",  NULL 
   48005             :   };
   48006           7 :   int result;
   48007             :   
   48008             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48009           7 :   PyProgressData *psProgressInfo;
   48010           7 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48011           7 :   psProgressInfo->nLastReported = -1;
   48012           7 :   psProgressInfo->psPyCallback = NULL;
   48013           7 :   psProgressInfo->psPyCallbackData = NULL;
   48014           7 :   arg7 = psProgressInfo;
   48015           7 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OO:DitherRGB2PCT", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   48016           7 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48017           7 :   if (!SWIG_IsOK(res1)) {
   48018           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DitherRGB2PCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48019             :   }
   48020           7 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48021           7 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48022           7 :   if (!SWIG_IsOK(res2)) {
   48023           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DitherRGB2PCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   48024             :   }
   48025           7 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   48026           7 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48027           7 :   if (!SWIG_IsOK(res3)) {
   48028           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DitherRGB2PCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   48029             :   }
   48030           7 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   48031           7 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48032           7 :   if (!SWIG_IsOK(res4)) {
   48033           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DitherRGB2PCT" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   48034             :   }
   48035           7 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   48036           7 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   48037           7 :   if (!SWIG_IsOK(res5)) {
   48038           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DitherRGB2PCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   48039             :   }
   48040           7 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   48041           7 :   if (obj5) {
   48042           6 :     {
   48043             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48044             :       /* callback_func typemap */
   48045             :       
   48046             :       /* In some cases 0 is passed instead of None. */
   48047             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48048           6 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   48049             :       {
   48050           0 :         if( PyLong_AsLong(obj5) == 0 )
   48051             :         {
   48052           0 :           obj5 = Py_None;
   48053             :         }
   48054             :       }
   48055             :       
   48056           6 :       if (obj5 && obj5 != Py_None ) {
   48057           6 :         void* cbfunction = NULL;
   48058           6 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   48059             :             (void**)&cbfunction,
   48060             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48061             :             SWIG_POINTER_EXCEPTION | 0 ));
   48062             :         
   48063           6 :         if ( cbfunction == GDALTermProgress ) {
   48064             :           arg6 = GDALTermProgress;
   48065             :         } else {
   48066           6 :           if (!PyCallable_Check(obj5)) {
   48067           0 :             PyErr_SetString( PyExc_RuntimeError,
   48068             :               "Object given is not a Python function" );
   48069           0 :             SWIG_fail;
   48070             :           }
   48071           6 :           psProgressInfo->psPyCallback = obj5;
   48072           6 :           arg6 = PyProgressProxy;
   48073             :         }
   48074             :         
   48075             :       }
   48076             :       
   48077             :     }
   48078             :   }
   48079           7 :   if (obj6) {
   48080           0 :     {
   48081             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48082           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   48083             :     }
   48084             :   }
   48085           7 :   {
   48086           7 :     if (!arg1) {
   48087           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48088             :     }
   48089             :   }
   48090           7 :   {
   48091           7 :     if (!arg2) {
   48092           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48093             :     }
   48094             :   }
   48095           7 :   {
   48096           7 :     if (!arg3) {
   48097           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48098             :     }
   48099             :   }
   48100           7 :   {
   48101           7 :     if (!arg4) {
   48102           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48103             :     }
   48104             :   }
   48105           7 :   {
   48106           7 :     if (!arg5) {
   48107           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48108             :     }
   48109             :   }
   48110           7 :   {
   48111           7 :     const int bLocalUseExceptions = GetUseExceptions();
   48112           7 :     if ( bLocalUseExceptions ) {
   48113           7 :       pushErrorHandler();
   48114             :     }
   48115           7 :     {
   48116           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48117           7 :       result = (int)DitherRGB2PCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   48118           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48119             :     }
   48120           7 :     if ( bLocalUseExceptions ) {
   48121           7 :       popErrorHandler();
   48122             :     }
   48123             : #ifndef SED_HACKS
   48124             :     if ( bLocalUseExceptions ) {
   48125             :       CPLErr eclass = CPLGetLastErrorType();
   48126             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48127             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48128             :       }
   48129             :     }
   48130             : #endif
   48131             :   }
   48132           7 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48133           7 :   {
   48134             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48135             :     
   48136           7 :     CPLFree(psProgressInfo);
   48137             :     
   48138             :   }
   48139           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; } }
   48140             :   return resultobj;
   48141           0 : fail:
   48142           0 :   {
   48143             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48144             :     
   48145           0 :     CPLFree(psProgressInfo);
   48146             :     
   48147             :   }
   48148             :   return NULL;
   48149             : }
   48150             : 
   48151             : 
   48152          62 : SWIGINTERN PyObject *_wrap_ReprojectImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48153          62 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48154          62 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   48155          62 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   48156          62 :   char *arg3 = (char *) NULL ;
   48157          62 :   char *arg4 = (char *) NULL ;
   48158          62 :   GDALResampleAlg arg5 = (GDALResampleAlg) GRA_NearestNeighbour ;
   48159          62 :   double arg6 = (double) 0.0 ;
   48160          62 :   double arg7 = (double) 0.0 ;
   48161          62 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   48162          62 :   void *arg9 = (void *) NULL ;
   48163          62 :   char **arg10 = (char **) NULL ;
   48164          62 :   void *argp1 = 0 ;
   48165          62 :   int res1 = 0 ;
   48166          62 :   void *argp2 = 0 ;
   48167          62 :   int res2 = 0 ;
   48168          62 :   int res3 ;
   48169          62 :   char *buf3 = 0 ;
   48170          62 :   int alloc3 = 0 ;
   48171          62 :   int res4 ;
   48172          62 :   char *buf4 = 0 ;
   48173          62 :   int alloc4 = 0 ;
   48174          62 :   int val5 ;
   48175          62 :   int ecode5 = 0 ;
   48176          62 :   double val6 ;
   48177          62 :   int ecode6 = 0 ;
   48178          62 :   double val7 ;
   48179          62 :   int ecode7 = 0 ;
   48180          62 :   PyObject * obj0 = 0 ;
   48181          62 :   PyObject * obj1 = 0 ;
   48182          62 :   PyObject * obj2 = 0 ;
   48183          62 :   PyObject * obj3 = 0 ;
   48184          62 :   PyObject * obj4 = 0 ;
   48185          62 :   PyObject * obj5 = 0 ;
   48186          62 :   PyObject * obj6 = 0 ;
   48187          62 :   PyObject * obj7 = 0 ;
   48188          62 :   PyObject * obj8 = 0 ;
   48189          62 :   PyObject * obj9 = 0 ;
   48190          62 :   char * kwnames[] = {
   48191             :     (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 
   48192             :   };
   48193          62 :   CPLErr result;
   48194             :   
   48195             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48196          62 :   PyProgressData *psProgressInfo;
   48197          62 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48198          62 :   psProgressInfo->nLastReported = -1;
   48199          62 :   psProgressInfo->psPyCallback = NULL;
   48200          62 :   psProgressInfo->psPyCallbackData = NULL;
   48201          62 :   arg9 = psProgressInfo;
   48202          62 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOOOOOO:ReprojectImage", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
   48203          62 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   48204          62 :   if (!SWIG_IsOK(res1)) {
   48205           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReprojectImage" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   48206             :   }
   48207          62 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   48208          62 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   48209          62 :   if (!SWIG_IsOK(res2)) {
   48210           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReprojectImage" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   48211             :   }
   48212          62 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   48213          62 :   if (obj2) {
   48214          61 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   48215          61 :     if (!SWIG_IsOK(res3)) {
   48216           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReprojectImage" "', argument " "3"" of type '" "char const *""'");
   48217             :     }
   48218          61 :     arg3 = reinterpret_cast< char * >(buf3);
   48219             :   }
   48220          62 :   if (obj3) {
   48221          61 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   48222          61 :     if (!SWIG_IsOK(res4)) {
   48223           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReprojectImage" "', argument " "4"" of type '" "char const *""'");
   48224             :     }
   48225          61 :     arg4 = reinterpret_cast< char * >(buf4);
   48226             :   }
   48227          62 :   if (obj4) {
   48228          60 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   48229          60 :     if (!SWIG_IsOK(ecode5)) {
   48230           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ReprojectImage" "', argument " "5"" of type '" "GDALResampleAlg""'");
   48231             :     } 
   48232          60 :     arg5 = static_cast< GDALResampleAlg >(val5);
   48233             :   }
   48234          62 :   if (obj5) {
   48235           3 :     ecode6 = SWIG_AsVal_double(obj5, &val6);
   48236           3 :     if (!SWIG_IsOK(ecode6)) {
   48237           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ReprojectImage" "', argument " "6"" of type '" "double""'");
   48238             :     } 
   48239           3 :     arg6 = static_cast< double >(val6);
   48240             :   }
   48241          62 :   if (obj6) {
   48242           3 :     ecode7 = SWIG_AsVal_double(obj6, &val7);
   48243           3 :     if (!SWIG_IsOK(ecode7)) {
   48244           0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ReprojectImage" "', argument " "7"" of type '" "double""'");
   48245             :     } 
   48246           3 :     arg7 = static_cast< double >(val7);
   48247             :   }
   48248          62 :   if (obj7) {
   48249           3 :     {
   48250             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48251             :       /* callback_func typemap */
   48252             :       
   48253             :       /* In some cases 0 is passed instead of None. */
   48254             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48255           3 :       if ( PyLong_Check(obj7) || PyInt_Check(obj7) )
   48256             :       {
   48257           0 :         if( PyLong_AsLong(obj7) == 0 )
   48258             :         {
   48259           0 :           obj7 = Py_None;
   48260             :         }
   48261             :       }
   48262             :       
   48263           3 :       if (obj7 && obj7 != Py_None ) {
   48264           3 :         void* cbfunction = NULL;
   48265           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj7,
   48266             :             (void**)&cbfunction,
   48267             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48268             :             SWIG_POINTER_EXCEPTION | 0 ));
   48269             :         
   48270           3 :         if ( cbfunction == GDALTermProgress ) {
   48271             :           arg8 = GDALTermProgress;
   48272             :         } else {
   48273           3 :           if (!PyCallable_Check(obj7)) {
   48274           0 :             PyErr_SetString( PyExc_RuntimeError,
   48275             :               "Object given is not a Python function" );
   48276           0 :             SWIG_fail;
   48277             :           }
   48278           3 :           psProgressInfo->psPyCallback = obj7;
   48279           3 :           arg8 = PyProgressProxy;
   48280             :         }
   48281             :         
   48282             :       }
   48283             :       
   48284             :     }
   48285             :   }
   48286          62 :   if (obj8) {
   48287           3 :     {
   48288             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48289           3 :       psProgressInfo->psPyCallbackData = obj8 ;
   48290             :     }
   48291             :   }
   48292          62 :   if (obj9) {
   48293           1 :     {
   48294             :       /* %typemap(in) char **dict */
   48295           1 :       arg10 = NULL;
   48296           1 :       if ( PySequence_Check( obj9 ) ) {
   48297           1 :         int bErr = FALSE;
   48298           1 :         arg10 = CSLFromPySequence(obj9, &bErr);
   48299           1 :         if ( bErr )
   48300             :         {
   48301           0 :           SWIG_fail;
   48302             :         }
   48303             :       }
   48304           0 :       else if ( PyMapping_Check( obj9 ) ) {
   48305           0 :         int bErr = FALSE;
   48306           0 :         arg10 = CSLFromPyMapping(obj9, &bErr);
   48307           0 :         if ( bErr )
   48308             :         {
   48309           0 :           SWIG_fail;
   48310             :         }
   48311             :       }
   48312             :       else {
   48313           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48314           0 :         SWIG_fail;
   48315             :       }
   48316             :     }
   48317             :   }
   48318          62 :   {
   48319          62 :     if (!arg1) {
   48320           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48321             :     }
   48322             :   }
   48323          62 :   {
   48324          62 :     if (!arg2) {
   48325           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48326             :     }
   48327             :   }
   48328          62 :   {
   48329          62 :     const int bLocalUseExceptions = GetUseExceptions();
   48330          62 :     if ( bLocalUseExceptions ) {
   48331          62 :       pushErrorHandler();
   48332             :     }
   48333          62 :     {
   48334          62 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48335          62 :       result = (CPLErr)ReprojectImage(arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7,arg8,arg9,arg10);
   48336          62 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48337             :     }
   48338          62 :     if ( bLocalUseExceptions ) {
   48339          62 :       popErrorHandler();
   48340             :     }
   48341             : #ifndef SED_HACKS
   48342             :     if ( bLocalUseExceptions ) {
   48343             :       CPLErr eclass = CPLGetLastErrorType();
   48344             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48345             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48346             :       }
   48347             :     }
   48348             : #endif
   48349             :   }
   48350          62 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48351          62 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   48352          62 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   48353          62 :   {
   48354             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48355             :     
   48356          62 :     CPLFree(psProgressInfo);
   48357             :     
   48358             :   }
   48359          62 :   {
   48360             :     /* %typemap(freearg) char **dict */
   48361          62 :     CSLDestroy( arg10 );
   48362             :   }
   48363          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; } }
   48364             :   return resultobj;
   48365           0 : fail:
   48366           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   48367           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   48368           0 :   {
   48369             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48370             :     
   48371           0 :     CPLFree(psProgressInfo);
   48372             :     
   48373             :   }
   48374           0 :   {
   48375             :     /* %typemap(freearg) char **dict */
   48376           0 :     CSLDestroy( arg10 );
   48377             :   }
   48378             :   return NULL;
   48379             : }
   48380             : 
   48381             : 
   48382           6 : SWIGINTERN PyObject *_wrap_ComputeProximity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48383           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48384           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   48385           6 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   48386           6 :   char **arg3 = (char **) NULL ;
   48387           6 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   48388           6 :   void *arg5 = (void *) NULL ;
   48389           6 :   void *argp1 = 0 ;
   48390           6 :   int res1 = 0 ;
   48391           6 :   void *argp2 = 0 ;
   48392           6 :   int res2 = 0 ;
   48393           6 :   PyObject * obj0 = 0 ;
   48394           6 :   PyObject * obj1 = 0 ;
   48395           6 :   PyObject * obj2 = 0 ;
   48396           6 :   PyObject * obj3 = 0 ;
   48397           6 :   PyObject * obj4 = 0 ;
   48398           6 :   char * kwnames[] = {
   48399             :     (char *)"srcBand",  (char *)"proximityBand",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   48400             :   };
   48401           6 :   int result;
   48402             :   
   48403             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48404           6 :   PyProgressData *psProgressInfo;
   48405           6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48406           6 :   psProgressInfo->nLastReported = -1;
   48407           6 :   psProgressInfo->psPyCallback = NULL;
   48408           6 :   psProgressInfo->psPyCallbackData = NULL;
   48409           6 :   arg5 = psProgressInfo;
   48410           6 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:ComputeProximity", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   48411           6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48412           6 :   if (!SWIG_IsOK(res1)) {
   48413           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeProximity" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48414             :   }
   48415           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48416           6 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48417           6 :   if (!SWIG_IsOK(res2)) {
   48418           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeProximity" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   48419             :   }
   48420           6 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   48421           6 :   if (obj2) {
   48422           5 :     {
   48423             :       /* %typemap(in) char **dict */
   48424           5 :       arg3 = NULL;
   48425           5 :       if ( PySequence_Check( obj2 ) ) {
   48426           5 :         int bErr = FALSE;
   48427           5 :         arg3 = CSLFromPySequence(obj2, &bErr);
   48428           5 :         if ( bErr )
   48429             :         {
   48430           0 :           SWIG_fail;
   48431             :         }
   48432             :       }
   48433           0 :       else if ( PyMapping_Check( obj2 ) ) {
   48434           0 :         int bErr = FALSE;
   48435           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   48436           0 :         if ( bErr )
   48437             :         {
   48438           0 :           SWIG_fail;
   48439             :         }
   48440             :       }
   48441             :       else {
   48442           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48443           0 :         SWIG_fail;
   48444             :       }
   48445             :     }
   48446             :   }
   48447           6 :   if (obj3) {
   48448           3 :     {
   48449             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48450             :       /* callback_func typemap */
   48451             :       
   48452             :       /* In some cases 0 is passed instead of None. */
   48453             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48454           3 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   48455             :       {
   48456           0 :         if( PyLong_AsLong(obj3) == 0 )
   48457             :         {
   48458           0 :           obj3 = Py_None;
   48459             :         }
   48460             :       }
   48461             :       
   48462           3 :       if (obj3 && obj3 != Py_None ) {
   48463           1 :         void* cbfunction = NULL;
   48464           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   48465             :             (void**)&cbfunction,
   48466             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48467             :             SWIG_POINTER_EXCEPTION | 0 ));
   48468             :         
   48469           1 :         if ( cbfunction == GDALTermProgress ) {
   48470             :           arg4 = GDALTermProgress;
   48471             :         } else {
   48472           1 :           if (!PyCallable_Check(obj3)) {
   48473           0 :             PyErr_SetString( PyExc_RuntimeError,
   48474             :               "Object given is not a Python function" );
   48475           0 :             SWIG_fail;
   48476             :           }
   48477           1 :           psProgressInfo->psPyCallback = obj3;
   48478           1 :           arg4 = PyProgressProxy;
   48479             :         }
   48480             :         
   48481             :       }
   48482             :       
   48483             :     }
   48484             :   }
   48485           6 :   if (obj4) {
   48486           0 :     {
   48487             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48488           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   48489             :     }
   48490             :   }
   48491           6 :   {
   48492           6 :     if (!arg1) {
   48493           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48494             :     }
   48495             :   }
   48496           6 :   {
   48497           6 :     if (!arg2) {
   48498           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48499             :     }
   48500             :   }
   48501           6 :   {
   48502           6 :     const int bLocalUseExceptions = GetUseExceptions();
   48503           6 :     if ( bLocalUseExceptions ) {
   48504           6 :       pushErrorHandler();
   48505             :     }
   48506           6 :     {
   48507           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48508           6 :       result = (int)ComputeProximity(arg1,arg2,arg3,arg4,arg5);
   48509           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48510             :     }
   48511           6 :     if ( bLocalUseExceptions ) {
   48512           6 :       popErrorHandler();
   48513             :     }
   48514             : #ifndef SED_HACKS
   48515             :     if ( bLocalUseExceptions ) {
   48516             :       CPLErr eclass = CPLGetLastErrorType();
   48517             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48518             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48519             :       }
   48520             :     }
   48521             : #endif
   48522             :   }
   48523           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48524           6 :   {
   48525             :     /* %typemap(freearg) char **dict */
   48526           6 :     CSLDestroy( arg3 );
   48527             :   }
   48528           6 :   {
   48529             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48530             :     
   48531           6 :     CPLFree(psProgressInfo);
   48532             :     
   48533             :   }
   48534           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; } }
   48535             :   return resultobj;
   48536           0 : fail:
   48537           0 :   {
   48538             :     /* %typemap(freearg) char **dict */
   48539           0 :     CSLDestroy( arg3 );
   48540             :   }
   48541           0 :   {
   48542             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48543             :     
   48544           0 :     CPLFree(psProgressInfo);
   48545             :     
   48546             :   }
   48547             :   return NULL;
   48548             : }
   48549             : 
   48550             : 
   48551          42 : SWIGINTERN PyObject *_wrap_RasterizeLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48552          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48553          42 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   48554          42 :   int arg2 ;
   48555          42 :   int *arg3 = (int *) 0 ;
   48556          42 :   OGRLayerShadow *arg4 = (OGRLayerShadow *) 0 ;
   48557          42 :   void *arg5 = (void *) NULL ;
   48558          42 :   void *arg6 = (void *) NULL ;
   48559          42 :   int arg7 = (int) 0 ;
   48560          42 :   double *arg8 = (double *) NULL ;
   48561          42 :   char **arg9 = (char **) NULL ;
   48562          42 :   GDALProgressFunc arg10 = (GDALProgressFunc) NULL ;
   48563          42 :   void *arg11 = (void *) NULL ;
   48564          42 :   void *argp1 = 0 ;
   48565          42 :   int res1 = 0 ;
   48566          42 :   void *argp4 = 0 ;
   48567          42 :   int res4 = 0 ;
   48568          42 :   int res5 ;
   48569          42 :   int res6 ;
   48570          42 :   PyObject * obj0 = 0 ;
   48571          42 :   PyObject * obj1 = 0 ;
   48572          42 :   PyObject * obj2 = 0 ;
   48573          42 :   PyObject * obj3 = 0 ;
   48574          42 :   PyObject * obj4 = 0 ;
   48575          42 :   PyObject * obj5 = 0 ;
   48576          42 :   PyObject * obj6 = 0 ;
   48577          42 :   PyObject * obj7 = 0 ;
   48578          42 :   PyObject * obj8 = 0 ;
   48579          42 :   char * kwnames[] = {
   48580             :     (char *)"dataset",  (char *)"bands",  (char *)"layer",  (char *)"pfnTransformer",  (char *)"pTransformArg",  (char *)"burn_values",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   48581             :   };
   48582          42 :   int result;
   48583             :   
   48584             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48585          42 :   PyProgressData *psProgressInfo;
   48586          42 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48587          42 :   psProgressInfo->nLastReported = -1;
   48588          42 :   psProgressInfo->psPyCallback = NULL;
   48589          42 :   psProgressInfo->psPyCallbackData = NULL;
   48590          42 :   arg11 = psProgressInfo;
   48591          42 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOOOOO:RasterizeLayer", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
   48592          42 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   48593          42 :   if (!SWIG_IsOK(res1)) {
   48594           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterizeLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   48595             :   }
   48596          42 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   48597          42 :   {
   48598             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   48599          42 :     arg3 = CreateCIntListFromSequence(obj1, &arg2);
   48600          42 :     if( arg2 < 0 ) {
   48601           0 :       SWIG_fail;
   48602             :     }
   48603             :   }
   48604          42 :   res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   48605          42 :   if (!SWIG_IsOK(res4)) {
   48606           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RasterizeLayer" "', argument " "4"" of type '" "OGRLayerShadow *""'"); 
   48607             :   }
   48608          42 :   arg4 = reinterpret_cast< OGRLayerShadow * >(argp4);
   48609          42 :   if (obj3) {
   48610           0 :     res5 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg5), 0, 0);
   48611           0 :     if (!SWIG_IsOK(res5)) {
   48612           0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "RasterizeLayer" "', argument " "5"" of type '" "void *""'"); 
   48613             :     }
   48614             :   }
   48615          42 :   if (obj4) {
   48616           0 :     res6 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg6), 0, 0);
   48617           0 :     if (!SWIG_IsOK(res6)) {
   48618           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "RasterizeLayer" "', argument " "6"" of type '" "void *""'"); 
   48619             :     }
   48620             :   }
   48621          42 :   if (obj5) {
   48622          41 :     {
   48623             :       /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   48624          41 :       arg8 = CreateCDoubleListFromSequence(obj5, &arg7);
   48625          41 :       if( arg7 < 0 ) {
   48626           0 :         SWIG_fail;
   48627             :       }
   48628             :     }
   48629             :   }
   48630          42 :   if (obj6) {
   48631          41 :     {
   48632             :       /* %typemap(in) char **dict */
   48633          41 :       arg9 = NULL;
   48634          41 :       if ( PySequence_Check( obj6 ) ) {
   48635          41 :         int bErr = FALSE;
   48636          41 :         arg9 = CSLFromPySequence(obj6, &bErr);
   48637          41 :         if ( bErr )
   48638             :         {
   48639           0 :           SWIG_fail;
   48640             :         }
   48641             :       }
   48642           0 :       else if ( PyMapping_Check( obj6 ) ) {
   48643           0 :         int bErr = FALSE;
   48644           0 :         arg9 = CSLFromPyMapping(obj6, &bErr);
   48645           0 :         if ( bErr )
   48646             :         {
   48647           0 :           SWIG_fail;
   48648             :         }
   48649             :       }
   48650             :       else {
   48651           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48652           0 :         SWIG_fail;
   48653             :       }
   48654             :     }
   48655             :   }
   48656          42 :   if (obj7) {
   48657           0 :     {
   48658             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48659             :       /* callback_func typemap */
   48660             :       
   48661             :       /* In some cases 0 is passed instead of None. */
   48662             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48663           0 :       if ( PyLong_Check(obj7) || PyInt_Check(obj7) )
   48664             :       {
   48665           0 :         if( PyLong_AsLong(obj7) == 0 )
   48666             :         {
   48667           0 :           obj7 = Py_None;
   48668             :         }
   48669             :       }
   48670             :       
   48671           0 :       if (obj7 && obj7 != Py_None ) {
   48672           0 :         void* cbfunction = NULL;
   48673           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj7,
   48674             :             (void**)&cbfunction,
   48675             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48676             :             SWIG_POINTER_EXCEPTION | 0 ));
   48677             :         
   48678           0 :         if ( cbfunction == GDALTermProgress ) {
   48679             :           arg10 = GDALTermProgress;
   48680             :         } else {
   48681           0 :           if (!PyCallable_Check(obj7)) {
   48682           0 :             PyErr_SetString( PyExc_RuntimeError,
   48683             :               "Object given is not a Python function" );
   48684           0 :             SWIG_fail;
   48685             :           }
   48686           0 :           psProgressInfo->psPyCallback = obj7;
   48687           0 :           arg10 = PyProgressProxy;
   48688             :         }
   48689             :         
   48690             :       }
   48691             :       
   48692             :     }
   48693             :   }
   48694          42 :   if (obj8) {
   48695           0 :     {
   48696             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48697           0 :       psProgressInfo->psPyCallbackData = obj8 ;
   48698             :     }
   48699             :   }
   48700          42 :   {
   48701          42 :     if (!arg1) {
   48702           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48703             :     }
   48704             :   }
   48705          42 :   {
   48706          42 :     if (!arg4) {
   48707           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48708             :     }
   48709             :   }
   48710          42 :   {
   48711          42 :     const int bLocalUseExceptions = GetUseExceptions();
   48712          42 :     if ( bLocalUseExceptions ) {
   48713          42 :       pushErrorHandler();
   48714             :     }
   48715          42 :     {
   48716          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48717          42 :       result = (int)RasterizeLayer(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   48718          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48719             :     }
   48720          42 :     if ( bLocalUseExceptions ) {
   48721          42 :       popErrorHandler();
   48722             :     }
   48723             : #ifndef SED_HACKS
   48724             :     if ( bLocalUseExceptions ) {
   48725             :       CPLErr eclass = CPLGetLastErrorType();
   48726             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48727             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48728             :       }
   48729             :     }
   48730             : #endif
   48731             :   }
   48732          42 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48733          42 :   {
   48734             :     /* %typemap(freearg) (int nList, int* pList) */
   48735          42 :     free(arg3);
   48736             :   }
   48737          42 :   {
   48738             :     /* %typemap(freearg) (int nList, double* pList) */
   48739          42 :     free(arg8);
   48740             :   }
   48741          42 :   {
   48742             :     /* %typemap(freearg) char **dict */
   48743          42 :     CSLDestroy( arg9 );
   48744             :   }
   48745          42 :   {
   48746             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48747             :     
   48748          42 :     CPLFree(psProgressInfo);
   48749             :     
   48750             :   }
   48751          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; } }
   48752             :   return resultobj;
   48753           0 : fail:
   48754           0 :   {
   48755             :     /* %typemap(freearg) (int nList, int* pList) */
   48756           0 :     free(arg3);
   48757             :   }
   48758           0 :   {
   48759             :     /* %typemap(freearg) (int nList, double* pList) */
   48760           0 :     free(arg8);
   48761             :   }
   48762           0 :   {
   48763             :     /* %typemap(freearg) char **dict */
   48764           0 :     CSLDestroy( arg9 );
   48765             :   }
   48766           0 :   {
   48767             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48768             :     
   48769           0 :     CPLFree(psProgressInfo);
   48770             :     
   48771             :   }
   48772             :   return NULL;
   48773             : }
   48774             : 
   48775             : 
   48776          21 : SWIGINTERN PyObject *_wrap_Polygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48777          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48778          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   48779          21 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   48780          21 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
   48781          21 :   int arg4 ;
   48782          21 :   char **arg5 = (char **) NULL ;
   48783          21 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   48784          21 :   void *arg7 = (void *) NULL ;
   48785          21 :   void *argp1 = 0 ;
   48786          21 :   int res1 = 0 ;
   48787          21 :   void *argp2 = 0 ;
   48788          21 :   int res2 = 0 ;
   48789          21 :   void *argp3 = 0 ;
   48790          21 :   int res3 = 0 ;
   48791          21 :   int val4 ;
   48792          21 :   int ecode4 = 0 ;
   48793          21 :   PyObject * obj0 = 0 ;
   48794          21 :   PyObject * obj1 = 0 ;
   48795          21 :   PyObject * obj2 = 0 ;
   48796          21 :   PyObject * obj3 = 0 ;
   48797          21 :   PyObject * obj4 = 0 ;
   48798          21 :   PyObject * obj5 = 0 ;
   48799          21 :   PyObject * obj6 = 0 ;
   48800          21 :   char * kwnames[] = {
   48801             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"outLayer",  (char *)"iPixValField",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   48802             :   };
   48803          21 :   int result;
   48804             :   
   48805             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48806          21 :   PyProgressData *psProgressInfo;
   48807          21 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48808          21 :   psProgressInfo->nLastReported = -1;
   48809          21 :   psProgressInfo->psPyCallback = NULL;
   48810          21 :   psProgressInfo->psPyCallbackData = NULL;
   48811          21 :   arg7 = psProgressInfo;
   48812          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:Polygonize", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   48813          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48814          21 :   if (!SWIG_IsOK(res1)) {
   48815           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Polygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48816             :   }
   48817          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48818          21 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48819          21 :   if (!SWIG_IsOK(res2)) {
   48820           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Polygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   48821             :   }
   48822          21 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   48823          21 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   48824          21 :   if (!SWIG_IsOK(res3)) {
   48825           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Polygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
   48826             :   }
   48827          21 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
   48828          21 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   48829          21 :   if (!SWIG_IsOK(ecode4)) {
   48830           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Polygonize" "', argument " "4"" of type '" "int""'");
   48831             :   } 
   48832          21 :   arg4 = static_cast< int >(val4);
   48833          21 :   if (obj4) {
   48834          14 :     {
   48835             :       /* %typemap(in) char **dict */
   48836          14 :       arg5 = NULL;
   48837          14 :       if ( PySequence_Check( obj4 ) ) {
   48838          14 :         int bErr = FALSE;
   48839          14 :         arg5 = CSLFromPySequence(obj4, &bErr);
   48840          14 :         if ( bErr )
   48841             :         {
   48842           0 :           SWIG_fail;
   48843             :         }
   48844             :       }
   48845           0 :       else if ( PyMapping_Check( obj4 ) ) {
   48846           0 :         int bErr = FALSE;
   48847           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   48848           0 :         if ( bErr )
   48849             :         {
   48850           0 :           SWIG_fail;
   48851             :         }
   48852             :       }
   48853             :       else {
   48854           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48855           0 :         SWIG_fail;
   48856             :       }
   48857             :     }
   48858             :   }
   48859          21 :   if (obj5) {
   48860          12 :     {
   48861             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48862             :       /* callback_func typemap */
   48863             :       
   48864             :       /* In some cases 0 is passed instead of None. */
   48865             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48866          12 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   48867             :       {
   48868           0 :         if( PyLong_AsLong(obj5) == 0 )
   48869             :         {
   48870           0 :           obj5 = Py_None;
   48871             :         }
   48872             :       }
   48873             :       
   48874          12 :       if (obj5 && obj5 != Py_None ) {
   48875           7 :         void* cbfunction = NULL;
   48876           7 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   48877             :             (void**)&cbfunction,
   48878             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48879             :             SWIG_POINTER_EXCEPTION | 0 ));
   48880             :         
   48881           7 :         if ( cbfunction == GDALTermProgress ) {
   48882             :           arg6 = GDALTermProgress;
   48883             :         } else {
   48884           7 :           if (!PyCallable_Check(obj5)) {
   48885           0 :             PyErr_SetString( PyExc_RuntimeError,
   48886             :               "Object given is not a Python function" );
   48887           0 :             SWIG_fail;
   48888             :           }
   48889           7 :           psProgressInfo->psPyCallback = obj5;
   48890           7 :           arg6 = PyProgressProxy;
   48891             :         }
   48892             :         
   48893             :       }
   48894             :       
   48895             :     }
   48896             :   }
   48897          21 :   if (obj6) {
   48898           0 :     {
   48899             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48900           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   48901             :     }
   48902             :   }
   48903          21 :   {
   48904          21 :     if (!arg1) {
   48905           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48906             :     }
   48907             :   }
   48908          21 :   {
   48909          21 :     if (!arg3) {
   48910           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48911             :     }
   48912             :   }
   48913          21 :   {
   48914          21 :     const int bLocalUseExceptions = GetUseExceptions();
   48915          21 :     if ( bLocalUseExceptions ) {
   48916          21 :       pushErrorHandler();
   48917             :     }
   48918          21 :     {
   48919          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48920          21 :       result = (int)Polygonize(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   48921          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48922             :     }
   48923          21 :     if ( bLocalUseExceptions ) {
   48924          21 :       popErrorHandler();
   48925             :     }
   48926             : #ifndef SED_HACKS
   48927             :     if ( bLocalUseExceptions ) {
   48928             :       CPLErr eclass = CPLGetLastErrorType();
   48929             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48930             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48931             :       }
   48932             :     }
   48933             : #endif
   48934             :   }
   48935          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48936          21 :   {
   48937             :     /* %typemap(freearg) char **dict */
   48938          21 :     CSLDestroy( arg5 );
   48939             :   }
   48940          21 :   {
   48941             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48942             :     
   48943          21 :     CPLFree(psProgressInfo);
   48944             :     
   48945             :   }
   48946          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; } }
   48947             :   return resultobj;
   48948           0 : fail:
   48949           0 :   {
   48950             :     /* %typemap(freearg) char **dict */
   48951           0 :     CSLDestroy( arg5 );
   48952             :   }
   48953           0 :   {
   48954             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48955             :     
   48956           0 :     CPLFree(psProgressInfo);
   48957             :     
   48958             :   }
   48959             :   return NULL;
   48960             : }
   48961             : 
   48962             : 
   48963           1 : SWIGINTERN PyObject *_wrap_FPolygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48964           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48965           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   48966           1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   48967           1 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
   48968           1 :   int arg4 ;
   48969           1 :   char **arg5 = (char **) NULL ;
   48970           1 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   48971           1 :   void *arg7 = (void *) NULL ;
   48972           1 :   void *argp1 = 0 ;
   48973           1 :   int res1 = 0 ;
   48974           1 :   void *argp2 = 0 ;
   48975           1 :   int res2 = 0 ;
   48976           1 :   void *argp3 = 0 ;
   48977           1 :   int res3 = 0 ;
   48978           1 :   int val4 ;
   48979           1 :   int ecode4 = 0 ;
   48980           1 :   PyObject * obj0 = 0 ;
   48981           1 :   PyObject * obj1 = 0 ;
   48982           1 :   PyObject * obj2 = 0 ;
   48983           1 :   PyObject * obj3 = 0 ;
   48984           1 :   PyObject * obj4 = 0 ;
   48985           1 :   PyObject * obj5 = 0 ;
   48986           1 :   PyObject * obj6 = 0 ;
   48987           1 :   char * kwnames[] = {
   48988             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"outLayer",  (char *)"iPixValField",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   48989             :   };
   48990           1 :   int result;
   48991             :   
   48992             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48993           1 :   PyProgressData *psProgressInfo;
   48994           1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48995           1 :   psProgressInfo->nLastReported = -1;
   48996           1 :   psProgressInfo->psPyCallback = NULL;
   48997           1 :   psProgressInfo->psPyCallbackData = NULL;
   48998           1 :   arg7 = psProgressInfo;
   48999           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:FPolygonize", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   49000           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49001           1 :   if (!SWIG_IsOK(res1)) {
   49002           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FPolygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49003             :   }
   49004           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49005           1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49006           1 :   if (!SWIG_IsOK(res2)) {
   49007           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FPolygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   49008             :   }
   49009           1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   49010           1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   49011           1 :   if (!SWIG_IsOK(res3)) {
   49012           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FPolygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
   49013             :   }
   49014           1 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
   49015           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   49016           1 :   if (!SWIG_IsOK(ecode4)) {
   49017           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FPolygonize" "', argument " "4"" of type '" "int""'");
   49018             :   } 
   49019           1 :   arg4 = static_cast< int >(val4);
   49020           1 :   if (obj4) {
   49021           0 :     {
   49022             :       /* %typemap(in) char **dict */
   49023           0 :       arg5 = NULL;
   49024           0 :       if ( PySequence_Check( obj4 ) ) {
   49025           0 :         int bErr = FALSE;
   49026           0 :         arg5 = CSLFromPySequence(obj4, &bErr);
   49027           0 :         if ( bErr )
   49028             :         {
   49029           0 :           SWIG_fail;
   49030             :         }
   49031             :       }
   49032           0 :       else if ( PyMapping_Check( obj4 ) ) {
   49033           0 :         int bErr = FALSE;
   49034           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   49035           0 :         if ( bErr )
   49036             :         {
   49037           0 :           SWIG_fail;
   49038             :         }
   49039             :       }
   49040             :       else {
   49041           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49042           0 :         SWIG_fail;
   49043             :       }
   49044             :     }
   49045             :   }
   49046           1 :   if (obj5) {
   49047           0 :     {
   49048             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49049             :       /* callback_func typemap */
   49050             :       
   49051             :       /* In some cases 0 is passed instead of None. */
   49052             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49053           0 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   49054             :       {
   49055           0 :         if( PyLong_AsLong(obj5) == 0 )
   49056             :         {
   49057           0 :           obj5 = Py_None;
   49058             :         }
   49059             :       }
   49060             :       
   49061           0 :       if (obj5 && obj5 != Py_None ) {
   49062           0 :         void* cbfunction = NULL;
   49063           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   49064             :             (void**)&cbfunction,
   49065             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49066             :             SWIG_POINTER_EXCEPTION | 0 ));
   49067             :         
   49068           0 :         if ( cbfunction == GDALTermProgress ) {
   49069             :           arg6 = GDALTermProgress;
   49070             :         } else {
   49071           0 :           if (!PyCallable_Check(obj5)) {
   49072           0 :             PyErr_SetString( PyExc_RuntimeError,
   49073             :               "Object given is not a Python function" );
   49074           0 :             SWIG_fail;
   49075             :           }
   49076           0 :           psProgressInfo->psPyCallback = obj5;
   49077           0 :           arg6 = PyProgressProxy;
   49078             :         }
   49079             :         
   49080             :       }
   49081             :       
   49082             :     }
   49083             :   }
   49084           1 :   if (obj6) {
   49085           0 :     {
   49086             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49087           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   49088             :     }
   49089             :   }
   49090           1 :   {
   49091           1 :     if (!arg1) {
   49092           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49093             :     }
   49094             :   }
   49095           1 :   {
   49096           1 :     if (!arg3) {
   49097           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49098             :     }
   49099             :   }
   49100           1 :   {
   49101           1 :     const int bLocalUseExceptions = GetUseExceptions();
   49102           1 :     if ( bLocalUseExceptions ) {
   49103           1 :       pushErrorHandler();
   49104             :     }
   49105           1 :     {
   49106           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49107           1 :       result = (int)FPolygonize(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   49108           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49109             :     }
   49110           1 :     if ( bLocalUseExceptions ) {
   49111           1 :       popErrorHandler();
   49112             :     }
   49113             : #ifndef SED_HACKS
   49114             :     if ( bLocalUseExceptions ) {
   49115             :       CPLErr eclass = CPLGetLastErrorType();
   49116             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49117             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49118             :       }
   49119             :     }
   49120             : #endif
   49121             :   }
   49122           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49123           1 :   {
   49124             :     /* %typemap(freearg) char **dict */
   49125           1 :     CSLDestroy( arg5 );
   49126             :   }
   49127           1 :   {
   49128             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49129             :     
   49130           1 :     CPLFree(psProgressInfo);
   49131             :     
   49132             :   }
   49133           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; } }
   49134             :   return resultobj;
   49135           0 : fail:
   49136           0 :   {
   49137             :     /* %typemap(freearg) char **dict */
   49138           0 :     CSLDestroy( arg5 );
   49139             :   }
   49140           0 :   {
   49141             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49142             :     
   49143           0 :     CPLFree(psProgressInfo);
   49144             :     
   49145             :   }
   49146             :   return NULL;
   49147             : }
   49148             : 
   49149             : 
   49150          29 : SWIGINTERN PyObject *_wrap_FillNodata(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49151          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49152          29 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49153          29 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   49154          29 :   double arg3 ;
   49155          29 :   int arg4 ;
   49156          29 :   char **arg5 = (char **) NULL ;
   49157          29 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   49158          29 :   void *arg7 = (void *) NULL ;
   49159          29 :   void *argp1 = 0 ;
   49160          29 :   int res1 = 0 ;
   49161          29 :   void *argp2 = 0 ;
   49162          29 :   int res2 = 0 ;
   49163          29 :   double val3 ;
   49164          29 :   int ecode3 = 0 ;
   49165          29 :   int val4 ;
   49166          29 :   int ecode4 = 0 ;
   49167          29 :   PyObject * obj0 = 0 ;
   49168          29 :   PyObject * obj1 = 0 ;
   49169          29 :   PyObject * obj2 = 0 ;
   49170          29 :   PyObject * obj3 = 0 ;
   49171          29 :   PyObject * obj4 = 0 ;
   49172          29 :   PyObject * obj5 = 0 ;
   49173          29 :   PyObject * obj6 = 0 ;
   49174          29 :   char * kwnames[] = {
   49175             :     (char *)"targetBand",  (char *)"maskBand",  (char *)"maxSearchDist",  (char *)"smoothingIterations",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   49176             :   };
   49177          29 :   int result;
   49178             :   
   49179             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49180          29 :   PyProgressData *psProgressInfo;
   49181          29 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49182          29 :   psProgressInfo->nLastReported = -1;
   49183          29 :   psProgressInfo->psPyCallback = NULL;
   49184          29 :   psProgressInfo->psPyCallbackData = NULL;
   49185          29 :   arg7 = psProgressInfo;
   49186          29 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:FillNodata", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   49187          29 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49188          29 :   if (!SWIG_IsOK(res1)) {
   49189           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FillNodata" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49190             :   }
   49191          29 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49192          29 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49193          29 :   if (!SWIG_IsOK(res2)) {
   49194           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FillNodata" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   49195             :   }
   49196          29 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   49197          29 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   49198          29 :   if (!SWIG_IsOK(ecode3)) {
   49199           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FillNodata" "', argument " "3"" of type '" "double""'");
   49200             :   } 
   49201          29 :   arg3 = static_cast< double >(val3);
   49202          29 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   49203          29 :   if (!SWIG_IsOK(ecode4)) {
   49204           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FillNodata" "', argument " "4"" of type '" "int""'");
   49205             :   } 
   49206          29 :   arg4 = static_cast< int >(val4);
   49207          29 :   if (obj4) {
   49208          26 :     {
   49209             :       /* %typemap(in) char **dict */
   49210          26 :       arg5 = NULL;
   49211          26 :       if ( PySequence_Check( obj4 ) ) {
   49212          26 :         int bErr = FALSE;
   49213          26 :         arg5 = CSLFromPySequence(obj4, &bErr);
   49214          26 :         if ( bErr )
   49215             :         {
   49216           0 :           SWIG_fail;
   49217             :         }
   49218             :       }
   49219           0 :       else if ( PyMapping_Check( obj4 ) ) {
   49220           0 :         int bErr = FALSE;
   49221           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   49222           0 :         if ( bErr )
   49223             :         {
   49224           0 :           SWIG_fail;
   49225             :         }
   49226             :       }
   49227             :       else {
   49228           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49229           0 :         SWIG_fail;
   49230             :       }
   49231             :     }
   49232             :   }
   49233          29 :   if (obj5) {
   49234           4 :     {
   49235             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49236             :       /* callback_func typemap */
   49237             :       
   49238             :       /* In some cases 0 is passed instead of None. */
   49239             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49240           4 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   49241             :       {
   49242           0 :         if( PyLong_AsLong(obj5) == 0 )
   49243             :         {
   49244           0 :           obj5 = Py_None;
   49245             :         }
   49246             :       }
   49247             :       
   49248           4 :       if (obj5 && obj5 != Py_None ) {
   49249           4 :         void* cbfunction = NULL;
   49250           4 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   49251             :             (void**)&cbfunction,
   49252             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49253             :             SWIG_POINTER_EXCEPTION | 0 ));
   49254             :         
   49255           4 :         if ( cbfunction == GDALTermProgress ) {
   49256             :           arg6 = GDALTermProgress;
   49257             :         } else {
   49258           4 :           if (!PyCallable_Check(obj5)) {
   49259           0 :             PyErr_SetString( PyExc_RuntimeError,
   49260             :               "Object given is not a Python function" );
   49261           0 :             SWIG_fail;
   49262             :           }
   49263           4 :           psProgressInfo->psPyCallback = obj5;
   49264           4 :           arg6 = PyProgressProxy;
   49265             :         }
   49266             :         
   49267             :       }
   49268             :       
   49269             :     }
   49270             :   }
   49271          29 :   if (obj6) {
   49272           0 :     {
   49273             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49274           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   49275             :     }
   49276             :   }
   49277          29 :   {
   49278          29 :     if (!arg1) {
   49279           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49280             :     }
   49281             :   }
   49282          29 :   {
   49283          29 :     const int bLocalUseExceptions = GetUseExceptions();
   49284          29 :     if ( bLocalUseExceptions ) {
   49285          29 :       pushErrorHandler();
   49286             :     }
   49287          29 :     {
   49288          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49289          29 :       result = (int)FillNodata(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   49290          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49291             :     }
   49292          29 :     if ( bLocalUseExceptions ) {
   49293          29 :       popErrorHandler();
   49294             :     }
   49295             : #ifndef SED_HACKS
   49296             :     if ( bLocalUseExceptions ) {
   49297             :       CPLErr eclass = CPLGetLastErrorType();
   49298             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49299             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49300             :       }
   49301             :     }
   49302             : #endif
   49303             :   }
   49304          29 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49305          29 :   {
   49306             :     /* %typemap(freearg) char **dict */
   49307          29 :     CSLDestroy( arg5 );
   49308             :   }
   49309          29 :   {
   49310             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49311             :     
   49312          29 :     CPLFree(psProgressInfo);
   49313             :     
   49314             :   }
   49315          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; } }
   49316             :   return resultobj;
   49317           0 : fail:
   49318           0 :   {
   49319             :     /* %typemap(freearg) char **dict */
   49320           0 :     CSLDestroy( arg5 );
   49321             :   }
   49322           0 :   {
   49323             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49324             :     
   49325           0 :     CPLFree(psProgressInfo);
   49326             :     
   49327             :   }
   49328             :   return NULL;
   49329             : }
   49330             : 
   49331             : 
   49332          12 : SWIGINTERN PyObject *_wrap_SieveFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49333          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49334          12 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49335          12 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   49336          12 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   49337          12 :   int arg4 ;
   49338          12 :   int arg5 = (int) 4 ;
   49339          12 :   char **arg6 = (char **) NULL ;
   49340          12 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   49341          12 :   void *arg8 = (void *) NULL ;
   49342          12 :   void *argp1 = 0 ;
   49343          12 :   int res1 = 0 ;
   49344          12 :   void *argp2 = 0 ;
   49345          12 :   int res2 = 0 ;
   49346          12 :   void *argp3 = 0 ;
   49347          12 :   int res3 = 0 ;
   49348          12 :   int val4 ;
   49349          12 :   int ecode4 = 0 ;
   49350          12 :   int val5 ;
   49351          12 :   int ecode5 = 0 ;
   49352          12 :   PyObject * obj0 = 0 ;
   49353          12 :   PyObject * obj1 = 0 ;
   49354          12 :   PyObject * obj2 = 0 ;
   49355          12 :   PyObject * obj3 = 0 ;
   49356          12 :   PyObject * obj4 = 0 ;
   49357          12 :   PyObject * obj5 = 0 ;
   49358          12 :   PyObject * obj6 = 0 ;
   49359          12 :   PyObject * obj7 = 0 ;
   49360          12 :   char * kwnames[] = {
   49361             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"dstBand",  (char *)"threshold",  (char *)"connectedness",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   49362             :   };
   49363          12 :   int result;
   49364             :   
   49365             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49366          12 :   PyProgressData *psProgressInfo;
   49367          12 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49368          12 :   psProgressInfo->nLastReported = -1;
   49369          12 :   psProgressInfo->psPyCallback = NULL;
   49370          12 :   psProgressInfo->psPyCallbackData = NULL;
   49371          12 :   arg8 = psProgressInfo;
   49372          12 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOOO:SieveFilter", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   49373          12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49374          12 :   if (!SWIG_IsOK(res1)) {
   49375           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SieveFilter" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49376             :   }
   49377          12 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49378          12 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49379          12 :   if (!SWIG_IsOK(res2)) {
   49380           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SieveFilter" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   49381             :   }
   49382          12 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   49383          12 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49384          12 :   if (!SWIG_IsOK(res3)) {
   49385           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SieveFilter" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   49386             :   }
   49387          12 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   49388          12 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   49389          12 :   if (!SWIG_IsOK(ecode4)) {
   49390           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SieveFilter" "', argument " "4"" of type '" "int""'");
   49391             :   } 
   49392          12 :   arg4 = static_cast< int >(val4);
   49393          12 :   if (obj4) {
   49394          12 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   49395          12 :     if (!SWIG_IsOK(ecode5)) {
   49396           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SieveFilter" "', argument " "5"" of type '" "int""'");
   49397             :     } 
   49398             :     arg5 = static_cast< int >(val5);
   49399             :   }
   49400          12 :   if (obj5) {
   49401           0 :     {
   49402             :       /* %typemap(in) char **dict */
   49403           0 :       arg6 = NULL;
   49404           0 :       if ( PySequence_Check( obj5 ) ) {
   49405           0 :         int bErr = FALSE;
   49406           0 :         arg6 = CSLFromPySequence(obj5, &bErr);
   49407           0 :         if ( bErr )
   49408             :         {
   49409           0 :           SWIG_fail;
   49410             :         }
   49411             :       }
   49412           0 :       else if ( PyMapping_Check( obj5 ) ) {
   49413           0 :         int bErr = FALSE;
   49414           0 :         arg6 = CSLFromPyMapping(obj5, &bErr);
   49415           0 :         if ( bErr )
   49416             :         {
   49417           0 :           SWIG_fail;
   49418             :         }
   49419             :       }
   49420             :       else {
   49421           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49422           0 :         SWIG_fail;
   49423             :       }
   49424             :     }
   49425             :   }
   49426          12 :   if (obj6) {
   49427           2 :     {
   49428             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49429             :       /* callback_func typemap */
   49430             :       
   49431             :       /* In some cases 0 is passed instead of None. */
   49432             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49433           2 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   49434             :       {
   49435           0 :         if( PyLong_AsLong(obj6) == 0 )
   49436             :         {
   49437           0 :           obj6 = Py_None;
   49438             :         }
   49439             :       }
   49440             :       
   49441           2 :       if (obj6 && obj6 != Py_None ) {
   49442           2 :         void* cbfunction = NULL;
   49443           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   49444             :             (void**)&cbfunction,
   49445             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49446             :             SWIG_POINTER_EXCEPTION | 0 ));
   49447             :         
   49448           2 :         if ( cbfunction == GDALTermProgress ) {
   49449             :           arg7 = GDALTermProgress;
   49450             :         } else {
   49451           2 :           if (!PyCallable_Check(obj6)) {
   49452           0 :             PyErr_SetString( PyExc_RuntimeError,
   49453             :               "Object given is not a Python function" );
   49454           0 :             SWIG_fail;
   49455             :           }
   49456           2 :           psProgressInfo->psPyCallback = obj6;
   49457           2 :           arg7 = PyProgressProxy;
   49458             :         }
   49459             :         
   49460             :       }
   49461             :       
   49462             :     }
   49463             :   }
   49464          12 :   if (obj7) {
   49465           0 :     {
   49466             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49467           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   49468             :     }
   49469             :   }
   49470          12 :   {
   49471          12 :     if (!arg1) {
   49472           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49473             :     }
   49474             :   }
   49475          12 :   {
   49476          12 :     if (!arg3) {
   49477           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49478             :     }
   49479             :   }
   49480          12 :   {
   49481          12 :     const int bLocalUseExceptions = GetUseExceptions();
   49482          12 :     if ( bLocalUseExceptions ) {
   49483          12 :       pushErrorHandler();
   49484             :     }
   49485          12 :     {
   49486          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49487          12 :       result = (int)SieveFilter(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   49488          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49489             :     }
   49490          12 :     if ( bLocalUseExceptions ) {
   49491          12 :       popErrorHandler();
   49492             :     }
   49493             : #ifndef SED_HACKS
   49494             :     if ( bLocalUseExceptions ) {
   49495             :       CPLErr eclass = CPLGetLastErrorType();
   49496             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49497             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49498             :       }
   49499             :     }
   49500             : #endif
   49501             :   }
   49502          12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49503          12 :   {
   49504             :     /* %typemap(freearg) char **dict */
   49505          12 :     CSLDestroy( arg6 );
   49506             :   }
   49507          12 :   {
   49508             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49509             :     
   49510          12 :     CPLFree(psProgressInfo);
   49511             :     
   49512             :   }
   49513          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; } }
   49514             :   return resultobj;
   49515           0 : fail:
   49516           0 :   {
   49517             :     /* %typemap(freearg) char **dict */
   49518           0 :     CSLDestroy( arg6 );
   49519             :   }
   49520           0 :   {
   49521             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49522             :     
   49523           0 :     CPLFree(psProgressInfo);
   49524             :     
   49525             :   }
   49526             :   return NULL;
   49527             : }
   49528             : 
   49529             : 
   49530           2 : SWIGINTERN PyObject *_wrap_RegenerateOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49531           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49532           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49533           2 :   int arg2 ;
   49534           2 :   GDALRasterBandShadow **arg3 = (GDALRasterBandShadow **) 0 ;
   49535           2 :   char *arg4 = (char *) "average" ;
   49536           2 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   49537           2 :   void *arg6 = (void *) NULL ;
   49538           2 :   void *argp1 = 0 ;
   49539           2 :   int res1 = 0 ;
   49540           2 :   int res4 ;
   49541           2 :   char *buf4 = 0 ;
   49542           2 :   int alloc4 = 0 ;
   49543           2 :   PyObject * obj0 = 0 ;
   49544           2 :   PyObject * obj1 = 0 ;
   49545           2 :   PyObject * obj2 = 0 ;
   49546           2 :   PyObject * obj3 = 0 ;
   49547           2 :   PyObject * obj4 = 0 ;
   49548           2 :   char * kwnames[] = {
   49549             :     (char *)"srcBand",  (char *)"overviewBandCount",  (char *)"resampling",  (char *)"callback",  (char *)"callback_data",  NULL 
   49550             :   };
   49551           2 :   int result;
   49552             :   
   49553             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49554           2 :   PyProgressData *psProgressInfo;
   49555           2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49556           2 :   psProgressInfo->nLastReported = -1;
   49557           2 :   psProgressInfo->psPyCallback = NULL;
   49558           2 :   psProgressInfo->psPyCallbackData = NULL;
   49559           2 :   arg6 = psProgressInfo;
   49560           2 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:RegenerateOverviews", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   49561           2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49562           2 :   if (!SWIG_IsOK(res1)) {
   49563           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49564             :   }
   49565           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49566           2 :   {
   49567             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   49568           2 :     if ( !PySequence_Check(obj1) ) {
   49569           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   49570           0 :       SWIG_fail;
   49571             :     }
   49572           2 :     Py_ssize_t size = PySequence_Size(obj1);
   49573           2 :     if( size > (Py_ssize_t)INT_MAX ) {
   49574           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   49575           0 :       SWIG_fail;
   49576             :     }
   49577           2 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   49578           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   49579           0 :       SWIG_fail;
   49580             :     }
   49581           2 :     arg2 = (int)size;
   49582           2 :     arg3 = (GDALRasterBandShadow**) VSIMalloc(arg2*sizeof(GDALRasterBandShadow*));
   49583           2 :     if( !arg3) {
   49584           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   49585           0 :       SWIG_fail;
   49586             :     }
   49587             :     
   49588           6 :     for( int i = 0; i<arg2; i++ ) {
   49589           4 :       PyObject *o = PySequence_GetItem(obj1,i);
   49590           4 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   49591           4 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   49592           4 :       if (!rawobjectpointer) {
   49593           0 :         Py_DECREF(o);
   49594           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   49595           0 :         SWIG_fail;
   49596             :       }
   49597           4 :       arg3[i] = rawobjectpointer;
   49598           4 :       Py_DECREF(o);
   49599             :       
   49600             :     }
   49601             :   }
   49602           2 :   if (obj2) {
   49603           2 :     res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4);
   49604           2 :     if (!SWIG_IsOK(res4)) {
   49605           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RegenerateOverviews" "', argument " "4"" of type '" "char const *""'");
   49606             :     }
   49607           2 :     arg4 = reinterpret_cast< char * >(buf4);
   49608             :   }
   49609           2 :   if (obj3) {
   49610           0 :     {
   49611             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49612             :       /* callback_func typemap */
   49613             :       
   49614             :       /* In some cases 0 is passed instead of None. */
   49615             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49616           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   49617             :       {
   49618           0 :         if( PyLong_AsLong(obj3) == 0 )
   49619             :         {
   49620           0 :           obj3 = Py_None;
   49621             :         }
   49622             :       }
   49623             :       
   49624           0 :       if (obj3 && obj3 != Py_None ) {
   49625           0 :         void* cbfunction = NULL;
   49626           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   49627             :             (void**)&cbfunction,
   49628             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49629             :             SWIG_POINTER_EXCEPTION | 0 ));
   49630             :         
   49631           0 :         if ( cbfunction == GDALTermProgress ) {
   49632             :           arg5 = GDALTermProgress;
   49633             :         } else {
   49634           0 :           if (!PyCallable_Check(obj3)) {
   49635           0 :             PyErr_SetString( PyExc_RuntimeError,
   49636             :               "Object given is not a Python function" );
   49637           0 :             SWIG_fail;
   49638             :           }
   49639           0 :           psProgressInfo->psPyCallback = obj3;
   49640           0 :           arg5 = PyProgressProxy;
   49641             :         }
   49642             :         
   49643             :       }
   49644             :       
   49645             :     }
   49646             :   }
   49647           2 :   if (obj4) {
   49648           0 :     {
   49649             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49650           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   49651             :     }
   49652             :   }
   49653           2 :   {
   49654           2 :     if (!arg1) {
   49655           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49656             :     }
   49657             :   }
   49658           2 :   {
   49659           2 :     const int bLocalUseExceptions = GetUseExceptions();
   49660           2 :     if ( bLocalUseExceptions ) {
   49661           0 :       pushErrorHandler();
   49662             :     }
   49663           2 :     {
   49664           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49665           2 :       result = (int)RegenerateOverviews(arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
   49666           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49667             :     }
   49668           2 :     if ( bLocalUseExceptions ) {
   49669           0 :       popErrorHandler();
   49670             :     }
   49671             : #ifndef SED_HACKS
   49672             :     if ( bLocalUseExceptions ) {
   49673             :       CPLErr eclass = CPLGetLastErrorType();
   49674             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49675             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49676             :       }
   49677             :     }
   49678             : #endif
   49679             :   }
   49680           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49681           2 :   {
   49682             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   49683           2 :     CPLFree( arg3 );
   49684             :   }
   49685           2 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   49686           2 :   {
   49687             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49688             :     
   49689           2 :     CPLFree(psProgressInfo);
   49690             :     
   49691             :   }
   49692           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; } }
   49693             :   return resultobj;
   49694           0 : fail:
   49695           0 :   {
   49696             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   49697           0 :     CPLFree( arg3 );
   49698             :   }
   49699           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   49700           0 :   {
   49701             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49702             :     
   49703           0 :     CPLFree(psProgressInfo);
   49704             :     
   49705             :   }
   49706             :   return NULL;
   49707             : }
   49708             : 
   49709             : 
   49710         248 : SWIGINTERN PyObject *_wrap_RegenerateOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49711         248 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49712         248 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49713         248 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   49714         248 :   char *arg3 = (char *) "average" ;
   49715         248 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   49716         248 :   void *arg5 = (void *) NULL ;
   49717         248 :   void *argp1 = 0 ;
   49718         248 :   int res1 = 0 ;
   49719         248 :   void *argp2 = 0 ;
   49720         248 :   int res2 = 0 ;
   49721         248 :   int res3 ;
   49722         248 :   char *buf3 = 0 ;
   49723         248 :   int alloc3 = 0 ;
   49724         248 :   PyObject * obj0 = 0 ;
   49725         248 :   PyObject * obj1 = 0 ;
   49726         248 :   PyObject * obj2 = 0 ;
   49727         248 :   PyObject * obj3 = 0 ;
   49728         248 :   PyObject * obj4 = 0 ;
   49729         248 :   char * kwnames[] = {
   49730             :     (char *)"srcBand",  (char *)"overviewBand",  (char *)"resampling",  (char *)"callback",  (char *)"callback_data",  NULL 
   49731             :   };
   49732         248 :   int result;
   49733             :   
   49734             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49735         248 :   PyProgressData *psProgressInfo;
   49736         248 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49737         248 :   psProgressInfo->nLastReported = -1;
   49738         248 :   psProgressInfo->psPyCallback = NULL;
   49739         248 :   psProgressInfo->psPyCallbackData = NULL;
   49740         248 :   arg5 = psProgressInfo;
   49741         248 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:RegenerateOverview", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   49742         248 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49743         248 :   if (!SWIG_IsOK(res1)) {
   49744           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49745             :   }
   49746         248 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49747         248 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49748         248 :   if (!SWIG_IsOK(res2)) {
   49749           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RegenerateOverview" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   49750             :   }
   49751         248 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   49752         248 :   if (obj2) {
   49753         248 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   49754         248 :     if (!SWIG_IsOK(res3)) {
   49755           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RegenerateOverview" "', argument " "3"" of type '" "char const *""'");
   49756             :     }
   49757         248 :     arg3 = reinterpret_cast< char * >(buf3);
   49758             :   }
   49759         248 :   if (obj3) {
   49760           0 :     {
   49761             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49762             :       /* callback_func typemap */
   49763             :       
   49764             :       /* In some cases 0 is passed instead of None. */
   49765             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49766           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   49767             :       {
   49768           0 :         if( PyLong_AsLong(obj3) == 0 )
   49769             :         {
   49770           0 :           obj3 = Py_None;
   49771             :         }
   49772             :       }
   49773             :       
   49774           0 :       if (obj3 && obj3 != Py_None ) {
   49775           0 :         void* cbfunction = NULL;
   49776           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   49777             :             (void**)&cbfunction,
   49778             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49779             :             SWIG_POINTER_EXCEPTION | 0 ));
   49780             :         
   49781           0 :         if ( cbfunction == GDALTermProgress ) {
   49782             :           arg4 = GDALTermProgress;
   49783             :         } else {
   49784           0 :           if (!PyCallable_Check(obj3)) {
   49785           0 :             PyErr_SetString( PyExc_RuntimeError,
   49786             :               "Object given is not a Python function" );
   49787           0 :             SWIG_fail;
   49788             :           }
   49789           0 :           psProgressInfo->psPyCallback = obj3;
   49790           0 :           arg4 = PyProgressProxy;
   49791             :         }
   49792             :         
   49793             :       }
   49794             :       
   49795             :     }
   49796             :   }
   49797         248 :   if (obj4) {
   49798           0 :     {
   49799             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49800           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   49801             :     }
   49802             :   }
   49803         248 :   {
   49804         248 :     if (!arg1) {
   49805           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49806             :     }
   49807             :   }
   49808         248 :   {
   49809         248 :     if (!arg2) {
   49810           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49811             :     }
   49812             :   }
   49813         248 :   {
   49814         248 :     const int bLocalUseExceptions = GetUseExceptions();
   49815         248 :     if ( bLocalUseExceptions ) {
   49816         246 :       pushErrorHandler();
   49817             :     }
   49818         248 :     {
   49819         248 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49820         248 :       result = (int)RegenerateOverview(arg1,arg2,(char const *)arg3,arg4,arg5);
   49821         248 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49822             :     }
   49823         248 :     if ( bLocalUseExceptions ) {
   49824         246 :       popErrorHandler();
   49825             :     }
   49826             : #ifndef SED_HACKS
   49827             :     if ( bLocalUseExceptions ) {
   49828             :       CPLErr eclass = CPLGetLastErrorType();
   49829             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49830             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49831             :       }
   49832             :     }
   49833             : #endif
   49834             :   }
   49835         248 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49836         248 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   49837         248 :   {
   49838             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49839             :     
   49840         248 :     CPLFree(psProgressInfo);
   49841             :     
   49842             :   }
   49843         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; } }
   49844             :   return resultobj;
   49845           0 : fail:
   49846           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   49847           0 :   {
   49848             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49849             :     
   49850           0 :     CPLFree(psProgressInfo);
   49851             :     
   49852             :   }
   49853             :   return NULL;
   49854             : }
   49855             : 
   49856             : 
   49857           3 : SWIGINTERN PyObject *_wrap_ContourGenerate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49858           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49859           3 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49860           3 :   double arg2 ;
   49861           3 :   double arg3 ;
   49862           3 :   int arg4 ;
   49863           3 :   double *arg5 = (double *) 0 ;
   49864           3 :   int arg6 ;
   49865           3 :   double arg7 ;
   49866           3 :   OGRLayerShadow *arg8 = (OGRLayerShadow *) 0 ;
   49867           3 :   int arg9 ;
   49868           3 :   int arg10 ;
   49869           3 :   GDALProgressFunc arg11 = (GDALProgressFunc) NULL ;
   49870           3 :   void *arg12 = (void *) NULL ;
   49871           3 :   void *argp1 = 0 ;
   49872           3 :   int res1 = 0 ;
   49873           3 :   double val2 ;
   49874           3 :   int ecode2 = 0 ;
   49875           3 :   double val3 ;
   49876           3 :   int ecode3 = 0 ;
   49877           3 :   int val6 ;
   49878           3 :   int ecode6 = 0 ;
   49879           3 :   double val7 ;
   49880           3 :   int ecode7 = 0 ;
   49881           3 :   void *argp8 = 0 ;
   49882           3 :   int res8 = 0 ;
   49883           3 :   int val9 ;
   49884           3 :   int ecode9 = 0 ;
   49885           3 :   int val10 ;
   49886           3 :   int ecode10 = 0 ;
   49887           3 :   PyObject * obj0 = 0 ;
   49888           3 :   PyObject * obj1 = 0 ;
   49889           3 :   PyObject * obj2 = 0 ;
   49890           3 :   PyObject * obj3 = 0 ;
   49891           3 :   PyObject * obj4 = 0 ;
   49892           3 :   PyObject * obj5 = 0 ;
   49893           3 :   PyObject * obj6 = 0 ;
   49894           3 :   PyObject * obj7 = 0 ;
   49895           3 :   PyObject * obj8 = 0 ;
   49896           3 :   PyObject * obj9 = 0 ;
   49897           3 :   PyObject * obj10 = 0 ;
   49898           3 :   char * kwnames[] = {
   49899             :     (char *)"srcBand",  (char *)"contourInterval",  (char *)"contourBase",  (char *)"fixedLevelCount",  (char *)"useNoData",  (char *)"noDataValue",  (char *)"dstLayer",  (char *)"idField",  (char *)"elevField",  (char *)"callback",  (char *)"callback_data",  NULL 
   49900             :   };
   49901           3 :   int result;
   49902             :   
   49903             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49904           3 :   PyProgressData *psProgressInfo;
   49905           3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49906           3 :   psProgressInfo->nLastReported = -1;
   49907           3 :   psProgressInfo->psPyCallback = NULL;
   49908           3 :   psProgressInfo->psPyCallbackData = NULL;
   49909           3 :   arg12 = psProgressInfo;
   49910           3 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO|OO:ContourGenerate", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   49911           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49912           3 :   if (!SWIG_IsOK(res1)) {
   49913           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49914             :   }
   49915           3 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49916           3 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   49917           3 :   if (!SWIG_IsOK(ecode2)) {
   49918           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContourGenerate" "', argument " "2"" of type '" "double""'");
   49919             :   } 
   49920           3 :   arg2 = static_cast< double >(val2);
   49921           3 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   49922           3 :   if (!SWIG_IsOK(ecode3)) {
   49923           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContourGenerate" "', argument " "3"" of type '" "double""'");
   49924             :   } 
   49925           3 :   arg3 = static_cast< double >(val3);
   49926           3 :   {
   49927             :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   49928           3 :     arg5 = CreateCDoubleListFromSequence(obj3, &arg4);
   49929           3 :     if( arg4 < 0 ) {
   49930           0 :       SWIG_fail;
   49931             :     }
   49932             :   }
   49933           3 :   ecode6 = SWIG_AsVal_int(obj4, &val6);
   49934           3 :   if (!SWIG_IsOK(ecode6)) {
   49935           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ContourGenerate" "', argument " "6"" of type '" "int""'");
   49936             :   } 
   49937           3 :   arg6 = static_cast< int >(val6);
   49938           3 :   ecode7 = SWIG_AsVal_double(obj5, &val7);
   49939           3 :   if (!SWIG_IsOK(ecode7)) {
   49940           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ContourGenerate" "', argument " "7"" of type '" "double""'");
   49941             :   } 
   49942           3 :   arg7 = static_cast< double >(val7);
   49943           3 :   res8 = SWIG_ConvertPtr(obj6, &argp8,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   49944           3 :   if (!SWIG_IsOK(res8)) {
   49945           0 :     SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "ContourGenerate" "', argument " "8"" of type '" "OGRLayerShadow *""'"); 
   49946             :   }
   49947           3 :   arg8 = reinterpret_cast< OGRLayerShadow * >(argp8);
   49948           3 :   ecode9 = SWIG_AsVal_int(obj7, &val9);
   49949           3 :   if (!SWIG_IsOK(ecode9)) {
   49950           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ContourGenerate" "', argument " "9"" of type '" "int""'");
   49951             :   } 
   49952           3 :   arg9 = static_cast< int >(val9);
   49953           3 :   ecode10 = SWIG_AsVal_int(obj8, &val10);
   49954           3 :   if (!SWIG_IsOK(ecode10)) {
   49955           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ContourGenerate" "', argument " "10"" of type '" "int""'");
   49956             :   } 
   49957           3 :   arg10 = static_cast< int >(val10);
   49958           3 :   if (obj9) {
   49959           0 :     {
   49960             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49961             :       /* callback_func typemap */
   49962             :       
   49963             :       /* In some cases 0 is passed instead of None. */
   49964             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49965           0 :       if ( PyLong_Check(obj9) || PyInt_Check(obj9) )
   49966             :       {
   49967           0 :         if( PyLong_AsLong(obj9) == 0 )
   49968             :         {
   49969           0 :           obj9 = Py_None;
   49970             :         }
   49971             :       }
   49972             :       
   49973           0 :       if (obj9 && obj9 != Py_None ) {
   49974           0 :         void* cbfunction = NULL;
   49975           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj9,
   49976             :             (void**)&cbfunction,
   49977             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49978             :             SWIG_POINTER_EXCEPTION | 0 ));
   49979             :         
   49980           0 :         if ( cbfunction == GDALTermProgress ) {
   49981             :           arg11 = GDALTermProgress;
   49982             :         } else {
   49983           0 :           if (!PyCallable_Check(obj9)) {
   49984           0 :             PyErr_SetString( PyExc_RuntimeError,
   49985             :               "Object given is not a Python function" );
   49986           0 :             SWIG_fail;
   49987             :           }
   49988           0 :           psProgressInfo->psPyCallback = obj9;
   49989           0 :           arg11 = PyProgressProxy;
   49990             :         }
   49991             :         
   49992             :       }
   49993             :       
   49994             :     }
   49995             :   }
   49996           3 :   if (obj10) {
   49997           0 :     {
   49998             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49999           0 :       psProgressInfo->psPyCallbackData = obj10 ;
   50000             :     }
   50001             :   }
   50002           3 :   {
   50003           3 :     if (!arg1) {
   50004           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50005             :     }
   50006             :   }
   50007           3 :   {
   50008           3 :     if (!arg8) {
   50009           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50010             :     }
   50011             :   }
   50012           3 :   {
   50013           3 :     const int bLocalUseExceptions = GetUseExceptions();
   50014           3 :     if ( bLocalUseExceptions ) {
   50015           3 :       pushErrorHandler();
   50016             :     }
   50017           3 :     {
   50018           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50019           3 :       result = (int)ContourGenerate(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   50020           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50021             :     }
   50022           3 :     if ( bLocalUseExceptions ) {
   50023           3 :       popErrorHandler();
   50024             :     }
   50025             : #ifndef SED_HACKS
   50026             :     if ( bLocalUseExceptions ) {
   50027             :       CPLErr eclass = CPLGetLastErrorType();
   50028             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50029             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50030             :       }
   50031             :     }
   50032             : #endif
   50033             :   }
   50034           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   50035           3 :   {
   50036             :     /* %typemap(freearg) (int nList, double* pList) */
   50037           3 :     free(arg5);
   50038             :   }
   50039           3 :   {
   50040             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50041             :     
   50042           3 :     CPLFree(psProgressInfo);
   50043             :     
   50044             :   }
   50045           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; } }
   50046             :   return resultobj;
   50047           0 : fail:
   50048           0 :   {
   50049             :     /* %typemap(freearg) (int nList, double* pList) */
   50050           0 :     free(arg5);
   50051             :   }
   50052           0 :   {
   50053             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50054             :     
   50055           0 :     CPLFree(psProgressInfo);
   50056             :     
   50057             :   }
   50058             :   return NULL;
   50059             : }
   50060             : 
   50061             : 
   50062          25 : SWIGINTERN PyObject *_wrap_ContourGenerateEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   50063          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50064          25 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   50065          25 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   50066          25 :   char **arg3 = (char **) NULL ;
   50067          25 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   50068          25 :   void *arg5 = (void *) NULL ;
   50069          25 :   void *argp1 = 0 ;
   50070          25 :   int res1 = 0 ;
   50071          25 :   void *argp2 = 0 ;
   50072          25 :   int res2 = 0 ;
   50073          25 :   PyObject * obj0 = 0 ;
   50074          25 :   PyObject * obj1 = 0 ;
   50075          25 :   PyObject * obj2 = 0 ;
   50076          25 :   PyObject * obj3 = 0 ;
   50077          25 :   PyObject * obj4 = 0 ;
   50078          25 :   char * kwnames[] = {
   50079             :     (char *)"srcBand",  (char *)"dstLayer",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   50080             :   };
   50081          25 :   int result;
   50082             :   
   50083             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   50084          25 :   PyProgressData *psProgressInfo;
   50085          25 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   50086          25 :   psProgressInfo->nLastReported = -1;
   50087          25 :   psProgressInfo->psPyCallback = NULL;
   50088          25 :   psProgressInfo->psPyCallbackData = NULL;
   50089          25 :   arg5 = psProgressInfo;
   50090          25 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:ContourGenerateEx", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   50091          25 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50092          25 :   if (!SWIG_IsOK(res1)) {
   50093           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerateEx" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   50094             :   }
   50095          25 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   50096          25 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   50097          25 :   if (!SWIG_IsOK(res2)) {
   50098           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContourGenerateEx" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
   50099             :   }
   50100          25 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
   50101          25 :   if (obj2) {
   50102          25 :     {
   50103             :       /* %typemap(in) char **dict */
   50104          25 :       arg3 = NULL;
   50105          25 :       if ( PySequence_Check( obj2 ) ) {
   50106          25 :         int bErr = FALSE;
   50107          25 :         arg3 = CSLFromPySequence(obj2, &bErr);
   50108          25 :         if ( bErr )
   50109             :         {
   50110           0 :           SWIG_fail;
   50111             :         }
   50112             :       }
   50113           0 :       else if ( PyMapping_Check( obj2 ) ) {
   50114           0 :         int bErr = FALSE;
   50115           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   50116           0 :         if ( bErr )
   50117             :         {
   50118           0 :           SWIG_fail;
   50119             :         }
   50120             :       }
   50121             :       else {
   50122           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50123           0 :         SWIG_fail;
   50124             :       }
   50125             :     }
   50126             :   }
   50127          25 :   if (obj3) {
   50128           0 :     {
   50129             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   50130             :       /* callback_func typemap */
   50131             :       
   50132             :       /* In some cases 0 is passed instead of None. */
   50133             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   50134           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   50135             :       {
   50136           0 :         if( PyLong_AsLong(obj3) == 0 )
   50137             :         {
   50138           0 :           obj3 = Py_None;
   50139             :         }
   50140             :       }
   50141             :       
   50142           0 :       if (obj3 && obj3 != Py_None ) {
   50143           0 :         void* cbfunction = NULL;
   50144           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   50145             :             (void**)&cbfunction,
   50146             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   50147             :             SWIG_POINTER_EXCEPTION | 0 ));
   50148             :         
   50149           0 :         if ( cbfunction == GDALTermProgress ) {
   50150             :           arg4 = GDALTermProgress;
   50151             :         } else {
   50152           0 :           if (!PyCallable_Check(obj3)) {
   50153           0 :             PyErr_SetString( PyExc_RuntimeError,
   50154             :               "Object given is not a Python function" );
   50155           0 :             SWIG_fail;
   50156             :           }
   50157           0 :           psProgressInfo->psPyCallback = obj3;
   50158           0 :           arg4 = PyProgressProxy;
   50159             :         }
   50160             :         
   50161             :       }
   50162             :       
   50163             :     }
   50164             :   }
   50165          25 :   if (obj4) {
   50166           0 :     {
   50167             :       /* %typemap(in) ( void* callback_data=NULL)  */
   50168           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   50169             :     }
   50170             :   }
   50171          25 :   {
   50172          25 :     if (!arg1) {
   50173           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50174             :     }
   50175             :   }
   50176          25 :   {
   50177          25 :     if (!arg2) {
   50178           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50179             :     }
   50180             :   }
   50181          25 :   {
   50182          25 :     const int bLocalUseExceptions = GetUseExceptions();
   50183          25 :     if ( bLocalUseExceptions ) {
   50184          25 :       pushErrorHandler();
   50185             :     }
   50186          25 :     {
   50187          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50188          25 :       result = (int)ContourGenerateEx(arg1,arg2,arg3,arg4,arg5);
   50189          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50190             :     }
   50191          25 :     if ( bLocalUseExceptions ) {
   50192          25 :       popErrorHandler();
   50193             :     }
   50194             : #ifndef SED_HACKS
   50195             :     if ( bLocalUseExceptions ) {
   50196             :       CPLErr eclass = CPLGetLastErrorType();
   50197             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50198             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50199             :       }
   50200             :     }
   50201             : #endif
   50202             :   }
   50203          25 :   resultobj = SWIG_From_int(static_cast< int >(result));
   50204          25 :   {
   50205             :     /* %typemap(freearg) char **dict */
   50206          25 :     CSLDestroy( arg3 );
   50207             :   }
   50208          25 :   {
   50209             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50210             :     
   50211          25 :     CPLFree(psProgressInfo);
   50212             :     
   50213             :   }
   50214          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; } }
   50215             :   return resultobj;
   50216           0 : fail:
   50217           0 :   {
   50218             :     /* %typemap(freearg) char **dict */
   50219           0 :     CSLDestroy( arg3 );
   50220             :   }
   50221           0 :   {
   50222             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50223             :     
   50224           0 :     CPLFree(psProgressInfo);
   50225             :     
   50226             :   }
   50227             :   return NULL;
   50228             : }
   50229             : 
   50230             : 
   50231           0 : SWIGINTERN PyObject *_wrap_ViewshedGenerate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   50232           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50233           0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   50234           0 :   char *arg2 = (char *) 0 ;
   50235           0 :   char *arg3 = (char *) 0 ;
   50236           0 :   char **arg4 = (char **) 0 ;
   50237           0 :   double arg5 ;
   50238           0 :   double arg6 ;
   50239           0 :   double arg7 ;
   50240           0 :   double arg8 ;
   50241           0 :   double arg9 ;
   50242           0 :   double arg10 ;
   50243           0 :   double arg11 ;
   50244           0 :   double arg12 ;
   50245           0 :   double arg13 ;
   50246           0 :   GDALViewshedMode arg14 ;
   50247           0 :   double arg15 ;
   50248           0 :   GDALProgressFunc arg16 = (GDALProgressFunc) NULL ;
   50249           0 :   void *arg17 = (void *) NULL ;
   50250           0 :   GDALViewshedOutputType arg18 = (GDALViewshedOutputType) GVOT_NORMAL ;
   50251           0 :   char **arg19 = (char **) NULL ;
   50252           0 :   void *argp1 = 0 ;
   50253           0 :   int res1 = 0 ;
   50254           0 :   int res2 ;
   50255           0 :   char *buf2 = 0 ;
   50256           0 :   int alloc2 = 0 ;
   50257           0 :   int res3 ;
   50258           0 :   char *buf3 = 0 ;
   50259           0 :   int alloc3 = 0 ;
   50260           0 :   double val5 ;
   50261           0 :   int ecode5 = 0 ;
   50262           0 :   double val6 ;
   50263           0 :   int ecode6 = 0 ;
   50264           0 :   double val7 ;
   50265           0 :   int ecode7 = 0 ;
   50266           0 :   double val8 ;
   50267           0 :   int ecode8 = 0 ;
   50268           0 :   double val9 ;
   50269           0 :   int ecode9 = 0 ;
   50270           0 :   double val10 ;
   50271           0 :   int ecode10 = 0 ;
   50272           0 :   double val11 ;
   50273           0 :   int ecode11 = 0 ;
   50274           0 :   double val12 ;
   50275           0 :   int ecode12 = 0 ;
   50276           0 :   double val13 ;
   50277           0 :   int ecode13 = 0 ;
   50278           0 :   int val14 ;
   50279           0 :   int ecode14 = 0 ;
   50280           0 :   double val15 ;
   50281           0 :   int ecode15 = 0 ;
   50282           0 :   int val18 ;
   50283           0 :   int ecode18 = 0 ;
   50284           0 :   PyObject * obj0 = 0 ;
   50285           0 :   PyObject * obj1 = 0 ;
   50286           0 :   PyObject * obj2 = 0 ;
   50287           0 :   PyObject * obj3 = 0 ;
   50288           0 :   PyObject * obj4 = 0 ;
   50289           0 :   PyObject * obj5 = 0 ;
   50290           0 :   PyObject * obj6 = 0 ;
   50291           0 :   PyObject * obj7 = 0 ;
   50292           0 :   PyObject * obj8 = 0 ;
   50293           0 :   PyObject * obj9 = 0 ;
   50294           0 :   PyObject * obj10 = 0 ;
   50295           0 :   PyObject * obj11 = 0 ;
   50296           0 :   PyObject * obj12 = 0 ;
   50297           0 :   PyObject * obj13 = 0 ;
   50298           0 :   PyObject * obj14 = 0 ;
   50299           0 :   PyObject * obj15 = 0 ;
   50300           0 :   PyObject * obj16 = 0 ;
   50301           0 :   PyObject * obj17 = 0 ;
   50302           0 :   PyObject * obj18 = 0 ;
   50303           0 :   char * kwnames[] = {
   50304             :     (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 
   50305             :   };
   50306           0 :   GDALDatasetShadow *result = 0 ;
   50307             :   
   50308             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   50309           0 :   PyProgressData *psProgressInfo;
   50310           0 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   50311           0 :   psProgressInfo->nLastReported = -1;
   50312           0 :   psProgressInfo->psPyCallback = NULL;
   50313           0 :   psProgressInfo->psPyCallbackData = NULL;
   50314           0 :   arg17 = psProgressInfo;
   50315           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;
   50316           0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50317           0 :   if (!SWIG_IsOK(res1)) {
   50318           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewshedGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   50319             :   }
   50320           0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   50321           0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   50322           0 :   if (!SWIG_IsOK(res2)) {
   50323           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewshedGenerate" "', argument " "2"" of type '" "char const *""'");
   50324             :   }
   50325           0 :   arg2 = reinterpret_cast< char * >(buf2);
   50326           0 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   50327           0 :   if (!SWIG_IsOK(res3)) {
   50328           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewshedGenerate" "', argument " "3"" of type '" "char const *""'");
   50329             :   }
   50330           0 :   arg3 = reinterpret_cast< char * >(buf3);
   50331           0 :   {
   50332             :     /* %typemap(in) char **dict */
   50333           0 :     arg4 = NULL;
   50334           0 :     if ( PySequence_Check( obj3 ) ) {
   50335           0 :       int bErr = FALSE;
   50336           0 :       arg4 = CSLFromPySequence(obj3, &bErr);
   50337           0 :       if ( bErr )
   50338             :       {
   50339           0 :         SWIG_fail;
   50340             :       }
   50341             :     }
   50342           0 :     else if ( PyMapping_Check( obj3 ) ) {
   50343           0 :       int bErr = FALSE;
   50344           0 :       arg4 = CSLFromPyMapping(obj3, &bErr);
   50345           0 :       if ( bErr )
   50346             :       {
   50347           0 :         SWIG_fail;
   50348             :       }
   50349             :     }
   50350             :     else {
   50351           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50352           0 :       SWIG_fail;
   50353             :     }
   50354             :   }
   50355           0 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   50356           0 :   if (!SWIG_IsOK(ecode5)) {
   50357           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ViewshedGenerate" "', argument " "5"" of type '" "double""'");
   50358             :   } 
   50359           0 :   arg5 = static_cast< double >(val5);
   50360           0 :   ecode6 = SWIG_AsVal_double(obj5, &val6);
   50361           0 :   if (!SWIG_IsOK(ecode6)) {
   50362           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ViewshedGenerate" "', argument " "6"" of type '" "double""'");
   50363             :   } 
   50364           0 :   arg6 = static_cast< double >(val6);
   50365           0 :   ecode7 = SWIG_AsVal_double(obj6, &val7);
   50366           0 :   if (!SWIG_IsOK(ecode7)) {
   50367           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ViewshedGenerate" "', argument " "7"" of type '" "double""'");
   50368             :   } 
   50369           0 :   arg7 = static_cast< double >(val7);
   50370           0 :   ecode8 = SWIG_AsVal_double(obj7, &val8);
   50371           0 :   if (!SWIG_IsOK(ecode8)) {
   50372           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "ViewshedGenerate" "', argument " "8"" of type '" "double""'");
   50373             :   } 
   50374           0 :   arg8 = static_cast< double >(val8);
   50375           0 :   ecode9 = SWIG_AsVal_double(obj8, &val9);
   50376           0 :   if (!SWIG_IsOK(ecode9)) {
   50377           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ViewshedGenerate" "', argument " "9"" of type '" "double""'");
   50378             :   } 
   50379           0 :   arg9 = static_cast< double >(val9);
   50380           0 :   ecode10 = SWIG_AsVal_double(obj9, &val10);
   50381           0 :   if (!SWIG_IsOK(ecode10)) {
   50382           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ViewshedGenerate" "', argument " "10"" of type '" "double""'");
   50383             :   } 
   50384           0 :   arg10 = static_cast< double >(val10);
   50385           0 :   ecode11 = SWIG_AsVal_double(obj10, &val11);
   50386           0 :   if (!SWIG_IsOK(ecode11)) {
   50387           0 :     SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "ViewshedGenerate" "', argument " "11"" of type '" "double""'");
   50388             :   } 
   50389           0 :   arg11 = static_cast< double >(val11);
   50390           0 :   ecode12 = SWIG_AsVal_double(obj11, &val12);
   50391           0 :   if (!SWIG_IsOK(ecode12)) {
   50392           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "ViewshedGenerate" "', argument " "12"" of type '" "double""'");
   50393             :   } 
   50394           0 :   arg12 = static_cast< double >(val12);
   50395           0 :   ecode13 = SWIG_AsVal_double(obj12, &val13);
   50396           0 :   if (!SWIG_IsOK(ecode13)) {
   50397           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "ViewshedGenerate" "', argument " "13"" of type '" "double""'");
   50398             :   } 
   50399           0 :   arg13 = static_cast< double >(val13);
   50400           0 :   ecode14 = SWIG_AsVal_int(obj13, &val14);
   50401           0 :   if (!SWIG_IsOK(ecode14)) {
   50402           0 :     SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "ViewshedGenerate" "', argument " "14"" of type '" "GDALViewshedMode""'");
   50403             :   } 
   50404           0 :   arg14 = static_cast< GDALViewshedMode >(val14);
   50405           0 :   ecode15 = SWIG_AsVal_double(obj14, &val15);
   50406           0 :   if (!SWIG_IsOK(ecode15)) {
   50407           0 :     SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "ViewshedGenerate" "', argument " "15"" of type '" "double""'");
   50408             :   } 
   50409           0 :   arg15 = static_cast< double >(val15);
   50410           0 :   if (obj15) {
   50411           0 :     {
   50412             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   50413             :       /* callback_func typemap */
   50414             :       
   50415             :       /* In some cases 0 is passed instead of None. */
   50416             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   50417           0 :       if ( PyLong_Check(obj15) || PyInt_Check(obj15) )
   50418             :       {
   50419           0 :         if( PyLong_AsLong(obj15) == 0 )
   50420             :         {
   50421           0 :           obj15 = Py_None;
   50422             :         }
   50423             :       }
   50424             :       
   50425           0 :       if (obj15 && obj15 != Py_None ) {
   50426           0 :         void* cbfunction = NULL;
   50427           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj15,
   50428             :             (void**)&cbfunction,
   50429             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   50430             :             SWIG_POINTER_EXCEPTION | 0 ));
   50431             :         
   50432           0 :         if ( cbfunction == GDALTermProgress ) {
   50433             :           arg16 = GDALTermProgress;
   50434             :         } else {
   50435           0 :           if (!PyCallable_Check(obj15)) {
   50436           0 :             PyErr_SetString( PyExc_RuntimeError,
   50437             :               "Object given is not a Python function" );
   50438           0 :             SWIG_fail;
   50439             :           }
   50440           0 :           psProgressInfo->psPyCallback = obj15;
   50441           0 :           arg16 = PyProgressProxy;
   50442             :         }
   50443             :         
   50444             :       }
   50445             :       
   50446             :     }
   50447             :   }
   50448           0 :   if (obj16) {
   50449           0 :     {
   50450             :       /* %typemap(in) ( void* callback_data=NULL)  */
   50451           0 :       psProgressInfo->psPyCallbackData = obj16 ;
   50452             :     }
   50453             :   }
   50454           0 :   if (obj17) {
   50455           0 :     ecode18 = SWIG_AsVal_int(obj17, &val18);
   50456           0 :     if (!SWIG_IsOK(ecode18)) {
   50457           0 :       SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "ViewshedGenerate" "', argument " "18"" of type '" "GDALViewshedOutputType""'");
   50458             :     } 
   50459           0 :     arg18 = static_cast< GDALViewshedOutputType >(val18);
   50460             :   }
   50461           0 :   if (obj18) {
   50462           0 :     {
   50463             :       /* %typemap(in) char **dict */
   50464           0 :       arg19 = NULL;
   50465           0 :       if ( PySequence_Check( obj18 ) ) {
   50466           0 :         int bErr = FALSE;
   50467           0 :         arg19 = CSLFromPySequence(obj18, &bErr);
   50468           0 :         if ( bErr )
   50469             :         {
   50470           0 :           SWIG_fail;
   50471             :         }
   50472             :       }
   50473           0 :       else if ( PyMapping_Check( obj18 ) ) {
   50474           0 :         int bErr = FALSE;
   50475           0 :         arg19 = CSLFromPyMapping(obj18, &bErr);
   50476           0 :         if ( bErr )
   50477             :         {
   50478           0 :           SWIG_fail;
   50479             :         }
   50480             :       }
   50481             :       else {
   50482           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50483           0 :         SWIG_fail;
   50484             :       }
   50485             :     }
   50486             :   }
   50487           0 :   {
   50488           0 :     if (!arg1) {
   50489           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50490             :     }
   50491             :   }
   50492           0 :   {
   50493           0 :     const int bLocalUseExceptions = GetUseExceptions();
   50494           0 :     if ( bLocalUseExceptions ) {
   50495           0 :       pushErrorHandler();
   50496             :     }
   50497           0 :     {
   50498           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50499           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);
   50500           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50501             :     }
   50502           0 :     if ( bLocalUseExceptions ) {
   50503           0 :       popErrorHandler();
   50504             :     }
   50505             : #ifndef SED_HACKS
   50506             :     if ( bLocalUseExceptions ) {
   50507             :       CPLErr eclass = CPLGetLastErrorType();
   50508             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50509             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50510             :       }
   50511             :     }
   50512             : #endif
   50513             :   }
   50514           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   50515           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   50516           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   50517           0 :   {
   50518             :     /* %typemap(freearg) char **dict */
   50519           0 :     CSLDestroy( arg4 );
   50520             :   }
   50521           0 :   {
   50522             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50523             :     
   50524           0 :     CPLFree(psProgressInfo);
   50525             :     
   50526             :   }
   50527           0 :   {
   50528             :     /* %typemap(freearg) char **dict */
   50529           0 :     CSLDestroy( arg19 );
   50530             :   }
   50531           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; } }
   50532             :   return resultobj;
   50533           0 : fail:
   50534           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   50535           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   50536           0 :   {
   50537             :     /* %typemap(freearg) char **dict */
   50538           0 :     CSLDestroy( arg4 );
   50539             :   }
   50540           0 :   {
   50541             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50542             :     
   50543           0 :     CPLFree(psProgressInfo);
   50544             :     
   50545             :   }
   50546           0 :   {
   50547             :     /* %typemap(freearg) char **dict */
   50548           0 :     CSLDestroy( arg19 );
   50549             :   }
   50550             :   return NULL;
   50551             : }
   50552             : 
   50553             : 
   50554           6 : SWIGINTERN PyObject *_wrap_IsLineOfSightVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   50555           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50556           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   50557           6 :   int arg2 ;
   50558           6 :   int arg3 ;
   50559           6 :   double arg4 ;
   50560           6 :   int arg5 ;
   50561           6 :   int arg6 ;
   50562           6 :   double arg7 ;
   50563           6 :   bool *arg8 = (bool *) 0 ;
   50564           6 :   int *arg9 = (int *) 0 ;
   50565           6 :   int *arg10 = (int *) 0 ;
   50566           6 :   char **arg11 = (char **) NULL ;
   50567           6 :   void *argp1 = 0 ;
   50568           6 :   int res1 = 0 ;
   50569           6 :   int val2 ;
   50570           6 :   int ecode2 = 0 ;
   50571           6 :   int val3 ;
   50572           6 :   int ecode3 = 0 ;
   50573           6 :   double val4 ;
   50574           6 :   int ecode4 = 0 ;
   50575           6 :   int val5 ;
   50576           6 :   int ecode5 = 0 ;
   50577           6 :   int val6 ;
   50578           6 :   int ecode6 = 0 ;
   50579           6 :   double val7 ;
   50580           6 :   int ecode7 = 0 ;
   50581           6 :   bool visible8 = 0 ;
   50582           6 :   int nxintersection8 = 0 ;
   50583           6 :   int nyintersection8 = 0 ;
   50584           6 :   PyObject * obj0 = 0 ;
   50585           6 :   PyObject * obj1 = 0 ;
   50586           6 :   PyObject * obj2 = 0 ;
   50587           6 :   PyObject * obj3 = 0 ;
   50588           6 :   PyObject * obj4 = 0 ;
   50589           6 :   PyObject * obj5 = 0 ;
   50590           6 :   PyObject * obj6 = 0 ;
   50591           6 :   PyObject * obj7 = 0 ;
   50592           6 :   char * kwnames[] = {
   50593             :     (char *)"band",  (char *)"xA",  (char *)"yA",  (char *)"zA",  (char *)"xB",  (char *)"yB",  (char *)"zB",  (char *)"options",  NULL 
   50594             :   };
   50595             :   
   50596           6 :   {
   50597             :     /* %typemap(in) (bool *pbVisible, int *pnXIntersection, int *pnYIntersection) */
   50598           6 :     arg8 = &visible8;
   50599           6 :     arg9 = &nxintersection8;
   50600           6 :     arg10 = &nyintersection8;
   50601             :   }
   50602           6 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO|O:IsLineOfSightVisible", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   50603           6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50604           6 :   if (!SWIG_IsOK(res1)) {
   50605           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IsLineOfSightVisible" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   50606             :   }
   50607           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   50608           6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   50609           6 :   if (!SWIG_IsOK(ecode2)) {
   50610           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IsLineOfSightVisible" "', argument " "2"" of type '" "int""'");
   50611             :   } 
   50612           6 :   arg2 = static_cast< int >(val2);
   50613           6 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   50614           6 :   if (!SWIG_IsOK(ecode3)) {
   50615           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IsLineOfSightVisible" "', argument " "3"" of type '" "int""'");
   50616             :   } 
   50617           6 :   arg3 = static_cast< int >(val3);
   50618           6 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   50619           6 :   if (!SWIG_IsOK(ecode4)) {
   50620           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IsLineOfSightVisible" "', argument " "4"" of type '" "double""'");
   50621             :   } 
   50622           6 :   arg4 = static_cast< double >(val4);
   50623           6 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   50624           6 :   if (!SWIG_IsOK(ecode5)) {
   50625           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IsLineOfSightVisible" "', argument " "5"" of type '" "int""'");
   50626             :   } 
   50627           6 :   arg5 = static_cast< int >(val5);
   50628           6 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   50629           6 :   if (!SWIG_IsOK(ecode6)) {
   50630           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "IsLineOfSightVisible" "', argument " "6"" of type '" "int""'");
   50631             :   } 
   50632           6 :   arg6 = static_cast< int >(val6);
   50633           6 :   ecode7 = SWIG_AsVal_double(obj6, &val7);
   50634           6 :   if (!SWIG_IsOK(ecode7)) {
   50635           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "IsLineOfSightVisible" "', argument " "7"" of type '" "double""'");
   50636             :   } 
   50637           6 :   arg7 = static_cast< double >(val7);
   50638           6 :   if (obj7) {
   50639           0 :     {
   50640             :       /* %typemap(in) char **dict */
   50641           0 :       arg11 = NULL;
   50642           0 :       if ( PySequence_Check( obj7 ) ) {
   50643           0 :         int bErr = FALSE;
   50644           0 :         arg11 = CSLFromPySequence(obj7, &bErr);
   50645           0 :         if ( bErr )
   50646             :         {
   50647           0 :           SWIG_fail;
   50648             :         }
   50649             :       }
   50650           0 :       else if ( PyMapping_Check( obj7 ) ) {
   50651           0 :         int bErr = FALSE;
   50652           0 :         arg11 = CSLFromPyMapping(obj7, &bErr);
   50653           0 :         if ( bErr )
   50654             :         {
   50655           0 :           SWIG_fail;
   50656             :         }
   50657             :       }
   50658             :       else {
   50659           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50660           0 :         SWIG_fail;
   50661             :       }
   50662             :     }
   50663             :   }
   50664           6 :   {
   50665           6 :     if (!arg1) {
   50666           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50667             :     }
   50668             :   }
   50669           5 :   {
   50670           5 :     const int bLocalUseExceptions = GetUseExceptions();
   50671           5 :     if ( bLocalUseExceptions ) {
   50672           5 :       pushErrorHandler();
   50673             :     }
   50674           5 :     {
   50675           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50676           5 :       IsLineOfSightVisible(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   50677           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50678             :     }
   50679           5 :     if ( bLocalUseExceptions ) {
   50680           5 :       popErrorHandler();
   50681             :     }
   50682             : #ifndef SED_HACKS
   50683             :     if ( bLocalUseExceptions ) {
   50684             :       CPLErr eclass = CPLGetLastErrorType();
   50685             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50686             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50687             :       }
   50688             :     }
   50689             : #endif
   50690             :   }
   50691           5 :   resultobj = SWIG_Py_Void();
   50692           5 :   {
   50693             :     /* %typemap(argout) (bool *pbVisible, int *pnXIntersection, int *pnYIntersection)  */
   50694           5 :     PyObject *r = PyTuple_New( 3 );
   50695           5 :     PyTuple_SetItem( r, 0, PyBool_FromLong(*arg8) );
   50696           5 :     PyTuple_SetItem( r, 1, PyLong_FromLong(*arg9) );
   50697           5 :     PyTuple_SetItem( r, 2, PyLong_FromLong(*arg10) );
   50698             : #if SWIG_VERSION >= 0x040300
   50699             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   50700             : #else
   50701           5 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   50702             : #endif
   50703             :   }
   50704           5 :   {
   50705             :     /* %typemap(freearg) char **dict */
   50706           5 :     CSLDestroy( arg11 );
   50707             :   }
   50708           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; } }
   50709             :   return resultobj;
   50710           1 : fail:
   50711           1 :   {
   50712             :     /* %typemap(freearg) char **dict */
   50713           1 :     CSLDestroy( arg11 );
   50714             :   }
   50715             :   return NULL;
   50716             : }
   50717             : 
   50718             : 
   50719          24 : SWIGINTERN PyObject *_wrap_AutoCreateWarpedVRT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50720          24 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50721          24 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   50722          24 :   char *arg2 = (char *) 0 ;
   50723          24 :   char *arg3 = (char *) 0 ;
   50724          24 :   GDALResampleAlg arg4 = (GDALResampleAlg) GRA_NearestNeighbour ;
   50725          24 :   double arg5 = (double) 0.0 ;
   50726          24 :   void *argp1 = 0 ;
   50727          24 :   int res1 = 0 ;
   50728          24 :   int res2 ;
   50729          24 :   char *buf2 = 0 ;
   50730          24 :   int alloc2 = 0 ;
   50731          24 :   int res3 ;
   50732          24 :   char *buf3 = 0 ;
   50733          24 :   int alloc3 = 0 ;
   50734          24 :   int val4 ;
   50735          24 :   int ecode4 = 0 ;
   50736          24 :   double val5 ;
   50737          24 :   int ecode5 = 0 ;
   50738          24 :   PyObject *swig_obj[5] ;
   50739          24 :   GDALDatasetShadow *result = 0 ;
   50740             :   
   50741          24 :   if (!SWIG_Python_UnpackTuple(args, "AutoCreateWarpedVRT", 1, 5, swig_obj)) SWIG_fail;
   50742          24 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   50743          24 :   if (!SWIG_IsOK(res1)) {
   50744           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoCreateWarpedVRT" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   50745             :   }
   50746          24 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   50747          24 :   if (swig_obj[1]) {
   50748           9 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   50749           9 :     if (!SWIG_IsOK(res2)) {
   50750           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoCreateWarpedVRT" "', argument " "2"" of type '" "char const *""'");
   50751             :     }
   50752           9 :     arg2 = reinterpret_cast< char * >(buf2);
   50753             :   }
   50754          24 :   if (swig_obj[2]) {
   50755           9 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   50756           9 :     if (!SWIG_IsOK(res3)) {
   50757           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AutoCreateWarpedVRT" "', argument " "3"" of type '" "char const *""'");
   50758             :     }
   50759           9 :     arg3 = reinterpret_cast< char * >(buf3);
   50760             :   }
   50761          24 :   if (swig_obj[3]) {
   50762           3 :     ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   50763           3 :     if (!SWIG_IsOK(ecode4)) {
   50764           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AutoCreateWarpedVRT" "', argument " "4"" of type '" "GDALResampleAlg""'");
   50765             :     } 
   50766           3 :     arg4 = static_cast< GDALResampleAlg >(val4);
   50767             :   }
   50768          24 :   if (swig_obj[4]) {
   50769           3 :     ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   50770           3 :     if (!SWIG_IsOK(ecode5)) {
   50771           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "AutoCreateWarpedVRT" "', argument " "5"" of type '" "double""'");
   50772             :     } 
   50773           3 :     arg5 = static_cast< double >(val5);
   50774             :   }
   50775          24 :   {
   50776          24 :     if (!arg1) {
   50777           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50778             :     }
   50779             :   }
   50780          24 :   {
   50781          24 :     const int bLocalUseExceptions = GetUseExceptions();
   50782          24 :     if ( bLocalUseExceptions ) {
   50783          24 :       pushErrorHandler();
   50784             :     }
   50785          24 :     {
   50786          24 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50787          24 :       result = (GDALDatasetShadow *)AutoCreateWarpedVRT(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
   50788          24 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50789             :     }
   50790          24 :     if ( bLocalUseExceptions ) {
   50791          24 :       popErrorHandler();
   50792             :     }
   50793             : #ifndef SED_HACKS
   50794             :     if ( bLocalUseExceptions ) {
   50795             :       CPLErr eclass = CPLGetLastErrorType();
   50796             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50797             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50798             :       }
   50799             :     }
   50800             : #endif
   50801             :   }
   50802          24 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   50803          24 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   50804          24 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   50805          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; } }
   50806             :   return resultobj;
   50807           0 : fail:
   50808           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   50809           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   50810             :   return NULL;
   50811             : }
   50812             : 
   50813             : 
   50814           8 : SWIGINTERN PyObject *_wrap_CreatePansharpenedVRT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50815           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50816           8 :   char *arg1 = (char *) 0 ;
   50817           8 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   50818           8 :   int arg3 ;
   50819           8 :   GDALRasterBandShadow **arg4 = (GDALRasterBandShadow **) 0 ;
   50820           8 :   int res1 ;
   50821           8 :   char *buf1 = 0 ;
   50822           8 :   int alloc1 = 0 ;
   50823           8 :   void *argp2 = 0 ;
   50824           8 :   int res2 = 0 ;
   50825           8 :   PyObject *swig_obj[3] ;
   50826           8 :   GDALDatasetShadow *result = 0 ;
   50827             :   
   50828           8 :   if (!SWIG_Python_UnpackTuple(args, "CreatePansharpenedVRT", 3, 3, swig_obj)) SWIG_fail;
   50829           8 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   50830           8 :   if (!SWIG_IsOK(res1)) {
   50831           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreatePansharpenedVRT" "', argument " "1"" of type '" "char const *""'");
   50832             :   }
   50833           8 :   arg1 = reinterpret_cast< char * >(buf1);
   50834           8 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50835           8 :   if (!SWIG_IsOK(res2)) {
   50836           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreatePansharpenedVRT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   50837             :   }
   50838           8 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   50839           8 :   {
   50840             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   50841           8 :     if ( !PySequence_Check(swig_obj[2]) ) {
   50842           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   50843           0 :       SWIG_fail;
   50844             :     }
   50845           8 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   50846           8 :     if( size > (Py_ssize_t)INT_MAX ) {
   50847           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   50848           0 :       SWIG_fail;
   50849             :     }
   50850           8 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   50851           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   50852           0 :       SWIG_fail;
   50853             :     }
   50854           8 :     arg3 = (int)size;
   50855           8 :     arg4 = (GDALRasterBandShadow**) VSIMalloc(arg3*sizeof(GDALRasterBandShadow*));
   50856           8 :     if( !arg4) {
   50857           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   50858           0 :       SWIG_fail;
   50859             :     }
   50860             :     
   50861          30 :     for( int i = 0; i<arg3; i++ ) {
   50862          22 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   50863          22 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   50864          22 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   50865          22 :       if (!rawobjectpointer) {
   50866           0 :         Py_DECREF(o);
   50867           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   50868           0 :         SWIG_fail;
   50869             :       }
   50870          22 :       arg4[i] = rawobjectpointer;
   50871          22 :       Py_DECREF(o);
   50872             :       
   50873             :     }
   50874             :   }
   50875           8 :   {
   50876           8 :     if (!arg2) {
   50877           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50878             :     }
   50879             :   }
   50880           8 :   {
   50881           8 :     const int bLocalUseExceptions = GetUseExceptions();
   50882           8 :     if ( bLocalUseExceptions ) {
   50883           2 :       pushErrorHandler();
   50884             :     }
   50885           8 :     {
   50886           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50887           8 :       result = (GDALDatasetShadow *)CreatePansharpenedVRT((char const *)arg1,arg2,arg3,arg4);
   50888           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50889             :     }
   50890           8 :     if ( bLocalUseExceptions ) {
   50891           2 :       popErrorHandler();
   50892             :     }
   50893             : #ifndef SED_HACKS
   50894             :     if ( bLocalUseExceptions ) {
   50895             :       CPLErr eclass = CPLGetLastErrorType();
   50896             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50897             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50898             :       }
   50899             :     }
   50900             : #endif
   50901             :   }
   50902           8 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   50903           8 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   50904           8 :   {
   50905             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   50906           8 :     CPLFree( arg4 );
   50907             :   }
   50908           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; } }
   50909             :   return resultobj;
   50910           0 : fail:
   50911           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   50912           0 :   {
   50913             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   50914           0 :     CPLFree( arg4 );
   50915             :   }
   50916             :   return NULL;
   50917             : }
   50918             : 
   50919             : 
   50920           1 : SWIGINTERN PyObject *_wrap_GetTranformerOptionList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50921           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50922           1 :   char *result = 0 ;
   50923             :   
   50924           1 :   if (!SWIG_Python_UnpackTuple(args, "GetTranformerOptionList", 0, 0, 0)) SWIG_fail;
   50925           1 :   {
   50926           1 :     const int bLocalUseExceptions = GetUseExceptions();
   50927           1 :     if ( bLocalUseExceptions ) {
   50928           1 :       pushErrorHandler();
   50929             :     }
   50930           1 :     {
   50931           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50932           1 :       result = (char *)GDALGetGenImgProjTranformerOptionList();
   50933           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50934             :     }
   50935           1 :     if ( bLocalUseExceptions ) {
   50936           1 :       popErrorHandler();
   50937             :     }
   50938             : #ifndef SED_HACKS
   50939             :     if ( bLocalUseExceptions ) {
   50940             :       CPLErr eclass = CPLGetLastErrorType();
   50941             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50942             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50943             :       }
   50944             :     }
   50945             : #endif
   50946             :   }
   50947           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   50948           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; } }
   50949             :   return resultobj;
   50950           0 : fail:
   50951           0 :   return NULL;
   50952             : }
   50953             : 
   50954             : 
   50955          71 : SWIGINTERN PyObject *_wrap_delete_GDALTransformerInfoShadow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50956          71 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50957          71 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   50958          71 :   void *argp1 = 0 ;
   50959          71 :   int res1 = 0 ;
   50960          71 :   PyObject *swig_obj[1] ;
   50961             :   
   50962          71 :   if (!args) SWIG_fail;
   50963          71 :   swig_obj[0] = args;
   50964          71 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_DISOWN |  0 );
   50965          71 :   if (!SWIG_IsOK(res1)) {
   50966           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTransformerInfoShadow" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   50967             :   }
   50968          71 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   50969          71 :   {
   50970          71 :     const int bLocalUseExceptions = GetUseExceptions();
   50971          71 :     if ( bLocalUseExceptions ) {
   50972          69 :       pushErrorHandler();
   50973             :     }
   50974          71 :     {
   50975          71 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50976          71 :       delete_GDALTransformerInfoShadow(arg1);
   50977          71 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50978             :     }
   50979          71 :     if ( bLocalUseExceptions ) {
   50980          69 :       popErrorHandler();
   50981             :     }
   50982             : #ifndef SED_HACKS
   50983             :     if ( bLocalUseExceptions ) {
   50984             :       CPLErr eclass = CPLGetLastErrorType();
   50985             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50986             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50987             :       }
   50988             :     }
   50989             : #endif
   50990             :   }
   50991          71 :   resultobj = SWIG_Py_Void();
   50992          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; } }
   50993             :   return resultobj;
   50994             : fail:
   50995             :   return NULL;
   50996             : }
   50997             : 
   50998             : 
   50999             : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   51000             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51001             :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   51002             :   int arg2 ;
   51003             :   double *arg3 ;
   51004             :   void *argp1 = 0 ;
   51005             :   int res1 = 0 ;
   51006             :   int val2 ;
   51007             :   int ecode2 = 0 ;
   51008             :   double argin3[3] ;
   51009             :   int result;
   51010             :   
   51011             :   if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
   51012             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   51013             :   if (!SWIG_IsOK(res1)) {
   51014             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   51015             :   }
   51016             :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   51017             :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   51018             :   if (!SWIG_IsOK(ecode2)) {
   51019             :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "2"" of type '" "int""'");
   51020             :   } 
   51021             :   arg2 = static_cast< int >(val2);
   51022             :   {
   51023             :     /* %typemap(in) (double argin3[ANY]) */
   51024             :     arg3 = argin3;
   51025             :     if (! PySequence_Check(swig_obj[2]) ) {
   51026             :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   51027             :       SWIG_fail;
   51028             :     }
   51029             :     Py_ssize_t seq_size = PySequence_Size(swig_obj[2]);
   51030             :     if ( seq_size != 3 ) {
   51031             :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   51032             :       SWIG_fail;
   51033             :     }
   51034             :     for (unsigned int i=0; i<3; i++) {
   51035             :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   51036             :       double val;
   51037             :       if ( !PyArg_Parse(o, "d", &val ) ) {
   51038             :         PyErr_SetString(PyExc_TypeError, "not a number");
   51039             :         Py_DECREF(o);
   51040             :         SWIG_fail;
   51041             :       }
   51042             :       arg3[i] =  val;
   51043             :       Py_DECREF(o);
   51044             :     }
   51045             :   }
   51046             :   {
   51047             :     const int bLocalUseExceptions = GetUseExceptions();
   51048             :     if ( bLocalUseExceptions ) {
   51049             :       pushErrorHandler();
   51050             :     }
   51051             :     {
   51052             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51053             :       result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_0(arg1,arg2,arg3);
   51054             :       SWIG_PYTHON_THREAD_END_ALLOW;
   51055             :     }
   51056             :     if ( bLocalUseExceptions ) {
   51057             :       popErrorHandler();
   51058             :     }
   51059             : #ifndef SED_HACKS
   51060             :     if ( bLocalUseExceptions ) {
   51061             :       CPLErr eclass = CPLGetLastErrorType();
   51062             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51063             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51064             :       }
   51065             :     }
   51066             : #endif
   51067             :   }
   51068             :   resultobj = SWIG_From_int(static_cast< int >(result));
   51069             :   {
   51070             :     /* %typemap(argout) (double argout[ANY]) */
   51071             :     PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
   51072             : #if SWIG_VERSION >= 0x040300
   51073             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   51074             : #else
   51075             :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   51076             : #endif
   51077             :   }
   51078             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51079             :   return resultobj;
   51080             : fail:
   51081             :   return NULL;
   51082             : }
   51083             : 
   51084             : 
   51085             : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   51086             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51087             :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   51088             :   double *arg2 ;
   51089             :   int arg3 ;
   51090             :   double arg4 ;
   51091             :   double arg5 ;
   51092             :   double arg6 = (double) 0.0 ;
   51093             :   void *argp1 = 0 ;
   51094             :   int res1 = 0 ;
   51095             :   double argout2[3] ;
   51096             :   int val3 ;
   51097             :   int ecode3 = 0 ;
   51098             :   double val4 ;
   51099             :   int ecode4 = 0 ;
   51100             :   double val5 ;
   51101             :   int ecode5 = 0 ;
   51102             :   double val6 ;
   51103             :   int ecode6 = 0 ;
   51104             :   int result;
   51105             :   
   51106             :   {
   51107             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   51108             :     memset(argout2, 0, sizeof(argout2));
   51109             :     arg2 = argout2;
   51110             :   }
   51111             :   if ((nobjs < 4) || (nobjs > 5)) SWIG_fail;
   51112             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   51113             :   if (!SWIG_IsOK(res1)) {
   51114             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   51115             :   }
   51116             :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   51117             :   ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   51118             :   if (!SWIG_IsOK(ecode3)) {
   51119             :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "3"" of type '" "int""'");
   51120             :   } 
   51121             :   arg3 = static_cast< int >(val3);
   51122             :   ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
   51123             :   if (!SWIG_IsOK(ecode4)) {
   51124             :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "4"" of type '" "double""'");
   51125             :   } 
   51126             :   arg4 = static_cast< double >(val4);
   51127             :   ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
   51128             :   if (!SWIG_IsOK(ecode5)) {
   51129             :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "5"" of type '" "double""'");
   51130             :   } 
   51131             :   arg5 = static_cast< double >(val5);
   51132             :   if (swig_obj[4]) {
   51133             :     ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
   51134             :     if (!SWIG_IsOK(ecode6)) {
   51135             :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "6"" of type '" "double""'");
   51136             :     } 
   51137             :     arg6 = static_cast< double >(val6);
   51138             :   }
   51139             :   {
   51140             :     const int bLocalUseExceptions = GetUseExceptions();
   51141             :     if ( bLocalUseExceptions ) {
   51142             :       pushErrorHandler();
   51143             :     }
   51144             :     {
   51145             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51146             :       result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
   51147             :       SWIG_PYTHON_THREAD_END_ALLOW;
   51148             :     }
   51149             :     if ( bLocalUseExceptions ) {
   51150             :       popErrorHandler();
   51151             :     }
   51152             : #ifndef SED_HACKS
   51153             :     if ( bLocalUseExceptions ) {
   51154             :       CPLErr eclass = CPLGetLastErrorType();
   51155             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51156             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51157             :       }
   51158             :     }
   51159             : #endif
   51160             :   }
   51161             :   resultobj = SWIG_From_int(static_cast< int >(result));
   51162             :   {
   51163             :     /* %typemap(argout) (double argout[ANY]) */
   51164             :     PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
   51165             : #if SWIG_VERSION >= 0x040300
   51166             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   51167             : #else
   51168             :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   51169             : #endif
   51170             :   }
   51171             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51172             :   return resultobj;
   51173             : fail:
   51174             :   return NULL;
   51175             : }
   51176             : 
   51177             : 
   51178        8677 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint(PyObject *self, PyObject *args) {
   51179        8677 :   Py_ssize_t argc;
   51180        8677 :   PyObject *argv[6] = {
   51181             :     0
   51182             :   };
   51183             :   
   51184        8677 :   if (!(argc = SWIG_Python_UnpackTuple(args, "GDALTransformerInfoShadow_TransformPoint", 0, 5, argv))) SWIG_fail;
   51185        8677 :   --argc;
   51186        8677 :   if (argc == 3) {
   51187           0 :     int _v;
   51188           0 :     void *vptr = 0;
   51189           0 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   51190           0 :     _v = SWIG_CheckState(res);
   51191           0 :     if (_v) {
   51192           0 :       {
   51193           0 :         int res = SWIG_AsVal_int(argv[1], NULL);
   51194           0 :         _v = SWIG_CheckState(res);
   51195             :       }
   51196           0 :       if (_v) {
   51197           0 :         void *vptr = 0;
   51198           0 :         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
   51199           0 :         _v = SWIG_CheckState(res);
   51200           0 :         if (_v) {
   51201           0 :           return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_0(self, argc, argv);
   51202             :         }
   51203             :       }
   51204             :     }
   51205             :   }
   51206        8677 :   if ((argc >= 4) && (argc <= 5)) {
   51207        8677 :     int _v;
   51208        8677 :     void *vptr = 0;
   51209        8677 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   51210        8677 :     _v = SWIG_CheckState(res);
   51211        8677 :     if (_v) {
   51212        8677 :       {
   51213        8677 :         int res = SWIG_AsVal_int(argv[1], NULL);
   51214        8677 :         _v = SWIG_CheckState(res);
   51215             :       }
   51216        8677 :       if (_v) {
   51217        8677 :         {
   51218        8677 :           int res = SWIG_AsVal_double(argv[2], NULL);
   51219        8677 :           _v = SWIG_CheckState(res);
   51220             :         }
   51221        8677 :         if (_v) {
   51222        8677 :           {
   51223        8677 :             int res = SWIG_AsVal_double(argv[3], NULL);
   51224        8677 :             _v = SWIG_CheckState(res);
   51225             :           }
   51226        8677 :           if (_v) {
   51227        8677 :             if (argc <= 4) {
   51228        8677 :               return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(self, argc, argv);
   51229             :             }
   51230          40 :             {
   51231          40 :               int res = SWIG_AsVal_double(argv[4], NULL);
   51232          40 :               _v = SWIG_CheckState(res);
   51233             :             }
   51234          40 :             if (_v) {
   51235          40 :               return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(self, argc, argv);
   51236             :             }
   51237             :           }
   51238             :         }
   51239             :       }
   51240             :     }
   51241             :   }
   51242             :   
   51243           0 : fail:
   51244           0 :   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GDALTransformerInfoShadow_TransformPoint'.\n"
   51245             :     "  Possible C/C++ prototypes are:\n"
   51246             :     "    GDALTransformerInfoShadow::TransformPoint(int,double [3])\n"
   51247             :     "    GDALTransformerInfoShadow::TransformPoint(double [3],int,double,double,double)\n");
   51248             :   return 0;
   51249             : }
   51250             : 
   51251             : 
   51252           4 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51253           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51254           4 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   51255           4 :   int arg2 ;
   51256           4 :   int arg3 ;
   51257           4 :   double *arg4 = (double *) 0 ;
   51258           4 :   double *arg5 = (double *) 0 ;
   51259           4 :   double *arg6 = (double *) 0 ;
   51260           4 :   int *arg7 = (int *) 0 ;
   51261           4 :   void *argp1 = 0 ;
   51262           4 :   int res1 = 0 ;
   51263           4 :   int val2 ;
   51264           4 :   int ecode2 = 0 ;
   51265           4 :   PyObject *swig_obj[3] ;
   51266           4 :   int result;
   51267             :   
   51268           4 :   if (!SWIG_Python_UnpackTuple(args, "GDALTransformerInfoShadow_TransformPoints", 3, 3, swig_obj)) SWIG_fail;
   51269           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   51270           4 :   if (!SWIG_IsOK(res1)) {
   51271           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoints" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   51272             :   }
   51273           4 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   51274           4 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   51275           4 :   if (!SWIG_IsOK(ecode2)) {
   51276           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDALTransformerInfoShadow_TransformPoints" "', argument " "2"" of type '" "int""'");
   51277             :   } 
   51278           4 :   arg2 = static_cast< int >(val2);
   51279           4 :   {
   51280             :     /*  typemap(in,numinputs=1) (int nCount, double *x, double *y, double *z, int* panSuccess) */
   51281           4 :     if ( !PySequence_Check(swig_obj[2]) ) {
   51282           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   51283           0 :       SWIG_fail;
   51284             :     }
   51285             :     
   51286           4 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   51287           4 :     if( size != (int)size ) {
   51288           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   51289           0 :       SWIG_fail;
   51290             :     }
   51291           4 :     arg3 = (int)size;
   51292           4 :     arg4 = (double*) VSIMalloc(arg3*sizeof(double));
   51293           4 :     arg5 = (double*) VSIMalloc(arg3*sizeof(double));
   51294           4 :     arg6 = (double*) VSIMalloc(arg3*sizeof(double));
   51295           4 :     arg7 = (int*) VSIMalloc(arg3*sizeof(int));
   51296             :     
   51297           4 :     if (arg4 == NULL || arg5 == NULL || arg6 == NULL || arg7 == NULL)
   51298             :     {
   51299           0 :       PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
   51300           0 :       SWIG_fail;
   51301             :     }
   51302             :     
   51303           4 :     if (!DecomposeSequenceOfCoordinates(swig_obj[2],arg3,arg4,arg5,arg6)) {
   51304           0 :       SWIG_fail;
   51305             :     }
   51306             :   }
   51307           4 :   {
   51308           4 :     const int bLocalUseExceptions = GetUseExceptions();
   51309           4 :     if ( bLocalUseExceptions ) {
   51310           4 :       pushErrorHandler();
   51311             :     }
   51312           4 :     {
   51313           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51314           4 :       result = (int)GDALTransformerInfoShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   51315           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51316             :     }
   51317           4 :     if ( bLocalUseExceptions ) {
   51318           4 :       popErrorHandler();
   51319             :     }
   51320             : #ifndef SED_HACKS
   51321             :     if ( bLocalUseExceptions ) {
   51322             :       CPLErr eclass = CPLGetLastErrorType();
   51323             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51324             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51325             :       }
   51326             :     }
   51327             : #endif
   51328             :   }
   51329           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51330           4 :   {
   51331             :     /* %typemap(argout)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   51332           4 :     Py_DECREF(resultobj);
   51333           4 :     PyObject *xyz = PyList_New( arg3 );
   51334           4 :     if( !xyz ) {
   51335           0 :       SWIG_fail;
   51336             :     }
   51337           4 :     PyObject *success = PyList_New( arg3 );
   51338           4 :     if( !success ) {
   51339           0 :       Py_DECREF(xyz);
   51340           0 :       SWIG_fail;
   51341             :     }
   51342          35 :     for( int i=0; i< arg3; i++ ) {
   51343          31 :       PyObject *tuple = PyTuple_New( 3 );
   51344          31 :       PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg4)[i] ) );
   51345          31 :       PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg5)[i] ) );
   51346          31 :       PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg6)[i] ) );
   51347          31 :       PyList_SetItem( xyz, i, tuple );
   51348          31 :       PyList_SetItem( success, i, Py_BuildValue( "i",  (arg7)[i]) );
   51349             :     }
   51350           4 :     resultobj = PyTuple_New( 2 );
   51351           4 :     PyTuple_SetItem( resultobj, 0, xyz );
   51352           4 :     PyTuple_SetItem( resultobj, 1, success );
   51353             :   }
   51354           4 :   {
   51355             :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   51356           4 :     VSIFree(arg4);
   51357           4 :     VSIFree(arg5);
   51358           4 :     VSIFree(arg6);
   51359           4 :     VSIFree(arg7);
   51360             :   }
   51361           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; } }
   51362             :   return resultobj;
   51363           0 : fail:
   51364           0 :   {
   51365             :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   51366           0 :     VSIFree(arg4);
   51367           0 :     VSIFree(arg5);
   51368           0 :     VSIFree(arg6);
   51369           0 :     VSIFree(arg7);
   51370             :   }
   51371             :   return NULL;
   51372             : }
   51373             : 
   51374             : 
   51375           1 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformGeolocations(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   51376           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51377           1 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   51378           1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   51379           1 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   51380           1 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   51381           1 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   51382           1 :   void *arg6 = (void *) NULL ;
   51383           1 :   char **arg7 = (char **) NULL ;
   51384           1 :   void *argp1 = 0 ;
   51385           1 :   int res1 = 0 ;
   51386           1 :   void *argp2 = 0 ;
   51387           1 :   int res2 = 0 ;
   51388           1 :   void *argp3 = 0 ;
   51389           1 :   int res3 = 0 ;
   51390           1 :   void *argp4 = 0 ;
   51391           1 :   int res4 = 0 ;
   51392           1 :   PyObject * obj0 = 0 ;
   51393           1 :   PyObject * obj1 = 0 ;
   51394           1 :   PyObject * obj2 = 0 ;
   51395           1 :   PyObject * obj3 = 0 ;
   51396           1 :   PyObject * obj4 = 0 ;
   51397           1 :   PyObject * obj5 = 0 ;
   51398           1 :   PyObject * obj6 = 0 ;
   51399           1 :   char * kwnames[] = {
   51400             :     (char *)"self",  (char *)"xBand",  (char *)"yBand",  (char *)"zBand",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   51401             :   };
   51402           1 :   int result;
   51403             :   
   51404             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   51405           1 :   PyProgressData *psProgressInfo;
   51406           1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   51407           1 :   psProgressInfo->nLastReported = -1;
   51408           1 :   psProgressInfo->psPyCallback = NULL;
   51409           1 :   psProgressInfo->psPyCallbackData = NULL;
   51410           1 :   arg6 = psProgressInfo;
   51411           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:GDALTransformerInfoShadow_TransformGeolocations", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   51412           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   51413           1 :   if (!SWIG_IsOK(res1)) {
   51414           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   51415             :   }
   51416           1 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   51417           1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   51418           1 :   if (!SWIG_IsOK(res2)) {
   51419           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   51420             :   }
   51421           1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   51422           1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   51423           1 :   if (!SWIG_IsOK(res3)) {
   51424           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   51425             :   }
   51426           1 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   51427           1 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   51428           1 :   if (!SWIG_IsOK(res4)) {
   51429           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   51430             :   }
   51431           1 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   51432           1 :   if (obj4) {
   51433           0 :     {
   51434             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   51435             :       /* callback_func typemap */
   51436             :       
   51437             :       /* In some cases 0 is passed instead of None. */
   51438             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   51439           0 :       if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
   51440             :       {
   51441           0 :         if( PyLong_AsLong(obj4) == 0 )
   51442             :         {
   51443           0 :           obj4 = Py_None;
   51444             :         }
   51445             :       }
   51446             :       
   51447           0 :       if (obj4 && obj4 != Py_None ) {
   51448           0 :         void* cbfunction = NULL;
   51449           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
   51450             :             (void**)&cbfunction,
   51451             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   51452             :             SWIG_POINTER_EXCEPTION | 0 ));
   51453             :         
   51454           0 :         if ( cbfunction == GDALTermProgress ) {
   51455             :           arg5 = GDALTermProgress;
   51456             :         } else {
   51457           0 :           if (!PyCallable_Check(obj4)) {
   51458           0 :             PyErr_SetString( PyExc_RuntimeError,
   51459             :               "Object given is not a Python function" );
   51460           0 :             SWIG_fail;
   51461             :           }
   51462           0 :           psProgressInfo->psPyCallback = obj4;
   51463           0 :           arg5 = PyProgressProxy;
   51464             :         }
   51465             :         
   51466             :       }
   51467             :       
   51468             :     }
   51469             :   }
   51470           1 :   if (obj5) {
   51471           0 :     {
   51472             :       /* %typemap(in) ( void* callback_data=NULL)  */
   51473           0 :       psProgressInfo->psPyCallbackData = obj5 ;
   51474             :     }
   51475             :   }
   51476           1 :   if (obj6) {
   51477           0 :     {
   51478             :       /* %typemap(in) char **dict */
   51479           0 :       arg7 = NULL;
   51480           0 :       if ( PySequence_Check( obj6 ) ) {
   51481           0 :         int bErr = FALSE;
   51482           0 :         arg7 = CSLFromPySequence(obj6, &bErr);
   51483           0 :         if ( bErr )
   51484             :         {
   51485           0 :           SWIG_fail;
   51486             :         }
   51487             :       }
   51488           0 :       else if ( PyMapping_Check( obj6 ) ) {
   51489           0 :         int bErr = FALSE;
   51490           0 :         arg7 = CSLFromPyMapping(obj6, &bErr);
   51491           0 :         if ( bErr )
   51492             :         {
   51493           0 :           SWIG_fail;
   51494             :         }
   51495             :       }
   51496             :       else {
   51497           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   51498           0 :         SWIG_fail;
   51499             :       }
   51500             :     }
   51501             :   }
   51502           1 :   {
   51503           1 :     if (!arg2) {
   51504           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51505             :     }
   51506             :   }
   51507           1 :   {
   51508           1 :     if (!arg3) {
   51509           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51510             :     }
   51511             :   }
   51512           1 :   {
   51513           1 :     if (!arg4) {
   51514           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51515             :     }
   51516             :   }
   51517           1 :   {
   51518           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51519           1 :     if ( bLocalUseExceptions ) {
   51520           1 :       pushErrorHandler();
   51521             :     }
   51522           1 :     {
   51523           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51524           1 :       result = (int)GDALTransformerInfoShadow_TransformGeolocations(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   51525           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51526             :     }
   51527           1 :     if ( bLocalUseExceptions ) {
   51528           1 :       popErrorHandler();
   51529             :     }
   51530             : #ifndef SED_HACKS
   51531             :     if ( bLocalUseExceptions ) {
   51532             :       CPLErr eclass = CPLGetLastErrorType();
   51533             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51534             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51535             :       }
   51536             :     }
   51537             : #endif
   51538             :   }
   51539           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51540           1 :   {
   51541             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51542             :     
   51543           1 :     CPLFree(psProgressInfo);
   51544             :     
   51545             :   }
   51546           1 :   {
   51547             :     /* %typemap(freearg) char **dict */
   51548           1 :     CSLDestroy( arg7 );
   51549             :   }
   51550           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; } }
   51551             :   return resultobj;
   51552           0 : fail:
   51553           0 :   {
   51554             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51555             :     
   51556           0 :     CPLFree(psProgressInfo);
   51557             :     
   51558             :   }
   51559           0 :   {
   51560             :     /* %typemap(freearg) char **dict */
   51561           0 :     CSLDestroy( arg7 );
   51562             :   }
   51563             :   return NULL;
   51564             : }
   51565             : 
   51566             : 
   51567         277 : SWIGINTERN PyObject *GDALTransformerInfoShadow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51568         277 :   PyObject *obj;
   51569         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   51570         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_NewClientData(obj));
   51571         277 :   return SWIG_Py_Void();
   51572             : }
   51573             : 
   51574          79 : SWIGINTERN PyObject *_wrap_Transformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51575          79 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51576          79 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   51577          79 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   51578          79 :   char **arg3 = (char **) 0 ;
   51579          79 :   void *argp1 = 0 ;
   51580          79 :   int res1 = 0 ;
   51581          79 :   void *argp2 = 0 ;
   51582          79 :   int res2 = 0 ;
   51583          79 :   PyObject *swig_obj[3] ;
   51584          79 :   GDALTransformerInfoShadow *result = 0 ;
   51585             :   
   51586          79 :   if (!SWIG_Python_UnpackTuple(args, "Transformer", 3, 3, swig_obj)) SWIG_fail;
   51587          79 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51588          79 :   if (!SWIG_IsOK(res1)) {
   51589           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   51590             :   }
   51591          79 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   51592          79 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51593          79 :   if (!SWIG_IsOK(res2)) {
   51594           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Transformer" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   51595             :   }
   51596          79 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   51597          79 :   {
   51598             :     /* %typemap(in) char **dict */
   51599          79 :     arg3 = NULL;
   51600          79 :     if ( PySequence_Check( swig_obj[2] ) ) {
   51601          79 :       int bErr = FALSE;
   51602          79 :       arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   51603          79 :       if ( bErr )
   51604             :       {
   51605           0 :         SWIG_fail;
   51606             :       }
   51607             :     }
   51608           0 :     else if ( PyMapping_Check( swig_obj[2] ) ) {
   51609           0 :       int bErr = FALSE;
   51610           0 :       arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   51611           0 :       if ( bErr )
   51612             :       {
   51613           0 :         SWIG_fail;
   51614             :       }
   51615             :     }
   51616             :     else {
   51617           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   51618           0 :       SWIG_fail;
   51619             :     }
   51620             :   }
   51621          79 :   {
   51622          79 :     const int bLocalUseExceptions = GetUseExceptions();
   51623          79 :     if ( bLocalUseExceptions ) {
   51624          76 :       pushErrorHandler();
   51625             :     }
   51626          79 :     {
   51627          79 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51628          79 :       result = (GDALTransformerInfoShadow *)Transformer(arg1,arg2,arg3);
   51629          79 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51630             :     }
   51631          79 :     if ( bLocalUseExceptions ) {
   51632          76 :       popErrorHandler();
   51633             :     }
   51634             : #ifndef SED_HACKS
   51635             :     if ( bLocalUseExceptions ) {
   51636             :       CPLErr eclass = CPLGetLastErrorType();
   51637             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51638             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51639             :       }
   51640             :     }
   51641             : #endif
   51642             :   }
   51643          79 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_OWN |  0 );
   51644          79 :   {
   51645             :     /* %typemap(freearg) char **dict */
   51646          79 :     CSLDestroy( arg3 );
   51647             :   }
   51648          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; } }
   51649             :   return resultobj;
   51650           0 : fail:
   51651           0 :   {
   51652             :     /* %typemap(freearg) char **dict */
   51653           0 :     CSLDestroy( arg3 );
   51654             :   }
   51655             :   return NULL;
   51656             : }
   51657             : 
   51658             : 
   51659           1 : SWIGINTERN PyObject *_wrap_WarpGetOptionList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51660           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51661           1 :   char *result = 0 ;
   51662             :   
   51663           1 :   if (!SWIG_Python_UnpackTuple(args, "WarpGetOptionList", 0, 0, 0)) SWIG_fail;
   51664           1 :   {
   51665           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51666           1 :     if ( bLocalUseExceptions ) {
   51667           1 :       pushErrorHandler();
   51668             :     }
   51669           1 :     {
   51670           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51671           1 :       result = (char *)GDALWarpGetOptionList();
   51672           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51673             :     }
   51674           1 :     if ( bLocalUseExceptions ) {
   51675           1 :       popErrorHandler();
   51676             :     }
   51677             : #ifndef SED_HACKS
   51678             :     if ( bLocalUseExceptions ) {
   51679             :       CPLErr eclass = CPLGetLastErrorType();
   51680             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51681             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51682             :       }
   51683             :     }
   51684             : #endif
   51685             :   }
   51686           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   51687           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; } }
   51688             :   return resultobj;
   51689           0 : fail:
   51690           0 :   return NULL;
   51691             : }
   51692             : 
   51693             : 
   51694           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_width_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51695           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51696           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51697           2 :   void *argp1 = 0 ;
   51698           2 :   int res1 = 0 ;
   51699           2 :   PyObject *swig_obj[1] ;
   51700           2 :   int result;
   51701             :   
   51702           2 :   if (!args) SWIG_fail;
   51703           2 :   swig_obj[0] = args;
   51704           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51705           2 :   if (!SWIG_IsOK(res1)) {
   51706           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_width_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51707             :   }
   51708           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51709           2 :   {
   51710           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51711           2 :     result = (int) ((arg1)->width);
   51712           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51713             :   }
   51714           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51715           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; } }
   51716             :   return resultobj;
   51717             : fail:
   51718             :   return NULL;
   51719             : }
   51720             : 
   51721             : 
   51722           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_height_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51723           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51724           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51725           2 :   void *argp1 = 0 ;
   51726           2 :   int res1 = 0 ;
   51727           2 :   PyObject *swig_obj[1] ;
   51728           2 :   int result;
   51729             :   
   51730           2 :   if (!args) SWIG_fail;
   51731           2 :   swig_obj[0] = args;
   51732           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51733           2 :   if (!SWIG_IsOK(res1)) {
   51734           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_height_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51735             :   }
   51736           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51737           2 :   {
   51738           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51739           2 :     result = (int) ((arg1)->height);
   51740           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51741             :   }
   51742           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51743           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; } }
   51744             :   return resultobj;
   51745             : fail:
   51746             :   return NULL;
   51747             : }
   51748             : 
   51749             : 
   51750           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_xmin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51751           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51752           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51753           3 :   void *argp1 = 0 ;
   51754           3 :   int res1 = 0 ;
   51755           3 :   PyObject *swig_obj[1] ;
   51756           3 :   double result;
   51757             :   
   51758           3 :   if (!args) SWIG_fail;
   51759           3 :   swig_obj[0] = args;
   51760           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51761           3 :   if (!SWIG_IsOK(res1)) {
   51762           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_xmin_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51763             :   }
   51764           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51765           3 :   {
   51766           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51767           3 :     result = (double) ((arg1)->xmin);
   51768           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51769             :   }
   51770           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   51771           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; } }
   51772             :   return resultobj;
   51773             : fail:
   51774             :   return NULL;
   51775             : }
   51776             : 
   51777             : 
   51778           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_ymin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51779           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51780           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51781           3 :   void *argp1 = 0 ;
   51782           3 :   int res1 = 0 ;
   51783           3 :   PyObject *swig_obj[1] ;
   51784           3 :   double result;
   51785             :   
   51786           3 :   if (!args) SWIG_fail;
   51787           3 :   swig_obj[0] = args;
   51788           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51789           3 :   if (!SWIG_IsOK(res1)) {
   51790           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_ymin_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51791             :   }
   51792           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51793           3 :   {
   51794           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51795           3 :     result = (double) ((arg1)->ymin);
   51796           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51797             :   }
   51798           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   51799           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; } }
   51800             :   return resultobj;
   51801             : fail:
   51802             :   return NULL;
   51803             : }
   51804             : 
   51805             : 
   51806           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_xmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51807           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51808           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51809           3 :   void *argp1 = 0 ;
   51810           3 :   int res1 = 0 ;
   51811           3 :   PyObject *swig_obj[1] ;
   51812           3 :   double result;
   51813             :   
   51814           3 :   if (!args) SWIG_fail;
   51815           3 :   swig_obj[0] = args;
   51816           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51817           3 :   if (!SWIG_IsOK(res1)) {
   51818           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_xmax_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51819             :   }
   51820           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51821           3 :   {
   51822           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51823           3 :     result = (double) ((arg1)->xmax);
   51824           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51825             :   }
   51826           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   51827           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; } }
   51828             :   return resultobj;
   51829             : fail:
   51830             :   return NULL;
   51831             : }
   51832             : 
   51833             : 
   51834           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_ymax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51835           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51836           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51837           3 :   void *argp1 = 0 ;
   51838           3 :   int res1 = 0 ;
   51839           3 :   PyObject *swig_obj[1] ;
   51840           3 :   double result;
   51841             :   
   51842           3 :   if (!args) SWIG_fail;
   51843           3 :   swig_obj[0] = args;
   51844           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51845           3 :   if (!SWIG_IsOK(res1)) {
   51846           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_ymax_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51847             :   }
   51848           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51849           3 :   {
   51850           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51851           3 :     result = (double) ((arg1)->ymax);
   51852           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51853             :   }
   51854           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   51855           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; } }
   51856             :   return resultobj;
   51857             : fail:
   51858             :   return NULL;
   51859             : }
   51860             : 
   51861             : 
   51862           3 : SWIGINTERN PyObject *_wrap_delete_SuggestedWarpOutputRes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51863           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51864           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51865           3 :   void *argp1 = 0 ;
   51866           3 :   int res1 = 0 ;
   51867           3 :   PyObject *swig_obj[1] ;
   51868             :   
   51869           3 :   if (!args) SWIG_fail;
   51870           3 :   swig_obj[0] = args;
   51871           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_DISOWN |  0 );
   51872           3 :   if (!SWIG_IsOK(res1)) {
   51873           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SuggestedWarpOutputRes" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51874             :   }
   51875           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51876           3 :   {
   51877           3 :     const int bLocalUseExceptions = GetUseExceptions();
   51878           3 :     if ( bLocalUseExceptions ) {
   51879           3 :       pushErrorHandler();
   51880             :     }
   51881           3 :     {
   51882           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51883           3 :       delete_SuggestedWarpOutputRes(arg1);
   51884           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51885             :     }
   51886           3 :     if ( bLocalUseExceptions ) {
   51887           3 :       popErrorHandler();
   51888             :     }
   51889             : #ifndef SED_HACKS
   51890             :     if ( bLocalUseExceptions ) {
   51891             :       CPLErr eclass = CPLGetLastErrorType();
   51892             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51893             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51894             :       }
   51895             :     }
   51896             : #endif
   51897             :   }
   51898           3 :   resultobj = SWIG_Py_Void();
   51899           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; } }
   51900             :   return resultobj;
   51901             : fail:
   51902             :   return NULL;
   51903             : }
   51904             : 
   51905             : 
   51906           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_GetGeotransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51907           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51908           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51909           2 :   double *arg2 ;
   51910           2 :   void *argp1 = 0 ;
   51911           2 :   int res1 = 0 ;
   51912           2 :   double argout2[6] ;
   51913           2 :   PyObject *swig_obj[1] ;
   51914             :   
   51915           2 :   {
   51916             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   51917           2 :     memset(argout2, 0, sizeof(argout2));
   51918           2 :     arg2 = argout2;
   51919             :   }
   51920           2 :   if (!args) SWIG_fail;
   51921           2 :   swig_obj[0] = args;
   51922           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51923           2 :   if (!SWIG_IsOK(res1)) {
   51924           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_GetGeotransform" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51925             :   }
   51926           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51927           2 :   {
   51928           2 :     const int bLocalUseExceptions = GetUseExceptions();
   51929           2 :     if ( bLocalUseExceptions ) {
   51930           2 :       pushErrorHandler();
   51931             :     }
   51932           2 :     {
   51933           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51934           2 :       SuggestedWarpOutputRes_GetGeotransform(arg1,arg2);
   51935           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51936             :     }
   51937           2 :     if ( bLocalUseExceptions ) {
   51938           2 :       popErrorHandler();
   51939             :     }
   51940             : #ifndef SED_HACKS
   51941             :     if ( bLocalUseExceptions ) {
   51942             :       CPLErr eclass = CPLGetLastErrorType();
   51943             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51944             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51945             :       }
   51946             :     }
   51947             : #endif
   51948             :   }
   51949           2 :   resultobj = SWIG_Py_Void();
   51950           2 :   {
   51951             :     /* %typemap(argout) (double argout[ANY]) */
   51952           2 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   51953             : #if SWIG_VERSION >= 0x040300
   51954             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   51955             : #else
   51956           2 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   51957             : #endif
   51958             :   }
   51959           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; } }
   51960             :   return resultobj;
   51961             : fail:
   51962             :   return NULL;
   51963             : }
   51964             : 
   51965             : 
   51966         277 : SWIGINTERN PyObject *SuggestedWarpOutputRes_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51967         277 :   PyObject *obj;
   51968         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   51969         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_NewClientData(obj));
   51970         277 :   return SWIG_Py_Void();
   51971             : }
   51972             : 
   51973           1 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputFromTransformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51974           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51975           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   51976           1 :   GDALTransformerInfoShadow *arg2 = (GDALTransformerInfoShadow *) 0 ;
   51977           1 :   void *argp1 = 0 ;
   51978           1 :   int res1 = 0 ;
   51979           1 :   void *argp2 = 0 ;
   51980           1 :   int res2 = 0 ;
   51981           1 :   PyObject *swig_obj[2] ;
   51982           1 :   SuggestedWarpOutputRes *result = 0 ;
   51983             :   
   51984           1 :   if (!SWIG_Python_UnpackTuple(args, "SuggestedWarpOutputFromTransformer", 2, 2, swig_obj)) SWIG_fail;
   51985           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51986           1 :   if (!SWIG_IsOK(res1)) {
   51987           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputFromTransformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   51988             :   }
   51989           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   51990           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   51991           1 :   if (!SWIG_IsOK(res2)) {
   51992           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SuggestedWarpOutputFromTransformer" "', argument " "2"" of type '" "GDALTransformerInfoShadow *""'"); 
   51993             :   }
   51994           1 :   arg2 = reinterpret_cast< GDALTransformerInfoShadow * >(argp2);
   51995           1 :   {
   51996           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51997           1 :     if ( bLocalUseExceptions ) {
   51998           1 :       pushErrorHandler();
   51999             :     }
   52000           1 :     {
   52001           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52002           1 :       result = (SuggestedWarpOutputRes *)SuggestedWarpOutputFromTransformer(arg1,arg2);
   52003           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52004             :     }
   52005           1 :     if ( bLocalUseExceptions ) {
   52006           1 :       popErrorHandler();
   52007             :     }
   52008             : #ifndef SED_HACKS
   52009             :     if ( bLocalUseExceptions ) {
   52010             :       CPLErr eclass = CPLGetLastErrorType();
   52011             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52012             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52013             :       }
   52014             :     }
   52015             : #endif
   52016             :   }
   52017           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_OWN |  0 );
   52018           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; } }
   52019             :   return resultobj;
   52020             : fail:
   52021             :   return NULL;
   52022             : }
   52023             : 
   52024             : 
   52025           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputFromOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52026           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52027           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   52028           3 :   char **arg2 = (char **) 0 ;
   52029           3 :   void *argp1 = 0 ;
   52030           3 :   int res1 = 0 ;
   52031           3 :   PyObject *swig_obj[2] ;
   52032           3 :   SuggestedWarpOutputRes *result = 0 ;
   52033             :   
   52034           3 :   if (!SWIG_Python_UnpackTuple(args, "SuggestedWarpOutputFromOptions", 2, 2, swig_obj)) SWIG_fail;
   52035           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52036           3 :   if (!SWIG_IsOK(res1)) {
   52037           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputFromOptions" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   52038             :   }
   52039           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   52040           3 :   {
   52041             :     /* %typemap(in) char **dict */
   52042           3 :     arg2 = NULL;
   52043           3 :     if ( PySequence_Check( swig_obj[1] ) ) {
   52044           2 :       int bErr = FALSE;
   52045           2 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   52046           2 :       if ( bErr )
   52047             :       {
   52048           0 :         SWIG_fail;
   52049             :       }
   52050             :     }
   52051           1 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   52052           1 :       int bErr = FALSE;
   52053           1 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   52054           1 :       if ( bErr )
   52055             :       {
   52056           0 :         SWIG_fail;
   52057             :       }
   52058             :     }
   52059             :     else {
   52060           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   52061           0 :       SWIG_fail;
   52062             :     }
   52063             :   }
   52064           3 :   {
   52065           3 :     if (!arg1) {
   52066           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   52067             :     }
   52068             :   }
   52069           2 :   {
   52070           2 :     const int bLocalUseExceptions = GetUseExceptions();
   52071           2 :     if ( bLocalUseExceptions ) {
   52072           2 :       pushErrorHandler();
   52073             :     }
   52074           2 :     {
   52075           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52076           2 :       result = (SuggestedWarpOutputRes *)SuggestedWarpOutputFromOptions(arg1,arg2);
   52077           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52078             :     }
   52079           2 :     if ( bLocalUseExceptions ) {
   52080           2 :       popErrorHandler();
   52081             :     }
   52082             : #ifndef SED_HACKS
   52083             :     if ( bLocalUseExceptions ) {
   52084             :       CPLErr eclass = CPLGetLastErrorType();
   52085             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52086             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52087             :       }
   52088             :     }
   52089             : #endif
   52090             :   }
   52091           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_OWN |  0 );
   52092           2 :   {
   52093             :     /* %typemap(freearg) char **dict */
   52094           2 :     CSLDestroy( arg2 );
   52095             :   }
   52096           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; } }
   52097             :   return resultobj;
   52098           1 : fail:
   52099           1 :   {
   52100             :     /* %typemap(freearg) char **dict */
   52101           1 :     CSLDestroy( arg2 );
   52102             :   }
   52103             :   return NULL;
   52104             : }
   52105             : 
   52106             : 
   52107          23 : SWIGINTERN PyObject *_wrap__ApplyVerticalShiftGrid(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   52108          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52109          23 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   52110          23 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   52111          23 :   bool arg3 = (bool) false ;
   52112          23 :   double arg4 = (double) 1.0 ;
   52113          23 :   double arg5 = (double) 1.0 ;
   52114          23 :   char **arg6 = (char **) NULL ;
   52115          23 :   void *argp1 = 0 ;
   52116          23 :   int res1 = 0 ;
   52117          23 :   void *argp2 = 0 ;
   52118          23 :   int res2 = 0 ;
   52119          23 :   bool val3 ;
   52120          23 :   int ecode3 = 0 ;
   52121          23 :   double val4 ;
   52122          23 :   int ecode4 = 0 ;
   52123          23 :   double val5 ;
   52124          23 :   int ecode5 = 0 ;
   52125          23 :   PyObject * obj0 = 0 ;
   52126          23 :   PyObject * obj1 = 0 ;
   52127          23 :   PyObject * obj2 = 0 ;
   52128          23 :   PyObject * obj3 = 0 ;
   52129          23 :   PyObject * obj4 = 0 ;
   52130          23 :   PyObject * obj5 = 0 ;
   52131          23 :   char * kwnames[] = {
   52132             :     (char *)"src_ds",  (char *)"grid_ds",  (char *)"inverse",  (char *)"srcUnitToMeter",  (char *)"dstUnitToMeter",  (char *)"options",  NULL 
   52133             :   };
   52134          23 :   GDALDatasetShadow *result = 0 ;
   52135             :   
   52136          23 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOO:_ApplyVerticalShiftGrid", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
   52137          23 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52138          23 :   if (!SWIG_IsOK(res1)) {
   52139           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_ApplyVerticalShiftGrid" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   52140             :   }
   52141          23 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   52142          23 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52143          23 :   if (!SWIG_IsOK(res2)) {
   52144           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_ApplyVerticalShiftGrid" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   52145             :   }
   52146          23 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   52147          23 :   if (obj2) {
   52148           1 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   52149           1 :     if (!SWIG_IsOK(ecode3)) {
   52150           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_ApplyVerticalShiftGrid" "', argument " "3"" of type '" "bool""'");
   52151             :     } 
   52152             :     arg3 = static_cast< bool >(val3);
   52153             :   }
   52154          23 :   if (obj3) {
   52155           1 :     ecode4 = SWIG_AsVal_double(obj3, &val4);
   52156           1 :     if (!SWIG_IsOK(ecode4)) {
   52157           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_ApplyVerticalShiftGrid" "', argument " "4"" of type '" "double""'");
   52158             :     } 
   52159           1 :     arg4 = static_cast< double >(val4);
   52160             :   }
   52161          23 :   if (obj4) {
   52162           1 :     ecode5 = SWIG_AsVal_double(obj4, &val5);
   52163           1 :     if (!SWIG_IsOK(ecode5)) {
   52164           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "_ApplyVerticalShiftGrid" "', argument " "5"" of type '" "double""'");
   52165             :     } 
   52166           1 :     arg5 = static_cast< double >(val5);
   52167             :   }
   52168          23 :   if (obj5) {
   52169          11 :     {
   52170             :       /* %typemap(in) char **dict */
   52171          11 :       arg6 = NULL;
   52172          11 :       if ( PySequence_Check( obj5 ) ) {
   52173          11 :         int bErr = FALSE;
   52174          11 :         arg6 = CSLFromPySequence(obj5, &bErr);
   52175          11 :         if ( bErr )
   52176             :         {
   52177           0 :           SWIG_fail;
   52178             :         }
   52179             :       }
   52180           0 :       else if ( PyMapping_Check( obj5 ) ) {
   52181           0 :         int bErr = FALSE;
   52182           0 :         arg6 = CSLFromPyMapping(obj5, &bErr);
   52183           0 :         if ( bErr )
   52184             :         {
   52185           0 :           SWIG_fail;
   52186             :         }
   52187             :       }
   52188             :       else {
   52189           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   52190           0 :         SWIG_fail;
   52191             :       }
   52192             :     }
   52193             :   }
   52194          23 :   {
   52195          23 :     if (!arg1) {
   52196           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   52197             :     }
   52198             :   }
   52199          23 :   {
   52200          23 :     if (!arg2) {
   52201           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   52202             :     }
   52203             :   }
   52204          23 :   {
   52205          23 :     const int bLocalUseExceptions = GetUseExceptions();
   52206          23 :     if ( bLocalUseExceptions ) {
   52207          12 :       pushErrorHandler();
   52208             :     }
   52209          23 :     {
   52210          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52211          23 :       result = (GDALDatasetShadow *)ApplyVerticalShiftGrid(arg1,arg2,arg3,arg4,arg5,arg6);
   52212          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52213             :     }
   52214          23 :     if ( bLocalUseExceptions ) {
   52215          12 :       popErrorHandler();
   52216             :     }
   52217             : #ifndef SED_HACKS
   52218             :     if ( bLocalUseExceptions ) {
   52219             :       CPLErr eclass = CPLGetLastErrorType();
   52220             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52221             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52222             :       }
   52223             :     }
   52224             : #endif
   52225             :   }
   52226          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   52227          23 :   {
   52228             :     /* %typemap(freearg) char **dict */
   52229          23 :     CSLDestroy( arg6 );
   52230             :   }
   52231          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; } }
   52232             :   return resultobj;
   52233           0 : fail:
   52234           0 :   {
   52235             :     /* %typemap(freearg) char **dict */
   52236           0 :     CSLDestroy( arg6 );
   52237             :   }
   52238             :   return NULL;
   52239             : }
   52240             : 
   52241             : 
   52242        1835 : SWIGINTERN PyObject *_wrap_GetGlobalAlgorithmRegistry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52243        1835 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52244        1835 :   GDALAlgorithmRegistryHS *result = 0 ;
   52245             :   
   52246        1835 :   if (!SWIG_Python_UnpackTuple(args, "GetGlobalAlgorithmRegistry", 0, 0, 0)) SWIG_fail;
   52247        1835 :   {
   52248        1835 :     const int bLocalUseExceptions = GetUseExceptions();
   52249        1835 :     if ( bLocalUseExceptions ) {
   52250        1834 :       pushErrorHandler();
   52251             :     }
   52252        1835 :     {
   52253        1835 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52254        1835 :       result = (GDALAlgorithmRegistryHS *)GDALGetGlobalAlgorithmRegistry();
   52255        1835 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52256             :     }
   52257        1835 :     if ( bLocalUseExceptions ) {
   52258        1834 :       popErrorHandler();
   52259             :     }
   52260             : #ifndef SED_HACKS
   52261             :     if ( bLocalUseExceptions ) {
   52262             :       CPLErr eclass = CPLGetLastErrorType();
   52263             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52264             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52265             :       }
   52266             :     }
   52267             : #endif
   52268             :   }
   52269        1835 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_POINTER_OWN |  0 );
   52270        1835 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52271             :   return resultobj;
   52272           0 : fail:
   52273           0 :   return NULL;
   52274             : }
   52275             : 
   52276             : 
   52277           0 : SWIGINTERN PyObject *_wrap_AlgorithmArgTypeIsList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52278           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52279           0 :   GDALAlgorithmArgType arg1 ;
   52280           0 :   int val1 ;
   52281           0 :   int ecode1 = 0 ;
   52282           0 :   PyObject *swig_obj[1] ;
   52283           0 :   bool result;
   52284             :   
   52285           0 :   if (!args) SWIG_fail;
   52286           0 :   swig_obj[0] = args;
   52287           0 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   52288           0 :   if (!SWIG_IsOK(ecode1)) {
   52289           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "AlgorithmArgTypeIsList" "', argument " "1"" of type '" "GDALAlgorithmArgType""'");
   52290             :   } 
   52291           0 :   arg1 = static_cast< GDALAlgorithmArgType >(val1);
   52292           0 :   {
   52293           0 :     const int bLocalUseExceptions = GetUseExceptions();
   52294           0 :     if ( bLocalUseExceptions ) {
   52295           0 :       pushErrorHandler();
   52296             :     }
   52297           0 :     {
   52298           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52299           0 :       result = (bool)GDALAlgorithmArgTypeIsList(arg1);
   52300           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52301             :     }
   52302           0 :     if ( bLocalUseExceptions ) {
   52303           0 :       popErrorHandler();
   52304             :     }
   52305             : #ifndef SED_HACKS
   52306             :     if ( bLocalUseExceptions ) {
   52307             :       CPLErr eclass = CPLGetLastErrorType();
   52308             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52309             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52310             :       }
   52311             :     }
   52312             : #endif
   52313             :   }
   52314           0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52315           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; } }
   52316             :   return resultobj;
   52317             : fail:
   52318             :   return NULL;
   52319             : }
   52320             : 
   52321             : 
   52322           0 : SWIGINTERN PyObject *_wrap_AlgorithmArgTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52323           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52324           0 :   GDALAlgorithmArgType arg1 ;
   52325           0 :   int val1 ;
   52326           0 :   int ecode1 = 0 ;
   52327           0 :   PyObject *swig_obj[1] ;
   52328           0 :   char *result = 0 ;
   52329             :   
   52330           0 :   if (!args) SWIG_fail;
   52331           0 :   swig_obj[0] = args;
   52332           0 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   52333           0 :   if (!SWIG_IsOK(ecode1)) {
   52334           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "AlgorithmArgTypeName" "', argument " "1"" of type '" "GDALAlgorithmArgType""'");
   52335             :   } 
   52336           0 :   arg1 = static_cast< GDALAlgorithmArgType >(val1);
   52337           0 :   {
   52338           0 :     const int bLocalUseExceptions = GetUseExceptions();
   52339           0 :     if ( bLocalUseExceptions ) {
   52340           0 :       pushErrorHandler();
   52341             :     }
   52342           0 :     {
   52343           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52344           0 :       result = (char *)GDALAlgorithmArgTypeName(arg1);
   52345           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52346             :     }
   52347           0 :     if ( bLocalUseExceptions ) {
   52348           0 :       popErrorHandler();
   52349             :     }
   52350             : #ifndef SED_HACKS
   52351             :     if ( bLocalUseExceptions ) {
   52352             :       CPLErr eclass = CPLGetLastErrorType();
   52353             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52354             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52355             :       }
   52356             :     }
   52357             : #endif
   52358             :   }
   52359           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52360           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; } }
   52361             :   return resultobj;
   52362             : fail:
   52363             :   return NULL;
   52364             : }
   52365             : 
   52366             : 
   52367        8848 : SWIGINTERN PyObject *_wrap_delete_AlgorithmArg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52368        8848 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52369        8848 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52370        8848 :   void *argp1 = 0 ;
   52371        8848 :   int res1 = 0 ;
   52372        8848 :   PyObject *swig_obj[1] ;
   52373             :   
   52374        8848 :   if (!args) SWIG_fail;
   52375        8848 :   swig_obj[0] = args;
   52376        8848 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_POINTER_DISOWN |  0 );
   52377        8848 :   if (!SWIG_IsOK(res1)) {
   52378           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AlgorithmArg" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52379             :   }
   52380        8848 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52381        8848 :   {
   52382        8848 :     const int bLocalUseExceptions = GetUseExceptions();
   52383        8848 :     if ( bLocalUseExceptions ) {
   52384        8845 :       pushErrorHandler();
   52385             :     }
   52386        8848 :     {
   52387        8848 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52388        8848 :       delete_GDALAlgorithmArgHS(arg1);
   52389        8848 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52390             :     }
   52391        8848 :     if ( bLocalUseExceptions ) {
   52392        8845 :       popErrorHandler();
   52393             :     }
   52394             : #ifndef SED_HACKS
   52395             :     if ( bLocalUseExceptions ) {
   52396             :       CPLErr eclass = CPLGetLastErrorType();
   52397             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52398             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52399             :       }
   52400             :     }
   52401             : #endif
   52402             :   }
   52403        8848 :   resultobj = SWIG_Py_Void();
   52404        8848 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52405             :   return resultobj;
   52406             : fail:
   52407             :   return NULL;
   52408             : }
   52409             : 
   52410             : 
   52411         149 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52412         149 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52413         149 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52414         149 :   void *argp1 = 0 ;
   52415         149 :   int res1 = 0 ;
   52416         149 :   PyObject *swig_obj[1] ;
   52417         149 :   char *result = 0 ;
   52418             :   
   52419         149 :   if (!args) SWIG_fail;
   52420         149 :   swig_obj[0] = args;
   52421         149 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52422         149 :   if (!SWIG_IsOK(res1)) {
   52423           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetName" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52424             :   }
   52425         149 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52426         149 :   {
   52427         149 :     const int bLocalUseExceptions = GetUseExceptions();
   52428         149 :     if ( bLocalUseExceptions ) {
   52429         149 :       pushErrorHandler();
   52430             :     }
   52431         149 :     {
   52432         149 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52433         149 :       result = (char *)GDALAlgorithmArgHS_GetName(arg1);
   52434         149 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52435             :     }
   52436         149 :     if ( bLocalUseExceptions ) {
   52437         149 :       popErrorHandler();
   52438             :     }
   52439             : #ifndef SED_HACKS
   52440             :     if ( bLocalUseExceptions ) {
   52441             :       CPLErr eclass = CPLGetLastErrorType();
   52442             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52443             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52444             :       }
   52445             :     }
   52446             : #endif
   52447             :   }
   52448         149 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52449         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; } }
   52450             :   return resultobj;
   52451             : fail:
   52452             :   return NULL;
   52453             : }
   52454             : 
   52455             : 
   52456        6521 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52457        6521 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52458        6521 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52459        6521 :   void *argp1 = 0 ;
   52460        6521 :   int res1 = 0 ;
   52461        6521 :   PyObject *swig_obj[1] ;
   52462        6521 :   GDALAlgorithmArgType result;
   52463             :   
   52464        6521 :   if (!args) SWIG_fail;
   52465        6521 :   swig_obj[0] = args;
   52466        6521 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52467        6521 :   if (!SWIG_IsOK(res1)) {
   52468           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetType" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52469             :   }
   52470        6521 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52471        6521 :   {
   52472        6521 :     const int bLocalUseExceptions = GetUseExceptions();
   52473        6521 :     if ( bLocalUseExceptions ) {
   52474        6518 :       pushErrorHandler();
   52475             :     }
   52476        6521 :     {
   52477        6521 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52478        6521 :       result = (GDALAlgorithmArgType)GDALAlgorithmArgHS_GetType(arg1);
   52479        6521 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52480             :     }
   52481        6521 :     if ( bLocalUseExceptions ) {
   52482        6518 :       popErrorHandler();
   52483             :     }
   52484             : #ifndef SED_HACKS
   52485             :     if ( bLocalUseExceptions ) {
   52486             :       CPLErr eclass = CPLGetLastErrorType();
   52487             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52488             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52489             :       }
   52490             :     }
   52491             : #endif
   52492             :   }
   52493        6521 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52494        6521 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52495             :   return resultobj;
   52496             : fail:
   52497             :   return NULL;
   52498             : }
   52499             : 
   52500             : 
   52501           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52502           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52503           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52504           1 :   void *argp1 = 0 ;
   52505           1 :   int res1 = 0 ;
   52506           1 :   PyObject *swig_obj[1] ;
   52507           1 :   char *result = 0 ;
   52508             :   
   52509           1 :   if (!args) SWIG_fail;
   52510           1 :   swig_obj[0] = args;
   52511           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52512           1 :   if (!SWIG_IsOK(res1)) {
   52513           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDescription" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52514             :   }
   52515           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52516           1 :   {
   52517           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52518           1 :     if ( bLocalUseExceptions ) {
   52519           1 :       pushErrorHandler();
   52520             :     }
   52521           1 :     {
   52522           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52523           1 :       result = (char *)GDALAlgorithmArgHS_GetDescription(arg1);
   52524           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52525             :     }
   52526           1 :     if ( bLocalUseExceptions ) {
   52527           1 :       popErrorHandler();
   52528             :     }
   52529             : #ifndef SED_HACKS
   52530             :     if ( bLocalUseExceptions ) {
   52531             :       CPLErr eclass = CPLGetLastErrorType();
   52532             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52533             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52534             :       }
   52535             :     }
   52536             : #endif
   52537             :   }
   52538           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52539           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; } }
   52540             :   return resultobj;
   52541             : fail:
   52542             :   return NULL;
   52543             : }
   52544             : 
   52545             : 
   52546           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetShortName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52547           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52548           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52549           1 :   void *argp1 = 0 ;
   52550           1 :   int res1 = 0 ;
   52551           1 :   PyObject *swig_obj[1] ;
   52552           1 :   char *result = 0 ;
   52553             :   
   52554           1 :   if (!args) SWIG_fail;
   52555           1 :   swig_obj[0] = args;
   52556           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52557           1 :   if (!SWIG_IsOK(res1)) {
   52558           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetShortName" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52559             :   }
   52560           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52561           1 :   {
   52562           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52563           1 :     if ( bLocalUseExceptions ) {
   52564           1 :       pushErrorHandler();
   52565             :     }
   52566           1 :     {
   52567           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52568           1 :       result = (char *)GDALAlgorithmArgHS_GetShortName(arg1);
   52569           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52570             :     }
   52571           1 :     if ( bLocalUseExceptions ) {
   52572           1 :       popErrorHandler();
   52573             :     }
   52574             : #ifndef SED_HACKS
   52575             :     if ( bLocalUseExceptions ) {
   52576             :       CPLErr eclass = CPLGetLastErrorType();
   52577             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52578             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52579             :       }
   52580             :     }
   52581             : #endif
   52582             :   }
   52583           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52584           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; } }
   52585             :   return resultobj;
   52586             : fail:
   52587             :   return NULL;
   52588             : }
   52589             : 
   52590             : 
   52591           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAliases(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52592           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52593           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52594           1 :   void *argp1 = 0 ;
   52595           1 :   int res1 = 0 ;
   52596           1 :   PyObject *swig_obj[1] ;
   52597           1 :   char **result = 0 ;
   52598             :   
   52599           1 :   if (!args) SWIG_fail;
   52600           1 :   swig_obj[0] = args;
   52601           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52602           1 :   if (!SWIG_IsOK(res1)) {
   52603           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAliases" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52604             :   }
   52605           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52606           1 :   {
   52607           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52608           1 :     if ( bLocalUseExceptions ) {
   52609           1 :       pushErrorHandler();
   52610             :     }
   52611           1 :     {
   52612           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52613           1 :       result = (char **)GDALAlgorithmArgHS_GetAliases(arg1);
   52614           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52615             :     }
   52616           1 :     if ( bLocalUseExceptions ) {
   52617           1 :       popErrorHandler();
   52618             :     }
   52619             : #ifndef SED_HACKS
   52620             :     if ( bLocalUseExceptions ) {
   52621             :       CPLErr eclass = CPLGetLastErrorType();
   52622             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52623             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52624             :       }
   52625             :     }
   52626             : #endif
   52627             :   }
   52628           1 :   {
   52629             :     /* %typemap(out) char **CSL -> ( string ) */
   52630           1 :     bool bErr = false;
   52631           1 :     resultobj = CSLToList(result, &bErr);
   52632           1 :     CSLDestroy(result);
   52633           1 :     if( bErr ) {
   52634           0 :       SWIG_fail;
   52635             :     }
   52636             :   }
   52637           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; } }
   52638             :   return resultobj;
   52639             : fail:
   52640             :   return NULL;
   52641             : }
   52642             : 
   52643             : 
   52644           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMetaVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52645           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52646           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52647           1 :   void *argp1 = 0 ;
   52648           1 :   int res1 = 0 ;
   52649           1 :   PyObject *swig_obj[1] ;
   52650           1 :   char *result = 0 ;
   52651             :   
   52652           1 :   if (!args) SWIG_fail;
   52653           1 :   swig_obj[0] = args;
   52654           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52655           1 :   if (!SWIG_IsOK(res1)) {
   52656           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMetaVar" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52657             :   }
   52658           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52659           1 :   {
   52660           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52661           1 :     if ( bLocalUseExceptions ) {
   52662           1 :       pushErrorHandler();
   52663             :     }
   52664           1 :     {
   52665           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52666           1 :       result = (char *)GDALAlgorithmArgHS_GetMetaVar(arg1);
   52667           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52668             :     }
   52669           1 :     if ( bLocalUseExceptions ) {
   52670           1 :       popErrorHandler();
   52671             :     }
   52672             : #ifndef SED_HACKS
   52673             :     if ( bLocalUseExceptions ) {
   52674             :       CPLErr eclass = CPLGetLastErrorType();
   52675             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52676             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52677             :       }
   52678             :     }
   52679             : #endif
   52680             :   }
   52681           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52682           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; } }
   52683             :   return resultobj;
   52684             : fail:
   52685             :   return NULL;
   52686             : }
   52687             : 
   52688             : 
   52689           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetCategory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52690           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52691           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52692           1 :   void *argp1 = 0 ;
   52693           1 :   int res1 = 0 ;
   52694           1 :   PyObject *swig_obj[1] ;
   52695           1 :   char *result = 0 ;
   52696             :   
   52697           1 :   if (!args) SWIG_fail;
   52698           1 :   swig_obj[0] = args;
   52699           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52700           1 :   if (!SWIG_IsOK(res1)) {
   52701           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetCategory" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52702             :   }
   52703           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52704           1 :   {
   52705           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52706           1 :     if ( bLocalUseExceptions ) {
   52707           1 :       pushErrorHandler();
   52708             :     }
   52709           1 :     {
   52710           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52711           1 :       result = (char *)GDALAlgorithmArgHS_GetCategory(arg1);
   52712           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52713             :     }
   52714           1 :     if ( bLocalUseExceptions ) {
   52715           1 :       popErrorHandler();
   52716             :     }
   52717             : #ifndef SED_HACKS
   52718             :     if ( bLocalUseExceptions ) {
   52719             :       CPLErr eclass = CPLGetLastErrorType();
   52720             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52721             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52722             :       }
   52723             :     }
   52724             : #endif
   52725             :   }
   52726           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52727           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; } }
   52728             :   return resultobj;
   52729             : fail:
   52730             :   return NULL;
   52731             : }
   52732             : 
   52733             : 
   52734           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsPositional(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52735           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52736           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52737           1 :   void *argp1 = 0 ;
   52738           1 :   int res1 = 0 ;
   52739           1 :   PyObject *swig_obj[1] ;
   52740           1 :   bool result;
   52741             :   
   52742           1 :   if (!args) SWIG_fail;
   52743           1 :   swig_obj[0] = args;
   52744           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52745           1 :   if (!SWIG_IsOK(res1)) {
   52746           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsPositional" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52747             :   }
   52748           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52749           1 :   {
   52750           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52751           1 :     if ( bLocalUseExceptions ) {
   52752           1 :       pushErrorHandler();
   52753             :     }
   52754           1 :     {
   52755           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52756           1 :       result = (bool)GDALAlgorithmArgHS_IsPositional(arg1);
   52757           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52758             :     }
   52759           1 :     if ( bLocalUseExceptions ) {
   52760           1 :       popErrorHandler();
   52761             :     }
   52762             : #ifndef SED_HACKS
   52763             :     if ( bLocalUseExceptions ) {
   52764             :       CPLErr eclass = CPLGetLastErrorType();
   52765             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52766             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52767             :       }
   52768             :     }
   52769             : #endif
   52770             :   }
   52771           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52772           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; } }
   52773             :   return resultobj;
   52774             : fail:
   52775             :   return NULL;
   52776             : }
   52777             : 
   52778             : 
   52779           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsRequired(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52780           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52781           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52782           1 :   void *argp1 = 0 ;
   52783           1 :   int res1 = 0 ;
   52784           1 :   PyObject *swig_obj[1] ;
   52785           1 :   bool result;
   52786             :   
   52787           1 :   if (!args) SWIG_fail;
   52788           1 :   swig_obj[0] = args;
   52789           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52790           1 :   if (!SWIG_IsOK(res1)) {
   52791           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsRequired" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52792             :   }
   52793           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52794           1 :   {
   52795           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52796           1 :     if ( bLocalUseExceptions ) {
   52797           1 :       pushErrorHandler();
   52798             :     }
   52799           1 :     {
   52800           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52801           1 :       result = (bool)GDALAlgorithmArgHS_IsRequired(arg1);
   52802           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52803             :     }
   52804           1 :     if ( bLocalUseExceptions ) {
   52805           1 :       popErrorHandler();
   52806             :     }
   52807             : #ifndef SED_HACKS
   52808             :     if ( bLocalUseExceptions ) {
   52809             :       CPLErr eclass = CPLGetLastErrorType();
   52810             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52811             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52812             :       }
   52813             :     }
   52814             : #endif
   52815             :   }
   52816           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52817           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; } }
   52818             :   return resultobj;
   52819             : fail:
   52820             :   return NULL;
   52821             : }
   52822             : 
   52823             : 
   52824           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMinCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52825           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52826           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52827           1 :   void *argp1 = 0 ;
   52828           1 :   int res1 = 0 ;
   52829           1 :   PyObject *swig_obj[1] ;
   52830           1 :   int result;
   52831             :   
   52832           1 :   if (!args) SWIG_fail;
   52833           1 :   swig_obj[0] = args;
   52834           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52835           1 :   if (!SWIG_IsOK(res1)) {
   52836           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMinCount" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52837             :   }
   52838           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52839           1 :   {
   52840           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52841           1 :     if ( bLocalUseExceptions ) {
   52842           1 :       pushErrorHandler();
   52843             :     }
   52844           1 :     {
   52845           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52846           1 :       result = (int)GDALAlgorithmArgHS_GetMinCount(arg1);
   52847           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52848             :     }
   52849           1 :     if ( bLocalUseExceptions ) {
   52850           1 :       popErrorHandler();
   52851             :     }
   52852             : #ifndef SED_HACKS
   52853             :     if ( bLocalUseExceptions ) {
   52854             :       CPLErr eclass = CPLGetLastErrorType();
   52855             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52856             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52857             :       }
   52858             :     }
   52859             : #endif
   52860             :   }
   52861           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52862           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; } }
   52863             :   return resultobj;
   52864             : fail:
   52865             :   return NULL;
   52866             : }
   52867             : 
   52868             : 
   52869           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMaxCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52870           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52871           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52872           1 :   void *argp1 = 0 ;
   52873           1 :   int res1 = 0 ;
   52874           1 :   PyObject *swig_obj[1] ;
   52875           1 :   int result;
   52876             :   
   52877           1 :   if (!args) SWIG_fail;
   52878           1 :   swig_obj[0] = args;
   52879           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52880           1 :   if (!SWIG_IsOK(res1)) {
   52881           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMaxCount" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52882             :   }
   52883           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52884           1 :   {
   52885           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52886           1 :     if ( bLocalUseExceptions ) {
   52887           1 :       pushErrorHandler();
   52888             :     }
   52889           1 :     {
   52890           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52891           1 :       result = (int)GDALAlgorithmArgHS_GetMaxCount(arg1);
   52892           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52893             :     }
   52894           1 :     if ( bLocalUseExceptions ) {
   52895           1 :       popErrorHandler();
   52896             :     }
   52897             : #ifndef SED_HACKS
   52898             :     if ( bLocalUseExceptions ) {
   52899             :       CPLErr eclass = CPLGetLastErrorType();
   52900             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52901             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52902             :       }
   52903             :     }
   52904             : #endif
   52905             :   }
   52906           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52907           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; } }
   52908             :   return resultobj;
   52909             : fail:
   52910             :   return NULL;
   52911             : }
   52912             : 
   52913             : 
   52914           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetPackedValuesAllowed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52915           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52916           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52917           1 :   void *argp1 = 0 ;
   52918           1 :   int res1 = 0 ;
   52919           1 :   PyObject *swig_obj[1] ;
   52920           1 :   bool result;
   52921             :   
   52922           1 :   if (!args) SWIG_fail;
   52923           1 :   swig_obj[0] = args;
   52924           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52925           1 :   if (!SWIG_IsOK(res1)) {
   52926           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetPackedValuesAllowed" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52927             :   }
   52928           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52929           1 :   {
   52930           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52931           1 :     if ( bLocalUseExceptions ) {
   52932           1 :       pushErrorHandler();
   52933             :     }
   52934           1 :     {
   52935           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52936           1 :       result = (bool)GDALAlgorithmArgHS_GetPackedValuesAllowed(arg1);
   52937           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52938             :     }
   52939           1 :     if ( bLocalUseExceptions ) {
   52940           1 :       popErrorHandler();
   52941             :     }
   52942             : #ifndef SED_HACKS
   52943             :     if ( bLocalUseExceptions ) {
   52944             :       CPLErr eclass = CPLGetLastErrorType();
   52945             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52946             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52947             :       }
   52948             :     }
   52949             : #endif
   52950             :   }
   52951           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52952           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; } }
   52953             :   return resultobj;
   52954             : fail:
   52955             :   return NULL;
   52956             : }
   52957             : 
   52958             : 
   52959           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetRepeatedArgAllowed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52960           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52961           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52962           1 :   void *argp1 = 0 ;
   52963           1 :   int res1 = 0 ;
   52964           1 :   PyObject *swig_obj[1] ;
   52965           1 :   bool result;
   52966             :   
   52967           1 :   if (!args) SWIG_fail;
   52968           1 :   swig_obj[0] = args;
   52969           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52970           1 :   if (!SWIG_IsOK(res1)) {
   52971           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetRepeatedArgAllowed" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52972             :   }
   52973           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52974           1 :   {
   52975           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52976           1 :     if ( bLocalUseExceptions ) {
   52977           1 :       pushErrorHandler();
   52978             :     }
   52979           1 :     {
   52980           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52981           1 :       result = (bool)GDALAlgorithmArgHS_GetRepeatedArgAllowed(arg1);
   52982           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52983             :     }
   52984           1 :     if ( bLocalUseExceptions ) {
   52985           1 :       popErrorHandler();
   52986             :     }
   52987             : #ifndef SED_HACKS
   52988             :     if ( bLocalUseExceptions ) {
   52989             :       CPLErr eclass = CPLGetLastErrorType();
   52990             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52991             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52992             :       }
   52993             :     }
   52994             : #endif
   52995             :   }
   52996           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52997           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; } }
   52998             :   return resultobj;
   52999             : fail:
   53000             :   return NULL;
   53001             : }
   53002             : 
   53003             : 
   53004           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetChoices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53005           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53006           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53007           1 :   void *argp1 = 0 ;
   53008           1 :   int res1 = 0 ;
   53009           1 :   PyObject *swig_obj[1] ;
   53010           1 :   char **result = 0 ;
   53011             :   
   53012           1 :   if (!args) SWIG_fail;
   53013           1 :   swig_obj[0] = args;
   53014           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53015           1 :   if (!SWIG_IsOK(res1)) {
   53016           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetChoices" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53017             :   }
   53018           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53019           1 :   {
   53020           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53021           1 :     if ( bLocalUseExceptions ) {
   53022           1 :       pushErrorHandler();
   53023             :     }
   53024           1 :     {
   53025           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53026           1 :       result = (char **)GDALAlgorithmArgHS_GetChoices(arg1);
   53027           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53028             :     }
   53029           1 :     if ( bLocalUseExceptions ) {
   53030           1 :       popErrorHandler();
   53031             :     }
   53032             : #ifndef SED_HACKS
   53033             :     if ( bLocalUseExceptions ) {
   53034             :       CPLErr eclass = CPLGetLastErrorType();
   53035             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53036             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53037             :       }
   53038             :     }
   53039             : #endif
   53040             :   }
   53041           1 :   {
   53042             :     /* %typemap(out) char **CSL -> ( string ) */
   53043           1 :     bool bErr = false;
   53044           1 :     resultobj = CSLToList(result, &bErr);
   53045           1 :     CSLDestroy(result);
   53046           1 :     if( bErr ) {
   53047           0 :       SWIG_fail;
   53048             :     }
   53049             :   }
   53050           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; } }
   53051             :   return resultobj;
   53052             : fail:
   53053             :   return NULL;
   53054             : }
   53055             : 
   53056             : 
   53057          27 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53058          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53059          27 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53060          27 :   char *arg2 = (char *) 0 ;
   53061          27 :   void *argp1 = 0 ;
   53062          27 :   int res1 = 0 ;
   53063          27 :   int res2 ;
   53064          27 :   char *buf2 = 0 ;
   53065          27 :   int alloc2 = 0 ;
   53066          27 :   PyObject *swig_obj[2] ;
   53067          27 :   char **result = 0 ;
   53068             :   
   53069          27 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_GetMetadataItem", 2, 2, swig_obj)) SWIG_fail;
   53070          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53071          27 :   if (!SWIG_IsOK(res1)) {
   53072           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMetadataItem" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53073             :   }
   53074          27 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53075          27 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   53076          27 :   if (!SWIG_IsOK(res2)) {
   53077           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
   53078             :   }
   53079          27 :   arg2 = reinterpret_cast< char * >(buf2);
   53080          27 :   {
   53081          27 :     const int bLocalUseExceptions = GetUseExceptions();
   53082          27 :     if ( bLocalUseExceptions ) {
   53083          27 :       pushErrorHandler();
   53084             :     }
   53085          27 :     {
   53086          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53087          27 :       result = (char **)GDALAlgorithmArgHS_GetMetadataItem(arg1,(char const *)arg2);
   53088          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53089             :     }
   53090          27 :     if ( bLocalUseExceptions ) {
   53091          27 :       popErrorHandler();
   53092             :     }
   53093             : #ifndef SED_HACKS
   53094             :     if ( bLocalUseExceptions ) {
   53095             :       CPLErr eclass = CPLGetLastErrorType();
   53096             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53097             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53098             :       }
   53099             :     }
   53100             : #endif
   53101             :   }
   53102          27 :   {
   53103             :     /* %typemap(out) char **CSL -> ( string ) */
   53104          27 :     bool bErr = false;
   53105          27 :     resultobj = CSLToList(result, &bErr);
   53106          27 :     CSLDestroy(result);
   53107          27 :     if( bErr ) {
   53108           0 :       SWIG_fail;
   53109             :     }
   53110             :   }
   53111          27 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   53112          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; } }
   53113             :   return resultobj;
   53114           0 : fail:
   53115           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   53116             :   return NULL;
   53117             : }
   53118             : 
   53119             : 
   53120         167 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsExplicitlySet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53121         167 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53122         167 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53123         167 :   void *argp1 = 0 ;
   53124         167 :   int res1 = 0 ;
   53125         167 :   PyObject *swig_obj[1] ;
   53126         167 :   bool result;
   53127             :   
   53128         167 :   if (!args) SWIG_fail;
   53129         167 :   swig_obj[0] = args;
   53130         167 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53131         167 :   if (!SWIG_IsOK(res1)) {
   53132           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsExplicitlySet" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53133             :   }
   53134         167 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53135         167 :   {
   53136         167 :     const int bLocalUseExceptions = GetUseExceptions();
   53137         167 :     if ( bLocalUseExceptions ) {
   53138         167 :       pushErrorHandler();
   53139             :     }
   53140         167 :     {
   53141         167 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53142         167 :       result = (bool)GDALAlgorithmArgHS_IsExplicitlySet(arg1);
   53143         167 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53144             :     }
   53145         167 :     if ( bLocalUseExceptions ) {
   53146         167 :       popErrorHandler();
   53147             :     }
   53148             : #ifndef SED_HACKS
   53149             :     if ( bLocalUseExceptions ) {
   53150             :       CPLErr eclass = CPLGetLastErrorType();
   53151             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53152             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53153             :       }
   53154             :     }
   53155             : #endif
   53156             :   }
   53157         167 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53158         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; } }
   53159             :   return resultobj;
   53160             : fail:
   53161             :   return NULL;
   53162             : }
   53163             : 
   53164             : 
   53165           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_HasDefaultValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53166           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53167           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53168           1 :   void *argp1 = 0 ;
   53169           1 :   int res1 = 0 ;
   53170           1 :   PyObject *swig_obj[1] ;
   53171           1 :   bool result;
   53172             :   
   53173           1 :   if (!args) SWIG_fail;
   53174           1 :   swig_obj[0] = args;
   53175           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53176           1 :   if (!SWIG_IsOK(res1)) {
   53177           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_HasDefaultValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53178             :   }
   53179           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53180           1 :   {
   53181           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53182           1 :     if ( bLocalUseExceptions ) {
   53183           1 :       pushErrorHandler();
   53184             :     }
   53185           1 :     {
   53186           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53187           1 :       result = (bool)GDALAlgorithmArgHS_HasDefaultValue(arg1);
   53188           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53189             :     }
   53190           1 :     if ( bLocalUseExceptions ) {
   53191           1 :       popErrorHandler();
   53192             :     }
   53193             : #ifndef SED_HACKS
   53194             :     if ( bLocalUseExceptions ) {
   53195             :       CPLErr eclass = CPLGetLastErrorType();
   53196             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53197             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53198             :       }
   53199             :     }
   53200             : #endif
   53201             :   }
   53202           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53203           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; } }
   53204             :   return resultobj;
   53205             : fail:
   53206             :   return NULL;
   53207             : }
   53208             : 
   53209             : 
   53210           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsBoolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53211           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53212           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53213           1 :   void *argp1 = 0 ;
   53214           1 :   int res1 = 0 ;
   53215           1 :   PyObject *swig_obj[1] ;
   53216           1 :   bool result;
   53217             :   
   53218           1 :   if (!args) SWIG_fail;
   53219           1 :   swig_obj[0] = args;
   53220           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53221           1 :   if (!SWIG_IsOK(res1)) {
   53222           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsBoolean" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53223             :   }
   53224           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53225           1 :   {
   53226           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53227           1 :     if ( bLocalUseExceptions ) {
   53228           1 :       pushErrorHandler();
   53229             :     }
   53230           1 :     {
   53231           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53232           1 :       result = (bool)GDALAlgorithmArgHS_GetDefaultAsBoolean(arg1);
   53233           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53234             :     }
   53235           1 :     if ( bLocalUseExceptions ) {
   53236           1 :       popErrorHandler();
   53237             :     }
   53238             : #ifndef SED_HACKS
   53239             :     if ( bLocalUseExceptions ) {
   53240             :       CPLErr eclass = CPLGetLastErrorType();
   53241             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53242             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53243             :       }
   53244             :     }
   53245             : #endif
   53246             :   }
   53247           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53248           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; } }
   53249             :   return resultobj;
   53250             : fail:
   53251             :   return NULL;
   53252             : }
   53253             : 
   53254             : 
   53255           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53256           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53257           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53258           1 :   void *argp1 = 0 ;
   53259           1 :   int res1 = 0 ;
   53260           1 :   PyObject *swig_obj[1] ;
   53261           1 :   char *result = 0 ;
   53262             :   
   53263           1 :   if (!args) SWIG_fail;
   53264           1 :   swig_obj[0] = args;
   53265           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53266           1 :   if (!SWIG_IsOK(res1)) {
   53267           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsString" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53268             :   }
   53269           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53270           1 :   {
   53271           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53272           1 :     if ( bLocalUseExceptions ) {
   53273           1 :       pushErrorHandler();
   53274             :     }
   53275           1 :     {
   53276           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53277           1 :       result = (char *)GDALAlgorithmArgHS_GetDefaultAsString(arg1);
   53278           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53279             :     }
   53280           1 :     if ( bLocalUseExceptions ) {
   53281           1 :       popErrorHandler();
   53282             :     }
   53283             : #ifndef SED_HACKS
   53284             :     if ( bLocalUseExceptions ) {
   53285             :       CPLErr eclass = CPLGetLastErrorType();
   53286             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53287             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53288             :       }
   53289             :     }
   53290             : #endif
   53291             :   }
   53292           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   53293           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; } }
   53294             :   return resultobj;
   53295             : fail:
   53296             :   return NULL;
   53297             : }
   53298             : 
   53299             : 
   53300           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53301           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53302           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53303           1 :   void *argp1 = 0 ;
   53304           1 :   int res1 = 0 ;
   53305           1 :   PyObject *swig_obj[1] ;
   53306           1 :   int result;
   53307             :   
   53308           1 :   if (!args) SWIG_fail;
   53309           1 :   swig_obj[0] = args;
   53310           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53311           1 :   if (!SWIG_IsOK(res1)) {
   53312           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsInteger" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53313             :   }
   53314           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53315           1 :   {
   53316           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53317           1 :     if ( bLocalUseExceptions ) {
   53318           1 :       pushErrorHandler();
   53319             :     }
   53320           1 :     {
   53321           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53322           1 :       result = (int)GDALAlgorithmArgHS_GetDefaultAsInteger(arg1);
   53323           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53324             :     }
   53325           1 :     if ( bLocalUseExceptions ) {
   53326           1 :       popErrorHandler();
   53327             :     }
   53328             : #ifndef SED_HACKS
   53329             :     if ( bLocalUseExceptions ) {
   53330             :       CPLErr eclass = CPLGetLastErrorType();
   53331             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53332             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53333             :       }
   53334             :     }
   53335             : #endif
   53336             :   }
   53337           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   53338           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; } }
   53339             :   return resultobj;
   53340             : fail:
   53341             :   return NULL;
   53342             : }
   53343             : 
   53344             : 
   53345           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53346           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53347           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53348           1 :   void *argp1 = 0 ;
   53349           1 :   int res1 = 0 ;
   53350           1 :   PyObject *swig_obj[1] ;
   53351           1 :   double result;
   53352             :   
   53353           1 :   if (!args) SWIG_fail;
   53354           1 :   swig_obj[0] = args;
   53355           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53356           1 :   if (!SWIG_IsOK(res1)) {
   53357           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsDouble" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53358             :   }
   53359           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53360           1 :   {
   53361           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53362           1 :     if ( bLocalUseExceptions ) {
   53363           1 :       pushErrorHandler();
   53364             :     }
   53365           1 :     {
   53366           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53367           1 :       result = (double)GDALAlgorithmArgHS_GetDefaultAsDouble(arg1);
   53368           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53369             :     }
   53370           1 :     if ( bLocalUseExceptions ) {
   53371           1 :       popErrorHandler();
   53372             :     }
   53373             : #ifndef SED_HACKS
   53374             :     if ( bLocalUseExceptions ) {
   53375             :       CPLErr eclass = CPLGetLastErrorType();
   53376             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53377             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53378             :       }
   53379             :     }
   53380             : #endif
   53381             :   }
   53382           1 :   resultobj = SWIG_From_double(static_cast< double >(result));
   53383           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; } }
   53384             :   return resultobj;
   53385             : fail:
   53386             :   return NULL;
   53387             : }
   53388             : 
   53389             : 
   53390           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53391           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53392           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53393           1 :   void *argp1 = 0 ;
   53394           1 :   int res1 = 0 ;
   53395           1 :   PyObject *swig_obj[1] ;
   53396           1 :   char **result = 0 ;
   53397             :   
   53398           1 :   if (!args) SWIG_fail;
   53399           1 :   swig_obj[0] = args;
   53400           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53401           1 :   if (!SWIG_IsOK(res1)) {
   53402           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsStringList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53403             :   }
   53404           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53405           1 :   {
   53406           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53407           1 :     if ( bLocalUseExceptions ) {
   53408           1 :       pushErrorHandler();
   53409             :     }
   53410           1 :     {
   53411           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53412           1 :       result = (char **)GDALAlgorithmArgHS_GetDefaultAsStringList(arg1);
   53413           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53414             :     }
   53415           1 :     if ( bLocalUseExceptions ) {
   53416           1 :       popErrorHandler();
   53417             :     }
   53418             : #ifndef SED_HACKS
   53419             :     if ( bLocalUseExceptions ) {
   53420             :       CPLErr eclass = CPLGetLastErrorType();
   53421             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53422             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53423             :       }
   53424             :     }
   53425             : #endif
   53426             :   }
   53427           1 :   {
   53428             :     /* %typemap(out) char **CSL -> ( string ) */
   53429           1 :     bool bErr = false;
   53430           1 :     resultobj = CSLToList(result, &bErr);
   53431           1 :     CSLDestroy(result);
   53432           1 :     if( bErr ) {
   53433           0 :       SWIG_fail;
   53434             :     }
   53435             :   }
   53436           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; } }
   53437             :   return resultobj;
   53438             : fail:
   53439             :   return NULL;
   53440             : }
   53441             : 
   53442             : 
   53443           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53444           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53445           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53446           1 :   int *arg2 = (int *) 0 ;
   53447           1 :   int **arg3 = (int **) 0 ;
   53448           1 :   void *argp1 = 0 ;
   53449           1 :   int res1 = 0 ;
   53450           1 :   int nLen2 = 0 ;
   53451           1 :   int *pList2 = NULL ;
   53452           1 :   PyObject *swig_obj[1] ;
   53453             :   
   53454           1 :   {
   53455             :     /* %typemap(in,numinputs=0) (int *nLen2, const int **pList2) (int nLen2, int *pList2) */
   53456           1 :     arg2 = &nLen2;
   53457           1 :     arg3 = &pList2;
   53458             :   }
   53459           1 :   if (!args) SWIG_fail;
   53460           1 :   swig_obj[0] = args;
   53461           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53462           1 :   if (!SWIG_IsOK(res1)) {
   53463           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsIntegerList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53464             :   }
   53465           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53466           1 :   {
   53467           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53468           1 :     if ( bLocalUseExceptions ) {
   53469           1 :       pushErrorHandler();
   53470             :     }
   53471           1 :     {
   53472           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53473           1 :       GDALAlgorithmArgHS_GetDefaultAsIntegerList(arg1,arg2,(int const **)arg3);
   53474           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53475             :     }
   53476           1 :     if ( bLocalUseExceptions ) {
   53477           1 :       popErrorHandler();
   53478             :     }
   53479             : #ifndef SED_HACKS
   53480             :     if ( bLocalUseExceptions ) {
   53481             :       CPLErr eclass = CPLGetLastErrorType();
   53482             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53483             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53484             :       }
   53485             :     }
   53486             : #endif
   53487             :   }
   53488           1 :   resultobj = SWIG_Py_Void();
   53489           1 :   {
   53490             :     /* %typemap(argout) (int *nLen, const int **pList ) */
   53491           1 :     Py_DECREF(resultobj);
   53492           1 :     PyObject *out = PyList_New( *arg2 );
   53493           1 :     if( !out ) {
   53494           0 :       SWIG_fail;
   53495             :     }
   53496           1 :     for( int i=0; i<*arg2; i++ ) {
   53497           0 :       PyObject *val = PyInt_FromLong( (*arg3)[i] );
   53498           0 :       PyList_SetItem( out, i, val );
   53499             :     }
   53500           1 :     resultobj = out;
   53501             :   }
   53502           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; } }
   53503             :   return resultobj;
   53504             : fail:
   53505             :   return NULL;
   53506             : }
   53507             : 
   53508             : 
   53509           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDefaultAsDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53510           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53511           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53512           1 :   int *arg2 = (int *) 0 ;
   53513           1 :   double **arg3 = (double **) 0 ;
   53514           1 :   void *argp1 = 0 ;
   53515           1 :   int res1 = 0 ;
   53516           1 :   int nLen2 = 0 ;
   53517           1 :   double *pList2 = NULL ;
   53518           1 :   PyObject *swig_obj[1] ;
   53519             :   
   53520           1 :   {
   53521             :     /* %typemap(in,numinputs=0) (int *nLen2, const double **pList2) (int nLen2, double *pList2) */
   53522           1 :     arg2 = &nLen2;
   53523           1 :     arg3 = &pList2;
   53524             :   }
   53525           1 :   if (!args) SWIG_fail;
   53526           1 :   swig_obj[0] = args;
   53527           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53528           1 :   if (!SWIG_IsOK(res1)) {
   53529           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDefaultAsDoubleList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53530             :   }
   53531           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53532           1 :   {
   53533           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53534           1 :     if ( bLocalUseExceptions ) {
   53535           1 :       pushErrorHandler();
   53536             :     }
   53537           1 :     {
   53538           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53539           1 :       GDALAlgorithmArgHS_GetDefaultAsDoubleList(arg1,arg2,(double const **)arg3);
   53540           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53541             :     }
   53542           1 :     if ( bLocalUseExceptions ) {
   53543           1 :       popErrorHandler();
   53544             :     }
   53545             : #ifndef SED_HACKS
   53546             :     if ( bLocalUseExceptions ) {
   53547             :       CPLErr eclass = CPLGetLastErrorType();
   53548             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53549             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53550             :       }
   53551             :     }
   53552             : #endif
   53553             :   }
   53554           1 :   resultobj = SWIG_Py_Void();
   53555           1 :   {
   53556             :     /* %typemap(argout) (int *nLen, const double **pList ) */
   53557           1 :     Py_DECREF(resultobj);
   53558           1 :     PyObject *out = PyList_New( *arg2 );
   53559           1 :     if( !out ) {
   53560           0 :       SWIG_fail;
   53561             :     }
   53562           1 :     for( int i=0; i<*arg2; i++ ) {
   53563           0 :       PyObject *val = PyFloat_FromDouble( (*arg3)[i] );
   53564           0 :       PyList_SetItem( out, i, val );
   53565             :     }
   53566           1 :     resultobj = out;
   53567             :   }
   53568           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; } }
   53569             :   return resultobj;
   53570             : fail:
   53571             :   return NULL;
   53572             : }
   53573             : 
   53574             : 
   53575           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsHidden(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53576           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53577           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53578           1 :   void *argp1 = 0 ;
   53579           1 :   int res1 = 0 ;
   53580           1 :   PyObject *swig_obj[1] ;
   53581           1 :   bool result;
   53582             :   
   53583           1 :   if (!args) SWIG_fail;
   53584           1 :   swig_obj[0] = args;
   53585           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53586           1 :   if (!SWIG_IsOK(res1)) {
   53587           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsHidden" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53588             :   }
   53589           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53590           1 :   {
   53591           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53592           1 :     if ( bLocalUseExceptions ) {
   53593           1 :       pushErrorHandler();
   53594             :     }
   53595           1 :     {
   53596           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53597           1 :       result = (bool)GDALAlgorithmArgHS_IsHidden(arg1);
   53598           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53599             :     }
   53600           1 :     if ( bLocalUseExceptions ) {
   53601           1 :       popErrorHandler();
   53602             :     }
   53603             : #ifndef SED_HACKS
   53604             :     if ( bLocalUseExceptions ) {
   53605             :       CPLErr eclass = CPLGetLastErrorType();
   53606             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53607             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53608             :       }
   53609             :     }
   53610             : #endif
   53611             :   }
   53612           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53613           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; } }
   53614             :   return resultobj;
   53615             : fail:
   53616             :   return NULL;
   53617             : }
   53618             : 
   53619             : 
   53620           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsHiddenForCLI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53621           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53622           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53623           1 :   void *argp1 = 0 ;
   53624           1 :   int res1 = 0 ;
   53625           1 :   PyObject *swig_obj[1] ;
   53626           1 :   bool result;
   53627             :   
   53628           1 :   if (!args) SWIG_fail;
   53629           1 :   swig_obj[0] = args;
   53630           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53631           1 :   if (!SWIG_IsOK(res1)) {
   53632           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsHiddenForCLI" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53633             :   }
   53634           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53635           1 :   {
   53636           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53637           1 :     if ( bLocalUseExceptions ) {
   53638           1 :       pushErrorHandler();
   53639             :     }
   53640           1 :     {
   53641           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53642           1 :       result = (bool)GDALAlgorithmArgHS_IsHiddenForCLI(arg1);
   53643           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53644             :     }
   53645           1 :     if ( bLocalUseExceptions ) {
   53646           1 :       popErrorHandler();
   53647             :     }
   53648             : #ifndef SED_HACKS
   53649             :     if ( bLocalUseExceptions ) {
   53650             :       CPLErr eclass = CPLGetLastErrorType();
   53651             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53652             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53653             :       }
   53654             :     }
   53655             : #endif
   53656             :   }
   53657           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53658           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; } }
   53659             :   return resultobj;
   53660             : fail:
   53661             :   return NULL;
   53662             : }
   53663             : 
   53664             : 
   53665           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsHiddenForAPI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53666           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53667           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53668           1 :   void *argp1 = 0 ;
   53669           1 :   int res1 = 0 ;
   53670           1 :   PyObject *swig_obj[1] ;
   53671           1 :   bool result;
   53672             :   
   53673           1 :   if (!args) SWIG_fail;
   53674           1 :   swig_obj[0] = args;
   53675           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53676           1 :   if (!SWIG_IsOK(res1)) {
   53677           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsHiddenForAPI" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53678             :   }
   53679           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53680           1 :   {
   53681           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53682           1 :     if ( bLocalUseExceptions ) {
   53683           1 :       pushErrorHandler();
   53684             :     }
   53685           1 :     {
   53686           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53687           1 :       result = (bool)GDALAlgorithmArgHS_IsHiddenForAPI(arg1);
   53688           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53689             :     }
   53690           1 :     if ( bLocalUseExceptions ) {
   53691           1 :       popErrorHandler();
   53692             :     }
   53693             : #ifndef SED_HACKS
   53694             :     if ( bLocalUseExceptions ) {
   53695             :       CPLErr eclass = CPLGetLastErrorType();
   53696             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53697             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53698             :       }
   53699             :     }
   53700             : #endif
   53701             :   }
   53702           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53703           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; } }
   53704             :   return resultobj;
   53705             : fail:
   53706             :   return NULL;
   53707             : }
   53708             : 
   53709             : 
   53710           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsInput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53711           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53712           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53713           1 :   void *argp1 = 0 ;
   53714           1 :   int res1 = 0 ;
   53715           1 :   PyObject *swig_obj[1] ;
   53716           1 :   bool result;
   53717             :   
   53718           1 :   if (!args) SWIG_fail;
   53719           1 :   swig_obj[0] = args;
   53720           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53721           1 :   if (!SWIG_IsOK(res1)) {
   53722           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsInput" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53723             :   }
   53724           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53725           1 :   {
   53726           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53727           1 :     if ( bLocalUseExceptions ) {
   53728           1 :       pushErrorHandler();
   53729             :     }
   53730           1 :     {
   53731           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53732           1 :       result = (bool)GDALAlgorithmArgHS_IsInput(arg1);
   53733           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53734             :     }
   53735           1 :     if ( bLocalUseExceptions ) {
   53736           1 :       popErrorHandler();
   53737             :     }
   53738             : #ifndef SED_HACKS
   53739             :     if ( bLocalUseExceptions ) {
   53740             :       CPLErr eclass = CPLGetLastErrorType();
   53741             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53742             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53743             :       }
   53744             :     }
   53745             : #endif
   53746             :   }
   53747           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53748           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; } }
   53749             :   return resultobj;
   53750             : fail:
   53751             :   return NULL;
   53752             : }
   53753             : 
   53754             : 
   53755        2713 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsOutput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53756        2713 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53757        2713 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53758        2713 :   void *argp1 = 0 ;
   53759        2713 :   int res1 = 0 ;
   53760        2713 :   PyObject *swig_obj[1] ;
   53761        2713 :   bool result;
   53762             :   
   53763        2713 :   if (!args) SWIG_fail;
   53764        2713 :   swig_obj[0] = args;
   53765        2713 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53766        2713 :   if (!SWIG_IsOK(res1)) {
   53767           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsOutput" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53768             :   }
   53769        2713 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53770        2713 :   {
   53771        2713 :     const int bLocalUseExceptions = GetUseExceptions();
   53772        2713 :     if ( bLocalUseExceptions ) {
   53773        2713 :       pushErrorHandler();
   53774             :     }
   53775        2713 :     {
   53776        2713 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53777        2713 :       result = (bool)GDALAlgorithmArgHS_IsOutput(arg1);
   53778        2713 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53779             :     }
   53780        2713 :     if ( bLocalUseExceptions ) {
   53781        2713 :       popErrorHandler();
   53782             :     }
   53783             : #ifndef SED_HACKS
   53784             :     if ( bLocalUseExceptions ) {
   53785             :       CPLErr eclass = CPLGetLastErrorType();
   53786             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53787             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53788             :       }
   53789             :     }
   53790             : #endif
   53791             :   }
   53792        2713 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53793        2713 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53794             :   return resultobj;
   53795             : fail:
   53796             :   return NULL;
   53797             : }
   53798             : 
   53799             : 
   53800           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53801           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53802           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53803           1 :   void *argp1 = 0 ;
   53804           1 :   int res1 = 0 ;
   53805           1 :   PyObject *swig_obj[1] ;
   53806           1 :   int result;
   53807             :   
   53808           1 :   if (!args) SWIG_fail;
   53809           1 :   swig_obj[0] = args;
   53810           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53811           1 :   if (!SWIG_IsOK(res1)) {
   53812           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetType" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53813             :   }
   53814           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53815           1 :   {
   53816           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53817           1 :     if ( bLocalUseExceptions ) {
   53818           1 :       pushErrorHandler();
   53819             :     }
   53820           1 :     {
   53821           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53822           1 :       result = (int)GDALAlgorithmArgHS_GetDatasetType(arg1);
   53823           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53824             :     }
   53825           1 :     if ( bLocalUseExceptions ) {
   53826           1 :       popErrorHandler();
   53827             :     }
   53828             : #ifndef SED_HACKS
   53829             :     if ( bLocalUseExceptions ) {
   53830             :       CPLErr eclass = CPLGetLastErrorType();
   53831             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53832             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53833             :       }
   53834             :     }
   53835             : #endif
   53836             :   }
   53837           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   53838           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; } }
   53839             :   return resultobj;
   53840             : fail:
   53841             :   return NULL;
   53842             : }
   53843             : 
   53844             : 
   53845           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetInputFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53846           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53847           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53848           1 :   void *argp1 = 0 ;
   53849           1 :   int res1 = 0 ;
   53850           1 :   PyObject *swig_obj[1] ;
   53851           1 :   int result;
   53852             :   
   53853           1 :   if (!args) SWIG_fail;
   53854           1 :   swig_obj[0] = args;
   53855           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53856           1 :   if (!SWIG_IsOK(res1)) {
   53857           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetInputFlags" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53858             :   }
   53859           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53860           1 :   {
   53861           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53862           1 :     if ( bLocalUseExceptions ) {
   53863           1 :       pushErrorHandler();
   53864             :     }
   53865           1 :     {
   53866           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53867           1 :       result = (int)GDALAlgorithmArgHS_GetDatasetInputFlags(arg1);
   53868           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53869             :     }
   53870           1 :     if ( bLocalUseExceptions ) {
   53871           1 :       popErrorHandler();
   53872             :     }
   53873             : #ifndef SED_HACKS
   53874             :     if ( bLocalUseExceptions ) {
   53875             :       CPLErr eclass = CPLGetLastErrorType();
   53876             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53877             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53878             :       }
   53879             :     }
   53880             : #endif
   53881             :   }
   53882           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   53883           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; } }
   53884             :   return resultobj;
   53885             : fail:
   53886             :   return NULL;
   53887             : }
   53888             : 
   53889             : 
   53890           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetOutputFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53891           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53892           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53893           1 :   void *argp1 = 0 ;
   53894           1 :   int res1 = 0 ;
   53895           1 :   PyObject *swig_obj[1] ;
   53896           1 :   int result;
   53897             :   
   53898           1 :   if (!args) SWIG_fail;
   53899           1 :   swig_obj[0] = args;
   53900           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53901           1 :   if (!SWIG_IsOK(res1)) {
   53902           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetOutputFlags" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53903             :   }
   53904           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53905           1 :   {
   53906           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53907           1 :     if ( bLocalUseExceptions ) {
   53908           1 :       pushErrorHandler();
   53909             :     }
   53910           1 :     {
   53911           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53912           1 :       result = (int)GDALAlgorithmArgHS_GetDatasetOutputFlags(arg1);
   53913           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53914             :     }
   53915           1 :     if ( bLocalUseExceptions ) {
   53916           1 :       popErrorHandler();
   53917             :     }
   53918             : #ifndef SED_HACKS
   53919             :     if ( bLocalUseExceptions ) {
   53920             :       CPLErr eclass = CPLGetLastErrorType();
   53921             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53922             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53923             :       }
   53924             :     }
   53925             : #endif
   53926             :   }
   53927           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   53928           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; } }
   53929             :   return resultobj;
   53930             : fail:
   53931             :   return NULL;
   53932             : }
   53933             : 
   53934             : 
   53935           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMutualExclusionGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53936           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53937           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53938           1 :   void *argp1 = 0 ;
   53939           1 :   int res1 = 0 ;
   53940           1 :   PyObject *swig_obj[1] ;
   53941           1 :   char *result = 0 ;
   53942             :   
   53943           1 :   if (!args) SWIG_fail;
   53944           1 :   swig_obj[0] = args;
   53945           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53946           1 :   if (!SWIG_IsOK(res1)) {
   53947           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMutualExclusionGroup" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53948             :   }
   53949           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53950           1 :   {
   53951           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53952           1 :     if ( bLocalUseExceptions ) {
   53953           1 :       pushErrorHandler();
   53954             :     }
   53955           1 :     {
   53956           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53957           1 :       result = (char *)GDALAlgorithmArgHS_GetMutualExclusionGroup(arg1);
   53958           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53959             :     }
   53960           1 :     if ( bLocalUseExceptions ) {
   53961           1 :       popErrorHandler();
   53962             :     }
   53963             : #ifndef SED_HACKS
   53964             :     if ( bLocalUseExceptions ) {
   53965             :       CPLErr eclass = CPLGetLastErrorType();
   53966             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53967             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53968             :       }
   53969             :     }
   53970             : #endif
   53971             :   }
   53972           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   53973           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; } }
   53974             :   return resultobj;
   53975             : fail:
   53976             :   return NULL;
   53977             : }
   53978             : 
   53979             : 
   53980           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsBoolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53981           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53982           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53983           7 :   void *argp1 = 0 ;
   53984           7 :   int res1 = 0 ;
   53985           7 :   PyObject *swig_obj[1] ;
   53986           7 :   bool result;
   53987             :   
   53988           7 :   if (!args) SWIG_fail;
   53989           7 :   swig_obj[0] = args;
   53990           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53991           7 :   if (!SWIG_IsOK(res1)) {
   53992           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsBoolean" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53993             :   }
   53994           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53995           7 :   {
   53996           7 :     const int bLocalUseExceptions = GetUseExceptions();
   53997           7 :     if ( bLocalUseExceptions ) {
   53998           7 :       pushErrorHandler();
   53999             :     }
   54000           7 :     {
   54001           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54002           7 :       result = (bool)GDALAlgorithmArgHS_GetAsBoolean(arg1);
   54003           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54004             :     }
   54005           7 :     if ( bLocalUseExceptions ) {
   54006           7 :       popErrorHandler();
   54007             :     }
   54008             : #ifndef SED_HACKS
   54009             :     if ( bLocalUseExceptions ) {
   54010             :       CPLErr eclass = CPLGetLastErrorType();
   54011             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54012             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54013             :       }
   54014             :     }
   54015             : #endif
   54016             :   }
   54017           7 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54018           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; } }
   54019             :   return resultobj;
   54020             : fail:
   54021             :   return NULL;
   54022             : }
   54023             : 
   54024             : 
   54025         292 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54026         292 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54027         292 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54028         292 :   void *argp1 = 0 ;
   54029         292 :   int res1 = 0 ;
   54030         292 :   PyObject *swig_obj[1] ;
   54031         292 :   char *result = 0 ;
   54032             :   
   54033         292 :   if (!args) SWIG_fail;
   54034         292 :   swig_obj[0] = args;
   54035         292 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54036         292 :   if (!SWIG_IsOK(res1)) {
   54037           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsString" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54038             :   }
   54039         292 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54040         292 :   {
   54041         292 :     const int bLocalUseExceptions = GetUseExceptions();
   54042         292 :     if ( bLocalUseExceptions ) {
   54043         292 :       pushErrorHandler();
   54044             :     }
   54045         292 :     {
   54046         292 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54047         292 :       result = (char *)GDALAlgorithmArgHS_GetAsString(arg1);
   54048         292 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54049             :     }
   54050         292 :     if ( bLocalUseExceptions ) {
   54051         292 :       popErrorHandler();
   54052             :     }
   54053             : #ifndef SED_HACKS
   54054             :     if ( bLocalUseExceptions ) {
   54055             :       CPLErr eclass = CPLGetLastErrorType();
   54056             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54057             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54058             :       }
   54059             :     }
   54060             : #endif
   54061             :   }
   54062         292 :   resultobj = SWIG_FromCharPtr((const char *)result);
   54063         294 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54064             :   return resultobj;
   54065             : fail:
   54066             :   return NULL;
   54067             : }
   54068             : 
   54069             : 
   54070           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54071           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54072           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54073           7 :   void *argp1 = 0 ;
   54074           7 :   int res1 = 0 ;
   54075           7 :   PyObject *swig_obj[1] ;
   54076           7 :   int result;
   54077             :   
   54078           7 :   if (!args) SWIG_fail;
   54079           7 :   swig_obj[0] = args;
   54080           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54081           7 :   if (!SWIG_IsOK(res1)) {
   54082           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsInteger" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54083             :   }
   54084           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54085           7 :   {
   54086           7 :     const int bLocalUseExceptions = GetUseExceptions();
   54087           7 :     if ( bLocalUseExceptions ) {
   54088           7 :       pushErrorHandler();
   54089             :     }
   54090           7 :     {
   54091           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54092           7 :       result = (int)GDALAlgorithmArgHS_GetAsInteger(arg1);
   54093           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54094             :     }
   54095           7 :     if ( bLocalUseExceptions ) {
   54096           7 :       popErrorHandler();
   54097             :     }
   54098             : #ifndef SED_HACKS
   54099             :     if ( bLocalUseExceptions ) {
   54100             :       CPLErr eclass = CPLGetLastErrorType();
   54101             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54102             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54103             :       }
   54104             :     }
   54105             : #endif
   54106             :   }
   54107           7 :   resultobj = SWIG_From_int(static_cast< int >(result));
   54108           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; } }
   54109             :   return resultobj;
   54110             : fail:
   54111             :   return NULL;
   54112             : }
   54113             : 
   54114             : 
   54115           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54116           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54117           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54118           7 :   void *argp1 = 0 ;
   54119           7 :   int res1 = 0 ;
   54120           7 :   PyObject *swig_obj[1] ;
   54121           7 :   double result;
   54122             :   
   54123           7 :   if (!args) SWIG_fail;
   54124           7 :   swig_obj[0] = args;
   54125           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54126           7 :   if (!SWIG_IsOK(res1)) {
   54127           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDouble" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54128             :   }
   54129           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54130           7 :   {
   54131           7 :     const int bLocalUseExceptions = GetUseExceptions();
   54132           7 :     if ( bLocalUseExceptions ) {
   54133           7 :       pushErrorHandler();
   54134             :     }
   54135           7 :     {
   54136           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54137           7 :       result = (double)GDALAlgorithmArgHS_GetAsDouble(arg1);
   54138           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54139             :     }
   54140           7 :     if ( bLocalUseExceptions ) {
   54141           7 :       popErrorHandler();
   54142             :     }
   54143             : #ifndef SED_HACKS
   54144             :     if ( bLocalUseExceptions ) {
   54145             :       CPLErr eclass = CPLGetLastErrorType();
   54146             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54147             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54148             :       }
   54149             :     }
   54150             : #endif
   54151             :   }
   54152           7 :   resultobj = SWIG_From_double(static_cast< double >(result));
   54153           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; } }
   54154             :   return resultobj;
   54155             : fail:
   54156             :   return NULL;
   54157             : }
   54158             : 
   54159             : 
   54160        1716 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDatasetValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54161        1716 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54162        1716 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54163        1716 :   void *argp1 = 0 ;
   54164        1716 :   int res1 = 0 ;
   54165        1716 :   PyObject *swig_obj[1] ;
   54166        1716 :   GDALArgDatasetValueHS *result = 0 ;
   54167             :   
   54168        1716 :   if (!args) SWIG_fail;
   54169        1716 :   swig_obj[0] = args;
   54170        1716 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54171        1716 :   if (!SWIG_IsOK(res1)) {
   54172           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDatasetValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54173             :   }
   54174        1716 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54175        1716 :   {
   54176        1716 :     const int bLocalUseExceptions = GetUseExceptions();
   54177        1716 :     if ( bLocalUseExceptions ) {
   54178        1714 :       pushErrorHandler();
   54179             :     }
   54180        1716 :     {
   54181        1716 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54182        1716 :       result = (GDALArgDatasetValueHS *)GDALAlgorithmArgHS_GetAsDatasetValue(arg1);
   54183        1716 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54184             :     }
   54185        1716 :     if ( bLocalUseExceptions ) {
   54186        1714 :       popErrorHandler();
   54187             :     }
   54188             : #ifndef SED_HACKS
   54189             :     if ( bLocalUseExceptions ) {
   54190             :       CPLErr eclass = CPLGetLastErrorType();
   54191             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54192             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54193             :       }
   54194             :     }
   54195             : #endif
   54196             :   }
   54197        1716 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_POINTER_OWN |  0 );
   54198        1718 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54199             :   return resultobj;
   54200             : fail:
   54201             :   return NULL;
   54202             : }
   54203             : 
   54204             : 
   54205           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54206           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54207           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54208           1 :   void *argp1 = 0 ;
   54209           1 :   int res1 = 0 ;
   54210           1 :   PyObject *swig_obj[1] ;
   54211           1 :   char **result = 0 ;
   54212             :   
   54213           1 :   if (!args) SWIG_fail;
   54214           1 :   swig_obj[0] = args;
   54215           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54216           1 :   if (!SWIG_IsOK(res1)) {
   54217           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsStringList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54218             :   }
   54219           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54220           1 :   {
   54221           1 :     const int bLocalUseExceptions = GetUseExceptions();
   54222           1 :     if ( bLocalUseExceptions ) {
   54223           1 :       pushErrorHandler();
   54224             :     }
   54225           1 :     {
   54226           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54227           1 :       result = (char **)GDALAlgorithmArgHS_GetAsStringList(arg1);
   54228           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54229             :     }
   54230           1 :     if ( bLocalUseExceptions ) {
   54231           1 :       popErrorHandler();
   54232             :     }
   54233             : #ifndef SED_HACKS
   54234             :     if ( bLocalUseExceptions ) {
   54235             :       CPLErr eclass = CPLGetLastErrorType();
   54236             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54237             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54238             :       }
   54239             :     }
   54240             : #endif
   54241             :   }
   54242           1 :   {
   54243             :     /* %typemap(out) char **CSL -> ( string ) */
   54244           1 :     bool bErr = false;
   54245           1 :     resultobj = CSLToList(result, &bErr);
   54246           1 :     CSLDestroy(result);
   54247           1 :     if( bErr ) {
   54248           0 :       SWIG_fail;
   54249             :     }
   54250             :   }
   54251           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; } }
   54252             :   return resultobj;
   54253             : fail:
   54254             :   return NULL;
   54255             : }
   54256             : 
   54257             : 
   54258           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54259           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54260           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54261           7 :   int *arg2 = (int *) 0 ;
   54262           7 :   int **arg3 = (int **) 0 ;
   54263           7 :   void *argp1 = 0 ;
   54264           7 :   int res1 = 0 ;
   54265           7 :   int nLen2 = 0 ;
   54266           7 :   int *pList2 = NULL ;
   54267           7 :   PyObject *swig_obj[1] ;
   54268             :   
   54269           7 :   {
   54270             :     /* %typemap(in,numinputs=0) (int *nLen2, const int **pList2) (int nLen2, int *pList2) */
   54271           7 :     arg2 = &nLen2;
   54272           7 :     arg3 = &pList2;
   54273             :   }
   54274           7 :   if (!args) SWIG_fail;
   54275           7 :   swig_obj[0] = args;
   54276           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54277           7 :   if (!SWIG_IsOK(res1)) {
   54278           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsIntegerList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54279             :   }
   54280           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54281           7 :   {
   54282           7 :     const int bLocalUseExceptions = GetUseExceptions();
   54283           7 :     if ( bLocalUseExceptions ) {
   54284           7 :       pushErrorHandler();
   54285             :     }
   54286           7 :     {
   54287           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54288           7 :       GDALAlgorithmArgHS_GetAsIntegerList(arg1,arg2,(int const **)arg3);
   54289           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54290             :     }
   54291           7 :     if ( bLocalUseExceptions ) {
   54292           7 :       popErrorHandler();
   54293             :     }
   54294             : #ifndef SED_HACKS
   54295             :     if ( bLocalUseExceptions ) {
   54296             :       CPLErr eclass = CPLGetLastErrorType();
   54297             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54298             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54299             :       }
   54300             :     }
   54301             : #endif
   54302             :   }
   54303           7 :   resultobj = SWIG_Py_Void();
   54304           7 :   {
   54305             :     /* %typemap(argout) (int *nLen, const int **pList ) */
   54306           7 :     Py_DECREF(resultobj);
   54307           7 :     PyObject *out = PyList_New( *arg2 );
   54308           7 :     if( !out ) {
   54309           0 :       SWIG_fail;
   54310             :     }
   54311          16 :     for( int i=0; i<*arg2; i++ ) {
   54312           9 :       PyObject *val = PyInt_FromLong( (*arg3)[i] );
   54313           9 :       PyList_SetItem( out, i, val );
   54314             :     }
   54315           7 :     resultobj = out;
   54316             :   }
   54317           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; } }
   54318             :   return resultobj;
   54319             : fail:
   54320             :   return NULL;
   54321             : }
   54322             : 
   54323             : 
   54324           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54325           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54326           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54327           7 :   int *arg2 = (int *) 0 ;
   54328           7 :   double **arg3 = (double **) 0 ;
   54329           7 :   void *argp1 = 0 ;
   54330           7 :   int res1 = 0 ;
   54331           7 :   int nLen2 = 0 ;
   54332           7 :   double *pList2 = NULL ;
   54333           7 :   PyObject *swig_obj[1] ;
   54334             :   
   54335           7 :   {
   54336             :     /* %typemap(in,numinputs=0) (int *nLen2, const double **pList2) (int nLen2, double *pList2) */
   54337           7 :     arg2 = &nLen2;
   54338           7 :     arg3 = &pList2;
   54339             :   }
   54340           7 :   if (!args) SWIG_fail;
   54341           7 :   swig_obj[0] = args;
   54342           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54343           7 :   if (!SWIG_IsOK(res1)) {
   54344           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDoubleList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54345             :   }
   54346           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54347           7 :   {
   54348           7 :     const int bLocalUseExceptions = GetUseExceptions();
   54349           7 :     if ( bLocalUseExceptions ) {
   54350           7 :       pushErrorHandler();
   54351             :     }
   54352           7 :     {
   54353           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54354           7 :       GDALAlgorithmArgHS_GetAsDoubleList(arg1,arg2,(double const **)arg3);
   54355           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54356             :     }
   54357           7 :     if ( bLocalUseExceptions ) {
   54358           7 :       popErrorHandler();
   54359             :     }
   54360             : #ifndef SED_HACKS
   54361             :     if ( bLocalUseExceptions ) {
   54362             :       CPLErr eclass = CPLGetLastErrorType();
   54363             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54364             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54365             :       }
   54366             :     }
   54367             : #endif
   54368             :   }
   54369           7 :   resultobj = SWIG_Py_Void();
   54370           7 :   {
   54371             :     /* %typemap(argout) (int *nLen, const double **pList ) */
   54372           7 :     Py_DECREF(resultobj);
   54373           7 :     PyObject *out = PyList_New( *arg2 );
   54374           7 :     if( !out ) {
   54375           0 :       SWIG_fail;
   54376             :     }
   54377          16 :     for( int i=0; i<*arg2; i++ ) {
   54378           9 :       PyObject *val = PyFloat_FromDouble( (*arg3)[i] );
   54379           9 :       PyList_SetItem( out, i, val );
   54380             :     }
   54381           7 :     resultobj = out;
   54382             :   }
   54383           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; } }
   54384             :   return resultobj;
   54385             : fail:
   54386             :   return NULL;
   54387             : }
   54388             : 
   54389             : 
   54390         513 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsBoolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54391         513 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54392         513 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54393         513 :   bool arg2 ;
   54394         513 :   void *argp1 = 0 ;
   54395         513 :   int res1 = 0 ;
   54396         513 :   bool val2 ;
   54397         513 :   int ecode2 = 0 ;
   54398         513 :   PyObject *swig_obj[2] ;
   54399         513 :   bool result;
   54400             :   
   54401         513 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsBoolean", 2, 2, swig_obj)) SWIG_fail;
   54402         513 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54403         513 :   if (!SWIG_IsOK(res1)) {
   54404           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsBoolean" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54405             :   }
   54406         513 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54407         513 :   ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
   54408         512 :   if (!SWIG_IsOK(ecode2)) {
   54409           1 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsBoolean" "', argument " "2"" of type '" "bool""'");
   54410             :   } 
   54411         512 :   arg2 = static_cast< bool >(val2);
   54412         512 :   {
   54413         512 :     const int bLocalUseExceptions = GetUseExceptions();
   54414         512 :     if ( bLocalUseExceptions ) {
   54415         512 :       pushErrorHandler();
   54416             :     }
   54417         512 :     {
   54418         512 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54419         512 :       result = (bool)GDALAlgorithmArgHS_SetAsBoolean(arg1,arg2);
   54420         512 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54421             :     }
   54422         512 :     if ( bLocalUseExceptions ) {
   54423         512 :       popErrorHandler();
   54424             :     }
   54425             : #ifndef SED_HACKS
   54426             :     if ( bLocalUseExceptions ) {
   54427             :       CPLErr eclass = CPLGetLastErrorType();
   54428             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54429             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54430             :       }
   54431             :     }
   54432             : #endif
   54433             :   }
   54434         512 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54435         513 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54436             :   return resultobj;
   54437             : fail:
   54438             :   return NULL;
   54439             : }
   54440             : 
   54441             : 
   54442        1555 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54443        1555 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54444        1555 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54445        1555 :   char *arg2 = (char *) 0 ;
   54446        1555 :   void *argp1 = 0 ;
   54447        1555 :   int res1 = 0 ;
   54448        1555 :   int res2 ;
   54449        1555 :   char *buf2 = 0 ;
   54450        1555 :   int alloc2 = 0 ;
   54451        1555 :   PyObject *swig_obj[2] ;
   54452        1555 :   bool result;
   54453             :   
   54454        1555 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsString", 2, 2, swig_obj)) SWIG_fail;
   54455        1555 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54456        1555 :   if (!SWIG_IsOK(res1)) {
   54457           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsString" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54458             :   }
   54459        1555 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54460        1555 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   54461        1555 :   if (!SWIG_IsOK(res2)) {
   54462           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetAsString" "', argument " "2"" of type '" "char const *""'");
   54463             :   }
   54464        1555 :   arg2 = reinterpret_cast< char * >(buf2);
   54465        1555 :   {
   54466        1555 :     const int bLocalUseExceptions = GetUseExceptions();
   54467        1555 :     if ( bLocalUseExceptions ) {
   54468        1555 :       pushErrorHandler();
   54469             :     }
   54470        1555 :     {
   54471        1555 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54472        1555 :       result = (bool)GDALAlgorithmArgHS_SetAsString(arg1,(char const *)arg2);
   54473        1555 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54474             :     }
   54475        1555 :     if ( bLocalUseExceptions ) {
   54476        1555 :       popErrorHandler();
   54477             :     }
   54478             : #ifndef SED_HACKS
   54479             :     if ( bLocalUseExceptions ) {
   54480             :       CPLErr eclass = CPLGetLastErrorType();
   54481             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54482             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54483             :       }
   54484             :     }
   54485             : #endif
   54486             :   }
   54487        1555 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54488        1555 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   54489        1613 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54490             :   return resultobj;
   54491           0 : fail:
   54492           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   54493             :   return NULL;
   54494             : }
   54495             : 
   54496             : 
   54497         232 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54498         232 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54499         232 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54500         232 :   int arg2 ;
   54501         232 :   void *argp1 = 0 ;
   54502         232 :   int res1 = 0 ;
   54503         232 :   int val2 ;
   54504         232 :   int ecode2 = 0 ;
   54505         232 :   PyObject *swig_obj[2] ;
   54506         232 :   bool result;
   54507             :   
   54508         232 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsInteger", 2, 2, swig_obj)) SWIG_fail;
   54509         232 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54510         232 :   if (!SWIG_IsOK(res1)) {
   54511           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsInteger" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54512             :   }
   54513         232 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54514         232 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   54515         232 :   if (!SWIG_IsOK(ecode2)) {
   54516           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsInteger" "', argument " "2"" of type '" "int""'");
   54517             :   } 
   54518         232 :   arg2 = static_cast< int >(val2);
   54519         232 :   {
   54520         232 :     const int bLocalUseExceptions = GetUseExceptions();
   54521         232 :     if ( bLocalUseExceptions ) {
   54522         232 :       pushErrorHandler();
   54523             :     }
   54524         232 :     {
   54525         232 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54526         232 :       result = (bool)GDALAlgorithmArgHS_SetAsInteger(arg1,arg2);
   54527         232 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54528             :     }
   54529         232 :     if ( bLocalUseExceptions ) {
   54530         232 :       popErrorHandler();
   54531             :     }
   54532             : #ifndef SED_HACKS
   54533             :     if ( bLocalUseExceptions ) {
   54534             :       CPLErr eclass = CPLGetLastErrorType();
   54535             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54536             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54537             :       }
   54538             :     }
   54539             : #endif
   54540             :   }
   54541         232 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54542         234 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54543             :   return resultobj;
   54544             : fail:
   54545             :   return NULL;
   54546             : }
   54547             : 
   54548             : 
   54549         215 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54550         215 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54551         215 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54552         215 :   double arg2 ;
   54553         215 :   void *argp1 = 0 ;
   54554         215 :   int res1 = 0 ;
   54555         215 :   double val2 ;
   54556         215 :   int ecode2 = 0 ;
   54557         215 :   PyObject *swig_obj[2] ;
   54558         215 :   bool result;
   54559             :   
   54560         215 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDouble", 2, 2, swig_obj)) SWIG_fail;
   54561         215 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54562         215 :   if (!SWIG_IsOK(res1)) {
   54563           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDouble" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54564             :   }
   54565         215 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54566         215 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   54567         215 :   if (!SWIG_IsOK(ecode2)) {
   54568           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsDouble" "', argument " "2"" of type '" "double""'");
   54569             :   } 
   54570         215 :   arg2 = static_cast< double >(val2);
   54571         215 :   {
   54572         215 :     const int bLocalUseExceptions = GetUseExceptions();
   54573         215 :     if ( bLocalUseExceptions ) {
   54574         215 :       pushErrorHandler();
   54575             :     }
   54576         215 :     {
   54577         215 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54578         215 :       result = (bool)GDALAlgorithmArgHS_SetAsDouble(arg1,arg2);
   54579         215 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54580             :     }
   54581         215 :     if ( bLocalUseExceptions ) {
   54582         215 :       popErrorHandler();
   54583             :     }
   54584             : #ifndef SED_HACKS
   54585             :     if ( bLocalUseExceptions ) {
   54586             :       CPLErr eclass = CPLGetLastErrorType();
   54587             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54588             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54589             :       }
   54590             :     }
   54591             : #endif
   54592             :   }
   54593         215 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54594         235 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54595             :   return resultobj;
   54596             : fail:
   54597             :   return NULL;
   54598             : }
   54599             : 
   54600             : 
   54601           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDatasetValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54602           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54603           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54604           1 :   GDALArgDatasetValueHS *arg2 = (GDALArgDatasetValueHS *) 0 ;
   54605           1 :   void *argp1 = 0 ;
   54606           1 :   int res1 = 0 ;
   54607           1 :   void *argp2 = 0 ;
   54608           1 :   int res2 = 0 ;
   54609           1 :   PyObject *swig_obj[2] ;
   54610           1 :   bool result;
   54611             :   
   54612           1 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDatasetValue", 2, 2, swig_obj)) SWIG_fail;
   54613           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54614           1 :   if (!SWIG_IsOK(res1)) {
   54615           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDatasetValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54616             :   }
   54617           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54618           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   54619           1 :   if (!SWIG_IsOK(res2)) {
   54620           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetAsDatasetValue" "', argument " "2"" of type '" "GDALArgDatasetValueHS *""'"); 
   54621             :   }
   54622           1 :   arg2 = reinterpret_cast< GDALArgDatasetValueHS * >(argp2);
   54623           1 :   {
   54624           1 :     const int bLocalUseExceptions = GetUseExceptions();
   54625           1 :     if ( bLocalUseExceptions ) {
   54626           1 :       pushErrorHandler();
   54627             :     }
   54628           1 :     {
   54629           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54630           1 :       result = (bool)GDALAlgorithmArgHS_SetAsDatasetValue(arg1,arg2);
   54631           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54632             :     }
   54633           1 :     if ( bLocalUseExceptions ) {
   54634           1 :       popErrorHandler();
   54635             :     }
   54636             : #ifndef SED_HACKS
   54637             :     if ( bLocalUseExceptions ) {
   54638             :       CPLErr eclass = CPLGetLastErrorType();
   54639             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54640             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54641             :       }
   54642             :     }
   54643             : #endif
   54644             :   }
   54645           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54646           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; } }
   54647             :   return resultobj;
   54648             : fail:
   54649             :   return NULL;
   54650             : }
   54651             : 
   54652             : 
   54653         310 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54654         310 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54655         310 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54656         310 :   char **arg2 = (char **) 0 ;
   54657         310 :   void *argp1 = 0 ;
   54658         310 :   int res1 = 0 ;
   54659         310 :   PyObject *swig_obj[2] ;
   54660         310 :   bool result;
   54661             :   
   54662         310 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsStringList", 2, 2, swig_obj)) SWIG_fail;
   54663         310 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54664         310 :   if (!SWIG_IsOK(res1)) {
   54665           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsStringList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54666             :   }
   54667         310 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54668         310 :   {
   54669             :     /* %typemap(in) char **dict */
   54670         310 :     arg2 = NULL;
   54671         310 :     if ( PySequence_Check( swig_obj[1] ) ) {
   54672         310 :       int bErr = FALSE;
   54673         310 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   54674         310 :       if ( bErr )
   54675             :       {
   54676           0 :         SWIG_fail;
   54677             :       }
   54678             :     }
   54679           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   54680           0 :       int bErr = FALSE;
   54681           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   54682           0 :       if ( bErr )
   54683             :       {
   54684           0 :         SWIG_fail;
   54685             :       }
   54686             :     }
   54687             :     else {
   54688           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   54689           0 :       SWIG_fail;
   54690             :     }
   54691             :   }
   54692         310 :   {
   54693         310 :     const int bLocalUseExceptions = GetUseExceptions();
   54694         310 :     if ( bLocalUseExceptions ) {
   54695         309 :       pushErrorHandler();
   54696             :     }
   54697         310 :     {
   54698         310 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54699         310 :       result = (bool)GDALAlgorithmArgHS_SetAsStringList(arg1,arg2);
   54700         310 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54701             :     }
   54702         310 :     if ( bLocalUseExceptions ) {
   54703         309 :       popErrorHandler();
   54704             :     }
   54705             : #ifndef SED_HACKS
   54706             :     if ( bLocalUseExceptions ) {
   54707             :       CPLErr eclass = CPLGetLastErrorType();
   54708             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54709             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54710             :       }
   54711             :     }
   54712             : #endif
   54713             :   }
   54714         310 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54715         310 :   {
   54716             :     /* %typemap(freearg) char **dict */
   54717         310 :     CSLDestroy( arg2 );
   54718             :   }
   54719         332 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54720             :   return resultobj;
   54721           0 : fail:
   54722           0 :   {
   54723             :     /* %typemap(freearg) char **dict */
   54724           0 :     CSLDestroy( arg2 );
   54725             :   }
   54726             :   return NULL;
   54727             : }
   54728             : 
   54729             : 
   54730          61 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54731          61 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54732          61 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54733          61 :   int arg2 ;
   54734          61 :   int *arg3 = (int *) 0 ;
   54735          61 :   void *argp1 = 0 ;
   54736          61 :   int res1 = 0 ;
   54737          61 :   PyObject *swig_obj[2] ;
   54738          61 :   bool result;
   54739             :   
   54740          61 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsIntegerList", 2, 2, swig_obj)) SWIG_fail;
   54741          61 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54742          61 :   if (!SWIG_IsOK(res1)) {
   54743           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsIntegerList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54744             :   }
   54745          61 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54746          61 :   {
   54747             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   54748          61 :     arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
   54749          61 :     if( arg2 < 0 ) {
   54750           2 :       SWIG_fail;
   54751             :     }
   54752             :   }
   54753          59 :   {
   54754          59 :     const int bLocalUseExceptions = GetUseExceptions();
   54755          59 :     if ( bLocalUseExceptions ) {
   54756          59 :       pushErrorHandler();
   54757             :     }
   54758          59 :     {
   54759          59 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54760          59 :       result = (bool)GDALAlgorithmArgHS_SetAsIntegerList(arg1,arg2,arg3);
   54761          59 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54762             :     }
   54763          59 :     if ( bLocalUseExceptions ) {
   54764          59 :       popErrorHandler();
   54765             :     }
   54766             : #ifndef SED_HACKS
   54767             :     if ( bLocalUseExceptions ) {
   54768             :       CPLErr eclass = CPLGetLastErrorType();
   54769             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54770             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54771             :       }
   54772             :     }
   54773             : #endif
   54774             :   }
   54775          59 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54776          59 :   {
   54777             :     /* %typemap(freearg) (int nList, int* pList) */
   54778          59 :     free(arg3);
   54779             :   }
   54780          67 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54781             :   return resultobj;
   54782           2 : fail:
   54783           2 :   {
   54784             :     /* %typemap(freearg) (int nList, int* pList) */
   54785           2 :     free(arg3);
   54786             :   }
   54787           2 :   return NULL;
   54788             : }
   54789             : 
   54790             : 
   54791         126 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54792         126 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54793         126 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54794         126 :   int arg2 ;
   54795         126 :   double *arg3 = (double *) 0 ;
   54796         126 :   void *argp1 = 0 ;
   54797         126 :   int res1 = 0 ;
   54798         126 :   PyObject *swig_obj[2] ;
   54799         126 :   bool result;
   54800             :   
   54801         126 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDoubleList", 2, 2, swig_obj)) SWIG_fail;
   54802         126 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54803         126 :   if (!SWIG_IsOK(res1)) {
   54804           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDoubleList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54805             :   }
   54806         126 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54807         126 :   {
   54808             :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   54809         126 :     arg3 = CreateCDoubleListFromSequence(swig_obj[1], &arg2);
   54810         126 :     if( arg2 < 0 ) {
   54811           2 :       SWIG_fail;
   54812             :     }
   54813             :   }
   54814         124 :   {
   54815         124 :     const int bLocalUseExceptions = GetUseExceptions();
   54816         124 :     if ( bLocalUseExceptions ) {
   54817         124 :       pushErrorHandler();
   54818             :     }
   54819         124 :     {
   54820         124 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54821         124 :       result = (bool)GDALAlgorithmArgHS_SetAsDoubleList(arg1,arg2,arg3);
   54822         124 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54823             :     }
   54824         124 :     if ( bLocalUseExceptions ) {
   54825         124 :       popErrorHandler();
   54826             :     }
   54827             : #ifndef SED_HACKS
   54828             :     if ( bLocalUseExceptions ) {
   54829             :       CPLErr eclass = CPLGetLastErrorType();
   54830             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54831             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54832             :       }
   54833             :     }
   54834             : #endif
   54835             :   }
   54836         124 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54837         124 :   {
   54838             :     /* %typemap(freearg) (int nList, double* pList) */
   54839         124 :     free(arg3);
   54840             :   }
   54841         128 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54842             :   return resultobj;
   54843           2 : fail:
   54844           2 :   {
   54845             :     /* %typemap(freearg) (int nList, double* pList) */
   54846           2 :     free(arg3);
   54847             :   }
   54848           2 :   return NULL;
   54849             : }
   54850             : 
   54851             : 
   54852           0 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54853           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54854           0 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54855           0 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   54856           0 :   void *argp1 = 0 ;
   54857           0 :   int res1 = 0 ;
   54858           0 :   void *argp2 = 0 ;
   54859           0 :   int res2 = 0 ;
   54860           0 :   PyObject *swig_obj[2] ;
   54861           0 :   bool result;
   54862             :   
   54863           0 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDataset", 2, 2, swig_obj)) SWIG_fail;
   54864           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54865           0 :   if (!SWIG_IsOK(res1)) {
   54866           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDataset" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54867             :   }
   54868           0 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54869           0 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   54870           0 :   if (!SWIG_IsOK(res2)) {
   54871           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetDataset" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   54872             :   }
   54873           0 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   54874           0 :   {
   54875           0 :     const int bLocalUseExceptions = GetUseExceptions();
   54876           0 :     if ( bLocalUseExceptions ) {
   54877           0 :       pushErrorHandler();
   54878             :     }
   54879           0 :     {
   54880           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54881           0 :       result = (bool)GDALAlgorithmArgHS_SetDataset(arg1,arg2);
   54882           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54883             :     }
   54884           0 :     if ( bLocalUseExceptions ) {
   54885           0 :       popErrorHandler();
   54886             :     }
   54887             : #ifndef SED_HACKS
   54888             :     if ( bLocalUseExceptions ) {
   54889             :       CPLErr eclass = CPLGetLastErrorType();
   54890             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54891             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54892             :       }
   54893             :     }
   54894             : #endif
   54895             :   }
   54896           0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54897           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; } }
   54898             :   return resultobj;
   54899             : fail:
   54900             :   return NULL;
   54901             : }
   54902             : 
   54903             : 
   54904         724 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDatasets(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54905         724 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54906         724 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54907         724 :   int arg2 ;
   54908         724 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   54909         724 :   void *argp1 = 0 ;
   54910         724 :   int res1 = 0 ;
   54911         724 :   PyObject *swig_obj[2] ;
   54912         724 :   bool result;
   54913             :   
   54914         724 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDatasets", 2, 2, swig_obj)) SWIG_fail;
   54915         724 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54916         724 :   if (!SWIG_IsOK(res1)) {
   54917           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDatasets" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54918             :   }
   54919         724 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54920         724 :   {
   54921             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   54922         724 :     if ( !PySequence_Check(swig_obj[1]) ) {
   54923           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   54924           0 :       SWIG_fail;
   54925             :     }
   54926         724 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   54927         724 :     if( size > (Py_ssize_t)INT_MAX ) {
   54928           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   54929           0 :       SWIG_fail;
   54930             :     }
   54931         724 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   54932           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   54933           0 :       SWIG_fail;
   54934             :     }
   54935         724 :     arg2 = (int)size;
   54936         724 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   54937         724 :     if( !arg3) {
   54938           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   54939           0 :       SWIG_fail;
   54940             :     }
   54941             :     
   54942        1473 :     for( int i = 0; i<arg2; i++ ) {
   54943         749 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   54944         749 :       GDALDatasetShadow* rawobjectpointer = NULL;
   54945         749 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   54946         749 :       if (!rawobjectpointer) {
   54947           0 :         Py_DECREF(o);
   54948           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   54949           0 :         SWIG_fail;
   54950             :       }
   54951         749 :       arg3[i] = rawobjectpointer;
   54952         749 :       Py_DECREF(o);
   54953             :       
   54954             :     }
   54955             :   }
   54956         724 :   {
   54957         724 :     const int bLocalUseExceptions = GetUseExceptions();
   54958         724 :     if ( bLocalUseExceptions ) {
   54959         724 :       pushErrorHandler();
   54960             :     }
   54961         724 :     {
   54962         724 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54963         724 :       result = (bool)GDALAlgorithmArgHS_SetDatasets(arg1,arg2,arg3);
   54964         724 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54965             :     }
   54966         724 :     if ( bLocalUseExceptions ) {
   54967         724 :       popErrorHandler();
   54968             :     }
   54969             : #ifndef SED_HACKS
   54970             :     if ( bLocalUseExceptions ) {
   54971             :       CPLErr eclass = CPLGetLastErrorType();
   54972             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54973             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54974             :       }
   54975             :     }
   54976             : #endif
   54977             :   }
   54978         724 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54979         724 :   {
   54980             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   54981         724 :     CPLFree( arg3 );
   54982             :   }
   54983         724 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54984             :   return resultobj;
   54985           0 : fail:
   54986           0 :   {
   54987             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   54988           0 :     CPLFree( arg3 );
   54989             :   }
   54990             :   return NULL;
   54991             : }
   54992             : 
   54993             : 
   54994         472 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDatasetNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54995         472 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54996         472 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54997         472 :   char **arg2 = (char **) 0 ;
   54998         472 :   void *argp1 = 0 ;
   54999         472 :   int res1 = 0 ;
   55000         472 :   PyObject *swig_obj[2] ;
   55001         472 :   bool result;
   55002             :   
   55003         472 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDatasetNames", 2, 2, swig_obj)) SWIG_fail;
   55004         472 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   55005         472 :   if (!SWIG_IsOK(res1)) {
   55006           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDatasetNames" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   55007             :   }
   55008         472 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   55009         472 :   {
   55010             :     /* %typemap(in) char **dict */
   55011         472 :     arg2 = NULL;
   55012         472 :     if ( PySequence_Check( swig_obj[1] ) ) {
   55013         472 :       int bErr = FALSE;
   55014         472 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   55015         472 :       if ( bErr )
   55016             :       {
   55017           0 :         SWIG_fail;
   55018             :       }
   55019             :     }
   55020           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   55021           0 :       int bErr = FALSE;
   55022           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   55023           0 :       if ( bErr )
   55024             :       {
   55025           0 :         SWIG_fail;
   55026             :       }
   55027             :     }
   55028             :     else {
   55029           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   55030           0 :       SWIG_fail;
   55031             :     }
   55032             :   }
   55033         472 :   {
   55034         472 :     const int bLocalUseExceptions = GetUseExceptions();
   55035         472 :     if ( bLocalUseExceptions ) {
   55036         472 :       pushErrorHandler();
   55037             :     }
   55038         472 :     {
   55039         472 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55040         472 :       result = (bool)GDALAlgorithmArgHS_SetDatasetNames(arg1,arg2);
   55041         472 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55042             :     }
   55043         472 :     if ( bLocalUseExceptions ) {
   55044         472 :       popErrorHandler();
   55045             :     }
   55046             : #ifndef SED_HACKS
   55047             :     if ( bLocalUseExceptions ) {
   55048             :       CPLErr eclass = CPLGetLastErrorType();
   55049             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55050             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55051             :       }
   55052             :     }
   55053             : #endif
   55054             :   }
   55055         472 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55056         472 :   {
   55057             :     /* %typemap(freearg) char **dict */
   55058         472 :     CSLDestroy( arg2 );
   55059             :   }
   55060         472 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55061             :   return resultobj;
   55062           0 : fail:
   55063           0 :   {
   55064             :     /* %typemap(freearg) char **dict */
   55065           0 :     CSLDestroy( arg2 );
   55066             :   }
   55067             :   return NULL;
   55068             : }
   55069             : 
   55070             : 
   55071         277 : SWIGINTERN PyObject *AlgorithmArg_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55072         277 :   PyObject *obj;
   55073         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   55074         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_NewClientData(obj));
   55075         277 :   return SWIG_Py_Void();
   55076             : }
   55077             : 
   55078        4511 : SWIGINTERN PyObject *_wrap_delete_Algorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55079        4511 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55080        4511 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55081        4511 :   void *argp1 = 0 ;
   55082        4511 :   int res1 = 0 ;
   55083        4511 :   PyObject *swig_obj[1] ;
   55084             :   
   55085        4511 :   if (!args) SWIG_fail;
   55086        4511 :   swig_obj[0] = args;
   55087        4511 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_DISOWN |  0 );
   55088        4511 :   if (!SWIG_IsOK(res1)) {
   55089           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Algorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55090             :   }
   55091        4511 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55092        4511 :   {
   55093        4511 :     const int bLocalUseExceptions = GetUseExceptions();
   55094        4511 :     if ( bLocalUseExceptions ) {
   55095        4509 :       pushErrorHandler();
   55096             :     }
   55097        4511 :     {
   55098        4511 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55099        4511 :       delete_GDALAlgorithmHS(arg1);
   55100        4511 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55101             :     }
   55102        4511 :     if ( bLocalUseExceptions ) {
   55103        4509 :       popErrorHandler();
   55104             :     }
   55105             : #ifndef SED_HACKS
   55106             :     if ( bLocalUseExceptions ) {
   55107             :       CPLErr eclass = CPLGetLastErrorType();
   55108             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55109             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55110             :       }
   55111             :     }
   55112             : #endif
   55113             :   }
   55114        4511 :   resultobj = SWIG_Py_Void();
   55115        4511 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55116             :   return resultobj;
   55117             : fail:
   55118             :   return NULL;
   55119             : }
   55120             : 
   55121             : 
   55122          32 : SWIGINTERN PyObject *_wrap_Algorithm_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55123          32 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55124          32 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55125          32 :   void *argp1 = 0 ;
   55126          32 :   int res1 = 0 ;
   55127          32 :   PyObject *swig_obj[1] ;
   55128          32 :   char *result = 0 ;
   55129             :   
   55130          32 :   if (!args) SWIG_fail;
   55131          32 :   swig_obj[0] = args;
   55132          32 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55133          32 :   if (!SWIG_IsOK(res1)) {
   55134           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetName" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55135             :   }
   55136          32 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55137          32 :   {
   55138          32 :     const int bLocalUseExceptions = GetUseExceptions();
   55139          32 :     if ( bLocalUseExceptions ) {
   55140          32 :       pushErrorHandler();
   55141             :     }
   55142          32 :     {
   55143          32 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55144          32 :       result = (char *)GDALAlgorithmHS_GetName(arg1);
   55145          32 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55146             :     }
   55147          32 :     if ( bLocalUseExceptions ) {
   55148          32 :       popErrorHandler();
   55149             :     }
   55150             : #ifndef SED_HACKS
   55151             :     if ( bLocalUseExceptions ) {
   55152             :       CPLErr eclass = CPLGetLastErrorType();
   55153             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55154             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55155             :       }
   55156             :     }
   55157             : #endif
   55158             :   }
   55159          32 :   resultobj = SWIG_FromCharPtr((const char *)result);
   55160          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; } }
   55161             :   return resultobj;
   55162             : fail:
   55163             :   return NULL;
   55164             : }
   55165             : 
   55166             : 
   55167           1 : SWIGINTERN PyObject *_wrap_Algorithm_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55168           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55169           1 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55170           1 :   void *argp1 = 0 ;
   55171           1 :   int res1 = 0 ;
   55172           1 :   PyObject *swig_obj[1] ;
   55173           1 :   char *result = 0 ;
   55174             :   
   55175           1 :   if (!args) SWIG_fail;
   55176           1 :   swig_obj[0] = args;
   55177           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55178           1 :   if (!SWIG_IsOK(res1)) {
   55179           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetDescription" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55180             :   }
   55181           1 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55182           1 :   {
   55183           1 :     const int bLocalUseExceptions = GetUseExceptions();
   55184           1 :     if ( bLocalUseExceptions ) {
   55185           1 :       pushErrorHandler();
   55186             :     }
   55187           1 :     {
   55188           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55189           1 :       result = (char *)GDALAlgorithmHS_GetDescription(arg1);
   55190           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55191             :     }
   55192           1 :     if ( bLocalUseExceptions ) {
   55193           1 :       popErrorHandler();
   55194             :     }
   55195             : #ifndef SED_HACKS
   55196             :     if ( bLocalUseExceptions ) {
   55197             :       CPLErr eclass = CPLGetLastErrorType();
   55198             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55199             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55200             :       }
   55201             :     }
   55202             : #endif
   55203             :   }
   55204           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   55205           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; } }
   55206             :   return resultobj;
   55207             : fail:
   55208             :   return NULL;
   55209             : }
   55210             : 
   55211             : 
   55212           1 : SWIGINTERN PyObject *_wrap_Algorithm_GetLongDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55213           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55214           1 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55215           1 :   void *argp1 = 0 ;
   55216           1 :   int res1 = 0 ;
   55217           1 :   PyObject *swig_obj[1] ;
   55218           1 :   char *result = 0 ;
   55219             :   
   55220           1 :   if (!args) SWIG_fail;
   55221           1 :   swig_obj[0] = args;
   55222           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55223           1 :   if (!SWIG_IsOK(res1)) {
   55224           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetLongDescription" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55225             :   }
   55226           1 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55227           1 :   {
   55228           1 :     const int bLocalUseExceptions = GetUseExceptions();
   55229           1 :     if ( bLocalUseExceptions ) {
   55230           1 :       pushErrorHandler();
   55231             :     }
   55232           1 :     {
   55233           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55234           1 :       result = (char *)GDALAlgorithmHS_GetLongDescription(arg1);
   55235           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55236             :     }
   55237           1 :     if ( bLocalUseExceptions ) {
   55238           1 :       popErrorHandler();
   55239             :     }
   55240             : #ifndef SED_HACKS
   55241             :     if ( bLocalUseExceptions ) {
   55242             :       CPLErr eclass = CPLGetLastErrorType();
   55243             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55244             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55245             :       }
   55246             :     }
   55247             : #endif
   55248             :   }
   55249           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   55250           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; } }
   55251             :   return resultobj;
   55252             : fail:
   55253             :   return NULL;
   55254             : }
   55255             : 
   55256             : 
   55257           1 : SWIGINTERN PyObject *_wrap_Algorithm_GetHelpFullURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55258           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55259           1 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55260           1 :   void *argp1 = 0 ;
   55261           1 :   int res1 = 0 ;
   55262           1 :   PyObject *swig_obj[1] ;
   55263           1 :   char *result = 0 ;
   55264             :   
   55265           1 :   if (!args) SWIG_fail;
   55266           1 :   swig_obj[0] = args;
   55267           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55268           1 :   if (!SWIG_IsOK(res1)) {
   55269           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetHelpFullURL" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55270             :   }
   55271           1 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55272           1 :   {
   55273           1 :     const int bLocalUseExceptions = GetUseExceptions();
   55274           1 :     if ( bLocalUseExceptions ) {
   55275           1 :       pushErrorHandler();
   55276             :     }
   55277           1 :     {
   55278           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55279           1 :       result = (char *)GDALAlgorithmHS_GetHelpFullURL(arg1);
   55280           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55281             :     }
   55282           1 :     if ( bLocalUseExceptions ) {
   55283           1 :       popErrorHandler();
   55284             :     }
   55285             : #ifndef SED_HACKS
   55286             :     if ( bLocalUseExceptions ) {
   55287             :       CPLErr eclass = CPLGetLastErrorType();
   55288             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55289             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55290             :       }
   55291             :     }
   55292             : #endif
   55293             :   }
   55294           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   55295           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; } }
   55296             :   return resultobj;
   55297             : fail:
   55298             :   return NULL;
   55299             : }
   55300             : 
   55301             : 
   55302        2494 : SWIGINTERN PyObject *_wrap_Algorithm_HasSubAlgorithms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55303        2494 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55304        2494 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55305        2494 :   void *argp1 = 0 ;
   55306        2494 :   int res1 = 0 ;
   55307        2494 :   PyObject *swig_obj[1] ;
   55308        2494 :   bool result;
   55309             :   
   55310        2494 :   if (!args) SWIG_fail;
   55311        2494 :   swig_obj[0] = args;
   55312        2494 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55313        2494 :   if (!SWIG_IsOK(res1)) {
   55314           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_HasSubAlgorithms" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55315             :   }
   55316        2494 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55317        2494 :   {
   55318        2494 :     const int bLocalUseExceptions = GetUseExceptions();
   55319        2494 :     if ( bLocalUseExceptions ) {
   55320        2493 :       pushErrorHandler();
   55321             :     }
   55322        2494 :     {
   55323        2494 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55324        2494 :       result = (bool)GDALAlgorithmHS_HasSubAlgorithms(arg1);
   55325        2494 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55326             :     }
   55327        2494 :     if ( bLocalUseExceptions ) {
   55328        2493 :       popErrorHandler();
   55329             :     }
   55330             : #ifndef SED_HACKS
   55331             :     if ( bLocalUseExceptions ) {
   55332             :       CPLErr eclass = CPLGetLastErrorType();
   55333             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55334             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55335             :       }
   55336             :     }
   55337             : #endif
   55338             :   }
   55339        2494 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55340        2494 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55341             :   return resultobj;
   55342             : fail:
   55343             :   return NULL;
   55344             : }
   55345             : 
   55346             : 
   55347           6 : SWIGINTERN PyObject *_wrap_Algorithm_GetSubAlgorithmNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55348           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55349           6 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55350           6 :   void *argp1 = 0 ;
   55351           6 :   int res1 = 0 ;
   55352           6 :   PyObject *swig_obj[1] ;
   55353           6 :   char **result = 0 ;
   55354             :   
   55355           6 :   if (!args) SWIG_fail;
   55356           6 :   swig_obj[0] = args;
   55357           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55358           6 :   if (!SWIG_IsOK(res1)) {
   55359           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetSubAlgorithmNames" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55360             :   }
   55361           6 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55362           6 :   {
   55363           6 :     const int bLocalUseExceptions = GetUseExceptions();
   55364           6 :     if ( bLocalUseExceptions ) {
   55365           6 :       pushErrorHandler();
   55366             :     }
   55367           6 :     {
   55368           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55369           6 :       result = (char **)GDALAlgorithmHS_GetSubAlgorithmNames(arg1);
   55370           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55371             :     }
   55372           6 :     if ( bLocalUseExceptions ) {
   55373           6 :       popErrorHandler();
   55374             :     }
   55375             : #ifndef SED_HACKS
   55376             :     if ( bLocalUseExceptions ) {
   55377             :       CPLErr eclass = CPLGetLastErrorType();
   55378             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55379             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55380             :       }
   55381             :     }
   55382             : #endif
   55383             :   }
   55384           6 :   {
   55385             :     /* %typemap(out) char **CSL -> ( string ) */
   55386           6 :     bool bErr = false;
   55387           6 :     resultobj = CSLToList(result, &bErr);
   55388           6 :     CSLDestroy(result);
   55389           6 :     if( bErr ) {
   55390           0 :       SWIG_fail;
   55391             :     }
   55392             :   }
   55393           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; } }
   55394             :   return resultobj;
   55395             : fail:
   55396             :   return NULL;
   55397             : }
   55398             : 
   55399             : 
   55400        1937 : SWIGINTERN PyObject *_wrap_Algorithm_InstantiateSubAlgorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55401        1937 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55402        1937 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55403        1937 :   char *arg2 = (char *) 0 ;
   55404        1937 :   void *argp1 = 0 ;
   55405        1937 :   int res1 = 0 ;
   55406        1937 :   int res2 ;
   55407        1937 :   char *buf2 = 0 ;
   55408        1937 :   int alloc2 = 0 ;
   55409        1937 :   PyObject *swig_obj[2] ;
   55410        1937 :   GDALAlgorithmHS *result = 0 ;
   55411             :   
   55412        1937 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_InstantiateSubAlgorithm", 2, 2, swig_obj)) SWIG_fail;
   55413        1937 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55414        1937 :   if (!SWIG_IsOK(res1)) {
   55415           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_InstantiateSubAlgorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55416             :   }
   55417        1937 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55418        1937 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   55419        1937 :   if (!SWIG_IsOK(res2)) {
   55420           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Algorithm_InstantiateSubAlgorithm" "', argument " "2"" of type '" "char const *""'");
   55421             :   }
   55422        1937 :   arg2 = reinterpret_cast< char * >(buf2);
   55423        1937 :   {
   55424        1937 :     if (!arg2) {
   55425           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   55426             :     }
   55427             :   }
   55428        1936 :   {
   55429        1936 :     const int bLocalUseExceptions = GetUseExceptions();
   55430        1936 :     if ( bLocalUseExceptions ) {
   55431        1935 :       pushErrorHandler();
   55432             :     }
   55433        1936 :     {
   55434        1936 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55435        1936 :       result = (GDALAlgorithmHS *)GDALAlgorithmHS_InstantiateSubAlgorithm(arg1,(char const *)arg2);
   55436        1936 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55437             :     }
   55438        1936 :     if ( bLocalUseExceptions ) {
   55439        1935 :       popErrorHandler();
   55440             :     }
   55441             : #ifndef SED_HACKS
   55442             :     if ( bLocalUseExceptions ) {
   55443             :       CPLErr eclass = CPLGetLastErrorType();
   55444             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55445             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55446             :       }
   55447             :     }
   55448             : #endif
   55449             :   }
   55450        1936 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
   55451        1936 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   55452        1937 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55453             :   return resultobj;
   55454           1 : fail:
   55455           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   55456             :   return NULL;
   55457             : }
   55458             : 
   55459             : 
   55460          50 : SWIGINTERN PyObject *_wrap_Algorithm_ParseCommandLineArguments(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55461          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55462          50 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55463          50 :   char **arg2 = (char **) 0 ;
   55464          50 :   void *argp1 = 0 ;
   55465          50 :   int res1 = 0 ;
   55466          50 :   PyObject *swig_obj[2] ;
   55467          50 :   bool result;
   55468             :   
   55469          50 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_ParseCommandLineArguments", 2, 2, swig_obj)) SWIG_fail;
   55470          50 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55471          50 :   if (!SWIG_IsOK(res1)) {
   55472           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_ParseCommandLineArguments" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55473             :   }
   55474          50 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55475          50 :   {
   55476             :     /* %typemap(in) char **dict */
   55477          50 :     arg2 = NULL;
   55478          50 :     if ( PySequence_Check( swig_obj[1] ) ) {
   55479          50 :       int bErr = FALSE;
   55480          50 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   55481          50 :       if ( bErr )
   55482             :       {
   55483           0 :         SWIG_fail;
   55484             :       }
   55485             :     }
   55486           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   55487           0 :       int bErr = FALSE;
   55488           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   55489           0 :       if ( bErr )
   55490             :       {
   55491           0 :         SWIG_fail;
   55492             :       }
   55493             :     }
   55494             :     else {
   55495           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   55496           0 :       SWIG_fail;
   55497             :     }
   55498             :   }
   55499          50 :   {
   55500          50 :     const int bLocalUseExceptions = GetUseExceptions();
   55501          50 :     if ( bLocalUseExceptions ) {
   55502          50 :       pushErrorHandler();
   55503             :     }
   55504          50 :     {
   55505          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55506          50 :       result = (bool)GDALAlgorithmHS_ParseCommandLineArguments(arg1,arg2);
   55507          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55508             :     }
   55509          50 :     if ( bLocalUseExceptions ) {
   55510          50 :       popErrorHandler();
   55511             :     }
   55512             : #ifndef SED_HACKS
   55513             :     if ( bLocalUseExceptions ) {
   55514             :       CPLErr eclass = CPLGetLastErrorType();
   55515             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55516             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55517             :       }
   55518             :     }
   55519             : #endif
   55520             :   }
   55521          50 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55522          50 :   {
   55523             :     /* %typemap(freearg) char **dict */
   55524          50 :     CSLDestroy( arg2 );
   55525             :   }
   55526          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; } }
   55527             :   return resultobj;
   55528           0 : fail:
   55529           0 :   {
   55530             :     /* %typemap(freearg) char **dict */
   55531           0 :     CSLDestroy( arg2 );
   55532             :   }
   55533             :   return NULL;
   55534             : }
   55535             : 
   55536             : 
   55537         756 : SWIGINTERN PyObject *_wrap_Algorithm_GetActualAlgorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55538         756 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55539         756 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55540         756 :   void *argp1 = 0 ;
   55541         756 :   int res1 = 0 ;
   55542         756 :   PyObject *swig_obj[1] ;
   55543         756 :   GDALAlgorithmHS *result = 0 ;
   55544             :   
   55545         756 :   if (!args) SWIG_fail;
   55546         756 :   swig_obj[0] = args;
   55547         756 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55548         756 :   if (!SWIG_IsOK(res1)) {
   55549           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetActualAlgorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55550             :   }
   55551         756 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55552         756 :   {
   55553         756 :     const int bLocalUseExceptions = GetUseExceptions();
   55554         756 :     if ( bLocalUseExceptions ) {
   55555         756 :       pushErrorHandler();
   55556             :     }
   55557         756 :     {
   55558         756 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55559         756 :       result = (GDALAlgorithmHS *)GDALAlgorithmHS_GetActualAlgorithm(arg1);
   55560         756 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55561             :     }
   55562         756 :     if ( bLocalUseExceptions ) {
   55563         756 :       popErrorHandler();
   55564             :     }
   55565             : #ifndef SED_HACKS
   55566             :     if ( bLocalUseExceptions ) {
   55567             :       CPLErr eclass = CPLGetLastErrorType();
   55568             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55569             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55570             :       }
   55571             :     }
   55572             : #endif
   55573             :   }
   55574         756 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
   55575         756 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55576             :   return resultobj;
   55577             : fail:
   55578             :   return NULL;
   55579             : }
   55580             : 
   55581             : 
   55582        1531 : SWIGINTERN PyObject *_wrap_Algorithm_Run(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55583        1531 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55584        1531 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55585        1531 :   GDALProgressFunc arg2 = (GDALProgressFunc) NULL ;
   55586        1531 :   void *arg3 = (void *) NULL ;
   55587        1531 :   void *argp1 = 0 ;
   55588        1531 :   int res1 = 0 ;
   55589        1531 :   PyObject *swig_obj[3] ;
   55590        1531 :   bool result;
   55591             :   
   55592             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   55593        1531 :   PyProgressData *psProgressInfo;
   55594        1531 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   55595        1531 :   psProgressInfo->nLastReported = -1;
   55596        1531 :   psProgressInfo->psPyCallback = NULL;
   55597        1531 :   psProgressInfo->psPyCallbackData = NULL;
   55598        1531 :   arg3 = psProgressInfo;
   55599        1531 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_Run", 1, 3, swig_obj)) SWIG_fail;
   55600        1531 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55601        1531 :   if (!SWIG_IsOK(res1)) {
   55602           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_Run" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55603             :   }
   55604        1531 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55605        1531 :   if (swig_obj[1]) {
   55606         552 :     {
   55607             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   55608             :       /* callback_func typemap */
   55609             :       
   55610             :       /* In some cases 0 is passed instead of None. */
   55611             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   55612         552 :       if ( PyLong_Check(swig_obj[1]) || PyInt_Check(swig_obj[1]) )
   55613             :       {
   55614           0 :         if( PyLong_AsLong(swig_obj[1]) == 0 )
   55615             :         {
   55616           0 :           swig_obj[1] = Py_None;
   55617             :         }
   55618             :       }
   55619             :       
   55620         552 :       if (swig_obj[1] && swig_obj[1] != Py_None ) {
   55621          65 :         void* cbfunction = NULL;
   55622          65 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[1],
   55623             :             (void**)&cbfunction,
   55624             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   55625             :             SWIG_POINTER_EXCEPTION | 0 ));
   55626             :         
   55627          65 :         if ( cbfunction == GDALTermProgress ) {
   55628             :           arg2 = GDALTermProgress;
   55629             :         } else {
   55630          65 :           if (!PyCallable_Check(swig_obj[1])) {
   55631           0 :             PyErr_SetString( PyExc_RuntimeError,
   55632             :               "Object given is not a Python function" );
   55633           0 :             SWIG_fail;
   55634             :           }
   55635          65 :           psProgressInfo->psPyCallback = swig_obj[1];
   55636          65 :           arg2 = PyProgressProxy;
   55637             :         }
   55638             :         
   55639             :       }
   55640             :       
   55641             :     }
   55642             :   }
   55643        1531 :   if (swig_obj[2]) {
   55644           0 :     {
   55645             :       /* %typemap(in) ( void* callback_data=NULL)  */
   55646           0 :       psProgressInfo->psPyCallbackData = swig_obj[2] ;
   55647             :     }
   55648             :   }
   55649        1531 :   {
   55650        1531 :     const int bLocalUseExceptions = GetUseExceptions();
   55651        1531 :     if ( bLocalUseExceptions ) {
   55652        1528 :       pushErrorHandler();
   55653             :     }
   55654        1531 :     {
   55655        1531 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55656        1531 :       result = (bool)GDALAlgorithmHS_Run(arg1,arg2,arg3);
   55657        1531 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55658             :     }
   55659        1531 :     if ( bLocalUseExceptions ) {
   55660        1528 :       popErrorHandler();
   55661             :     }
   55662             : #ifndef SED_HACKS
   55663             :     if ( bLocalUseExceptions ) {
   55664             :       CPLErr eclass = CPLGetLastErrorType();
   55665             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55666             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55667             :       }
   55668             :     }
   55669             : #endif
   55670             :   }
   55671        1531 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55672        1531 :   {
   55673             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   55674             :     
   55675        1531 :     CPLFree(psProgressInfo);
   55676             :     
   55677             :   }
   55678        2333 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55679             :   return resultobj;
   55680           0 : fail:
   55681           0 :   {
   55682             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   55683             :     
   55684           0 :     CPLFree(psProgressInfo);
   55685             :     
   55686             :   }
   55687             :   return NULL;
   55688             : }
   55689             : 
   55690             : 
   55691         439 : SWIGINTERN PyObject *_wrap_Algorithm_Finalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55692         439 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55693         439 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55694         439 :   void *argp1 = 0 ;
   55695         439 :   int res1 = 0 ;
   55696         439 :   PyObject *swig_obj[1] ;
   55697         439 :   bool result;
   55698             :   
   55699         439 :   if (!args) SWIG_fail;
   55700         439 :   swig_obj[0] = args;
   55701         439 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55702         439 :   if (!SWIG_IsOK(res1)) {
   55703           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_Finalize" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55704             :   }
   55705         439 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55706         439 :   {
   55707         439 :     const int bLocalUseExceptions = GetUseExceptions();
   55708         439 :     if ( bLocalUseExceptions ) {
   55709         439 :       pushErrorHandler();
   55710             :     }
   55711         439 :     {
   55712         439 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55713         439 :       result = (bool)GDALAlgorithmHS_Finalize(arg1);
   55714         439 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55715             :     }
   55716         439 :     if ( bLocalUseExceptions ) {
   55717         439 :       popErrorHandler();
   55718             :     }
   55719             : #ifndef SED_HACKS
   55720             :     if ( bLocalUseExceptions ) {
   55721             :       CPLErr eclass = CPLGetLastErrorType();
   55722             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55723             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55724             :       }
   55725             :     }
   55726             : #endif
   55727             :   }
   55728         439 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55729         439 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55730             :   return resultobj;
   55731             : fail:
   55732             :   return NULL;
   55733             : }
   55734             : 
   55735             : 
   55736         249 : SWIGINTERN PyObject *_wrap_Algorithm_ParseRunAndFinalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55737         249 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55738         249 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55739         249 :   char **arg2 = (char **) 0 ;
   55740         249 :   GDALProgressFunc arg3 = (GDALProgressFunc) NULL ;
   55741         249 :   void *arg4 = (void *) NULL ;
   55742         249 :   void *argp1 = 0 ;
   55743         249 :   int res1 = 0 ;
   55744         249 :   PyObject *swig_obj[4] ;
   55745         249 :   bool result;
   55746             :   
   55747             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   55748         249 :   PyProgressData *psProgressInfo;
   55749         249 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   55750         249 :   psProgressInfo->nLastReported = -1;
   55751         249 :   psProgressInfo->psPyCallback = NULL;
   55752         249 :   psProgressInfo->psPyCallbackData = NULL;
   55753         249 :   arg4 = psProgressInfo;
   55754         249 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_ParseRunAndFinalize", 2, 4, swig_obj)) SWIG_fail;
   55755         249 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55756         249 :   if (!SWIG_IsOK(res1)) {
   55757           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_ParseRunAndFinalize" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55758             :   }
   55759         249 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55760         249 :   {
   55761             :     /* %typemap(in) char **dict */
   55762         249 :     arg2 = NULL;
   55763         249 :     if ( PySequence_Check( swig_obj[1] ) ) {
   55764         249 :       int bErr = FALSE;
   55765         249 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   55766         249 :       if ( bErr )
   55767             :       {
   55768           0 :         SWIG_fail;
   55769             :       }
   55770             :     }
   55771           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   55772           0 :       int bErr = FALSE;
   55773           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   55774           0 :       if ( bErr )
   55775             :       {
   55776           0 :         SWIG_fail;
   55777             :       }
   55778             :     }
   55779             :     else {
   55780           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   55781           0 :       SWIG_fail;
   55782             :     }
   55783             :   }
   55784         249 :   if (swig_obj[2]) {
   55785          12 :     {
   55786             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   55787             :       /* callback_func typemap */
   55788             :       
   55789             :       /* In some cases 0 is passed instead of None. */
   55790             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   55791          12 :       if ( PyLong_Check(swig_obj[2]) || PyInt_Check(swig_obj[2]) )
   55792             :       {
   55793           0 :         if( PyLong_AsLong(swig_obj[2]) == 0 )
   55794             :         {
   55795           0 :           swig_obj[2] = Py_None;
   55796             :         }
   55797             :       }
   55798             :       
   55799          12 :       if (swig_obj[2] && swig_obj[2] != Py_None ) {
   55800          12 :         void* cbfunction = NULL;
   55801          12 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[2],
   55802             :             (void**)&cbfunction,
   55803             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   55804             :             SWIG_POINTER_EXCEPTION | 0 ));
   55805             :         
   55806          12 :         if ( cbfunction == GDALTermProgress ) {
   55807             :           arg3 = GDALTermProgress;
   55808             :         } else {
   55809          12 :           if (!PyCallable_Check(swig_obj[2])) {
   55810           0 :             PyErr_SetString( PyExc_RuntimeError,
   55811             :               "Object given is not a Python function" );
   55812           0 :             SWIG_fail;
   55813             :           }
   55814          12 :           psProgressInfo->psPyCallback = swig_obj[2];
   55815          12 :           arg3 = PyProgressProxy;
   55816             :         }
   55817             :         
   55818             :       }
   55819             :       
   55820             :     }
   55821             :   }
   55822         249 :   if (swig_obj[3]) {
   55823           0 :     {
   55824             :       /* %typemap(in) ( void* callback_data=NULL)  */
   55825           0 :       psProgressInfo->psPyCallbackData = swig_obj[3] ;
   55826             :     }
   55827             :   }
   55828         249 :   {
   55829         249 :     const int bLocalUseExceptions = GetUseExceptions();
   55830         249 :     if ( bLocalUseExceptions ) {
   55831         249 :       pushErrorHandler();
   55832             :     }
   55833         249 :     {
   55834         249 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55835         249 :       result = (bool)GDALAlgorithmHS_ParseRunAndFinalize(arg1,arg2,arg3,arg4);
   55836         249 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55837             :     }
   55838         249 :     if ( bLocalUseExceptions ) {
   55839         249 :       popErrorHandler();
   55840             :     }
   55841             : #ifndef SED_HACKS
   55842             :     if ( bLocalUseExceptions ) {
   55843             :       CPLErr eclass = CPLGetLastErrorType();
   55844             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55845             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55846             :       }
   55847             :     }
   55848             : #endif
   55849             :   }
   55850         249 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55851         249 :   {
   55852             :     /* %typemap(freearg) char **dict */
   55853         249 :     CSLDestroy( arg2 );
   55854             :   }
   55855         249 :   {
   55856             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   55857             :     
   55858         249 :     CPLFree(psProgressInfo);
   55859             :     
   55860             :   }
   55861         411 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55862             :   return resultobj;
   55863           0 : fail:
   55864           0 :   {
   55865             :     /* %typemap(freearg) char **dict */
   55866           0 :     CSLDestroy( arg2 );
   55867             :   }
   55868           0 :   {
   55869             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   55870             :     
   55871           0 :     CPLFree(psProgressInfo);
   55872             :     
   55873             :   }
   55874             :   return NULL;
   55875             : }
   55876             : 
   55877             : 
   55878           3 : SWIGINTERN PyObject *_wrap_Algorithm_GetUsageAsJSON(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55879           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55880           3 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55881           3 :   void *argp1 = 0 ;
   55882           3 :   int res1 = 0 ;
   55883           3 :   PyObject *swig_obj[1] ;
   55884           3 :   retStringAndCPLFree *result = 0 ;
   55885             :   
   55886           3 :   if (!args) SWIG_fail;
   55887           3 :   swig_obj[0] = args;
   55888           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55889           3 :   if (!SWIG_IsOK(res1)) {
   55890           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetUsageAsJSON" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55891             :   }
   55892           3 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55893           3 :   {
   55894           3 :     const int bLocalUseExceptions = GetUseExceptions();
   55895           3 :     if ( bLocalUseExceptions ) {
   55896           3 :       pushErrorHandler();
   55897             :     }
   55898           3 :     {
   55899           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55900           3 :       result = (retStringAndCPLFree *)GDALAlgorithmHS_GetUsageAsJSON(arg1);
   55901           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55902             :     }
   55903           3 :     if ( bLocalUseExceptions ) {
   55904           3 :       popErrorHandler();
   55905             :     }
   55906             : #ifndef SED_HACKS
   55907             :     if ( bLocalUseExceptions ) {
   55908             :       CPLErr eclass = CPLGetLastErrorType();
   55909             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55910             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55911             :       }
   55912             :     }
   55913             : #endif
   55914             :   }
   55915           3 :   {
   55916             :     /* %typemap(out) (retStringAndCPLFree*) */
   55917           3 :     Py_XDECREF(resultobj);
   55918           3 :     if(result)
   55919             :     {
   55920           3 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   55921           3 :       CPLFree(result);
   55922             :     }
   55923             :     else
   55924             :     {
   55925           0 :       resultobj = Py_None;
   55926           0 :       Py_INCREF(resultobj);
   55927             :     }
   55928             :   }
   55929           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; } }
   55930             :   return resultobj;
   55931             : fail:
   55932             :   return NULL;
   55933             : }
   55934             : 
   55935             : 
   55936         131 : SWIGINTERN PyObject *_wrap_Algorithm_GetArgNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55937         131 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55938         131 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55939         131 :   void *argp1 = 0 ;
   55940         131 :   int res1 = 0 ;
   55941         131 :   PyObject *swig_obj[1] ;
   55942         131 :   char **result = 0 ;
   55943             :   
   55944         131 :   if (!args) SWIG_fail;
   55945         131 :   swig_obj[0] = args;
   55946         131 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55947         131 :   if (!SWIG_IsOK(res1)) {
   55948           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetArgNames" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55949             :   }
   55950         131 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55951         131 :   {
   55952         131 :     const int bLocalUseExceptions = GetUseExceptions();
   55953         131 :     if ( bLocalUseExceptions ) {
   55954         131 :       pushErrorHandler();
   55955             :     }
   55956         131 :     {
   55957         131 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55958         131 :       result = (char **)GDALAlgorithmHS_GetArgNames(arg1);
   55959         131 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55960             :     }
   55961         131 :     if ( bLocalUseExceptions ) {
   55962         131 :       popErrorHandler();
   55963             :     }
   55964             : #ifndef SED_HACKS
   55965             :     if ( bLocalUseExceptions ) {
   55966             :       CPLErr eclass = CPLGetLastErrorType();
   55967             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55968             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55969             :       }
   55970             :     }
   55971             : #endif
   55972             :   }
   55973         131 :   {
   55974             :     /* %typemap(out) char **CSL -> ( string ) */
   55975         131 :     bool bErr = false;
   55976         131 :     resultobj = CSLToList(result, &bErr);
   55977         131 :     CSLDestroy(result);
   55978         131 :     if( bErr ) {
   55979           0 :       SWIG_fail;
   55980             :     }
   55981             :   }
   55982         131 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55983             :   return resultobj;
   55984             : fail:
   55985             :   return NULL;
   55986             : }
   55987             : 
   55988             : 
   55989        3475 : SWIGINTERN PyObject *_wrap_Algorithm_GetArg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55990        3475 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55991        3475 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55992        3475 :   char *arg2 = (char *) 0 ;
   55993        3475 :   void *argp1 = 0 ;
   55994        3475 :   int res1 = 0 ;
   55995        3475 :   int res2 ;
   55996        3475 :   char *buf2 = 0 ;
   55997        3475 :   int alloc2 = 0 ;
   55998        3475 :   PyObject *swig_obj[2] ;
   55999        3475 :   GDALAlgorithmArgHS *result = 0 ;
   56000             :   
   56001        3475 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_GetArg", 2, 2, swig_obj)) SWIG_fail;
   56002        3475 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   56003        3475 :   if (!SWIG_IsOK(res1)) {
   56004           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetArg" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   56005             :   }
   56006        3475 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   56007        3475 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   56008        3475 :   if (!SWIG_IsOK(res2)) {
   56009           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Algorithm_GetArg" "', argument " "2"" of type '" "char const *""'");
   56010             :   }
   56011        3475 :   arg2 = reinterpret_cast< char * >(buf2);
   56012        3475 :   {
   56013        3475 :     if (!arg2) {
   56014           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   56015             :     }
   56016             :   }
   56017        3474 :   {
   56018        3474 :     const int bLocalUseExceptions = GetUseExceptions();
   56019        3474 :     if ( bLocalUseExceptions ) {
   56020        3474 :       pushErrorHandler();
   56021             :     }
   56022        3474 :     {
   56023        3474 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56024        3474 :       result = (GDALAlgorithmArgHS *)GDALAlgorithmHS_GetArg(arg1,(char const *)arg2);
   56025        3474 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56026             :     }
   56027        3474 :     if ( bLocalUseExceptions ) {
   56028        3474 :       popErrorHandler();
   56029             :     }
   56030             : #ifndef SED_HACKS
   56031             :     if ( bLocalUseExceptions ) {
   56032             :       CPLErr eclass = CPLGetLastErrorType();
   56033             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56034             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56035             :       }
   56036             :     }
   56037             : #endif
   56038             :   }
   56039        3474 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_POINTER_OWN |  0 );
   56040        3474 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56041        3475 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56042             :   return resultobj;
   56043           1 : fail:
   56044           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56045             :   return NULL;
   56046             : }
   56047             : 
   56048             : 
   56049        5377 : SWIGINTERN PyObject *_wrap_Algorithm_GetArgNonConst(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56050        5377 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56051        5377 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   56052        5377 :   char *arg2 = (char *) 0 ;
   56053        5377 :   void *argp1 = 0 ;
   56054        5377 :   int res1 = 0 ;
   56055        5377 :   int res2 ;
   56056        5377 :   char *buf2 = 0 ;
   56057        5377 :   int alloc2 = 0 ;
   56058        5377 :   PyObject *swig_obj[2] ;
   56059        5377 :   GDALAlgorithmArgHS *result = 0 ;
   56060             :   
   56061        5377 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_GetArgNonConst", 2, 2, swig_obj)) SWIG_fail;
   56062        5377 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   56063        5377 :   if (!SWIG_IsOK(res1)) {
   56064           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetArgNonConst" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   56065             :   }
   56066        5377 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   56067        5377 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   56068        5377 :   if (!SWIG_IsOK(res2)) {
   56069           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Algorithm_GetArgNonConst" "', argument " "2"" of type '" "char const *""'");
   56070             :   }
   56071        5377 :   arg2 = reinterpret_cast< char * >(buf2);
   56072        5377 :   {
   56073        5377 :     if (!arg2) {
   56074           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   56075             :     }
   56076             :   }
   56077        5377 :   {
   56078        5377 :     const int bLocalUseExceptions = GetUseExceptions();
   56079        5377 :     if ( bLocalUseExceptions ) {
   56080        5374 :       pushErrorHandler();
   56081             :     }
   56082        5377 :     {
   56083        5377 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56084        5377 :       result = (GDALAlgorithmArgHS *)GDALAlgorithmHS_GetArgNonConst(arg1,(char const *)arg2);
   56085        5377 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56086             :     }
   56087        5377 :     if ( bLocalUseExceptions ) {
   56088        5374 :       popErrorHandler();
   56089             :     }
   56090             : #ifndef SED_HACKS
   56091             :     if ( bLocalUseExceptions ) {
   56092             :       CPLErr eclass = CPLGetLastErrorType();
   56093             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56094             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56095             :       }
   56096             :     }
   56097             : #endif
   56098             :   }
   56099        5377 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_POINTER_OWN |  0 );
   56100        5377 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56101        5377 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56102             :   return resultobj;
   56103           0 : fail:
   56104           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56105             :   return NULL;
   56106             : }
   56107             : 
   56108             : 
   56109         277 : SWIGINTERN PyObject *Algorithm_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56110         277 :   PyObject *obj;
   56111         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   56112         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmHS, SWIG_NewClientData(obj));
   56113         277 :   return SWIG_Py_Void();
   56114             : }
   56115             : 
   56116        1835 : SWIGINTERN PyObject *_wrap_delete_AlgorithmRegistry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56117        1835 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56118        1835 :   GDALAlgorithmRegistryHS *arg1 = (GDALAlgorithmRegistryHS *) 0 ;
   56119        1835 :   void *argp1 = 0 ;
   56120        1835 :   int res1 = 0 ;
   56121        1835 :   PyObject *swig_obj[1] ;
   56122             :   
   56123        1835 :   if (!args) SWIG_fail;
   56124        1835 :   swig_obj[0] = args;
   56125        1835 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_POINTER_DISOWN |  0 );
   56126        1835 :   if (!SWIG_IsOK(res1)) {
   56127           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AlgorithmRegistry" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
   56128             :   }
   56129        1835 :   arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
   56130        1835 :   {
   56131        1835 :     const int bLocalUseExceptions = GetUseExceptions();
   56132        1835 :     if ( bLocalUseExceptions ) {
   56133        1834 :       pushErrorHandler();
   56134             :     }
   56135        1835 :     {
   56136        1835 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56137        1835 :       delete_GDALAlgorithmRegistryHS(arg1);
   56138        1835 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56139             :     }
   56140        1835 :     if ( bLocalUseExceptions ) {
   56141        1834 :       popErrorHandler();
   56142             :     }
   56143             : #ifndef SED_HACKS
   56144             :     if ( bLocalUseExceptions ) {
   56145             :       CPLErr eclass = CPLGetLastErrorType();
   56146             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56147             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56148             :       }
   56149             :     }
   56150             : #endif
   56151             :   }
   56152        1835 :   resultobj = SWIG_Py_Void();
   56153        1835 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56154             :   return resultobj;
   56155             : fail:
   56156             :   return NULL;
   56157             : }
   56158             : 
   56159             : 
   56160           1 : SWIGINTERN PyObject *_wrap_AlgorithmRegistry_GetAlgNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56161           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56162           1 :   GDALAlgorithmRegistryHS *arg1 = (GDALAlgorithmRegistryHS *) 0 ;
   56163           1 :   void *argp1 = 0 ;
   56164           1 :   int res1 = 0 ;
   56165           1 :   PyObject *swig_obj[1] ;
   56166           1 :   char **result = 0 ;
   56167             :   
   56168           1 :   if (!args) SWIG_fail;
   56169           1 :   swig_obj[0] = args;
   56170           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, 0 |  0 );
   56171           1 :   if (!SWIG_IsOK(res1)) {
   56172           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmRegistry_GetAlgNames" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
   56173             :   }
   56174           1 :   arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
   56175           1 :   {
   56176           1 :     const int bLocalUseExceptions = GetUseExceptions();
   56177           1 :     if ( bLocalUseExceptions ) {
   56178           1 :       pushErrorHandler();
   56179             :     }
   56180           1 :     {
   56181           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56182           1 :       result = (char **)GDALAlgorithmRegistryHS_GetAlgNames(arg1);
   56183           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56184             :     }
   56185           1 :     if ( bLocalUseExceptions ) {
   56186           1 :       popErrorHandler();
   56187             :     }
   56188             : #ifndef SED_HACKS
   56189             :     if ( bLocalUseExceptions ) {
   56190             :       CPLErr eclass = CPLGetLastErrorType();
   56191             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56192             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56193             :       }
   56194             :     }
   56195             : #endif
   56196             :   }
   56197           1 :   {
   56198             :     /* %typemap(out) char **CSL -> ( string ) */
   56199           1 :     bool bErr = false;
   56200           1 :     resultobj = CSLToList(result, &bErr);
   56201           1 :     CSLDestroy(result);
   56202           1 :     if( bErr ) {
   56203           0 :       SWIG_fail;
   56204             :     }
   56205             :   }
   56206           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; } }
   56207             :   return resultobj;
   56208             : fail:
   56209             :   return NULL;
   56210             : }
   56211             : 
   56212             : 
   56213        1837 : SWIGINTERN PyObject *_wrap_AlgorithmRegistry_InstantiateAlg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56214        1837 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56215        1837 :   GDALAlgorithmRegistryHS *arg1 = (GDALAlgorithmRegistryHS *) 0 ;
   56216        1837 :   char *arg2 = (char *) 0 ;
   56217        1837 :   void *argp1 = 0 ;
   56218        1837 :   int res1 = 0 ;
   56219        1837 :   int res2 ;
   56220        1837 :   char *buf2 = 0 ;
   56221        1837 :   int alloc2 = 0 ;
   56222        1837 :   PyObject *swig_obj[2] ;
   56223        1837 :   GDALAlgorithmHS *result = 0 ;
   56224             :   
   56225        1837 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmRegistry_InstantiateAlg", 2, 2, swig_obj)) SWIG_fail;
   56226        1837 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, 0 |  0 );
   56227        1837 :   if (!SWIG_IsOK(res1)) {
   56228           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmRegistry_InstantiateAlg" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
   56229             :   }
   56230        1837 :   arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
   56231        1837 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   56232        1837 :   if (!SWIG_IsOK(res2)) {
   56233           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmRegistry_InstantiateAlg" "', argument " "2"" of type '" "char const *""'");
   56234             :   }
   56235        1837 :   arg2 = reinterpret_cast< char * >(buf2);
   56236        1837 :   {
   56237        1837 :     if (!arg2) {
   56238           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   56239             :     }
   56240             :   }
   56241        1836 :   {
   56242        1836 :     const int bLocalUseExceptions = GetUseExceptions();
   56243        1836 :     if ( bLocalUseExceptions ) {
   56244        1835 :       pushErrorHandler();
   56245             :     }
   56246        1836 :     {
   56247        1836 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56248        1836 :       result = (GDALAlgorithmHS *)GDALAlgorithmRegistryHS_InstantiateAlg(arg1,(char const *)arg2);
   56249        1836 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56250             :     }
   56251        1836 :     if ( bLocalUseExceptions ) {
   56252        1835 :       popErrorHandler();
   56253             :     }
   56254             : #ifndef SED_HACKS
   56255             :     if ( bLocalUseExceptions ) {
   56256             :       CPLErr eclass = CPLGetLastErrorType();
   56257             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56258             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56259             :       }
   56260             :     }
   56261             : #endif
   56262             :   }
   56263        1836 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
   56264        1836 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56265        1837 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56266             :   return resultobj;
   56267           1 : fail:
   56268           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56269             :   return NULL;
   56270             : }
   56271             : 
   56272             : 
   56273         277 : SWIGINTERN PyObject *AlgorithmRegistry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56274         277 :   PyObject *obj;
   56275         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   56276         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_NewClientData(obj));
   56277         277 :   return SWIG_Py_Void();
   56278             : }
   56279             : 
   56280        1715 : SWIGINTERN PyObject *_wrap_delete_ArgDatasetValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56281        1715 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56282        1715 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   56283        1715 :   void *argp1 = 0 ;
   56284        1715 :   int res1 = 0 ;
   56285        1715 :   PyObject *swig_obj[1] ;
   56286             :   
   56287        1715 :   if (!args) SWIG_fail;
   56288        1715 :   swig_obj[0] = args;
   56289        1715 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_POINTER_DISOWN |  0 );
   56290        1715 :   if (!SWIG_IsOK(res1)) {
   56291           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArgDatasetValue" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   56292             :   }
   56293        1715 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   56294        1715 :   {
   56295        1715 :     const int bLocalUseExceptions = GetUseExceptions();
   56296        1715 :     if ( bLocalUseExceptions ) {
   56297        1713 :       pushErrorHandler();
   56298             :     }
   56299        1715 :     {
   56300        1715 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56301        1715 :       delete_GDALArgDatasetValueHS(arg1);
   56302        1715 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56303             :     }
   56304        1715 :     if ( bLocalUseExceptions ) {
   56305        1713 :       popErrorHandler();
   56306             :     }
   56307             : #ifndef SED_HACKS
   56308             :     if ( bLocalUseExceptions ) {
   56309             :       CPLErr eclass = CPLGetLastErrorType();
   56310             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56311             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56312             :       }
   56313             :     }
   56314             : #endif
   56315             :   }
   56316        1715 :   resultobj = SWIG_Py_Void();
   56317        1715 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56318             :   return resultobj;
   56319             : fail:
   56320             :   return NULL;
   56321             : }
   56322             : 
   56323             : 
   56324           2 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56325           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56326           2 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   56327           2 :   void *argp1 = 0 ;
   56328           2 :   int res1 = 0 ;
   56329           2 :   PyObject *swig_obj[1] ;
   56330           2 :   char *result = 0 ;
   56331             :   
   56332           2 :   if (!args) SWIG_fail;
   56333           2 :   swig_obj[0] = args;
   56334           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   56335           2 :   if (!SWIG_IsOK(res1)) {
   56336           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_GetName" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   56337             :   }
   56338           2 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   56339           2 :   {
   56340           2 :     const int bLocalUseExceptions = GetUseExceptions();
   56341           2 :     if ( bLocalUseExceptions ) {
   56342           2 :       pushErrorHandler();
   56343             :     }
   56344           2 :     {
   56345           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56346           2 :       result = (char *)GDALArgDatasetValueHS_GetName(arg1);
   56347           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56348             :     }
   56349           2 :     if ( bLocalUseExceptions ) {
   56350           2 :       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           2 :   resultobj = SWIG_FromCharPtr((const char *)result);
   56362           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; } }
   56363             :   return resultobj;
   56364             : fail:
   56365             :   return NULL;
   56366             : }
   56367             : 
   56368             : 
   56369         560 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_GetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56370         560 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56371         560 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   56372         560 :   void *argp1 = 0 ;
   56373         560 :   int res1 = 0 ;
   56374         560 :   PyObject *swig_obj[1] ;
   56375         560 :   GDALDatasetShadow *result = 0 ;
   56376             :   
   56377         560 :   if (!args) SWIG_fail;
   56378         560 :   swig_obj[0] = args;
   56379         560 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   56380         560 :   if (!SWIG_IsOK(res1)) {
   56381           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_GetDataset" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   56382             :   }
   56383         560 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   56384         560 :   {
   56385         560 :     const int bLocalUseExceptions = GetUseExceptions();
   56386         560 :     if ( bLocalUseExceptions ) {
   56387         560 :       pushErrorHandler();
   56388             :     }
   56389         560 :     {
   56390         560 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56391         560 :       result = (GDALDatasetShadow *)GDALArgDatasetValueHS_GetDataset(arg1);
   56392         560 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56393             :     }
   56394         560 :     if ( bLocalUseExceptions ) {
   56395         560 :       popErrorHandler();
   56396             :     }
   56397             : #ifndef SED_HACKS
   56398             :     if ( bLocalUseExceptions ) {
   56399             :       CPLErr eclass = CPLGetLastErrorType();
   56400             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56401             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56402             :       }
   56403             :     }
   56404             : #endif
   56405             :   }
   56406         560 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   56407         560 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56408             :   return resultobj;
   56409             : fail:
   56410             :   return NULL;
   56411             : }
   56412             : 
   56413             : 
   56414         834 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_SetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56415         834 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56416         834 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   56417         834 :   char *arg2 = (char *) 0 ;
   56418         834 :   void *argp1 = 0 ;
   56419         834 :   int res1 = 0 ;
   56420         834 :   int res2 ;
   56421         834 :   char *buf2 = 0 ;
   56422         834 :   int alloc2 = 0 ;
   56423         834 :   PyObject *swig_obj[2] ;
   56424             :   
   56425         834 :   if (!SWIG_Python_UnpackTuple(args, "ArgDatasetValue_SetName", 2, 2, swig_obj)) SWIG_fail;
   56426         834 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   56427         834 :   if (!SWIG_IsOK(res1)) {
   56428           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_SetName" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   56429             :   }
   56430         834 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   56431         834 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   56432         834 :   if (!SWIG_IsOK(res2)) {
   56433           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ArgDatasetValue_SetName" "', argument " "2"" of type '" "char const *""'");
   56434             :   }
   56435         834 :   arg2 = reinterpret_cast< char * >(buf2);
   56436         834 :   {
   56437         834 :     if (!arg2) {
   56438           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   56439             :     }
   56440             :   }
   56441         834 :   {
   56442         834 :     const int bLocalUseExceptions = GetUseExceptions();
   56443         834 :     if ( bLocalUseExceptions ) {
   56444         832 :       pushErrorHandler();
   56445             :     }
   56446         834 :     {
   56447         834 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56448         834 :       GDALArgDatasetValueHS_SetName(arg1,(char const *)arg2);
   56449         834 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56450             :     }
   56451         834 :     if ( bLocalUseExceptions ) {
   56452         832 :       popErrorHandler();
   56453             :     }
   56454             : #ifndef SED_HACKS
   56455             :     if ( bLocalUseExceptions ) {
   56456             :       CPLErr eclass = CPLGetLastErrorType();
   56457             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56458             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56459             :       }
   56460             :     }
   56461             : #endif
   56462             :   }
   56463         834 :   resultobj = SWIG_Py_Void();
   56464         834 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56465         834 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56466             :   return resultobj;
   56467           0 : fail:
   56468           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   56469             :   return NULL;
   56470             : }
   56471             : 
   56472             : 
   56473         314 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_SetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56474         314 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56475         314 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   56476         314 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   56477         314 :   void *argp1 = 0 ;
   56478         314 :   int res1 = 0 ;
   56479         314 :   void *argp2 = 0 ;
   56480         314 :   int res2 = 0 ;
   56481         314 :   PyObject *swig_obj[2] ;
   56482             :   
   56483         314 :   if (!SWIG_Python_UnpackTuple(args, "ArgDatasetValue_SetDataset", 2, 2, swig_obj)) SWIG_fail;
   56484         314 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   56485         314 :   if (!SWIG_IsOK(res1)) {
   56486           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_SetDataset" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   56487             :   }
   56488         314 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   56489         314 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   56490         314 :   if (!SWIG_IsOK(res2)) {
   56491           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ArgDatasetValue_SetDataset" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   56492             :   }
   56493         314 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   56494         314 :   {
   56495         314 :     const int bLocalUseExceptions = GetUseExceptions();
   56496         314 :     if ( bLocalUseExceptions ) {
   56497         314 :       pushErrorHandler();
   56498             :     }
   56499         314 :     {
   56500         314 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56501         314 :       GDALArgDatasetValueHS_SetDataset(arg1,arg2);
   56502         314 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56503             :     }
   56504         314 :     if ( bLocalUseExceptions ) {
   56505         314 :       popErrorHandler();
   56506             :     }
   56507             : #ifndef SED_HACKS
   56508             :     if ( bLocalUseExceptions ) {
   56509             :       CPLErr eclass = CPLGetLastErrorType();
   56510             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56511             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56512             :       }
   56513             :     }
   56514             : #endif
   56515             :   }
   56516         314 :   resultobj = SWIG_Py_Void();
   56517         314 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56518             :   return resultobj;
   56519             : fail:
   56520             :   return NULL;
   56521             : }
   56522             : 
   56523             : 
   56524         277 : SWIGINTERN PyObject *ArgDatasetValue_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56525         277 :   PyObject *obj;
   56526         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   56527         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_NewClientData(obj));
   56528         277 :   return SWIG_Py_Void();
   56529             : }
   56530             : 
   56531         401 : SWIGINTERN PyObject *_wrap_ApplyGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56532         401 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56533         401 :   double *arg1 ;
   56534         401 :   double arg2 ;
   56535         401 :   double arg3 ;
   56536         401 :   double *arg4 = (double *) 0 ;
   56537         401 :   double *arg5 = (double *) 0 ;
   56538         401 :   double argin1[6] ;
   56539         401 :   double val2 ;
   56540         401 :   int ecode2 = 0 ;
   56541         401 :   double val3 ;
   56542         401 :   int ecode3 = 0 ;
   56543         401 :   double temp4 ;
   56544         401 :   int res4 = SWIG_TMPOBJ ;
   56545         401 :   double temp5 ;
   56546         401 :   int res5 = SWIG_TMPOBJ ;
   56547         401 :   PyObject *swig_obj[3] ;
   56548             :   
   56549         401 :   arg4 = &temp4;
   56550         401 :   arg5 = &temp5;
   56551         401 :   if (!SWIG_Python_UnpackTuple(args, "ApplyGeoTransform", 3, 3, swig_obj)) SWIG_fail;
   56552         401 :   {
   56553             :     /* %typemap(in) (double argin1[ANY]) */
   56554         401 :     arg1 = argin1;
   56555         401 :     if (! PySequence_Check(swig_obj[0]) ) {
   56556           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   56557           0 :       SWIG_fail;
   56558             :     }
   56559         401 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   56560         401 :     if ( seq_size != 6 ) {
   56561           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   56562           0 :       SWIG_fail;
   56563             :     }
   56564        2807 :     for (unsigned int i=0; i<6; i++) {
   56565        2406 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   56566        2406 :       double val;
   56567        2406 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   56568           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   56569           0 :         Py_DECREF(o);
   56570           0 :         SWIG_fail;
   56571             :       }
   56572        2406 :       arg1[i] =  val;
   56573        2406 :       Py_DECREF(o);
   56574             :     }
   56575             :   }
   56576         401 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   56577         401 :   if (!SWIG_IsOK(ecode2)) {
   56578           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApplyGeoTransform" "', argument " "2"" of type '" "double""'");
   56579             :   } 
   56580         401 :   arg2 = static_cast< double >(val2);
   56581         401 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   56582         401 :   if (!SWIG_IsOK(ecode3)) {
   56583           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApplyGeoTransform" "', argument " "3"" of type '" "double""'");
   56584             :   } 
   56585         401 :   arg3 = static_cast< double >(val3);
   56586         401 :   {
   56587         401 :     const int bLocalUseExceptions = GetUseExceptions();
   56588         401 :     if ( bLocalUseExceptions ) {
   56589           0 :       pushErrorHandler();
   56590             :     }
   56591         401 :     {
   56592         401 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56593         401 :       GDALApplyGeoTransform(arg1,arg2,arg3,arg4,arg5);
   56594         401 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56595             :     }
   56596         401 :     if ( bLocalUseExceptions ) {
   56597           0 :       popErrorHandler();
   56598             :     }
   56599             : #ifndef SED_HACKS
   56600             :     if ( bLocalUseExceptions ) {
   56601             :       CPLErr eclass = CPLGetLastErrorType();
   56602             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56603             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56604             :       }
   56605             :     }
   56606             : #endif
   56607             :   }
   56608         401 :   resultobj = SWIG_Py_Void();
   56609         401 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   56610         401 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   56611             :   } else {
   56612           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   56613           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   56614             :   }
   56615         401 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   56616         401 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   56617             :   } else {
   56618           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   56619           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   56620             :   }
   56621         401 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56622             :   return resultobj;
   56623             : fail:
   56624             :   return NULL;
   56625             : }
   56626             : 
   56627             : 
   56628          17 : SWIGINTERN PyObject *_wrap_InvGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56629          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56630          17 :   double *arg1 ;
   56631          17 :   double *arg2 ;
   56632          17 :   double argin1[6] ;
   56633          17 :   double argout2[6] ;
   56634          17 :   PyObject *swig_obj[1] ;
   56635          17 :   RETURN_NONE result;
   56636             :   
   56637          17 :   {
   56638             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   56639          17 :     memset(argout2, 0, sizeof(argout2));
   56640          17 :     arg2 = argout2;
   56641             :   }
   56642          17 :   if (!args) SWIG_fail;
   56643          17 :   swig_obj[0] = args;
   56644          17 :   {
   56645             :     /* %typemap(in) (double argin1[ANY]) */
   56646          17 :     arg1 = argin1;
   56647          17 :     if (! PySequence_Check(swig_obj[0]) ) {
   56648           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   56649           0 :       SWIG_fail;
   56650             :     }
   56651          17 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   56652          17 :     if ( seq_size != 6 ) {
   56653           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   56654           0 :       SWIG_fail;
   56655             :     }
   56656         119 :     for (unsigned int i=0; i<6; i++) {
   56657         102 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   56658         102 :       double val;
   56659         102 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   56660           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   56661           0 :         Py_DECREF(o);
   56662           0 :         SWIG_fail;
   56663             :       }
   56664         102 :       arg1[i] =  val;
   56665         102 :       Py_DECREF(o);
   56666             :     }
   56667             :   }
   56668          17 :   {
   56669          17 :     const int bLocalUseExceptions = GetUseExceptions();
   56670          17 :     if ( bLocalUseExceptions ) {
   56671           9 :       pushErrorHandler();
   56672             :     }
   56673          17 :     {
   56674          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56675          17 :       result = (RETURN_NONE)GDALInvGeoTransform(arg1,arg2);
   56676          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56677             :     }
   56678          17 :     if ( bLocalUseExceptions ) {
   56679           9 :       popErrorHandler();
   56680             :     }
   56681             : #ifndef SED_HACKS
   56682             :     if ( bLocalUseExceptions ) {
   56683             :       CPLErr eclass = CPLGetLastErrorType();
   56684             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56685             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56686             :       }
   56687             :     }
   56688             : #endif
   56689             :   }
   56690             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   56691          17 :   {
   56692             :     /* %typemap(argout) (double argout[ANY]) */
   56693          17 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   56694             : #if SWIG_VERSION >= 0x040300
   56695             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   56696             : #else
   56697          17 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   56698             : #endif
   56699             :   }
   56700          17 :   {
   56701             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   56702          17 :     if (result == 0 ) {
   56703           3 :       Py_XDECREF( resultobj );
   56704           3 :       resultobj = Py_None;
   56705           3 :       Py_INCREF(resultobj);
   56706             :     }
   56707          17 :     if (resultobj == 0) {
   56708           0 :       resultobj = Py_None;
   56709           0 :       Py_INCREF(resultobj);
   56710             :     }
   56711             :   }
   56712          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; } }
   56713             :   return resultobj;
   56714             : fail:
   56715             :   return NULL;
   56716             : }
   56717             : 
   56718             : 
   56719          10 : SWIGINTERN PyObject *_wrap_ApplyHomography(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56720          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56721          10 :   double *arg1 ;
   56722          10 :   double arg2 ;
   56723          10 :   double arg3 ;
   56724          10 :   double *arg4 = (double *) 0 ;
   56725          10 :   double *arg5 = (double *) 0 ;
   56726          10 :   double argin1[9] ;
   56727          10 :   double val2 ;
   56728          10 :   int ecode2 = 0 ;
   56729          10 :   double val3 ;
   56730          10 :   int ecode3 = 0 ;
   56731          10 :   double temp4 ;
   56732          10 :   int res4 = SWIG_TMPOBJ ;
   56733          10 :   double temp5 ;
   56734          10 :   int res5 = SWIG_TMPOBJ ;
   56735          10 :   PyObject *swig_obj[3] ;
   56736          10 :   int result;
   56737             :   
   56738          10 :   arg4 = &temp4;
   56739          10 :   arg5 = &temp5;
   56740          10 :   if (!SWIG_Python_UnpackTuple(args, "ApplyHomography", 3, 3, swig_obj)) SWIG_fail;
   56741          10 :   {
   56742             :     /* %typemap(in) (double argin1[ANY]) */
   56743          10 :     arg1 = argin1;
   56744          10 :     if (! PySequence_Check(swig_obj[0]) ) {
   56745           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   56746           0 :       SWIG_fail;
   56747             :     }
   56748          10 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   56749          10 :     if ( seq_size != 9 ) {
   56750           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   56751           0 :       SWIG_fail;
   56752             :     }
   56753         100 :     for (unsigned int i=0; i<9; i++) {
   56754          90 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   56755          90 :       double val;
   56756          90 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   56757           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   56758           0 :         Py_DECREF(o);
   56759           0 :         SWIG_fail;
   56760             :       }
   56761          90 :       arg1[i] =  val;
   56762          90 :       Py_DECREF(o);
   56763             :     }
   56764             :   }
   56765          10 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   56766          10 :   if (!SWIG_IsOK(ecode2)) {
   56767           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApplyHomography" "', argument " "2"" of type '" "double""'");
   56768             :   } 
   56769          10 :   arg2 = static_cast< double >(val2);
   56770          10 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   56771          10 :   if (!SWIG_IsOK(ecode3)) {
   56772           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApplyHomography" "', argument " "3"" of type '" "double""'");
   56773             :   } 
   56774          10 :   arg3 = static_cast< double >(val3);
   56775          10 :   {
   56776          10 :     const int bLocalUseExceptions = GetUseExceptions();
   56777          10 :     if ( bLocalUseExceptions ) {
   56778          10 :       pushErrorHandler();
   56779             :     }
   56780          10 :     {
   56781          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56782          10 :       result = (int)GDALApplyHomography(arg1,arg2,arg3,arg4,arg5);
   56783          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56784             :     }
   56785          10 :     if ( bLocalUseExceptions ) {
   56786          10 :       popErrorHandler();
   56787             :     }
   56788             : #ifndef SED_HACKS
   56789             :     if ( bLocalUseExceptions ) {
   56790             :       CPLErr eclass = CPLGetLastErrorType();
   56791             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56792             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56793             :       }
   56794             :     }
   56795             : #endif
   56796             :   }
   56797          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   56798          10 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   56799          10 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   56800             :   } else {
   56801           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   56802           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   56803             :   }
   56804          10 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   56805          10 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   56806             :   } else {
   56807           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   56808           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   56809             :   }
   56810          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; } }
   56811             :   return resultobj;
   56812             : fail:
   56813             :   return NULL;
   56814             : }
   56815             : 
   56816             : 
   56817           7 : SWIGINTERN PyObject *_wrap_InvHomography(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56818           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56819           7 :   double *arg1 ;
   56820           7 :   double *arg2 ;
   56821           7 :   double argin1[9] ;
   56822           7 :   double argout2[9] ;
   56823           7 :   PyObject *swig_obj[1] ;
   56824           7 :   RETURN_NONE result;
   56825             :   
   56826           7 :   {
   56827             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   56828           7 :     memset(argout2, 0, sizeof(argout2));
   56829           7 :     arg2 = argout2;
   56830             :   }
   56831           7 :   if (!args) SWIG_fail;
   56832           7 :   swig_obj[0] = args;
   56833           7 :   {
   56834             :     /* %typemap(in) (double argin1[ANY]) */
   56835           7 :     arg1 = argin1;
   56836           7 :     if (! PySequence_Check(swig_obj[0]) ) {
   56837           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   56838           0 :       SWIG_fail;
   56839             :     }
   56840           7 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   56841           7 :     if ( seq_size != 9 ) {
   56842           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   56843           0 :       SWIG_fail;
   56844             :     }
   56845          70 :     for (unsigned int i=0; i<9; i++) {
   56846          63 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   56847          63 :       double val;
   56848          63 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   56849           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   56850           0 :         Py_DECREF(o);
   56851           0 :         SWIG_fail;
   56852             :       }
   56853          63 :       arg1[i] =  val;
   56854          63 :       Py_DECREF(o);
   56855             :     }
   56856             :   }
   56857           7 :   {
   56858           7 :     const int bLocalUseExceptions = GetUseExceptions();
   56859           7 :     if ( bLocalUseExceptions ) {
   56860           7 :       pushErrorHandler();
   56861             :     }
   56862           7 :     {
   56863           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56864           7 :       result = (RETURN_NONE)GDALInvHomography(arg1,arg2);
   56865           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56866             :     }
   56867           7 :     if ( bLocalUseExceptions ) {
   56868           7 :       popErrorHandler();
   56869             :     }
   56870             : #ifndef SED_HACKS
   56871             :     if ( bLocalUseExceptions ) {
   56872             :       CPLErr eclass = CPLGetLastErrorType();
   56873             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56874             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56875             :       }
   56876             :     }
   56877             : #endif
   56878             :   }
   56879             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   56880           7 :   {
   56881             :     /* %typemap(argout) (double argout[ANY]) */
   56882           7 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 9 );
   56883             : #if SWIG_VERSION >= 0x040300
   56884             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   56885             : #else
   56886           7 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   56887             : #endif
   56888             :   }
   56889           7 :   {
   56890             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   56891           7 :     if (result == 0 ) {
   56892           3 :       Py_XDECREF( resultobj );
   56893           3 :       resultobj = Py_None;
   56894           3 :       Py_INCREF(resultobj);
   56895             :     }
   56896           7 :     if (resultobj == 0) {
   56897           0 :       resultobj = Py_None;
   56898           0 :       Py_INCREF(resultobj);
   56899             :     }
   56900             :   }
   56901          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; } }
   56902             :   return resultobj;
   56903             : fail:
   56904             :   return NULL;
   56905             : }
   56906             : 
   56907             : 
   56908        3867 : SWIGINTERN PyObject *_wrap_VersionInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56909        3867 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56910        3867 :   char *arg1 = (char *) "VERSION_NUM" ;
   56911        3867 :   int res1 ;
   56912        3867 :   char *buf1 = 0 ;
   56913        3867 :   int alloc1 = 0 ;
   56914        3867 :   PyObject *swig_obj[1] ;
   56915        3867 :   char *result = 0 ;
   56916             :   
   56917        3867 :   if (!SWIG_Python_UnpackTuple(args, "VersionInfo", 0, 1, swig_obj)) SWIG_fail;
   56918        3867 :   if (swig_obj[0]) {
   56919        3867 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   56920        3867 :     if (!SWIG_IsOK(res1)) {
   56921           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VersionInfo" "', argument " "1"" of type '" "char const *""'");
   56922             :     }
   56923        3867 :     arg1 = reinterpret_cast< char * >(buf1);
   56924             :   }
   56925        3867 :   {
   56926        3867 :     const int bLocalUseExceptions = GetUseExceptions();
   56927        3867 :     if ( bLocalUseExceptions ) {
   56928        3245 :       pushErrorHandler();
   56929             :     }
   56930        3867 :     {
   56931        3867 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56932        3867 :       result = (char *)GDALVersionInfo((char const *)arg1);
   56933        3867 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56934             :     }
   56935        3867 :     if ( bLocalUseExceptions ) {
   56936        3245 :       popErrorHandler();
   56937             :     }
   56938             : #ifndef SED_HACKS
   56939             :     if ( bLocalUseExceptions ) {
   56940             :       CPLErr eclass = CPLGetLastErrorType();
   56941             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56942             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56943             :       }
   56944             :     }
   56945             : #endif
   56946             :   }
   56947        3867 :   resultobj = SWIG_FromCharPtr((const char *)result);
   56948        3867 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   56949        3867 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56950             :   return resultobj;
   56951           0 : fail:
   56952           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   56953             :   return NULL;
   56954             : }
   56955             : 
   56956             : 
   56957         274 : SWIGINTERN PyObject *_wrap_AllRegister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56958         274 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56959             :   
   56960         274 :   if (!SWIG_Python_UnpackTuple(args, "AllRegister", 0, 0, 0)) SWIG_fail;
   56961         274 :   {
   56962         274 :     const int bLocalUseExceptions = GetUseExceptions();
   56963         274 :     if ( bLocalUseExceptions ) {
   56964         225 :       pushErrorHandler();
   56965             :     }
   56966         274 :     {
   56967         274 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56968         274 :       GDALAllRegister();
   56969         274 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56970             :     }
   56971         274 :     if ( bLocalUseExceptions ) {
   56972         225 :       popErrorHandler();
   56973             :     }
   56974             : #ifndef SED_HACKS
   56975             :     if ( bLocalUseExceptions ) {
   56976             :       CPLErr eclass = CPLGetLastErrorType();
   56977             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56978             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56979             :       }
   56980             :     }
   56981             : #endif
   56982             :   }
   56983         274 :   resultobj = SWIG_Py_Void();
   56984         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; } }
   56985             :   return resultobj;
   56986           0 : fail:
   56987           0 :   return NULL;
   56988             : }
   56989             : 
   56990             : 
   56991           0 : SWIGINTERN PyObject *_wrap_GDALDestroyDriverManager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56992           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56993             :   
   56994           0 :   if (!SWIG_Python_UnpackTuple(args, "GDALDestroyDriverManager", 0, 0, 0)) SWIG_fail;
   56995           0 :   {
   56996           0 :     const int bLocalUseExceptions = GetUseExceptions();
   56997           0 :     if ( bLocalUseExceptions ) {
   56998           0 :       pushErrorHandler();
   56999             :     }
   57000           0 :     {
   57001           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57002           0 :       GDALDestroyDriverManager();
   57003           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57004             :     }
   57005           0 :     if ( bLocalUseExceptions ) {
   57006           0 :       popErrorHandler();
   57007             :     }
   57008             : #ifndef SED_HACKS
   57009             :     if ( bLocalUseExceptions ) {
   57010             :       CPLErr eclass = CPLGetLastErrorType();
   57011             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57012             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57013             :       }
   57014             :     }
   57015             : #endif
   57016             :   }
   57017           0 :   resultobj = SWIG_Py_Void();
   57018           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; } }
   57019             :   return resultobj;
   57020           0 : fail:
   57021           0 :   return NULL;
   57022             : }
   57023             : 
   57024             : 
   57025          56 : SWIGINTERN PyObject *_wrap_GetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57026          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57027          56 :   GIntBig result;
   57028             :   
   57029          56 :   if (!SWIG_Python_UnpackTuple(args, "GetCacheMax", 0, 0, 0)) SWIG_fail;
   57030          56 :   {
   57031          56 :     const int bLocalUseExceptions = GetUseExceptions();
   57032          56 :     if ( bLocalUseExceptions ) {
   57033          26 :       pushErrorHandler();
   57034             :     }
   57035          56 :     {
   57036          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57037          56 :       result = wrapper_GDALGetCacheMax();
   57038          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57039             :     }
   57040          56 :     if ( bLocalUseExceptions ) {
   57041          26 :       popErrorHandler();
   57042             :     }
   57043             : #ifndef SED_HACKS
   57044             :     if ( bLocalUseExceptions ) {
   57045             :       CPLErr eclass = CPLGetLastErrorType();
   57046             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57047             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57048             :       }
   57049             :     }
   57050             : #endif
   57051             :   }
   57052          56 :   {
   57053          56 :     resultobj = PyLong_FromLongLong(result);
   57054             :   }
   57055          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; } }
   57056             :   return resultobj;
   57057           0 : fail:
   57058           0 :   return NULL;
   57059             : }
   57060             : 
   57061             : 
   57062           2 : SWIGINTERN PyObject *_wrap_GetCacheUsed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57063           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57064           2 :   GIntBig result;
   57065             :   
   57066           2 :   if (!SWIG_Python_UnpackTuple(args, "GetCacheUsed", 0, 0, 0)) SWIG_fail;
   57067           2 :   {
   57068           2 :     const int bLocalUseExceptions = GetUseExceptions();
   57069           2 :     if ( bLocalUseExceptions ) {
   57070           0 :       pushErrorHandler();
   57071             :     }
   57072           2 :     {
   57073           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57074           2 :       result = wrapper_GDALGetCacheUsed();
   57075           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57076             :     }
   57077           2 :     if ( bLocalUseExceptions ) {
   57078           0 :       popErrorHandler();
   57079             :     }
   57080             : #ifndef SED_HACKS
   57081             :     if ( bLocalUseExceptions ) {
   57082             :       CPLErr eclass = CPLGetLastErrorType();
   57083             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57084             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57085             :       }
   57086             :     }
   57087             : #endif
   57088             :   }
   57089           2 :   {
   57090           2 :     resultobj = PyLong_FromLongLong(result);
   57091             :   }
   57092           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; } }
   57093             :   return resultobj;
   57094           0 : fail:
   57095           0 :   return NULL;
   57096             : }
   57097             : 
   57098             : 
   57099          76 : SWIGINTERN PyObject *_wrap_SetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57100          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57101          76 :   GIntBig arg1 ;
   57102          76 :   PyObject *swig_obj[1] ;
   57103             :   
   57104          76 :   if (!args) SWIG_fail;
   57105          76 :   swig_obj[0] = args;
   57106          76 :   {
   57107          76 :     arg1 = (GIntBig)PyLong_AsLongLong(swig_obj[0]);
   57108             :   }
   57109          76 :   {
   57110          76 :     const int bLocalUseExceptions = GetUseExceptions();
   57111          76 :     if ( bLocalUseExceptions ) {
   57112          20 :       pushErrorHandler();
   57113             :     }
   57114          76 :     {
   57115          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57116          76 :       wrapper_GDALSetCacheMax(arg1);
   57117          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57118             :     }
   57119          76 :     if ( bLocalUseExceptions ) {
   57120          20 :       popErrorHandler();
   57121             :     }
   57122             : #ifndef SED_HACKS
   57123             :     if ( bLocalUseExceptions ) {
   57124             :       CPLErr eclass = CPLGetLastErrorType();
   57125             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57126             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57127             :       }
   57128             :     }
   57129             : #endif
   57130             :   }
   57131          76 :   resultobj = SWIG_Py_Void();
   57132          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; } }
   57133             :   return resultobj;
   57134           0 : fail:
   57135           0 :   return NULL;
   57136             : }
   57137             : 
   57138             : 
   57139          43 : SWIGINTERN PyObject *_wrap_GetDataTypeSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57140          43 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57141          43 :   GDALDataType arg1 ;
   57142          43 :   PyObject *swig_obj[1] ;
   57143          43 :   int result;
   57144             :   
   57145          43 :   if (!args) SWIG_fail;
   57146          43 :   swig_obj[0] = args;
   57147          43 :   {
   57148             :     // %typemap(in) GDALDataType
   57149          43 :     int val = 0;
   57150          43 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   57151          43 :     if (!SWIG_IsOK(ecode)) {
   57152           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57153             :     }
   57154          43 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57155             :     {
   57156           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57157             :     }
   57158          43 :     arg1 = static_cast<GDALDataType>(val);
   57159             :   }
   57160          43 :   {
   57161          43 :     const int bLocalUseExceptions = GetUseExceptions();
   57162          43 :     if ( bLocalUseExceptions ) {
   57163          21 :       pushErrorHandler();
   57164             :     }
   57165          43 :     {
   57166          43 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57167          43 :       result = (int)wrapper_GDALGetDataTypeSizeBits(arg1);
   57168          43 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57169             :     }
   57170          43 :     if ( bLocalUseExceptions ) {
   57171          21 :       popErrorHandler();
   57172             :     }
   57173             : #ifndef SED_HACKS
   57174             :     if ( bLocalUseExceptions ) {
   57175             :       CPLErr eclass = CPLGetLastErrorType();
   57176             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57177             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57178             :       }
   57179             :     }
   57180             : #endif
   57181             :   }
   57182          43 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57183          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; } }
   57184             :   return resultobj;
   57185             : fail:
   57186             :   return NULL;
   57187             : }
   57188             : 
   57189             : 
   57190           0 : SWIGINTERN PyObject *_wrap_GetDataTypeSizeBits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57191           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57192           0 :   GDALDataType arg1 ;
   57193           0 :   PyObject *swig_obj[1] ;
   57194           0 :   int result;
   57195             :   
   57196           0 :   if (!args) SWIG_fail;
   57197           0 :   swig_obj[0] = args;
   57198           0 :   {
   57199             :     // %typemap(in) GDALDataType
   57200           0 :     int val = 0;
   57201           0 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   57202           0 :     if (!SWIG_IsOK(ecode)) {
   57203           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57204             :     }
   57205           0 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57206             :     {
   57207           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57208             :     }
   57209           0 :     arg1 = static_cast<GDALDataType>(val);
   57210             :   }
   57211           0 :   {
   57212           0 :     const int bLocalUseExceptions = GetUseExceptions();
   57213           0 :     if ( bLocalUseExceptions ) {
   57214           0 :       pushErrorHandler();
   57215             :     }
   57216           0 :     {
   57217           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57218           0 :       result = (int)GDALGetDataTypeSizeBits(arg1);
   57219           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57220             :     }
   57221           0 :     if ( bLocalUseExceptions ) {
   57222           0 :       popErrorHandler();
   57223             :     }
   57224             : #ifndef SED_HACKS
   57225             :     if ( bLocalUseExceptions ) {
   57226             :       CPLErr eclass = CPLGetLastErrorType();
   57227             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57228             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57229             :       }
   57230             :     }
   57231             : #endif
   57232             :   }
   57233           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57234           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; } }
   57235             :   return resultobj;
   57236             : fail:
   57237             :   return NULL;
   57238             : }
   57239             : 
   57240             : 
   57241          24 : SWIGINTERN PyObject *_wrap_GetDataTypeSizeBytes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57242          24 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57243          24 :   GDALDataType arg1 ;
   57244          24 :   PyObject *swig_obj[1] ;
   57245          24 :   int result;
   57246             :   
   57247          24 :   if (!args) SWIG_fail;
   57248          24 :   swig_obj[0] = args;
   57249          24 :   {
   57250             :     // %typemap(in) GDALDataType
   57251          24 :     int val = 0;
   57252          24 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   57253          24 :     if (!SWIG_IsOK(ecode)) {
   57254           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57255             :     }
   57256          24 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57257             :     {
   57258           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57259             :     }
   57260          24 :     arg1 = static_cast<GDALDataType>(val);
   57261             :   }
   57262          24 :   {
   57263          24 :     const int bLocalUseExceptions = GetUseExceptions();
   57264          24 :     if ( bLocalUseExceptions ) {
   57265          24 :       pushErrorHandler();
   57266             :     }
   57267          24 :     {
   57268          24 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57269          24 :       result = (int)GDALGetDataTypeSizeBytes(arg1);
   57270          24 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57271             :     }
   57272          24 :     if ( bLocalUseExceptions ) {
   57273          24 :       popErrorHandler();
   57274             :     }
   57275             : #ifndef SED_HACKS
   57276             :     if ( bLocalUseExceptions ) {
   57277             :       CPLErr eclass = CPLGetLastErrorType();
   57278             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57279             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57280             :       }
   57281             :     }
   57282             : #endif
   57283             :   }
   57284          24 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57285          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; } }
   57286             :   return resultobj;
   57287             : fail:
   57288             :   return NULL;
   57289             : }
   57290             : 
   57291             : 
   57292         217 : SWIGINTERN PyObject *_wrap_DataTypeIsComplex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57293         217 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57294         217 :   GDALDataType arg1 ;
   57295         217 :   PyObject *swig_obj[1] ;
   57296         217 :   int result;
   57297             :   
   57298         217 :   if (!args) SWIG_fail;
   57299         217 :   swig_obj[0] = args;
   57300         217 :   {
   57301             :     // %typemap(in) GDALDataType
   57302         217 :     int val = 0;
   57303         217 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   57304         217 :     if (!SWIG_IsOK(ecode)) {
   57305           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57306             :     }
   57307         217 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57308             :     {
   57309           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57310             :     }
   57311         217 :     arg1 = static_cast<GDALDataType>(val);
   57312             :   }
   57313         217 :   {
   57314         217 :     const int bLocalUseExceptions = GetUseExceptions();
   57315         217 :     if ( bLocalUseExceptions ) {
   57316         159 :       pushErrorHandler();
   57317             :     }
   57318         217 :     {
   57319         217 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57320         217 :       result = (int)GDALDataTypeIsComplex(arg1);
   57321         217 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57322             :     }
   57323         217 :     if ( bLocalUseExceptions ) {
   57324         159 :       popErrorHandler();
   57325             :     }
   57326             : #ifndef SED_HACKS
   57327             :     if ( bLocalUseExceptions ) {
   57328             :       CPLErr eclass = CPLGetLastErrorType();
   57329             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57330             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57331             :       }
   57332             :     }
   57333             : #endif
   57334             :   }
   57335         217 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57336         217 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = 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             : fail:
   57339             :   return NULL;
   57340             : }
   57341             : 
   57342             : 
   57343        3870 : SWIGINTERN PyObject *_wrap_GetDataTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57344        3870 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57345        3870 :   GDALDataType arg1 ;
   57346        3870 :   PyObject *swig_obj[1] ;
   57347        3870 :   char *result = 0 ;
   57348             :   
   57349        3870 :   if (!args) SWIG_fail;
   57350        3870 :   swig_obj[0] = args;
   57351        3870 :   {
   57352             :     // %typemap(in) GDALDataType
   57353        3870 :     int val = 0;
   57354        3870 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   57355        3870 :     if (!SWIG_IsOK(ecode)) {
   57356           1 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57357             :     }
   57358        3869 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57359             :     {
   57360           2 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57361             :     }
   57362        3867 :     arg1 = static_cast<GDALDataType>(val);
   57363             :   }
   57364        3867 :   {
   57365        3867 :     const int bLocalUseExceptions = GetUseExceptions();
   57366        3867 :     if ( bLocalUseExceptions ) {
   57367         274 :       pushErrorHandler();
   57368             :     }
   57369        3867 :     {
   57370        3867 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57371        3867 :       result = (char *)GDALGetDataTypeName(arg1);
   57372        3867 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57373             :     }
   57374        3867 :     if ( bLocalUseExceptions ) {
   57375         274 :       popErrorHandler();
   57376             :     }
   57377             : #ifndef SED_HACKS
   57378             :     if ( bLocalUseExceptions ) {
   57379             :       CPLErr eclass = CPLGetLastErrorType();
   57380             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57381             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57382             :       }
   57383             :     }
   57384             : #endif
   57385             :   }
   57386        3867 :   resultobj = SWIG_FromCharPtr((const char *)result);
   57387        3870 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57388             :   return resultobj;
   57389             : fail:
   57390             :   return NULL;
   57391             : }
   57392             : 
   57393             : 
   57394         995 : SWIGINTERN PyObject *_wrap_GetDataTypeByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57395         995 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57396         995 :   char *arg1 = (char *) 0 ;
   57397         995 :   int res1 ;
   57398         995 :   char *buf1 = 0 ;
   57399         995 :   int alloc1 = 0 ;
   57400         995 :   PyObject *swig_obj[1] ;
   57401         995 :   GDALDataType result;
   57402             :   
   57403         995 :   if (!args) SWIG_fail;
   57404         995 :   swig_obj[0] = args;
   57405         995 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   57406         995 :   if (!SWIG_IsOK(res1)) {
   57407           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDataTypeByName" "', argument " "1"" of type '" "char const *""'");
   57408             :   }
   57409         995 :   arg1 = reinterpret_cast< char * >(buf1);
   57410         995 :   {
   57411         995 :     const int bLocalUseExceptions = GetUseExceptions();
   57412         995 :     if ( bLocalUseExceptions ) {
   57413          89 :       pushErrorHandler();
   57414             :     }
   57415         995 :     {
   57416         995 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57417         995 :       result = (GDALDataType)GDALGetDataTypeByName((char const *)arg1);
   57418         995 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57419             :     }
   57420         995 :     if ( bLocalUseExceptions ) {
   57421          89 :       popErrorHandler();
   57422             :     }
   57423             : #ifndef SED_HACKS
   57424             :     if ( bLocalUseExceptions ) {
   57425             :       CPLErr eclass = CPLGetLastErrorType();
   57426             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57427             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57428             :       }
   57429             :     }
   57430             : #endif
   57431             :   }
   57432         995 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57433         995 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57434         995 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57435             :   return resultobj;
   57436           0 : fail:
   57437           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57438             :   return NULL;
   57439             : }
   57440             : 
   57441             : 
   57442          65 : SWIGINTERN PyObject *_wrap_DataTypeUnion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57443          65 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57444          65 :   GDALDataType arg1 ;
   57445          65 :   GDALDataType arg2 ;
   57446          65 :   PyObject *swig_obj[2] ;
   57447          65 :   GDALDataType result;
   57448             :   
   57449          65 :   if (!SWIG_Python_UnpackTuple(args, "DataTypeUnion", 2, 2, swig_obj)) SWIG_fail;
   57450          65 :   {
   57451             :     // %typemap(in) GDALDataType
   57452          65 :     int val = 0;
   57453          65 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   57454          65 :     if (!SWIG_IsOK(ecode)) {
   57455           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57456             :     }
   57457          65 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57458             :     {
   57459           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57460             :     }
   57461          65 :     arg1 = static_cast<GDALDataType>(val);
   57462             :   }
   57463          65 :   {
   57464             :     // %typemap(in) GDALDataType
   57465          65 :     int val = 0;
   57466          65 :     int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   57467          65 :     if (!SWIG_IsOK(ecode)) {
   57468           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57469             :     }
   57470          65 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57471             :     {
   57472           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57473             :     }
   57474          65 :     arg2 = static_cast<GDALDataType>(val);
   57475             :   }
   57476          65 :   {
   57477          65 :     const int bLocalUseExceptions = GetUseExceptions();
   57478          65 :     if ( bLocalUseExceptions ) {
   57479          64 :       pushErrorHandler();
   57480             :     }
   57481          65 :     {
   57482          65 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57483          65 :       result = (GDALDataType)GDALDataTypeUnion(arg1,arg2);
   57484          65 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57485             :     }
   57486          65 :     if ( bLocalUseExceptions ) {
   57487          64 :       popErrorHandler();
   57488             :     }
   57489             : #ifndef SED_HACKS
   57490             :     if ( bLocalUseExceptions ) {
   57491             :       CPLErr eclass = CPLGetLastErrorType();
   57492             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57493             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57494             :       }
   57495             :     }
   57496             : #endif
   57497             :   }
   57498          65 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57499          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; } }
   57500             :   return resultobj;
   57501             : fail:
   57502             :   return NULL;
   57503             : }
   57504             : 
   57505             : 
   57506           8 : SWIGINTERN PyObject *_wrap_DataTypeUnionWithValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57507           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57508           8 :   GDALDataType arg1 ;
   57509           8 :   double arg2 ;
   57510           8 :   bool arg3 ;
   57511           8 :   double val2 ;
   57512           8 :   int ecode2 = 0 ;
   57513           8 :   bool val3 ;
   57514           8 :   int ecode3 = 0 ;
   57515           8 :   PyObject *swig_obj[3] ;
   57516           8 :   GDALDataType result;
   57517             :   
   57518           8 :   if (!SWIG_Python_UnpackTuple(args, "DataTypeUnionWithValue", 3, 3, swig_obj)) SWIG_fail;
   57519           8 :   {
   57520             :     // %typemap(in) GDALDataType
   57521           8 :     int val = 0;
   57522           8 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   57523           8 :     if (!SWIG_IsOK(ecode)) {
   57524           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   57525             :     }
   57526           8 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   57527             :     {
   57528           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   57529             :     }
   57530           8 :     arg1 = static_cast<GDALDataType>(val);
   57531             :   }
   57532           8 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   57533           8 :   if (!SWIG_IsOK(ecode2)) {
   57534           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DataTypeUnionWithValue" "', argument " "2"" of type '" "double""'");
   57535             :   } 
   57536           8 :   arg2 = static_cast< double >(val2);
   57537           8 :   ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
   57538           8 :   if (!SWIG_IsOK(ecode3)) {
   57539           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DataTypeUnionWithValue" "', argument " "3"" of type '" "bool""'");
   57540             :   } 
   57541           8 :   arg3 = static_cast< bool >(val3);
   57542           8 :   {
   57543           8 :     const int bLocalUseExceptions = GetUseExceptions();
   57544           8 :     if ( bLocalUseExceptions ) {
   57545           8 :       pushErrorHandler();
   57546             :     }
   57547           8 :     {
   57548           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57549           8 :       result = (GDALDataType)GDALDataTypeUnionWithValue(arg1,arg2,arg3);
   57550           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57551             :     }
   57552           8 :     if ( bLocalUseExceptions ) {
   57553           8 :       popErrorHandler();
   57554             :     }
   57555             : #ifndef SED_HACKS
   57556             :     if ( bLocalUseExceptions ) {
   57557             :       CPLErr eclass = CPLGetLastErrorType();
   57558             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57559             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57560             :       }
   57561             :     }
   57562             : #endif
   57563             :   }
   57564           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57565           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; } }
   57566             :   return resultobj;
   57567             : fail:
   57568             :   return NULL;
   57569             : }
   57570             : 
   57571             : 
   57572          61 : SWIGINTERN PyObject *_wrap_GetColorInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57573          61 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57574          61 :   GDALColorInterp arg1 ;
   57575          61 :   int val1 ;
   57576          61 :   int ecode1 = 0 ;
   57577          61 :   PyObject *swig_obj[1] ;
   57578          61 :   char *result = 0 ;
   57579             :   
   57580          61 :   if (!args) SWIG_fail;
   57581          61 :   swig_obj[0] = args;
   57582          61 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   57583          61 :   if (!SWIG_IsOK(ecode1)) {
   57584           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetColorInterpretationName" "', argument " "1"" of type '" "GDALColorInterp""'");
   57585             :   } 
   57586          61 :   arg1 = static_cast< GDALColorInterp >(val1);
   57587          61 :   {
   57588          61 :     const int bLocalUseExceptions = GetUseExceptions();
   57589          61 :     if ( bLocalUseExceptions ) {
   57590           4 :       pushErrorHandler();
   57591             :     }
   57592          61 :     {
   57593          61 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57594          61 :       result = (char *)GDALGetColorInterpretationName(arg1);
   57595          61 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57596             :     }
   57597          61 :     if ( bLocalUseExceptions ) {
   57598           4 :       popErrorHandler();
   57599             :     }
   57600             : #ifndef SED_HACKS
   57601             :     if ( bLocalUseExceptions ) {
   57602             :       CPLErr eclass = CPLGetLastErrorType();
   57603             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57604             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57605             :       }
   57606             :     }
   57607             : #endif
   57608             :   }
   57609          61 :   resultobj = SWIG_FromCharPtr((const char *)result);
   57610          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; } }
   57611             :   return resultobj;
   57612             : fail:
   57613             :   return NULL;
   57614             : }
   57615             : 
   57616             : 
   57617          41 : SWIGINTERN PyObject *_wrap_GetColorInterpretationByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57618          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57619          41 :   char *arg1 = (char *) 0 ;
   57620          41 :   int res1 ;
   57621          41 :   char *buf1 = 0 ;
   57622          41 :   int alloc1 = 0 ;
   57623          41 :   PyObject *swig_obj[1] ;
   57624          41 :   GDALColorInterp result;
   57625             :   
   57626          41 :   if (!args) SWIG_fail;
   57627          41 :   swig_obj[0] = args;
   57628          41 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   57629          41 :   if (!SWIG_IsOK(res1)) {
   57630           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetColorInterpretationByName" "', argument " "1"" of type '" "char const *""'");
   57631             :   }
   57632          41 :   arg1 = reinterpret_cast< char * >(buf1);
   57633          41 :   {
   57634          41 :     const int bLocalUseExceptions = GetUseExceptions();
   57635          41 :     if ( bLocalUseExceptions ) {
   57636           1 :       pushErrorHandler();
   57637             :     }
   57638          41 :     {
   57639          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57640          41 :       result = (GDALColorInterp)GDALGetColorInterpretationByName((char const *)arg1);
   57641          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57642             :     }
   57643          41 :     if ( bLocalUseExceptions ) {
   57644           1 :       popErrorHandler();
   57645             :     }
   57646             : #ifndef SED_HACKS
   57647             :     if ( bLocalUseExceptions ) {
   57648             :       CPLErr eclass = CPLGetLastErrorType();
   57649             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57650             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57651             :       }
   57652             :     }
   57653             : #endif
   57654             :   }
   57655          41 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57656          41 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57657          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; } }
   57658             :   return resultobj;
   57659           0 : fail:
   57660           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57661             :   return NULL;
   57662             : }
   57663             : 
   57664             : 
   57665           2 : SWIGINTERN PyObject *_wrap_GetPaletteInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57666           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57667           2 :   GDALPaletteInterp arg1 ;
   57668           2 :   int val1 ;
   57669           2 :   int ecode1 = 0 ;
   57670           2 :   PyObject *swig_obj[1] ;
   57671           2 :   char *result = 0 ;
   57672             :   
   57673           2 :   if (!args) SWIG_fail;
   57674           2 :   swig_obj[0] = args;
   57675           2 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   57676           2 :   if (!SWIG_IsOK(ecode1)) {
   57677           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetPaletteInterpretationName" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   57678             :   } 
   57679           2 :   arg1 = static_cast< GDALPaletteInterp >(val1);
   57680           2 :   {
   57681           2 :     const int bLocalUseExceptions = GetUseExceptions();
   57682           2 :     if ( bLocalUseExceptions ) {
   57683           0 :       pushErrorHandler();
   57684             :     }
   57685           2 :     {
   57686           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57687           2 :       result = (char *)GDALGetPaletteInterpretationName(arg1);
   57688           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57689             :     }
   57690           2 :     if ( bLocalUseExceptions ) {
   57691           0 :       popErrorHandler();
   57692             :     }
   57693             : #ifndef SED_HACKS
   57694             :     if ( bLocalUseExceptions ) {
   57695             :       CPLErr eclass = CPLGetLastErrorType();
   57696             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57697             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57698             :       }
   57699             :     }
   57700             : #endif
   57701             :   }
   57702           2 :   resultobj = SWIG_FromCharPtr((const char *)result);
   57703           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; } }
   57704             :   return resultobj;
   57705             : fail:
   57706             :   return NULL;
   57707             : }
   57708             : 
   57709             : 
   57710         130 : SWIGINTERN PyObject *_wrap_DecToDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57711         130 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57712         130 :   double arg1 ;
   57713         130 :   char *arg2 = (char *) 0 ;
   57714         130 :   int arg3 = (int) 2 ;
   57715         130 :   double val1 ;
   57716         130 :   int ecode1 = 0 ;
   57717         130 :   int res2 ;
   57718         130 :   char *buf2 = 0 ;
   57719         130 :   int alloc2 = 0 ;
   57720         130 :   int val3 ;
   57721         130 :   int ecode3 = 0 ;
   57722         130 :   PyObject *swig_obj[3] ;
   57723         130 :   char *result = 0 ;
   57724             :   
   57725         130 :   if (!SWIG_Python_UnpackTuple(args, "DecToDMS", 2, 3, swig_obj)) SWIG_fail;
   57726         130 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   57727         130 :   if (!SWIG_IsOK(ecode1)) {
   57728           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToDMS" "', argument " "1"" of type '" "double""'");
   57729             :   } 
   57730         130 :   arg1 = static_cast< double >(val1);
   57731         130 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   57732         130 :   if (!SWIG_IsOK(res2)) {
   57733           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DecToDMS" "', argument " "2"" of type '" "char const *""'");
   57734             :   }
   57735         130 :   arg2 = reinterpret_cast< char * >(buf2);
   57736         130 :   if (swig_obj[2]) {
   57737         130 :     ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   57738         130 :     if (!SWIG_IsOK(ecode3)) {
   57739           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DecToDMS" "', argument " "3"" of type '" "int""'");
   57740             :     } 
   57741             :     arg3 = static_cast< int >(val3);
   57742             :   }
   57743         130 :   {
   57744         130 :     const int bLocalUseExceptions = GetUseExceptions();
   57745         130 :     if ( bLocalUseExceptions ) {
   57746           0 :       pushErrorHandler();
   57747             :     }
   57748         130 :     {
   57749         130 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57750         130 :       result = (char *)GDALDecToDMS(arg1,(char const *)arg2,arg3);
   57751         130 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57752             :     }
   57753         130 :     if ( bLocalUseExceptions ) {
   57754           0 :       popErrorHandler();
   57755             :     }
   57756             : #ifndef SED_HACKS
   57757             :     if ( bLocalUseExceptions ) {
   57758             :       CPLErr eclass = CPLGetLastErrorType();
   57759             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57760             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57761             :       }
   57762             :     }
   57763             : #endif
   57764             :   }
   57765         130 :   resultobj = SWIG_FromCharPtr((const char *)result);
   57766         130 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   57767         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; } }
   57768             :   return resultobj;
   57769           0 : fail:
   57770           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   57771             :   return NULL;
   57772             : }
   57773             : 
   57774             : 
   57775           4 : SWIGINTERN PyObject *_wrap_PackedDMSToDec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57776           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57777           4 :   double arg1 ;
   57778           4 :   double val1 ;
   57779           4 :   int ecode1 = 0 ;
   57780           4 :   PyObject *swig_obj[1] ;
   57781           4 :   double result;
   57782             :   
   57783           4 :   if (!args) SWIG_fail;
   57784           4 :   swig_obj[0] = args;
   57785           4 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   57786           4 :   if (!SWIG_IsOK(ecode1)) {
   57787           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "PackedDMSToDec" "', argument " "1"" of type '" "double""'");
   57788             :   } 
   57789           4 :   arg1 = static_cast< double >(val1);
   57790           4 :   {
   57791           4 :     const int bLocalUseExceptions = GetUseExceptions();
   57792           4 :     if ( bLocalUseExceptions ) {
   57793           4 :       pushErrorHandler();
   57794             :     }
   57795           4 :     {
   57796           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57797           4 :       result = (double)GDALPackedDMSToDec(arg1);
   57798           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57799             :     }
   57800           4 :     if ( bLocalUseExceptions ) {
   57801           4 :       popErrorHandler();
   57802             :     }
   57803             : #ifndef SED_HACKS
   57804             :     if ( bLocalUseExceptions ) {
   57805             :       CPLErr eclass = CPLGetLastErrorType();
   57806             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57807             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57808             :       }
   57809             :     }
   57810             : #endif
   57811             :   }
   57812           4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   57813           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; } }
   57814             :   return resultobj;
   57815             : fail:
   57816             :   return NULL;
   57817             : }
   57818             : 
   57819             : 
   57820           4 : SWIGINTERN PyObject *_wrap_DecToPackedDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57821           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57822           4 :   double arg1 ;
   57823           4 :   double val1 ;
   57824           4 :   int ecode1 = 0 ;
   57825           4 :   PyObject *swig_obj[1] ;
   57826           4 :   double result;
   57827             :   
   57828           4 :   if (!args) SWIG_fail;
   57829           4 :   swig_obj[0] = args;
   57830           4 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   57831           4 :   if (!SWIG_IsOK(ecode1)) {
   57832           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToPackedDMS" "', argument " "1"" of type '" "double""'");
   57833             :   } 
   57834           4 :   arg1 = static_cast< double >(val1);
   57835           4 :   {
   57836           4 :     const int bLocalUseExceptions = GetUseExceptions();
   57837           4 :     if ( bLocalUseExceptions ) {
   57838           4 :       pushErrorHandler();
   57839             :     }
   57840           4 :     {
   57841           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57842           4 :       result = (double)GDALDecToPackedDMS(arg1);
   57843           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57844             :     }
   57845           4 :     if ( bLocalUseExceptions ) {
   57846           4 :       popErrorHandler();
   57847             :     }
   57848             : #ifndef SED_HACKS
   57849             :     if ( bLocalUseExceptions ) {
   57850             :       CPLErr eclass = CPLGetLastErrorType();
   57851             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57852             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57853             :       }
   57854             :     }
   57855             : #endif
   57856             :   }
   57857           4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   57858           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; } }
   57859             :   return resultobj;
   57860             : fail:
   57861             :   return NULL;
   57862             : }
   57863             : 
   57864             : 
   57865          49 : SWIGINTERN PyObject *_wrap_ParseXMLString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57866          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57867          49 :   char *arg1 = (char *) 0 ;
   57868          49 :   int res1 ;
   57869          49 :   char *buf1 = 0 ;
   57870          49 :   int alloc1 = 0 ;
   57871          49 :   PyObject *swig_obj[1] ;
   57872          49 :   CPLXMLNode *result = 0 ;
   57873             :   
   57874          49 :   if (!args) SWIG_fail;
   57875          49 :   swig_obj[0] = args;
   57876          49 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   57877          49 :   if (!SWIG_IsOK(res1)) {
   57878           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseXMLString" "', argument " "1"" of type '" "char *""'");
   57879             :   }
   57880          49 :   arg1 = reinterpret_cast< char * >(buf1);
   57881          49 :   {
   57882          49 :     const int bLocalUseExceptions = GetUseExceptions();
   57883          49 :     if ( bLocalUseExceptions ) {
   57884          24 :       pushErrorHandler();
   57885             :     }
   57886          49 :     {
   57887          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57888          49 :       result = (CPLXMLNode *)CPLParseXMLString(arg1);
   57889          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57890             :     }
   57891          49 :     if ( bLocalUseExceptions ) {
   57892          24 :       popErrorHandler();
   57893             :     }
   57894             : #ifndef SED_HACKS
   57895             :     if ( bLocalUseExceptions ) {
   57896             :       CPLErr eclass = CPLGetLastErrorType();
   57897             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57898             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57899             :       }
   57900             :     }
   57901             : #endif
   57902             :   }
   57903          49 :   {
   57904             :     /* %typemap(out) (CPLXMLNode*) */
   57905             :     
   57906          49 :     CPLXMLNode *psXMLTree = result;
   57907          49 :     int         bFakeRoot = FALSE;
   57908             :     
   57909          49 :     if( psXMLTree != NULL && psXMLTree->psNext != NULL )
   57910             :     {
   57911           3 :       CPLXMLNode *psFirst = psXMLTree;
   57912             :       
   57913             :       /* create a "pseudo" root if we have multiple elements */
   57914           3 :       psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
   57915           3 :       psXMLTree->psChild = psFirst;
   57916           3 :       bFakeRoot = TRUE;
   57917             :     }
   57918             :     
   57919          49 :     resultobj = XMLTreeToPyList( psXMLTree );
   57920             :     
   57921          49 :     if( bFakeRoot )
   57922             :     {
   57923           3 :       psXMLTree->psChild = NULL;
   57924           3 :       CPLDestroyXMLNode( psXMLTree );
   57925             :     }
   57926             :   }
   57927          49 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57928          49 :   {
   57929             :     /* %typemap(ret) (CPLXMLNode*) */
   57930          49 :     if ( result ) CPLDestroyXMLNode( result );
   57931             :   }
   57932          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; } }
   57933             :   return resultobj;
   57934           0 : fail:
   57935           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57936             :   return NULL;
   57937             : }
   57938             : 
   57939             : 
   57940          13 : SWIGINTERN PyObject *_wrap_SerializeXMLTree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57941          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57942          13 :   CPLXMLNode *arg1 = (CPLXMLNode *) 0 ;
   57943          13 :   PyObject *swig_obj[1] ;
   57944          13 :   retStringAndCPLFree *result = 0 ;
   57945             :   
   57946          13 :   if (!args) SWIG_fail;
   57947          13 :   swig_obj[0] = args;
   57948          13 :   {
   57949             :     /* %typemap(python,in) (CPLXMLNode* xmlnode ) */
   57950          13 :     arg1 = PyListToXMLTree( swig_obj[0] );
   57951          13 :     if ( !arg1 ) SWIG_fail;
   57952             :   }
   57953          13 :   {
   57954          13 :     const int bLocalUseExceptions = GetUseExceptions();
   57955          13 :     if ( bLocalUseExceptions ) {
   57956           3 :       pushErrorHandler();
   57957             :     }
   57958          13 :     {
   57959          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57960          13 :       result = (retStringAndCPLFree *)CPLSerializeXMLTree(arg1);
   57961          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57962             :     }
   57963          13 :     if ( bLocalUseExceptions ) {
   57964           3 :       popErrorHandler();
   57965             :     }
   57966             : #ifndef SED_HACKS
   57967             :     if ( bLocalUseExceptions ) {
   57968             :       CPLErr eclass = CPLGetLastErrorType();
   57969             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57970             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57971             :       }
   57972             :     }
   57973             : #endif
   57974             :   }
   57975          13 :   {
   57976             :     /* %typemap(out) (retStringAndCPLFree*) */
   57977          13 :     Py_XDECREF(resultobj);
   57978          13 :     if(result)
   57979             :     {
   57980          13 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   57981          13 :       CPLFree(result);
   57982             :     }
   57983             :     else
   57984             :     {
   57985           0 :       resultobj = Py_None;
   57986           0 :       Py_INCREF(resultobj);
   57987             :     }
   57988             :   }
   57989          13 :   {
   57990             :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   57991          13 :     CPLDestroyXMLNode( arg1 );
   57992             :   }
   57993          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; } }
   57994             :   return resultobj;
   57995           0 : fail:
   57996           0 :   {
   57997             :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   57998           0 :     CPLDestroyXMLNode( arg1 );
   57999             :   }
   58000             :   return NULL;
   58001             : }
   58002             : 
   58003             : 
   58004          30 : SWIGINTERN PyObject *_wrap_GetJPEG2000Structure(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58005          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58006          30 :   char *arg1 = (char *) 0 ;
   58007          30 :   char **arg2 = (char **) NULL ;
   58008          30 :   int res1 ;
   58009          30 :   char *buf1 = 0 ;
   58010          30 :   int alloc1 = 0 ;
   58011          30 :   PyObject *swig_obj[2] ;
   58012          30 :   CPLXMLNode *result = 0 ;
   58013             :   
   58014          30 :   if (!SWIG_Python_UnpackTuple(args, "GetJPEG2000Structure", 1, 2, swig_obj)) SWIG_fail;
   58015          30 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   58016          30 :   if (!SWIG_IsOK(res1)) {
   58017           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetJPEG2000Structure" "', argument " "1"" of type '" "char const *""'");
   58018             :   }
   58019          30 :   arg1 = reinterpret_cast< char * >(buf1);
   58020          30 :   if (swig_obj[1]) {
   58021          30 :     {
   58022             :       /* %typemap(in) char **dict */
   58023          30 :       arg2 = NULL;
   58024          30 :       if ( PySequence_Check( swig_obj[1] ) ) {
   58025          30 :         int bErr = FALSE;
   58026          30 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   58027          30 :         if ( bErr )
   58028             :         {
   58029           0 :           SWIG_fail;
   58030             :         }
   58031             :       }
   58032           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   58033           0 :         int bErr = FALSE;
   58034           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   58035           0 :         if ( bErr )
   58036             :         {
   58037           0 :           SWIG_fail;
   58038             :         }
   58039             :       }
   58040             :       else {
   58041           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58042           0 :         SWIG_fail;
   58043             :       }
   58044             :     }
   58045             :   }
   58046          30 :   {
   58047          30 :     const int bLocalUseExceptions = GetUseExceptions();
   58048          30 :     if ( bLocalUseExceptions ) {
   58049           0 :       pushErrorHandler();
   58050             :     }
   58051          30 :     {
   58052          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58053          30 :       result = (CPLXMLNode *)GDALGetJPEG2000Structure((char const *)arg1,arg2);
   58054          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58055             :     }
   58056          30 :     if ( bLocalUseExceptions ) {
   58057           0 :       popErrorHandler();
   58058             :     }
   58059             : #ifndef SED_HACKS
   58060             :     if ( bLocalUseExceptions ) {
   58061             :       CPLErr eclass = CPLGetLastErrorType();
   58062             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58063             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58064             :       }
   58065             :     }
   58066             : #endif
   58067             :   }
   58068          30 :   {
   58069             :     /* %typemap(out) (CPLXMLNode*) */
   58070             :     
   58071          30 :     CPLXMLNode *psXMLTree = result;
   58072          30 :     int         bFakeRoot = FALSE;
   58073             :     
   58074          30 :     if( psXMLTree != NULL && psXMLTree->psNext != NULL )
   58075             :     {
   58076           0 :       CPLXMLNode *psFirst = psXMLTree;
   58077             :       
   58078             :       /* create a "pseudo" root if we have multiple elements */
   58079           0 :       psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
   58080           0 :       psXMLTree->psChild = psFirst;
   58081           0 :       bFakeRoot = TRUE;
   58082             :     }
   58083             :     
   58084          30 :     resultobj = XMLTreeToPyList( psXMLTree );
   58085             :     
   58086          30 :     if( bFakeRoot )
   58087             :     {
   58088           0 :       psXMLTree->psChild = NULL;
   58089           0 :       CPLDestroyXMLNode( psXMLTree );
   58090             :     }
   58091             :   }
   58092          30 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   58093          30 :   {
   58094             :     /* %typemap(freearg) char **dict */
   58095          30 :     CSLDestroy( arg2 );
   58096             :   }
   58097          30 :   {
   58098             :     /* %typemap(ret) (CPLXMLNode*) */
   58099          30 :     if ( result ) CPLDestroyXMLNode( result );
   58100             :   }
   58101          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; } }
   58102             :   return resultobj;
   58103           0 : fail:
   58104           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   58105           0 :   {
   58106             :     /* %typemap(freearg) char **dict */
   58107           0 :     CSLDestroy( arg2 );
   58108             :   }
   58109             :   return NULL;
   58110             : }
   58111             : 
   58112             : 
   58113           9 : SWIGINTERN PyObject *_wrap_GetJPEG2000StructureAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58114           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58115           9 :   char *arg1 = (char *) 0 ;
   58116           9 :   char **arg2 = (char **) NULL ;
   58117           9 :   int res1 ;
   58118           9 :   char *buf1 = 0 ;
   58119           9 :   int alloc1 = 0 ;
   58120           9 :   PyObject *swig_obj[2] ;
   58121           9 :   retStringAndCPLFree *result = 0 ;
   58122             :   
   58123           9 :   if (!SWIG_Python_UnpackTuple(args, "GetJPEG2000StructureAsString", 1, 2, swig_obj)) SWIG_fail;
   58124           9 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   58125           9 :   if (!SWIG_IsOK(res1)) {
   58126           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetJPEG2000StructureAsString" "', argument " "1"" of type '" "char const *""'");
   58127             :   }
   58128           9 :   arg1 = reinterpret_cast< char * >(buf1);
   58129           9 :   if (swig_obj[1]) {
   58130           9 :     {
   58131             :       /* %typemap(in) char **dict */
   58132           9 :       arg2 = NULL;
   58133           9 :       if ( PySequence_Check( swig_obj[1] ) ) {
   58134           9 :         int bErr = FALSE;
   58135           9 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   58136           9 :         if ( bErr )
   58137             :         {
   58138           0 :           SWIG_fail;
   58139             :         }
   58140             :       }
   58141           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   58142           0 :         int bErr = FALSE;
   58143           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   58144           0 :         if ( bErr )
   58145             :         {
   58146           0 :           SWIG_fail;
   58147             :         }
   58148             :       }
   58149             :       else {
   58150           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58151           0 :         SWIG_fail;
   58152             :       }
   58153             :     }
   58154             :   }
   58155           9 :   {
   58156           9 :     const int bLocalUseExceptions = GetUseExceptions();
   58157           9 :     if ( bLocalUseExceptions ) {
   58158           5 :       pushErrorHandler();
   58159             :     }
   58160           9 :     {
   58161           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58162           9 :       result = (retStringAndCPLFree *)GetJPEG2000StructureAsString((char const *)arg1,arg2);
   58163           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58164             :     }
   58165           9 :     if ( bLocalUseExceptions ) {
   58166           5 :       popErrorHandler();
   58167             :     }
   58168             : #ifndef SED_HACKS
   58169             :     if ( bLocalUseExceptions ) {
   58170             :       CPLErr eclass = CPLGetLastErrorType();
   58171             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58172             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58173             :       }
   58174             :     }
   58175             : #endif
   58176             :   }
   58177           9 :   {
   58178             :     /* %typemap(out) (retStringAndCPLFree*) */
   58179           9 :     Py_XDECREF(resultobj);
   58180           9 :     if(result)
   58181             :     {
   58182           9 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   58183           9 :       CPLFree(result);
   58184             :     }
   58185             :     else
   58186             :     {
   58187           0 :       resultobj = Py_None;
   58188           0 :       Py_INCREF(resultobj);
   58189             :     }
   58190             :   }
   58191           9 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   58192           9 :   {
   58193             :     /* %typemap(freearg) char **dict */
   58194           9 :     CSLDestroy( arg2 );
   58195             :   }
   58196          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; } }
   58197             :   return resultobj;
   58198           0 : fail:
   58199           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   58200           0 :   {
   58201             :     /* %typemap(freearg) char **dict */
   58202           0 :     CSLDestroy( arg2 );
   58203             :   }
   58204             :   return NULL;
   58205             : }
   58206             : 
   58207             : 
   58208           6 : SWIGINTERN PyObject *_wrap_HasTriangulation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58209           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58210           6 :   int result;
   58211             :   
   58212           6 :   if (!SWIG_Python_UnpackTuple(args, "HasTriangulation", 0, 0, 0)) SWIG_fail;
   58213           6 :   {
   58214           6 :     const int bLocalUseExceptions = GetUseExceptions();
   58215           6 :     if ( bLocalUseExceptions ) {
   58216           6 :       pushErrorHandler();
   58217             :     }
   58218           6 :     {
   58219           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58220           6 :       result = (int)GDALHasTriangulation();
   58221           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58222             :     }
   58223           6 :     if ( bLocalUseExceptions ) {
   58224           6 :       popErrorHandler();
   58225             :     }
   58226             : #ifndef SED_HACKS
   58227             :     if ( bLocalUseExceptions ) {
   58228             :       CPLErr eclass = CPLGetLastErrorType();
   58229             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58230             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58231             :       }
   58232             :     }
   58233             : #endif
   58234             :   }
   58235           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   58236           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; } }
   58237             :   return resultobj;
   58238           0 : fail:
   58239           0 :   return NULL;
   58240             : }
   58241             : 
   58242             : 
   58243         373 : SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58244         373 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58245         373 :   int result;
   58246             :   
   58247         373 :   if (!SWIG_Python_UnpackTuple(args, "GetDriverCount", 0, 0, 0)) SWIG_fail;
   58248         373 :   {
   58249         373 :     const int bLocalUseExceptions = GetUseExceptions();
   58250         373 :     if ( bLocalUseExceptions ) {
   58251         303 :       pushErrorHandler();
   58252             :     }
   58253         373 :     {
   58254         373 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58255         373 :       result = (int)GetDriverCount();
   58256         373 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58257             :     }
   58258         373 :     if ( bLocalUseExceptions ) {
   58259         303 :       popErrorHandler();
   58260             :     }
   58261             : #ifndef SED_HACKS
   58262             :     if ( bLocalUseExceptions ) {
   58263             :       CPLErr eclass = CPLGetLastErrorType();
   58264             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58265             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58266             :       }
   58267             :     }
   58268             : #endif
   58269             :   }
   58270         373 :   resultobj = SWIG_From_int(static_cast< int >(result));
   58271         373 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58272             :   return resultobj;
   58273           0 : fail:
   58274           0 :   return NULL;
   58275             : }
   58276             : 
   58277             : 
   58278       15840 : SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58279       15840 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58280       15840 :   char *arg1 = (char *) 0 ;
   58281       15840 :   int res1 ;
   58282       15840 :   char *buf1 = 0 ;
   58283       15840 :   int alloc1 = 0 ;
   58284       15840 :   PyObject *swig_obj[1] ;
   58285       15840 :   GDALDriverShadow *result = 0 ;
   58286             :   
   58287       15840 :   if (!args) SWIG_fail;
   58288       15840 :   swig_obj[0] = args;
   58289       15840 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   58290       15840 :   if (!SWIG_IsOK(res1)) {
   58291           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
   58292             :   }
   58293       15840 :   arg1 = reinterpret_cast< char * >(buf1);
   58294       15840 :   {
   58295       15840 :     if (!arg1) {
   58296           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58297             :     }
   58298             :   }
   58299       15840 :   {
   58300       15840 :     const int bLocalUseExceptions = GetUseExceptions();
   58301       15840 :     if ( bLocalUseExceptions ) {
   58302        9726 :       pushErrorHandler();
   58303             :     }
   58304       15840 :     {
   58305       15840 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58306       15840 :       result = (GDALDriverShadow *)GetDriverByName((char const *)arg1);
   58307       15840 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58308             :     }
   58309       15840 :     if ( bLocalUseExceptions ) {
   58310        9726 :       popErrorHandler();
   58311             :     }
   58312             : #ifndef SED_HACKS
   58313             :     if ( bLocalUseExceptions ) {
   58314             :       CPLErr eclass = CPLGetLastErrorType();
   58315             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58316             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58317             :       }
   58318             :     }
   58319             : #endif
   58320             :   }
   58321       15840 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   58322       15840 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   58323       15840 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58324             :   return resultobj;
   58325           0 : fail:
   58326           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   58327             :   return NULL;
   58328             : }
   58329             : 
   58330             : 
   58331       82225 : SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58332       82225 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58333       82225 :   int arg1 ;
   58334       82225 :   int val1 ;
   58335       82225 :   int ecode1 = 0 ;
   58336       82225 :   PyObject *swig_obj[1] ;
   58337       82225 :   GDALDriverShadow *result = 0 ;
   58338             :   
   58339       82225 :   if (!args) SWIG_fail;
   58340       82225 :   swig_obj[0] = args;
   58341       82225 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   58342       82225 :   if (!SWIG_IsOK(ecode1)) {
   58343           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
   58344             :   } 
   58345       82225 :   arg1 = static_cast< int >(val1);
   58346       82225 :   {
   58347       82225 :     const int bLocalUseExceptions = GetUseExceptions();
   58348       82225 :     if ( bLocalUseExceptions ) {
   58349       67618 :       pushErrorHandler();
   58350             :     }
   58351       82225 :     {
   58352       82225 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58353       82225 :       result = (GDALDriverShadow *)GetDriver(arg1);
   58354       82225 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58355             :     }
   58356       82225 :     if ( bLocalUseExceptions ) {
   58357       67618 :       popErrorHandler();
   58358             :     }
   58359             : #ifndef SED_HACKS
   58360             :     if ( bLocalUseExceptions ) {
   58361             :       CPLErr eclass = CPLGetLastErrorType();
   58362             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58363             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58364             :       }
   58365             :     }
   58366             : #endif
   58367             :   }
   58368       82225 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   58369       82225 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58370             :   return resultobj;
   58371             : fail:
   58372             :   return NULL;
   58373             : }
   58374             : 
   58375             : 
   58376       23374 : SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58377       23374 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58378       23374 :   char *arg1 = (char *) 0 ;
   58379       23374 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   58380       23374 :   int bToFree1 = 0 ;
   58381       23374 :   PyObject *swig_obj[2] ;
   58382       23374 :   GDALDatasetShadow *result = 0 ;
   58383             :   
   58384       23374 :   if (!SWIG_Python_UnpackTuple(args, "Open", 1, 2, swig_obj)) SWIG_fail;
   58385       23374 :   {
   58386             :     /* %typemap(in) (const char *utf8_path) */
   58387       23374 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   58388             :     {
   58389       22658 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   58390             :     }
   58391             :     else
   58392             :     {
   58393         716 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   58394             :       
   58395             :     }
   58396       23374 :     if (arg1 == NULL)
   58397             :     {
   58398           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58399           1 :       SWIG_fail;
   58400             :     }
   58401             :   }
   58402       23373 :   if (swig_obj[1]) {
   58403        1514 :     {
   58404             :       // %typemap(in) GDALAccess
   58405        1514 :       int val = 0;
   58406        1514 :       int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   58407        1514 :       if (!SWIG_IsOK(ecode)) {
   58408           1 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALAccess");
   58409             :       }
   58410        1513 :       if( val != GA_ReadOnly && val != GA_Update )
   58411             :       {
   58412           1 :         SWIG_exception_fail(SWIG_ValueError, "invalid value for GDALAccess");
   58413             :       }
   58414             :       arg2 = static_cast<GDALAccess>(val);
   58415             :     }
   58416             :   }
   58417       23371 :   {
   58418       23371 :     if (!arg1) {
   58419       23371 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58420             :     }
   58421             :   }
   58422       23371 :   {
   58423       23371 :     const int bLocalUseExceptions = GetUseExceptions();
   58424       23371 :     if ( bLocalUseExceptions ) {
   58425       11567 :       pushErrorHandler();
   58426             :     }
   58427       23371 :     {
   58428       23371 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58429       23371 :       result = (GDALDatasetShadow *)Open((char const *)arg1,arg2);
   58430       23371 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58431             :     }
   58432       23371 :     if ( bLocalUseExceptions ) {
   58433       11567 :       popErrorHandler();
   58434             :     }
   58435             : #ifndef SED_HACKS
   58436             :     if( result == NULL && bLocalUseExceptions ) {
   58437             :       CPLErr eclass = CPLGetLastErrorType();
   58438             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58439             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58440             :       }
   58441             :     }
   58442             : #endif
   58443       23371 :     if( result != NULL && bLocalUseExceptions ) {
   58444             : #ifdef SED_HACKS
   58445       11276 :       bLocalUseExceptionsCode = FALSE;
   58446             : #endif
   58447             :     }
   58448             :   }
   58449       23371 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   58450       23371 :   {
   58451             :     /* %typemap(freearg) (const char *utf8_path) */
   58452       23371 :     GDALPythonFreeCStr(arg1, bToFree1);
   58453             :   }
   58454       23951 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58455             :   return resultobj;
   58456           3 : fail:
   58457           3 :   {
   58458             :     /* %typemap(freearg) (const char *utf8_path) */
   58459       23376 :     GDALPythonFreeCStr(arg1, bToFree1);
   58460             :   }
   58461             :   return NULL;
   58462             : }
   58463             : 
   58464             : 
   58465        6611 : SWIGINTERN PyObject *_wrap_OpenEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   58466        6611 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58467        6611 :   char *arg1 = (char *) 0 ;
   58468        6611 :   unsigned int arg2 = (unsigned int) 0 ;
   58469        6611 :   char **arg3 = (char **) NULL ;
   58470        6611 :   char **arg4 = (char **) NULL ;
   58471        6611 :   char **arg5 = (char **) NULL ;
   58472        6611 :   int bToFree1 = 0 ;
   58473        6611 :   unsigned int val2 ;
   58474        6611 :   int ecode2 = 0 ;
   58475        6611 :   PyObject * obj0 = 0 ;
   58476        6611 :   PyObject * obj1 = 0 ;
   58477        6611 :   PyObject * obj2 = 0 ;
   58478        6611 :   PyObject * obj3 = 0 ;
   58479        6611 :   PyObject * obj4 = 0 ;
   58480        6611 :   char * kwnames[] = {
   58481             :     (char *)"utf8_path",  (char *)"nOpenFlags",  (char *)"allowed_drivers",  (char *)"open_options",  (char *)"sibling_files",  NULL 
   58482             :   };
   58483        6611 :   GDALDatasetShadow *result = 0 ;
   58484             :   
   58485        6611 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:OpenEx", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   58486        6611 :   {
   58487             :     /* %typemap(in) (const char *utf8_path) */
   58488        6611 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   58489             :     {
   58490        5850 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   58491             :     }
   58492             :     else
   58493             :     {
   58494         761 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   58495             :       
   58496             :     }
   58497        6611 :     if (arg1 == NULL)
   58498             :     {
   58499           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58500           0 :       SWIG_fail;
   58501             :     }
   58502             :   }
   58503        6611 :   if (obj1) {
   58504        3900 :     ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
   58505        3900 :     if (!SWIG_IsOK(ecode2)) {
   58506           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenEx" "', argument " "2"" of type '" "unsigned int""'");
   58507             :     } 
   58508             :     arg2 = static_cast< unsigned int >(val2);
   58509             :   }
   58510        6611 :   if (obj2) {
   58511        1998 :     {
   58512             :       /* %typemap(in) char **dict */
   58513        1998 :       arg3 = NULL;
   58514        1998 :       if ( PySequence_Check( obj2 ) ) {
   58515        1998 :         int bErr = FALSE;
   58516        1998 :         arg3 = CSLFromPySequence(obj2, &bErr);
   58517        1998 :         if ( bErr )
   58518             :         {
   58519           0 :           SWIG_fail;
   58520             :         }
   58521             :       }
   58522           0 :       else if ( PyMapping_Check( obj2 ) ) {
   58523           0 :         int bErr = FALSE;
   58524           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   58525           0 :         if ( bErr )
   58526             :         {
   58527           0 :           SWIG_fail;
   58528             :         }
   58529             :       }
   58530             :       else {
   58531           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58532           0 :         SWIG_fail;
   58533             :       }
   58534             :     }
   58535             :   }
   58536        6611 :   if (obj3) {
   58537        2603 :     {
   58538             :       /* %typemap(in) char **dict */
   58539        2603 :       arg4 = NULL;
   58540        2603 :       if ( PySequence_Check( obj3 ) ) {
   58541        2419 :         int bErr = FALSE;
   58542        2419 :         arg4 = CSLFromPySequence(obj3, &bErr);
   58543        2419 :         if ( bErr )
   58544             :         {
   58545           0 :           SWIG_fail;
   58546             :         }
   58547             :       }
   58548         184 :       else if ( PyMapping_Check( obj3 ) ) {
   58549         184 :         int bErr = FALSE;
   58550         184 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   58551         184 :         if ( bErr )
   58552             :         {
   58553           0 :           SWIG_fail;
   58554             :         }
   58555             :       }
   58556             :       else {
   58557           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58558           0 :         SWIG_fail;
   58559             :       }
   58560             :     }
   58561             :   }
   58562        6611 :   if (obj4) {
   58563           0 :     {
   58564             :       /* %typemap(in) char **dict */
   58565           0 :       arg5 = NULL;
   58566           0 :       if ( PySequence_Check( obj4 ) ) {
   58567           0 :         int bErr = FALSE;
   58568           0 :         arg5 = CSLFromPySequence(obj4, &bErr);
   58569           0 :         if ( bErr )
   58570             :         {
   58571           0 :           SWIG_fail;
   58572             :         }
   58573             :       }
   58574           0 :       else if ( PyMapping_Check( obj4 ) ) {
   58575           0 :         int bErr = FALSE;
   58576           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   58577           0 :         if ( bErr )
   58578             :         {
   58579           0 :           SWIG_fail;
   58580             :         }
   58581             :       }
   58582             :       else {
   58583           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58584           0 :         SWIG_fail;
   58585             :       }
   58586             :     }
   58587             :   }
   58588        6611 :   {
   58589        6611 :     if (!arg1) {
   58590        6611 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58591             :     }
   58592             :   }
   58593        6611 :   {
   58594        6611 :     const int bLocalUseExceptions = GetUseExceptions();
   58595        6611 :     if ( bLocalUseExceptions ) {
   58596        2977 :       pushErrorHandler();
   58597             :     }
   58598        6611 :     {
   58599        6611 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58600        6611 :       result = (GDALDatasetShadow *)OpenEx((char const *)arg1,arg2,arg3,arg4,arg5);
   58601        6611 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58602             :     }
   58603        6611 :     if ( bLocalUseExceptions ) {
   58604        2977 :       popErrorHandler();
   58605             :     }
   58606             : #ifndef SED_HACKS
   58607             :     if( result == NULL && bLocalUseExceptions ) {
   58608             :       CPLErr eclass = CPLGetLastErrorType();
   58609             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58610             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58611             :       }
   58612             :     }
   58613             : #endif
   58614        6611 :     if( result != NULL && bLocalUseExceptions ) {
   58615             : #ifdef SED_HACKS
   58616        2595 :       bLocalUseExceptionsCode = FALSE;
   58617             : #endif
   58618             :     }
   58619             :   }
   58620        6611 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   58621        6611 :   {
   58622             :     /* %typemap(freearg) (const char *utf8_path) */
   58623        6611 :     GDALPythonFreeCStr(arg1, bToFree1);
   58624             :   }
   58625        6611 :   {
   58626             :     /* %typemap(freearg) char **dict */
   58627        6611 :     CSLDestroy( arg3 );
   58628             :   }
   58629        6611 :   {
   58630             :     /* %typemap(freearg) char **dict */
   58631        6611 :     CSLDestroy( arg4 );
   58632             :   }
   58633        6611 :   {
   58634             :     /* %typemap(freearg) char **dict */
   58635        6611 :     CSLDestroy( arg5 );
   58636             :   }
   58637        7375 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58638             :   return resultobj;
   58639           0 : fail:
   58640           0 :   {
   58641             :     /* %typemap(freearg) (const char *utf8_path) */
   58642           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   58643             :   }
   58644           0 :   {
   58645             :     /* %typemap(freearg) char **dict */
   58646           0 :     CSLDestroy( arg3 );
   58647             :   }
   58648           0 :   {
   58649             :     /* %typemap(freearg) char **dict */
   58650           0 :     CSLDestroy( arg4 );
   58651             :   }
   58652           0 :   {
   58653             :     /* %typemap(freearg) char **dict */
   58654           0 :     CSLDestroy( arg5 );
   58655             :   }
   58656             :   return NULL;
   58657             : }
   58658             : 
   58659             : 
   58660        5053 : SWIGINTERN PyObject *_wrap_OpenShared(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58661        5053 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58662        5053 :   char *arg1 = (char *) 0 ;
   58663        5053 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   58664        5053 :   int bToFree1 = 0 ;
   58665        5053 :   PyObject *swig_obj[2] ;
   58666        5053 :   GDALDatasetShadow *result = 0 ;
   58667             :   
   58668        5053 :   if (!SWIG_Python_UnpackTuple(args, "OpenShared", 1, 2, swig_obj)) SWIG_fail;
   58669        5053 :   {
   58670             :     /* %typemap(in) (const char *utf8_path) */
   58671        5053 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   58672             :     {
   58673        5053 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   58674             :     }
   58675             :     else
   58676             :     {
   58677           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   58678             :       
   58679             :     }
   58680        5053 :     if (arg1 == NULL)
   58681             :     {
   58682           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58683           0 :       SWIG_fail;
   58684             :     }
   58685             :   }
   58686        5053 :   if (swig_obj[1]) {
   58687          50 :     {
   58688             :       // %typemap(in) GDALAccess
   58689          50 :       int val = 0;
   58690          50 :       int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   58691          50 :       if (!SWIG_IsOK(ecode)) {
   58692           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALAccess");
   58693             :       }
   58694          50 :       if( val != GA_ReadOnly && val != GA_Update )
   58695             :       {
   58696           0 :         SWIG_exception_fail(SWIG_ValueError, "invalid value for GDALAccess");
   58697             :       }
   58698             :       arg2 = static_cast<GDALAccess>(val);
   58699             :     }
   58700             :   }
   58701        5053 :   {
   58702        5053 :     if (!arg1) {
   58703        5053 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58704             :     }
   58705             :   }
   58706        5053 :   {
   58707        5053 :     const int bLocalUseExceptions = GetUseExceptions();
   58708        5053 :     if ( bLocalUseExceptions ) {
   58709          51 :       pushErrorHandler();
   58710             :     }
   58711        5053 :     {
   58712        5053 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58713        5053 :       result = (GDALDatasetShadow *)OpenShared((char const *)arg1,arg2);
   58714        5053 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58715             :     }
   58716        5053 :     if ( bLocalUseExceptions ) {
   58717          51 :       popErrorHandler();
   58718             :     }
   58719             : #ifndef SED_HACKS
   58720             :     if( result == NULL && bLocalUseExceptions ) {
   58721             :       CPLErr eclass = CPLGetLastErrorType();
   58722             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58723             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58724             :       }
   58725             :     }
   58726             : #endif
   58727        5053 :     if( result != NULL && bLocalUseExceptions ) {
   58728             : #ifdef SED_HACKS
   58729          51 :       bLocalUseExceptionsCode = FALSE;
   58730             : #endif
   58731             :     }
   58732             :   }
   58733        5053 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   58734        5053 :   {
   58735             :     /* %typemap(freearg) (const char *utf8_path) */
   58736        5053 :     GDALPythonFreeCStr(arg1, bToFree1);
   58737             :   }
   58738        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; } }
   58739             :   return resultobj;
   58740           0 : fail:
   58741           0 :   {
   58742             :     /* %typemap(freearg) (const char *utf8_path) */
   58743        5053 :     GDALPythonFreeCStr(arg1, bToFree1);
   58744             :   }
   58745             :   return NULL;
   58746             : }
   58747             : 
   58748             : 
   58749          11 : SWIGINTERN PyObject *_wrap_IdentifyDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58750          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58751          11 :   char *arg1 = (char *) 0 ;
   58752          11 :   char **arg2 = (char **) NULL ;
   58753          11 :   int bToFree1 = 0 ;
   58754          11 :   PyObject *swig_obj[2] ;
   58755          11 :   GDALDriverShadow *result = 0 ;
   58756             :   
   58757          11 :   if (!SWIG_Python_UnpackTuple(args, "IdentifyDriver", 1, 2, swig_obj)) SWIG_fail;
   58758          11 :   {
   58759             :     /* %typemap(in) (const char *utf8_path) */
   58760          11 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   58761             :     {
   58762          11 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   58763             :     }
   58764             :     else
   58765             :     {
   58766           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   58767             :       
   58768             :     }
   58769          11 :     if (arg1 == NULL)
   58770             :     {
   58771           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58772           0 :       SWIG_fail;
   58773             :     }
   58774             :   }
   58775          11 :   if (swig_obj[1]) {
   58776           2 :     {
   58777             :       /* %typemap(in) char **dict */
   58778           2 :       arg2 = NULL;
   58779           2 :       if ( PySequence_Check( swig_obj[1] ) ) {
   58780           2 :         int bErr = FALSE;
   58781           2 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   58782           2 :         if ( bErr )
   58783             :         {
   58784           0 :           SWIG_fail;
   58785             :         }
   58786             :       }
   58787           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   58788           0 :         int bErr = FALSE;
   58789           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   58790           0 :         if ( bErr )
   58791             :         {
   58792           0 :           SWIG_fail;
   58793             :         }
   58794             :       }
   58795             :       else {
   58796           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58797           0 :         SWIG_fail;
   58798             :       }
   58799             :     }
   58800             :   }
   58801          11 :   {
   58802          11 :     if (!arg1) {
   58803          11 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58804             :     }
   58805             :   }
   58806          11 :   {
   58807          11 :     const int bLocalUseExceptions = GetUseExceptions();
   58808          11 :     if ( bLocalUseExceptions ) {
   58809           6 :       pushErrorHandler();
   58810             :     }
   58811          11 :     {
   58812          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58813          11 :       result = (GDALDriverShadow *)IdentifyDriver((char const *)arg1,arg2);
   58814          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58815             :     }
   58816          11 :     if ( bLocalUseExceptions ) {
   58817           6 :       popErrorHandler();
   58818             :     }
   58819             : #ifndef SED_HACKS
   58820             :     if ( bLocalUseExceptions ) {
   58821             :       CPLErr eclass = CPLGetLastErrorType();
   58822             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58823             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58824             :       }
   58825             :     }
   58826             : #endif
   58827             :   }
   58828          11 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   58829          11 :   {
   58830             :     /* %typemap(freearg) (const char *utf8_path) */
   58831          11 :     GDALPythonFreeCStr(arg1, bToFree1);
   58832             :   }
   58833          11 :   {
   58834             :     /* %typemap(freearg) char **dict */
   58835          11 :     CSLDestroy( arg2 );
   58836             :   }
   58837          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; } }
   58838             :   return resultobj;
   58839           0 : fail:
   58840           0 :   {
   58841             :     /* %typemap(freearg) (const char *utf8_path) */
   58842           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   58843             :   }
   58844           0 :   {
   58845             :     /* %typemap(freearg) char **dict */
   58846           0 :     CSLDestroy( arg2 );
   58847             :   }
   58848             :   return NULL;
   58849             : }
   58850             : 
   58851             : 
   58852          50 : SWIGINTERN PyObject *_wrap_IdentifyDriverEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   58853          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58854          50 :   char *arg1 = (char *) 0 ;
   58855          50 :   unsigned int arg2 = (unsigned int) 0 ;
   58856          50 :   char **arg3 = (char **) NULL ;
   58857          50 :   char **arg4 = (char **) NULL ;
   58858          50 :   int bToFree1 = 0 ;
   58859          50 :   unsigned int val2 ;
   58860          50 :   int ecode2 = 0 ;
   58861          50 :   PyObject * obj0 = 0 ;
   58862          50 :   PyObject * obj1 = 0 ;
   58863          50 :   PyObject * obj2 = 0 ;
   58864          50 :   PyObject * obj3 = 0 ;
   58865          50 :   char * kwnames[] = {
   58866             :     (char *)"utf8_path",  (char *)"nIdentifyFlags",  (char *)"allowed_drivers",  (char *)"sibling_files",  NULL 
   58867             :   };
   58868          50 :   GDALDriverShadow *result = 0 ;
   58869             :   
   58870          50 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOO:IdentifyDriverEx", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   58871          50 :   {
   58872             :     /* %typemap(in) (const char *utf8_path) */
   58873          50 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   58874             :     {
   58875          50 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   58876             :     }
   58877             :     else
   58878             :     {
   58879           0 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   58880             :       
   58881             :     }
   58882          50 :     if (arg1 == NULL)
   58883             :     {
   58884           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58885           0 :       SWIG_fail;
   58886             :     }
   58887             :   }
   58888          50 :   if (obj1) {
   58889           3 :     ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
   58890           3 :     if (!SWIG_IsOK(ecode2)) {
   58891           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IdentifyDriverEx" "', argument " "2"" of type '" "unsigned int""'");
   58892             :     } 
   58893             :     arg2 = static_cast< unsigned int >(val2);
   58894             :   }
   58895          50 :   if (obj2) {
   58896          41 :     {
   58897             :       /* %typemap(in) char **dict */
   58898          41 :       arg3 = NULL;
   58899          41 :       if ( PySequence_Check( obj2 ) ) {
   58900          41 :         int bErr = FALSE;
   58901          41 :         arg3 = CSLFromPySequence(obj2, &bErr);
   58902          41 :         if ( bErr )
   58903             :         {
   58904           0 :           SWIG_fail;
   58905             :         }
   58906             :       }
   58907           0 :       else if ( PyMapping_Check( obj2 ) ) {
   58908           0 :         int bErr = FALSE;
   58909           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   58910           0 :         if ( bErr )
   58911             :         {
   58912           0 :           SWIG_fail;
   58913             :         }
   58914             :       }
   58915             :       else {
   58916           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58917           0 :         SWIG_fail;
   58918             :       }
   58919             :     }
   58920             :   }
   58921          50 :   if (obj3) {
   58922           2 :     {
   58923             :       /* %typemap(in) char **dict */
   58924           2 :       arg4 = NULL;
   58925           2 :       if ( PySequence_Check( obj3 ) ) {
   58926           2 :         int bErr = FALSE;
   58927           2 :         arg4 = CSLFromPySequence(obj3, &bErr);
   58928           2 :         if ( bErr )
   58929             :         {
   58930           0 :           SWIG_fail;
   58931             :         }
   58932             :       }
   58933           0 :       else if ( PyMapping_Check( obj3 ) ) {
   58934           0 :         int bErr = FALSE;
   58935           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   58936           0 :         if ( bErr )
   58937             :         {
   58938           0 :           SWIG_fail;
   58939             :         }
   58940             :       }
   58941             :       else {
   58942           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58943           0 :         SWIG_fail;
   58944             :       }
   58945             :     }
   58946             :   }
   58947          50 :   {
   58948          50 :     if (!arg1) {
   58949          50 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58950             :     }
   58951             :   }
   58952          50 :   {
   58953          50 :     const int bLocalUseExceptions = GetUseExceptions();
   58954          50 :     if ( bLocalUseExceptions ) {
   58955          45 :       pushErrorHandler();
   58956             :     }
   58957          50 :     {
   58958          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58959          50 :       result = (GDALDriverShadow *)IdentifyDriverEx((char const *)arg1,arg2,arg3,arg4);
   58960          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58961             :     }
   58962          50 :     if ( bLocalUseExceptions ) {
   58963          45 :       popErrorHandler();
   58964             :     }
   58965             : #ifndef SED_HACKS
   58966             :     if ( bLocalUseExceptions ) {
   58967             :       CPLErr eclass = CPLGetLastErrorType();
   58968             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58969             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58970             :       }
   58971             :     }
   58972             : #endif
   58973             :   }
   58974          50 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   58975          50 :   {
   58976             :     /* %typemap(freearg) (const char *utf8_path) */
   58977          50 :     GDALPythonFreeCStr(arg1, bToFree1);
   58978             :   }
   58979          50 :   {
   58980             :     /* %typemap(freearg) char **dict */
   58981          50 :     CSLDestroy( arg3 );
   58982             :   }
   58983          50 :   {
   58984             :     /* %typemap(freearg) char **dict */
   58985          50 :     CSLDestroy( arg4 );
   58986             :   }
   58987          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; } }
   58988             :   return resultobj;
   58989           0 : fail:
   58990           0 :   {
   58991             :     /* %typemap(freearg) (const char *utf8_path) */
   58992           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   58993             :   }
   58994           0 :   {
   58995             :     /* %typemap(freearg) char **dict */
   58996           0 :     CSLDestroy( arg3 );
   58997             :   }
   58998           0 :   {
   58999             :     /* %typemap(freearg) char **dict */
   59000           0 :     CSLDestroy( arg4 );
   59001             :   }
   59002             :   return NULL;
   59003             : }
   59004             : 
   59005             : 
   59006         193 : SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59007         193 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59008         193 :   char **arg1 = (char **) 0 ;
   59009         193 :   int arg2 = (int) 0 ;
   59010         193 :   int val2 ;
   59011         193 :   int ecode2 = 0 ;
   59012         193 :   PyObject *swig_obj[2] ;
   59013         193 :   char **result = 0 ;
   59014             :   
   59015         193 :   if (!SWIG_Python_UnpackTuple(args, "GeneralCmdLineProcessor", 1, 2, swig_obj)) SWIG_fail;
   59016         193 :   {
   59017             :     /* %typemap(in) char **dict */
   59018         193 :     arg1 = NULL;
   59019         193 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59020         193 :       int bErr = FALSE;
   59021         193 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59022         193 :       if ( bErr )
   59023             :       {
   59024           0 :         SWIG_fail;
   59025             :       }
   59026             :     }
   59027           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59028           0 :       int bErr = FALSE;
   59029           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59030           0 :       if ( bErr )
   59031             :       {
   59032           0 :         SWIG_fail;
   59033             :       }
   59034             :     }
   59035             :     else {
   59036           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59037           0 :       SWIG_fail;
   59038             :     }
   59039             :   }
   59040         193 :   if (swig_obj[1]) {
   59041           0 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   59042           0 :     if (!SWIG_IsOK(ecode2)) {
   59043           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
   59044             :     } 
   59045             :     arg2 = static_cast< int >(val2);
   59046             :   }
   59047         193 :   {
   59048         193 :     const int bLocalUseExceptions = GetUseExceptions();
   59049         193 :     if ( bLocalUseExceptions ) {
   59050         104 :       pushErrorHandler();
   59051             :     }
   59052         193 :     {
   59053         193 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59054         193 :       result = (char **)GeneralCmdLineProcessor(arg1,arg2);
   59055         193 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59056             :     }
   59057         193 :     if ( bLocalUseExceptions ) {
   59058         104 :       popErrorHandler();
   59059             :     }
   59060             : #ifndef SED_HACKS
   59061             :     if ( bLocalUseExceptions ) {
   59062             :       CPLErr eclass = CPLGetLastErrorType();
   59063             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59064             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59065             :       }
   59066             :     }
   59067             : #endif
   59068             :   }
   59069         193 :   {
   59070             :     /* %typemap(out) char **CSL -> ( string ) */
   59071         193 :     bool bErr = false;
   59072         193 :     resultobj = CSLToList(result, &bErr);
   59073         193 :     CSLDestroy(result);
   59074         193 :     if( bErr ) {
   59075           0 :       SWIG_fail;
   59076             :     }
   59077             :   }
   59078         193 :   {
   59079             :     /* %typemap(freearg) char **dict */
   59080         193 :     CSLDestroy( arg1 );
   59081             :   }
   59082         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; } }
   59083             :   return resultobj;
   59084           0 : fail:
   59085           0 :   {
   59086             :     /* %typemap(freearg) char **dict */
   59087           0 :     CSLDestroy( arg1 );
   59088             :   }
   59089             :   return NULL;
   59090             : }
   59091             : 
   59092             : 
   59093          55 : SWIGINTERN PyObject *_wrap_new_GDALInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59094          55 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59095          55 :   char **arg1 = (char **) 0 ;
   59096          55 :   PyObject *swig_obj[1] ;
   59097          55 :   GDALInfoOptions *result = 0 ;
   59098             :   
   59099          55 :   if (!args) SWIG_fail;
   59100          55 :   swig_obj[0] = args;
   59101          55 :   {
   59102             :     /* %typemap(in) char **dict */
   59103          55 :     arg1 = NULL;
   59104          55 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59105          55 :       int bErr = FALSE;
   59106          55 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59107          55 :       if ( bErr )
   59108             :       {
   59109           0 :         SWIG_fail;
   59110             :       }
   59111             :     }
   59112           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59113           0 :       int bErr = FALSE;
   59114           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59115           0 :       if ( bErr )
   59116             :       {
   59117           0 :         SWIG_fail;
   59118             :       }
   59119             :     }
   59120             :     else {
   59121           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59122           0 :       SWIG_fail;
   59123             :     }
   59124             :   }
   59125          55 :   {
   59126          55 :     const int bLocalUseExceptions = GetUseExceptions();
   59127          55 :     if ( bLocalUseExceptions ) {
   59128          48 :       pushErrorHandler();
   59129             :     }
   59130          55 :     {
   59131          55 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59132          55 :       result = (GDALInfoOptions *)new_GDALInfoOptions(arg1);
   59133          55 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59134             :     }
   59135          55 :     if ( bLocalUseExceptions ) {
   59136          48 :       popErrorHandler();
   59137             :     }
   59138             : #ifndef SED_HACKS
   59139             :     if ( bLocalUseExceptions ) {
   59140             :       CPLErr eclass = CPLGetLastErrorType();
   59141             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59142             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59143             :       }
   59144             :     }
   59145             : #endif
   59146             :   }
   59147          55 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALInfoOptions, SWIG_POINTER_NEW |  0 );
   59148          55 :   {
   59149             :     /* %typemap(freearg) char **dict */
   59150          55 :     CSLDestroy( arg1 );
   59151             :   }
   59152          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; } }
   59153             :   return resultobj;
   59154           0 : fail:
   59155           0 :   {
   59156             :     /* %typemap(freearg) char **dict */
   59157           0 :     CSLDestroy( arg1 );
   59158             :   }
   59159             :   return NULL;
   59160             : }
   59161             : 
   59162             : 
   59163          55 : SWIGINTERN PyObject *_wrap_delete_GDALInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59164          55 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59165          55 :   GDALInfoOptions *arg1 = (GDALInfoOptions *) 0 ;
   59166          55 :   void *argp1 = 0 ;
   59167          55 :   int res1 = 0 ;
   59168          55 :   PyObject *swig_obj[1] ;
   59169             :   
   59170          55 :   if (!args) SWIG_fail;
   59171          55 :   swig_obj[0] = args;
   59172          55 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALInfoOptions, SWIG_POINTER_DISOWN |  0 );
   59173          55 :   if (!SWIG_IsOK(res1)) {
   59174           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALInfoOptions" "', argument " "1"" of type '" "GDALInfoOptions *""'"); 
   59175             :   }
   59176          55 :   arg1 = reinterpret_cast< GDALInfoOptions * >(argp1);
   59177          55 :   {
   59178          55 :     const int bLocalUseExceptions = GetUseExceptions();
   59179          55 :     if ( bLocalUseExceptions ) {
   59180          48 :       pushErrorHandler();
   59181             :     }
   59182          55 :     {
   59183          55 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59184          55 :       delete_GDALInfoOptions(arg1);
   59185          55 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59186             :     }
   59187          55 :     if ( bLocalUseExceptions ) {
   59188          48 :       popErrorHandler();
   59189             :     }
   59190             : #ifndef SED_HACKS
   59191             :     if ( bLocalUseExceptions ) {
   59192             :       CPLErr eclass = CPLGetLastErrorType();
   59193             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59194             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59195             :       }
   59196             :     }
   59197             : #endif
   59198             :   }
   59199          55 :   resultobj = SWIG_Py_Void();
   59200          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; } }
   59201             :   return resultobj;
   59202             : fail:
   59203             :   return NULL;
   59204             : }
   59205             : 
   59206             : 
   59207         277 : SWIGINTERN PyObject *GDALInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59208         277 :   PyObject *obj;
   59209         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59210         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALInfoOptions, SWIG_NewClientData(obj));
   59211         277 :   return SWIG_Py_Void();
   59212             : }
   59213             : 
   59214          55 : SWIGINTERN PyObject *GDALInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59215          55 :   return SWIG_Python_InitShadowInstance(args);
   59216             : }
   59217             : 
   59218          55 : SWIGINTERN PyObject *_wrap_InfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59219          55 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59220          55 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   59221          55 :   GDALInfoOptions *arg2 = (GDALInfoOptions *) 0 ;
   59222          55 :   void *argp1 = 0 ;
   59223          55 :   int res1 = 0 ;
   59224          55 :   void *argp2 = 0 ;
   59225          55 :   int res2 = 0 ;
   59226          55 :   PyObject *swig_obj[2] ;
   59227          55 :   retStringAndCPLFree *result = 0 ;
   59228             :   
   59229          55 :   if (!SWIG_Python_UnpackTuple(args, "InfoInternal", 2, 2, swig_obj)) SWIG_fail;
   59230          55 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59231          55 :   if (!SWIG_IsOK(res1)) {
   59232           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   59233             :   }
   59234          55 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   59235          55 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALInfoOptions, 0 |  0 );
   59236          55 :   if (!SWIG_IsOK(res2)) {
   59237           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InfoInternal" "', argument " "2"" of type '" "GDALInfoOptions *""'"); 
   59238             :   }
   59239          55 :   arg2 = reinterpret_cast< GDALInfoOptions * >(argp2);
   59240          55 :   {
   59241          55 :     const int bLocalUseExceptions = GetUseExceptions();
   59242          55 :     if ( bLocalUseExceptions ) {
   59243          48 :       pushErrorHandler();
   59244             :     }
   59245          55 :     {
   59246          55 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59247          55 :       result = (retStringAndCPLFree *)GDALInfo(arg1,arg2);
   59248          55 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59249             :     }
   59250          55 :     if ( bLocalUseExceptions ) {
   59251          48 :       popErrorHandler();
   59252             :     }
   59253             : #ifndef SED_HACKS
   59254             :     if ( bLocalUseExceptions ) {
   59255             :       CPLErr eclass = CPLGetLastErrorType();
   59256             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59257             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59258             :       }
   59259             :     }
   59260             : #endif
   59261             :   }
   59262          55 :   {
   59263             :     /* %typemap(out) (retStringAndCPLFree*) */
   59264          55 :     Py_XDECREF(resultobj);
   59265          55 :     if(result)
   59266             :     {
   59267          55 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   59268          55 :       CPLFree(result);
   59269             :     }
   59270             :     else
   59271             :     {
   59272           0 :       resultobj = Py_None;
   59273           0 :       Py_INCREF(resultobj);
   59274             :     }
   59275             :   }
   59276          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; } }
   59277             :   return resultobj;
   59278             : fail:
   59279             :   return NULL;
   59280             : }
   59281             : 
   59282             : 
   59283          36 : SWIGINTERN PyObject *_wrap_new_GDALVectorInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59284          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59285          36 :   char **arg1 = (char **) 0 ;
   59286          36 :   PyObject *swig_obj[1] ;
   59287          36 :   GDALVectorInfoOptions *result = 0 ;
   59288             :   
   59289          36 :   if (!args) SWIG_fail;
   59290          36 :   swig_obj[0] = args;
   59291          36 :   {
   59292             :     /* %typemap(in) char **dict */
   59293          36 :     arg1 = NULL;
   59294          36 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59295          36 :       int bErr = FALSE;
   59296          36 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59297          36 :       if ( bErr )
   59298             :       {
   59299           0 :         SWIG_fail;
   59300             :       }
   59301             :     }
   59302           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59303           0 :       int bErr = FALSE;
   59304           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59305           0 :       if ( bErr )
   59306             :       {
   59307           0 :         SWIG_fail;
   59308             :       }
   59309             :     }
   59310             :     else {
   59311           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59312           0 :       SWIG_fail;
   59313             :     }
   59314             :   }
   59315          36 :   {
   59316          36 :     const int bLocalUseExceptions = GetUseExceptions();
   59317          36 :     if ( bLocalUseExceptions ) {
   59318          35 :       pushErrorHandler();
   59319             :     }
   59320          36 :     {
   59321          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59322          36 :       result = (GDALVectorInfoOptions *)new_GDALVectorInfoOptions(arg1);
   59323          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59324             :     }
   59325          36 :     if ( bLocalUseExceptions ) {
   59326          35 :       popErrorHandler();
   59327             :     }
   59328             : #ifndef SED_HACKS
   59329             :     if ( bLocalUseExceptions ) {
   59330             :       CPLErr eclass = CPLGetLastErrorType();
   59331             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59332             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59333             :       }
   59334             :     }
   59335             : #endif
   59336             :   }
   59337          36 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALVectorInfoOptions, SWIG_POINTER_NEW |  0 );
   59338          36 :   {
   59339             :     /* %typemap(freearg) char **dict */
   59340          36 :     CSLDestroy( arg1 );
   59341             :   }
   59342          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; } }
   59343             :   return resultobj;
   59344           0 : fail:
   59345           0 :   {
   59346             :     /* %typemap(freearg) char **dict */
   59347           0 :     CSLDestroy( arg1 );
   59348             :   }
   59349             :   return NULL;
   59350             : }
   59351             : 
   59352             : 
   59353          36 : SWIGINTERN PyObject *_wrap_delete_GDALVectorInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59354          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59355          36 :   GDALVectorInfoOptions *arg1 = (GDALVectorInfoOptions *) 0 ;
   59356          36 :   void *argp1 = 0 ;
   59357          36 :   int res1 = 0 ;
   59358          36 :   PyObject *swig_obj[1] ;
   59359             :   
   59360          36 :   if (!args) SWIG_fail;
   59361          36 :   swig_obj[0] = args;
   59362          36 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALVectorInfoOptions, SWIG_POINTER_DISOWN |  0 );
   59363          36 :   if (!SWIG_IsOK(res1)) {
   59364           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALVectorInfoOptions" "', argument " "1"" of type '" "GDALVectorInfoOptions *""'"); 
   59365             :   }
   59366          36 :   arg1 = reinterpret_cast< GDALVectorInfoOptions * >(argp1);
   59367          36 :   {
   59368          36 :     const int bLocalUseExceptions = GetUseExceptions();
   59369          36 :     if ( bLocalUseExceptions ) {
   59370          35 :       pushErrorHandler();
   59371             :     }
   59372          36 :     {
   59373          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59374          36 :       delete_GDALVectorInfoOptions(arg1);
   59375          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59376             :     }
   59377          36 :     if ( bLocalUseExceptions ) {
   59378          35 :       popErrorHandler();
   59379             :     }
   59380             : #ifndef SED_HACKS
   59381             :     if ( bLocalUseExceptions ) {
   59382             :       CPLErr eclass = CPLGetLastErrorType();
   59383             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59384             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59385             :       }
   59386             :     }
   59387             : #endif
   59388             :   }
   59389          36 :   resultobj = SWIG_Py_Void();
   59390          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; } }
   59391             :   return resultobj;
   59392             : fail:
   59393             :   return NULL;
   59394             : }
   59395             : 
   59396             : 
   59397         277 : SWIGINTERN PyObject *GDALVectorInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59398         277 :   PyObject *obj;
   59399         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59400         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALVectorInfoOptions, SWIG_NewClientData(obj));
   59401         277 :   return SWIG_Py_Void();
   59402             : }
   59403             : 
   59404          36 : SWIGINTERN PyObject *GDALVectorInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59405          36 :   return SWIG_Python_InitShadowInstance(args);
   59406             : }
   59407             : 
   59408          36 : SWIGINTERN PyObject *_wrap_VectorInfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59409          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59410          36 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   59411          36 :   GDALVectorInfoOptions *arg2 = (GDALVectorInfoOptions *) 0 ;
   59412          36 :   void *argp1 = 0 ;
   59413          36 :   int res1 = 0 ;
   59414          36 :   void *argp2 = 0 ;
   59415          36 :   int res2 = 0 ;
   59416          36 :   PyObject *swig_obj[2] ;
   59417          36 :   retStringAndCPLFree *result = 0 ;
   59418             :   
   59419          36 :   if (!SWIG_Python_UnpackTuple(args, "VectorInfoInternal", 2, 2, swig_obj)) SWIG_fail;
   59420          36 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59421          36 :   if (!SWIG_IsOK(res1)) {
   59422           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorInfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   59423             :   }
   59424          36 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   59425          36 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALVectorInfoOptions, 0 |  0 );
   59426          36 :   if (!SWIG_IsOK(res2)) {
   59427           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorInfoInternal" "', argument " "2"" of type '" "GDALVectorInfoOptions *""'"); 
   59428             :   }
   59429          36 :   arg2 = reinterpret_cast< GDALVectorInfoOptions * >(argp2);
   59430          36 :   {
   59431          36 :     const int bLocalUseExceptions = GetUseExceptions();
   59432          36 :     if ( bLocalUseExceptions ) {
   59433          35 :       pushErrorHandler();
   59434             :     }
   59435          36 :     {
   59436          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59437          36 :       result = (retStringAndCPLFree *)GDALVectorInfo(arg1,arg2);
   59438          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59439             :     }
   59440          36 :     if ( bLocalUseExceptions ) {
   59441          35 :       popErrorHandler();
   59442             :     }
   59443             : #ifndef SED_HACKS
   59444             :     if ( bLocalUseExceptions ) {
   59445             :       CPLErr eclass = CPLGetLastErrorType();
   59446             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59447             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59448             :       }
   59449             :     }
   59450             : #endif
   59451             :   }
   59452          36 :   {
   59453             :     /* %typemap(out) (retStringAndCPLFree*) */
   59454          36 :     Py_XDECREF(resultobj);
   59455          36 :     if(result)
   59456             :     {
   59457          35 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   59458          35 :       CPLFree(result);
   59459             :     }
   59460             :     else
   59461             :     {
   59462           1 :       resultobj = Py_None;
   59463           1 :       Py_INCREF(resultobj);
   59464             :     }
   59465             :   }
   59466          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; } }
   59467             :   return resultobj;
   59468             : fail:
   59469             :   return NULL;
   59470             : }
   59471             : 
   59472             : 
   59473          28 : SWIGINTERN PyObject *_wrap_new_GDALMultiDimInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59474          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59475          28 :   char **arg1 = (char **) 0 ;
   59476          28 :   PyObject *swig_obj[1] ;
   59477          28 :   GDALMultiDimInfoOptions *result = 0 ;
   59478             :   
   59479          28 :   if (!args) SWIG_fail;
   59480          28 :   swig_obj[0] = args;
   59481          28 :   {
   59482             :     /* %typemap(in) char **dict */
   59483          28 :     arg1 = NULL;
   59484          28 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59485          28 :       int bErr = FALSE;
   59486          28 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59487          28 :       if ( bErr )
   59488             :       {
   59489           0 :         SWIG_fail;
   59490             :       }
   59491             :     }
   59492           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59493           0 :       int bErr = FALSE;
   59494           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59495           0 :       if ( bErr )
   59496             :       {
   59497           0 :         SWIG_fail;
   59498             :       }
   59499             :     }
   59500             :     else {
   59501           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59502           0 :       SWIG_fail;
   59503             :     }
   59504             :   }
   59505          28 :   {
   59506          28 :     const int bLocalUseExceptions = GetUseExceptions();
   59507          28 :     if ( bLocalUseExceptions ) {
   59508          22 :       pushErrorHandler();
   59509             :     }
   59510          28 :     {
   59511          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59512          28 :       result = (GDALMultiDimInfoOptions *)new_GDALMultiDimInfoOptions(arg1);
   59513          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59514             :     }
   59515          28 :     if ( bLocalUseExceptions ) {
   59516          22 :       popErrorHandler();
   59517             :     }
   59518             : #ifndef SED_HACKS
   59519             :     if ( bLocalUseExceptions ) {
   59520             :       CPLErr eclass = CPLGetLastErrorType();
   59521             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59522             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59523             :       }
   59524             :     }
   59525             : #endif
   59526             :   }
   59527          28 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_POINTER_NEW |  0 );
   59528          28 :   {
   59529             :     /* %typemap(freearg) char **dict */
   59530          28 :     CSLDestroy( arg1 );
   59531             :   }
   59532          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; } }
   59533             :   return resultobj;
   59534           0 : fail:
   59535           0 :   {
   59536             :     /* %typemap(freearg) char **dict */
   59537           0 :     CSLDestroy( arg1 );
   59538             :   }
   59539             :   return NULL;
   59540             : }
   59541             : 
   59542             : 
   59543          28 : SWIGINTERN PyObject *_wrap_delete_GDALMultiDimInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59544          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59545          28 :   GDALMultiDimInfoOptions *arg1 = (GDALMultiDimInfoOptions *) 0 ;
   59546          28 :   void *argp1 = 0 ;
   59547          28 :   int res1 = 0 ;
   59548          28 :   PyObject *swig_obj[1] ;
   59549             :   
   59550          28 :   if (!args) SWIG_fail;
   59551          28 :   swig_obj[0] = args;
   59552          28 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_POINTER_DISOWN |  0 );
   59553          28 :   if (!SWIG_IsOK(res1)) {
   59554           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALMultiDimInfoOptions" "', argument " "1"" of type '" "GDALMultiDimInfoOptions *""'"); 
   59555             :   }
   59556          28 :   arg1 = reinterpret_cast< GDALMultiDimInfoOptions * >(argp1);
   59557          28 :   {
   59558          28 :     const int bLocalUseExceptions = GetUseExceptions();
   59559          28 :     if ( bLocalUseExceptions ) {
   59560          22 :       pushErrorHandler();
   59561             :     }
   59562          28 :     {
   59563          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59564          28 :       delete_GDALMultiDimInfoOptions(arg1);
   59565          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59566             :     }
   59567          28 :     if ( bLocalUseExceptions ) {
   59568          22 :       popErrorHandler();
   59569             :     }
   59570             : #ifndef SED_HACKS
   59571             :     if ( bLocalUseExceptions ) {
   59572             :       CPLErr eclass = CPLGetLastErrorType();
   59573             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59574             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59575             :       }
   59576             :     }
   59577             : #endif
   59578             :   }
   59579          28 :   resultobj = SWIG_Py_Void();
   59580          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; } }
   59581             :   return resultobj;
   59582             : fail:
   59583             :   return NULL;
   59584             : }
   59585             : 
   59586             : 
   59587         277 : SWIGINTERN PyObject *GDALMultiDimInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59588         277 :   PyObject *obj;
   59589         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59590         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_NewClientData(obj));
   59591         277 :   return SWIG_Py_Void();
   59592             : }
   59593             : 
   59594          28 : SWIGINTERN PyObject *GDALMultiDimInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59595          28 :   return SWIG_Python_InitShadowInstance(args);
   59596             : }
   59597             : 
   59598          27 : SWIGINTERN PyObject *_wrap_MultiDimInfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59599          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59600          27 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   59601          27 :   GDALMultiDimInfoOptions *arg2 = (GDALMultiDimInfoOptions *) 0 ;
   59602          27 :   void *argp1 = 0 ;
   59603          27 :   int res1 = 0 ;
   59604          27 :   void *argp2 = 0 ;
   59605          27 :   int res2 = 0 ;
   59606          27 :   PyObject *swig_obj[2] ;
   59607          27 :   retStringAndCPLFree *result = 0 ;
   59608             :   
   59609          27 :   if (!SWIG_Python_UnpackTuple(args, "MultiDimInfoInternal", 2, 2, swig_obj)) SWIG_fail;
   59610          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59611          27 :   if (!SWIG_IsOK(res1)) {
   59612           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiDimInfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   59613             :   }
   59614          27 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   59615          27 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALMultiDimInfoOptions, 0 |  0 );
   59616          27 :   if (!SWIG_IsOK(res2)) {
   59617           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiDimInfoInternal" "', argument " "2"" of type '" "GDALMultiDimInfoOptions *""'"); 
   59618             :   }
   59619          27 :   arg2 = reinterpret_cast< GDALMultiDimInfoOptions * >(argp2);
   59620          27 :   {
   59621          27 :     const int bLocalUseExceptions = GetUseExceptions();
   59622          27 :     if ( bLocalUseExceptions ) {
   59623          21 :       pushErrorHandler();
   59624             :     }
   59625          27 :     {
   59626          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59627          27 :       result = (retStringAndCPLFree *)GDALMultiDimInfo(arg1,arg2);
   59628          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59629             :     }
   59630          27 :     if ( bLocalUseExceptions ) {
   59631          21 :       popErrorHandler();
   59632             :     }
   59633             : #ifndef SED_HACKS
   59634             :     if ( bLocalUseExceptions ) {
   59635             :       CPLErr eclass = CPLGetLastErrorType();
   59636             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59637             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59638             :       }
   59639             :     }
   59640             : #endif
   59641             :   }
   59642          27 :   {
   59643             :     /* %typemap(out) (retStringAndCPLFree*) */
   59644          27 :     Py_XDECREF(resultobj);
   59645          27 :     if(result)
   59646             :     {
   59647          26 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   59648          26 :       CPLFree(result);
   59649             :     }
   59650             :     else
   59651             :     {
   59652           1 :       resultobj = Py_None;
   59653           1 :       Py_INCREF(resultobj);
   59654             :     }
   59655             :   }
   59656          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; } }
   59657             :   return resultobj;
   59658             : fail:
   59659             :   return NULL;
   59660             : }
   59661             : 
   59662             : 
   59663        2024 : SWIGINTERN PyObject *_wrap_new_GDALTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59664        2024 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59665        2024 :   char **arg1 = (char **) 0 ;
   59666        2024 :   PyObject *swig_obj[1] ;
   59667        2024 :   GDALTranslateOptions *result = 0 ;
   59668             :   
   59669        2024 :   if (!args) SWIG_fail;
   59670        2024 :   swig_obj[0] = args;
   59671        2024 :   {
   59672             :     /* %typemap(in) char **dict */
   59673        2024 :     arg1 = NULL;
   59674        2024 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59675        2024 :       int bErr = FALSE;
   59676        2024 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59677        2024 :       if ( bErr )
   59678             :       {
   59679           0 :         SWIG_fail;
   59680             :       }
   59681             :     }
   59682           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59683           0 :       int bErr = FALSE;
   59684           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59685           0 :       if ( bErr )
   59686             :       {
   59687           0 :         SWIG_fail;
   59688             :       }
   59689             :     }
   59690             :     else {
   59691           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59692           0 :       SWIG_fail;
   59693             :     }
   59694             :   }
   59695        2024 :   {
   59696        2024 :     const int bLocalUseExceptions = GetUseExceptions();
   59697        2024 :     if ( bLocalUseExceptions ) {
   59698         892 :       pushErrorHandler();
   59699             :     }
   59700        2024 :     {
   59701        2024 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59702        2024 :       result = (GDALTranslateOptions *)new_GDALTranslateOptions(arg1);
   59703        2024 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59704             :     }
   59705        2024 :     if ( bLocalUseExceptions ) {
   59706         892 :       popErrorHandler();
   59707             :     }
   59708             : #ifndef SED_HACKS
   59709             :     if ( bLocalUseExceptions ) {
   59710             :       CPLErr eclass = CPLGetLastErrorType();
   59711             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59712             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59713             :       }
   59714             :     }
   59715             : #endif
   59716             :   }
   59717        2024 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTranslateOptions, SWIG_POINTER_NEW |  0 );
   59718        2024 :   {
   59719             :     /* %typemap(freearg) char **dict */
   59720        2024 :     CSLDestroy( arg1 );
   59721             :   }
   59722        2032 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59723             :   return resultobj;
   59724           0 : fail:
   59725           0 :   {
   59726             :     /* %typemap(freearg) char **dict */
   59727           0 :     CSLDestroy( arg1 );
   59728             :   }
   59729             :   return NULL;
   59730             : }
   59731             : 
   59732             : 
   59733        2020 : SWIGINTERN PyObject *_wrap_delete_GDALTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59734        2020 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59735        2020 :   GDALTranslateOptions *arg1 = (GDALTranslateOptions *) 0 ;
   59736        2020 :   void *argp1 = 0 ;
   59737        2020 :   int res1 = 0 ;
   59738        2020 :   PyObject *swig_obj[1] ;
   59739             :   
   59740        2020 :   if (!args) SWIG_fail;
   59741        2020 :   swig_obj[0] = args;
   59742        2020 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   59743        2020 :   if (!SWIG_IsOK(res1)) {
   59744           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTranslateOptions" "', argument " "1"" of type '" "GDALTranslateOptions *""'"); 
   59745             :   }
   59746        2020 :   arg1 = reinterpret_cast< GDALTranslateOptions * >(argp1);
   59747        2020 :   {
   59748        2020 :     const int bLocalUseExceptions = GetUseExceptions();
   59749        2020 :     if ( bLocalUseExceptions ) {
   59750         888 :       pushErrorHandler();
   59751             :     }
   59752        2020 :     {
   59753        2020 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59754        2020 :       delete_GDALTranslateOptions(arg1);
   59755        2020 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59756             :     }
   59757        2020 :     if ( bLocalUseExceptions ) {
   59758         888 :       popErrorHandler();
   59759             :     }
   59760             : #ifndef SED_HACKS
   59761             :     if ( bLocalUseExceptions ) {
   59762             :       CPLErr eclass = CPLGetLastErrorType();
   59763             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59764             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59765             :       }
   59766             :     }
   59767             : #endif
   59768             :   }
   59769        2020 :   resultobj = SWIG_Py_Void();
   59770        2020 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59771             :   return resultobj;
   59772             : fail:
   59773             :   return NULL;
   59774             : }
   59775             : 
   59776             : 
   59777         277 : SWIGINTERN PyObject *GDALTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59778         277 :   PyObject *obj;
   59779         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59780         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTranslateOptions, SWIG_NewClientData(obj));
   59781         277 :   return SWIG_Py_Void();
   59782             : }
   59783             : 
   59784        2020 : SWIGINTERN PyObject *GDALTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59785        2020 :   return SWIG_Python_InitShadowInstance(args);
   59786             : }
   59787             : 
   59788        2023 : SWIGINTERN PyObject *_wrap_TranslateInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59789        2023 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59790        2023 :   char *arg1 = (char *) 0 ;
   59791        2023 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   59792        2023 :   GDALTranslateOptions *arg3 = (GDALTranslateOptions *) 0 ;
   59793        2023 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   59794        2023 :   void *arg5 = (void *) NULL ;
   59795        2023 :   int bToFree1 = 0 ;
   59796        2023 :   void *argp2 = 0 ;
   59797        2023 :   int res2 = 0 ;
   59798        2023 :   void *argp3 = 0 ;
   59799        2023 :   int res3 = 0 ;
   59800        2023 :   PyObject *swig_obj[5] ;
   59801        2023 :   GDALDatasetShadow *result = 0 ;
   59802             :   
   59803             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   59804        2023 :   PyProgressData *psProgressInfo;
   59805        2023 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   59806        2023 :   psProgressInfo->nLastReported = -1;
   59807        2023 :   psProgressInfo->psPyCallback = NULL;
   59808        2023 :   psProgressInfo->psPyCallbackData = NULL;
   59809        2023 :   arg5 = psProgressInfo;
   59810        2023 :   if (!SWIG_Python_UnpackTuple(args, "TranslateInternal", 3, 5, swig_obj)) SWIG_fail;
   59811        2023 :   {
   59812             :     /* %typemap(in) (const char *utf8_path) */
   59813        2023 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   59814             :     {
   59815        1834 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   59816             :     }
   59817             :     else
   59818             :     {
   59819         189 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   59820             :       
   59821             :     }
   59822        2023 :     if (arg1 == NULL)
   59823             :     {
   59824           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   59825           1 :       SWIG_fail;
   59826             :     }
   59827             :   }
   59828        2022 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59829        2022 :   if (!SWIG_IsOK(res2)) {
   59830           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TranslateInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   59831             :   }
   59832        2022 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   59833        2022 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALTranslateOptions, 0 |  0 );
   59834        2022 :   if (!SWIG_IsOK(res3)) {
   59835           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TranslateInternal" "', argument " "3"" of type '" "GDALTranslateOptions *""'"); 
   59836             :   }
   59837        2022 :   arg3 = reinterpret_cast< GDALTranslateOptions * >(argp3);
   59838        2022 :   if (swig_obj[3]) {
   59839        2021 :     {
   59840             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   59841             :       /* callback_func typemap */
   59842             :       
   59843             :       /* In some cases 0 is passed instead of None. */
   59844             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   59845        2021 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   59846             :       {
   59847           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   59848             :         {
   59849           0 :           swig_obj[3] = Py_None;
   59850             :         }
   59851             :       }
   59852             :       
   59853        2021 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   59854           3 :         void* cbfunction = NULL;
   59855           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   59856             :             (void**)&cbfunction,
   59857             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   59858             :             SWIG_POINTER_EXCEPTION | 0 ));
   59859             :         
   59860           3 :         if ( cbfunction == GDALTermProgress ) {
   59861             :           arg4 = GDALTermProgress;
   59862             :         } else {
   59863           3 :           if (!PyCallable_Check(swig_obj[3])) {
   59864           0 :             PyErr_SetString( PyExc_RuntimeError,
   59865             :               "Object given is not a Python function" );
   59866           0 :             SWIG_fail;
   59867             :           }
   59868           3 :           psProgressInfo->psPyCallback = swig_obj[3];
   59869           3 :           arg4 = PyProgressProxy;
   59870             :         }
   59871             :         
   59872             :       }
   59873             :       
   59874             :     }
   59875             :   }
   59876        2022 :   if (swig_obj[4]) {
   59877        2020 :     {
   59878             :       /* %typemap(in) ( void* callback_data=NULL)  */
   59879        2020 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   59880             :     }
   59881             :   }
   59882        2022 :   {
   59883        2022 :     if (!arg1) {
   59884        2022 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59885             :     }
   59886             :   }
   59887        2022 :   {
   59888        2022 :     if (!arg2) {
   59889           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59890             :     }
   59891             :   }
   59892        2022 :   {
   59893        2022 :     const int bLocalUseExceptions = GetUseExceptions();
   59894        2022 :     if ( bLocalUseExceptions ) {
   59895         890 :       pushErrorHandler();
   59896             :     }
   59897        2022 :     {
   59898        2022 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59899        2022 :       result = (GDALDatasetShadow *)wrapper_GDALTranslate((char const *)arg1,arg2,arg3,arg4,arg5);
   59900        2022 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59901             :     }
   59902        2022 :     if ( bLocalUseExceptions ) {
   59903         890 :       popErrorHandler();
   59904             :     }
   59905             : #ifndef SED_HACKS
   59906             :     if ( bLocalUseExceptions ) {
   59907             :       CPLErr eclass = CPLGetLastErrorType();
   59908             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59909             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59910             :       }
   59911             :     }
   59912             : #endif
   59913             :   }
   59914        2022 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   59915        2022 :   {
   59916             :     /* %typemap(freearg) (const char *utf8_path) */
   59917        2022 :     GDALPythonFreeCStr(arg1, bToFree1);
   59918             :   }
   59919        2022 :   {
   59920             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59921             :     
   59922        2022 :     CPLFree(psProgressInfo);
   59923             :     
   59924             :   }
   59925        2061 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59926             :   return resultobj;
   59927           1 : fail:
   59928           1 :   {
   59929             :     /* %typemap(freearg) (const char *utf8_path) */
   59930           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   59931             :   }
   59932           1 :   {
   59933             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59934             :     
   59935           1 :     CPLFree(psProgressInfo);
   59936             :     
   59937             :   }
   59938             :   return NULL;
   59939             : }
   59940             : 
   59941             : 
   59942         800 : SWIGINTERN PyObject *_wrap_new_GDALWarpAppOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59943         800 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59944         800 :   char **arg1 = (char **) 0 ;
   59945         800 :   PyObject *swig_obj[1] ;
   59946         800 :   GDALWarpAppOptions *result = 0 ;
   59947             :   
   59948         800 :   if (!args) SWIG_fail;
   59949         800 :   swig_obj[0] = args;
   59950         800 :   {
   59951             :     /* %typemap(in) char **dict */
   59952         800 :     arg1 = NULL;
   59953         800 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59954         800 :       int bErr = FALSE;
   59955         800 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59956         800 :       if ( bErr )
   59957             :       {
   59958           0 :         SWIG_fail;
   59959             :       }
   59960             :     }
   59961           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59962           0 :       int bErr = FALSE;
   59963           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59964           0 :       if ( bErr )
   59965             :       {
   59966           0 :         SWIG_fail;
   59967             :       }
   59968             :     }
   59969             :     else {
   59970           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59971           0 :       SWIG_fail;
   59972             :     }
   59973             :   }
   59974         800 :   {
   59975         800 :     const int bLocalUseExceptions = GetUseExceptions();
   59976         800 :     if ( bLocalUseExceptions ) {
   59977         776 :       pushErrorHandler();
   59978             :     }
   59979         800 :     {
   59980         800 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59981         800 :       result = (GDALWarpAppOptions *)new_GDALWarpAppOptions(arg1);
   59982         800 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59983             :     }
   59984         800 :     if ( bLocalUseExceptions ) {
   59985         776 :       popErrorHandler();
   59986             :     }
   59987             : #ifndef SED_HACKS
   59988             :     if ( bLocalUseExceptions ) {
   59989             :       CPLErr eclass = CPLGetLastErrorType();
   59990             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59991             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59992             :       }
   59993             :     }
   59994             : #endif
   59995             :   }
   59996         800 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALWarpAppOptions, SWIG_POINTER_NEW |  0 );
   59997         800 :   {
   59998             :     /* %typemap(freearg) char **dict */
   59999         800 :     CSLDestroy( arg1 );
   60000             :   }
   60001         804 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60002             :   return resultobj;
   60003           0 : fail:
   60004           0 :   {
   60005             :     /* %typemap(freearg) char **dict */
   60006           0 :     CSLDestroy( arg1 );
   60007             :   }
   60008             :   return NULL;
   60009             : }
   60010             : 
   60011             : 
   60012         798 : SWIGINTERN PyObject *_wrap_delete_GDALWarpAppOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60013         798 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60014         798 :   GDALWarpAppOptions *arg1 = (GDALWarpAppOptions *) 0 ;
   60015         798 :   void *argp1 = 0 ;
   60016         798 :   int res1 = 0 ;
   60017         798 :   PyObject *swig_obj[1] ;
   60018             :   
   60019         798 :   if (!args) SWIG_fail;
   60020         798 :   swig_obj[0] = args;
   60021         798 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALWarpAppOptions, SWIG_POINTER_DISOWN |  0 );
   60022         798 :   if (!SWIG_IsOK(res1)) {
   60023           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALWarpAppOptions" "', argument " "1"" of type '" "GDALWarpAppOptions *""'"); 
   60024             :   }
   60025         798 :   arg1 = reinterpret_cast< GDALWarpAppOptions * >(argp1);
   60026         798 :   {
   60027         798 :     const int bLocalUseExceptions = GetUseExceptions();
   60028         798 :     if ( bLocalUseExceptions ) {
   60029         774 :       pushErrorHandler();
   60030             :     }
   60031         798 :     {
   60032         798 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60033         798 :       delete_GDALWarpAppOptions(arg1);
   60034         798 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60035             :     }
   60036         798 :     if ( bLocalUseExceptions ) {
   60037         774 :       popErrorHandler();
   60038             :     }
   60039             : #ifndef SED_HACKS
   60040             :     if ( bLocalUseExceptions ) {
   60041             :       CPLErr eclass = CPLGetLastErrorType();
   60042             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60043             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60044             :       }
   60045             :     }
   60046             : #endif
   60047             :   }
   60048         798 :   resultobj = SWIG_Py_Void();
   60049         798 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60050             :   return resultobj;
   60051             : fail:
   60052             :   return NULL;
   60053             : }
   60054             : 
   60055             : 
   60056         277 : SWIGINTERN PyObject *GDALWarpAppOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60057         277 :   PyObject *obj;
   60058         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   60059         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALWarpAppOptions, SWIG_NewClientData(obj));
   60060         277 :   return SWIG_Py_Void();
   60061             : }
   60062             : 
   60063         798 : SWIGINTERN PyObject *GDALWarpAppOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60064         798 :   return SWIG_Python_InitShadowInstance(args);
   60065             : }
   60066             : 
   60067          87 : SWIGINTERN PyObject *_wrap_wrapper_GDALWarpDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60068          87 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60069          87 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   60070          87 :   int arg2 ;
   60071          87 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   60072          87 :   GDALWarpAppOptions *arg4 = (GDALWarpAppOptions *) 0 ;
   60073          87 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   60074          87 :   void *arg6 = (void *) NULL ;
   60075          87 :   void *argp1 = 0 ;
   60076          87 :   int res1 = 0 ;
   60077          87 :   void *argp4 = 0 ;
   60078          87 :   int res4 = 0 ;
   60079          87 :   PyObject *swig_obj[5] ;
   60080          87 :   int result;
   60081             :   
   60082             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60083          87 :   PyProgressData *psProgressInfo;
   60084          87 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60085          87 :   psProgressInfo->nLastReported = -1;
   60086          87 :   psProgressInfo->psPyCallback = NULL;
   60087          87 :   psProgressInfo->psPyCallbackData = NULL;
   60088          87 :   arg6 = psProgressInfo;
   60089          87 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALWarpDestDS", 3, 5, swig_obj)) SWIG_fail;
   60090          87 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60091          87 :   if (!SWIG_IsOK(res1)) {
   60092           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALWarpDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   60093             :   }
   60094          87 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   60095          87 :   {
   60096             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   60097          87 :     if ( !PySequence_Check(swig_obj[1]) ) {
   60098           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   60099           0 :       SWIG_fail;
   60100             :     }
   60101          87 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   60102          87 :     if( size > (Py_ssize_t)INT_MAX ) {
   60103           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   60104           0 :       SWIG_fail;
   60105             :     }
   60106          87 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   60107           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   60108           0 :       SWIG_fail;
   60109             :     }
   60110          87 :     arg2 = (int)size;
   60111          87 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   60112          87 :     if( !arg3) {
   60113           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   60114           0 :       SWIG_fail;
   60115             :     }
   60116             :     
   60117         172 :     for( int i = 0; i<arg2; i++ ) {
   60118          85 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   60119          85 :       GDALDatasetShadow* rawobjectpointer = NULL;
   60120          85 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   60121          85 :       if (!rawobjectpointer) {
   60122           0 :         Py_DECREF(o);
   60123           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   60124           0 :         SWIG_fail;
   60125             :       }
   60126          85 :       arg3[i] = rawobjectpointer;
   60127          85 :       Py_DECREF(o);
   60128             :       
   60129             :     }
   60130             :   }
   60131          87 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALWarpAppOptions, 0 |  0 );
   60132          87 :   if (!SWIG_IsOK(res4)) {
   60133           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALWarpDestDS" "', argument " "4"" of type '" "GDALWarpAppOptions *""'"); 
   60134             :   }
   60135          87 :   arg4 = reinterpret_cast< GDALWarpAppOptions * >(argp4);
   60136          87 :   if (swig_obj[3]) {
   60137          86 :     {
   60138             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60139             :       /* callback_func typemap */
   60140             :       
   60141             :       /* In some cases 0 is passed instead of None. */
   60142             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60143          86 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60144             :       {
   60145           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60146             :         {
   60147           0 :           swig_obj[3] = Py_None;
   60148             :         }
   60149             :       }
   60150             :       
   60151          86 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60152           1 :         void* cbfunction = NULL;
   60153           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60154             :             (void**)&cbfunction,
   60155             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60156             :             SWIG_POINTER_EXCEPTION | 0 ));
   60157             :         
   60158           1 :         if ( cbfunction == GDALTermProgress ) {
   60159             :           arg5 = GDALTermProgress;
   60160             :         } else {
   60161           1 :           if (!PyCallable_Check(swig_obj[3])) {
   60162           0 :             PyErr_SetString( PyExc_RuntimeError,
   60163             :               "Object given is not a Python function" );
   60164           0 :             SWIG_fail;
   60165             :           }
   60166           1 :           psProgressInfo->psPyCallback = swig_obj[3];
   60167           1 :           arg5 = PyProgressProxy;
   60168             :         }
   60169             :         
   60170             :       }
   60171             :       
   60172             :     }
   60173             :   }
   60174          87 :   if (swig_obj[4]) {
   60175          85 :     {
   60176             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60177          85 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60178             :     }
   60179             :   }
   60180          87 :   {
   60181          87 :     if (!arg1) {
   60182           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   60183             :     }
   60184             :   }
   60185          86 :   {
   60186          86 :     const int bLocalUseExceptions = GetUseExceptions();
   60187          86 :     if ( bLocalUseExceptions ) {
   60188          86 :       pushErrorHandler();
   60189             :     }
   60190          86 :     {
   60191          86 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60192          86 :       result = (int)wrapper_GDALWarpDestDS(arg1,arg2,arg3,arg4,arg5,arg6);
   60193          86 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60194             :     }
   60195          86 :     if ( bLocalUseExceptions ) {
   60196          86 :       popErrorHandler();
   60197             :     }
   60198             : #ifndef SED_HACKS
   60199             :     if ( bLocalUseExceptions ) {
   60200             :       CPLErr eclass = CPLGetLastErrorType();
   60201             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60202             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60203             :       }
   60204             :     }
   60205             : #endif
   60206             :   }
   60207          86 :   resultobj = SWIG_From_int(static_cast< int >(result));
   60208          86 :   {
   60209             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   60210          86 :     CPLFree( arg3 );
   60211             :   }
   60212          86 :   {
   60213             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60214             :     
   60215          86 :     CPLFree(psProgressInfo);
   60216             :     
   60217             :   }
   60218          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; } }
   60219             :   return resultobj;
   60220           1 : fail:
   60221           1 :   {
   60222             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   60223           1 :     CPLFree( arg3 );
   60224             :   }
   60225           1 :   {
   60226             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60227             :     
   60228           1 :     CPLFree(psProgressInfo);
   60229             :     
   60230             :   }
   60231             :   return NULL;
   60232             : }
   60233             : 
   60234             : 
   60235         716 : SWIGINTERN PyObject *_wrap_wrapper_GDALWarpDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60236         716 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60237         716 :   char *arg1 = (char *) 0 ;
   60238         716 :   int arg2 ;
   60239         716 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   60240         716 :   GDALWarpAppOptions *arg4 = (GDALWarpAppOptions *) 0 ;
   60241         716 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   60242         716 :   void *arg6 = (void *) NULL ;
   60243         716 :   int bToFree1 = 0 ;
   60244         716 :   void *argp4 = 0 ;
   60245         716 :   int res4 = 0 ;
   60246         716 :   PyObject *swig_obj[5] ;
   60247         716 :   GDALDatasetShadow *result = 0 ;
   60248             :   
   60249             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60250         716 :   PyProgressData *psProgressInfo;
   60251         716 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60252         716 :   psProgressInfo->nLastReported = -1;
   60253         716 :   psProgressInfo->psPyCallback = NULL;
   60254         716 :   psProgressInfo->psPyCallbackData = NULL;
   60255         716 :   arg6 = psProgressInfo;
   60256         716 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALWarpDestName", 3, 5, swig_obj)) SWIG_fail;
   60257         716 :   {
   60258             :     /* %typemap(in) (const char *utf8_path) */
   60259         716 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   60260             :     {
   60261         662 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   60262             :     }
   60263             :     else
   60264             :     {
   60265          54 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   60266             :       
   60267             :     }
   60268         716 :     if (arg1 == NULL)
   60269             :     {
   60270           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   60271           1 :       SWIG_fail;
   60272             :     }
   60273             :   }
   60274         715 :   {
   60275             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   60276         715 :     if ( !PySequence_Check(swig_obj[1]) ) {
   60277           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   60278           0 :       SWIG_fail;
   60279             :     }
   60280         715 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   60281         715 :     if( size > (Py_ssize_t)INT_MAX ) {
   60282           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   60283           0 :       SWIG_fail;
   60284             :     }
   60285         715 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   60286           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   60287           0 :       SWIG_fail;
   60288             :     }
   60289         715 :     arg2 = (int)size;
   60290         715 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   60291         715 :     if( !arg3) {
   60292           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   60293           0 :       SWIG_fail;
   60294             :     }
   60295             :     
   60296        1448 :     for( int i = 0; i<arg2; i++ ) {
   60297         733 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   60298         733 :       GDALDatasetShadow* rawobjectpointer = NULL;
   60299         733 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   60300         733 :       if (!rawobjectpointer) {
   60301           0 :         Py_DECREF(o);
   60302           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   60303           0 :         SWIG_fail;
   60304             :       }
   60305         733 :       arg3[i] = rawobjectpointer;
   60306         733 :       Py_DECREF(o);
   60307             :       
   60308             :     }
   60309             :   }
   60310         715 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALWarpAppOptions, 0 |  0 );
   60311         715 :   if (!SWIG_IsOK(res4)) {
   60312           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALWarpDestName" "', argument " "4"" of type '" "GDALWarpAppOptions *""'"); 
   60313             :   }
   60314         715 :   arg4 = reinterpret_cast< GDALWarpAppOptions * >(argp4);
   60315         715 :   if (swig_obj[3]) {
   60316         714 :     {
   60317             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60318             :       /* callback_func typemap */
   60319             :       
   60320             :       /* In some cases 0 is passed instead of None. */
   60321             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60322         714 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60323             :       {
   60324           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60325             :         {
   60326           0 :           swig_obj[3] = Py_None;
   60327             :         }
   60328             :       }
   60329             :       
   60330         714 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60331           2 :         void* cbfunction = NULL;
   60332           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60333             :             (void**)&cbfunction,
   60334             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60335             :             SWIG_POINTER_EXCEPTION | 0 ));
   60336             :         
   60337           2 :         if ( cbfunction == GDALTermProgress ) {
   60338             :           arg5 = GDALTermProgress;
   60339             :         } else {
   60340           2 :           if (!PyCallable_Check(swig_obj[3])) {
   60341           0 :             PyErr_SetString( PyExc_RuntimeError,
   60342             :               "Object given is not a Python function" );
   60343           0 :             SWIG_fail;
   60344             :           }
   60345           2 :           psProgressInfo->psPyCallback = swig_obj[3];
   60346           2 :           arg5 = PyProgressProxy;
   60347             :         }
   60348             :         
   60349             :       }
   60350             :       
   60351             :     }
   60352             :   }
   60353         715 :   if (swig_obj[4]) {
   60354         713 :     {
   60355             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60356         713 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60357             :     }
   60358             :   }
   60359         715 :   {
   60360         715 :     if (!arg1) {
   60361         715 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   60362             :     }
   60363             :   }
   60364         715 :   {
   60365         715 :     const int bLocalUseExceptions = GetUseExceptions();
   60366         715 :     if ( bLocalUseExceptions ) {
   60367         691 :       pushErrorHandler();
   60368             :     }
   60369         715 :     {
   60370         715 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60371         715 :       result = (GDALDatasetShadow *)wrapper_GDALWarpDestName((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   60372         715 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60373             :     }
   60374         715 :     if ( bLocalUseExceptions ) {
   60375         691 :       popErrorHandler();
   60376             :     }
   60377             : #ifndef SED_HACKS
   60378             :     if ( bLocalUseExceptions ) {
   60379             :       CPLErr eclass = CPLGetLastErrorType();
   60380             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60381             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60382             :       }
   60383             :     }
   60384             : #endif
   60385             :   }
   60386         715 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   60387         715 :   {
   60388             :     /* %typemap(freearg) (const char *utf8_path) */
   60389         715 :     GDALPythonFreeCStr(arg1, bToFree1);
   60390             :   }
   60391         715 :   {
   60392             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   60393         715 :     CPLFree( arg3 );
   60394             :   }
   60395         715 :   {
   60396             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60397             :     
   60398         715 :     CPLFree(psProgressInfo);
   60399             :     
   60400             :   }
   60401         796 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60402             :   return resultobj;
   60403           1 : fail:
   60404           1 :   {
   60405             :     /* %typemap(freearg) (const char *utf8_path) */
   60406           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   60407             :   }
   60408           1 :   {
   60409             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   60410           1 :     CPLFree( arg3 );
   60411             :   }
   60412           1 :   {
   60413             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60414             :     
   60415           1 :     CPLFree(psProgressInfo);
   60416             :     
   60417             :   }
   60418             :   return NULL;
   60419             : }
   60420             : 
   60421             : 
   60422         650 : SWIGINTERN PyObject *_wrap_new_GDALVectorTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60423         650 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60424         650 :   char **arg1 = (char **) 0 ;
   60425         650 :   PyObject *swig_obj[1] ;
   60426         650 :   GDALVectorTranslateOptions *result = 0 ;
   60427             :   
   60428         650 :   if (!args) SWIG_fail;
   60429         650 :   swig_obj[0] = args;
   60430         650 :   {
   60431             :     /* %typemap(in) char **dict */
   60432         650 :     arg1 = NULL;
   60433         650 :     if ( PySequence_Check( swig_obj[0] ) ) {
   60434         650 :       int bErr = FALSE;
   60435         650 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   60436         650 :       if ( bErr )
   60437             :       {
   60438           0 :         SWIG_fail;
   60439             :       }
   60440             :     }
   60441           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   60442           0 :       int bErr = FALSE;
   60443           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   60444           0 :       if ( bErr )
   60445             :       {
   60446           0 :         SWIG_fail;
   60447             :       }
   60448             :     }
   60449             :     else {
   60450           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   60451           0 :       SWIG_fail;
   60452             :     }
   60453             :   }
   60454         650 :   {
   60455         650 :     const int bLocalUseExceptions = GetUseExceptions();
   60456         650 :     if ( bLocalUseExceptions ) {
   60457         499 :       pushErrorHandler();
   60458             :     }
   60459         650 :     {
   60460         650 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60461         650 :       result = (GDALVectorTranslateOptions *)new_GDALVectorTranslateOptions(arg1);
   60462         650 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60463             :     }
   60464         650 :     if ( bLocalUseExceptions ) {
   60465         499 :       popErrorHandler();
   60466             :     }
   60467             : #ifndef SED_HACKS
   60468             :     if ( bLocalUseExceptions ) {
   60469             :       CPLErr eclass = CPLGetLastErrorType();
   60470             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60471             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60472             :       }
   60473             :     }
   60474             : #endif
   60475             :   }
   60476         650 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_POINTER_NEW |  0 );
   60477         650 :   {
   60478             :     /* %typemap(freearg) char **dict */
   60479         650 :     CSLDestroy( arg1 );
   60480             :   }
   60481         704 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60482             :   return resultobj;
   60483           0 : fail:
   60484           0 :   {
   60485             :     /* %typemap(freearg) char **dict */
   60486           0 :     CSLDestroy( arg1 );
   60487             :   }
   60488             :   return NULL;
   60489             : }
   60490             : 
   60491             : 
   60492         623 : SWIGINTERN PyObject *_wrap_delete_GDALVectorTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60493         623 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60494         623 :   GDALVectorTranslateOptions *arg1 = (GDALVectorTranslateOptions *) 0 ;
   60495         623 :   void *argp1 = 0 ;
   60496         623 :   int res1 = 0 ;
   60497         623 :   PyObject *swig_obj[1] ;
   60498             :   
   60499         623 :   if (!args) SWIG_fail;
   60500         623 :   swig_obj[0] = args;
   60501         623 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   60502         623 :   if (!SWIG_IsOK(res1)) {
   60503           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALVectorTranslateOptions" "', argument " "1"" of type '" "GDALVectorTranslateOptions *""'"); 
   60504             :   }
   60505         623 :   arg1 = reinterpret_cast< GDALVectorTranslateOptions * >(argp1);
   60506         623 :   {
   60507         623 :     const int bLocalUseExceptions = GetUseExceptions();
   60508         623 :     if ( bLocalUseExceptions ) {
   60509         472 :       pushErrorHandler();
   60510             :     }
   60511         623 :     {
   60512         623 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60513         623 :       delete_GDALVectorTranslateOptions(arg1);
   60514         623 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60515             :     }
   60516         623 :     if ( bLocalUseExceptions ) {
   60517         472 :       popErrorHandler();
   60518             :     }
   60519             : #ifndef SED_HACKS
   60520             :     if ( bLocalUseExceptions ) {
   60521             :       CPLErr eclass = CPLGetLastErrorType();
   60522             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60523             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60524             :       }
   60525             :     }
   60526             : #endif
   60527             :   }
   60528         623 :   resultobj = SWIG_Py_Void();
   60529         623 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60530             :   return resultobj;
   60531             : fail:
   60532             :   return NULL;
   60533             : }
   60534             : 
   60535             : 
   60536         277 : SWIGINTERN PyObject *GDALVectorTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60537         277 :   PyObject *obj;
   60538         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   60539         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_NewClientData(obj));
   60540         277 :   return SWIG_Py_Void();
   60541             : }
   60542             : 
   60543         623 : SWIGINTERN PyObject *GDALVectorTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60544         623 :   return SWIG_Python_InitShadowInstance(args);
   60545             : }
   60546             : 
   60547          12 : SWIGINTERN PyObject *_wrap_wrapper_GDALVectorTranslateDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60548          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60549          12 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   60550          12 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   60551          12 :   GDALVectorTranslateOptions *arg3 = (GDALVectorTranslateOptions *) 0 ;
   60552          12 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   60553          12 :   void *arg5 = (void *) NULL ;
   60554          12 :   void *argp1 = 0 ;
   60555          12 :   int res1 = 0 ;
   60556          12 :   void *argp2 = 0 ;
   60557          12 :   int res2 = 0 ;
   60558          12 :   void *argp3 = 0 ;
   60559          12 :   int res3 = 0 ;
   60560          12 :   PyObject *swig_obj[5] ;
   60561          12 :   int result;
   60562             :   
   60563             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60564          12 :   PyProgressData *psProgressInfo;
   60565          12 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60566          12 :   psProgressInfo->nLastReported = -1;
   60567          12 :   psProgressInfo->psPyCallback = NULL;
   60568          12 :   psProgressInfo->psPyCallbackData = NULL;
   60569          12 :   arg5 = psProgressInfo;
   60570          12 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALVectorTranslateDestDS", 3, 5, swig_obj)) SWIG_fail;
   60571          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60572          12 :   if (!SWIG_IsOK(res1)) {
   60573           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   60574             :   }
   60575          12 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   60576          12 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60577          12 :   if (!SWIG_IsOK(res2)) {
   60578           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60579             :   }
   60580          12 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60581          12 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALVectorTranslateOptions, 0 |  0 );
   60582          12 :   if (!SWIG_IsOK(res3)) {
   60583           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "3"" of type '" "GDALVectorTranslateOptions *""'"); 
   60584             :   }
   60585          12 :   arg3 = reinterpret_cast< GDALVectorTranslateOptions * >(argp3);
   60586          12 :   if (swig_obj[3]) {
   60587          12 :     {
   60588             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60589             :       /* callback_func typemap */
   60590             :       
   60591             :       /* In some cases 0 is passed instead of None. */
   60592             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60593          12 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60594             :       {
   60595           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60596             :         {
   60597           0 :           swig_obj[3] = Py_None;
   60598             :         }
   60599             :       }
   60600             :       
   60601          12 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60602           0 :         void* cbfunction = NULL;
   60603           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60604             :             (void**)&cbfunction,
   60605             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60606             :             SWIG_POINTER_EXCEPTION | 0 ));
   60607             :         
   60608           0 :         if ( cbfunction == GDALTermProgress ) {
   60609             :           arg4 = GDALTermProgress;
   60610             :         } else {
   60611           0 :           if (!PyCallable_Check(swig_obj[3])) {
   60612           0 :             PyErr_SetString( PyExc_RuntimeError,
   60613             :               "Object given is not a Python function" );
   60614           0 :             SWIG_fail;
   60615             :           }
   60616           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   60617           0 :           arg4 = PyProgressProxy;
   60618             :         }
   60619             :         
   60620             :       }
   60621             :       
   60622             :     }
   60623             :   }
   60624          12 :   if (swig_obj[4]) {
   60625          12 :     {
   60626             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60627          12 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60628             :     }
   60629             :   }
   60630          12 :   {
   60631          12 :     const int bLocalUseExceptions = GetUseExceptions();
   60632          12 :     if ( bLocalUseExceptions ) {
   60633          11 :       pushErrorHandler();
   60634             :     }
   60635          12 :     {
   60636          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60637          12 :       result = (int)wrapper_GDALVectorTranslateDestDS(arg1,arg2,arg3,arg4,arg5);
   60638          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60639             :     }
   60640          12 :     if ( bLocalUseExceptions ) {
   60641          11 :       popErrorHandler();
   60642             :     }
   60643             : #ifndef SED_HACKS
   60644             :     if ( bLocalUseExceptions ) {
   60645             :       CPLErr eclass = CPLGetLastErrorType();
   60646             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60647             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60648             :       }
   60649             :     }
   60650             : #endif
   60651             :   }
   60652          12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   60653          12 :   {
   60654             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60655             :     
   60656          12 :     CPLFree(psProgressInfo);
   60657             :     
   60658             :   }
   60659          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; } }
   60660             :   return resultobj;
   60661           0 : fail:
   60662           0 :   {
   60663             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60664             :     
   60665           0 :     CPLFree(psProgressInfo);
   60666             :     
   60667             :   }
   60668             :   return NULL;
   60669             : }
   60670             : 
   60671             : 
   60672         600 : SWIGINTERN PyObject *_wrap_wrapper_GDALVectorTranslateDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60673         600 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60674         600 :   char *arg1 = (char *) 0 ;
   60675         600 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   60676         600 :   GDALVectorTranslateOptions *arg3 = (GDALVectorTranslateOptions *) 0 ;
   60677         600 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   60678         600 :   void *arg5 = (void *) NULL ;
   60679         600 :   int bToFree1 = 0 ;
   60680         600 :   void *argp2 = 0 ;
   60681         600 :   int res2 = 0 ;
   60682         600 :   void *argp3 = 0 ;
   60683         600 :   int res3 = 0 ;
   60684         600 :   PyObject *swig_obj[5] ;
   60685         600 :   GDALDatasetShadow *result = 0 ;
   60686             :   
   60687             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60688         600 :   PyProgressData *psProgressInfo;
   60689         600 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60690         600 :   psProgressInfo->nLastReported = -1;
   60691         600 :   psProgressInfo->psPyCallback = NULL;
   60692         600 :   psProgressInfo->psPyCallbackData = NULL;
   60693         600 :   arg5 = psProgressInfo;
   60694         600 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALVectorTranslateDestName", 3, 5, swig_obj)) SWIG_fail;
   60695         600 :   {
   60696             :     /* %typemap(in) (const char *utf8_path) */
   60697         600 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   60698             :     {
   60699         480 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   60700             :     }
   60701             :     else
   60702             :     {
   60703         120 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   60704             :       
   60705             :     }
   60706         600 :     if (arg1 == NULL)
   60707             :     {
   60708           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   60709           1 :       SWIG_fail;
   60710             :     }
   60711             :   }
   60712         599 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60713         599 :   if (!SWIG_IsOK(res2)) {
   60714           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALVectorTranslateDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60715             :   }
   60716         599 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60717         599 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALVectorTranslateOptions, 0 |  0 );
   60718         599 :   if (!SWIG_IsOK(res3)) {
   60719           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALVectorTranslateDestName" "', argument " "3"" of type '" "GDALVectorTranslateOptions *""'"); 
   60720             :   }
   60721         599 :   arg3 = reinterpret_cast< GDALVectorTranslateOptions * >(argp3);
   60722         599 :   if (swig_obj[3]) {
   60723         599 :     {
   60724             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60725             :       /* callback_func typemap */
   60726             :       
   60727             :       /* In some cases 0 is passed instead of None. */
   60728             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60729         599 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60730             :       {
   60731           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60732             :         {
   60733           0 :           swig_obj[3] = Py_None;
   60734             :         }
   60735             :       }
   60736             :       
   60737         599 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60738           3 :         void* cbfunction = NULL;
   60739           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60740             :             (void**)&cbfunction,
   60741             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60742             :             SWIG_POINTER_EXCEPTION | 0 ));
   60743             :         
   60744           3 :         if ( cbfunction == GDALTermProgress ) {
   60745             :           arg4 = GDALTermProgress;
   60746             :         } else {
   60747           3 :           if (!PyCallable_Check(swig_obj[3])) {
   60748           0 :             PyErr_SetString( PyExc_RuntimeError,
   60749             :               "Object given is not a Python function" );
   60750           0 :             SWIG_fail;
   60751             :           }
   60752           3 :           psProgressInfo->psPyCallback = swig_obj[3];
   60753           3 :           arg4 = PyProgressProxy;
   60754             :         }
   60755             :         
   60756             :       }
   60757             :       
   60758             :     }
   60759             :   }
   60760         599 :   if (swig_obj[4]) {
   60761         599 :     {
   60762             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60763         599 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60764             :     }
   60765             :   }
   60766         599 :   {
   60767         599 :     if (!arg1) {
   60768         599 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   60769             :     }
   60770             :   }
   60771         599 :   {
   60772         599 :     const int bLocalUseExceptions = GetUseExceptions();
   60773         599 :     if ( bLocalUseExceptions ) {
   60774         449 :       pushErrorHandler();
   60775             :     }
   60776         599 :     {
   60777         599 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60778         599 :       result = (GDALDatasetShadow *)wrapper_GDALVectorTranslateDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   60779         599 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60780             :     }
   60781         599 :     if ( bLocalUseExceptions ) {
   60782         449 :       popErrorHandler();
   60783             :     }
   60784             : #ifndef SED_HACKS
   60785             :     if ( bLocalUseExceptions ) {
   60786             :       CPLErr eclass = CPLGetLastErrorType();
   60787             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60788             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60789             :       }
   60790             :     }
   60791             : #endif
   60792             :   }
   60793         599 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   60794         599 :   {
   60795             :     /* %typemap(freearg) (const char *utf8_path) */
   60796         599 :     GDALPythonFreeCStr(arg1, bToFree1);
   60797             :   }
   60798         599 :   {
   60799             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60800             :     
   60801         599 :     CPLFree(psProgressInfo);
   60802             :     
   60803             :   }
   60804         634 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60805             :   return resultobj;
   60806           1 : fail:
   60807           1 :   {
   60808             :     /* %typemap(freearg) (const char *utf8_path) */
   60809           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   60810             :   }
   60811           1 :   {
   60812             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60813             :     
   60814           1 :     CPLFree(psProgressInfo);
   60815             :     
   60816             :   }
   60817             :   return NULL;
   60818             : }
   60819             : 
   60820             : 
   60821          81 : SWIGINTERN PyObject *_wrap_new_GDALDEMProcessingOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60822          81 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60823          81 :   char **arg1 = (char **) 0 ;
   60824          81 :   PyObject *swig_obj[1] ;
   60825          81 :   GDALDEMProcessingOptions *result = 0 ;
   60826             :   
   60827          81 :   if (!args) SWIG_fail;
   60828          81 :   swig_obj[0] = args;
   60829          81 :   {
   60830             :     /* %typemap(in) char **dict */
   60831          81 :     arg1 = NULL;
   60832          81 :     if ( PySequence_Check( swig_obj[0] ) ) {
   60833          81 :       int bErr = FALSE;
   60834          81 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   60835          81 :       if ( bErr )
   60836             :       {
   60837           0 :         SWIG_fail;
   60838             :       }
   60839             :     }
   60840           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   60841           0 :       int bErr = FALSE;
   60842           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   60843           0 :       if ( bErr )
   60844             :       {
   60845           0 :         SWIG_fail;
   60846             :       }
   60847             :     }
   60848             :     else {
   60849           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   60850           0 :       SWIG_fail;
   60851             :     }
   60852             :   }
   60853          81 :   {
   60854          81 :     const int bLocalUseExceptions = GetUseExceptions();
   60855          81 :     if ( bLocalUseExceptions ) {
   60856          81 :       pushErrorHandler();
   60857             :     }
   60858          81 :     {
   60859          81 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60860          81 :       result = (GDALDEMProcessingOptions *)new_GDALDEMProcessingOptions(arg1);
   60861          81 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60862             :     }
   60863          81 :     if ( bLocalUseExceptions ) {
   60864          81 :       popErrorHandler();
   60865             :     }
   60866             : #ifndef SED_HACKS
   60867             :     if ( bLocalUseExceptions ) {
   60868             :       CPLErr eclass = CPLGetLastErrorType();
   60869             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60870             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60871             :       }
   60872             :     }
   60873             : #endif
   60874             :   }
   60875          81 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_POINTER_NEW |  0 );
   60876          81 :   {
   60877             :     /* %typemap(freearg) char **dict */
   60878          81 :     CSLDestroy( arg1 );
   60879             :   }
   60880          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; } }
   60881             :   return resultobj;
   60882           0 : fail:
   60883           0 :   {
   60884             :     /* %typemap(freearg) char **dict */
   60885           0 :     CSLDestroy( arg1 );
   60886             :   }
   60887             :   return NULL;
   60888             : }
   60889             : 
   60890             : 
   60891          77 : SWIGINTERN PyObject *_wrap_delete_GDALDEMProcessingOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60892          77 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60893          77 :   GDALDEMProcessingOptions *arg1 = (GDALDEMProcessingOptions *) 0 ;
   60894          77 :   void *argp1 = 0 ;
   60895          77 :   int res1 = 0 ;
   60896          77 :   PyObject *swig_obj[1] ;
   60897             :   
   60898          77 :   if (!args) SWIG_fail;
   60899          77 :   swig_obj[0] = args;
   60900          77 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_POINTER_DISOWN |  0 );
   60901          77 :   if (!SWIG_IsOK(res1)) {
   60902           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALDEMProcessingOptions" "', argument " "1"" of type '" "GDALDEMProcessingOptions *""'"); 
   60903             :   }
   60904          77 :   arg1 = reinterpret_cast< GDALDEMProcessingOptions * >(argp1);
   60905          77 :   {
   60906          77 :     const int bLocalUseExceptions = GetUseExceptions();
   60907          77 :     if ( bLocalUseExceptions ) {
   60908          77 :       pushErrorHandler();
   60909             :     }
   60910          77 :     {
   60911          77 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60912          77 :       delete_GDALDEMProcessingOptions(arg1);
   60913          77 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60914             :     }
   60915          77 :     if ( bLocalUseExceptions ) {
   60916          77 :       popErrorHandler();
   60917             :     }
   60918             : #ifndef SED_HACKS
   60919             :     if ( bLocalUseExceptions ) {
   60920             :       CPLErr eclass = CPLGetLastErrorType();
   60921             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60922             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60923             :       }
   60924             :     }
   60925             : #endif
   60926             :   }
   60927          77 :   resultobj = SWIG_Py_Void();
   60928          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; } }
   60929             :   return resultobj;
   60930             : fail:
   60931             :   return NULL;
   60932             : }
   60933             : 
   60934             : 
   60935         277 : SWIGINTERN PyObject *GDALDEMProcessingOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60936         277 :   PyObject *obj;
   60937         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   60938         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_NewClientData(obj));
   60939         277 :   return SWIG_Py_Void();
   60940             : }
   60941             : 
   60942          77 : SWIGINTERN PyObject *GDALDEMProcessingOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60943          77 :   return SWIG_Python_InitShadowInstance(args);
   60944             : }
   60945             : 
   60946          77 : SWIGINTERN PyObject *_wrap_DEMProcessingInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60947          77 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60948          77 :   char *arg1 = (char *) 0 ;
   60949          77 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   60950          77 :   char *arg3 = (char *) 0 ;
   60951          77 :   char *arg4 = (char *) 0 ;
   60952          77 :   GDALDEMProcessingOptions *arg5 = (GDALDEMProcessingOptions *) 0 ;
   60953          77 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   60954          77 :   void *arg7 = (void *) NULL ;
   60955          77 :   int bToFree1 = 0 ;
   60956          77 :   void *argp2 = 0 ;
   60957          77 :   int res2 = 0 ;
   60958          77 :   int res3 ;
   60959          77 :   char *buf3 = 0 ;
   60960          77 :   int alloc3 = 0 ;
   60961          77 :   int res4 ;
   60962          77 :   char *buf4 = 0 ;
   60963          77 :   int alloc4 = 0 ;
   60964          77 :   void *argp5 = 0 ;
   60965          77 :   int res5 = 0 ;
   60966          77 :   PyObject *swig_obj[7] ;
   60967          77 :   GDALDatasetShadow *result = 0 ;
   60968             :   
   60969             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60970          77 :   PyProgressData *psProgressInfo;
   60971          77 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60972          77 :   psProgressInfo->nLastReported = -1;
   60973          77 :   psProgressInfo->psPyCallback = NULL;
   60974          77 :   psProgressInfo->psPyCallbackData = NULL;
   60975          77 :   arg7 = psProgressInfo;
   60976          77 :   if (!SWIG_Python_UnpackTuple(args, "DEMProcessingInternal", 5, 7, swig_obj)) SWIG_fail;
   60977          77 :   {
   60978             :     /* %typemap(in) (const char *utf8_path) */
   60979          77 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   60980             :     {
   60981          76 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   60982             :     }
   60983             :     else
   60984             :     {
   60985           1 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   60986             :       
   60987             :     }
   60988          77 :     if (arg1 == NULL)
   60989             :     {
   60990           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   60991           0 :       SWIG_fail;
   60992             :     }
   60993             :   }
   60994          77 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60995          77 :   if (!SWIG_IsOK(res2)) {
   60996           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DEMProcessingInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60997             :   }
   60998          77 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60999          77 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   61000          77 :   if (!SWIG_IsOK(res3)) {
   61001           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DEMProcessingInternal" "', argument " "3"" of type '" "char const *""'");
   61002             :   }
   61003          77 :   arg3 = reinterpret_cast< char * >(buf3);
   61004          77 :   res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
   61005          77 :   if (!SWIG_IsOK(res4)) {
   61006           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DEMProcessingInternal" "', argument " "4"" of type '" "char const *""'");
   61007             :   }
   61008          77 :   arg4 = reinterpret_cast< char * >(buf4);
   61009          77 :   res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_GDALDEMProcessingOptions, 0 |  0 );
   61010          77 :   if (!SWIG_IsOK(res5)) {
   61011           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DEMProcessingInternal" "', argument " "5"" of type '" "GDALDEMProcessingOptions *""'"); 
   61012             :   }
   61013          77 :   arg5 = reinterpret_cast< GDALDEMProcessingOptions * >(argp5);
   61014          77 :   if (swig_obj[5]) {
   61015          77 :     {
   61016             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61017             :       /* callback_func typemap */
   61018             :       
   61019             :       /* In some cases 0 is passed instead of None. */
   61020             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61021          77 :       if ( PyLong_Check(swig_obj[5]) || PyInt_Check(swig_obj[5]) )
   61022             :       {
   61023           0 :         if( PyLong_AsLong(swig_obj[5]) == 0 )
   61024             :         {
   61025           0 :           swig_obj[5] = Py_None;
   61026             :         }
   61027             :       }
   61028             :       
   61029          77 :       if (swig_obj[5] && swig_obj[5] != Py_None ) {
   61030           0 :         void* cbfunction = NULL;
   61031           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[5],
   61032             :             (void**)&cbfunction,
   61033             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61034             :             SWIG_POINTER_EXCEPTION | 0 ));
   61035             :         
   61036           0 :         if ( cbfunction == GDALTermProgress ) {
   61037             :           arg6 = GDALTermProgress;
   61038             :         } else {
   61039           0 :           if (!PyCallable_Check(swig_obj[5])) {
   61040           0 :             PyErr_SetString( PyExc_RuntimeError,
   61041             :               "Object given is not a Python function" );
   61042           0 :             SWIG_fail;
   61043             :           }
   61044           0 :           psProgressInfo->psPyCallback = swig_obj[5];
   61045           0 :           arg6 = PyProgressProxy;
   61046             :         }
   61047             :         
   61048             :       }
   61049             :       
   61050             :     }
   61051             :   }
   61052          77 :   if (swig_obj[6]) {
   61053          77 :     {
   61054             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61055          77 :       psProgressInfo->psPyCallbackData = swig_obj[6] ;
   61056             :     }
   61057             :   }
   61058          77 :   {
   61059          77 :     if (!arg1) {
   61060          77 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61061             :     }
   61062             :   }
   61063          77 :   {
   61064          77 :     if (!arg2) {
   61065           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61066             :     }
   61067             :   }
   61068          77 :   {
   61069          77 :     if (!arg3) {
   61070           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61071             :     }
   61072             :   }
   61073          77 :   {
   61074          77 :     const int bLocalUseExceptions = GetUseExceptions();
   61075          77 :     if ( bLocalUseExceptions ) {
   61076          77 :       pushErrorHandler();
   61077             :     }
   61078          77 :     {
   61079          77 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61080          77 :       result = (GDALDatasetShadow *)wrapper_GDALDEMProcessing((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7);
   61081          77 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61082             :     }
   61083          77 :     if ( bLocalUseExceptions ) {
   61084          77 :       popErrorHandler();
   61085             :     }
   61086             : #ifndef SED_HACKS
   61087             :     if ( bLocalUseExceptions ) {
   61088             :       CPLErr eclass = CPLGetLastErrorType();
   61089             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61090             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61091             :       }
   61092             :     }
   61093             : #endif
   61094             :   }
   61095          77 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   61096          77 :   {
   61097             :     /* %typemap(freearg) (const char *utf8_path) */
   61098          77 :     GDALPythonFreeCStr(arg1, bToFree1);
   61099             :   }
   61100          77 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   61101          77 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   61102          77 :   {
   61103             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61104             :     
   61105          77 :     CPLFree(psProgressInfo);
   61106             :     
   61107             :   }
   61108          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; } }
   61109             :   return resultobj;
   61110           0 : fail:
   61111           0 :   {
   61112             :     /* %typemap(freearg) (const char *utf8_path) */
   61113           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   61114             :   }
   61115           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   61116           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   61117           0 :   {
   61118             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61119             :     
   61120           0 :     CPLFree(psProgressInfo);
   61121             :     
   61122             :   }
   61123             :   return NULL;
   61124             : }
   61125             : 
   61126             : 
   61127          45 : SWIGINTERN PyObject *_wrap_new_GDALNearblackOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61128          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61129          45 :   char **arg1 = (char **) 0 ;
   61130          45 :   PyObject *swig_obj[1] ;
   61131          45 :   GDALNearblackOptions *result = 0 ;
   61132             :   
   61133          45 :   if (!args) SWIG_fail;
   61134          45 :   swig_obj[0] = args;
   61135          45 :   {
   61136             :     /* %typemap(in) char **dict */
   61137          45 :     arg1 = NULL;
   61138          45 :     if ( PySequence_Check( swig_obj[0] ) ) {
   61139          45 :       int bErr = FALSE;
   61140          45 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   61141          45 :       if ( bErr )
   61142             :       {
   61143           0 :         SWIG_fail;
   61144             :       }
   61145             :     }
   61146           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   61147           0 :       int bErr = FALSE;
   61148           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   61149           0 :       if ( bErr )
   61150             :       {
   61151           0 :         SWIG_fail;
   61152             :       }
   61153             :     }
   61154             :     else {
   61155           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   61156           0 :       SWIG_fail;
   61157             :     }
   61158             :   }
   61159          45 :   {
   61160          45 :     const int bLocalUseExceptions = GetUseExceptions();
   61161          45 :     if ( bLocalUseExceptions ) {
   61162          45 :       pushErrorHandler();
   61163             :     }
   61164          45 :     {
   61165          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61166          45 :       result = (GDALNearblackOptions *)new_GDALNearblackOptions(arg1);
   61167          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61168             :     }
   61169          45 :     if ( bLocalUseExceptions ) {
   61170          45 :       popErrorHandler();
   61171             :     }
   61172             : #ifndef SED_HACKS
   61173             :     if ( bLocalUseExceptions ) {
   61174             :       CPLErr eclass = CPLGetLastErrorType();
   61175             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61176             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61177             :       }
   61178             :     }
   61179             : #endif
   61180             :   }
   61181          45 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALNearblackOptions, SWIG_POINTER_NEW |  0 );
   61182          45 :   {
   61183             :     /* %typemap(freearg) char **dict */
   61184          45 :     CSLDestroy( arg1 );
   61185             :   }
   61186          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; } }
   61187             :   return resultobj;
   61188           0 : fail:
   61189           0 :   {
   61190             :     /* %typemap(freearg) char **dict */
   61191           0 :     CSLDestroy( arg1 );
   61192             :   }
   61193             :   return NULL;
   61194             : }
   61195             : 
   61196             : 
   61197          45 : SWIGINTERN PyObject *_wrap_delete_GDALNearblackOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61198          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61199          45 :   GDALNearblackOptions *arg1 = (GDALNearblackOptions *) 0 ;
   61200          45 :   void *argp1 = 0 ;
   61201          45 :   int res1 = 0 ;
   61202          45 :   PyObject *swig_obj[1] ;
   61203             :   
   61204          45 :   if (!args) SWIG_fail;
   61205          45 :   swig_obj[0] = args;
   61206          45 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALNearblackOptions, SWIG_POINTER_DISOWN |  0 );
   61207          45 :   if (!SWIG_IsOK(res1)) {
   61208           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALNearblackOptions" "', argument " "1"" of type '" "GDALNearblackOptions *""'"); 
   61209             :   }
   61210          45 :   arg1 = reinterpret_cast< GDALNearblackOptions * >(argp1);
   61211          45 :   {
   61212          45 :     const int bLocalUseExceptions = GetUseExceptions();
   61213          45 :     if ( bLocalUseExceptions ) {
   61214          45 :       pushErrorHandler();
   61215             :     }
   61216          45 :     {
   61217          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61218          45 :       delete_GDALNearblackOptions(arg1);
   61219          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61220             :     }
   61221          45 :     if ( bLocalUseExceptions ) {
   61222          45 :       popErrorHandler();
   61223             :     }
   61224             : #ifndef SED_HACKS
   61225             :     if ( bLocalUseExceptions ) {
   61226             :       CPLErr eclass = CPLGetLastErrorType();
   61227             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61228             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61229             :       }
   61230             :     }
   61231             : #endif
   61232             :   }
   61233          45 :   resultobj = SWIG_Py_Void();
   61234          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; } }
   61235             :   return resultobj;
   61236             : fail:
   61237             :   return NULL;
   61238             : }
   61239             : 
   61240             : 
   61241         277 : SWIGINTERN PyObject *GDALNearblackOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61242         277 :   PyObject *obj;
   61243         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   61244         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALNearblackOptions, SWIG_NewClientData(obj));
   61245         277 :   return SWIG_Py_Void();
   61246             : }
   61247             : 
   61248          45 : SWIGINTERN PyObject *GDALNearblackOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61249          45 :   return SWIG_Python_InitShadowInstance(args);
   61250             : }
   61251             : 
   61252           2 : SWIGINTERN PyObject *_wrap_wrapper_GDALNearblackDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61253           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61254           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   61255           2 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   61256           2 :   GDALNearblackOptions *arg3 = (GDALNearblackOptions *) 0 ;
   61257           2 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61258           2 :   void *arg5 = (void *) NULL ;
   61259           2 :   void *argp1 = 0 ;
   61260           2 :   int res1 = 0 ;
   61261           2 :   void *argp2 = 0 ;
   61262           2 :   int res2 = 0 ;
   61263           2 :   void *argp3 = 0 ;
   61264           2 :   int res3 = 0 ;
   61265           2 :   PyObject *swig_obj[5] ;
   61266           2 :   int result;
   61267             :   
   61268             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61269           2 :   PyProgressData *psProgressInfo;
   61270           2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61271           2 :   psProgressInfo->nLastReported = -1;
   61272           2 :   psProgressInfo->psPyCallback = NULL;
   61273           2 :   psProgressInfo->psPyCallbackData = NULL;
   61274           2 :   arg5 = psProgressInfo;
   61275           2 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALNearblackDestDS", 3, 5, swig_obj)) SWIG_fail;
   61276           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61277           2 :   if (!SWIG_IsOK(res1)) {
   61278           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   61279             :   }
   61280           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   61281           2 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61282           2 :   if (!SWIG_IsOK(res2)) {
   61283           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   61284             :   }
   61285           2 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   61286           2 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALNearblackOptions, 0 |  0 );
   61287           2 :   if (!SWIG_IsOK(res3)) {
   61288           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "3"" of type '" "GDALNearblackOptions *""'"); 
   61289             :   }
   61290           2 :   arg3 = reinterpret_cast< GDALNearblackOptions * >(argp3);
   61291           2 :   if (swig_obj[3]) {
   61292           2 :     {
   61293             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61294             :       /* callback_func typemap */
   61295             :       
   61296             :       /* In some cases 0 is passed instead of None. */
   61297             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61298           2 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61299             :       {
   61300           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61301             :         {
   61302           0 :           swig_obj[3] = Py_None;
   61303             :         }
   61304             :       }
   61305             :       
   61306           2 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61307           0 :         void* cbfunction = NULL;
   61308           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61309             :             (void**)&cbfunction,
   61310             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61311             :             SWIG_POINTER_EXCEPTION | 0 ));
   61312             :         
   61313           0 :         if ( cbfunction == GDALTermProgress ) {
   61314             :           arg4 = GDALTermProgress;
   61315             :         } else {
   61316           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61317           0 :             PyErr_SetString( PyExc_RuntimeError,
   61318             :               "Object given is not a Python function" );
   61319           0 :             SWIG_fail;
   61320             :           }
   61321           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   61322           0 :           arg4 = PyProgressProxy;
   61323             :         }
   61324             :         
   61325             :       }
   61326             :       
   61327             :     }
   61328             :   }
   61329           2 :   if (swig_obj[4]) {
   61330           2 :     {
   61331             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61332           2 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61333             :     }
   61334             :   }
   61335           2 :   {
   61336           2 :     const int bLocalUseExceptions = GetUseExceptions();
   61337           2 :     if ( bLocalUseExceptions ) {
   61338           2 :       pushErrorHandler();
   61339             :     }
   61340           2 :     {
   61341           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61342           2 :       result = (int)wrapper_GDALNearblackDestDS(arg1,arg2,arg3,arg4,arg5);
   61343           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61344             :     }
   61345           2 :     if ( bLocalUseExceptions ) {
   61346           2 :       popErrorHandler();
   61347             :     }
   61348             : #ifndef SED_HACKS
   61349             :     if ( bLocalUseExceptions ) {
   61350             :       CPLErr eclass = CPLGetLastErrorType();
   61351             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61352             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61353             :       }
   61354             :     }
   61355             : #endif
   61356             :   }
   61357           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   61358           2 :   {
   61359             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61360             :     
   61361           2 :     CPLFree(psProgressInfo);
   61362             :     
   61363             :   }
   61364           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; } }
   61365             :   return resultobj;
   61366           0 : fail:
   61367           0 :   {
   61368             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61369             :     
   61370           0 :     CPLFree(psProgressInfo);
   61371             :     
   61372             :   }
   61373             :   return NULL;
   61374             : }
   61375             : 
   61376             : 
   61377          43 : SWIGINTERN PyObject *_wrap_wrapper_GDALNearblackDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61378          43 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61379          43 :   char *arg1 = (char *) 0 ;
   61380          43 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   61381          43 :   GDALNearblackOptions *arg3 = (GDALNearblackOptions *) 0 ;
   61382          43 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61383          43 :   void *arg5 = (void *) NULL ;
   61384          43 :   int bToFree1 = 0 ;
   61385          43 :   void *argp2 = 0 ;
   61386          43 :   int res2 = 0 ;
   61387          43 :   void *argp3 = 0 ;
   61388          43 :   int res3 = 0 ;
   61389          43 :   PyObject *swig_obj[5] ;
   61390          43 :   GDALDatasetShadow *result = 0 ;
   61391             :   
   61392             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61393          43 :   PyProgressData *psProgressInfo;
   61394          43 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61395          43 :   psProgressInfo->nLastReported = -1;
   61396          43 :   psProgressInfo->psPyCallback = NULL;
   61397          43 :   psProgressInfo->psPyCallbackData = NULL;
   61398          43 :   arg5 = psProgressInfo;
   61399          43 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALNearblackDestName", 3, 5, swig_obj)) SWIG_fail;
   61400          43 :   {
   61401             :     /* %typemap(in) (const char *utf8_path) */
   61402          43 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   61403             :     {
   61404          41 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   61405             :     }
   61406             :     else
   61407             :     {
   61408           2 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   61409             :       
   61410             :     }
   61411          43 :     if (arg1 == NULL)
   61412             :     {
   61413           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   61414           0 :       SWIG_fail;
   61415             :     }
   61416             :   }
   61417          43 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61418          43 :   if (!SWIG_IsOK(res2)) {
   61419           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALNearblackDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   61420             :   }
   61421          43 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   61422          43 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALNearblackOptions, 0 |  0 );
   61423          43 :   if (!SWIG_IsOK(res3)) {
   61424           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALNearblackDestName" "', argument " "3"" of type '" "GDALNearblackOptions *""'"); 
   61425             :   }
   61426          43 :   arg3 = reinterpret_cast< GDALNearblackOptions * >(argp3);
   61427          43 :   if (swig_obj[3]) {
   61428          43 :     {
   61429             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61430             :       /* callback_func typemap */
   61431             :       
   61432             :       /* In some cases 0 is passed instead of None. */
   61433             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61434          43 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61435             :       {
   61436           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61437             :         {
   61438           0 :           swig_obj[3] = Py_None;
   61439             :         }
   61440             :       }
   61441             :       
   61442          43 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61443           0 :         void* cbfunction = NULL;
   61444           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61445             :             (void**)&cbfunction,
   61446             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61447             :             SWIG_POINTER_EXCEPTION | 0 ));
   61448             :         
   61449           0 :         if ( cbfunction == GDALTermProgress ) {
   61450             :           arg4 = GDALTermProgress;
   61451             :         } else {
   61452           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61453           0 :             PyErr_SetString( PyExc_RuntimeError,
   61454             :               "Object given is not a Python function" );
   61455           0 :             SWIG_fail;
   61456             :           }
   61457           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   61458           0 :           arg4 = PyProgressProxy;
   61459             :         }
   61460             :         
   61461             :       }
   61462             :       
   61463             :     }
   61464             :   }
   61465          43 :   if (swig_obj[4]) {
   61466          43 :     {
   61467             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61468          43 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61469             :     }
   61470             :   }
   61471          43 :   {
   61472          43 :     if (!arg1) {
   61473          43 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61474             :     }
   61475             :   }
   61476          43 :   {
   61477          43 :     const int bLocalUseExceptions = GetUseExceptions();
   61478          43 :     if ( bLocalUseExceptions ) {
   61479          43 :       pushErrorHandler();
   61480             :     }
   61481          43 :     {
   61482          43 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61483          43 :       result = (GDALDatasetShadow *)wrapper_GDALNearblackDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   61484          43 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61485             :     }
   61486          43 :     if ( bLocalUseExceptions ) {
   61487          43 :       popErrorHandler();
   61488             :     }
   61489             : #ifndef SED_HACKS
   61490             :     if ( bLocalUseExceptions ) {
   61491             :       CPLErr eclass = CPLGetLastErrorType();
   61492             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61493             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61494             :       }
   61495             :     }
   61496             : #endif
   61497             :   }
   61498          43 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   61499          43 :   {
   61500             :     /* %typemap(freearg) (const char *utf8_path) */
   61501          43 :     GDALPythonFreeCStr(arg1, bToFree1);
   61502             :   }
   61503          43 :   {
   61504             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61505             :     
   61506          43 :     CPLFree(psProgressInfo);
   61507             :     
   61508             :   }
   61509          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; } }
   61510             :   return resultobj;
   61511           0 : fail:
   61512           0 :   {
   61513             :     /* %typemap(freearg) (const char *utf8_path) */
   61514           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   61515             :   }
   61516           0 :   {
   61517             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61518             :     
   61519           0 :     CPLFree(psProgressInfo);
   61520             :     
   61521             :   }
   61522             :   return NULL;
   61523             : }
   61524             : 
   61525             : 
   61526          52 : SWIGINTERN PyObject *_wrap_new_GDALGridOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61527          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61528          52 :   char **arg1 = (char **) 0 ;
   61529          52 :   PyObject *swig_obj[1] ;
   61530          52 :   GDALGridOptions *result = 0 ;
   61531             :   
   61532          52 :   if (!args) SWIG_fail;
   61533          52 :   swig_obj[0] = args;
   61534          52 :   {
   61535             :     /* %typemap(in) char **dict */
   61536          52 :     arg1 = NULL;
   61537          52 :     if ( PySequence_Check( swig_obj[0] ) ) {
   61538          52 :       int bErr = FALSE;
   61539          52 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   61540          52 :       if ( bErr )
   61541             :       {
   61542           0 :         SWIG_fail;
   61543             :       }
   61544             :     }
   61545           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   61546           0 :       int bErr = FALSE;
   61547           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   61548           0 :       if ( bErr )
   61549             :       {
   61550           0 :         SWIG_fail;
   61551             :       }
   61552             :     }
   61553             :     else {
   61554           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   61555           0 :       SWIG_fail;
   61556             :     }
   61557             :   }
   61558          52 :   {
   61559          52 :     const int bLocalUseExceptions = GetUseExceptions();
   61560          52 :     if ( bLocalUseExceptions ) {
   61561          51 :       pushErrorHandler();
   61562             :     }
   61563          52 :     {
   61564          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61565          52 :       result = (GDALGridOptions *)new_GDALGridOptions(arg1);
   61566          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61567             :     }
   61568          52 :     if ( bLocalUseExceptions ) {
   61569          51 :       popErrorHandler();
   61570             :     }
   61571             : #ifndef SED_HACKS
   61572             :     if ( bLocalUseExceptions ) {
   61573             :       CPLErr eclass = CPLGetLastErrorType();
   61574             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61575             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61576             :       }
   61577             :     }
   61578             : #endif
   61579             :   }
   61580          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGridOptions, SWIG_POINTER_NEW |  0 );
   61581          52 :   {
   61582             :     /* %typemap(freearg) char **dict */
   61583          52 :     CSLDestroy( arg1 );
   61584             :   }
   61585          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; } }
   61586             :   return resultobj;
   61587           0 : fail:
   61588           0 :   {
   61589             :     /* %typemap(freearg) char **dict */
   61590           0 :     CSLDestroy( arg1 );
   61591             :   }
   61592             :   return NULL;
   61593             : }
   61594             : 
   61595             : 
   61596          52 : SWIGINTERN PyObject *_wrap_delete_GDALGridOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61597          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61598          52 :   GDALGridOptions *arg1 = (GDALGridOptions *) 0 ;
   61599          52 :   void *argp1 = 0 ;
   61600          52 :   int res1 = 0 ;
   61601          52 :   PyObject *swig_obj[1] ;
   61602             :   
   61603          52 :   if (!args) SWIG_fail;
   61604          52 :   swig_obj[0] = args;
   61605          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGridOptions, SWIG_POINTER_DISOWN |  0 );
   61606          52 :   if (!SWIG_IsOK(res1)) {
   61607           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALGridOptions" "', argument " "1"" of type '" "GDALGridOptions *""'"); 
   61608             :   }
   61609          52 :   arg1 = reinterpret_cast< GDALGridOptions * >(argp1);
   61610          52 :   {
   61611          52 :     const int bLocalUseExceptions = GetUseExceptions();
   61612          52 :     if ( bLocalUseExceptions ) {
   61613          51 :       pushErrorHandler();
   61614             :     }
   61615          52 :     {
   61616          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61617          52 :       delete_GDALGridOptions(arg1);
   61618          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61619             :     }
   61620          52 :     if ( bLocalUseExceptions ) {
   61621          51 :       popErrorHandler();
   61622             :     }
   61623             : #ifndef SED_HACKS
   61624             :     if ( bLocalUseExceptions ) {
   61625             :       CPLErr eclass = CPLGetLastErrorType();
   61626             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61627             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61628             :       }
   61629             :     }
   61630             : #endif
   61631             :   }
   61632          52 :   resultobj = SWIG_Py_Void();
   61633          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; } }
   61634             :   return resultobj;
   61635             : fail:
   61636             :   return NULL;
   61637             : }
   61638             : 
   61639             : 
   61640         277 : SWIGINTERN PyObject *GDALGridOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61641         277 :   PyObject *obj;
   61642         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   61643         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALGridOptions, SWIG_NewClientData(obj));
   61644         277 :   return SWIG_Py_Void();
   61645             : }
   61646             : 
   61647          52 : SWIGINTERN PyObject *GDALGridOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61648          52 :   return SWIG_Python_InitShadowInstance(args);
   61649             : }
   61650             : 
   61651          52 : SWIGINTERN PyObject *_wrap_GridInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61652          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61653          52 :   char *arg1 = (char *) 0 ;
   61654          52 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   61655          52 :   GDALGridOptions *arg3 = (GDALGridOptions *) 0 ;
   61656          52 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61657          52 :   void *arg5 = (void *) NULL ;
   61658          52 :   int bToFree1 = 0 ;
   61659          52 :   void *argp2 = 0 ;
   61660          52 :   int res2 = 0 ;
   61661          52 :   void *argp3 = 0 ;
   61662          52 :   int res3 = 0 ;
   61663          52 :   PyObject *swig_obj[5] ;
   61664          52 :   GDALDatasetShadow *result = 0 ;
   61665             :   
   61666             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61667          52 :   PyProgressData *psProgressInfo;
   61668          52 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61669          52 :   psProgressInfo->nLastReported = -1;
   61670          52 :   psProgressInfo->psPyCallback = NULL;
   61671          52 :   psProgressInfo->psPyCallbackData = NULL;
   61672          52 :   arg5 = psProgressInfo;
   61673          52 :   if (!SWIG_Python_UnpackTuple(args, "GridInternal", 3, 5, swig_obj)) SWIG_fail;
   61674          52 :   {
   61675             :     /* %typemap(in) (const char *utf8_path) */
   61676          52 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   61677             :     {
   61678          52 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   61679             :     }
   61680             :     else
   61681             :     {
   61682           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   61683             :       
   61684             :     }
   61685          52 :     if (arg1 == NULL)
   61686             :     {
   61687           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   61688           0 :       SWIG_fail;
   61689             :     }
   61690             :   }
   61691          52 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61692          52 :   if (!SWIG_IsOK(res2)) {
   61693           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   61694             :   }
   61695          52 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   61696          52 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALGridOptions, 0 |  0 );
   61697          52 :   if (!SWIG_IsOK(res3)) {
   61698           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridInternal" "', argument " "3"" of type '" "GDALGridOptions *""'"); 
   61699             :   }
   61700          52 :   arg3 = reinterpret_cast< GDALGridOptions * >(argp3);
   61701          52 :   if (swig_obj[3]) {
   61702          52 :     {
   61703             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61704             :       /* callback_func typemap */
   61705             :       
   61706             :       /* In some cases 0 is passed instead of None. */
   61707             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61708          52 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61709             :       {
   61710           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61711             :         {
   61712           0 :           swig_obj[3] = Py_None;
   61713             :         }
   61714             :       }
   61715             :       
   61716          52 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61717           0 :         void* cbfunction = NULL;
   61718           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61719             :             (void**)&cbfunction,
   61720             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61721             :             SWIG_POINTER_EXCEPTION | 0 ));
   61722             :         
   61723           0 :         if ( cbfunction == GDALTermProgress ) {
   61724             :           arg4 = GDALTermProgress;
   61725             :         } else {
   61726           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61727           0 :             PyErr_SetString( PyExc_RuntimeError,
   61728             :               "Object given is not a Python function" );
   61729           0 :             SWIG_fail;
   61730             :           }
   61731           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   61732           0 :           arg4 = PyProgressProxy;
   61733             :         }
   61734             :         
   61735             :       }
   61736             :       
   61737             :     }
   61738             :   }
   61739          52 :   if (swig_obj[4]) {
   61740          52 :     {
   61741             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61742          52 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61743             :     }
   61744             :   }
   61745          52 :   {
   61746          52 :     if (!arg1) {
   61747          52 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61748             :     }
   61749             :   }
   61750          52 :   {
   61751          52 :     if (!arg2) {
   61752           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61753             :     }
   61754             :   }
   61755          52 :   {
   61756          52 :     const int bLocalUseExceptions = GetUseExceptions();
   61757          52 :     if ( bLocalUseExceptions ) {
   61758          51 :       pushErrorHandler();
   61759             :     }
   61760          52 :     {
   61761          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61762          52 :       result = (GDALDatasetShadow *)wrapper_GDALGrid((char const *)arg1,arg2,arg3,arg4,arg5);
   61763          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61764             :     }
   61765          52 :     if ( bLocalUseExceptions ) {
   61766          51 :       popErrorHandler();
   61767             :     }
   61768             : #ifndef SED_HACKS
   61769             :     if ( bLocalUseExceptions ) {
   61770             :       CPLErr eclass = CPLGetLastErrorType();
   61771             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61772             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61773             :       }
   61774             :     }
   61775             : #endif
   61776             :   }
   61777          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   61778          52 :   {
   61779             :     /* %typemap(freearg) (const char *utf8_path) */
   61780          52 :     GDALPythonFreeCStr(arg1, bToFree1);
   61781             :   }
   61782          52 :   {
   61783             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61784             :     
   61785          52 :     CPLFree(psProgressInfo);
   61786             :     
   61787             :   }
   61788          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; } }
   61789             :   return resultobj;
   61790           0 : fail:
   61791           0 :   {
   61792             :     /* %typemap(freearg) (const char *utf8_path) */
   61793           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   61794             :   }
   61795           0 :   {
   61796             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61797             :     
   61798           0 :     CPLFree(psProgressInfo);
   61799             :     
   61800             :   }
   61801             :   return NULL;
   61802             : }
   61803             : 
   61804             : 
   61805          12 : SWIGINTERN PyObject *_wrap_new_GDALContourOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61806          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61807          12 :   char **arg1 = (char **) 0 ;
   61808          12 :   PyObject *swig_obj[1] ;
   61809          12 :   GDALContourOptions *result = 0 ;
   61810             :   
   61811          12 :   if (!args) SWIG_fail;
   61812          12 :   swig_obj[0] = args;
   61813          12 :   {
   61814             :     /* %typemap(in) char **dict */
   61815          12 :     arg1 = NULL;
   61816          12 :     if ( PySequence_Check( swig_obj[0] ) ) {
   61817          12 :       int bErr = FALSE;
   61818          12 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   61819          12 :       if ( bErr )
   61820             :       {
   61821           0 :         SWIG_fail;
   61822             :       }
   61823             :     }
   61824           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   61825           0 :       int bErr = FALSE;
   61826           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   61827           0 :       if ( bErr )
   61828             :       {
   61829           0 :         SWIG_fail;
   61830             :       }
   61831             :     }
   61832             :     else {
   61833           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   61834           0 :       SWIG_fail;
   61835             :     }
   61836             :   }
   61837          12 :   {
   61838          12 :     const int bLocalUseExceptions = GetUseExceptions();
   61839          12 :     if ( bLocalUseExceptions ) {
   61840          12 :       pushErrorHandler();
   61841             :     }
   61842          12 :     {
   61843          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61844          12 :       result = (GDALContourOptions *)new_GDALContourOptions(arg1);
   61845          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61846             :     }
   61847          12 :     if ( bLocalUseExceptions ) {
   61848          12 :       popErrorHandler();
   61849             :     }
   61850             : #ifndef SED_HACKS
   61851             :     if ( bLocalUseExceptions ) {
   61852             :       CPLErr eclass = CPLGetLastErrorType();
   61853             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61854             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61855             :       }
   61856             :     }
   61857             : #endif
   61858             :   }
   61859          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALContourOptions, SWIG_POINTER_NEW |  0 );
   61860          12 :   {
   61861             :     /* %typemap(freearg) char **dict */
   61862          12 :     CSLDestroy( arg1 );
   61863             :   }
   61864          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; } }
   61865             :   return resultobj;
   61866           0 : fail:
   61867           0 :   {
   61868             :     /* %typemap(freearg) char **dict */
   61869           0 :     CSLDestroy( arg1 );
   61870             :   }
   61871             :   return NULL;
   61872             : }
   61873             : 
   61874             : 
   61875          12 : SWIGINTERN PyObject *_wrap_delete_GDALContourOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61876          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61877          12 :   GDALContourOptions *arg1 = (GDALContourOptions *) 0 ;
   61878          12 :   void *argp1 = 0 ;
   61879          12 :   int res1 = 0 ;
   61880          12 :   PyObject *swig_obj[1] ;
   61881             :   
   61882          12 :   if (!args) SWIG_fail;
   61883          12 :   swig_obj[0] = args;
   61884          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALContourOptions, SWIG_POINTER_DISOWN |  0 );
   61885          12 :   if (!SWIG_IsOK(res1)) {
   61886           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALContourOptions" "', argument " "1"" of type '" "GDALContourOptions *""'"); 
   61887             :   }
   61888          12 :   arg1 = reinterpret_cast< GDALContourOptions * >(argp1);
   61889          12 :   {
   61890          12 :     const int bLocalUseExceptions = GetUseExceptions();
   61891          12 :     if ( bLocalUseExceptions ) {
   61892          12 :       pushErrorHandler();
   61893             :     }
   61894          12 :     {
   61895          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61896          12 :       delete_GDALContourOptions(arg1);
   61897          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61898             :     }
   61899          12 :     if ( bLocalUseExceptions ) {
   61900          12 :       popErrorHandler();
   61901             :     }
   61902             : #ifndef SED_HACKS
   61903             :     if ( bLocalUseExceptions ) {
   61904             :       CPLErr eclass = CPLGetLastErrorType();
   61905             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61906             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61907             :       }
   61908             :     }
   61909             : #endif
   61910             :   }
   61911          12 :   resultobj = SWIG_Py_Void();
   61912          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; } }
   61913             :   return resultobj;
   61914             : fail:
   61915             :   return NULL;
   61916             : }
   61917             : 
   61918             : 
   61919         277 : SWIGINTERN PyObject *GDALContourOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61920         277 :   PyObject *obj;
   61921         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   61922         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALContourOptions, SWIG_NewClientData(obj));
   61923         277 :   return SWIG_Py_Void();
   61924             : }
   61925             : 
   61926          12 : SWIGINTERN PyObject *GDALContourOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61927          12 :   return SWIG_Python_InitShadowInstance(args);
   61928             : }
   61929             : 
   61930           6 : SWIGINTERN PyObject *_wrap_wrapper_GDALContourDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61931           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61932           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   61933           6 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   61934           6 :   GDALContourOptions *arg3 = (GDALContourOptions *) 0 ;
   61935           6 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61936           6 :   void *arg5 = (void *) NULL ;
   61937           6 :   void *argp1 = 0 ;
   61938           6 :   int res1 = 0 ;
   61939           6 :   void *argp2 = 0 ;
   61940           6 :   int res2 = 0 ;
   61941           6 :   void *argp3 = 0 ;
   61942           6 :   int res3 = 0 ;
   61943           6 :   PyObject *swig_obj[5] ;
   61944           6 :   int result;
   61945             :   
   61946             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61947           6 :   PyProgressData *psProgressInfo;
   61948           6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61949           6 :   psProgressInfo->nLastReported = -1;
   61950           6 :   psProgressInfo->psPyCallback = NULL;
   61951           6 :   psProgressInfo->psPyCallbackData = NULL;
   61952           6 :   arg5 = psProgressInfo;
   61953           6 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALContourDestDS", 3, 5, swig_obj)) SWIG_fail;
   61954           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61955           6 :   if (!SWIG_IsOK(res1)) {
   61956           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALContourDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   61957             :   }
   61958           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   61959           6 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61960           6 :   if (!SWIG_IsOK(res2)) {
   61961           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALContourDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   61962             :   }
   61963           6 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   61964           6 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALContourOptions, 0 |  0 );
   61965           6 :   if (!SWIG_IsOK(res3)) {
   61966           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALContourDestDS" "', argument " "3"" of type '" "GDALContourOptions *""'"); 
   61967             :   }
   61968           6 :   arg3 = reinterpret_cast< GDALContourOptions * >(argp3);
   61969           6 :   if (swig_obj[3]) {
   61970           6 :     {
   61971             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61972             :       /* callback_func typemap */
   61973             :       
   61974             :       /* In some cases 0 is passed instead of None. */
   61975             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61976           6 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61977             :       {
   61978           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61979             :         {
   61980           0 :           swig_obj[3] = Py_None;
   61981             :         }
   61982             :       }
   61983             :       
   61984           6 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61985           0 :         void* cbfunction = NULL;
   61986           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61987             :             (void**)&cbfunction,
   61988             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61989             :             SWIG_POINTER_EXCEPTION | 0 ));
   61990             :         
   61991           0 :         if ( cbfunction == GDALTermProgress ) {
   61992             :           arg4 = GDALTermProgress;
   61993             :         } else {
   61994           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61995           0 :             PyErr_SetString( PyExc_RuntimeError,
   61996             :               "Object given is not a Python function" );
   61997           0 :             SWIG_fail;
   61998             :           }
   61999           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62000           0 :           arg4 = PyProgressProxy;
   62001             :         }
   62002             :         
   62003             :       }
   62004             :       
   62005             :     }
   62006             :   }
   62007           6 :   if (swig_obj[4]) {
   62008           6 :     {
   62009             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62010           6 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62011             :     }
   62012             :   }
   62013           6 :   {
   62014           6 :     const int bLocalUseExceptions = GetUseExceptions();
   62015           6 :     if ( bLocalUseExceptions ) {
   62016           6 :       pushErrorHandler();
   62017             :     }
   62018           6 :     {
   62019           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62020           6 :       result = (int)wrapper_GDALContourDestDS(arg1,arg2,arg3,arg4,arg5);
   62021           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62022             :     }
   62023           6 :     if ( bLocalUseExceptions ) {
   62024           6 :       popErrorHandler();
   62025             :     }
   62026             : #ifndef SED_HACKS
   62027             :     if ( bLocalUseExceptions ) {
   62028             :       CPLErr eclass = CPLGetLastErrorType();
   62029             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62030             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62031             :       }
   62032             :     }
   62033             : #endif
   62034             :   }
   62035           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   62036           6 :   {
   62037             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62038             :     
   62039           6 :     CPLFree(psProgressInfo);
   62040             :     
   62041             :   }
   62042           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; } }
   62043             :   return resultobj;
   62044           0 : fail:
   62045           0 :   {
   62046             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62047             :     
   62048           0 :     CPLFree(psProgressInfo);
   62049             :     
   62050             :   }
   62051             :   return NULL;
   62052             : }
   62053             : 
   62054             : 
   62055           6 : SWIGINTERN PyObject *_wrap_wrapper_GDALContourDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62056           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62057           6 :   char *arg1 = (char *) 0 ;
   62058           6 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   62059           6 :   GDALContourOptions *arg3 = (GDALContourOptions *) 0 ;
   62060           6 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   62061           6 :   void *arg5 = (void *) NULL ;
   62062           6 :   int bToFree1 = 0 ;
   62063           6 :   void *argp2 = 0 ;
   62064           6 :   int res2 = 0 ;
   62065           6 :   void *argp3 = 0 ;
   62066           6 :   int res3 = 0 ;
   62067           6 :   PyObject *swig_obj[5] ;
   62068           6 :   GDALDatasetShadow *result = 0 ;
   62069             :   
   62070             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62071           6 :   PyProgressData *psProgressInfo;
   62072           6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62073           6 :   psProgressInfo->nLastReported = -1;
   62074           6 :   psProgressInfo->psPyCallback = NULL;
   62075           6 :   psProgressInfo->psPyCallbackData = NULL;
   62076           6 :   arg5 = psProgressInfo;
   62077           6 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALContourDestName", 3, 5, swig_obj)) SWIG_fail;
   62078           6 :   {
   62079             :     /* %typemap(in) (const char *utf8_path) */
   62080           6 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   62081             :     {
   62082           6 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   62083             :     }
   62084             :     else
   62085             :     {
   62086           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   62087             :       
   62088             :     }
   62089           6 :     if (arg1 == NULL)
   62090             :     {
   62091           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   62092           0 :       SWIG_fail;
   62093             :     }
   62094             :   }
   62095           6 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62096           6 :   if (!SWIG_IsOK(res2)) {
   62097           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALContourDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   62098             :   }
   62099           6 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   62100           6 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALContourOptions, 0 |  0 );
   62101           6 :   if (!SWIG_IsOK(res3)) {
   62102           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALContourDestName" "', argument " "3"" of type '" "GDALContourOptions *""'"); 
   62103             :   }
   62104           6 :   arg3 = reinterpret_cast< GDALContourOptions * >(argp3);
   62105           6 :   if (swig_obj[3]) {
   62106           6 :     {
   62107             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62108             :       /* callback_func typemap */
   62109             :       
   62110             :       /* In some cases 0 is passed instead of None. */
   62111             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62112           6 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62113             :       {
   62114           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62115             :         {
   62116           0 :           swig_obj[3] = Py_None;
   62117             :         }
   62118             :       }
   62119             :       
   62120           6 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62121           0 :         void* cbfunction = NULL;
   62122           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62123             :             (void**)&cbfunction,
   62124             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62125             :             SWIG_POINTER_EXCEPTION | 0 ));
   62126             :         
   62127           0 :         if ( cbfunction == GDALTermProgress ) {
   62128             :           arg4 = GDALTermProgress;
   62129             :         } else {
   62130           0 :           if (!PyCallable_Check(swig_obj[3])) {
   62131           0 :             PyErr_SetString( PyExc_RuntimeError,
   62132             :               "Object given is not a Python function" );
   62133           0 :             SWIG_fail;
   62134             :           }
   62135           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62136           0 :           arg4 = PyProgressProxy;
   62137             :         }
   62138             :         
   62139             :       }
   62140             :       
   62141             :     }
   62142             :   }
   62143           6 :   if (swig_obj[4]) {
   62144           6 :     {
   62145             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62146           6 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62147             :     }
   62148             :   }
   62149           6 :   {
   62150           6 :     if (!arg1) {
   62151           6 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   62152             :     }
   62153             :   }
   62154           6 :   {
   62155           6 :     const int bLocalUseExceptions = GetUseExceptions();
   62156           6 :     if ( bLocalUseExceptions ) {
   62157           6 :       pushErrorHandler();
   62158             :     }
   62159           6 :     {
   62160           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62161           6 :       result = (GDALDatasetShadow *)wrapper_GDALContourDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   62162           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62163             :     }
   62164           6 :     if ( bLocalUseExceptions ) {
   62165           6 :       popErrorHandler();
   62166             :     }
   62167             : #ifndef SED_HACKS
   62168             :     if ( bLocalUseExceptions ) {
   62169             :       CPLErr eclass = CPLGetLastErrorType();
   62170             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62171             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62172             :       }
   62173             :     }
   62174             : #endif
   62175             :   }
   62176           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   62177           6 :   {
   62178             :     /* %typemap(freearg) (const char *utf8_path) */
   62179           6 :     GDALPythonFreeCStr(arg1, bToFree1);
   62180             :   }
   62181           6 :   {
   62182             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62183             :     
   62184           6 :     CPLFree(psProgressInfo);
   62185             :     
   62186             :   }
   62187           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; } }
   62188             :   return resultobj;
   62189           0 : fail:
   62190           0 :   {
   62191             :     /* %typemap(freearg) (const char *utf8_path) */
   62192           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   62193             :   }
   62194           0 :   {
   62195             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62196             :     
   62197           0 :     CPLFree(psProgressInfo);
   62198             :     
   62199             :   }
   62200             :   return NULL;
   62201             : }
   62202             : 
   62203             : 
   62204          23 : SWIGINTERN PyObject *_wrap_new_GDALRasterizeOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62205          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62206          23 :   char **arg1 = (char **) 0 ;
   62207          23 :   PyObject *swig_obj[1] ;
   62208          23 :   GDALRasterizeOptions *result = 0 ;
   62209             :   
   62210          23 :   if (!args) SWIG_fail;
   62211          23 :   swig_obj[0] = args;
   62212          23 :   {
   62213             :     /* %typemap(in) char **dict */
   62214          23 :     arg1 = NULL;
   62215          23 :     if ( PySequence_Check( swig_obj[0] ) ) {
   62216          23 :       int bErr = FALSE;
   62217          23 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   62218          23 :       if ( bErr )
   62219             :       {
   62220           0 :         SWIG_fail;
   62221             :       }
   62222             :     }
   62223           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   62224           0 :       int bErr = FALSE;
   62225           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   62226           0 :       if ( bErr )
   62227             :       {
   62228           0 :         SWIG_fail;
   62229             :       }
   62230             :     }
   62231             :     else {
   62232           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   62233           0 :       SWIG_fail;
   62234             :     }
   62235             :   }
   62236          23 :   {
   62237          23 :     const int bLocalUseExceptions = GetUseExceptions();
   62238          23 :     if ( bLocalUseExceptions ) {
   62239          23 :       pushErrorHandler();
   62240             :     }
   62241          23 :     {
   62242          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62243          23 :       result = (GDALRasterizeOptions *)new_GDALRasterizeOptions(arg1);
   62244          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62245             :     }
   62246          23 :     if ( bLocalUseExceptions ) {
   62247          23 :       popErrorHandler();
   62248             :     }
   62249             : #ifndef SED_HACKS
   62250             :     if ( bLocalUseExceptions ) {
   62251             :       CPLErr eclass = CPLGetLastErrorType();
   62252             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62253             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62254             :       }
   62255             :     }
   62256             : #endif
   62257             :   }
   62258          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterizeOptions, SWIG_POINTER_NEW |  0 );
   62259          23 :   {
   62260             :     /* %typemap(freearg) char **dict */
   62261          23 :     CSLDestroy( arg1 );
   62262             :   }
   62263          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; } }
   62264             :   return resultobj;
   62265           0 : fail:
   62266           0 :   {
   62267             :     /* %typemap(freearg) char **dict */
   62268           0 :     CSLDestroy( arg1 );
   62269             :   }
   62270             :   return NULL;
   62271             : }
   62272             : 
   62273             : 
   62274          23 : SWIGINTERN PyObject *_wrap_delete_GDALRasterizeOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62275          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62276          23 :   GDALRasterizeOptions *arg1 = (GDALRasterizeOptions *) 0 ;
   62277          23 :   void *argp1 = 0 ;
   62278          23 :   int res1 = 0 ;
   62279          23 :   PyObject *swig_obj[1] ;
   62280             :   
   62281          23 :   if (!args) SWIG_fail;
   62282          23 :   swig_obj[0] = args;
   62283          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterizeOptions, SWIG_POINTER_DISOWN |  0 );
   62284          23 :   if (!SWIG_IsOK(res1)) {
   62285           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALRasterizeOptions" "', argument " "1"" of type '" "GDALRasterizeOptions *""'"); 
   62286             :   }
   62287          23 :   arg1 = reinterpret_cast< GDALRasterizeOptions * >(argp1);
   62288          23 :   {
   62289          23 :     const int bLocalUseExceptions = GetUseExceptions();
   62290          23 :     if ( bLocalUseExceptions ) {
   62291          23 :       pushErrorHandler();
   62292             :     }
   62293          23 :     {
   62294          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62295          23 :       delete_GDALRasterizeOptions(arg1);
   62296          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62297             :     }
   62298          23 :     if ( bLocalUseExceptions ) {
   62299          23 :       popErrorHandler();
   62300             :     }
   62301             : #ifndef SED_HACKS
   62302             :     if ( bLocalUseExceptions ) {
   62303             :       CPLErr eclass = CPLGetLastErrorType();
   62304             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62305             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62306             :       }
   62307             :     }
   62308             : #endif
   62309             :   }
   62310          23 :   resultobj = SWIG_Py_Void();
   62311          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; } }
   62312             :   return resultobj;
   62313             : fail:
   62314             :   return NULL;
   62315             : }
   62316             : 
   62317             : 
   62318         277 : SWIGINTERN PyObject *GDALRasterizeOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62319         277 :   PyObject *obj;
   62320         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   62321         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterizeOptions, SWIG_NewClientData(obj));
   62322         277 :   return SWIG_Py_Void();
   62323             : }
   62324             : 
   62325          23 : SWIGINTERN PyObject *GDALRasterizeOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62326          23 :   return SWIG_Python_InitShadowInstance(args);
   62327             : }
   62328             : 
   62329          13 : SWIGINTERN PyObject *_wrap_wrapper_GDALRasterizeDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62330          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62331          13 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   62332          13 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   62333          13 :   GDALRasterizeOptions *arg3 = (GDALRasterizeOptions *) 0 ;
   62334          13 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   62335          13 :   void *arg5 = (void *) NULL ;
   62336          13 :   void *argp1 = 0 ;
   62337          13 :   int res1 = 0 ;
   62338          13 :   void *argp2 = 0 ;
   62339          13 :   int res2 = 0 ;
   62340          13 :   void *argp3 = 0 ;
   62341          13 :   int res3 = 0 ;
   62342          13 :   PyObject *swig_obj[5] ;
   62343          13 :   int result;
   62344             :   
   62345             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62346          13 :   PyProgressData *psProgressInfo;
   62347          13 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62348          13 :   psProgressInfo->nLastReported = -1;
   62349          13 :   psProgressInfo->psPyCallback = NULL;
   62350          13 :   psProgressInfo->psPyCallbackData = NULL;
   62351          13 :   arg5 = psProgressInfo;
   62352          13 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALRasterizeDestDS", 3, 5, swig_obj)) SWIG_fail;
   62353          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62354          13 :   if (!SWIG_IsOK(res1)) {
   62355           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   62356             :   }
   62357          13 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   62358          13 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62359          13 :   if (!SWIG_IsOK(res2)) {
   62360           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   62361             :   }
   62362          13 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   62363          13 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterizeOptions, 0 |  0 );
   62364          13 :   if (!SWIG_IsOK(res3)) {
   62365           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "3"" of type '" "GDALRasterizeOptions *""'"); 
   62366             :   }
   62367          13 :   arg3 = reinterpret_cast< GDALRasterizeOptions * >(argp3);
   62368          13 :   if (swig_obj[3]) {
   62369          13 :     {
   62370             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62371             :       /* callback_func typemap */
   62372             :       
   62373             :       /* In some cases 0 is passed instead of None. */
   62374             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62375          13 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62376             :       {
   62377           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62378             :         {
   62379           0 :           swig_obj[3] = Py_None;
   62380             :         }
   62381             :       }
   62382             :       
   62383          13 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62384           0 :         void* cbfunction = NULL;
   62385           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62386             :             (void**)&cbfunction,
   62387             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62388             :             SWIG_POINTER_EXCEPTION | 0 ));
   62389             :         
   62390           0 :         if ( cbfunction == GDALTermProgress ) {
   62391             :           arg4 = GDALTermProgress;
   62392             :         } else {
   62393           0 :           if (!PyCallable_Check(swig_obj[3])) {
   62394           0 :             PyErr_SetString( PyExc_RuntimeError,
   62395             :               "Object given is not a Python function" );
   62396           0 :             SWIG_fail;
   62397             :           }
   62398           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62399           0 :           arg4 = PyProgressProxy;
   62400             :         }
   62401             :         
   62402             :       }
   62403             :       
   62404             :     }
   62405             :   }
   62406          13 :   if (swig_obj[4]) {
   62407          13 :     {
   62408             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62409          13 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62410             :     }
   62411             :   }
   62412          13 :   {
   62413          13 :     const int bLocalUseExceptions = GetUseExceptions();
   62414          13 :     if ( bLocalUseExceptions ) {
   62415          13 :       pushErrorHandler();
   62416             :     }
   62417          13 :     {
   62418          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62419          13 :       result = (int)wrapper_GDALRasterizeDestDS(arg1,arg2,arg3,arg4,arg5);
   62420          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62421             :     }
   62422          13 :     if ( bLocalUseExceptions ) {
   62423          13 :       popErrorHandler();
   62424             :     }
   62425             : #ifndef SED_HACKS
   62426             :     if ( bLocalUseExceptions ) {
   62427             :       CPLErr eclass = CPLGetLastErrorType();
   62428             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62429             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62430             :       }
   62431             :     }
   62432             : #endif
   62433             :   }
   62434          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   62435          13 :   {
   62436             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62437             :     
   62438          13 :     CPLFree(psProgressInfo);
   62439             :     
   62440             :   }
   62441          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; } }
   62442             :   return resultobj;
   62443           0 : fail:
   62444           0 :   {
   62445             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62446             :     
   62447           0 :     CPLFree(psProgressInfo);
   62448             :     
   62449             :   }
   62450             :   return NULL;
   62451             : }
   62452             : 
   62453             : 
   62454          10 : SWIGINTERN PyObject *_wrap_wrapper_GDALRasterizeDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62455          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62456          10 :   char *arg1 = (char *) 0 ;
   62457          10 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   62458          10 :   GDALRasterizeOptions *arg3 = (GDALRasterizeOptions *) 0 ;
   62459          10 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   62460          10 :   void *arg5 = (void *) NULL ;
   62461          10 :   int bToFree1 = 0 ;
   62462          10 :   void *argp2 = 0 ;
   62463          10 :   int res2 = 0 ;
   62464          10 :   void *argp3 = 0 ;
   62465          10 :   int res3 = 0 ;
   62466          10 :   PyObject *swig_obj[5] ;
   62467          10 :   GDALDatasetShadow *result = 0 ;
   62468             :   
   62469             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62470          10 :   PyProgressData *psProgressInfo;
   62471          10 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62472          10 :   psProgressInfo->nLastReported = -1;
   62473          10 :   psProgressInfo->psPyCallback = NULL;
   62474          10 :   psProgressInfo->psPyCallbackData = NULL;
   62475          10 :   arg5 = psProgressInfo;
   62476          10 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALRasterizeDestName", 3, 5, swig_obj)) SWIG_fail;
   62477          10 :   {
   62478             :     /* %typemap(in) (const char *utf8_path) */
   62479          10 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   62480             :     {
   62481           6 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   62482             :     }
   62483             :     else
   62484             :     {
   62485           4 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   62486             :       
   62487             :     }
   62488          10 :     if (arg1 == NULL)
   62489             :     {
   62490           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   62491           0 :       SWIG_fail;
   62492             :     }
   62493             :   }
   62494          10 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62495          10 :   if (!SWIG_IsOK(res2)) {
   62496           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALRasterizeDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   62497             :   }
   62498          10 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   62499          10 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterizeOptions, 0 |  0 );
   62500          10 :   if (!SWIG_IsOK(res3)) {
   62501           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALRasterizeDestName" "', argument " "3"" of type '" "GDALRasterizeOptions *""'"); 
   62502             :   }
   62503          10 :   arg3 = reinterpret_cast< GDALRasterizeOptions * >(argp3);
   62504          10 :   if (swig_obj[3]) {
   62505          10 :     {
   62506             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62507             :       /* callback_func typemap */
   62508             :       
   62509             :       /* In some cases 0 is passed instead of None. */
   62510             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62511          10 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62512             :       {
   62513           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62514             :         {
   62515           0 :           swig_obj[3] = Py_None;
   62516             :         }
   62517             :       }
   62518             :       
   62519          10 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62520           0 :         void* cbfunction = NULL;
   62521           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62522             :             (void**)&cbfunction,
   62523             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62524             :             SWIG_POINTER_EXCEPTION | 0 ));
   62525             :         
   62526           0 :         if ( cbfunction == GDALTermProgress ) {
   62527             :           arg4 = GDALTermProgress;
   62528             :         } else {
   62529           0 :           if (!PyCallable_Check(swig_obj[3])) {
   62530           0 :             PyErr_SetString( PyExc_RuntimeError,
   62531             :               "Object given is not a Python function" );
   62532           0 :             SWIG_fail;
   62533             :           }
   62534           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62535           0 :           arg4 = PyProgressProxy;
   62536             :         }
   62537             :         
   62538             :       }
   62539             :       
   62540             :     }
   62541             :   }
   62542          10 :   if (swig_obj[4]) {
   62543          10 :     {
   62544             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62545          10 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62546             :     }
   62547             :   }
   62548          10 :   {
   62549          10 :     if (!arg1) {
   62550          10 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   62551             :     }
   62552             :   }
   62553          10 :   {
   62554          10 :     const int bLocalUseExceptions = GetUseExceptions();
   62555          10 :     if ( bLocalUseExceptions ) {
   62556          10 :       pushErrorHandler();
   62557             :     }
   62558          10 :     {
   62559          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62560          10 :       result = (GDALDatasetShadow *)wrapper_GDALRasterizeDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   62561          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62562             :     }
   62563          10 :     if ( bLocalUseExceptions ) {
   62564          10 :       popErrorHandler();
   62565             :     }
   62566             : #ifndef SED_HACKS
   62567             :     if ( bLocalUseExceptions ) {
   62568             :       CPLErr eclass = CPLGetLastErrorType();
   62569             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62570             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62571             :       }
   62572             :     }
   62573             : #endif
   62574             :   }
   62575          10 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   62576          10 :   {
   62577             :     /* %typemap(freearg) (const char *utf8_path) */
   62578          10 :     GDALPythonFreeCStr(arg1, bToFree1);
   62579             :   }
   62580          10 :   {
   62581             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62582             :     
   62583          10 :     CPLFree(psProgressInfo);
   62584             :     
   62585             :   }
   62586          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; } }
   62587             :   return resultobj;
   62588           0 : fail:
   62589           0 :   {
   62590             :     /* %typemap(freearg) (const char *utf8_path) */
   62591           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   62592             :   }
   62593           0 :   {
   62594             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62595             :     
   62596           0 :     CPLFree(psProgressInfo);
   62597             :     
   62598             :   }
   62599             :   return NULL;
   62600             : }
   62601             : 
   62602             : 
   62603          39 : SWIGINTERN PyObject *_wrap_new_GDALFootprintOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62604          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62605          39 :   char **arg1 = (char **) 0 ;
   62606          39 :   PyObject *swig_obj[1] ;
   62607          39 :   GDALFootprintOptions *result = 0 ;
   62608             :   
   62609          39 :   if (!args) SWIG_fail;
   62610          39 :   swig_obj[0] = args;
   62611          39 :   {
   62612             :     /* %typemap(in) char **dict */
   62613          39 :     arg1 = NULL;
   62614          39 :     if ( PySequence_Check( swig_obj[0] ) ) {
   62615          39 :       int bErr = FALSE;
   62616          39 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   62617          39 :       if ( bErr )
   62618             :       {
   62619           0 :         SWIG_fail;
   62620             :       }
   62621             :     }
   62622           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   62623           0 :       int bErr = FALSE;
   62624           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   62625           0 :       if ( bErr )
   62626             :       {
   62627           0 :         SWIG_fail;
   62628             :       }
   62629             :     }
   62630             :     else {
   62631           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   62632           0 :       SWIG_fail;
   62633             :     }
   62634             :   }
   62635          39 :   {
   62636          39 :     const int bLocalUseExceptions = GetUseExceptions();
   62637          39 :     if ( bLocalUseExceptions ) {
   62638          39 :       pushErrorHandler();
   62639             :     }
   62640          39 :     {
   62641          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62642          39 :       result = (GDALFootprintOptions *)new_GDALFootprintOptions(arg1);
   62643          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62644             :     }
   62645          39 :     if ( bLocalUseExceptions ) {
   62646          39 :       popErrorHandler();
   62647             :     }
   62648             : #ifndef SED_HACKS
   62649             :     if ( bLocalUseExceptions ) {
   62650             :       CPLErr eclass = CPLGetLastErrorType();
   62651             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62652             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62653             :       }
   62654             :     }
   62655             : #endif
   62656             :   }
   62657          39 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALFootprintOptions, SWIG_POINTER_NEW |  0 );
   62658          39 :   {
   62659             :     /* %typemap(freearg) char **dict */
   62660          39 :     CSLDestroy( arg1 );
   62661             :   }
   62662          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; } }
   62663             :   return resultobj;
   62664           0 : fail:
   62665           0 :   {
   62666             :     /* %typemap(freearg) char **dict */
   62667           0 :     CSLDestroy( arg1 );
   62668             :   }
   62669             :   return NULL;
   62670             : }
   62671             : 
   62672             : 
   62673          37 : SWIGINTERN PyObject *_wrap_delete_GDALFootprintOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62674          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62675          37 :   GDALFootprintOptions *arg1 = (GDALFootprintOptions *) 0 ;
   62676          37 :   void *argp1 = 0 ;
   62677          37 :   int res1 = 0 ;
   62678          37 :   PyObject *swig_obj[1] ;
   62679             :   
   62680          37 :   if (!args) SWIG_fail;
   62681          37 :   swig_obj[0] = args;
   62682          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALFootprintOptions, SWIG_POINTER_DISOWN |  0 );
   62683          37 :   if (!SWIG_IsOK(res1)) {
   62684           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALFootprintOptions" "', argument " "1"" of type '" "GDALFootprintOptions *""'"); 
   62685             :   }
   62686          37 :   arg1 = reinterpret_cast< GDALFootprintOptions * >(argp1);
   62687          37 :   {
   62688          37 :     const int bLocalUseExceptions = GetUseExceptions();
   62689          37 :     if ( bLocalUseExceptions ) {
   62690          37 :       pushErrorHandler();
   62691             :     }
   62692          37 :     {
   62693          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62694          37 :       delete_GDALFootprintOptions(arg1);
   62695          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62696             :     }
   62697          37 :     if ( bLocalUseExceptions ) {
   62698          37 :       popErrorHandler();
   62699             :     }
   62700             : #ifndef SED_HACKS
   62701             :     if ( bLocalUseExceptions ) {
   62702             :       CPLErr eclass = CPLGetLastErrorType();
   62703             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62704             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62705             :       }
   62706             :     }
   62707             : #endif
   62708             :   }
   62709          37 :   resultobj = SWIG_Py_Void();
   62710          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; } }
   62711             :   return resultobj;
   62712             : fail:
   62713             :   return NULL;
   62714             : }
   62715             : 
   62716             : 
   62717         277 : SWIGINTERN PyObject *GDALFootprintOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62718         277 :   PyObject *obj;
   62719         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   62720         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALFootprintOptions, SWIG_NewClientData(obj));
   62721         277 :   return SWIG_Py_Void();
   62722             : }
   62723             : 
   62724          37 : SWIGINTERN PyObject *GDALFootprintOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62725          37 :   return SWIG_Python_InitShadowInstance(args);
   62726             : }
   62727             : 
   62728           3 : SWIGINTERN PyObject *_wrap_wrapper_GDALFootprintDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62729           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62730           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   62731           3 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   62732           3 :   GDALFootprintOptions *arg3 = (GDALFootprintOptions *) 0 ;
   62733           3 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   62734           3 :   void *arg5 = (void *) NULL ;
   62735           3 :   void *argp1 = 0 ;
   62736           3 :   int res1 = 0 ;
   62737           3 :   void *argp2 = 0 ;
   62738           3 :   int res2 = 0 ;
   62739           3 :   void *argp3 = 0 ;
   62740           3 :   int res3 = 0 ;
   62741           3 :   PyObject *swig_obj[5] ;
   62742           3 :   int result;
   62743             :   
   62744             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62745           3 :   PyProgressData *psProgressInfo;
   62746           3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62747           3 :   psProgressInfo->nLastReported = -1;
   62748           3 :   psProgressInfo->psPyCallback = NULL;
   62749           3 :   psProgressInfo->psPyCallbackData = NULL;
   62750           3 :   arg5 = psProgressInfo;
   62751           3 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALFootprintDestDS", 3, 5, swig_obj)) SWIG_fail;
   62752           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62753           3 :   if (!SWIG_IsOK(res1)) {
   62754           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   62755             :   }
   62756           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   62757           3 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62758           3 :   if (!SWIG_IsOK(res2)) {
   62759           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   62760             :   }
   62761           3 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   62762           3 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALFootprintOptions, 0 |  0 );
   62763           3 :   if (!SWIG_IsOK(res3)) {
   62764           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "3"" of type '" "GDALFootprintOptions *""'"); 
   62765             :   }
   62766           3 :   arg3 = reinterpret_cast< GDALFootprintOptions * >(argp3);
   62767           3 :   if (swig_obj[3]) {
   62768           3 :     {
   62769             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62770             :       /* callback_func typemap */
   62771             :       
   62772             :       /* In some cases 0 is passed instead of None. */
   62773             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62774           3 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62775             :       {
   62776           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62777             :         {
   62778           0 :           swig_obj[3] = Py_None;
   62779             :         }
   62780             :       }
   62781             :       
   62782           3 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62783           0 :         void* cbfunction = NULL;
   62784           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62785             :             (void**)&cbfunction,
   62786             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62787             :             SWIG_POINTER_EXCEPTION | 0 ));
   62788             :         
   62789           0 :         if ( cbfunction == GDALTermProgress ) {
   62790             :           arg4 = GDALTermProgress;
   62791             :         } else {
   62792           0 :           if (!PyCallable_Check(swig_obj[3])) {
   62793           0 :             PyErr_SetString( PyExc_RuntimeError,
   62794             :               "Object given is not a Python function" );
   62795           0 :             SWIG_fail;
   62796             :           }
   62797           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62798           0 :           arg4 = PyProgressProxy;
   62799             :         }
   62800             :         
   62801             :       }
   62802             :       
   62803             :     }
   62804             :   }
   62805           3 :   if (swig_obj[4]) {
   62806           3 :     {
   62807             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62808           3 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62809             :     }
   62810             :   }
   62811           3 :   {
   62812           3 :     const int bLocalUseExceptions = GetUseExceptions();
   62813           3 :     if ( bLocalUseExceptions ) {
   62814           3 :       pushErrorHandler();
   62815             :     }
   62816           3 :     {
   62817           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62818           3 :       result = (int)wrapper_GDALFootprintDestDS(arg1,arg2,arg3,arg4,arg5);
   62819           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62820             :     }
   62821           3 :     if ( bLocalUseExceptions ) {
   62822           3 :       popErrorHandler();
   62823             :     }
   62824             : #ifndef SED_HACKS
   62825             :     if ( bLocalUseExceptions ) {
   62826             :       CPLErr eclass = CPLGetLastErrorType();
   62827             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62828             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62829             :       }
   62830             :     }
   62831             : #endif
   62832             :   }
   62833           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   62834           3 :   {
   62835             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62836             :     
   62837           3 :     CPLFree(psProgressInfo);
   62838             :     
   62839             :   }
   62840           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; } }
   62841             :   return resultobj;
   62842           0 : fail:
   62843           0 :   {
   62844             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62845             :     
   62846           0 :     CPLFree(psProgressInfo);
   62847             :     
   62848             :   }
   62849             :   return NULL;
   62850             : }
   62851             : 
   62852             : 
   62853          34 : SWIGINTERN PyObject *_wrap_wrapper_GDALFootprintDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62854          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62855          34 :   char *arg1 = (char *) 0 ;
   62856          34 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   62857          34 :   GDALFootprintOptions *arg3 = (GDALFootprintOptions *) 0 ;
   62858          34 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   62859          34 :   void *arg5 = (void *) NULL ;
   62860          34 :   int bToFree1 = 0 ;
   62861          34 :   void *argp2 = 0 ;
   62862          34 :   int res2 = 0 ;
   62863          34 :   void *argp3 = 0 ;
   62864          34 :   int res3 = 0 ;
   62865          34 :   PyObject *swig_obj[5] ;
   62866          34 :   GDALDatasetShadow *result = 0 ;
   62867             :   
   62868             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62869          34 :   PyProgressData *psProgressInfo;
   62870          34 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62871          34 :   psProgressInfo->nLastReported = -1;
   62872          34 :   psProgressInfo->psPyCallback = NULL;
   62873          34 :   psProgressInfo->psPyCallbackData = NULL;
   62874          34 :   arg5 = psProgressInfo;
   62875          34 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALFootprintDestName", 3, 5, swig_obj)) SWIG_fail;
   62876          34 :   {
   62877             :     /* %typemap(in) (const char *utf8_path) */
   62878          34 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   62879             :     {
   62880          33 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   62881             :     }
   62882             :     else
   62883             :     {
   62884           1 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   62885             :       
   62886             :     }
   62887          34 :     if (arg1 == NULL)
   62888             :     {
   62889           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   62890           0 :       SWIG_fail;
   62891             :     }
   62892             :   }
   62893          34 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62894          34 :   if (!SWIG_IsOK(res2)) {
   62895           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALFootprintDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   62896             :   }
   62897          34 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   62898          34 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALFootprintOptions, 0 |  0 );
   62899          34 :   if (!SWIG_IsOK(res3)) {
   62900           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALFootprintDestName" "', argument " "3"" of type '" "GDALFootprintOptions *""'"); 
   62901             :   }
   62902          34 :   arg3 = reinterpret_cast< GDALFootprintOptions * >(argp3);
   62903          34 :   if (swig_obj[3]) {
   62904          34 :     {
   62905             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62906             :       /* callback_func typemap */
   62907             :       
   62908             :       /* In some cases 0 is passed instead of None. */
   62909             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62910          34 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62911             :       {
   62912           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62913             :         {
   62914           0 :           swig_obj[3] = Py_None;
   62915             :         }
   62916             :       }
   62917             :       
   62918          34 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62919           0 :         void* cbfunction = NULL;
   62920           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62921             :             (void**)&cbfunction,
   62922             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62923             :             SWIG_POINTER_EXCEPTION | 0 ));
   62924             :         
   62925           0 :         if ( cbfunction == GDALTermProgress ) {
   62926             :           arg4 = GDALTermProgress;
   62927             :         } else {
   62928           0 :           if (!PyCallable_Check(swig_obj[3])) {
   62929           0 :             PyErr_SetString( PyExc_RuntimeError,
   62930             :               "Object given is not a Python function" );
   62931           0 :             SWIG_fail;
   62932             :           }
   62933           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62934           0 :           arg4 = PyProgressProxy;
   62935             :         }
   62936             :         
   62937             :       }
   62938             :       
   62939             :     }
   62940             :   }
   62941          34 :   if (swig_obj[4]) {
   62942          34 :     {
   62943             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62944          34 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62945             :     }
   62946             :   }
   62947          34 :   {
   62948          34 :     if (!arg1) {
   62949          34 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   62950             :     }
   62951             :   }
   62952          34 :   {
   62953          34 :     const int bLocalUseExceptions = GetUseExceptions();
   62954          34 :     if ( bLocalUseExceptions ) {
   62955          34 :       pushErrorHandler();
   62956             :     }
   62957          34 :     {
   62958          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62959          34 :       result = (GDALDatasetShadow *)wrapper_GDALFootprintDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   62960          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62961             :     }
   62962          34 :     if ( bLocalUseExceptions ) {
   62963          34 :       popErrorHandler();
   62964             :     }
   62965             : #ifndef SED_HACKS
   62966             :     if ( bLocalUseExceptions ) {
   62967             :       CPLErr eclass = CPLGetLastErrorType();
   62968             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62969             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62970             :       }
   62971             :     }
   62972             : #endif
   62973             :   }
   62974          34 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   62975          34 :   {
   62976             :     /* %typemap(freearg) (const char *utf8_path) */
   62977          34 :     GDALPythonFreeCStr(arg1, bToFree1);
   62978             :   }
   62979          34 :   {
   62980             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62981             :     
   62982          34 :     CPLFree(psProgressInfo);
   62983             :     
   62984             :   }
   62985          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; } }
   62986             :   return resultobj;
   62987           0 : fail:
   62988           0 :   {
   62989             :     /* %typemap(freearg) (const char *utf8_path) */
   62990           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   62991             :   }
   62992           0 :   {
   62993             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62994             :     
   62995           0 :     CPLFree(psProgressInfo);
   62996             :     
   62997             :   }
   62998             :   return NULL;
   62999             : }
   63000             : 
   63001             : 
   63002         172 : SWIGINTERN PyObject *_wrap_new_GDALBuildVRTOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63003         172 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63004         172 :   char **arg1 = (char **) 0 ;
   63005         172 :   PyObject *swig_obj[1] ;
   63006         172 :   GDALBuildVRTOptions *result = 0 ;
   63007             :   
   63008         172 :   if (!args) SWIG_fail;
   63009         172 :   swig_obj[0] = args;
   63010         172 :   {
   63011             :     /* %typemap(in) char **dict */
   63012         172 :     arg1 = NULL;
   63013         172 :     if ( PySequence_Check( swig_obj[0] ) ) {
   63014         172 :       int bErr = FALSE;
   63015         172 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   63016         172 :       if ( bErr )
   63017             :       {
   63018           0 :         SWIG_fail;
   63019             :       }
   63020             :     }
   63021           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   63022           0 :       int bErr = FALSE;
   63023           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   63024           0 :       if ( bErr )
   63025             :       {
   63026           0 :         SWIG_fail;
   63027             :       }
   63028             :     }
   63029             :     else {
   63030           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   63031           0 :       SWIG_fail;
   63032             :     }
   63033             :   }
   63034         172 :   {
   63035         172 :     const int bLocalUseExceptions = GetUseExceptions();
   63036         172 :     if ( bLocalUseExceptions ) {
   63037         144 :       pushErrorHandler();
   63038             :     }
   63039         172 :     {
   63040         172 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63041         172 :       result = (GDALBuildVRTOptions *)new_GDALBuildVRTOptions(arg1);
   63042         172 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63043             :     }
   63044         172 :     if ( bLocalUseExceptions ) {
   63045         144 :       popErrorHandler();
   63046             :     }
   63047             : #ifndef SED_HACKS
   63048             :     if ( bLocalUseExceptions ) {
   63049             :       CPLErr eclass = CPLGetLastErrorType();
   63050             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63051             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63052             :       }
   63053             :     }
   63054             : #endif
   63055             :   }
   63056         172 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALBuildVRTOptions, SWIG_POINTER_NEW |  0 );
   63057         172 :   {
   63058             :     /* %typemap(freearg) char **dict */
   63059         172 :     CSLDestroy( arg1 );
   63060             :   }
   63061         178 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   63062             :   return resultobj;
   63063           0 : fail:
   63064           0 :   {
   63065             :     /* %typemap(freearg) char **dict */
   63066           0 :     CSLDestroy( arg1 );
   63067             :   }
   63068             :   return NULL;
   63069             : }
   63070             : 
   63071             : 
   63072         169 : SWIGINTERN PyObject *_wrap_delete_GDALBuildVRTOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63073         169 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63074         169 :   GDALBuildVRTOptions *arg1 = (GDALBuildVRTOptions *) 0 ;
   63075         169 :   void *argp1 = 0 ;
   63076         169 :   int res1 = 0 ;
   63077         169 :   PyObject *swig_obj[1] ;
   63078             :   
   63079         169 :   if (!args) SWIG_fail;
   63080         169 :   swig_obj[0] = args;
   63081         169 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALBuildVRTOptions, SWIG_POINTER_DISOWN |  0 );
   63082         169 :   if (!SWIG_IsOK(res1)) {
   63083           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALBuildVRTOptions" "', argument " "1"" of type '" "GDALBuildVRTOptions *""'"); 
   63084             :   }
   63085         169 :   arg1 = reinterpret_cast< GDALBuildVRTOptions * >(argp1);
   63086         169 :   {
   63087         169 :     const int bLocalUseExceptions = GetUseExceptions();
   63088         169 :     if ( bLocalUseExceptions ) {
   63089         141 :       pushErrorHandler();
   63090             :     }
   63091         169 :     {
   63092         169 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63093         169 :       delete_GDALBuildVRTOptions(arg1);
   63094         169 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63095             :     }
   63096         169 :     if ( bLocalUseExceptions ) {
   63097         141 :       popErrorHandler();
   63098             :     }
   63099             : #ifndef SED_HACKS
   63100             :     if ( bLocalUseExceptions ) {
   63101             :       CPLErr eclass = CPLGetLastErrorType();
   63102             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63103             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63104             :       }
   63105             :     }
   63106             : #endif
   63107             :   }
   63108         169 :   resultobj = SWIG_Py_Void();
   63109         169 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   63110             :   return resultobj;
   63111             : fail:
   63112             :   return NULL;
   63113             : }
   63114             : 
   63115             : 
   63116         277 : SWIGINTERN PyObject *GDALBuildVRTOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63117         277 :   PyObject *obj;
   63118         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   63119         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALBuildVRTOptions, SWIG_NewClientData(obj));
   63120         277 :   return SWIG_Py_Void();
   63121             : }
   63122             : 
   63123         169 : SWIGINTERN PyObject *GDALBuildVRTOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63124         169 :   return SWIG_Python_InitShadowInstance(args);
   63125             : }
   63126             : 
   63127          69 : SWIGINTERN PyObject *_wrap_BuildVRTInternalObjects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63128          69 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63129          69 :   char *arg1 = (char *) 0 ;
   63130          69 :   int arg2 ;
   63131          69 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   63132          69 :   GDALBuildVRTOptions *arg4 = (GDALBuildVRTOptions *) 0 ;
   63133          69 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   63134          69 :   void *arg6 = (void *) NULL ;
   63135          69 :   int bToFree1 = 0 ;
   63136          69 :   void *argp4 = 0 ;
   63137          69 :   int res4 = 0 ;
   63138          69 :   PyObject *swig_obj[5] ;
   63139          69 :   GDALDatasetShadow *result = 0 ;
   63140             :   
   63141             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   63142          69 :   PyProgressData *psProgressInfo;
   63143          69 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   63144          69 :   psProgressInfo->nLastReported = -1;
   63145          69 :   psProgressInfo->psPyCallback = NULL;
   63146          69 :   psProgressInfo->psPyCallbackData = NULL;
   63147          69 :   arg6 = psProgressInfo;
   63148          69 :   if (!SWIG_Python_UnpackTuple(args, "BuildVRTInternalObjects", 3, 5, swig_obj)) SWIG_fail;
   63149          69 :   {
   63150             :     /* %typemap(in) (const char *utf8_path) */
   63151          69 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   63152             :     {
   63153          64 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   63154             :     }
   63155             :     else
   63156             :     {
   63157           5 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   63158             :       
   63159             :     }
   63160          69 :     if (arg1 == NULL)
   63161             :     {
   63162           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   63163           0 :       SWIG_fail;
   63164             :     }
   63165             :   }
   63166          69 :   {
   63167             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   63168          69 :     if ( !PySequence_Check(swig_obj[1]) ) {
   63169           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   63170           0 :       SWIG_fail;
   63171             :     }
   63172          69 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   63173          69 :     if( size > (Py_ssize_t)INT_MAX ) {
   63174           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   63175           0 :       SWIG_fail;
   63176             :     }
   63177          69 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   63178           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   63179           0 :       SWIG_fail;
   63180             :     }
   63181          69 :     arg2 = (int)size;
   63182          69 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   63183          69 :     if( !arg3) {
   63184           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   63185           0 :       SWIG_fail;
   63186             :     }
   63187             :     
   63188        1173 :     for( int i = 0; i<arg2; i++ ) {
   63189        1104 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   63190        1104 :       GDALDatasetShadow* rawobjectpointer = NULL;
   63191        1104 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   63192        1104 :       if (!rawobjectpointer) {
   63193           0 :         Py_DECREF(o);
   63194           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   63195           0 :         SWIG_fail;
   63196             :       }
   63197        1104 :       arg3[i] = rawobjectpointer;
   63198        1104 :       Py_DECREF(o);
   63199             :       
   63200             :     }
   63201             :   }
   63202          69 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALBuildVRTOptions, 0 |  0 );
   63203          69 :   if (!SWIG_IsOK(res4)) {
   63204           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BuildVRTInternalObjects" "', argument " "4"" of type '" "GDALBuildVRTOptions *""'"); 
   63205             :   }
   63206          69 :   arg4 = reinterpret_cast< GDALBuildVRTOptions * >(argp4);
   63207          69 :   if (swig_obj[3]) {
   63208          69 :     {
   63209             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   63210             :       /* callback_func typemap */
   63211             :       
   63212             :       /* In some cases 0 is passed instead of None. */
   63213             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   63214          69 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   63215             :       {
   63216           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   63217             :         {
   63218           0 :           swig_obj[3] = Py_None;
   63219             :         }
   63220             :       }
   63221             :       
   63222          69 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   63223           0 :         void* cbfunction = NULL;
   63224           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   63225             :             (void**)&cbfunction,
   63226             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   63227             :             SWIG_POINTER_EXCEPTION | 0 ));
   63228             :         
   63229           0 :         if ( cbfunction == GDALTermProgress ) {
   63230             :           arg5 = GDALTermProgress;
   63231             :         } else {
   63232           0 :           if (!PyCallable_Check(swig_obj[3])) {
   63233           0 :             PyErr_SetString( PyExc_RuntimeError,
   63234             :               "Object given is not a Python function" );
   63235           0 :             SWIG_fail;
   63236             :           }
   63237           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   63238           0 :           arg5 = PyProgressProxy;
   63239             :         }
   63240             :         
   63241             :       }
   63242             :       
   63243             :     }
   63244             :   }
   63245          69 :   if (swig_obj[4]) {
   63246          69 :     {
   63247             :       /* %typemap(in) ( void* callback_data=NULL)  */
   63248          69 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   63249             :     }
   63250             :   }
   63251          69 :   {
   63252          69 :     if (!arg1) {
   63253          69 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   63254             :     }
   63255             :   }
   63256          69 :   {
   63257          69 :     const int bLocalUseExceptions = GetUseExceptions();
   63258          69 :     if ( bLocalUseExceptions ) {
   63259          56 :       pushErrorHandler();
   63260             :     }
   63261          69 :     {
   63262          69 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63263          69 :       result = (GDALDatasetShadow *)wrapper_GDALBuildVRT_objects((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   63264          69 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63265             :     }
   63266          69 :     if ( bLocalUseExceptions ) {
   63267          56 :       popErrorHandler();
   63268             :     }
   63269             : #ifndef SED_HACKS
   63270             :     if ( bLocalUseExceptions ) {
   63271             :       CPLErr eclass = CPLGetLastErrorType();
   63272             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63273             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63274             :       }
   63275             :     }
   63276             : #endif
   63277             :   }
   63278          69 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   63279          69 :   {
   63280             :     /* %typemap(freearg) (const char *utf8_path) */
   63281          69 :     GDALPythonFreeCStr(arg1, bToFree1);
   63282             :   }
   63283          69 :   {
   63284             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   63285          69 :     CPLFree( arg3 );
   63286             :   }
   63287          69 :   {
   63288             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63289             :     
   63290          69 :     CPLFree(psProgressInfo);
   63291             :     
   63292             :   }
   63293          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; } }
   63294             :   return resultobj;
   63295           0 : fail:
   63296           0 :   {
   63297             :     /* %typemap(freearg) (const char *utf8_path) */
   63298           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   63299             :   }
   63300           0 :   {
   63301             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   63302           0 :     CPLFree( arg3 );
   63303             :   }
   63304           0 :   {
   63305             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63306             :     
   63307           0 :     CPLFree(psProgressInfo);
   63308             :     
   63309             :   }
   63310             :   return NULL;
   63311             : }
   63312             : 
   63313             : 
   63314         100 : SWIGINTERN PyObject *_wrap_BuildVRTInternalNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63315         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63316         100 :   char *arg1 = (char *) 0 ;
   63317         100 :   char **arg2 = (char **) 0 ;
   63318         100 :   GDALBuildVRTOptions *arg3 = (GDALBuildVRTOptions *) 0 ;
   63319         100 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   63320         100 :   void *arg5 = (void *) NULL ;
   63321         100 :   int bToFree1 = 0 ;
   63322         100 :   void *argp3 = 0 ;
   63323         100 :   int res3 = 0 ;
   63324         100 :   PyObject *swig_obj[5] ;
   63325         100 :   GDALDatasetShadow *result = 0 ;
   63326             :   
   63327             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   63328         100 :   PyProgressData *psProgressInfo;
   63329         100 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   63330         100 :   psProgressInfo->nLastReported = -1;
   63331         100 :   psProgressInfo->psPyCallback = NULL;
   63332         100 :   psProgressInfo->psPyCallbackData = NULL;
   63333         100 :   arg5 = psProgressInfo;
   63334         100 :   if (!SWIG_Python_UnpackTuple(args, "BuildVRTInternalNames", 3, 5, swig_obj)) SWIG_fail;
   63335         100 :   {
   63336             :     /* %typemap(in) (const char *utf8_path) */
   63337         100 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   63338             :     {
   63339          93 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   63340             :     }
   63341             :     else
   63342             :     {
   63343           7 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   63344             :       
   63345             :     }
   63346         100 :     if (arg1 == NULL)
   63347             :     {
   63348           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   63349           0 :       SWIG_fail;
   63350             :     }
   63351             :   }
   63352         100 :   {
   63353             :     /* %typemap(in) char **dict */
   63354         100 :     arg2 = NULL;
   63355         100 :     if ( PySequence_Check( swig_obj[1] ) ) {
   63356         100 :       int bErr = FALSE;
   63357         100 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   63358         100 :       if ( bErr )
   63359             :       {
   63360           0 :         SWIG_fail;
   63361             :       }
   63362             :     }
   63363           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   63364           0 :       int bErr = FALSE;
   63365           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   63366           0 :       if ( bErr )
   63367             :       {
   63368           0 :         SWIG_fail;
   63369             :       }
   63370             :     }
   63371             :     else {
   63372           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   63373           0 :       SWIG_fail;
   63374             :     }
   63375             :   }
   63376         100 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALBuildVRTOptions, 0 |  0 );
   63377         100 :   if (!SWIG_IsOK(res3)) {
   63378           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BuildVRTInternalNames" "', argument " "3"" of type '" "GDALBuildVRTOptions *""'"); 
   63379             :   }
   63380         100 :   arg3 = reinterpret_cast< GDALBuildVRTOptions * >(argp3);
   63381         100 :   if (swig_obj[3]) {
   63382         100 :     {
   63383             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   63384             :       /* callback_func typemap */
   63385             :       
   63386             :       /* In some cases 0 is passed instead of None. */
   63387             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   63388         100 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   63389             :       {
   63390           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   63391             :         {
   63392           0 :           swig_obj[3] = Py_None;
   63393             :         }
   63394             :       }
   63395             :       
   63396         100 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   63397           1 :         void* cbfunction = NULL;
   63398           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   63399             :             (void**)&cbfunction,
   63400             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   63401             :             SWIG_POINTER_EXCEPTION | 0 ));
   63402             :         
   63403           1 :         if ( cbfunction == GDALTermProgress ) {
   63404             :           arg4 = GDALTermProgress;
   63405             :         } else {
   63406           1 :           if (!PyCallable_Check(swig_obj[3])) {
   63407           0 :             PyErr_SetString( PyExc_RuntimeError,
   63408             :               "Object given is not a Python function" );
   63409           0 :             SWIG_fail;
   63410             :           }
   63411           1 :           psProgressInfo->psPyCallback = swig_obj[3];
   63412           1 :           arg4 = PyProgressProxy;
   63413             :         }
   63414             :         
   63415             :       }
   63416             :       
   63417             :     }
   63418             :   }
   63419         100 :   if (swig_obj[4]) {
   63420         100 :     {
   63421             :       /* %typemap(in) ( void* callback_data=NULL)  */
   63422         100 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   63423             :     }
   63424             :   }
   63425         100 :   {
   63426         100 :     if (!arg1) {
   63427         100 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   63428             :     }
   63429             :   }
   63430         100 :   {
   63431         100 :     const int bLocalUseExceptions = GetUseExceptions();
   63432         100 :     if ( bLocalUseExceptions ) {
   63433          85 :       pushErrorHandler();
   63434             :     }
   63435         100 :     {
   63436         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63437         100 :       result = (GDALDatasetShadow *)wrapper_GDALBuildVRT_names((char const *)arg1,arg2,arg3,arg4,arg5);
   63438         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63439             :     }
   63440         100 :     if ( bLocalUseExceptions ) {
   63441          85 :       popErrorHandler();
   63442             :     }
   63443             : #ifndef SED_HACKS
   63444             :     if ( bLocalUseExceptions ) {
   63445             :       CPLErr eclass = CPLGetLastErrorType();
   63446             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63447             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63448             :       }
   63449             :     }
   63450             : #endif
   63451             :   }
   63452         100 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   63453         100 :   {
   63454             :     /* %typemap(freearg) (const char *utf8_path) */
   63455         100 :     GDALPythonFreeCStr(arg1, bToFree1);
   63456             :   }
   63457         100 :   {
   63458             :     /* %typemap(freearg) char **dict */
   63459         100 :     CSLDestroy( arg2 );
   63460             :   }
   63461         100 :   {
   63462             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63463             :     
   63464         100 :     CPLFree(psProgressInfo);
   63465             :     
   63466             :   }
   63467         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; } }
   63468             :   return resultobj;
   63469           0 : fail:
   63470           0 :   {
   63471             :     /* %typemap(freearg) (const char *utf8_path) */
   63472           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   63473             :   }
   63474           0 :   {
   63475             :     /* %typemap(freearg) char **dict */
   63476           0 :     CSLDestroy( arg2 );
   63477             :   }
   63478           0 :   {
   63479             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63480             :     
   63481           0 :     CPLFree(psProgressInfo);
   63482             :     
   63483             :   }
   63484             :   return NULL;
   63485             : }
   63486             : 
   63487             : 
   63488          23 : SWIGINTERN PyObject *_wrap_new_GDALTileIndexOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63489          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63490          23 :   char **arg1 = (char **) 0 ;
   63491          23 :   PyObject *swig_obj[1] ;
   63492          23 :   GDALTileIndexOptions *result = 0 ;
   63493             :   
   63494          23 :   if (!args) SWIG_fail;
   63495          23 :   swig_obj[0] = args;
   63496          23 :   {
   63497             :     /* %typemap(in) char **dict */
   63498          23 :     arg1 = NULL;
   63499          23 :     if ( PySequence_Check( swig_obj[0] ) ) {
   63500          23 :       int bErr = FALSE;
   63501          23 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   63502          23 :       if ( bErr )
   63503             :       {
   63504           0 :         SWIG_fail;
   63505             :       }
   63506             :     }
   63507           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   63508           0 :       int bErr = FALSE;
   63509           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   63510           0 :       if ( bErr )
   63511             :       {
   63512           0 :         SWIG_fail;
   63513             :       }
   63514             :     }
   63515             :     else {
   63516           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   63517           0 :       SWIG_fail;
   63518             :     }
   63519             :   }
   63520          23 :   {
   63521          23 :     const int bLocalUseExceptions = GetUseExceptions();
   63522          23 :     if ( bLocalUseExceptions ) {
   63523          23 :       pushErrorHandler();
   63524             :     }
   63525          23 :     {
   63526          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63527          23 :       result = (GDALTileIndexOptions *)new_GDALTileIndexOptions(arg1);
   63528          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63529             :     }
   63530          23 :     if ( bLocalUseExceptions ) {
   63531          23 :       popErrorHandler();
   63532             :     }
   63533             : #ifndef SED_HACKS
   63534             :     if ( bLocalUseExceptions ) {
   63535             :       CPLErr eclass = CPLGetLastErrorType();
   63536             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63537             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63538             :       }
   63539             :     }
   63540             : #endif
   63541             :   }
   63542          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTileIndexOptions, SWIG_POINTER_NEW |  0 );
   63543          23 :   {
   63544             :     /* %typemap(freearg) char **dict */
   63545          23 :     CSLDestroy( arg1 );
   63546             :   }
   63547          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; } }
   63548             :   return resultobj;
   63549           0 : fail:
   63550           0 :   {
   63551             :     /* %typemap(freearg) char **dict */
   63552           0 :     CSLDestroy( arg1 );
   63553             :   }
   63554             :   return NULL;
   63555             : }
   63556             : 
   63557             : 
   63558          23 : SWIGINTERN PyObject *_wrap_delete_GDALTileIndexOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63559          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63560          23 :   GDALTileIndexOptions *arg1 = (GDALTileIndexOptions *) 0 ;
   63561          23 :   void *argp1 = 0 ;
   63562          23 :   int res1 = 0 ;
   63563          23 :   PyObject *swig_obj[1] ;
   63564             :   
   63565          23 :   if (!args) SWIG_fail;
   63566          23 :   swig_obj[0] = args;
   63567          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTileIndexOptions, SWIG_POINTER_DISOWN |  0 );
   63568          23 :   if (!SWIG_IsOK(res1)) {
   63569           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTileIndexOptions" "', argument " "1"" of type '" "GDALTileIndexOptions *""'"); 
   63570             :   }
   63571          23 :   arg1 = reinterpret_cast< GDALTileIndexOptions * >(argp1);
   63572          23 :   {
   63573          23 :     const int bLocalUseExceptions = GetUseExceptions();
   63574          23 :     if ( bLocalUseExceptions ) {
   63575          23 :       pushErrorHandler();
   63576             :     }
   63577          23 :     {
   63578          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63579          23 :       delete_GDALTileIndexOptions(arg1);
   63580          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63581             :     }
   63582          23 :     if ( bLocalUseExceptions ) {
   63583          23 :       popErrorHandler();
   63584             :     }
   63585             : #ifndef SED_HACKS
   63586             :     if ( bLocalUseExceptions ) {
   63587             :       CPLErr eclass = CPLGetLastErrorType();
   63588             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63589             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63590             :       }
   63591             :     }
   63592             : #endif
   63593             :   }
   63594          23 :   resultobj = SWIG_Py_Void();
   63595          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; } }
   63596             :   return resultobj;
   63597             : fail:
   63598             :   return NULL;
   63599             : }
   63600             : 
   63601             : 
   63602         277 : SWIGINTERN PyObject *GDALTileIndexOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63603         277 :   PyObject *obj;
   63604         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   63605         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTileIndexOptions, SWIG_NewClientData(obj));
   63606         277 :   return SWIG_Py_Void();
   63607             : }
   63608             : 
   63609          23 : SWIGINTERN PyObject *GDALTileIndexOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63610          23 :   return SWIG_Python_InitShadowInstance(args);
   63611             : }
   63612             : 
   63613          23 : SWIGINTERN PyObject *_wrap_TileIndexInternalNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63614          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63615          23 :   char *arg1 = (char *) 0 ;
   63616          23 :   char **arg2 = (char **) 0 ;
   63617          23 :   GDALTileIndexOptions *arg3 = (GDALTileIndexOptions *) 0 ;
   63618          23 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   63619          23 :   void *arg5 = (void *) NULL ;
   63620          23 :   int bToFree1 = 0 ;
   63621          23 :   void *argp3 = 0 ;
   63622          23 :   int res3 = 0 ;
   63623          23 :   PyObject *swig_obj[5] ;
   63624          23 :   GDALDatasetShadow *result = 0 ;
   63625             :   
   63626             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   63627          23 :   PyProgressData *psProgressInfo;
   63628          23 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   63629          23 :   psProgressInfo->nLastReported = -1;
   63630          23 :   psProgressInfo->psPyCallback = NULL;
   63631          23 :   psProgressInfo->psPyCallbackData = NULL;
   63632          23 :   arg5 = psProgressInfo;
   63633          23 :   if (!SWIG_Python_UnpackTuple(args, "TileIndexInternalNames", 3, 5, swig_obj)) SWIG_fail;
   63634          23 :   {
   63635             :     /* %typemap(in) (const char *utf8_path) */
   63636          23 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   63637             :     {
   63638          23 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   63639             :     }
   63640             :     else
   63641             :     {
   63642           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   63643             :       
   63644             :     }
   63645          23 :     if (arg1 == NULL)
   63646             :     {
   63647           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   63648           0 :       SWIG_fail;
   63649             :     }
   63650             :   }
   63651          23 :   {
   63652             :     /* %typemap(in) char **dict */
   63653          23 :     arg2 = NULL;
   63654          23 :     if ( PySequence_Check( swig_obj[1] ) ) {
   63655          23 :       int bErr = FALSE;
   63656          23 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   63657          23 :       if ( bErr )
   63658             :       {
   63659           0 :         SWIG_fail;
   63660             :       }
   63661             :     }
   63662           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   63663           0 :       int bErr = FALSE;
   63664           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   63665           0 :       if ( bErr )
   63666             :       {
   63667           0 :         SWIG_fail;
   63668             :       }
   63669             :     }
   63670             :     else {
   63671           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   63672           0 :       SWIG_fail;
   63673             :     }
   63674             :   }
   63675          23 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALTileIndexOptions, 0 |  0 );
   63676          23 :   if (!SWIG_IsOK(res3)) {
   63677           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TileIndexInternalNames" "', argument " "3"" of type '" "GDALTileIndexOptions *""'"); 
   63678             :   }
   63679          23 :   arg3 = reinterpret_cast< GDALTileIndexOptions * >(argp3);
   63680          23 :   if (swig_obj[3]) {
   63681          23 :     {
   63682             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   63683             :       /* callback_func typemap */
   63684             :       
   63685             :       /* In some cases 0 is passed instead of None. */
   63686             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   63687          23 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   63688             :       {
   63689           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   63690             :         {
   63691           0 :           swig_obj[3] = Py_None;
   63692             :         }
   63693             :       }
   63694             :       
   63695          23 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   63696           0 :         void* cbfunction = NULL;
   63697           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   63698             :             (void**)&cbfunction,
   63699             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   63700             :             SWIG_POINTER_EXCEPTION | 0 ));
   63701             :         
   63702           0 :         if ( cbfunction == GDALTermProgress ) {
   63703             :           arg4 = GDALTermProgress;
   63704             :         } else {
   63705           0 :           if (!PyCallable_Check(swig_obj[3])) {
   63706           0 :             PyErr_SetString( PyExc_RuntimeError,
   63707             :               "Object given is not a Python function" );
   63708           0 :             SWIG_fail;
   63709             :           }
   63710           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   63711           0 :           arg4 = PyProgressProxy;
   63712             :         }
   63713             :         
   63714             :       }
   63715             :       
   63716             :     }
   63717             :   }
   63718          23 :   if (swig_obj[4]) {
   63719          23 :     {
   63720             :       /* %typemap(in) ( void* callback_data=NULL)  */
   63721          23 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   63722             :     }
   63723             :   }
   63724          23 :   {
   63725          23 :     if (!arg1) {
   63726          23 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   63727             :     }
   63728             :   }
   63729          23 :   {
   63730          23 :     const int bLocalUseExceptions = GetUseExceptions();
   63731          23 :     if ( bLocalUseExceptions ) {
   63732          23 :       pushErrorHandler();
   63733             :     }
   63734          23 :     {
   63735          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63736          23 :       result = (GDALDatasetShadow *)wrapper_TileIndex_names((char const *)arg1,arg2,arg3,arg4,arg5);
   63737          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63738             :     }
   63739          23 :     if ( bLocalUseExceptions ) {
   63740          23 :       popErrorHandler();
   63741             :     }
   63742             : #ifndef SED_HACKS
   63743             :     if ( bLocalUseExceptions ) {
   63744             :       CPLErr eclass = CPLGetLastErrorType();
   63745             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63746             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63747             :       }
   63748             :     }
   63749             : #endif
   63750             :   }
   63751          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   63752          23 :   {
   63753             :     /* %typemap(freearg) (const char *utf8_path) */
   63754          23 :     GDALPythonFreeCStr(arg1, bToFree1);
   63755             :   }
   63756          23 :   {
   63757             :     /* %typemap(freearg) char **dict */
   63758          23 :     CSLDestroy( arg2 );
   63759             :   }
   63760          23 :   {
   63761             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63762             :     
   63763          23 :     CPLFree(psProgressInfo);
   63764             :     
   63765             :   }
   63766          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; } }
   63767             :   return resultobj;
   63768           0 : fail:
   63769           0 :   {
   63770             :     /* %typemap(freearg) (const char *utf8_path) */
   63771           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   63772             :   }
   63773           0 :   {
   63774             :     /* %typemap(freearg) char **dict */
   63775           0 :     CSLDestroy( arg2 );
   63776             :   }
   63777           0 :   {
   63778             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63779             :     
   63780           0 :     CPLFree(psProgressInfo);
   63781             :     
   63782             :   }
   63783             :   return NULL;
   63784             : }
   63785             : 
   63786             : 
   63787         104 : SWIGINTERN PyObject *_wrap_new_GDALMultiDimTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63788         104 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63789         104 :   char **arg1 = (char **) 0 ;
   63790         104 :   PyObject *swig_obj[1] ;
   63791         104 :   GDALMultiDimTranslateOptions *result = 0 ;
   63792             :   
   63793         104 :   if (!args) SWIG_fail;
   63794         104 :   swig_obj[0] = args;
   63795         104 :   {
   63796             :     /* %typemap(in) char **dict */
   63797         104 :     arg1 = NULL;
   63798         104 :     if ( PySequence_Check( swig_obj[0] ) ) {
   63799         104 :       int bErr = FALSE;
   63800         104 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   63801         104 :       if ( bErr )
   63802             :       {
   63803           0 :         SWIG_fail;
   63804             :       }
   63805             :     }
   63806           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   63807           0 :       int bErr = FALSE;
   63808           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   63809           0 :       if ( bErr )
   63810             :       {
   63811           0 :         SWIG_fail;
   63812             :       }
   63813             :     }
   63814             :     else {
   63815           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   63816           0 :       SWIG_fail;
   63817             :     }
   63818             :   }
   63819         104 :   {
   63820         104 :     const int bLocalUseExceptions = GetUseExceptions();
   63821         104 :     if ( bLocalUseExceptions ) {
   63822          25 :       pushErrorHandler();
   63823             :     }
   63824         104 :     {
   63825         104 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63826         104 :       result = (GDALMultiDimTranslateOptions *)new_GDALMultiDimTranslateOptions(arg1);
   63827         104 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63828             :     }
   63829         104 :     if ( bLocalUseExceptions ) {
   63830          25 :       popErrorHandler();
   63831             :     }
   63832             : #ifndef SED_HACKS
   63833             :     if ( bLocalUseExceptions ) {
   63834             :       CPLErr eclass = CPLGetLastErrorType();
   63835             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63836             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63837             :       }
   63838             :     }
   63839             : #endif
   63840             :   }
   63841         104 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_POINTER_NEW |  0 );
   63842         104 :   {
   63843             :     /* %typemap(freearg) char **dict */
   63844         104 :     CSLDestroy( arg1 );
   63845             :   }
   63846         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; } }
   63847             :   return resultobj;
   63848           0 : fail:
   63849           0 :   {
   63850             :     /* %typemap(freearg) char **dict */
   63851           0 :     CSLDestroy( arg1 );
   63852             :   }
   63853             :   return NULL;
   63854             : }
   63855             : 
   63856             : 
   63857         104 : SWIGINTERN PyObject *_wrap_delete_GDALMultiDimTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63858         104 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63859         104 :   GDALMultiDimTranslateOptions *arg1 = (GDALMultiDimTranslateOptions *) 0 ;
   63860         104 :   void *argp1 = 0 ;
   63861         104 :   int res1 = 0 ;
   63862         104 :   PyObject *swig_obj[1] ;
   63863             :   
   63864         104 :   if (!args) SWIG_fail;
   63865         104 :   swig_obj[0] = args;
   63866         104 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   63867         104 :   if (!SWIG_IsOK(res1)) {
   63868           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALMultiDimTranslateOptions" "', argument " "1"" of type '" "GDALMultiDimTranslateOptions *""'"); 
   63869             :   }
   63870         104 :   arg1 = reinterpret_cast< GDALMultiDimTranslateOptions * >(argp1);
   63871         104 :   {
   63872         104 :     const int bLocalUseExceptions = GetUseExceptions();
   63873         104 :     if ( bLocalUseExceptions ) {
   63874          25 :       pushErrorHandler();
   63875             :     }
   63876         104 :     {
   63877         104 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63878         104 :       delete_GDALMultiDimTranslateOptions(arg1);
   63879         104 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63880             :     }
   63881         104 :     if ( bLocalUseExceptions ) {
   63882          25 :       popErrorHandler();
   63883             :     }
   63884             : #ifndef SED_HACKS
   63885             :     if ( bLocalUseExceptions ) {
   63886             :       CPLErr eclass = CPLGetLastErrorType();
   63887             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63888             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63889             :       }
   63890             :     }
   63891             : #endif
   63892             :   }
   63893         104 :   resultobj = SWIG_Py_Void();
   63894         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; } }
   63895             :   return resultobj;
   63896             : fail:
   63897             :   return NULL;
   63898             : }
   63899             : 
   63900             : 
   63901         277 : SWIGINTERN PyObject *GDALMultiDimTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63902         277 :   PyObject *obj;
   63903         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   63904         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_NewClientData(obj));
   63905         277 :   return SWIG_Py_Void();
   63906             : }
   63907             : 
   63908         104 : SWIGINTERN PyObject *GDALMultiDimTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63909         104 :   return SWIG_Python_InitShadowInstance(args);
   63910             : }
   63911             : 
   63912         104 : SWIGINTERN PyObject *_wrap_wrapper_GDALMultiDimTranslateDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63913         104 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63914         104 :   char *arg1 = (char *) 0 ;
   63915         104 :   int arg2 ;
   63916         104 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   63917         104 :   GDALMultiDimTranslateOptions *arg4 = (GDALMultiDimTranslateOptions *) 0 ;
   63918         104 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   63919         104 :   void *arg6 = (void *) NULL ;
   63920         104 :   int bToFree1 = 0 ;
   63921         104 :   void *argp4 = 0 ;
   63922         104 :   int res4 = 0 ;
   63923         104 :   PyObject *swig_obj[5] ;
   63924         104 :   GDALDatasetShadow *result = 0 ;
   63925             :   
   63926             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   63927         104 :   PyProgressData *psProgressInfo;
   63928         104 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   63929         104 :   psProgressInfo->nLastReported = -1;
   63930         104 :   psProgressInfo->psPyCallback = NULL;
   63931         104 :   psProgressInfo->psPyCallbackData = NULL;
   63932         104 :   arg6 = psProgressInfo;
   63933         104 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALMultiDimTranslateDestName", 3, 5, swig_obj)) SWIG_fail;
   63934         104 :   {
   63935             :     /* %typemap(in) (const char *utf8_path) */
   63936         104 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   63937             :     {
   63938           7 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   63939             :     }
   63940             :     else
   63941             :     {
   63942          97 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   63943             :       
   63944             :     }
   63945         104 :     if (arg1 == NULL)
   63946             :     {
   63947           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   63948           0 :       SWIG_fail;
   63949             :     }
   63950             :   }
   63951         104 :   {
   63952             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   63953         104 :     if ( !PySequence_Check(swig_obj[1]) ) {
   63954           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   63955           0 :       SWIG_fail;
   63956             :     }
   63957         104 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   63958         104 :     if( size > (Py_ssize_t)INT_MAX ) {
   63959           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   63960           0 :       SWIG_fail;
   63961             :     }
   63962         104 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   63963           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   63964           0 :       SWIG_fail;
   63965             :     }
   63966         104 :     arg2 = (int)size;
   63967         104 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   63968         104 :     if( !arg3) {
   63969           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   63970           0 :       SWIG_fail;
   63971             :     }
   63972             :     
   63973         208 :     for( int i = 0; i<arg2; i++ ) {
   63974         104 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   63975         104 :       GDALDatasetShadow* rawobjectpointer = NULL;
   63976         104 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   63977         104 :       if (!rawobjectpointer) {
   63978           0 :         Py_DECREF(o);
   63979           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   63980           0 :         SWIG_fail;
   63981             :       }
   63982         104 :       arg3[i] = rawobjectpointer;
   63983         104 :       Py_DECREF(o);
   63984             :       
   63985             :     }
   63986             :   }
   63987         104 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALMultiDimTranslateOptions, 0 |  0 );
   63988         104 :   if (!SWIG_IsOK(res4)) {
   63989           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALMultiDimTranslateDestName" "', argument " "4"" of type '" "GDALMultiDimTranslateOptions *""'"); 
   63990             :   }
   63991         104 :   arg4 = reinterpret_cast< GDALMultiDimTranslateOptions * >(argp4);
   63992         104 :   if (swig_obj[3]) {
   63993         104 :     {
   63994             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   63995             :       /* callback_func typemap */
   63996             :       
   63997             :       /* In some cases 0 is passed instead of None. */
   63998             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   63999         104 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   64000             :       {
   64001           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   64002             :         {
   64003           0 :           swig_obj[3] = Py_None;
   64004             :         }
   64005             :       }
   64006             :       
   64007         104 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   64008           0 :         void* cbfunction = NULL;
   64009           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   64010             :             (void**)&cbfunction,
   64011             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   64012             :             SWIG_POINTER_EXCEPTION | 0 ));
   64013             :         
   64014           0 :         if ( cbfunction == GDALTermProgress ) {
   64015             :           arg5 = GDALTermProgress;
   64016             :         } else {
   64017           0 :           if (!PyCallable_Check(swig_obj[3])) {
   64018           0 :             PyErr_SetString( PyExc_RuntimeError,
   64019             :               "Object given is not a Python function" );
   64020           0 :             SWIG_fail;
   64021             :           }
   64022           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   64023           0 :           arg5 = PyProgressProxy;
   64024             :         }
   64025             :         
   64026             :       }
   64027             :       
   64028             :     }
   64029             :   }
   64030         104 :   if (swig_obj[4]) {
   64031         104 :     {
   64032             :       /* %typemap(in) ( void* callback_data=NULL)  */
   64033         104 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   64034             :     }
   64035             :   }
   64036         104 :   {
   64037         104 :     if (!arg1) {
   64038         104 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   64039             :     }
   64040             :   }
   64041         104 :   {
   64042         104 :     const int bLocalUseExceptions = GetUseExceptions();
   64043         104 :     if ( bLocalUseExceptions ) {
   64044          25 :       pushErrorHandler();
   64045             :     }
   64046         104 :     {
   64047         104 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   64048         104 :       result = (GDALDatasetShadow *)wrapper_GDALMultiDimTranslateDestName((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   64049         104 :       SWIG_PYTHON_THREAD_END_ALLOW;
   64050             :     }
   64051         104 :     if ( bLocalUseExceptions ) {
   64052          25 :       popErrorHandler();
   64053             :     }
   64054             : #ifndef SED_HACKS
   64055             :     if ( bLocalUseExceptions ) {
   64056             :       CPLErr eclass = CPLGetLastErrorType();
   64057             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   64058             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   64059             :       }
   64060             :     }
   64061             : #endif
   64062             :   }
   64063         104 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   64064         104 :   {
   64065             :     /* %typemap(freearg) (const char *utf8_path) */
   64066         104 :     GDALPythonFreeCStr(arg1, bToFree1);
   64067             :   }
   64068         104 :   {
   64069             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   64070         104 :     CPLFree( arg3 );
   64071             :   }
   64072         104 :   {
   64073             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   64074             :     
   64075         104 :     CPLFree(psProgressInfo);
   64076             :     
   64077             :   }
   64078         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; } }
   64079             :   return resultobj;
   64080           0 : fail:
   64081           0 :   {
   64082             :     /* %typemap(freearg) (const char *utf8_path) */
   64083           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   64084             :   }
   64085           0 :   {
   64086             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   64087           0 :     CPLFree( arg3 );
   64088             :   }
   64089           0 :   {
   64090             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   64091             :     
   64092           0 :     CPLFree(psProgressInfo);
   64093             :     
   64094             :   }
   64095             :   return NULL;
   64096             : }
   64097             : 
   64098             : 
   64099             : static PyMethodDef SwigMethods[] = {
   64100             :    { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
   64101             :    { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
   64102             :    { "_GetExceptionsLocal", _wrap__GetExceptionsLocal, METH_NOARGS, "_GetExceptionsLocal() -> int"},
   64103             :    { "_SetExceptionsLocal", _wrap__SetExceptionsLocal, METH_O, "_SetExceptionsLocal(int bVal)"},
   64104             :    { "_UseExceptions", _wrap__UseExceptions, METH_NOARGS, "_UseExceptions()"},
   64105             :    { "_DontUseExceptions", _wrap__DontUseExceptions, METH_NOARGS, "_DontUseExceptions()"},
   64106             :    { "_UserHasSpecifiedIfUsingExceptions", _wrap__UserHasSpecifiedIfUsingExceptions, METH_NOARGS, "_UserHasSpecifiedIfUsingExceptions() -> int"},
   64107             :    { "VSIFReadL", _wrap_VSIFReadL, METH_VARARGS, "VSIFReadL(unsigned int nMembSize, unsigned int nMembCount, VSILFILE fp) -> unsigned int"},
   64108             :    { "VSIGetMemFileBuffer_unsafe", _wrap_VSIGetMemFileBuffer_unsafe, METH_O, "VSIGetMemFileBuffer_unsafe(char const * utf8_path)"},
   64109             :    { "Debug", _wrap_Debug, METH_VARARGS, "Debug(char const * msg_class, char const * message)"},
   64110             :    { "SetErrorHandler", _wrap_SetErrorHandler, METH_VARARGS, "SetErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr"},
   64111             :    { "SetCurrentErrorHandlerCatchDebug", _wrap_SetCurrentErrorHandlerCatchDebug, METH_O, "SetCurrentErrorHandlerCatchDebug(int bCatchDebug)"},
   64112             :    { "PushErrorHandler", _wrap_PushErrorHandler, METH_VARARGS, "PushErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr"},
   64113             :    { "PopErrorHandler", _wrap_PopErrorHandler, METH_NOARGS, "PopErrorHandler()"},
   64114             :    { "Error", _wrap_Error, METH_VARARGS, "Error(CPLErr msg_class=CE_Failure, int err_code=0, char const * msg=\"error\")"},
   64115             :    { "GOA2GetAuthorizationURL", _wrap_GOA2GetAuthorizationURL, METH_O, "GOA2GetAuthorizationURL(char const * pszScope) -> retStringAndCPLFree *"},
   64116             :    { "GOA2GetRefreshToken", _wrap_GOA2GetRefreshToken, METH_VARARGS, "GOA2GetRefreshToken(char const * pszAuthToken, char const * pszScope) -> retStringAndCPLFree *"},
   64117             :    { "GOA2GetAccessToken", _wrap_GOA2GetAccessToken, METH_VARARGS, "GOA2GetAccessToken(char const * pszRefreshToken, char const * pszScope) -> retStringAndCPLFree *"},
   64118             :    { "ErrorReset", _wrap_ErrorReset, METH_NOARGS, "ErrorReset()"},
   64119             :    { "wrapper_EscapeString", (PyCFunction)(void(*)(void))_wrap_wrapper_EscapeString, METH_VARARGS|METH_KEYWORDS, "wrapper_EscapeString(int len, int scheme=CPLES_SQL) -> retStringAndCPLFree *"},
   64120             :    { "EscapeBinary", (PyCFunction)(void(*)(void))_wrap_EscapeBinary, METH_VARARGS|METH_KEYWORDS, "EscapeBinary(int len, int scheme=CPLES_SQL)"},
   64121             :    { "GetLastErrorNo", _wrap_GetLastErrorNo, METH_NOARGS, "GetLastErrorNo() -> int"},
   64122             :    { "GetLastErrorType", _wrap_GetLastErrorType, METH_NOARGS, "GetLastErrorType() -> int"},
   64123             :    { "GetLastErrorMsg", _wrap_GetLastErrorMsg, METH_NOARGS, "GetLastErrorMsg() -> char const *"},
   64124             :    { "GetErrorCounter", _wrap_GetErrorCounter, METH_NOARGS, "GetErrorCounter() -> unsigned int"},
   64125             :    { "VSIGetLastErrorNo", _wrap_VSIGetLastErrorNo, METH_NOARGS, "VSIGetLastErrorNo() -> int"},
   64126             :    { "VSIGetLastErrorMsg", _wrap_VSIGetLastErrorMsg, METH_NOARGS, "VSIGetLastErrorMsg() -> char const *"},
   64127             :    { "VSIErrorReset", _wrap_VSIErrorReset, METH_NOARGS, "VSIErrorReset()"},
   64128             :    { "PushFinderLocation", _wrap_PushFinderLocation, METH_O, "PushFinderLocation(char const * utf8_path)"},
   64129             :    { "PopFinderLocation", _wrap_PopFinderLocation, METH_NOARGS, "PopFinderLocation()"},
   64130             :    { "FinderClean", _wrap_FinderClean, METH_NOARGS, "FinderClean()"},
   64131             :    { "FindFile", _wrap_FindFile, METH_VARARGS, "FindFile(char const * pszClass, char const * utf8_path) -> char const *"},
   64132             :    { "ReadDir", _wrap_ReadDir, METH_VARARGS, "ReadDir(char const * utf8_path, int nMaxFiles=0) -> char **"},
   64133             :    { "ReadDirRecursive", _wrap_ReadDirRecursive, METH_O, "ReadDirRecursive(char const * utf8_path) -> char **"},
   64134             :    { "OpenDir", _wrap_OpenDir, METH_VARARGS, "OpenDir(char const * utf8_path, int nRecurseDepth=-1, char ** options=None) -> VSIDIR *"},
   64135             :    { "DirEntry_name_get", _wrap_DirEntry_name_get, METH_O, "DirEntry_name_get(DirEntry self) -> char *"},
   64136             :    { "DirEntry_mode_get", _wrap_DirEntry_mode_get, METH_O, "DirEntry_mode_get(DirEntry self) -> int"},
   64137             :    { "DirEntry_size_get", _wrap_DirEntry_size_get, METH_O, "DirEntry_size_get(DirEntry self) -> GIntBig"},
   64138             :    { "DirEntry_mtime_get", _wrap_DirEntry_mtime_get, METH_O, "DirEntry_mtime_get(DirEntry self) -> GIntBig"},
   64139             :    { "DirEntry_modeKnown_get", _wrap_DirEntry_modeKnown_get, METH_O, "DirEntry_modeKnown_get(DirEntry self) -> bool"},
   64140             :    { "DirEntry_sizeKnown_get", _wrap_DirEntry_sizeKnown_get, METH_O, "DirEntry_sizeKnown_get(DirEntry self) -> bool"},
   64141             :    { "DirEntry_mtimeKnown_get", _wrap_DirEntry_mtimeKnown_get, METH_O, "DirEntry_mtimeKnown_get(DirEntry self) -> bool"},
   64142             :    { "DirEntry_extra_get", _wrap_DirEntry_extra_get, METH_O, "DirEntry_extra_get(DirEntry self) -> char **"},
   64143             :    { "new_DirEntry", _wrap_new_DirEntry, METH_O, "new_DirEntry(DirEntry entryIn) -> DirEntry"},
   64144             :    { "delete_DirEntry", _wrap_delete_DirEntry, METH_O, "delete_DirEntry(DirEntry self)"},
   64145             :    { "DirEntry_IsDirectory", _wrap_DirEntry_IsDirectory, METH_O, "DirEntry_IsDirectory(DirEntry self) -> bool"},
   64146             :    { "DirEntry_swigregister", DirEntry_swigregister, METH_O, NULL},
   64147             :    { "DirEntry_swiginit", DirEntry_swiginit, METH_VARARGS, NULL},
   64148             :    { "GetNextDirEntry", _wrap_GetNextDirEntry, METH_O, "GetNextDirEntry(VSIDIR * dir) -> DirEntry"},
   64149             :    { "CloseDir", _wrap_CloseDir, METH_O, "CloseDir(VSIDIR * dir)"},
   64150             :    { "SetConfigOption", _wrap_SetConfigOption, METH_VARARGS, "\n"
   64151             :     "SetConfigOption(char const * pszKey, char const * pszValue)\n"
   64152             :     "\n"
   64153             :     "\n"
   64154             :     "Set the value of a configuration option for all threads.\n"
   64155             :     "See :cpp:func:`CPLSetConfigOption`.\n"
   64156             :     "\n"
   64157             :     "Parameters\n"
   64158             :     "----------\n"
   64159             :     "pszKey : str\n"
   64160             :     "    name of the configuration option\n"
   64161             :     "pszValue : str\n"
   64162             :     "    value of the configuration option\n"
   64163             :     "\n"
   64164             :     "See Also\n"
   64165             :     "--------\n"
   64166             :     ":py:func:`SetThreadLocalConfigOption`\n"
   64167             :     ":py:func:`config_option`\n"
   64168             :     ":py:func:`config_options`\n"
   64169             :     "\n"
   64170             :     "\n"
   64171             :     ""},
   64172             :    { "SetThreadLocalConfigOption", _wrap_SetThreadLocalConfigOption, METH_VARARGS, "\n"
   64173             :     "SetThreadLocalConfigOption(char const * pszKey, char const * pszValue)\n"
   64174             :     "\n"
   64175             :     "\n"
   64176             :     "Set the value of a configuration option for the current thread.\n"
   64177             :     "See :cpp:func:`CPLSetThreadLocalConfigOption`.\n"
   64178             :     "\n"
   64179             :     "Parameters\n"
   64180             :     "----------\n"
   64181             :     "pszKey : str\n"
   64182             :     "    name of the configuration option\n"
   64183             :     "pszValue : str\n"
   64184             :     "    value of the configuration option\n"
   64185             :     "\n"
   64186             :     "See Also\n"
   64187             :     "--------\n"
   64188             :     ":py:func:`SetConfigOption`\n"
   64189             :     ":py:func:`config_option`\n"
   64190             :     ":py:func:`config_options`\n"
   64191             :     "\n"
   64192             :     ""},
   64193             :    { "GetConfigOption", _wrap_GetConfigOption, METH_VARARGS, "\n"
   64194             :     "GetConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   64195             :     "\n"
   64196             :     "\n"
   64197             :     "Return the value of a configuration option.\n"
   64198             :     "See :cpp:func:`CPLGetConfigOption`.\n"
   64199             :     "\n"
   64200             :     "Parameters\n"
   64201             :     "----------\n"
   64202             :     "pszKey : str\n"
   64203             :     "    name of the configuration option\n"
   64204             :     "pszDefault : str, optional\n"
   64205             :     "    default value to return if the option has not been set\n"
   64206             :     "\n"
   64207             :     "Returns\n"
   64208             :     "-------\n"
   64209             :     "str\n"
   64210             :     "\n"
   64211             :     "See Also\n"
   64212             :     "--------\n"
   64213             :     ":py:func:`GetConfigOptions`\n"
   64214             :     ":py:func:`GetThreadLocalConfigOption`\n"
   64215             :     "\n"
   64216             :     ""},
   64217             :    { "GetGlobalConfigOption", _wrap_GetGlobalConfigOption, METH_VARARGS, "\n"
   64218             :     "GetGlobalConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   64219             :     "\n"
   64220             :     "\n"
   64221             :     "Return the value of a global (not thread-local) configuration option.\n"
   64222             :     "See :cpp:func:`CPLGetGlobalConfigOption`.\n"
   64223             :     "\n"
   64224             :     "Parameters\n"
   64225             :     "----------\n"
   64226             :     "pszKey : str\n"
   64227             :     "    name of the configuration option\n"
   64228             :     "pszDefault : str, optional\n"
   64229             :     "    default value to return if the option has not been set\n"
   64230             :     "\n"
   64231             :     "Returns\n"
   64232             :     "-------\n"
   64233             :     "str\n"
   64234             :     "\n"
   64235             :     ""},
   64236             :    { "GetThreadLocalConfigOption", _wrap_GetThreadLocalConfigOption, METH_VARARGS, "\n"
   64237             :     "GetThreadLocalConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   64238             :     "\n"
   64239             :     "\n"
   64240             :     "Return the value of a thread-local configuration option.\n"
   64241             :     "See :cpp:func:`CPLGetThreadLocalConfigOption`.\n"
   64242             :     "\n"
   64243             :     "Parameters\n"
   64244             :     "----------\n"
   64245             :     "pszKey : str\n"
   64246             :     "    name of the configuration option\n"
   64247             :     "pszDefault : str, optional\n"
   64248             :     "    default value to return if the option has not been set\n"
   64249             :     "\n"
   64250             :     "Returns\n"
   64251             :     "-------\n"
   64252             :     "str\n"
   64253             :     "\n"
   64254             :     "\n"
   64255             :     ""},
   64256             :    { "GetConfigOptions", _wrap_GetConfigOptions, METH_NOARGS, "\n"
   64257             :     "GetConfigOptions() -> char **\n"
   64258             :     "\n"
   64259             :     "\n"
   64260             :     "Return a dictionary of currently set configuration options.\n"
   64261             :     "See :cpp:func:`CPLGetConfigOptions`.\n"
   64262             :     "\n"
   64263             :     "Returns\n"
   64264             :     "-------\n"
   64265             :     "dict\n"
   64266             :     "\n"
   64267             :     "Examples\n"
   64268             :     "--------\n"
   64269             :     ">>> with gdal.config_options({'A': '3', 'B': '4'}):\n"
   64270             :     "...     gdal.SetConfigOption('C', '5')\n"
   64271             :     "...     gdal.GetConfigOptions()\n"
   64272             :     "...\n"
   64273             :     "{'C': '5', 'A': '3', 'B': '4'}\n"
   64274             :     "\n"
   64275             :     "See Also\n"
   64276             :     "--------\n"
   64277             :     ":py:func:`GetConfigOption`\n"
   64278             :     ":py:func:`GetGlobalConfigOptions`\n"
   64279             :     "\n"
   64280             :     ""},
   64281             :    { "SetPathSpecificOption", _wrap_SetPathSpecificOption, METH_VARARGS, "SetPathSpecificOption(char const * pszPathPrefix, char const * pszKey, char const * pszValue)"},
   64282             :    { "SetCredential", _wrap_SetCredential, METH_VARARGS, "SetCredential(char const * pszPathPrefix, char const * pszKey, char const * pszValue)"},
   64283             :    { "GetCredential", _wrap_GetCredential, METH_VARARGS, "GetCredential(char const * pszPathPrefix, char const * pszKey, char const * pszDefault=None) -> char const *"},
   64284             :    { "GetPathSpecificOption", _wrap_GetPathSpecificOption, METH_VARARGS, "GetPathSpecificOption(char const * pszPathPrefix, char const * pszKey, char const * pszDefault=None) -> char const *"},
   64285             :    { "ClearCredentials", _wrap_ClearCredentials, METH_VARARGS, "ClearCredentials(char const * pszPathPrefix=None)"},
   64286             :    { "ClearPathSpecificOptions", _wrap_ClearPathSpecificOptions, METH_VARARGS, "ClearPathSpecificOptions(char const * pszPathPrefix=None)"},
   64287             :    { "CPLBinaryToHex", _wrap_CPLBinaryToHex, METH_O, "CPLBinaryToHex(int nBytes) -> retStringAndCPLFree *"},
   64288             :    { "CPLHexToBinary", _wrap_CPLHexToBinary, METH_VARARGS, "CPLHexToBinary(char const * pszHex, int * pnBytes) -> GByte *"},
   64289             :    { "FileFromMemBuffer", _wrap_FileFromMemBuffer, METH_VARARGS, "FileFromMemBuffer(char const * utf8_path, GIntBig nBytes) -> VSI_RETVAL"},
   64290             :    { "Unlink", _wrap_Unlink, METH_O, "Unlink(char const * utf8_path) -> VSI_RETVAL"},
   64291             :    { "UnlinkBatch", _wrap_UnlinkBatch, METH_O, "UnlinkBatch(char ** files) -> bool"},
   64292             :    { "HasThreadSupport", _wrap_HasThreadSupport, METH_NOARGS, "HasThreadSupport() -> int"},
   64293             :    { "GetCurrentThreadCount", _wrap_GetCurrentThreadCount, METH_NOARGS, "GetCurrentThreadCount() -> int"},
   64294             :    { "Mkdir", _wrap_Mkdir, METH_VARARGS, "Mkdir(char const * utf8_path, int mode) -> VSI_RETVAL"},
   64295             :    { "Rmdir", _wrap_Rmdir, METH_O, "Rmdir(char const * utf8_path) -> VSI_RETVAL"},
   64296             :    { "MkdirRecursive", _wrap_MkdirRecursive, METH_VARARGS, "MkdirRecursive(char const * utf8_path, int mode) -> VSI_RETVAL"},
   64297             :    { "RmdirRecursive", _wrap_RmdirRecursive, METH_O, "RmdirRecursive(char const * utf8_path) -> VSI_RETVAL"},
   64298             :    { "Rename", _wrap_Rename, METH_VARARGS, "Rename(char const * old_path, char const * new_path) -> VSI_RETVAL"},
   64299             :    { "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"},
   64300             :    { "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"},
   64301             :    { "AbortPendingUploads", _wrap_AbortPendingUploads, METH_O, "AbortPendingUploads(char const * utf8_path) -> bool"},
   64302             :    { "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"},
   64303             :    { "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)"},
   64304             :    { "MoveFile", _wrap_MoveFile, METH_VARARGS, "MoveFile(char const * pszSource, char const * pszTarget) -> int"},
   64305             :    { "GetActualURL", _wrap_GetActualURL, METH_O, "GetActualURL(char const * utf8_path) -> char const *"},
   64306             :    { "GetSignedURL", _wrap_GetSignedURL, METH_VARARGS, "GetSignedURL(char const * utf8_path, char ** options=None) -> retStringAndCPLFree *"},
   64307             :    { "GetFileSystemsPrefixes", _wrap_GetFileSystemsPrefixes, METH_NOARGS, "GetFileSystemsPrefixes() -> char **"},
   64308             :    { "GetFileSystemOptions", _wrap_GetFileSystemOptions, METH_O, "GetFileSystemOptions(char const * utf8_path) -> char const *"},
   64309             :    { "VSILFILE_swigregister", VSILFILE_swigregister, METH_O, NULL},
   64310             :    { "StatBuf_mode_get", _wrap_StatBuf_mode_get, METH_O, "StatBuf_mode_get(StatBuf self) -> int"},
   64311             :    { "StatBuf_size_get", _wrap_StatBuf_size_get, METH_O, "StatBuf_size_get(StatBuf self) -> GIntBig"},
   64312             :    { "StatBuf_mtime_get", _wrap_StatBuf_mtime_get, METH_O, "StatBuf_mtime_get(StatBuf self) -> GIntBig"},
   64313             :    { "new_StatBuf", _wrap_new_StatBuf, METH_O, "new_StatBuf(StatBuf psStatBuf) -> StatBuf"},
   64314             :    { "delete_StatBuf", _wrap_delete_StatBuf, METH_O, "delete_StatBuf(StatBuf self)"},
   64315             :    { "StatBuf_IsDirectory", _wrap_StatBuf_IsDirectory, METH_O, "StatBuf_IsDirectory(StatBuf self) -> int"},
   64316             :    { "StatBuf_swigregister", StatBuf_swigregister, METH_O, NULL},
   64317             :    { "StatBuf_swiginit", StatBuf_swiginit, METH_VARARGS, NULL},
   64318             :    { "VSIStatL", _wrap_VSIStatL, METH_VARARGS, "VSIStatL(char const * utf8_path, int nFlags=0) -> int"},
   64319             :    { "GetFileMetadata", _wrap_GetFileMetadata, METH_VARARGS, "GetFileMetadata(char const * utf8_path, char const * domain, char ** options=None) -> char **"},
   64320             :    { "SetFileMetadata", _wrap_SetFileMetadata, METH_VARARGS, "SetFileMetadata(char const * utf8_path, char ** metadata, char const * domain, char ** options=None) -> bool"},
   64321             :    { "VSIFOpenL", _wrap_VSIFOpenL, METH_VARARGS, "VSIFOpenL(char const * utf8_path, char const * pszMode) -> VSILFILE"},
   64322             :    { "VSIFOpenExL", _wrap_VSIFOpenExL, METH_VARARGS, "VSIFOpenExL(char const * utf8_path, char const * pszMode, int bSetError=FALSE, char ** options=None) -> VSILFILE"},
   64323             :    { "VSIFEofL", _wrap_VSIFEofL, METH_O, "VSIFEofL(VSILFILE fp) -> int"},
   64324             :    { "VSIFErrorL", _wrap_VSIFErrorL, METH_O, "VSIFErrorL(VSILFILE fp) -> int"},
   64325             :    { "VSIFClearErrL", _wrap_VSIFClearErrL, METH_O, "VSIFClearErrL(VSILFILE fp)"},
   64326             :    { "VSIFFlushL", _wrap_VSIFFlushL, METH_O, "VSIFFlushL(VSILFILE fp) -> int"},
   64327             :    { "VSIFCloseL", _wrap_VSIFCloseL, METH_O, "VSIFCloseL(VSILFILE fp) -> VSI_RETVAL"},
   64328             :    { "VSIFSeekL", _wrap_VSIFSeekL, METH_VARARGS, "VSIFSeekL(VSILFILE fp, GIntBig offset, int whence) -> int"},
   64329             :    { "VSIFTellL", _wrap_VSIFTellL, METH_O, "VSIFTellL(VSILFILE fp) -> GIntBig"},
   64330             :    { "VSIFTruncateL", _wrap_VSIFTruncateL, METH_VARARGS, "VSIFTruncateL(VSILFILE fp, GIntBig length) -> int"},
   64331             :    { "VSISupportsSparseFiles", _wrap_VSISupportsSparseFiles, METH_O, "VSISupportsSparseFiles(char const * utf8_path) -> int"},
   64332             :    { "VSIFGetRangeStatusL", _wrap_VSIFGetRangeStatusL, METH_VARARGS, "VSIFGetRangeStatusL(VSILFILE fp, GIntBig offset, GIntBig length) -> int"},
   64333             :    { "VSIFWriteL", _wrap_VSIFWriteL, METH_VARARGS, "VSIFWriteL(int nLen, int size, int memb, VSILFILE fp) -> int"},
   64334             :    { "CPLReadLineL", _wrap_CPLReadLineL, METH_O, "CPLReadLineL(VSILFILE fp) -> char const *"},
   64335             :    { "VSICurlClearCache", _wrap_VSICurlClearCache, METH_NOARGS, "VSICurlClearCache()"},
   64336             :    { "VSICurlPartialClearCache", _wrap_VSICurlPartialClearCache, METH_O, "VSICurlPartialClearCache(char const * utf8_path)"},
   64337             :    { "NetworkStatsReset", _wrap_NetworkStatsReset, METH_NOARGS, "NetworkStatsReset()"},
   64338             :    { "NetworkStatsGetAsSerializedJSON", _wrap_NetworkStatsGetAsSerializedJSON, METH_VARARGS, "NetworkStatsGetAsSerializedJSON(char ** options=None) -> retStringAndCPLFree *"},
   64339             :    { "ParseCommandLine", _wrap_ParseCommandLine, METH_O, "ParseCommandLine(char const * utf8_path) -> char **"},
   64340             :    { "GetNumCPUs", _wrap_GetNumCPUs, METH_NOARGS, "\n"
   64341             :     "GetNumCPUs() -> int\n"
   64342             :     "\n"
   64343             :     "\n"
   64344             :     "Return the number of processors detected by GDAL.\n"
   64345             :     "\n"
   64346             :     "Returns\n"
   64347             :     "-------\n"
   64348             :     "int\n"
   64349             :     "\n"
   64350             :     ""},
   64351             :    { "GetUsablePhysicalRAM", _wrap_GetUsablePhysicalRAM, METH_NOARGS, "GetUsablePhysicalRAM() -> GIntBig"},
   64352             :    { "MultipartUploadGetCapabilities", _wrap_MultipartUploadGetCapabilities, METH_O, "MultipartUploadGetCapabilities(char const * pszFilename)"},
   64353             :    { "MultipartUploadStart", _wrap_MultipartUploadStart, METH_VARARGS, "MultipartUploadStart(char const * pszFilename, char ** options=None) -> retStringAndCPLFree *"},
   64354             :    { "MultipartUploadAddPart", _wrap_MultipartUploadAddPart, METH_VARARGS, "MultipartUploadAddPart(char const * pszFilename, char const * pszUploadId, int nPartNumber, GUIntBig nFileOffset, size_t nDataLength, char ** options=None) -> retStringAndCPLFree *"},
   64355             :    { "MultipartUploadEnd", _wrap_MultipartUploadEnd, METH_VARARGS, "MultipartUploadEnd(char const * pszFilename, char const * pszUploadId, char ** partIds, GUIntBig nTotalSize, char ** options=None) -> bool"},
   64356             :    { "MultipartUploadAbort", _wrap_MultipartUploadAbort, METH_VARARGS, "MultipartUploadAbort(char const * pszFilename, char const * pszUploadId, char ** options=None) -> bool"},
   64357             :    { "MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_O, "MajorObject_GetDescription(MajorObject self) -> char const *"},
   64358             :    { "MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, "MajorObject_SetDescription(MajorObject self, char const * pszNewDesc)"},
   64359             :    { "MajorObject_GetMetadataDomainList", _wrap_MajorObject_GetMetadataDomainList, METH_O, "MajorObject_GetMetadataDomainList(MajorObject self) -> char **"},
   64360             :    { "MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, "MajorObject_GetMetadata_Dict(MajorObject self, char const * pszDomain=\"\") -> char **"},
   64361             :    { "MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, "MajorObject_GetMetadata_List(MajorObject self, char const * pszDomain=\"\") -> char **"},
   64362             :    { "MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, "\n"
   64363             :     "MajorObject_SetMetadata(MajorObject self, char ** papszMetadata, char const * pszDomain=\"\") -> CPLErr\n"
   64364             :     "MajorObject_SetMetadata(MajorObject self, char * pszMetadataString, char const * pszDomain=\"\") -> CPLErr\n"
   64365             :     ""},
   64366             :    { "MajorObject_GetMetadataItem", _wrap_MajorObject_GetMetadataItem, METH_VARARGS, "MajorObject_GetMetadataItem(MajorObject self, char const * pszName, char const * pszDomain=\"\") -> char const *"},
   64367             :    { "MajorObject_SetMetadataItem", _wrap_MajorObject_SetMetadataItem, METH_VARARGS, "MajorObject_SetMetadataItem(MajorObject self, char const * pszName, char const * pszValue, char const * pszDomain=\"\") -> CPLErr"},
   64368             :    { "MajorObject_swigregister", MajorObject_swigregister, METH_O, NULL},
   64369             :    { "Driver_ShortName_get", _wrap_Driver_ShortName_get, METH_O, "\n"
   64370             :     "Driver_ShortName_get(Driver self) -> char const *\n"
   64371             :     "\n"
   64372             :     "The short name of a :py:class:`Driver` that can be passed to\n"
   64373             :     ":py:func:`GetDriverByName`.\n"
   64374             :     "See :cpp:func:`GDALGetDriverShortName`.\n"
   64375             :     "\n"
   64376             :     ""},
   64377             :    { "Driver_LongName_get", _wrap_Driver_LongName_get, METH_O, "\n"
   64378             :     "Driver_LongName_get(Driver self) -> char const *\n"
   64379             :     "\n"
   64380             :     "The long name of the driver.\n"
   64381             :     "See :cpp:func:`GDALGetDriverLongName`.\n"
   64382             :     "\n"
   64383             :     ""},
   64384             :    { "Driver_HelpTopic_get", _wrap_Driver_HelpTopic_get, METH_O, "\n"
   64385             :     "Driver_HelpTopic_get(Driver self) -> char const *\n"
   64386             :     "\n"
   64387             :     "The URL for driver documentation, relative to the GDAL documentation directory.\n"
   64388             :     "See :cpp:func:`GDALGetDriverHelpTopic`.\n"
   64389             :     "\n"
   64390             :     ""},
   64391             :    { "Driver_Create", (PyCFunction)(void(*)(void))_wrap_Driver_Create, METH_VARARGS|METH_KEYWORDS, "\n"
   64392             :     "Driver_Create(Driver self, char const * utf8_path, int xsize, int ysize, int bands=1, GDALDataType eType=GDT_Byte, char ** options=None) -> Dataset\n"
   64393             :     "\n"
   64394             :     "\n"
   64395             :     "Create a new :py:class:`Dataset` with this driver.\n"
   64396             :     "See :cpp:func:`GDALDriver::Create`.\n"
   64397             :     "\n"
   64398             :     "Parameters\n"
   64399             :     "----------\n"
   64400             :     "utf8_path : str\n"
   64401             :     "   Path of the dataset to create.\n"
   64402             :     "xsize : int\n"
   64403             :     "   Width of created raster in pixels. Set to zero for vector datasets.\n"
   64404             :     "ysize : int\n"
   64405             :     "   Height of created raster in pixels. Set to zero for vector datasets.\n"
   64406             :     "bands : int, default = 1\n"
   64407             :     "    Number of bands. Set to zero for vector datasets.\n"
   64408             :     "eType : int/NumPy dtype, default = :py:const:`GDT_Byte`\n"
   64409             :     "    Raster data type. Set to :py:const:`GDT_Unknown` for vector datasets.\n"
   64410             :     "options : list/dict\n"
   64411             :     "    List of driver-specific options\n"
   64412             :     "\n"
   64413             :     "Returns\n"
   64414             :     "-------\n"
   64415             :     "Dataset\n"
   64416             :     "\n"
   64417             :     "Examples\n"
   64418             :     "--------\n"
   64419             :     ">>> with gdal.GetDriverByName('GTiff').Create('test.tif', 12, 4, 2, gdal.GDT_Float32, {'COMPRESS': 'DEFLATE'}) as ds:\n"
   64420             :     "...     print(gdal.Info(ds))\n"
   64421             :     "...\n"
   64422             :     "Driver: GTiff/GeoTIFF\n"
   64423             :     "Files: test.tif\n"
   64424             :     "Size is 12, 4\n"
   64425             :     "Image Structure Metadata:\n"
   64426             :     "  INTERLEAVE=PIXEL\n"
   64427             :     "Corner Coordinates:\n"
   64428             :     "Upper Left  (    0.0,    0.0)\n"
   64429             :     "Lower Left  (    0.0,    4.0)\n"
   64430             :     "Upper Right (   12.0,    0.0)\n"
   64431             :     "Lower Right (   12.0,    4.0)\n"
   64432             :     "Center      (    6.0,    2.0)\n"
   64433             :     "Band 1 Block=12x4 Type=Float32, ColorInterp=Gray\n"
   64434             :     "Band 2 Block=12x4 Type=Float32, ColorInterp=Undefined\n"
   64435             :     "\n"
   64436             :     ">>> with gdal.GetDriverByName('ESRI Shapefile').Create('test.shp', 0, 0, 0, gdal.GDT_Unknown) as ds:\n"
   64437             :     "...     print(gdal.VectorInfo(ds))\n"
   64438             :     "...\n"
   64439             :     "INFO: Open of `test.shp'\n"
   64440             :     "      using driver `ESRI Shapefile' successful.\n"
   64441             :     "\n"
   64442             :     ""},
   64443             :    { "Driver_CreateVector", (PyCFunction)(void(*)(void))_wrap_Driver_CreateVector, METH_VARARGS|METH_KEYWORDS, "\n"
   64444             :     "Driver_CreateVector(Driver self, char const * utf8_path, char ** options=None) -> Dataset\n"
   64445             :     "\n"
   64446             :     "\n"
   64447             :     "Create a new vector :py:class:`Dataset` with this driver.\n"
   64448             :     "This method is an alias for ``Create(name, 0, 0, 0, gdal.GDT_Unknown)``.\n"
   64449             :     "\n"
   64450             :     "Parameters\n"
   64451             :     "----------\n"
   64452             :     "utf8_path : str\n"
   64453             :     "   Path of the dataset to create.\n"
   64454             :     "\n"
   64455             :     "Returns\n"
   64456             :     "-------\n"
   64457             :     "Dataset\n"
   64458             :     "\n"
   64459             :     "Examples\n"
   64460             :     "--------\n"
   64461             :     ">>> with gdal.GetDriverByName('ESRI Shapefile').CreateVector('test.shp') as ds:\n"
   64462             :     "...     print(ds.GetLayerCount())\n"
   64463             :     "... \n"
   64464             :     "0\n"
   64465             :     "\n"
   64466             :     "\n"
   64467             :     ""},
   64468             :    { "Driver_CreateMultiDimensional", (PyCFunction)(void(*)(void))_wrap_Driver_CreateMultiDimensional, METH_VARARGS|METH_KEYWORDS, "\n"
   64469             :     "Driver_CreateMultiDimensional(Driver self, char const * utf8_path, char ** root_group_options=None, char ** options=None) -> Dataset\n"
   64470             :     "\n"
   64471             :     "\n"
   64472             :     "Create a new multidimensional dataset.\n"
   64473             :     "See :cpp:func:`GDALDriver::CreateMultiDimensional`.\n"
   64474             :     "\n"
   64475             :     "Parameters\n"
   64476             :     "----------\n"
   64477             :     "utf8_path : str\n"
   64478             :     "   Path of the dataset to create.\n"
   64479             :     "root_group_options : dict/list\n"
   64480             :     "   Driver-specific options regarding the creation of the\n"
   64481             :     "   root group.\n"
   64482             :     "options : list/dict\n"
   64483             :     "   List of driver-specific options regarding the creation\n"
   64484             :     "   of the Dataset.\n"
   64485             :     "\n"
   64486             :     "Returns\n"
   64487             :     "-------\n"
   64488             :     "Dataset\n"
   64489             :     "\n"
   64490             :     "Examples\n"
   64491             :     "--------\n"
   64492             :     ">>> with gdal.GetDriverByName('netCDF').CreateMultiDimensional('test.nc') as ds:\n"
   64493             :     "...     gdal.MultiDimInfo(ds)\n"
   64494             :     "...\n"
   64495             :     "{'type': 'group', 'driver': 'netCDF', 'name': '/', 'attributes': {'Conventions': 'CF-1.6'}, 'structural_info': {'NC_FORMAT': 'NETCDF4'}}\n"
   64496             :     "\n"
   64497             :     "\n"
   64498             :     ""},
   64499             :    { "Driver_CreateCopy", (PyCFunction)(void(*)(void))_wrap_Driver_CreateCopy, METH_VARARGS|METH_KEYWORDS, "\n"
   64500             :     "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"
   64501             :     "\n"
   64502             :     "\n"
   64503             :     "Create a copy of a :py:class:`Dataset`.\n"
   64504             :     "See :cpp:func:`GDALDriver::CreateCopy`.\n"
   64505             :     "\n"
   64506             :     "Parameters\n"
   64507             :     "----------\n"
   64508             :     "utf8_path : str\n"
   64509             :     "   Path of the dataset to create.\n"
   64510             :     "src : Dataset\n"
   64511             :     "   The Dataset being duplicated.\n"
   64512             :     "strict : bool, default=1\n"
   64513             :     "   Indicates whether the copy must be strictly equivalent or if\n"
   64514             :     "   it may be adapted as needed for the output format.\n"
   64515             :     "options : list/dict\n"
   64516             :     "   List of driver-specific options\n"
   64517             :     "callback : function, optional\n"
   64518             :     "   A progress callback function\n"
   64519             :     "callback_data: optional\n"
   64520             :     "   Optional data to be passed to callback function\n"
   64521             :     "\n"
   64522             :     "Returns\n"
   64523             :     "-------\n"
   64524             :     "Dataset\n"
   64525             :     "\n"
   64526             :     ""},
   64527             :    { "Driver_Delete", _wrap_Driver_Delete, METH_VARARGS, "\n"
   64528             :     "Driver_Delete(Driver self, char const * utf8_path) -> CPLErr\n"
   64529             :     "\n"
   64530             :     "Delete a :py:class:`Dataset`.\n"
   64531             :     "See :cpp:func:`GDALDriver::Delete`.\n"
   64532             :     "\n"
   64533             :     "Parameters\n"
   64534             :     "----------\n"
   64535             :     "utf8_path : str\n"
   64536             :     "   Path of the dataset to delete.\n"
   64537             :     "\n"
   64538             :     "Returns\n"
   64539             :     "-------\n"
   64540             :     "int:\n"
   64541             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64542             :     "\n"
   64543             :     ""},
   64544             :    { "Driver_Rename", _wrap_Driver_Rename, METH_VARARGS, "\n"
   64545             :     "Driver_Rename(Driver self, char const * newName, char const * oldName) -> CPLErr\n"
   64546             :     "\n"
   64547             :     "Rename a :py:class:`Dataset`.\n"
   64548             :     "See :cpp:func:`GDALDriver::Rename`.\n"
   64549             :     "\n"
   64550             :     "Parameters\n"
   64551             :     "----------\n"
   64552             :     "newName : str\n"
   64553             :     "    new path for the dataset\n"
   64554             :     "oldName : str\n"
   64555             :     "    old path for the dataset\n"
   64556             :     "\n"
   64557             :     "Returns\n"
   64558             :     "-------\n"
   64559             :     "int:\n"
   64560             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64561             :     "\n"
   64562             :     ""},
   64563             :    { "Driver_CopyFiles", _wrap_Driver_CopyFiles, METH_VARARGS, "\n"
   64564             :     "Driver_CopyFiles(Driver self, char const * newName, char const * oldName) -> CPLErr\n"
   64565             :     "\n"
   64566             :     "Copy all the files associated with a :py:class:`Dataset`.\n"
   64567             :     "\n"
   64568             :     "Parameters\n"
   64569             :     "----------\n"
   64570             :     "newName : str\n"
   64571             :     "    new path for the dataset\n"
   64572             :     "oldName : str\n"
   64573             :     "    old path for the dataset\n"
   64574             :     "\n"
   64575             :     "Returns\n"
   64576             :     "-------\n"
   64577             :     "int:\n"
   64578             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64579             :     "\n"
   64580             :     ""},
   64581             :    { "Driver_HasOpenOption", _wrap_Driver_HasOpenOption, METH_VARARGS, "\n"
   64582             :     "Driver_HasOpenOption(Driver self, char const * openOptionName) -> bool\n"
   64583             :     "\n"
   64584             :     "\n"
   64585             :     "Reports whether the driver supports a specified open option.\n"
   64586             :     "\n"
   64587             :     "Parameters\n"
   64588             :     "----------\n"
   64589             :     "openOptionName : str\n"
   64590             :     "   The name of the option to test\n"
   64591             :     "\n"
   64592             :     "Returns\n"
   64593             :     "-------\n"
   64594             :     "bool:\n"
   64595             :     "   ``True``, if the option is supported by this driver, ``False`` otherwise.\n"
   64596             :     "\n"
   64597             :     "Examples\n"
   64598             :     "--------\n"
   64599             :     ">>> gdal.GetDriverByName('GPKG').HasOpenOption('PRELUDE_STATEMENTS')\n"
   64600             :     "True\n"
   64601             :     ">>> gdal.GetDriverByName('GPKG').HasOpenOption('CLOSING_STATEMENTS')\n"
   64602             :     "False\n"
   64603             :     "\n"
   64604             :     "\n"
   64605             :     ""},
   64606             :    { "Driver_TestCapability", _wrap_Driver_TestCapability, METH_VARARGS, "\n"
   64607             :     "Driver_TestCapability(Driver self, char const * cap) -> bool\n"
   64608             :     "\n"
   64609             :     "\n"
   64610             :     "Check whether the driver supports a specified capability\n"
   64611             :     "(:py:const:`ogr.ODrCCreateDataSource` or\n"
   64612             :     ":py:const:`ogr.ODrCDeleteDataSource`)`.\n"
   64613             :     "\n"
   64614             :     "Parameters\n"
   64615             :     "----------\n"
   64616             :     "cap : str\n"
   64617             :     "    The name of the capability to test\n"
   64618             :     "\n"
   64619             :     "Returns\n"
   64620             :     "-------\n"
   64621             :     "bool:\n"
   64622             :     "   ``True`` if the driver supports the capability, ``False`` otherwise.\n"
   64623             :     "\n"
   64624             :     "Examples\n"
   64625             :     "--------\n"
   64626             :     ">>> gdal.GetDriverByName('ESRI Shapefile').TestCapability(ogr.ODrCCreateDataSource)\n"
   64627             :     "True\n"
   64628             :     ">>> gdal.GetDriverByName('GTiff').TestCapability(ogr.ODrCCreateDataSource)\n"
   64629             :     "True\n"
   64630             :     "\n"
   64631             :     "\n"
   64632             :     ""},
   64633             :    { "Driver_Register", _wrap_Driver_Register, METH_O, "\n"
   64634             :     "Driver_Register(Driver self) -> int\n"
   64635             :     "\n"
   64636             :     "Register the driver for use.\n"
   64637             :     "See :cpp:func:`GDALDriverManager::RegisterDriver`.\n"
   64638             :     "\n"
   64639             :     ""},
   64640             :    { "Driver_Deregister", _wrap_Driver_Deregister, METH_O, "\n"
   64641             :     "Driver_Deregister(Driver self)\n"
   64642             :     "\n"
   64643             :     "Deregister the driver.\n"
   64644             :     "See :cpp:func:`GDALDriverManager::DeregisterDriver`.\n"
   64645             :     "\n"
   64646             :     ""},
   64647             :    { "Driver_swigregister", Driver_swigregister, METH_O, NULL},
   64648             :    { "ColorEntry_c1_set", _wrap_ColorEntry_c1_set, METH_VARARGS, "ColorEntry_c1_set(ColorEntry self, short c1)"},
   64649             :    { "ColorEntry_c1_get", _wrap_ColorEntry_c1_get, METH_O, "ColorEntry_c1_get(ColorEntry self) -> short"},
   64650             :    { "ColorEntry_c2_set", _wrap_ColorEntry_c2_set, METH_VARARGS, "ColorEntry_c2_set(ColorEntry self, short c2)"},
   64651             :    { "ColorEntry_c2_get", _wrap_ColorEntry_c2_get, METH_O, "ColorEntry_c2_get(ColorEntry self) -> short"},
   64652             :    { "ColorEntry_c3_set", _wrap_ColorEntry_c3_set, METH_VARARGS, "ColorEntry_c3_set(ColorEntry self, short c3)"},
   64653             :    { "ColorEntry_c3_get", _wrap_ColorEntry_c3_get, METH_O, "ColorEntry_c3_get(ColorEntry self) -> short"},
   64654             :    { "ColorEntry_c4_set", _wrap_ColorEntry_c4_set, METH_VARARGS, "ColorEntry_c4_set(ColorEntry self, short c4)"},
   64655             :    { "ColorEntry_c4_get", _wrap_ColorEntry_c4_get, METH_O, "ColorEntry_c4_get(ColorEntry self) -> short"},
   64656             :    { "ColorEntry_swigregister", ColorEntry_swigregister, METH_O, NULL},
   64657             :    { "GCP_GCPX_set", _wrap_GCP_GCPX_set, METH_VARARGS, "GCP_GCPX_set(GCP self, double GCPX)"},
   64658             :    { "GCP_GCPX_get", _wrap_GCP_GCPX_get, METH_O, "GCP_GCPX_get(GCP self) -> double"},
   64659             :    { "GCP_GCPY_set", _wrap_GCP_GCPY_set, METH_VARARGS, "GCP_GCPY_set(GCP self, double GCPY)"},
   64660             :    { "GCP_GCPY_get", _wrap_GCP_GCPY_get, METH_O, "GCP_GCPY_get(GCP self) -> double"},
   64661             :    { "GCP_GCPZ_set", _wrap_GCP_GCPZ_set, METH_VARARGS, "GCP_GCPZ_set(GCP self, double GCPZ)"},
   64662             :    { "GCP_GCPZ_get", _wrap_GCP_GCPZ_get, METH_O, "GCP_GCPZ_get(GCP self) -> double"},
   64663             :    { "GCP_GCPPixel_set", _wrap_GCP_GCPPixel_set, METH_VARARGS, "GCP_GCPPixel_set(GCP self, double GCPPixel)"},
   64664             :    { "GCP_GCPPixel_get", _wrap_GCP_GCPPixel_get, METH_O, "GCP_GCPPixel_get(GCP self) -> double"},
   64665             :    { "GCP_GCPLine_set", _wrap_GCP_GCPLine_set, METH_VARARGS, "GCP_GCPLine_set(GCP self, double GCPLine)"},
   64666             :    { "GCP_GCPLine_get", _wrap_GCP_GCPLine_get, METH_O, "GCP_GCPLine_get(GCP self) -> double"},
   64667             :    { "GCP_Info_set", _wrap_GCP_Info_set, METH_VARARGS, "GCP_Info_set(GCP self, char * Info)"},
   64668             :    { "GCP_Info_get", _wrap_GCP_Info_get, METH_O, "GCP_Info_get(GCP self) -> char *"},
   64669             :    { "GCP_Id_set", _wrap_GCP_Id_set, METH_VARARGS, "GCP_Id_set(GCP self, char * Id)"},
   64670             :    { "GCP_Id_get", _wrap_GCP_Id_get, METH_O, "GCP_Id_get(GCP self) -> char *"},
   64671             :    { "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"},
   64672             :    { "delete_GCP", _wrap_delete_GCP, METH_O, "delete_GCP(GCP self)"},
   64673             :    { "GCP_swigregister", GCP_swigregister, METH_O, NULL},
   64674             :    { "GCP_swiginit", GCP_swiginit, METH_VARARGS, NULL},
   64675             :    { "GDAL_GCP_GCPX_get", _wrap_GDAL_GCP_GCPX_get, METH_O, "GDAL_GCP_GCPX_get(GCP gcp) -> double"},
   64676             :    { "GDAL_GCP_GCPX_set", _wrap_GDAL_GCP_GCPX_set, METH_VARARGS, "GDAL_GCP_GCPX_set(GCP gcp, double dfGCPX)"},
   64677             :    { "GDAL_GCP_GCPY_get", _wrap_GDAL_GCP_GCPY_get, METH_O, "GDAL_GCP_GCPY_get(GCP gcp) -> double"},
   64678             :    { "GDAL_GCP_GCPY_set", _wrap_GDAL_GCP_GCPY_set, METH_VARARGS, "GDAL_GCP_GCPY_set(GCP gcp, double dfGCPY)"},
   64679             :    { "GDAL_GCP_GCPZ_get", _wrap_GDAL_GCP_GCPZ_get, METH_O, "GDAL_GCP_GCPZ_get(GCP gcp) -> double"},
   64680             :    { "GDAL_GCP_GCPZ_set", _wrap_GDAL_GCP_GCPZ_set, METH_VARARGS, "GDAL_GCP_GCPZ_set(GCP gcp, double dfGCPZ)"},
   64681             :    { "GDAL_GCP_GCPPixel_get", _wrap_GDAL_GCP_GCPPixel_get, METH_O, "GDAL_GCP_GCPPixel_get(GCP gcp) -> double"},
   64682             :    { "GDAL_GCP_GCPPixel_set", _wrap_GDAL_GCP_GCPPixel_set, METH_VARARGS, "GDAL_GCP_GCPPixel_set(GCP gcp, double dfGCPPixel)"},
   64683             :    { "GDAL_GCP_GCPLine_get", _wrap_GDAL_GCP_GCPLine_get, METH_O, "GDAL_GCP_GCPLine_get(GCP gcp) -> double"},
   64684             :    { "GDAL_GCP_GCPLine_set", _wrap_GDAL_GCP_GCPLine_set, METH_VARARGS, "GDAL_GCP_GCPLine_set(GCP gcp, double dfGCPLine)"},
   64685             :    { "GDAL_GCP_Info_get", _wrap_GDAL_GCP_Info_get, METH_O, "GDAL_GCP_Info_get(GCP gcp) -> char const *"},
   64686             :    { "GDAL_GCP_Info_set", _wrap_GDAL_GCP_Info_set, METH_VARARGS, "GDAL_GCP_Info_set(GCP gcp, char const * pszInfo)"},
   64687             :    { "GDAL_GCP_Id_get", _wrap_GDAL_GCP_Id_get, METH_O, "GDAL_GCP_Id_get(GCP gcp) -> char const *"},
   64688             :    { "GDAL_GCP_Id_set", _wrap_GDAL_GCP_Id_set, METH_VARARGS, "GDAL_GCP_Id_set(GCP gcp, char const * pszId)"},
   64689             :    { "GCPsToGeoTransform", _wrap_GCPsToGeoTransform, METH_VARARGS, "GCPsToGeoTransform(int nGCPs, int bApproxOK=1) -> RETURN_NONE"},
   64690             :    { "GCPsToHomography", _wrap_GCPsToHomography, METH_O, "GCPsToHomography(int nGCPs) -> RETURN_NONE"},
   64691             :    { "delete_VirtualMem", _wrap_delete_VirtualMem, METH_O, "delete_VirtualMem(VirtualMem self)"},
   64692             :    { "VirtualMem_GetAddr", _wrap_VirtualMem_GetAddr, METH_O, "VirtualMem_GetAddr(VirtualMem self)"},
   64693             :    { "VirtualMem_Pin", _wrap_VirtualMem_Pin, METH_VARARGS, "VirtualMem_Pin(VirtualMem self, size_t start_offset=0, size_t nsize=0, int bWriteOp=0)"},
   64694             :    { "VirtualMem_swigregister", VirtualMem_swigregister, METH_O, NULL},
   64695             :    { "delete_AsyncReader", _wrap_delete_AsyncReader, METH_O, "delete_AsyncReader(AsyncReader self)"},
   64696             :    { "AsyncReader_GetNextUpdatedRegion", _wrap_AsyncReader_GetNextUpdatedRegion, METH_VARARGS, "AsyncReader_GetNextUpdatedRegion(AsyncReader self, double timeout) -> GDALAsyncStatusType"},
   64697             :    { "AsyncReader_GetBuffer", _wrap_AsyncReader_GetBuffer, METH_O, "AsyncReader_GetBuffer(AsyncReader self)"},
   64698             :    { "AsyncReader_LockBuffer", _wrap_AsyncReader_LockBuffer, METH_VARARGS, "AsyncReader_LockBuffer(AsyncReader self, double timeout) -> int"},
   64699             :    { "AsyncReader_UnlockBuffer", _wrap_AsyncReader_UnlockBuffer, METH_O, "AsyncReader_UnlockBuffer(AsyncReader self)"},
   64700             :    { "AsyncReader_swigregister", AsyncReader_swigregister, METH_O, NULL},
   64701             :    { "Dataset_RasterXSize_get", _wrap_Dataset_RasterXSize_get, METH_O, "\n"
   64702             :     "Dataset_RasterXSize_get(Dataset self) -> int\n"
   64703             :     "\n"
   64704             :     "\n"
   64705             :     "Raster width in pixels. See :cpp:func:`GDALGetRasterXSize`.\n"
   64706             :     "\n"
   64707             :     "\n"
   64708             :     ""},
   64709             :    { "Dataset_RasterYSize_get", _wrap_Dataset_RasterYSize_get, METH_O, "\n"
   64710             :     "Dataset_RasterYSize_get(Dataset self) -> int\n"
   64711             :     "\n"
   64712             :     "\n"
   64713             :     "Raster height in pixels. See :cpp:func:`GDALGetRasterYSize`.\n"
   64714             :     "\n"
   64715             :     "\n"
   64716             :     ""},
   64717             :    { "Dataset_RasterCount_get", _wrap_Dataset_RasterCount_get, METH_O, "\n"
   64718             :     "Dataset_RasterCount_get(Dataset self) -> int\n"
   64719             :     "\n"
   64720             :     "\n"
   64721             :     "The number of bands in this dataset.\n"
   64722             :     "\n"
   64723             :     "\n"
   64724             :     ""},
   64725             :    { "delete_Dataset", _wrap_delete_Dataset, METH_O, "delete_Dataset(Dataset self)"},
   64726             :    { "Dataset_MarkSuppressOnClose", _wrap_Dataset_MarkSuppressOnClose, METH_O, "Dataset_MarkSuppressOnClose(Dataset self)"},
   64727             :    { "Dataset_Close", _wrap_Dataset_Close, METH_O, "\n"
   64728             :     "Dataset_Close(Dataset self) -> CPLErr\n"
   64729             :     "\n"
   64730             :     "Closes opened dataset and releases allocated resources.\n"
   64731             :     "\n"
   64732             :     "This method can be used to force the dataset to close\n"
   64733             :     "when one more references to the dataset are still\n"
   64734             :     "reachable. If :py:meth:`Close` is never called, the dataset will\n"
   64735             :     "be closed automatically during garbage collection.\n"
   64736             :     "\n"
   64737             :     "In most cases, it is preferable to open or create a dataset\n"
   64738             :     "using a context manager instead of calling :py:meth:`Close`\n"
   64739             :     "directly.\n"
   64740             :     "\n"
   64741             :     "\n"
   64742             :     ""},
   64743             :    { "Dataset__RunCloseWithoutDestroying", _wrap_Dataset__RunCloseWithoutDestroying, METH_O, "Dataset__RunCloseWithoutDestroying(Dataset self) -> CPLErr"},
   64744             :    { "Dataset_GetDriver", _wrap_Dataset_GetDriver, METH_O, "\n"
   64745             :     "Dataset_GetDriver(Dataset self) -> Driver\n"
   64746             :     "\n"
   64747             :     "\n"
   64748             :     "Fetch the driver used to open or create this :py:class:`Dataset`.\n"
   64749             :     "\n"
   64750             :     "\n"
   64751             :     ""},
   64752             :    { "Dataset_GetRasterBand", _wrap_Dataset_GetRasterBand, METH_VARARGS, "\n"
   64753             :     "Dataset_GetRasterBand(Dataset self, int nBand) -> Band\n"
   64754             :     "\n"
   64755             :     "\n"
   64756             :     "Fetch a :py:class:`Band` band from a :py:class:`Dataset`. See :cpp:func:`GDALGetRasterBand`.\n"
   64757             :     "\n"
   64758             :     "Parameters\n"
   64759             :     "-----------\n"
   64760             :     "nBand : int\n"
   64761             :     "    the index of the band to fetch, from 1 to :py:attr:`RasterCount`\n"
   64762             :     "\n"
   64763             :     "Returns\n"
   64764             :     "--------\n"
   64765             :     "Band:\n"
   64766             :     "    the :py:class:`Band`, or ``None`` on error.\n"
   64767             :     "\n"
   64768             :     "\n"
   64769             :     ""},
   64770             :    { "Dataset_IsThreadSafe", _wrap_Dataset_IsThreadSafe, METH_VARARGS, "Dataset_IsThreadSafe(Dataset self, int nScopeFlags) -> bool"},
   64771             :    { "Dataset_GetThreadSafeDataset", _wrap_Dataset_GetThreadSafeDataset, METH_VARARGS, "Dataset_GetThreadSafeDataset(Dataset self, int nScopeFlags) -> Dataset"},
   64772             :    { "Dataset_GetRootGroup", _wrap_Dataset_GetRootGroup, METH_O, "\n"
   64773             :     "Dataset_GetRootGroup(Dataset self) -> Group\n"
   64774             :     "\n"
   64775             :     "\n"
   64776             :     "Return the root :py:class:`Group` of this dataset.\n"
   64777             :     "Only value for multidimensional datasets.\n"
   64778             :     "\n"
   64779             :     "Returns\n"
   64780             :     "-------\n"
   64781             :     "Group\n"
   64782             :     "\n"
   64783             :     "\n"
   64784             :     ""},
   64785             :    { "Dataset_GetProjection", _wrap_Dataset_GetProjection, METH_O, "\n"
   64786             :     "Dataset_GetProjection(Dataset self) -> char const *\n"
   64787             :     "\n"
   64788             :     "\n"
   64789             :     "Return a WKT representation of the dataset spatial reference.\n"
   64790             :     "Equivalent to :py:meth:`GetProjectionRef`.\n"
   64791             :     "\n"
   64792             :     "Returns\n"
   64793             :     "-------\n"
   64794             :     "str\n"
   64795             :     "\n"
   64796             :     "\n"
   64797             :     ""},
   64798             :    { "Dataset_GetProjectionRef", _wrap_Dataset_GetProjectionRef, METH_O, "\n"
   64799             :     "Dataset_GetProjectionRef(Dataset self) -> char const *\n"
   64800             :     "\n"
   64801             :     "\n"
   64802             :     "Return a WKT representation of the dataset spatial reference.\n"
   64803             :     "\n"
   64804             :     "Returns\n"
   64805             :     "-------\n"
   64806             :     "str\n"
   64807             :     "\n"
   64808             :     "\n"
   64809             :     ""},
   64810             :    { "Dataset_GetRefCount", _wrap_Dataset_GetRefCount, METH_O, "Dataset_GetRefCount(Dataset self) -> int"},
   64811             :    { "Dataset_GetSummaryRefCount", _wrap_Dataset_GetSummaryRefCount, METH_O, "Dataset_GetSummaryRefCount(Dataset self) -> int"},
   64812             :    { "Dataset_GetSpatialRef", _wrap_Dataset_GetSpatialRef, METH_O, "\n"
   64813             :     "Dataset_GetSpatialRef(Dataset self) -> SpatialReference\n"
   64814             :     "\n"
   64815             :     "\n"
   64816             :     "Fetch the spatial reference for this dataset.\n"
   64817             :     "\n"
   64818             :     "Returns\n"
   64819             :     "--------\n"
   64820             :     "osr.SpatialReference\n"
   64821             :     "\n"
   64822             :     "\n"
   64823             :     ""},
   64824             :    { "Dataset_SetProjection", _wrap_Dataset_SetProjection, METH_VARARGS, "\n"
   64825             :     "Dataset_SetProjection(Dataset self, char const * prj) -> CPLErr\n"
   64826             :     "\n"
   64827             :     "\n"
   64828             :     "Set the spatial reference system for this dataset.\n"
   64829             :     "\n"
   64830             :     "See :cpp:func:`GDALDataset::SetProjection`.\n"
   64831             :     "\n"
   64832             :     "Parameters\n"
   64833             :     "----------\n"
   64834             :     "prj:\n"
   64835             :     "   The projection string in OGC WKT or PROJ.4 format\n"
   64836             :     "\n"
   64837             :     "Returns\n"
   64838             :     "-------\n"
   64839             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   64840             :     "\n"
   64841             :     "\n"
   64842             :     ""},
   64843             :    { "Dataset_SetSpatialRef", _wrap_Dataset_SetSpatialRef, METH_VARARGS, "\n"
   64844             :     "Dataset_SetSpatialRef(Dataset self, SpatialReference srs) -> CPLErr\n"
   64845             :     "\n"
   64846             :     "\n"
   64847             :     "Set the spatial reference system for this dataset.\n"
   64848             :     "\n"
   64849             :     "Parameters\n"
   64850             :     "----------\n"
   64851             :     "srs : SpatialReference\n"
   64852             :     "\n"
   64853             :     "Returns\n"
   64854             :     "-------\n"
   64855             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   64856             :     "\n"
   64857             :     "\n"
   64858             :     ""},
   64859             :    { "Dataset_GetGeoTransform", (PyCFunction)(void(*)(void))_wrap_Dataset_GetGeoTransform, METH_VARARGS|METH_KEYWORDS, "\n"
   64860             :     "Dataset_GetGeoTransform(Dataset self, int * can_return_null=None)\n"
   64861             :     "\n"
   64862             :     "\n"
   64863             :     "Fetch the affine transformation coefficients.\n"
   64864             :     "\n"
   64865             :     "See :cpp:func:`GDALGetGeoTransform`.\n"
   64866             :     "\n"
   64867             :     "Parameters\n"
   64868             :     "-----------\n"
   64869             :     "can_return_null : bool, default=False\n"
   64870             :     "    if ``True``, return ``None`` instead of the default transformation\n"
   64871             :     "    if the transformation for this :py:class:`Dataset` has not been defined.\n"
   64872             :     "\n"
   64873             :     "Returns\n"
   64874             :     "-------\n"
   64875             :     "tuple:\n"
   64876             :     "    a 6-member tuple representing the transformation coefficients\n"
   64877             :     "\n"
   64878             :     "\n"
   64879             :     "\n"
   64880             :     ""},
   64881             :    { "Dataset_SetGeoTransform", _wrap_Dataset_SetGeoTransform, METH_VARARGS, "\n"
   64882             :     "Dataset_SetGeoTransform(Dataset self, double [6] argin) -> CPLErr\n"
   64883             :     "\n"
   64884             :     "\n"
   64885             :     "Set the affine transformation coefficients.\n"
   64886             :     "\n"
   64887             :     "See :py:meth:`GetGeoTransform` for details on the meaning of the coefficients.\n"
   64888             :     "\n"
   64889             :     "Parameters\n"
   64890             :     "----------\n"
   64891             :     "argin : tuple\n"
   64892             :     "\n"
   64893             :     "Returns\n"
   64894             :     "-------\n"
   64895             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   64896             :     "\n"
   64897             :     "\n"
   64898             :     ""},
   64899             :    { "Dataset_GetExtent", (PyCFunction)(void(*)(void))_wrap_Dataset_GetExtent, METH_VARARGS|METH_KEYWORDS, "\n"
   64900             :     "Dataset_GetExtent(Dataset self, SpatialReference srs=None)\n"
   64901             :     "\n"
   64902             :     "Get the extent of the dataset.\n"
   64903             :     "\n"
   64904             :     "See :cpp:func:`GDALDataset::GetExtent`\n"
   64905             :     "\n"
   64906             :     ".. versionadded:: 3.12\n"
   64907             :     "\n"
   64908             :     ".. warning:: Check the return order of the bounds.\n"
   64909             :     "\n"
   64910             :     "Parameters\n"
   64911             :     "----------\n"
   64912             :     "srs : osr.SpatialReference, default=None\n"
   64913             :     "   Optional spatial reference in which the bounds should be \n"
   64914             :     "   returned\n"
   64915             :     "\n"
   64916             :     "Returns\n"
   64917             :     "-------\n"
   64918             :     "tuple or None\n"
   64919             :     "    tuple of (minx, maxx, miny, maxy) or None if the extent cannot be\n"
   64920             :     "    determined in the specified spatial reference system\n"
   64921             :     "\n"
   64922             :     "Examples\n"
   64923             :     "--------\n"
   64924             :     ">>> # Get extent in native SRS (NAD27 / UTM 11N)\n"
   64925             :     ">>> with gdal.Open('byte.tif') as ds:\n"
   64926             :     "...     ds.GetExtent()\n"
   64927             :     "(440720.0, 441920.0, 3750120.0, 3751320.0)\n"
   64928             :     "\n"
   64929             :     ">>> # Get extent in US National Atlas Equal Area\n"
   64930             :     ">>> with gdal.Open('byte.tif') as ds:\n"
   64931             :     "...     ds.GetExtent(osr.SpatialReference(epsg=9311))\n"
   64932             :     "... \n"
   64933             :     "(-1621602.9829031324, -1620214.937944802, -1064263.0904900103, -1062837.1327964044)\n"
   64934             :     "\n"
   64935             :     "See Also\n"
   64936             :     "--------\n"
   64937             :     ":py:meth:`GetExtentWGS84LongLat`\n"
   64938             :     "\n"
   64939             :     "\n"
   64940             :     ""},
   64941             :    { "Dataset_GetExtentWGS84LongLat", _wrap_Dataset_GetExtentWGS84LongLat, METH_O, "\n"
   64942             :     "Dataset_GetExtentWGS84LongLat(Dataset self)\n"
   64943             :     "\n"
   64944             :     "\n"
   64945             :     "Return the extent of the dataset in WGS84, with the x-axis representing\n"
   64946             :     "longitude and the y-axis representing latitude.\n"
   64947             :     "\n"
   64948             :     "See :cpp:func:`GDALDataset::GetExtentWGS84LongLat`\n"
   64949             :     "\n"
   64950             :     ".. versionadded:: 3.12\n"
   64951             :     "\n"
   64952             :     ".. warning:: Check the return order of the bounds.\n"
   64953             :     "\n"
   64954             :     "Returns\n"
   64955             :     "--------\n"
   64956             :     "tuple or None\n"
   64957             :     "    tuple of (minlon, maxlon, minlat, maxlat) or None if the extent cannot be\n"
   64958             :     "    determined in WGS84\n"
   64959             :     "\n"
   64960             :     "Examples\n"
   64961             :     "--------\n"
   64962             :     ">>> with gdal.Open('byte.tif') as ds:\n"
   64963             :     "...     ds.GetExtentWGS84LongLat()\n"
   64964             :     "... \n"
   64965             :     "(-117.64204279334717, -117.6289845627537, 33.891546129503816, 33.90243533203516)\n"
   64966             :     "\n"
   64967             :     "See Also\n"
   64968             :     "--------\n"
   64969             :     ":py:meth:`GetExtent`\n"
   64970             :     "\n"
   64971             :     "\n"
   64972             :     "\n"
   64973             :     ""},
   64974             :    { "Dataset_BuildOverviews", (PyCFunction)(void(*)(void))_wrap_Dataset_BuildOverviews, METH_VARARGS|METH_KEYWORDS, "\n"
   64975             :     "Dataset_BuildOverviews(Dataset self, char const * resampling=\"NEAREST\", int overviewlist=0, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> int\n"
   64976             :     "\n"
   64977             :     "\n"
   64978             :     "Build raster overview(s) for all bands.\n"
   64979             :     "\n"
   64980             :     "See :cpp:func:`GDALDataset::BuildOverviews`\n"
   64981             :     "\n"
   64982             :     "Parameters\n"
   64983             :     "----------\n"
   64984             :     "resampling : str, optional\n"
   64985             :     "             The resampling method to use. See :cpp:func:`GDALDataset::BuildOverviews`.\n"
   64986             :     "overviewlist : list\n"
   64987             :     "             A list of overview levels (decimation factors) to build, or an\n"
   64988             :     "             empty list to clear existing overviews.\n"
   64989             :     "callback : function, optional\n"
   64990             :     "             A progress callback function\n"
   64991             :     "callback_data: optional\n"
   64992             :     "             Optional data to be passed to callback function\n"
   64993             :     "options : dict/list, optional\n"
   64994             :     "             A dict or list of key=value options\n"
   64995             :     "\n"
   64996             :     "Returns\n"
   64997             :     "-------\n"
   64998             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   64999             :     "\n"
   65000             :     "Examples\n"
   65001             :     "--------\n"
   65002             :     ">>> import numpy as np\n"
   65003             :     ">>> ds = gdal.GetDriverByName('GTiff').Create('test.tif', 12, 12)\n"
   65004             :     ">>> ds.GetRasterBand(1).WriteArray(np.arange(12*12).reshape((12, 12)))\n"
   65005             :     "0\n"
   65006             :     ">>> ds.BuildOverviews('AVERAGE', [2, 4])\n"
   65007             :     "0\n"
   65008             :     ">>> ds.GetRasterBand(1).GetOverviewCount()\n"
   65009             :     "2\n"
   65010             :     ">>> ds.BuildOverviews(overviewlist=[])\n"
   65011             :     "0\n"
   65012             :     ">>> ds.GetRasterBand(1).GetOverviewCount()\n"
   65013             :     "0\n"
   65014             :     "\n"
   65015             :     ""},
   65016             :    { "Dataset_GetGCPCount", _wrap_Dataset_GetGCPCount, METH_O, "\n"
   65017             :     "Dataset_GetGCPCount(Dataset self) -> int\n"
   65018             :     "\n"
   65019             :     "\n"
   65020             :     "Get number of GCPs. See :cpp:func:`GDALGetGCPCount`.\n"
   65021             :     "\n"
   65022             :     "Returns\n"
   65023             :     "--------\n"
   65024             :     "int\n"
   65025             :     "\n"
   65026             :     "\n"
   65027             :     ""},
   65028             :    { "Dataset_GetGCPProjection", _wrap_Dataset_GetGCPProjection, METH_O, "\n"
   65029             :     "Dataset_GetGCPProjection(Dataset self) -> char const *\n"
   65030             :     "\n"
   65031             :     "\n"
   65032             :     "Return a WKT representation of the GCP spatial reference.\n"
   65033             :     "\n"
   65034             :     "Returns\n"
   65035             :     "--------\n"
   65036             :     "string\n"
   65037             :     "\n"
   65038             :     "\n"
   65039             :     ""},
   65040             :    { "Dataset_GetGCPSpatialRef", _wrap_Dataset_GetGCPSpatialRef, METH_O, "\n"
   65041             :     "Dataset_GetGCPSpatialRef(Dataset self) -> SpatialReference\n"
   65042             :     "\n"
   65043             :     "\n"
   65044             :     "Get output spatial reference system for GCPs.\n"
   65045             :     "\n"
   65046             :     "See :cpp:func:`GDALGetGCPSpatialRef`\n"
   65047             :     "\n"
   65048             :     "\n"
   65049             :     ""},
   65050             :    { "Dataset_GetGCPs", _wrap_Dataset_GetGCPs, METH_O, "\n"
   65051             :     "Dataset_GetGCPs(Dataset self)\n"
   65052             :     "\n"
   65053             :     "\n"
   65054             :     "Get the GCPs. See :cpp:func:`GDALGetGCPs`.\n"
   65055             :     "\n"
   65056             :     "Returns\n"
   65057             :     "--------\n"
   65058             :     "tuple\n"
   65059             :     "    a tuple of :py:class:`GCP` objects.\n"
   65060             :     "\n"
   65061             :     "\n"
   65062             :     ""},
   65063             :    { "Dataset__SetGCPs", _wrap_Dataset__SetGCPs, METH_VARARGS, "\n"
   65064             :     "Dataset__SetGCPs(Dataset self, int nGCPs, char const * pszGCPProjection) -> CPLErr\n"
   65065             :     "\n"
   65066             :     "\n"
   65067             :     ""},
   65068             :    { "Dataset__SetGCPs2", _wrap_Dataset__SetGCPs2, METH_VARARGS, "Dataset__SetGCPs2(Dataset self, int nGCPs, SpatialReference hSRS) -> CPLErr"},
   65069             :    { "Dataset_FlushCache", _wrap_Dataset_FlushCache, METH_O, "\n"
   65070             :     "Dataset_FlushCache(Dataset self) -> CPLErr\n"
   65071             :     "\n"
   65072             :     "\n"
   65073             :     "Flush all write-cached data to disk.\n"
   65074             :     "\n"
   65075             :     "See :cpp:func:`GDALDataset::FlushCache`.\n"
   65076             :     "\n"
   65077             :     "Returns\n"
   65078             :     "-------\n"
   65079             :     "int\n"
   65080             :     "    `gdal.CE_None` in case of success\n"
   65081             :     "\n"
   65082             :     ""},
   65083             :    { "Dataset_AddBand", (PyCFunction)(void(*)(void))_wrap_Dataset_AddBand, METH_VARARGS|METH_KEYWORDS, "\n"
   65084             :     "Dataset_AddBand(Dataset self, GDALDataType datatype=GDT_Byte, char ** options=None) -> CPLErr\n"
   65085             :     "\n"
   65086             :     "\n"
   65087             :     "Adds a band to a :py:class:`Dataset`.\n"
   65088             :     "\n"
   65089             :     "Not supported by all drivers.\n"
   65090             :     "\n"
   65091             :     "Parameters\n"
   65092             :     "-----------\n"
   65093             :     "datatype: int\n"
   65094             :     "    the data type of the pixels in the new band\n"
   65095             :     "options: dict/list\n"
   65096             :     "    an optional dict or list of format-specific ``NAME=VALUE`` option strings.\n"
   65097             :     "\n"
   65098             :     "Returns\n"
   65099             :     "-------\n"
   65100             :     "int:\n"
   65101             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   65102             :     "\n"
   65103             :     "Examples\n"
   65104             :     "--------\n"
   65105             :     ">>> ds=gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   65106             :     ">>> ds.RasterCount\n"
   65107             :     "1\n"
   65108             :     ">>> ds.AddBand(gdal.GDT_Float32)\n"
   65109             :     "0\n"
   65110             :     ">>> ds.RasterCount\n"
   65111             :     "2\n"
   65112             :     "\n"
   65113             :     ""},
   65114             :    { "Dataset_CreateMaskBand", _wrap_Dataset_CreateMaskBand, METH_VARARGS, "\n"
   65115             :     "Dataset_CreateMaskBand(Dataset self, int nFlags) -> CPLErr\n"
   65116             :     "\n"
   65117             :     "\n"
   65118             :     "Adds a mask band to the dataset.\n"
   65119             :     "\n"
   65120             :     "See :cpp:func:`GDALDataset::CreateMaskBand`.\n"
   65121             :     "\n"
   65122             :     "Parameters\n"
   65123             :     "----------\n"
   65124             :     "flags : int\n"
   65125             :     "\n"
   65126             :     "Returns\n"
   65127             :     "-------\n"
   65128             :     "int\n"
   65129             :     "    :py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   65130             :     "\n"
   65131             :     "\n"
   65132             :     ""},
   65133             :    { "Dataset_GetFileList", _wrap_Dataset_GetFileList, METH_O, "\n"
   65134             :     "Dataset_GetFileList(Dataset self) -> char **\n"
   65135             :     "\n"
   65136             :     "\n"
   65137             :     "Returns a list of files believed to be part of this dataset.\n"
   65138             :     "See :cpp:func:`GDALGetFileList`.\n"
   65139             :     "\n"
   65140             :     "\n"
   65141             :     ""},
   65142             :    { "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"},
   65143             :    { "Dataset_AdviseRead", _wrap_Dataset_AdviseRead, METH_VARARGS, "\n"
   65144             :     "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"
   65145             :     "\n"
   65146             :     "\n"
   65147             :     "Advise driver of upcoming read requests.\n"
   65148             :     "\n"
   65149             :     "See :cpp:func:`GDALDataset::AdviseRead`.\n"
   65150             :     "\n"
   65151             :     "\n"
   65152             :     ""},
   65153             :    { "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"},
   65154             :    { "Dataset_EndAsyncReader", _wrap_Dataset_EndAsyncReader, METH_VARARGS, "Dataset_EndAsyncReader(Dataset self, AsyncReader ario)"},
   65155             :    { "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"},
   65156             :    { "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"},
   65157             :    { "Dataset_CreateLayer", (PyCFunction)(void(*)(void))_wrap_Dataset_CreateLayer, METH_VARARGS|METH_KEYWORDS, "\n"
   65158             :     "Dataset_CreateLayer(Dataset self, char const * name, SpatialReference srs=None, OGRwkbGeometryType geom_type=wkbUnknown, char ** options=None) -> Layer\n"
   65159             :     "\n"
   65160             :     "\n"
   65161             :     "Create a new layer in a vector Dataset.\n"
   65162             :     "\n"
   65163             :     "Parameters\n"
   65164             :     "----------\n"
   65165             :     "name : string\n"
   65166             :     "       the name for the new layer.  This should ideally not\n"
   65167             :     "       match any existing layer on the datasource.\n"
   65168             :     "srs : osr.SpatialReference, default=None\n"
   65169             :     "      the coordinate system to use for the new layer, or ``None`` if\n"
   65170             :     "      no coordinate system is available.\n"
   65171             :     "geom_type : int, default = :py:const:`ogr.wkbUnknown`\n"
   65172             :     "      geometry type for the layer.  Use :py:const:`ogr.wkbUnknown` if there\n"
   65173             :     "      are no constraints on the types geometry to be written.\n"
   65174             :     "options : dict/list, optional\n"
   65175             :     "      Driver-specific dict or list of name=value options\n"
   65176             :     "\n"
   65177             :     "Returns\n"
   65178             :     "-------\n"
   65179             :     "ogr.Layer or ``None`` on failure.\n"
   65180             :     "\n"
   65181             :     "\n"
   65182             :     "Examples\n"
   65183             :     "--------\n"
   65184             :     ">>> ds = gdal.GetDriverByName('GPKG').Create('test.gpkg', 0, 0)\n"
   65185             :     ">>> ds.GetLayerCount()\n"
   65186             :     "0\n"
   65187             :     ">>> lyr = ds.CreateLayer('poly', geom_type=ogr.wkbPolygon)\n"
   65188             :     ">>> ds.GetLayerCount()\n"
   65189             :     "1\n"
   65190             :     "\n"
   65191             :     "\n"
   65192             :     ""},
   65193             :    { "Dataset_CreateLayerFromGeomFieldDefn", _wrap_Dataset_CreateLayerFromGeomFieldDefn, METH_VARARGS, "Dataset_CreateLayerFromGeomFieldDefn(Dataset self, char const * name, GeomFieldDefn geom_field, char ** options=None) -> Layer"},
   65194             :    { "Dataset_CopyLayer", (PyCFunction)(void(*)(void))_wrap_Dataset_CopyLayer, METH_VARARGS|METH_KEYWORDS, "\n"
   65195             :     "Dataset_CopyLayer(Dataset self, Layer src_layer, char const * new_name, char ** options=None) -> Layer\n"
   65196             :     "\n"
   65197             :     "\n"
   65198             :     "Duplicate an existing :py:class:`ogr.Layer`.\n"
   65199             :     "\n"
   65200             :     "See :cpp:func:`GDALDataset::CopyLayer`.\n"
   65201             :     "\n"
   65202             :     "Parameters\n"
   65203             :     "----------\n"
   65204             :     "src_layer : ogr.Layer\n"
   65205             :     "            source layer\n"
   65206             :     "new_name : str\n"
   65207             :     "           name of the layer to create\n"
   65208             :     "options : dict/list\n"
   65209             :     "          a dict or list of name=value driver-specific creation options\n"
   65210             :     "\n"
   65211             :     "Returns\n"
   65212             :     "-------\n"
   65213             :     "ogr.Layer, or ``None`` if an error occurs\n"
   65214             :     "\n"
   65215             :     ""},
   65216             :    { "Dataset_DeleteLayer", _wrap_Dataset_DeleteLayer, METH_VARARGS, "Dataset_DeleteLayer(Dataset self, int index) -> OGRErr"},
   65217             :    { "Dataset_IsLayerPrivate", _wrap_Dataset_IsLayerPrivate, METH_VARARGS, "\n"
   65218             :     "Dataset_IsLayerPrivate(Dataset self, int index) -> bool\n"
   65219             :     "\n"
   65220             :     "\n"
   65221             :     "Parameters\n"
   65222             :     "----------\n"
   65223             :     "index : int\n"
   65224             :     "        Index o layer to check\n"
   65225             :     "\n"
   65226             :     "Returns\n"
   65227             :     "-------\n"
   65228             :     "bool\n"
   65229             :     "     ``True`` if the layer is a private or system table, ``False`` otherwise\n"
   65230             :     "\n"
   65231             :     "\n"
   65232             :     "\n"
   65233             :     ""},
   65234             :    { "Dataset_GetNextFeature", (PyCFunction)(void(*)(void))_wrap_Dataset_GetNextFeature, METH_VARARGS|METH_KEYWORDS, "\n"
   65235             :     "Dataset_GetNextFeature(Dataset self, bool include_layer=True, bool include_pct=False, GDALProgressFunc callback=0, void * callback_data=None) -> Feature\n"
   65236             :     "\n"
   65237             :     "\n"
   65238             :     "Fetch the next available feature from this dataset.\n"
   65239             :     "\n"
   65240             :     "This method is intended for the few drivers where\n"
   65241             :     ":py:meth:`OGRLayer.GetNextFeature` is not efficient, but in general\n"
   65242             :     ":py:meth:`OGRLayer.GetNextFeature` is a more natural API.\n"
   65243             :     "\n"
   65244             :     "See :cpp:func:`GDALDataset::GetNextFeature`.\n"
   65245             :     "\n"
   65246             :     "Returns\n"
   65247             :     "-------\n"
   65248             :     "ogr.Feature\n"
   65249             :     "\n"
   65250             :     "\n"
   65251             :     ""},
   65252             :    { "Dataset_TestCapability", _wrap_Dataset_TestCapability, METH_VARARGS, "\n"
   65253             :     "Dataset_TestCapability(Dataset self, char const * cap) -> bool\n"
   65254             :     "\n"
   65255             :     "\n"
   65256             :     "Test if a capability is available.\n"
   65257             :     "\n"
   65258             :     "Parameters\n"
   65259             :     "----------\n"
   65260             :     "cap : str\n"
   65261             :     "   Name of the capability (e.g., :py:const:`ogr.ODsCTransactions`)\n"
   65262             :     "\n"
   65263             :     "Returns\n"
   65264             :     "-------\n"
   65265             :     "bool\n"
   65266             :     "    ``True`` if the capability is available, ``False`` if invalid or unavailable\n"
   65267             :     "\n"
   65268             :     "Examples\n"
   65269             :     "--------\n"
   65270             :     ">>> ds = gdal.GetDriverByName('ESRI Shapefile').Create('test.shp', 0, 0, 0, gdal.GDT_Unknown)\n"
   65271             :     ">>> ds.TestCapability(ogr.ODsCTransactions)\n"
   65272             :     "False\n"
   65273             :     ">>> ds.TestCapability(ogr.ODsCMeasuredGeometries)\n"
   65274             :     "True\n"
   65275             :     ">>> ds.TestCapability(gdal.GDsCAddRelationship)\n"
   65276             :     "False\n"
   65277             :     "\n"
   65278             :     "\n"
   65279             :     ""},
   65280             :    { "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"},
   65281             :    { "Dataset_ReleaseResultSet", _wrap_Dataset_ReleaseResultSet, METH_VARARGS, "Dataset_ReleaseResultSet(Dataset self, Layer layer)"},
   65282             :    { "Dataset_GetStyleTable", _wrap_Dataset_GetStyleTable, METH_O, "\n"
   65283             :     "Dataset_GetStyleTable(Dataset self) -> StyleTable\n"
   65284             :     "\n"
   65285             :     "\n"
   65286             :     "Returns dataset style table.\n"
   65287             :     "\n"
   65288             :     "Returns\n"
   65289             :     "-------\n"
   65290             :     "ogr.StyleTable\n"
   65291             :     "\n"
   65292             :     "\n"
   65293             :     ""},
   65294             :    { "Dataset_SetStyleTable", _wrap_Dataset_SetStyleTable, METH_VARARGS, "\n"
   65295             :     "Dataset_SetStyleTable(Dataset self, StyleTable table)\n"
   65296             :     "\n"
   65297             :     "\n"
   65298             :     "Set dataset style table\n"
   65299             :     "\n"
   65300             :     "Parameters\n"
   65301             :     "----------\n"
   65302             :     "table : ogr.StyleTable\n"
   65303             :     "\n"
   65304             :     ""},
   65305             :    { "Dataset_GetLayerByIndex", _wrap_Dataset_GetLayerByIndex, METH_VARARGS, "\n"
   65306             :     "Dataset_GetLayerByIndex(Dataset self, int index=0) -> Layer\n"
   65307             :     "\n"
   65308             :     "\n"
   65309             :     "Fetch a layer by index.\n"
   65310             :     "\n"
   65311             :     "Parameters\n"
   65312             :     "----------\n"
   65313             :     "index : int\n"
   65314             :     "    A layer number between 0 and ``GetLayerCount() - 1``\n"
   65315             :     "\n"
   65316             :     "Returns\n"
   65317             :     "-------\n"
   65318             :     "ogr.Layer\n"
   65319             :     "\n"
   65320             :     "\n"
   65321             :     ""},
   65322             :    { "Dataset_GetLayerByName", _wrap_Dataset_GetLayerByName, METH_VARARGS, "Dataset_GetLayerByName(Dataset self, char const * layer_name) -> Layer"},
   65323             :    { "Dataset_ResetReading", _wrap_Dataset_ResetReading, METH_O, "\n"
   65324             :     "Dataset_ResetReading(Dataset self)\n"
   65325             :     "\n"
   65326             :     "\n"
   65327             :     "Reset feature reading to start on the first feature.\n"
   65328             :     "\n"
   65329             :     "This affects :py:meth:`GetNextFeature`.\n"
   65330             :     "\n"
   65331             :     "Depending on drivers, this may also have the side effect of calling\n"
   65332             :     ":py:meth:`OGRLayer.ResetReading` on the layers of this dataset.\n"
   65333             :     "\n"
   65334             :     "\n"
   65335             :     ""},
   65336             :    { "Dataset_GetLayerCount", _wrap_Dataset_GetLayerCount, METH_O, "\n"
   65337             :     "Dataset_GetLayerCount(Dataset self) -> int\n"
   65338             :     "\n"
   65339             :     "\n"
   65340             :     "Get the number of layers in this dataset.\n"
   65341             :     "\n"
   65342             :     "Returns\n"
   65343             :     "-------\n"
   65344             :     "int\n"
   65345             :     "\n"
   65346             :     "\n"
   65347             :     ""},
   65348             :    { "Dataset_AbortSQL", _wrap_Dataset_AbortSQL, METH_O, "\n"
   65349             :     "Dataset_AbortSQL(Dataset self) -> OGRErr\n"
   65350             :     "\n"
   65351             :     "\n"
   65352             :     "Abort any SQL statement running in the data store.\n"
   65353             :     "\n"
   65354             :     "Not implemented by all drivers. See :cpp:func:`GDALDataset::AbortSQL`.\n"
   65355             :     "\n"
   65356             :     "Returns\n"
   65357             :     "-------\n"
   65358             :     ":py:const:`ogr.OGRERR_NONE` on success or :py:const:`ogr.OGRERR_UNSUPPORTED_OPERATION` if AbortSQL is not supported for this dataset.\n"
   65359             :     "\n"
   65360             :     ""},
   65361             :    { "Dataset_StartTransaction", (PyCFunction)(void(*)(void))_wrap_Dataset_StartTransaction, METH_VARARGS|METH_KEYWORDS, "\n"
   65362             :     "Dataset_StartTransaction(Dataset self, int force=FALSE) -> OGRErr\n"
   65363             :     "\n"
   65364             :     "\n"
   65365             :     "Creates a transaction. See :cpp:func:`GDALDataset::StartTransaction`.\n"
   65366             :     "\n"
   65367             :     "Returns\n"
   65368             :     "-------\n"
   65369             :     "int\n"
   65370             :     "    If starting the transaction fails, will return\n"
   65371             :     "    :py:const:`ogr.OGRERR_FAILURE`. Datasources which do not support transactions will\n"
   65372             :     "    always return :py:const:`OGRERR_UNSUPPORTED_OPERATION`.\n"
   65373             :     "\n"
   65374             :     "\n"
   65375             :     ""},
   65376             :    { "Dataset_CommitTransaction", _wrap_Dataset_CommitTransaction, METH_O, "\n"
   65377             :     "Dataset_CommitTransaction(Dataset self) -> OGRErr\n"
   65378             :     "\n"
   65379             :     "Commits a transaction, for `Datasets` that support transactions.\n"
   65380             :     "\n"
   65381             :     "See :cpp:func:`GDALDataset::CommitTransaction`.\n"
   65382             :     "\n"
   65383             :     ""},
   65384             :    { "Dataset_RollbackTransaction", _wrap_Dataset_RollbackTransaction, METH_O, "\n"
   65385             :     "Dataset_RollbackTransaction(Dataset self) -> OGRErr\n"
   65386             :     "\n"
   65387             :     "\n"
   65388             :     "Roll back a Dataset to its state before the start of the current transaction.\n"
   65389             :     "\n"
   65390             :     "For datasets that support transactions.\n"
   65391             :     "\n"
   65392             :     "Returns\n"
   65393             :     "-------\n"
   65394             :     "int\n"
   65395             :     "    If no transaction is active, or the rollback fails, will return\n"
   65396             :     "    :py:const:`OGRERR_FAILURE`. Datasources which do not support transactions will\n"
   65397             :     "    always return :py:const:`OGRERR_UNSUPPORTED_OPERATION`.\n"
   65398             :     "\n"
   65399             :     "\n"
   65400             :     ""},
   65401             :    { "Dataset_ClearStatistics", _wrap_Dataset_ClearStatistics, METH_O, "\n"
   65402             :     "Dataset_ClearStatistics(Dataset self)\n"
   65403             :     "\n"
   65404             :     "\n"
   65405             :     "Clear statistics\n"
   65406             :     "\n"
   65407             :     "See :cpp:func:`GDALDataset::ClearStatistics`.\n"
   65408             :     "\n"
   65409             :     "\n"
   65410             :     ""},
   65411             :    { "Dataset_GetFieldDomainNames", _wrap_Dataset_GetFieldDomainNames, METH_VARARGS, "\n"
   65412             :     "Dataset_GetFieldDomainNames(Dataset self, char ** options=None) -> char **\n"
   65413             :     "\n"
   65414             :     "\n"
   65415             :     "Get a list of the names of all field domains stored in the dataset.\n"
   65416             :     "\n"
   65417             :     "Parameters\n"
   65418             :     "----------\n"
   65419             :     "options: dict/list, optional\n"
   65420             :     "         Driver-specific options determining how attributes should\n"
   65421             :     "         be retrieved.\n"
   65422             :     "\n"
   65423             :     "Returns\n"
   65424             :     "-------\n"
   65425             :     "list, or ``None`` if no field domains are stored in the dataset.\n"
   65426             :     "\n"
   65427             :     ""},
   65428             :    { "Dataset_GetFieldDomain", _wrap_Dataset_GetFieldDomain, METH_VARARGS, "\n"
   65429             :     "Dataset_GetFieldDomain(Dataset self, char const * name) -> FieldDomain\n"
   65430             :     "\n"
   65431             :     "\n"
   65432             :     "Get a field domain from its name.\n"
   65433             :     "\n"
   65434             :     "Parameters\n"
   65435             :     "----------\n"
   65436             :     "name: str\n"
   65437             :     "      The name of the field domain\n"
   65438             :     "\n"
   65439             :     "Returns\n"
   65440             :     "-------\n"
   65441             :     "ogr.FieldDomain, or ``None`` if it is not found.\n"
   65442             :     "\n"
   65443             :     ""},
   65444             :    { "Dataset_AddFieldDomain", _wrap_Dataset_AddFieldDomain, METH_VARARGS, "\n"
   65445             :     "Dataset_AddFieldDomain(Dataset self, FieldDomain fieldDomain) -> bool\n"
   65446             :     "\n"
   65447             :     "\n"
   65448             :     "Add a :py:class:`ogr.FieldDomain` to the dataset.\n"
   65449             :     "\n"
   65450             :     "Only a few drivers support this operation. See :cpp:func:`GDALDataset::AddFieldDomain`.\n"
   65451             :     "\n"
   65452             :     "Parameters\n"
   65453             :     "----------\n"
   65454             :     "fieldDomain : ogr.FieldDomain\n"
   65455             :     "              The field domain to add\n"
   65456             :     "\n"
   65457             :     "Returns\n"
   65458             :     "--------\n"
   65459             :     "bool:\n"
   65460             :     "    ``True`` if the field domain was added, ``False`` in case of error.\n"
   65461             :     "\n"
   65462             :     "\n"
   65463             :     "\n"
   65464             :     ""},
   65465             :    { "Dataset_DeleteFieldDomain", _wrap_Dataset_DeleteFieldDomain, METH_VARARGS, "\n"
   65466             :     "Dataset_DeleteFieldDomain(Dataset self, char const * name) -> bool\n"
   65467             :     "\n"
   65468             :     "\n"
   65469             :     "Removes a field domain from the Dataset.\n"
   65470             :     "\n"
   65471             :     "Parameters\n"
   65472             :     "----------\n"
   65473             :     "name : str\n"
   65474             :     "       Name of the field domain to delete\n"
   65475             :     "\n"
   65476             :     "Returns\n"
   65477             :     "-------\n"
   65478             :     "bool\n"
   65479             :     "     ``True`` if the field domain was removed, otherwise ``False``.\n"
   65480             :     "\n"
   65481             :     "\n"
   65482             :     ""},
   65483             :    { "Dataset_UpdateFieldDomain", _wrap_Dataset_UpdateFieldDomain, METH_VARARGS, "\n"
   65484             :     "Dataset_UpdateFieldDomain(Dataset self, FieldDomain fieldDomain) -> bool\n"
   65485             :     "\n"
   65486             :     "\n"
   65487             :     "Update an existing field domain by replacing its definition.\n"
   65488             :     "\n"
   65489             :     "The existing field domain with matching name will be replaced.\n"
   65490             :     "\n"
   65491             :     "Requires the :py:const:`ogr.ODsCUpdateFieldDomain` datasset capability.\n"
   65492             :     "\n"
   65493             :     "Parameters\n"
   65494             :     "----------\n"
   65495             :     "fieldDomain : ogr.FieldDomain\n"
   65496             :     "    Updated field domain.\n"
   65497             :     "\n"
   65498             :     "Returns\n"
   65499             :     "-------\n"
   65500             :     "bool\n"
   65501             :     "    ``True`` in case of success\n"
   65502             :     "\n"
   65503             :     "\n"
   65504             :     ""},
   65505             :    { "Dataset_GetRelationshipNames", _wrap_Dataset_GetRelationshipNames, METH_VARARGS, "\n"
   65506             :     "Dataset_GetRelationshipNames(Dataset self, char ** options=None) -> char **\n"
   65507             :     "\n"
   65508             :     "\n"
   65509             :     "Get a list of the names of all relationships stored in the dataset.\n"
   65510             :     "\n"
   65511             :     "Parameters\n"
   65512             :     "----------\n"
   65513             :     "options : dict/list, optional\n"
   65514             :     "    driver-specific options determining how the relationships should be retrieved\n"
   65515             :     "\n"
   65516             :     "\n"
   65517             :     ""},
   65518             :    { "Dataset_GetRelationship", _wrap_Dataset_GetRelationship, METH_VARARGS, "\n"
   65519             :     "Dataset_GetRelationship(Dataset self, char const * name) -> Relationship\n"
   65520             :     "\n"
   65521             :     "\n"
   65522             :     "Get a relationship from its name.\n"
   65523             :     "\n"
   65524             :     "Returns\n"
   65525             :     "-------\n"
   65526             :     "Relationship, or ``None`` if not found.\n"
   65527             :     "\n"
   65528             :     ""},
   65529             :    { "Dataset_AddRelationship", _wrap_Dataset_AddRelationship, METH_VARARGS, "\n"
   65530             :     "Dataset_AddRelationship(Dataset self, Relationship relationship) -> bool\n"
   65531             :     "\n"
   65532             :     "\n"
   65533             :     "Add a :py:class:`Relationship` to the dataset.\n"
   65534             :     "\n"
   65535             :     "See :cpp:func:`GDALDataset::AddRelationship`.\n"
   65536             :     "\n"
   65537             :     "Parameters\n"
   65538             :     "----------\n"
   65539             :     "relationship : Relationship\n"
   65540             :     "               The relationship to add\n"
   65541             :     "\n"
   65542             :     "Returns\n"
   65543             :     "-------\n"
   65544             :     "bool:\n"
   65545             :     "    ``True`` if the field domain was added, ``False`` in case of error.\n"
   65546             :     "\n"
   65547             :     "\n"
   65548             :     ""},
   65549             :    { "Dataset_DeleteRelationship", _wrap_Dataset_DeleteRelationship, METH_VARARGS, "\n"
   65550             :     "Dataset_DeleteRelationship(Dataset self, char const * name) -> bool\n"
   65551             :     "\n"
   65552             :     "\n"
   65553             :     "Removes a relationship from the Dataset.\n"
   65554             :     "\n"
   65555             :     "Parameters\n"
   65556             :     "----------\n"
   65557             :     "name : str\n"
   65558             :     "       Name of the relationship to remove.\n"
   65559             :     "\n"
   65560             :     "Returns\n"
   65561             :     "-------\n"
   65562             :     "bool\n"
   65563             :     "     ``True`` if the relationship  was removed, otherwise ``False``.\n"
   65564             :     "\n"
   65565             :     "\n"
   65566             :     "\n"
   65567             :     ""},
   65568             :    { "Dataset_UpdateRelationship", _wrap_Dataset_UpdateRelationship, METH_VARARGS, "\n"
   65569             :     "Dataset_UpdateRelationship(Dataset self, Relationship relationship) -> bool\n"
   65570             :     "\n"
   65571             :     "\n"
   65572             :     "Update an existing relationship by replacing its definition.\n"
   65573             :     "\n"
   65574             :     "The existing relationship with matching name will be replaced.\n"
   65575             :     "\n"
   65576             :     "Requires the :py:const:`gdal.GDsCUpdateFieldDomain` dataset capability.\n"
   65577             :     "\n"
   65578             :     "Parameters\n"
   65579             :     "----------\n"
   65580             :     "relationship : Relationship\n"
   65581             :     "    Updated relationship\n"
   65582             :     "\n"
   65583             :     "Returns\n"
   65584             :     "-------\n"
   65585             :     "bool\n"
   65586             :     "    ``True`` in case of success\n"
   65587             :     "\n"
   65588             :     "\n"
   65589             :     ""},
   65590             :    { "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"},
   65591             :    { "Dataset_swigregister", Dataset_swigregister, METH_O, NULL},
   65592             :    { "new_RasterAttributeTable", _wrap_new_RasterAttributeTable, METH_NOARGS, "new_RasterAttributeTable() -> RasterAttributeTable"},
   65593             :    { "delete_RasterAttributeTable", _wrap_delete_RasterAttributeTable, METH_O, "delete_RasterAttributeTable(RasterAttributeTable self)"},
   65594             :    { "RasterAttributeTable_Clone", _wrap_RasterAttributeTable_Clone, METH_O, "\n"
   65595             :     "RasterAttributeTable_Clone(RasterAttributeTable self) -> RasterAttributeTable\n"
   65596             :     "\n"
   65597             :     "\n"
   65598             :     "Create a copy of the RAT.\n"
   65599             :     "\n"
   65600             :     "Returns\n"
   65601             :     "-------\n"
   65602             :     "GDALRasterAttributeTable\n"
   65603             :     "\n"
   65604             :     "\n"
   65605             :     ""},
   65606             :    { "RasterAttributeTable_GetColumnCount", _wrap_RasterAttributeTable_GetColumnCount, METH_O, "\n"
   65607             :     "RasterAttributeTable_GetColumnCount(RasterAttributeTable self) -> int\n"
   65608             :     "\n"
   65609             :     "\n"
   65610             :     "Return the number of columns in the RAT. \n"
   65611             :     "\n"
   65612             :     "See :cpp:func:`GDALRasterAttributeTable::GetColumnCount`.\n"
   65613             :     "\n"
   65614             :     "Returns\n"
   65615             :     "-------\n"
   65616             :     "int\n"
   65617             :     "    The number of columns in the RAT\n"
   65618             :     "\n"
   65619             :     "Examples\n"
   65620             :     "--------\n"
   65621             :     ">>> with gdal.Open('clc2018_v2020_20u1.tif') as ds:\n"
   65622             :     "...     ds.GetRasterBand(1).GetDefaultRAT().GetColumnCount()\n"
   65623             :     "... \n"
   65624             :     "7\n"
   65625             :     "\n"
   65626             :     "\n"
   65627             :     ""},
   65628             :    { "RasterAttributeTable_GetNameOfCol", _wrap_RasterAttributeTable_GetNameOfCol, METH_VARARGS, "\n"
   65629             :     "RasterAttributeTable_GetNameOfCol(RasterAttributeTable self, int iCol) -> char const *\n"
   65630             :     "\n"
   65631             :     "\n"
   65632             :     "Get the name of a specified column (0-indexed).\n"
   65633             :     "\n"
   65634             :     "See :cpp:func:`GDALRasterAttributeTable::GetNameOfCol`.\n"
   65635             :     "\n"
   65636             :     "Parameters\n"
   65637             :     "----------\n"
   65638             :     "iCol : int\n"
   65639             :     "    The index of the column (starting at 0)\n"
   65640             :     "\n"
   65641             :     "Returns\n"
   65642             :     "-------\n"
   65643             :     "str\n"
   65644             :     "    The name of the column\n"
   65645             :     "\n"
   65646             :     "Examples\n"
   65647             :     "--------\n"
   65648             :     ">>> ds = gdal.Open('clc2018_v2020_20u1.tif')\n"
   65649             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   65650             :     ">>> [rat.GetNameOfCol(i) for i in range(rat.GetColumnCount())]\n"
   65651             :     "['Value', 'Count', 'LABEL3', 'Red', 'Green', 'Blue', 'CODE_18']\n"
   65652             :     "\n"
   65653             :     "\n"
   65654             :     ""},
   65655             :    { "RasterAttributeTable_GetUsageOfCol", _wrap_RasterAttributeTable_GetUsageOfCol, METH_VARARGS, "\n"
   65656             :     "RasterAttributeTable_GetUsageOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldUsage\n"
   65657             :     "\n"
   65658             :     "\n"
   65659             :     "Return the usage of a column in the RAT.\n"
   65660             :     "\n"
   65661             :     "See :cpp:func:`GDALRasterAttributeTable::GetUsageOfCol`.\n"
   65662             :     "\n"
   65663             :     "Parameters\n"
   65664             :     "----------\n"
   65665             :     "iCol : int\n"
   65666             :     "    The index of the column (starting at 0)\n"
   65667             :     "\n"
   65668             :     "Returns\n"
   65669             :     "-------\n"
   65670             :     "int\n"
   65671             :     "    Usage code for the specified column\n"
   65672             :     "\n"
   65673             :     "Examples\n"
   65674             :     "--------\n"
   65675             :     ">>> ds = gdal.Open('clc2018_v2020_20u1.tif')\n"
   65676             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   65677             :     ">>> [rat.GetUsageOfCol(i) for i in range(rat.GetColumnCount())]\n"
   65678             :     "[5, 0, 0, 6, 7, 8, 0]\n"
   65679             :     ">>> [rat.GetUsageOfCol(i) == gdal.GFU_Red for i in range(rat.GetColumnCount())]\n"
   65680             :     "[False, False, False, True, False, False, False]\n"
   65681             :     "\n"
   65682             :     "\n"
   65683             :     ""},
   65684             :    { "RasterAttributeTable_GetTypeOfCol", _wrap_RasterAttributeTable_GetTypeOfCol, METH_VARARGS, "\n"
   65685             :     "RasterAttributeTable_GetTypeOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldType\n"
   65686             :     "\n"
   65687             :     "\n"
   65688             :     "Return the data type of a column in the RAT (one of :py:const:`GFT_Integer`, :py:const:`GFT_Real`, or :py:const:`GFT_String`).\n"
   65689             :     "\n"
   65690             :     "See :cpp:func:`GDALRasterAttributeTable::GetTypeOfCol`.\n"
   65691             :     "\n"
   65692             :     "Parameters\n"
   65693             :     "----------\n"
   65694             :     "iCol : int\n"
   65695             :     "    The index of the column (starting at 0)\n"
   65696             :     "\n"
   65697             :     "Returns\n"
   65698             :     "-------\n"
   65699             :     "int\n"
   65700             :     "    type code for the specified column\n"
   65701             :     "\n"
   65702             :     "Examples\n"
   65703             :     "--------\n"
   65704             :     ">>> ds = gdal.Open('clc2018_v2020_20u1.tif')\n"
   65705             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   65706             :     ">>> rat.GetTypeOfCol(2) == gdal.GFT_String\n"
   65707             :     "True\n"
   65708             :     "\n"
   65709             :     "\n"
   65710             :     ""},
   65711             :    { "RasterAttributeTable_GetColOfUsage", _wrap_RasterAttributeTable_GetColOfUsage, METH_VARARGS, "\n"
   65712             :     "RasterAttributeTable_GetColOfUsage(RasterAttributeTable self, GDALRATFieldUsage eUsage) -> int\n"
   65713             :     "\n"
   65714             :     "\n"
   65715             :     "Return the first column of a specified usage the a RAT.\n"
   65716             :     "\n"
   65717             :     "See :cpp:func:`GDALRasterAttributeTable::GetColOfUsage`.\n"
   65718             :     "\n"
   65719             :     "Parameters\n"
   65720             :     "----------\n"
   65721             :     "eUsage : int\n"
   65722             :     "    Usage code such as :py:const:`gdal.GFU_Red`.\n"
   65723             :     "\n"
   65724             :     "Returns\n"
   65725             :     "-------\n"
   65726             :     "int\n"
   65727             :     "    Index of the column, or -1 if no such column can be found.\n"
   65728             :     "\n"
   65729             :     "Examples\n"
   65730             :     "--------\n"
   65731             :     ">>> ds = gdal.Open('clc2018_v2020_20u1.tif')\n"
   65732             :     ">>> rat.GetColOfUsage(gdal.GFU_Name)\n"
   65733             :     "-1\n"
   65734             :     ">>> rat.GetColOfUsage(gdal.GFU_Generic)\n"
   65735             :     "1\n"
   65736             :     "\n"
   65737             :     "\n"
   65738             :     ""},
   65739             :    { "RasterAttributeTable_GetRowCount", _wrap_RasterAttributeTable_GetRowCount, METH_O, "\n"
   65740             :     "RasterAttributeTable_GetRowCount(RasterAttributeTable self) -> int\n"
   65741             :     "\n"
   65742             :     "\n"
   65743             :     "Return the number of rows in the RAT. \n"
   65744             :     "\n"
   65745             :     "See :cpp:func:`GDALRasterAttributeTable::GetRowCount`.\n"
   65746             :     "\n"
   65747             :     "Returns\n"
   65748             :     "-------\n"
   65749             :     "int\n"
   65750             :     "    The number of rows in the RAT\n"
   65751             :     "\n"
   65752             :     "Examples\n"
   65753             :     "--------\n"
   65754             :     ">>> with gdal.Open('clc2018_v2020_20u1.tif') as ds:\n"
   65755             :     "...     ds.GetRasterBand(1).GetDefaultRAT().GetRowCount()\n"
   65756             :     "... \n"
   65757             :     "45\n"
   65758             :     "\n"
   65759             :     "\n"
   65760             :     ""},
   65761             :    { "RasterAttributeTable_GetValueAsString", _wrap_RasterAttributeTable_GetValueAsString, METH_VARARGS, "\n"
   65762             :     "RasterAttributeTable_GetValueAsString(RasterAttributeTable self, int iRow, int iCol) -> char const *\n"
   65763             :     "\n"
   65764             :     "\n"
   65765             :     "Get the value of a single cell in the RAT.\n"
   65766             :     "\n"
   65767             :     "Parameters\n"
   65768             :     "----------\n"
   65769             :     "iRow : int\n"
   65770             :     "    Row index (0-based)\n"
   65771             :     "iCol : int\n"
   65772             :     "    Column index (0-based)\n"
   65773             :     "\n"
   65774             :     ""},
   65775             :    { "RasterAttributeTable_GetValueAsInt", _wrap_RasterAttributeTable_GetValueAsInt, METH_VARARGS, "\n"
   65776             :     "RasterAttributeTable_GetValueAsInt(RasterAttributeTable self, int iRow, int iCol) -> int\n"
   65777             :     "\n"
   65778             :     "\n"
   65779             :     "Get the value of a single cell in the RAT.\n"
   65780             :     "\n"
   65781             :     "Parameters\n"
   65782             :     "----------\n"
   65783             :     "iRow : int\n"
   65784             :     "    Row index (0-based)\n"
   65785             :     "iCol : int\n"
   65786             :     "    Column index (0-based)\n"
   65787             :     "\n"
   65788             :     ""},
   65789             :    { "RasterAttributeTable_GetValueAsDouble", _wrap_RasterAttributeTable_GetValueAsDouble, METH_VARARGS, "\n"
   65790             :     "RasterAttributeTable_GetValueAsDouble(RasterAttributeTable self, int iRow, int iCol) -> double\n"
   65791             :     "\n"
   65792             :     "\n"
   65793             :     "Get the value of a single cell in the RAT.\n"
   65794             :     "\n"
   65795             :     "Parameters\n"
   65796             :     "----------\n"
   65797             :     "iRow : int\n"
   65798             :     "    Row index (0-based)\n"
   65799             :     "iCol : int\n"
   65800             :     "    Column index (0-based)\n"
   65801             :     "\n"
   65802             :     ""},
   65803             :    { "RasterAttributeTable_ReadValuesIOAsString", _wrap_RasterAttributeTable_ReadValuesIOAsString, METH_VARARGS, "\n"
   65804             :     "RasterAttributeTable_ReadValuesIOAsString(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr\n"
   65805             :     "\n"
   65806             :     "\n"
   65807             :     "Read a single column of a RAT into a list of strings.\n"
   65808             :     "\n"
   65809             :     "Parameters\n"
   65810             :     "----------\n"
   65811             :     "iField : int\n"
   65812             :     "    The index of the column (starting at 0)\n"
   65813             :     "iStartRow : int, default = 0\n"
   65814             :     "    The index of the first row to read (starting at 0)\n"
   65815             :     "iLength : int, default = None\n"
   65816             :     "    The number of rows to read \n"
   65817             :     "\n"
   65818             :     "Returns\n"
   65819             :     "-------\n"
   65820             :     "list\n"
   65821             :     "\n"
   65822             :     "Examples\n"
   65823             :     "--------\n"
   65824             :     ">>> ds = gdal.Open('clc2018_v2020_20u1.tif')\n"
   65825             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   65826             :     ">>> rat.ReadValuesIOAsString(2, 5, 3)\n"
   65827             :     "['Airports', 'Mineral extraction sites', 'Dump sites']\n"
   65828             :     "\n"
   65829             :     "See Also\n"
   65830             :     "--------\n"
   65831             :     ":py:meth:`ReadAsArray`\n"
   65832             :     "\n"
   65833             :     "\n"
   65834             :     ""},
   65835             :    { "RasterAttributeTable_ReadValuesIOAsInteger", _wrap_RasterAttributeTable_ReadValuesIOAsInteger, METH_VARARGS, "\n"
   65836             :     "RasterAttributeTable_ReadValuesIOAsInteger(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr\n"
   65837             :     "\n"
   65838             :     "\n"
   65839             :     "Read a single column of a RAT into a list of ints.\n"
   65840             :     "\n"
   65841             :     "Parameters\n"
   65842             :     "----------\n"
   65843             :     "iField : int\n"
   65844             :     "    The index of the column (starting at 0)\n"
   65845             :     "iStartRow : int, default = 0\n"
   65846             :     "    The index of the first row to read (starting at 0)\n"
   65847             :     "iLength : int, default = None\n"
   65848             :     "    The number of rows to read \n"
   65849             :     "\n"
   65850             :     "Returns\n"
   65851             :     "-------\n"
   65852             :     "list\n"
   65853             :     "\n"
   65854             :     "Examples\n"
   65855             :     "--------\n"
   65856             :     ">>> ds = gdal.Open('clc2018_v2020_20u1.tif')\n"
   65857             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   65858             :     ">>> rat.ReadValuesIOAsInteger(1, 5, 3)\n"
   65859             :     "[352020, 820443, 125373]\n"
   65860             :     "\n"
   65861             :     "See Also\n"
   65862             :     "--------\n"
   65863             :     ":py:meth:`ReadAsArray`\n"
   65864             :     "\n"
   65865             :     "\n"
   65866             :     ""},
   65867             :    { "RasterAttributeTable_ReadValuesIOAsDouble", _wrap_RasterAttributeTable_ReadValuesIOAsDouble, METH_VARARGS, "\n"
   65868             :     "RasterAttributeTable_ReadValuesIOAsDouble(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr\n"
   65869             :     "\n"
   65870             :     "\n"
   65871             :     "Read a single column of a RAT into a list of floats.\n"
   65872             :     "\n"
   65873             :     "Parameters\n"
   65874             :     "----------\n"
   65875             :     "iField : int\n"
   65876             :     "    The index of the column (starting at 0)\n"
   65877             :     "iStartRow : int, default = 0\n"
   65878             :     "    The index of the first row to read (starting at 0)\n"
   65879             :     "iLength : int, default = None\n"
   65880             :     "    The number of rows to read \n"
   65881             :     "\n"
   65882             :     "Returns\n"
   65883             :     "-------\n"
   65884             :     "list\n"
   65885             :     "\n"
   65886             :     "Examples\n"
   65887             :     "--------\n"
   65888             :     ">>> ds = gdal.Open('clc2018_v2020_20u1.tif')\n"
   65889             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   65890             :     ">>> rat.ReadValuesIOAsDouble(1, 5, 3)\n"
   65891             :     "[352020.0, 820443.0, 125373.0]\n"
   65892             :     "\n"
   65893             :     "See Also\n"
   65894             :     "--------\n"
   65895             :     ":py:meth:`ReadAsArray`\n"
   65896             :     "\n"
   65897             :     "\n"
   65898             :     ""},
   65899             :    { "RasterAttributeTable_SetValueAsString", _wrap_RasterAttributeTable_SetValueAsString, METH_VARARGS, "\n"
   65900             :     "RasterAttributeTable_SetValueAsString(RasterAttributeTable self, int iRow, int iCol, char const * pszValue)\n"
   65901             :     "\n"
   65902             :     "\n"
   65903             :     "Set the value of a single cell in the RAT.\n"
   65904             :     "\n"
   65905             :     "If ``iRow`` is equal to the number of rows in the table, the table\n"
   65906             :     "size will be increased by one. However, it is more efficient to\n"
   65907             :     "call :py:meth:`SetRowCount` before repeated insertions.\n"
   65908             :     "\n"
   65909             :     "Parameters\n"
   65910             :     "----------\n"
   65911             :     "iRow : int\n"
   65912             :     "    Row index (0-based)\n"
   65913             :     "iCol : int\n"
   65914             :     "    Column index (0-based)\n"
   65915             :     "pszValue : str\n"
   65916             :     "    Cell value\n"
   65917             :     "\n"
   65918             :     ""},
   65919             :    { "RasterAttributeTable_SetValueAsInt", _wrap_RasterAttributeTable_SetValueAsInt, METH_VARARGS, "\n"
   65920             :     "RasterAttributeTable_SetValueAsInt(RasterAttributeTable self, int iRow, int iCol, int nValue)\n"
   65921             :     "\n"
   65922             :     "\n"
   65923             :     "Set the value of a single cell in the RAT.\n"
   65924             :     "\n"
   65925             :     "If ``iRow`` is equal to the number of rows in the table, the table\n"
   65926             :     "size will be increased by one. However, it is more efficient to\n"
   65927             :     "call :py:meth:`SetRowCount` before repeated insertions.\n"
   65928             :     "\n"
   65929             :     "Parameters\n"
   65930             :     "----------\n"
   65931             :     "iRow : int\n"
   65932             :     "    Row index (0-based)\n"
   65933             :     "iCol : int\n"
   65934             :     "    Column index (0-based)\n"
   65935             :     "nValue : int\n"
   65936             :     "    Cell value\n"
   65937             :     "\n"
   65938             :     ""},
   65939             :    { "RasterAttributeTable_SetValueAsDouble", _wrap_RasterAttributeTable_SetValueAsDouble, METH_VARARGS, "\n"
   65940             :     "RasterAttributeTable_SetValueAsDouble(RasterAttributeTable self, int iRow, int iCol, double dfValue)\n"
   65941             :     "\n"
   65942             :     "\n"
   65943             :     "Set the value of a single cell in the RAT.\n"
   65944             :     "\n"
   65945             :     "If ``iRow`` is equal to the number of rows in the table, the table\n"
   65946             :     "size will be increased by one. However, it is more efficient to\n"
   65947             :     "call :py:meth:`SetRowCount` before repeated insertions.\n"
   65948             :     "\n"
   65949             :     "Parameters\n"
   65950             :     "----------\n"
   65951             :     "iRow : int\n"
   65952             :     "    Row index (0-based)\n"
   65953             :     "iCol : int\n"
   65954             :     "    Column index (0-based)\n"
   65955             :     "dfValue : float\n"
   65956             :     "    Cell value\n"
   65957             :     "\n"
   65958             :     ""},
   65959             :    { "RasterAttributeTable_SetRowCount", _wrap_RasterAttributeTable_SetRowCount, METH_VARARGS, "\n"
   65960             :     "RasterAttributeTable_SetRowCount(RasterAttributeTable self, int nCount)\n"
   65961             :     "\n"
   65962             :     "\n"
   65963             :     "Resizes the table to include the indicated number of rows. Newly created\n"
   65964             :     "rows will be initialized to '' for strings and zero for numeric fields.\n"
   65965             :     "\n"
   65966             :     "See :cpp:func:`GDALRasterAttributeTable::SetRowCount`.\n"
   65967             :     "\n"
   65968             :     "Parameters\n"
   65969             :     "----------\n"
   65970             :     "nCount : int\n"
   65971             :     "   The number of rows in the resized table\n"
   65972             :     "\n"
   65973             :     "\n"
   65974             :     ""},
   65975             :    { "RasterAttributeTable_CreateColumn", _wrap_RasterAttributeTable_CreateColumn, METH_VARARGS, "\n"
   65976             :     "RasterAttributeTable_CreateColumn(RasterAttributeTable self, char const * pszName, GDALRATFieldType eType, GDALRATFieldUsage eUsage) -> int\n"
   65977             :     "\n"
   65978             :     "\n"
   65979             :     "Create a new column in the RAT.\n"
   65980             :     "\n"
   65981             :     "If the table already has rows, all row values for the new column will\n"
   65982             :     "be initialized to the default value ('', or zero).  The new column is\n"
   65983             :     "always created as the last column.\n"
   65984             :     "\n"
   65985             :     "Parameters\n"
   65986             :     "----------\n"
   65987             :     "pszName : str\n"
   65988             :     "    Name of the new column\n"
   65989             :     "eType : int\n"
   65990             :     "    Data type of the new column (one of :py:const:`GFT_Integer`, :py:const:`GFT_Real`, or :py:const:`GFT_String`).\n"
   65991             :     "eUsage : int\n"
   65992             :     "    Usage of the new column (see :cpp:enum:`GDALRATFieldUsage`)\n"
   65993             :     "\n"
   65994             :     "Returns\n"
   65995             :     "-------\n"
   65996             :     "int:\n"
   65997             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   65998             :     "\n"
   65999             :     "\n"
   66000             :     ""},
   66001             :    { "RasterAttributeTable_GetLinearBinning", _wrap_RasterAttributeTable_GetLinearBinning, METH_O, "\n"
   66002             :     "RasterAttributeTable_GetLinearBinning(RasterAttributeTable self) -> bool\n"
   66003             :     "\n"
   66004             :     "\n"
   66005             :     "Get linear binning information, if any.\n"
   66006             :     "\n"
   66007             :     "See :cpp:func:`GDALRasterAttributeTable::GetLinearBinning`.\n"
   66008             :     "\n"
   66009             :     "Returns\n"
   66010             :     "-------\n"
   66011             :     "list\n"
   66012             :     "   a three-element list indicating whether linear binning information\n"
   66013             :     "   is available, the minimum value associated with the smallest bin,\n"
   66014             :     "   and the size of each bin.\n"
   66015             :     "\n"
   66016             :     "\n"
   66017             :     ""},
   66018             :    { "RasterAttributeTable_SetLinearBinning", _wrap_RasterAttributeTable_SetLinearBinning, METH_VARARGS, "\n"
   66019             :     "RasterAttributeTable_SetLinearBinning(RasterAttributeTable self, double dfRow0Min, double dfBinSize) -> int\n"
   66020             :     "\n"
   66021             :     "\n"
   66022             :     "Set linear binning information.\n"
   66023             :     "\n"
   66024             :     "This can be used to provide optimized table look-ups (via\n"
   66025             :     ":py:meth:`GetRowOfValue`) when the rows of the table represent\n"
   66026             :     "uniformly sized bins. \n"
   66027             :     "\n"
   66028             :     "It is the responsibility of the user to actually define the \n"
   66029             :     "appropriate bins. If the bins do not correspond to the provided\n"
   66030             :     "binning information, lookup values will be incorrect.\n"
   66031             :     "\n"
   66032             :     "See :cpp:func:`GDALRasterAttributeTable::SetLinearBinning`.\n"
   66033             :     "\n"
   66034             :     "Parameters\n"
   66035             :     "----------\n"
   66036             :     "dfRow0Min : float\n"
   66037             :     "    Minimum value associated with the smallest bin   \n"
   66038             :     "dfBinSize : float\n"
   66039             :     "    Size of each bin\n"
   66040             :     "\n"
   66041             :     ""},
   66042             :    { "RasterAttributeTable_GetRowOfValue", _wrap_RasterAttributeTable_GetRowOfValue, METH_VARARGS, "\n"
   66043             :     "RasterAttributeTable_GetRowOfValue(RasterAttributeTable self, double dfValue) -> int\n"
   66044             :     "\n"
   66045             :     "\n"
   66046             :     "Return the index of the row that applies to a specific value,\n"
   66047             :     "or -1 of no such row exists.\n"
   66048             :     "\n"
   66049             :     "See :cpp:func:`GDALRasterAttributeTable::GetRowOfValue`.\n"
   66050             :     "\n"
   66051             :     "Parameters\n"
   66052             :     "----------\n"
   66053             :     "dfValue : float\n"
   66054             :     "    Value for which a row should be found\n"
   66055             :     "\n"
   66056             :     "Returns\n"
   66057             :     "-------\n"
   66058             :     "int\n"
   66059             :     "    Index of the row (0-based), or -1 of no row was found\n"
   66060             :     "\n"
   66061             :     "Examples\n"
   66062             :     "--------\n"
   66063             :     ">>> ds = gdal.Open('clc2018_v2020_20u1.tif')\n"
   66064             :     ">>> rat = ds.GetRasterBand(1).GetDefaultRAT()\n"
   66065             :     ">>> rat.GetValueAsString(rat.GetRowOfValue(33), 2)\n"
   66066             :     "'Burnt areas'\n"
   66067             :     ">>> rat.GetValueAsString(rat.GetRowOfValue(802), 2)\n"
   66068             :     "ERROR 1: iRow (-1) out of range.\n"
   66069             :     "''\n"
   66070             :     "\n"
   66071             :     "See Also\n"
   66072             :     "--------\n"
   66073             :     ":py:meth:`SetLinearBinning`\n"
   66074             :     "\n"
   66075             :     "\n"
   66076             :     ""},
   66077             :    { "RasterAttributeTable_ChangesAreWrittenToFile", _wrap_RasterAttributeTable_ChangesAreWrittenToFile, METH_O, "RasterAttributeTable_ChangesAreWrittenToFile(RasterAttributeTable self) -> int"},
   66078             :    { "RasterAttributeTable_DumpReadable", _wrap_RasterAttributeTable_DumpReadable, METH_O, "\n"
   66079             :     "RasterAttributeTable_DumpReadable(RasterAttributeTable self)\n"
   66080             :     "\n"
   66081             :     "\n"
   66082             :     "Return an XML representation of the RAT.\n"
   66083             :     "\n"
   66084             :     "Returns\n"
   66085             :     "-------\n"
   66086             :     "str\n"
   66087             :     "\n"
   66088             :     "\n"
   66089             :     ""},
   66090             :    { "RasterAttributeTable_SetTableType", _wrap_RasterAttributeTable_SetTableType, METH_VARARGS, "\n"
   66091             :     "RasterAttributeTable_SetTableType(RasterAttributeTable self, GDALRATTableType eTableType)\n"
   66092             :     "\n"
   66093             :     "\n"
   66094             :     "Set the type of the RAT (thematic or athematic).\n"
   66095             :     "\n"
   66096             :     "Parameters\n"
   66097             :     "----------\n"
   66098             :     "eTableType : int\n"
   66099             :     "   Table type (:py:const:`GRTT_THEMATIC` or :py:const:`GRTT_ATHEMATIC`)    \n"
   66100             :     "\n"
   66101             :     ""},
   66102             :    { "RasterAttributeTable_GetTableType", _wrap_RasterAttributeTable_GetTableType, METH_O, "\n"
   66103             :     "RasterAttributeTable_GetTableType(RasterAttributeTable self) -> GDALRATTableType\n"
   66104             :     "\n"
   66105             :     "\n"
   66106             :     "Returns the type of the RAT (:py:const:`GRTT_THEMATIC` or :py:const:`GRTT_ATHEMATIC`).\n"
   66107             :     "\n"
   66108             :     "See :cpp:func:`GDALRasterAttributeTable::GetTableType`.\n"
   66109             :     "\n"
   66110             :     "Returns\n"
   66111             :     "-------\n"
   66112             :     "int\n"
   66113             :     "    table type code\n"
   66114             :     "\n"
   66115             :     "\n"
   66116             :     ""},
   66117             :    { "RasterAttributeTable_RemoveStatistics", _wrap_RasterAttributeTable_RemoveStatistics, METH_O, "\n"
   66118             :     "RasterAttributeTable_RemoveStatistics(RasterAttributeTable self)\n"
   66119             :     "\n"
   66120             :     "\n"
   66121             :     "Remove statistics information, such as a histogram, from the RAT.\n"
   66122             :     "\n"
   66123             :     "See :cpp:func:`GDALRasterAttributeTable::RemoveStatistics`.\n"
   66124             :     "\n"
   66125             :     "\n"
   66126             :     ""},
   66127             :    { "RasterAttributeTable_swigregister", RasterAttributeTable_swigregister, METH_O, NULL},
   66128             :    { "RasterAttributeTable_swiginit", RasterAttributeTable_swiginit, METH_VARARGS, NULL},
   66129             :    { "delete_Group", _wrap_delete_Group, METH_O, "delete_Group(Group self)"},
   66130             :    { "Group_GetName", _wrap_Group_GetName, METH_O, "Group_GetName(Group self) -> char const *"},
   66131             :    { "Group_GetFullName", _wrap_Group_GetFullName, METH_O, "Group_GetFullName(Group self) -> char const *"},
   66132             :    { "Group_GetMDArrayNames", _wrap_Group_GetMDArrayNames, METH_VARARGS, "Group_GetMDArrayNames(Group self, char ** options=None) -> char **"},
   66133             :    { "Group_GetMDArrayFullNamesRecursive", _wrap_Group_GetMDArrayFullNamesRecursive, METH_VARARGS, "Group_GetMDArrayFullNamesRecursive(Group self, char ** groupOptions=None, char ** arrayOptions=None) -> char **"},
   66134             :    { "Group_OpenMDArray", _wrap_Group_OpenMDArray, METH_VARARGS, "Group_OpenMDArray(Group self, char const * name, char ** options=None) -> MDArray"},
   66135             :    { "Group_OpenMDArrayFromFullname", _wrap_Group_OpenMDArrayFromFullname, METH_VARARGS, "Group_OpenMDArrayFromFullname(Group self, char const * name, char ** options=None) -> MDArray"},
   66136             :    { "Group_ResolveMDArray", _wrap_Group_ResolveMDArray, METH_VARARGS, "Group_ResolveMDArray(Group self, char const * name, char const * starting_point, char ** options=None) -> MDArray"},
   66137             :    { "Group_GetGroupNames", _wrap_Group_GetGroupNames, METH_VARARGS, "Group_GetGroupNames(Group self, char ** options=None) -> char **"},
   66138             :    { "Group_OpenGroup", _wrap_Group_OpenGroup, METH_VARARGS, "Group_OpenGroup(Group self, char const * name, char ** options=None) -> Group"},
   66139             :    { "Group_OpenGroupFromFullname", _wrap_Group_OpenGroupFromFullname, METH_VARARGS, "Group_OpenGroupFromFullname(Group self, char const * name, char ** options=None) -> Group"},
   66140             :    { "Group_GetVectorLayerNames", _wrap_Group_GetVectorLayerNames, METH_VARARGS, "Group_GetVectorLayerNames(Group self, char ** options=None) -> char **"},
   66141             :    { "Group_OpenVectorLayer", _wrap_Group_OpenVectorLayer, METH_VARARGS, "Group_OpenVectorLayer(Group self, char const * name, char ** options=None) -> Layer"},
   66142             :    { "Group_GetDimensions", _wrap_Group_GetDimensions, METH_VARARGS, "Group_GetDimensions(Group self, char ** options=None)"},
   66143             :    { "Group_GetAttribute", _wrap_Group_GetAttribute, METH_VARARGS, "Group_GetAttribute(Group self, char const * name) -> Attribute"},
   66144             :    { "Group_GetAttributes", _wrap_Group_GetAttributes, METH_VARARGS, "Group_GetAttributes(Group self, char ** options=None)"},
   66145             :    { "Group_GetStructuralInfo", _wrap_Group_GetStructuralInfo, METH_O, "Group_GetStructuralInfo(Group self) -> char **"},
   66146             :    { "Group_CreateGroup", (PyCFunction)(void(*)(void))_wrap_Group_CreateGroup, METH_VARARGS|METH_KEYWORDS, "Group_CreateGroup(Group self, char const * name, char ** options=None) -> Group"},
   66147             :    { "Group_DeleteGroup", _wrap_Group_DeleteGroup, METH_VARARGS, "Group_DeleteGroup(Group self, char const * name, char ** options=None) -> CPLErr"},
   66148             :    { "Group_CreateDimension", (PyCFunction)(void(*)(void))_wrap_Group_CreateDimension, METH_VARARGS|METH_KEYWORDS, "\n"
   66149             :     "Group_CreateDimension(Group self, char const * name, char const * dim_type, char const * direction, GUIntBig size, char ** options=None) -> Dimension\n"
   66150             :     "\n"
   66151             :     "\n"
   66152             :     "Create a dimension within a :py:class:`Group`.\n"
   66153             :     "\n"
   66154             :     "See :cpp:func:`GDALGroup::CreateDimension`.\n"
   66155             :     "\n"
   66156             :     "Parameters\n"
   66157             :     "----------\n"
   66158             :     "name : str\n"
   66159             :     "    Dimension name\n"
   66160             :     "dim_type : str\n"
   66161             :     "    Dimension type (might be empty, and ignored by drivers)\n"
   66162             :     "direction: str\n"
   66163             :     "    Dimension direction (might be empty, and ignored by drivers)\n"
   66164             :     "size : int\n"
   66165             :     "    Number of values indexed by this dimension. Should be > 0\n"
   66166             :     "options: dict/list\n"
   66167             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   66168             :     "\n"
   66169             :     "Returns\n"
   66170             :     "-------\n"
   66171             :     "\n"
   66172             :     "Dimension:\n"
   66173             :     "    the new :py:class:`Dimension` or ``None`` on failure.\n"
   66174             :     "\n"
   66175             :     "Examples\n"
   66176             :     "--------\n"
   66177             :     "\n"
   66178             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   66179             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   66180             :     ">>> rg = mem_ds.GetRootGroup()\n"
   66181             :     ">>> dim_band = rg.CreateDimension('band', None, None, 3)\n"
   66182             :     ">>> dim_x = rg.CreateDimension('X', None, None, 2)\n"
   66183             :     ">>> dim_x.GetFullName()\n"
   66184             :     "'/X'\n"
   66185             :     ">>> lat = rg.CreateDimension('latitude', gdal.DIM_TYPE_HORIZONTAL_X, None, 2)\n"
   66186             :     ">>> lat.GetType()\n"
   66187             :     "'HORIZONTAL_X'\n"
   66188             :     "\n"
   66189             :     ""},
   66190             :    { "Group_CreateMDArray", _wrap_Group_CreateMDArray, METH_VARARGS, "\n"
   66191             :     "Group_CreateMDArray(Group self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> MDArray\n"
   66192             :     "\n"
   66193             :     "\n"
   66194             :     "Create a multidimensional array within a group.\n"
   66195             :     "\n"
   66196             :     "It is recommended that the GDALDimension objects passed in ``dimensions``\n"
   66197             :     "belong to this group, either by retrieving them with :py:meth:`GetDimensions`\n"
   66198             :     "or creating a new one with :py:meth:`CreateDimension`.\n"
   66199             :     "\n"
   66200             :     "See :cpp:func:`GDALGroup::CreateMDArray`.\n"
   66201             :     "\n"
   66202             :     "Parameters\n"
   66203             :     "----------\n"
   66204             :     "name : str\n"
   66205             :     "    name\n"
   66206             :     "dimensions : list\n"
   66207             :     "    List of dimensions, ordered from the slowest varying\n"
   66208             :     "    dimension first to the fastest varying dimension last.\n"
   66209             :     "    Might be empty for a scalar array (if supported by driver)\n"
   66210             :     "data_type: :py:class:`ExtendedDataType`\n"
   66211             :     "    Array data type\n"
   66212             :     "options: dict/list\n"
   66213             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   66214             :     "\n"
   66215             :     "Returns\n"
   66216             :     "-------\n"
   66217             :     "\n"
   66218             :     "MDArray:\n"
   66219             :     "    the new :py:class:`MDArray` or ``None`` on failure.\n"
   66220             :     "\n"
   66221             :     "Examples\n"
   66222             :     "--------\n"
   66223             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   66224             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   66225             :     ">>> rg = mem_ds.GetRootGroup()\n"
   66226             :     ">>> dimX = rg.CreateDimension('X', None, None, 3)\n"
   66227             :     ">>> ar = rg.CreateMDArray('ar', [dimX], gdal.ExtendedDataType.Create(gdal.GDT_Byte))\n"
   66228             :     "\n"
   66229             :     "\n"
   66230             :     ""},
   66231             :    { "Group_DeleteMDArray", _wrap_Group_DeleteMDArray, METH_VARARGS, "Group_DeleteMDArray(Group self, char const * name, char ** options=None) -> CPLErr"},
   66232             :    { "Group_CreateAttribute", _wrap_Group_CreateAttribute, METH_VARARGS, "\n"
   66233             :     "Group_CreateAttribute(Group self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> Attribute\n"
   66234             :     "\n"
   66235             :     "\n"
   66236             :     "Create an attribute within a :py:class:`MDArray` or :py:class:`Group`.\n"
   66237             :     "\n"
   66238             :     "See :cpp:func:`GDALIHasAttribute::CreateAttribute`.\n"
   66239             :     "\n"
   66240             :     "Parameters\n"
   66241             :     "----------\n"
   66242             :     "name : str\n"
   66243             :     "    name\n"
   66244             :     "dimensions : list\n"
   66245             :     "    List of dimensions, ordered from the slowest varying\n"
   66246             :     "    dimension first to the fastest varying dimension last.\n"
   66247             :     "    Might be empty for a scalar array (if supported by driver)\n"
   66248             :     "data_type: :py:class:`ExtendedDataType`\n"
   66249             :     "    Attribute data type\n"
   66250             :     "options: dict/list\n"
   66251             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   66252             :     "\n"
   66253             :     "Returns\n"
   66254             :     "-------\n"
   66255             :     "\n"
   66256             :     "Attribute:\n"
   66257             :     "    the new :py:class:`Attribute` or ``None`` on failure.\n"
   66258             :     "\n"
   66259             :     "Examples\n"
   66260             :     "--------\n"
   66261             :     "\n"
   66262             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   66263             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   66264             :     ">>> rg = mem_ds.GetRootGroup()\n"
   66265             :     ">>> dim = rg.CreateDimension('dim', None, None, 2)\n"
   66266             :     ">>> ar = rg.CreateMDArray('ar_double', [dim], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   66267             :     ">>> numeric_attr = ar.CreateAttribute('numeric_attr', [], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   66268             :     ">>> string_attr = ar.CreateAttribute('string_attr', [], gdal.ExtendedDataType.CreateString())\n"
   66269             :     "\n"
   66270             :     "\n"
   66271             :     ""},
   66272             :    { "Group_DeleteAttribute", _wrap_Group_DeleteAttribute, METH_VARARGS, "Group_DeleteAttribute(Group self, char const * name, char ** options=None) -> CPLErr"},
   66273             :    { "Group_Rename", _wrap_Group_Rename, METH_VARARGS, "Group_Rename(Group self, char const * newName) -> CPLErr"},
   66274             :    { "Group_SubsetDimensionFromSelection", _wrap_Group_SubsetDimensionFromSelection, METH_VARARGS, "Group_SubsetDimensionFromSelection(Group self, char const * selection, char ** options=None) -> Group"},
   66275             :    { "Group_GetDataTypeCount", _wrap_Group_GetDataTypeCount, METH_O, "Group_GetDataTypeCount(Group self) -> size_t"},
   66276             :    { "Group_GetDataType", _wrap_Group_GetDataType, METH_VARARGS, "Group_GetDataType(Group self, size_t idx) -> ExtendedDataType"},
   66277             :    { "Group_swigregister", Group_swigregister, METH_O, NULL},
   66278             :    { "Statistics_min_get", _wrap_Statistics_min_get, METH_O, "Statistics_min_get(Statistics self) -> double"},
   66279             :    { "Statistics_max_get", _wrap_Statistics_max_get, METH_O, "Statistics_max_get(Statistics self) -> double"},
   66280             :    { "Statistics_mean_get", _wrap_Statistics_mean_get, METH_O, "Statistics_mean_get(Statistics self) -> double"},
   66281             :    { "Statistics_std_dev_get", _wrap_Statistics_std_dev_get, METH_O, "Statistics_std_dev_get(Statistics self) -> double"},
   66282             :    { "Statistics_valid_count_get", _wrap_Statistics_valid_count_get, METH_O, "Statistics_valid_count_get(Statistics self) -> GIntBig"},
   66283             :    { "delete_Statistics", _wrap_delete_Statistics, METH_O, "delete_Statistics(Statistics self)"},
   66284             :    { "new_Statistics", _wrap_new_Statistics, METH_NOARGS, "new_Statistics() -> Statistics"},
   66285             :    { "Statistics_swigregister", Statistics_swigregister, METH_O, NULL},
   66286             :    { "Statistics_swiginit", Statistics_swiginit, METH_VARARGS, NULL},
   66287             :    { "delete_MDArray", _wrap_delete_MDArray, METH_O, "delete_MDArray(MDArray self)"},
   66288             :    { "MDArray_GetName", _wrap_MDArray_GetName, METH_O, "MDArray_GetName(MDArray self) -> char const *"},
   66289             :    { "MDArray_GetFullName", _wrap_MDArray_GetFullName, METH_O, "MDArray_GetFullName(MDArray self) -> char const *"},
   66290             :    { "MDArray_GetTotalElementsCount", _wrap_MDArray_GetTotalElementsCount, METH_O, "MDArray_GetTotalElementsCount(MDArray self) -> GUIntBig"},
   66291             :    { "MDArray_GetDimensionCount", _wrap_MDArray_GetDimensionCount, METH_O, "MDArray_GetDimensionCount(MDArray self) -> size_t"},
   66292             :    { "MDArray_GetDimensions", _wrap_MDArray_GetDimensions, METH_O, "MDArray_GetDimensions(MDArray self)"},
   66293             :    { "MDArray_GetCoordinateVariables", _wrap_MDArray_GetCoordinateVariables, METH_O, "MDArray_GetCoordinateVariables(MDArray self)"},
   66294             :    { "MDArray_GetBlockSize", _wrap_MDArray_GetBlockSize, METH_O, "MDArray_GetBlockSize(MDArray self)"},
   66295             :    { "MDArray_GetProcessingChunkSize", _wrap_MDArray_GetProcessingChunkSize, METH_VARARGS, "MDArray_GetProcessingChunkSize(MDArray self, size_t nMaxChunkMemory)"},
   66296             :    { "MDArray_GetDataType", _wrap_MDArray_GetDataType, METH_O, "MDArray_GetDataType(MDArray self) -> ExtendedDataType"},
   66297             :    { "MDArray_GetStructuralInfo", _wrap_MDArray_GetStructuralInfo, METH_O, "MDArray_GetStructuralInfo(MDArray self) -> char **"},
   66298             :    { "MDArray_Resize", _wrap_MDArray_Resize, METH_VARARGS, "MDArray_Resize(MDArray self, int newDimensions, char ** options=None) -> CPLErr"},
   66299             :    { "MDArray_Read", _wrap_MDArray_Read, METH_VARARGS, "MDArray_Read(MDArray self, int nDims1, int nDims2, int nDims3, int nDims4, ExtendedDataType buffer_datatype) -> CPLErr"},
   66300             :    { "MDArray_WriteStringArray", _wrap_MDArray_WriteStringArray, METH_VARARGS, "MDArray_WriteStringArray(MDArray self, int nDims1, int nDims2, int nDims3, ExtendedDataType buffer_datatype, char ** options) -> CPLErr"},
   66301             :    { "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"},
   66302             :    { "MDArray_AdviseRead", _wrap_MDArray_AdviseRead, METH_VARARGS, "MDArray_AdviseRead(MDArray self, int nDims1, int nDims2, char ** options=None) -> CPLErr"},
   66303             :    { "MDArray_GetAttribute", _wrap_MDArray_GetAttribute, METH_VARARGS, "MDArray_GetAttribute(MDArray self, char const * name) -> Attribute"},
   66304             :    { "MDArray_GetAttributes", _wrap_MDArray_GetAttributes, METH_VARARGS, "MDArray_GetAttributes(MDArray self, char ** options=None)"},
   66305             :    { "MDArray_CreateAttribute", _wrap_MDArray_CreateAttribute, METH_VARARGS, "\n"
   66306             :     "MDArray_CreateAttribute(MDArray self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> Attribute\n"
   66307             :     "\n"
   66308             :     "\n"
   66309             :     "Create an attribute within a :py:class:`MDArray` or :py:class:`Group`.\n"
   66310             :     "\n"
   66311             :     "See :cpp:func:`GDALIHasAttribute::CreateAttribute`.\n"
   66312             :     "\n"
   66313             :     "Parameters\n"
   66314             :     "----------\n"
   66315             :     "name : str\n"
   66316             :     "    name\n"
   66317             :     "dimensions : list\n"
   66318             :     "    List of dimensions, ordered from the slowest varying\n"
   66319             :     "    dimension first to the fastest varying dimension last.\n"
   66320             :     "    Might be empty for a scalar array (if supported by driver)\n"
   66321             :     "data_type: :py:class:`ExtendedDataType`\n"
   66322             :     "    Attribute data type\n"
   66323             :     "options: dict/list\n"
   66324             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   66325             :     "\n"
   66326             :     "Returns\n"
   66327             :     "-------\n"
   66328             :     "\n"
   66329             :     "Attribute:\n"
   66330             :     "    the new :py:class:`Attribute` or ``None`` on failure.\n"
   66331             :     "\n"
   66332             :     "Examples\n"
   66333             :     "--------\n"
   66334             :     "\n"
   66335             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   66336             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   66337             :     ">>> rg = mem_ds.GetRootGroup()\n"
   66338             :     ">>> dim = rg.CreateDimension('dim', None, None, 2)\n"
   66339             :     ">>> ar = rg.CreateMDArray('ar_double', [dim], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   66340             :     ">>> numeric_attr = ar.CreateAttribute('numeric_attr', [], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   66341             :     ">>> string_attr = ar.CreateAttribute('string_attr', [], gdal.ExtendedDataType.CreateString())\n"
   66342             :     "\n"
   66343             :     "\n"
   66344             :     ""},
   66345             :    { "MDArray_DeleteAttribute", _wrap_MDArray_DeleteAttribute, METH_VARARGS, "MDArray_DeleteAttribute(MDArray self, char const * name, char ** options=None) -> CPLErr"},
   66346             :    { "MDArray_GetNoDataValueAsRaw", _wrap_MDArray_GetNoDataValueAsRaw, METH_O, "MDArray_GetNoDataValueAsRaw(MDArray self) -> CPLErr"},
   66347             :    { "MDArray_GetNoDataValueAsDouble", _wrap_MDArray_GetNoDataValueAsDouble, METH_O, "MDArray_GetNoDataValueAsDouble(MDArray self)"},
   66348             :    { "MDArray_GetNoDataValueAsInt64", _wrap_MDArray_GetNoDataValueAsInt64, METH_O, "MDArray_GetNoDataValueAsInt64(MDArray self)"},
   66349             :    { "MDArray_GetNoDataValueAsUInt64", _wrap_MDArray_GetNoDataValueAsUInt64, METH_O, "MDArray_GetNoDataValueAsUInt64(MDArray self)"},
   66350             :    { "MDArray_GetNoDataValueAsString", _wrap_MDArray_GetNoDataValueAsString, METH_O, "MDArray_GetNoDataValueAsString(MDArray self) -> retStringAndCPLFree *"},
   66351             :    { "MDArray_SetNoDataValueDouble", _wrap_MDArray_SetNoDataValueDouble, METH_VARARGS, "MDArray_SetNoDataValueDouble(MDArray self, double d) -> CPLErr"},
   66352             :    { "MDArray_SetNoDataValueInt64", _wrap_MDArray_SetNoDataValueInt64, METH_VARARGS, "MDArray_SetNoDataValueInt64(MDArray self, GIntBig v) -> CPLErr"},
   66353             :    { "MDArray_SetNoDataValueUInt64", _wrap_MDArray_SetNoDataValueUInt64, METH_VARARGS, "MDArray_SetNoDataValueUInt64(MDArray self, GUIntBig v) -> CPLErr"},
   66354             :    { "MDArray_SetNoDataValueString", _wrap_MDArray_SetNoDataValueString, METH_VARARGS, "MDArray_SetNoDataValueString(MDArray self, char const * nodata) -> CPLErr"},
   66355             :    { "MDArray_SetNoDataValueRaw", _wrap_MDArray_SetNoDataValueRaw, METH_VARARGS, "MDArray_SetNoDataValueRaw(MDArray self, GIntBig nLen) -> CPLErr"},
   66356             :    { "MDArray_DeleteNoDataValue", _wrap_MDArray_DeleteNoDataValue, METH_O, "MDArray_DeleteNoDataValue(MDArray self) -> CPLErr"},
   66357             :    { "MDArray_GetOffset", _wrap_MDArray_GetOffset, METH_O, "MDArray_GetOffset(MDArray self)"},
   66358             :    { "MDArray_GetOffsetStorageType", _wrap_MDArray_GetOffsetStorageType, METH_O, "MDArray_GetOffsetStorageType(MDArray self) -> GDALDataType"},
   66359             :    { "MDArray_GetScale", _wrap_MDArray_GetScale, METH_O, "MDArray_GetScale(MDArray self)"},
   66360             :    { "MDArray_GetScaleStorageType", _wrap_MDArray_GetScaleStorageType, METH_O, "MDArray_GetScaleStorageType(MDArray self) -> GDALDataType"},
   66361             :    { "MDArray_SetOffset", (PyCFunction)(void(*)(void))_wrap_MDArray_SetOffset, METH_VARARGS|METH_KEYWORDS, "MDArray_SetOffset(MDArray self, double val, GDALDataType storageType=GDT_Unknown) -> CPLErr"},
   66362             :    { "MDArray_SetScale", (PyCFunction)(void(*)(void))_wrap_MDArray_SetScale, METH_VARARGS|METH_KEYWORDS, "MDArray_SetScale(MDArray self, double val, GDALDataType storageType=GDT_Unknown) -> CPLErr"},
   66363             :    { "MDArray_SetUnit", _wrap_MDArray_SetUnit, METH_VARARGS, "MDArray_SetUnit(MDArray self, char const * unit) -> CPLErr"},
   66364             :    { "MDArray_GetUnit", _wrap_MDArray_GetUnit, METH_O, "MDArray_GetUnit(MDArray self) -> char const *"},
   66365             :    { "MDArray_SetSpatialRef", _wrap_MDArray_SetSpatialRef, METH_VARARGS, "MDArray_SetSpatialRef(MDArray self, SpatialReference srs) -> OGRErr"},
   66366             :    { "MDArray_GetSpatialRef", _wrap_MDArray_GetSpatialRef, METH_O, "MDArray_GetSpatialRef(MDArray self) -> SpatialReference"},
   66367             :    { "MDArray_GetView", _wrap_MDArray_GetView, METH_VARARGS, "MDArray_GetView(MDArray self, char const * viewExpr) -> MDArray"},
   66368             :    { "MDArray_Transpose", _wrap_MDArray_Transpose, METH_VARARGS, "MDArray_Transpose(MDArray self, int axisMap) -> MDArray"},
   66369             :    { "MDArray_GetUnscaled", _wrap_MDArray_GetUnscaled, METH_O, "MDArray_GetUnscaled(MDArray self) -> MDArray"},
   66370             :    { "MDArray_GetMask", _wrap_MDArray_GetMask, METH_VARARGS, "MDArray_GetMask(MDArray self, char ** options=None) -> MDArray"},
   66371             :    { "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"},
   66372             :    { "MDArray_AsClassicDataset", _wrap_MDArray_AsClassicDataset, METH_VARARGS, "MDArray_AsClassicDataset(MDArray self, size_t iXDim, size_t iYDim, Group hRootGroup=None, char ** options=None) -> Dataset"},
   66373             :    { "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"},
   66374             :    { "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"},
   66375             :    { "MDArray_GetResampled", _wrap_MDArray_GetResampled, METH_VARARGS, "MDArray_GetResampled(MDArray self, int nDimensions, GDALRIOResampleAlg resample_alg, OSRSpatialReferenceShadow ** srs, char ** options=None) -> MDArray"},
   66376             :    { "MDArray_GetMeshGrid", _wrap_MDArray_GetMeshGrid, METH_VARARGS, "MDArray_GetMeshGrid(int nInputArrays, char ** options=None)"},
   66377             :    { "MDArray_Cache", _wrap_MDArray_Cache, METH_VARARGS, "MDArray_Cache(MDArray self, char ** options=None) -> bool"},
   66378             :    { "MDArray_Rename", _wrap_MDArray_Rename, METH_VARARGS, "MDArray_Rename(MDArray self, char const * newName) -> CPLErr"},
   66379             :    { "MDArray_swigregister", MDArray_swigregister, METH_O, NULL},
   66380             :    { "delete_Attribute", _wrap_delete_Attribute, METH_O, "delete_Attribute(Attribute self)"},
   66381             :    { "Attribute_GetName", _wrap_Attribute_GetName, METH_O, "Attribute_GetName(Attribute self) -> char const *"},
   66382             :    { "Attribute_GetFullName", _wrap_Attribute_GetFullName, METH_O, "Attribute_GetFullName(Attribute self) -> char const *"},
   66383             :    { "Attribute_GetTotalElementsCount", _wrap_Attribute_GetTotalElementsCount, METH_O, "Attribute_GetTotalElementsCount(Attribute self) -> GUIntBig"},
   66384             :    { "Attribute_GetDimensionCount", _wrap_Attribute_GetDimensionCount, METH_O, "Attribute_GetDimensionCount(Attribute self) -> size_t"},
   66385             :    { "Attribute_GetDimensionsSize", _wrap_Attribute_GetDimensionsSize, METH_O, "Attribute_GetDimensionsSize(Attribute self)"},
   66386             :    { "Attribute_GetDataType", _wrap_Attribute_GetDataType, METH_O, "Attribute_GetDataType(Attribute self) -> ExtendedDataType"},
   66387             :    { "Attribute_ReadAsRaw", _wrap_Attribute_ReadAsRaw, METH_O, "Attribute_ReadAsRaw(Attribute self) -> CPLErr"},
   66388             :    { "Attribute_ReadAsString", _wrap_Attribute_ReadAsString, METH_O, "Attribute_ReadAsString(Attribute self) -> char const *"},
   66389             :    { "Attribute_ReadAsInt", _wrap_Attribute_ReadAsInt, METH_O, "Attribute_ReadAsInt(Attribute self) -> int"},
   66390             :    { "Attribute_ReadAsInt64", _wrap_Attribute_ReadAsInt64, METH_O, "Attribute_ReadAsInt64(Attribute self) -> long long"},
   66391             :    { "Attribute_ReadAsDouble", _wrap_Attribute_ReadAsDouble, METH_O, "Attribute_ReadAsDouble(Attribute self) -> double"},
   66392             :    { "Attribute_ReadAsStringArray", _wrap_Attribute_ReadAsStringArray, METH_O, "Attribute_ReadAsStringArray(Attribute self) -> char **"},
   66393             :    { "Attribute_ReadAsIntArray", _wrap_Attribute_ReadAsIntArray, METH_O, "Attribute_ReadAsIntArray(Attribute self)"},
   66394             :    { "Attribute_ReadAsInt64Array", _wrap_Attribute_ReadAsInt64Array, METH_O, "Attribute_ReadAsInt64Array(Attribute self)"},
   66395             :    { "Attribute_ReadAsDoubleArray", _wrap_Attribute_ReadAsDoubleArray, METH_O, "Attribute_ReadAsDoubleArray(Attribute self)"},
   66396             :    { "Attribute_WriteRaw", _wrap_Attribute_WriteRaw, METH_VARARGS, "Attribute_WriteRaw(Attribute self, GIntBig nLen) -> CPLErr"},
   66397             :    { "Attribute_WriteString", _wrap_Attribute_WriteString, METH_VARARGS, "Attribute_WriteString(Attribute self, char const * val) -> CPLErr"},
   66398             :    { "Attribute_WriteStringArray", _wrap_Attribute_WriteStringArray, METH_VARARGS, "Attribute_WriteStringArray(Attribute self, char ** vals) -> CPLErr"},
   66399             :    { "Attribute_WriteInt", _wrap_Attribute_WriteInt, METH_VARARGS, "Attribute_WriteInt(Attribute self, int val) -> CPLErr"},
   66400             :    { "Attribute_WriteInt64", _wrap_Attribute_WriteInt64, METH_VARARGS, "Attribute_WriteInt64(Attribute self, long long val) -> CPLErr"},
   66401             :    { "Attribute_WriteDouble", _wrap_Attribute_WriteDouble, METH_VARARGS, "Attribute_WriteDouble(Attribute self, double val) -> CPLErr"},
   66402             :    { "Attribute_WriteIntArray", _wrap_Attribute_WriteIntArray, METH_VARARGS, "Attribute_WriteIntArray(Attribute self, int nList) -> CPLErr"},
   66403             :    { "Attribute_WriteInt64Array", _wrap_Attribute_WriteInt64Array, METH_VARARGS, "Attribute_WriteInt64Array(Attribute self, int nList) -> CPLErr"},
   66404             :    { "Attribute_WriteDoubleArray", _wrap_Attribute_WriteDoubleArray, METH_VARARGS, "Attribute_WriteDoubleArray(Attribute self, int nList) -> CPLErr"},
   66405             :    { "Attribute_Rename", _wrap_Attribute_Rename, METH_VARARGS, "Attribute_Rename(Attribute self, char const * newName) -> CPLErr"},
   66406             :    { "Attribute_swigregister", Attribute_swigregister, METH_O, NULL},
   66407             :    { "delete_Dimension", _wrap_delete_Dimension, METH_O, "delete_Dimension(Dimension self)"},
   66408             :    { "Dimension_GetName", _wrap_Dimension_GetName, METH_O, "Dimension_GetName(Dimension self) -> char const *"},
   66409             :    { "Dimension_GetFullName", _wrap_Dimension_GetFullName, METH_O, "Dimension_GetFullName(Dimension self) -> char const *"},
   66410             :    { "Dimension_GetType", _wrap_Dimension_GetType, METH_O, "Dimension_GetType(Dimension self) -> char const *"},
   66411             :    { "Dimension_GetDirection", _wrap_Dimension_GetDirection, METH_O, "Dimension_GetDirection(Dimension self) -> char const *"},
   66412             :    { "Dimension_GetSize", _wrap_Dimension_GetSize, METH_O, "Dimension_GetSize(Dimension self) -> GUIntBig"},
   66413             :    { "Dimension_GetIndexingVariable", _wrap_Dimension_GetIndexingVariable, METH_O, "Dimension_GetIndexingVariable(Dimension self) -> MDArray"},
   66414             :    { "Dimension_SetIndexingVariable", _wrap_Dimension_SetIndexingVariable, METH_VARARGS, "Dimension_SetIndexingVariable(Dimension self, MDArray array) -> bool"},
   66415             :    { "Dimension_Rename", _wrap_Dimension_Rename, METH_VARARGS, "Dimension_Rename(Dimension self, char const * newName) -> CPLErr"},
   66416             :    { "Dimension_swigregister", Dimension_swigregister, METH_O, NULL},
   66417             :    { "delete_ExtendedDataType", _wrap_delete_ExtendedDataType, METH_O, "delete_ExtendedDataType(ExtendedDataType self)"},
   66418             :    { "ExtendedDataType_Create", _wrap_ExtendedDataType_Create, METH_O, "ExtendedDataType_Create(GDALDataType dt) -> ExtendedDataType"},
   66419             :    { "ExtendedDataType_CreateString", _wrap_ExtendedDataType_CreateString, METH_VARARGS, "ExtendedDataType_CreateString(size_t nMaxStringLength=0, GDALExtendedDataTypeSubType eSubType=GEDTST_NONE) -> ExtendedDataType"},
   66420             :    { "ExtendedDataType_CreateCompound", _wrap_ExtendedDataType_CreateCompound, METH_VARARGS, "ExtendedDataType_CreateCompound(char const * name, size_t nTotalSize, int nComps) -> ExtendedDataType"},
   66421             :    { "ExtendedDataType_GetName", _wrap_ExtendedDataType_GetName, METH_O, "ExtendedDataType_GetName(ExtendedDataType self) -> char const *"},
   66422             :    { "ExtendedDataType_GetClass", _wrap_ExtendedDataType_GetClass, METH_O, "ExtendedDataType_GetClass(ExtendedDataType self) -> GDALExtendedDataTypeClass"},
   66423             :    { "ExtendedDataType_GetNumericDataType", _wrap_ExtendedDataType_GetNumericDataType, METH_O, "ExtendedDataType_GetNumericDataType(ExtendedDataType self) -> GDALDataType"},
   66424             :    { "ExtendedDataType_GetSize", _wrap_ExtendedDataType_GetSize, METH_O, "ExtendedDataType_GetSize(ExtendedDataType self) -> size_t"},
   66425             :    { "ExtendedDataType_GetMaxStringLength", _wrap_ExtendedDataType_GetMaxStringLength, METH_O, "ExtendedDataType_GetMaxStringLength(ExtendedDataType self) -> size_t"},
   66426             :    { "ExtendedDataType_GetSubType", _wrap_ExtendedDataType_GetSubType, METH_O, "ExtendedDataType_GetSubType(ExtendedDataType self) -> GDALExtendedDataTypeSubType"},
   66427             :    { "ExtendedDataType_GetRAT", _wrap_ExtendedDataType_GetRAT, METH_O, "ExtendedDataType_GetRAT(ExtendedDataType self) -> RasterAttributeTable"},
   66428             :    { "ExtendedDataType_GetComponents", _wrap_ExtendedDataType_GetComponents, METH_O, "ExtendedDataType_GetComponents(ExtendedDataType self)"},
   66429             :    { "ExtendedDataType_CanConvertTo", _wrap_ExtendedDataType_CanConvertTo, METH_VARARGS, "ExtendedDataType_CanConvertTo(ExtendedDataType self, ExtendedDataType other) -> bool"},
   66430             :    { "ExtendedDataType_Equals", _wrap_ExtendedDataType_Equals, METH_VARARGS, "ExtendedDataType_Equals(ExtendedDataType self, ExtendedDataType other) -> bool"},
   66431             :    { "ExtendedDataType_swigregister", ExtendedDataType_swigregister, METH_O, NULL},
   66432             :    { "delete_EDTComponent", _wrap_delete_EDTComponent, METH_O, "delete_EDTComponent(EDTComponent self)"},
   66433             :    { "EDTComponent_Create", _wrap_EDTComponent_Create, METH_VARARGS, "EDTComponent_Create(char const * name, size_t offset, ExtendedDataType type) -> EDTComponent"},
   66434             :    { "EDTComponent_GetName", _wrap_EDTComponent_GetName, METH_O, "EDTComponent_GetName(EDTComponent self) -> char const *"},
   66435             :    { "EDTComponent_GetOffset", _wrap_EDTComponent_GetOffset, METH_O, "EDTComponent_GetOffset(EDTComponent self) -> size_t"},
   66436             :    { "EDTComponent_GetType", _wrap_EDTComponent_GetType, METH_O, "EDTComponent_GetType(EDTComponent self) -> ExtendedDataType"},
   66437             :    { "EDTComponent_swigregister", EDTComponent_swigregister, METH_O, NULL},
   66438             :    { "CreateRasterAttributeTableFromMDArrays", _wrap_CreateRasterAttributeTableFromMDArrays, METH_VARARGS, "CreateRasterAttributeTableFromMDArrays(GDALRATTableType eTableType, int nArrays, int nUsages=0) -> RasterAttributeTable"},
   66439             :    { "Band_XSize_get", _wrap_Band_XSize_get, METH_O, "Band_XSize_get(Band self) -> int"},
   66440             :    { "Band_YSize_get", _wrap_Band_YSize_get, METH_O, "Band_YSize_get(Band self) -> int"},
   66441             :    { "Band_DataType_get", _wrap_Band_DataType_get, METH_O, "Band_DataType_get(Band self) -> GDALDataType"},
   66442             :    { "Band_GetDataset", _wrap_Band_GetDataset, METH_O, "\n"
   66443             :     "Band_GetDataset(Band self) -> Dataset\n"
   66444             :     "\n"
   66445             :     "\n"
   66446             :     "Fetch the :py:class:`Dataset` associated with this Band.\n"
   66447             :     "See :cpp:func:`GDALRasterBand::GetDataset`.\n"
   66448             :     "\n"
   66449             :     ""},
   66450             :    { "Band_GetBand", _wrap_Band_GetBand, METH_O, "\n"
   66451             :     "Band_GetBand(Band self) -> int\n"
   66452             :     "\n"
   66453             :     "\n"
   66454             :     "Return the index of this band.\n"
   66455             :     "See :cpp:func:`GDALRasterBand::GetBand`.\n"
   66456             :     "\n"
   66457             :     "Returns\n"
   66458             :     "-------\n"
   66459             :     "int\n"
   66460             :     "    the (1-based) index of this band\n"
   66461             :     "\n"
   66462             :     ""},
   66463             :    { "Band_GetBlockSize", _wrap_Band_GetBlockSize, METH_O, "\n"
   66464             :     "Band_GetBlockSize(Band self)\n"
   66465             :     "\n"
   66466             :     "\n"
   66467             :     "Fetch the natural block size of this band.\n"
   66468             :     "See :cpp:func:`GDALRasterBand::GetBlockSize`.\n"
   66469             :     "\n"
   66470             :     "Returns\n"
   66471             :     "-------\n"
   66472             :     "list\n"
   66473             :     "    list with the x and y dimensions of a block\n"
   66474             :     "\n"
   66475             :     ""},
   66476             :    { "Band_GetActualBlockSize", _wrap_Band_GetActualBlockSize, METH_VARARGS, "\n"
   66477             :     "Band_GetActualBlockSize(Band self, int nXBlockOff, int nYBlockOff)\n"
   66478             :     "\n"
   66479             :     "\n"
   66480             :     "Fetch the actual block size for a given block offset.\n"
   66481             :     "See :cpp:func:`GDALRasterBand::GetActualBlockSize`.\n"
   66482             :     "\n"
   66483             :     "Parameters\n"
   66484             :     "----------\n"
   66485             :     "nXBlockOff : int\n"
   66486             :     "    the horizontal block offset for which to calculate the\n"
   66487             :     "    number of valid pixels, with zero indicating the left most block, 1 the next\n"
   66488             :     "    block and so forth.\n"
   66489             :     "nYBlockOff : int\n"
   66490             :     "    the vertical block offset, with zero indicating\n"
   66491             :     "    the top most block, 1 the next block and so forth.\n"
   66492             :     "\n"
   66493             :     "Returns\n"
   66494             :     "-------\n"
   66495             :     "tuple\n"
   66496             :     "    tuple with the x and y dimensions of the block\n"
   66497             :     "\n"
   66498             :     ""},
   66499             :    { "Band_GetColorInterpretation", _wrap_Band_GetColorInterpretation, METH_O, "\n"
   66500             :     "Band_GetColorInterpretation(Band self) -> GDALColorInterp\n"
   66501             :     "\n"
   66502             :     "\n"
   66503             :     "Get the :cpp:enum:`GDALColorInterp` value for this band.\n"
   66504             :     "See :cpp:func:`GDALRasterBand::GetColorInterpretation`.\n"
   66505             :     "\n"
   66506             :     "Returns\n"
   66507             :     "-------\n"
   66508             :     "int\n"
   66509             :     "\n"
   66510             :     ""},
   66511             :    { "Band_GetRasterColorInterpretation", _wrap_Band_GetRasterColorInterpretation, METH_O, "\n"
   66512             :     "Band_GetRasterColorInterpretation(Band self) -> GDALColorInterp\n"
   66513             :     "\n"
   66514             :     "\n"
   66515             :     "Return the color interpretation code for this band.\n"
   66516             :     "See :cpp:func:`GDALRasterBand::GetColorInterpretation`.\n"
   66517             :     "\n"
   66518             :     "Returns\n"
   66519             :     "-------\n"
   66520             :     "int\n"
   66521             :     "    The color interpretation code (default :py:const:`gdal.GCI_Undefined`)\n"
   66522             :     "\n"
   66523             :     "\n"
   66524             :     ""},
   66525             :    { "Band_SetColorInterpretation", _wrap_Band_SetColorInterpretation, METH_VARARGS, "\n"
   66526             :     "Band_SetColorInterpretation(Band self, GDALColorInterp val) -> CPLErr\n"
   66527             :     "\n"
   66528             :     "\n"
   66529             :     "Set color interpretation of the band\n"
   66530             :     "See :cpp:func:`GDALRasterBand::SetColorInterpretation`.\n"
   66531             :     "\n"
   66532             :     "Parameters\n"
   66533             :     "----------\n"
   66534             :     "val : int\n"
   66535             :     "    A color interpretation code such as :py:const:`gdal.GCI_RedBand`\n"
   66536             :     "\n"
   66537             :     "Returns\n"
   66538             :     "-------\n"
   66539             :     "int:\n"
   66540             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66541             :     "\n"
   66542             :     ""},
   66543             :    { "Band_SetRasterColorInterpretation", _wrap_Band_SetRasterColorInterpretation, METH_VARARGS, "\n"
   66544             :     "Band_SetRasterColorInterpretation(Band self, GDALColorInterp val) -> CPLErr\n"
   66545             :     "\n"
   66546             :     "Deprecated.  Alternate name for :py:meth:`SetColorInterpretation`.\n"
   66547             :     "\n"
   66548             :     ""},
   66549             :    { "Band_GetNoDataValue", _wrap_Band_GetNoDataValue, METH_O, "Band_GetNoDataValue(Band self)"},
   66550             :    { "Band_GetNoDataValueAsInt64", _wrap_Band_GetNoDataValueAsInt64, METH_O, "\n"
   66551             :     "Band_GetNoDataValueAsInt64(Band self)\n"
   66552             :     "\n"
   66553             :     "\n"
   66554             :     "Fetch the nodata value for this band.\n"
   66555             :     "See :cpp:func:`GDALRasterBand::GetNoDataValueAsInt64`.\n"
   66556             :     "\n"
   66557             :     "Returns\n"
   66558             :     "-------\n"
   66559             :     "int\n"
   66560             :     "    The nodata value, or ``None`` if it has not been set or\n"
   66561             :     "    the data type of this band is not :py:const:`gdal.GDT_Int64`.\n"
   66562             :     "\n"
   66563             :     "\n"
   66564             :     ""},
   66565             :    { "Band_GetNoDataValueAsUInt64", _wrap_Band_GetNoDataValueAsUInt64, METH_O, "\n"
   66566             :     "Band_GetNoDataValueAsUInt64(Band self)\n"
   66567             :     "\n"
   66568             :     "\n"
   66569             :     "Fetch the nodata value for this band.\n"
   66570             :     "See :cpp:func:`GDALRasterBand::GetNoDataValueAsUInt64`.\n"
   66571             :     "\n"
   66572             :     "Returns\n"
   66573             :     "-------\n"
   66574             :     "int\n"
   66575             :     "    The nodata value, or ``None`` if it has not been set or\n"
   66576             :     "    the data type of this band is not :py:const:`gdal.GDT_UInt64`.\n"
   66577             :     "\n"
   66578             :     "\n"
   66579             :     ""},
   66580             :    { "Band_SetNoDataValue", _wrap_Band_SetNoDataValue, METH_VARARGS, "Band_SetNoDataValue(Band self, double d) -> CPLErr"},
   66581             :    { "Band_SetNoDataValueAsInt64", _wrap_Band_SetNoDataValueAsInt64, METH_VARARGS, "Band_SetNoDataValueAsInt64(Band self, GIntBig v) -> CPLErr"},
   66582             :    { "Band_SetNoDataValueAsUInt64", _wrap_Band_SetNoDataValueAsUInt64, METH_VARARGS, "Band_SetNoDataValueAsUInt64(Band self, GUIntBig v) -> CPLErr"},
   66583             :    { "Band_DeleteNoDataValue", _wrap_Band_DeleteNoDataValue, METH_O, "\n"
   66584             :     "Band_DeleteNoDataValue(Band self) -> CPLErr\n"
   66585             :     "\n"
   66586             :     "\n"
   66587             :     "Remove the nodata value for this band.\n"
   66588             :     "\n"
   66589             :     "Returns\n"
   66590             :     "-------\n"
   66591             :     "int:\n"
   66592             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66593             :     "\n"
   66594             :     "\n"
   66595             :     ""},
   66596             :    { "Band_GetUnitType", _wrap_Band_GetUnitType, METH_O, "\n"
   66597             :     "Band_GetUnitType(Band self) -> char const *\n"
   66598             :     "\n"
   66599             :     "\n"
   66600             :     "Return a name for the units of this raster's values.\n"
   66601             :     "See :cpp:func:`GDALRasterBand::GetUnitType`.\n"
   66602             :     "\n"
   66603             :     "Returns\n"
   66604             :     "-------\n"
   66605             :     "str\n"
   66606             :     "\n"
   66607             :     "Examples\n"
   66608             :     "--------\n"
   66609             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   66610             :     ">>> ds.GetRasterBand(1).SetUnitType('ft')\n"
   66611             :     "0\n"
   66612             :     ">>> ds.GetRasterBand(1).GetUnitType()\n"
   66613             :     "'ft'\n"
   66614             :     "\n"
   66615             :     ""},
   66616             :    { "Band_SetUnitType", _wrap_Band_SetUnitType, METH_VARARGS, "\n"
   66617             :     "Band_SetUnitType(Band self, char const * val) -> CPLErr\n"
   66618             :     "\n"
   66619             :     "\n"
   66620             :     "Set unit type.\n"
   66621             :     "See :cpp:func:`GDALRasterBand::SetUnitType`.\n"
   66622             :     "\n"
   66623             :     "Parameters\n"
   66624             :     "----------\n"
   66625             :     "val : str\n"
   66626             :     "\n"
   66627             :     "Returns\n"
   66628             :     "-------\n"
   66629             :     "int:\n"
   66630             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66631             :     "\n"
   66632             :     ""},
   66633             :    { "Band_GetRasterCategoryNames", _wrap_Band_GetRasterCategoryNames, METH_O, "\n"
   66634             :     "Band_GetRasterCategoryNames(Band self) -> char **\n"
   66635             :     "\n"
   66636             :     "\n"
   66637             :     "Fetch the list of category names for this band.\n"
   66638             :     "See :cpp:func:`GDALRasterBand::GetCategoryNames`.\n"
   66639             :     "\n"
   66640             :     "Returns\n"
   66641             :     "-------\n"
   66642             :     "list\n"
   66643             :     "    The list of names, or ``None`` if no names exist.\n"
   66644             :     "\n"
   66645             :     "\n"
   66646             :     ""},
   66647             :    { "Band_SetRasterCategoryNames", _wrap_Band_SetRasterCategoryNames, METH_VARARGS, "\n"
   66648             :     "Band_SetRasterCategoryNames(Band self, char ** names) -> CPLErr\n"
   66649             :     "\n"
   66650             :     "Deprecated.  Alternate name for :py:meth:`SetCategoryNames`.\n"
   66651             :     "\n"
   66652             :     ""},
   66653             :    { "Band_GetMinimum", _wrap_Band_GetMinimum, METH_O, "\n"
   66654             :     "Band_GetMinimum(Band self)\n"
   66655             :     "\n"
   66656             :     "\n"
   66657             :     "Fetch a previously stored maximum value for this band.\n"
   66658             :     "See :cpp:func:`GDALRasterBand::GetMinimum`.\n"
   66659             :     "\n"
   66660             :     "Returns\n"
   66661             :     "-------\n"
   66662             :     "float\n"
   66663             :     "    The stored minimum value, or ``None`` if no value\n"
   66664             :     "    has been stored.\n"
   66665             :     "\n"
   66666             :     "\n"
   66667             :     ""},
   66668             :    { "Band_GetMaximum", _wrap_Band_GetMaximum, METH_O, "\n"
   66669             :     "Band_GetMaximum(Band self)\n"
   66670             :     "\n"
   66671             :     "\n"
   66672             :     "Fetch a previously stored maximum value for this band.\n"
   66673             :     "See :cpp:func:`GDALRasterBand::GetMaximum`.\n"
   66674             :     "\n"
   66675             :     "Returns\n"
   66676             :     "-------\n"
   66677             :     "float\n"
   66678             :     "    The stored maximum value, or ``None`` if no value\n"
   66679             :     "    has been stored.\n"
   66680             :     "\n"
   66681             :     "\n"
   66682             :     ""},
   66683             :    { "Band_GetOffset", _wrap_Band_GetOffset, METH_O, "\n"
   66684             :     "Band_GetOffset(Band self)\n"
   66685             :     "\n"
   66686             :     "\n"
   66687             :     "Fetch the raster value offset.\n"
   66688             :     "See :cpp:func:`GDALRasterBand::GetOffset`.\n"
   66689             :     "\n"
   66690             :     "Returns\n"
   66691             :     "-------\n"
   66692             :     "double\n"
   66693             :     "    The offset value, or ``0.0``.\n"
   66694             :     "\n"
   66695             :     "\n"
   66696             :     ""},
   66697             :    { "Band_GetScale", _wrap_Band_GetScale, METH_O, "\n"
   66698             :     "Band_GetScale(Band self)\n"
   66699             :     "\n"
   66700             :     "\n"
   66701             :     "Fetch the band scale value.\n"
   66702             :     "See :cpp:func:`GDALRasterBand::GetScale`.\n"
   66703             :     "\n"
   66704             :     "Returns\n"
   66705             :     "-------\n"
   66706             :     "double\n"
   66707             :     "    The scale value, or ``1.0``.\n"
   66708             :     "\n"
   66709             :     ""},
   66710             :    { "Band_SetOffset", _wrap_Band_SetOffset, METH_VARARGS, "\n"
   66711             :     "Band_SetOffset(Band self, double val) -> CPLErr\n"
   66712             :     "\n"
   66713             :     "\n"
   66714             :     "Set scaling offset.\n"
   66715             :     "See :cpp:func:`GDALRasterBand::SetOffset`.\n"
   66716             :     "\n"
   66717             :     "Parameters\n"
   66718             :     "----------\n"
   66719             :     "val : float\n"
   66720             :     "\n"
   66721             :     "Returns\n"
   66722             :     "-------\n"
   66723             :     "int:\n"
   66724             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66725             :     "\n"
   66726             :     "See Also\n"
   66727             :     "--------\n"
   66728             :     ":py:meth:`SetScale`\n"
   66729             :     "\n"
   66730             :     ""},
   66731             :    { "Band_SetScale", _wrap_Band_SetScale, METH_VARARGS, "\n"
   66732             :     "Band_SetScale(Band self, double val) -> CPLErr\n"
   66733             :     "\n"
   66734             :     "Set scaling ratio.\n"
   66735             :     "See :cpp:func:`GDALRasterBand::SetScale`.\n"
   66736             :     "\n"
   66737             :     "Parameters\n"
   66738             :     "----------\n"
   66739             :     "val : float\n"
   66740             :     "\n"
   66741             :     "Returns\n"
   66742             :     "-------\n"
   66743             :     "int:\n"
   66744             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66745             :     "\n"
   66746             :     "See Also\n"
   66747             :     "--------\n"
   66748             :     ":py:meth:`SetOffset`\n"
   66749             :     "\n"
   66750             :     ""},
   66751             :    { "Band_GetStatistics", _wrap_Band_GetStatistics, METH_VARARGS, "\n"
   66752             :     "Band_GetStatistics(Band self, int approx_ok, int force) -> CPLErr\n"
   66753             :     "\n"
   66754             :     "\n"
   66755             :     "Return the minimum, maximum, mean, and standard deviation of all pixel values\n"
   66756             :     "in this band.\n"
   66757             :     "See :cpp:func:`GDALRasterBand::GetStatistics`\n"
   66758             :     "\n"
   66759             :     "Parameters\n"
   66760             :     "----------\n"
   66761             :     "approx_ok : bool\n"
   66762             :     "    If ``True``, allow overviews or a subset of image tiles to be used in\n"
   66763             :     "    computing the statistics.\n"
   66764             :     "force : bool\n"
   66765             :     "    If ``False``, only return a result if it can be obtained without scanning\n"
   66766             :     "    the image, i.e. from pre-existing metadata.\n"
   66767             :     "\n"
   66768             :     "Returns\n"
   66769             :     "-------\n"
   66770             :     "list\n"
   66771             :     "   a list with the min, max, mean, and standard deviation of values\n"
   66772             :     "   in the Band.\n"
   66773             :     "\n"
   66774             :     "See Also\n"
   66775             :     "--------\n"
   66776             :     ":py:meth:`ComputeBandStats`\n"
   66777             :     ":py:meth:`ComputeRasterMinMax`\n"
   66778             :     ":py:meth:`GetMaximum`\n"
   66779             :     ":py:meth:`GetMinimum`\n"
   66780             :     ":py:meth:`GetStatistics`\n"
   66781             :     "\n"
   66782             :     ""},
   66783             :    { "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"},
   66784             :    { "Band_SetStatistics", _wrap_Band_SetStatistics, METH_VARARGS, "\n"
   66785             :     "Band_SetStatistics(Band self, double min, double max, double mean, double stddev) -> CPLErr\n"
   66786             :     "\n"
   66787             :     "\n"
   66788             :     "Set statistics on band.\n"
   66789             :     "See :cpp:func:`GDALRasterBand::SetStatistics`.\n"
   66790             :     "\n"
   66791             :     "Parameters\n"
   66792             :     "----------\n"
   66793             :     "min : float\n"
   66794             :     "max : float\n"
   66795             :     "mean : float\n"
   66796             :     "stdev : float\n"
   66797             :     "\n"
   66798             :     "Returns\n"
   66799             :     "-------\n"
   66800             :     "int:\n"
   66801             :     "   :py:const:`CE_None` on apparent success or :py:const:`CE_Failure` on\n"
   66802             :     "   failure.  This method cannot detect whether metadata will be properly saved and\n"
   66803             :     "   so may return :py:const:`gdal.`CE_None` even if the statistics will never be\n"
   66804             :     "   saved.\n"
   66805             :     "\n"
   66806             :     "See Also\n"
   66807             :     "--------\n"
   66808             :     ":py:meth:`ComputeBandStats`\n"
   66809             :     ":py:meth:`ComputeRasterMinMax`\n"
   66810             :     ":py:meth:`ComputeStatistics`\n"
   66811             :     ":py:meth:`GetMaximum`\n"
   66812             :     ":py:meth:`GetMinimum`\n"
   66813             :     ":py:meth:`GetStatistics`\n"
   66814             :     "\n"
   66815             :     ""},
   66816             :    { "Band_GetOverviewCount", _wrap_Band_GetOverviewCount, METH_O, "\n"
   66817             :     "Band_GetOverviewCount(Band self) -> int\n"
   66818             :     "\n"
   66819             :     "\n"
   66820             :     "Return the number of overview layers available.\n"
   66821             :     "See :cpp:func:`GDALRasterBand::GetOverviewCount`.\n"
   66822             :     "\n"
   66823             :     "Returns\n"
   66824             :     "-------\n"
   66825             :     "int\n"
   66826             :     "\n"
   66827             :     "\n"
   66828             :     ""},
   66829             :    { "Band_GetOverview", _wrap_Band_GetOverview, METH_VARARGS, "\n"
   66830             :     "Band_GetOverview(Band self, int i) -> Band\n"
   66831             :     "\n"
   66832             :     "\n"
   66833             :     "Fetch a raster overview.\n"
   66834             :     "See :cpp:func:`GDALRasterBand::GetOverview`.\n"
   66835             :     "\n"
   66836             :     "Parameters\n"
   66837             :     "----------\n"
   66838             :     "i : int\n"
   66839             :     "    Overview index between 0 and ``GetOverviewCount() - 1``.\n"
   66840             :     "\n"
   66841             :     "Returns\n"
   66842             :     "-------\n"
   66843             :     "Band\n"
   66844             :     "\n"
   66845             :     "\n"
   66846             :     ""},
   66847             :    { "Band_GetSampleOverview", _wrap_Band_GetSampleOverview, METH_VARARGS, "Band_GetSampleOverview(Band self, GUIntBig nDesiredSamples) -> Band"},
   66848             :    { "Band_Checksum", (PyCFunction)(void(*)(void))_wrap_Band_Checksum, METH_VARARGS|METH_KEYWORDS, "\n"
   66849             :     "Band_Checksum(Band self, int xoff=0, int yoff=0, int * xsize=None, int * ysize=None) -> int\n"
   66850             :     "\n"
   66851             :     "\n"
   66852             :     "Computes a checksum from a region of a RasterBand.\n"
   66853             :     "See :cpp:func:`GDALChecksumImage`.\n"
   66854             :     "\n"
   66855             :     "Parameters\n"
   66856             :     "----------\n"
   66857             :     "xoff : int, default=0\n"
   66858             :     "   The pixel offset to left side of the region of the band to\n"
   66859             :     "   be read. This would be zero to start from the left side.\n"
   66860             :     "yoff : int, default=0\n"
   66861             :     "   The line offset to top side of the region of the band to\n"
   66862             :     "   be read. This would be zero to start from the top side.\n"
   66863             :     "xsize : int, optional\n"
   66864             :     "     The number of pixels to read in the x direction. By default,\n"
   66865             :     "     equal to the number of columns in the raster.\n"
   66866             :     "ysize : int, optional\n"
   66867             :     "     The number of rows to read in the y direction. By default,\n"
   66868             :     "     equal to the number of bands in the raster.\n"
   66869             :     "\n"
   66870             :     "Returns\n"
   66871             :     "-------\n"
   66872             :     "int\n"
   66873             :     "    checksum value, or -1 in case of error\n"
   66874             :     "\n"
   66875             :     "\n"
   66876             :     ""},
   66877             :    { "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)"},
   66878             :    { "Band_ComputeBandStats", _wrap_Band_ComputeBandStats, METH_VARARGS, "\n"
   66879             :     "Band_ComputeBandStats(Band self, int samplestep=1)\n"
   66880             :     "\n"
   66881             :     "\n"
   66882             :     "Computes the mean and standard deviation of values in this Band.\n"
   66883             :     "See :cpp:func:`GDALComputeBandStats`.\n"
   66884             :     "\n"
   66885             :     "Parameters\n"
   66886             :     "----------\n"
   66887             :     "samplestep : int, default=1\n"
   66888             :     "    Step between scanlines used to compute statistics.\n"
   66889             :     "\n"
   66890             :     "Returns\n"
   66891             :     "-------\n"
   66892             :     "tuple\n"
   66893             :     "    tuple of length 2 with value of mean and standard deviation\n"
   66894             :     "\n"
   66895             :     "See Also\n"
   66896             :     "--------\n"
   66897             :     ":py:meth:`ComputeRasterMinMax`\n"
   66898             :     ":py:meth:`ComputeStatistics`\n"
   66899             :     ":py:meth:`GetMaximum`\n"
   66900             :     ":py:meth:`GetMinimum`\n"
   66901             :     ":py:meth:`GetStatistics`\n"
   66902             :     ":py:meth:`SetStatistics`\n"
   66903             :     "\n"
   66904             :     ""},
   66905             :    { "Band_Fill", _wrap_Band_Fill, METH_VARARGS, "\n"
   66906             :     "Band_Fill(Band self, double real_fill, double imag_fill=0.0) -> CPLErr\n"
   66907             :     "\n"
   66908             :     "\n"
   66909             :     "Fill this band with a constant value.\n"
   66910             :     "See :cpp:func:`GDALRasterBand::Fill`.\n"
   66911             :     "\n"
   66912             :     "Parameters\n"
   66913             :     "----------\n"
   66914             :     "real_fill : float\n"
   66915             :     "    real component of the fill value\n"
   66916             :     "imag_fill : float, default = 0.0\n"
   66917             :     "    imaginary component of the fill value\n"
   66918             :     "\n"
   66919             :     "Returns\n"
   66920             :     "-------\n"
   66921             :     "int:\n"
   66922             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66923             :     "\n"
   66924             :     "\n"
   66925             :     ""},
   66926             :    { "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"},
   66927             :    { "Band_FlushCache", _wrap_Band_FlushCache, METH_O, "\n"
   66928             :     "Band_FlushCache(Band self)\n"
   66929             :     "\n"
   66930             :     "\n"
   66931             :     "Flush raster data cache.\n"
   66932             :     "See :cpp:func:`GDALRasterBand::FlushCache`.\n"
   66933             :     "\n"
   66934             :     ""},
   66935             :    { "Band_GetRasterColorTable", _wrap_Band_GetRasterColorTable, METH_O, "\n"
   66936             :     "Band_GetRasterColorTable(Band self) -> ColorTable\n"
   66937             :     "\n"
   66938             :     "\n"
   66939             :     "Fetch the color table associated with this band.\n"
   66940             :     "See :cpp:func:`GDALRasterBand::GetColorTable`.\n"
   66941             :     "\n"
   66942             :     "Returns\n"
   66943             :     "-------\n"
   66944             :     "ColorTable\n"
   66945             :     "    The :py:class:`ColorTable`, or ``None`` if it has not been defined.\n"
   66946             :     "\n"
   66947             :     ""},
   66948             :    { "Band_GetColorTable", _wrap_Band_GetColorTable, METH_O, "\n"
   66949             :     "Band_GetColorTable(Band self) -> ColorTable\n"
   66950             :     "\n"
   66951             :     "\n"
   66952             :     "Get the color table associated with this band.\n"
   66953             :     "See :cpp:func:`GDALRasterBand::GetColorTable`.\n"
   66954             :     "\n"
   66955             :     "Returns\n"
   66956             :     "-------\n"
   66957             :     "ColorTable or ``None``\n"
   66958             :     "\n"
   66959             :     ""},
   66960             :    { "Band_SetRasterColorTable", _wrap_Band_SetRasterColorTable, METH_VARARGS, "\n"
   66961             :     "Band_SetRasterColorTable(Band self, ColorTable arg) -> int\n"
   66962             :     "\n"
   66963             :     "Deprecated. Alternate name for :py:meth:`SetColorTable`.\n"
   66964             :     "\n"
   66965             :     ""},
   66966             :    { "Band_SetColorTable", _wrap_Band_SetColorTable, METH_VARARGS, "\n"
   66967             :     "Band_SetColorTable(Band self, ColorTable arg) -> int\n"
   66968             :     "\n"
   66969             :     "\n"
   66970             :     "Set the raster color table.\n"
   66971             :     "See :cpp:func:`GDALRasterBand::SetColorTable`.\n"
   66972             :     "\n"
   66973             :     "Parameters\n"
   66974             :     "----------\n"
   66975             :     "arg : ColorTable\n"
   66976             :     "\n"
   66977             :     "Returns\n"
   66978             :     "-------\n"
   66979             :     "int:\n"
   66980             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66981             :     "\n"
   66982             :     ""},
   66983             :    { "Band_GetDefaultRAT", _wrap_Band_GetDefaultRAT, METH_O, "Band_GetDefaultRAT(Band self) -> RasterAttributeTable"},
   66984             :    { "Band_SetDefaultRAT", _wrap_Band_SetDefaultRAT, METH_VARARGS, "Band_SetDefaultRAT(Band self, RasterAttributeTable table) -> int"},
   66985             :    { "Band_GetMaskBand", _wrap_Band_GetMaskBand, METH_O, "\n"
   66986             :     "Band_GetMaskBand(Band self) -> Band\n"
   66987             :     "\n"
   66988             :     "\n"
   66989             :     "Return the mask band associated with this band.\n"
   66990             :     "See :cpp:func:`GDALRasterBand::GetMaskBand`.\n"
   66991             :     "\n"
   66992             :     "Returns\n"
   66993             :     "-------\n"
   66994             :     "Band\n"
   66995             :     "\n"
   66996             :     "\n"
   66997             :     ""},
   66998             :    { "Band_GetMaskFlags", _wrap_Band_GetMaskFlags, METH_O, "\n"
   66999             :     "Band_GetMaskFlags(Band self) -> int\n"
   67000             :     "\n"
   67001             :     "\n"
   67002             :     "Return the status flags of the mask band.\n"
   67003             :     "See :cpp:func:`GDALRasterBand::GetMaskFlags`.\n"
   67004             :     "\n"
   67005             :     "Returns\n"
   67006             :     "-------\n"
   67007             :     "int\n"
   67008             :     "\n"
   67009             :     "Examples\n"
   67010             :     "--------\n"
   67011             :     ">>> import numpy as np\n"
   67012             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   67013             :     ">>> band = ds.GetRasterBand(1)\n"
   67014             :     ">>> band.GetMaskFlags() == gdal.GMF_ALL_VALID\n"
   67015             :     "True\n"
   67016             :     ">>> band.SetNoDataValue(22)\n"
   67017             :     "0\n"
   67018             :     ">>> band.WriteArray(np.array([[22]]))\n"
   67019             :     "0\n"
   67020             :     ">>> band.GetMaskBand().ReadAsArray(win_xsize=2,win_ysize=2)\n"
   67021             :     "array([[  0, 255],\n"
   67022             :     "       [255, 255]], dtype=uint8)\n"
   67023             :     ">>> band.GetMaskFlags() == gdal.GMF_NODATA\n"
   67024             :     "True\n"
   67025             :     "\n"
   67026             :     "\n"
   67027             :     ""},
   67028             :    { "Band_CreateMaskBand", _wrap_Band_CreateMaskBand, METH_VARARGS, "\n"
   67029             :     "Band_CreateMaskBand(Band self, int nFlags) -> CPLErr\n"
   67030             :     "\n"
   67031             :     "\n"
   67032             :     "Add a mask band to the current band.\n"
   67033             :     "See :cpp:func:`GDALRasterBand::CreateMaskBand`.\n"
   67034             :     "\n"
   67035             :     "Parameters\n"
   67036             :     "----------\n"
   67037             :     "nFlags : int\n"
   67038             :     "\n"
   67039             :     "Returns\n"
   67040             :     "-------\n"
   67041             :     "int:\n"
   67042             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   67043             :     "\n"
   67044             :     "\n"
   67045             :     ""},
   67046             :    { "Band_IsMaskBand", _wrap_Band_IsMaskBand, METH_O, "\n"
   67047             :     "Band_IsMaskBand(Band self) -> bool\n"
   67048             :     "\n"
   67049             :     "\n"
   67050             :     "Returns whether the band is a mask band.\n"
   67051             :     "See :cpp:func:`GDALRasterBand::IsMaskBand`.\n"
   67052             :     "\n"
   67053             :     "Returns\n"
   67054             :     "-------\n"
   67055             :     "bool\n"
   67056             :     "\n"
   67057             :     ""},
   67058             :    { "Band_GetHistogram", (PyCFunction)(void(*)(void))_wrap_Band_GetHistogram, METH_VARARGS|METH_KEYWORDS, "\n"
   67059             :     "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"
   67060             :     "\n"
   67061             :     "\n"
   67062             :     "Compute raster histogram.\n"
   67063             :     "See :cpp:func:`GDALRasterBand::GetHistogram`.\n"
   67064             :     "\n"
   67065             :     "Parameters\n"
   67066             :     "----------\n"
   67067             :     "min : float, default=-0.05\n"
   67068             :     "    the lower bound of the histogram\n"
   67069             :     "max : float, default=255.5\n"
   67070             :     "    the upper bound of the histogram\n"
   67071             :     "buckets : int, default=256\n"
   67072             :     "    the number of buckets int he histogram\n"
   67073             :     "include_out_of_range : bool, default=False\n"
   67074             :     "    if ``True``, add out-of-range values into the first and last buckets\n"
   67075             :     "approx_ok : bool, default=True\n"
   67076             :     "    if ``True``, compute an approximate histogram by using subsampling or overviews\n"
   67077             :     "callback : function, optional\n"
   67078             :     "             A progress callback function\n"
   67079             :     "callback_data: optional\n"
   67080             :     "             Optional data to be passed to callback function\n"
   67081             :     "\n"
   67082             :     "Returns\n"
   67083             :     "-------\n"
   67084             :     "list\n"
   67085             :     "    list with length equal to ``buckets``. If ``approx_ok`` is ``False``, each\n"
   67086             :     "    the value of each list item will equal the number of pixels in that bucket.\n"
   67087             :     "\n"
   67088             :     "Examples\n"
   67089             :     "--------\n"
   67090             :     ">>> import numpy as np\n"
   67091             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10, eType=gdal.GDT_Float32)\n"
   67092             :     ">>> ds.WriteArray(np.random.normal(size=100).reshape(10, 10))\n"
   67093             :     "0\n"
   67094             :     ">>> ds.GetRasterBand(1).GetHistogram(min=-3.5, max=3.5, buckets=13, approx_ok=False)\n"
   67095             :     "[0, 0, 3, 9, 13, 12, 25, 22, 9, 6, 0, 1, 0]  # random\n"
   67096             :     "\n"
   67097             :     ""},
   67098             :    { "Band_GetDefaultHistogram", (PyCFunction)(void(*)(void))_wrap_Band_GetDefaultHistogram, METH_VARARGS|METH_KEYWORDS, "\n"
   67099             :     "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"
   67100             :     "\n"
   67101             :     "\n"
   67102             :     "Fetch the default histogram for this band.\n"
   67103             :     "See :cpp:func:`GDALRasterBand::GetDefaultHistogram`.\n"
   67104             :     "\n"
   67105             :     "Returns\n"
   67106             :     "-------\n"
   67107             :     "list\n"
   67108             :     "    List with the following four elements:\n"
   67109             :     "    - lower bound of histogram\n"
   67110             :     "    - upper bound of histogram\n"
   67111             :     "    - number of buckets in histogram\n"
   67112             :     "    - tuple with counts for each bucket\n"
   67113             :     "\n"
   67114             :     ""},
   67115             :    { "Band_SetDefaultHistogram", _wrap_Band_SetDefaultHistogram, METH_VARARGS, "\n"
   67116             :     "Band_SetDefaultHistogram(Band self, double min, double max, int buckets_in) -> CPLErr\n"
   67117             :     "\n"
   67118             :     "\n"
   67119             :     "Set default histogram.\n"
   67120             :     "See :cpp:func:`GDALRasterBand::SetDefaultHistogram`.\n"
   67121             :     "\n"
   67122             :     "Parameters\n"
   67123             :     "----------\n"
   67124             :     "min : float\n"
   67125             :     "    minimum value\n"
   67126             :     "max : float\n"
   67127             :     "    maximum value\n"
   67128             :     "buckets_in : list\n"
   67129             :     "    list of pixel counts for each bucket\n"
   67130             :     "\n"
   67131             :     "Returns\n"
   67132             :     "-------\n"
   67133             :     "int:\n"
   67134             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   67135             :     "\n"
   67136             :     "See Also\n"
   67137             :     "--------\n"
   67138             :     ":py:meth:`SetHistogram`\n"
   67139             :     "\n"
   67140             :     ""},
   67141             :    { "Band_HasArbitraryOverviews", _wrap_Band_HasArbitraryOverviews, METH_O, "\n"
   67142             :     "Band_HasArbitraryOverviews(Band self) -> bool\n"
   67143             :     "\n"
   67144             :     "\n"
   67145             :     "Check for arbitrary overviews.\n"
   67146             :     "See :cpp:func:`GDALRasterBand::HasArbitraryOverviews`.\n"
   67147             :     "\n"
   67148             :     "Returns\n"
   67149             :     "-------\n"
   67150             :     "bool\n"
   67151             :     "\n"
   67152             :     ""},
   67153             :    { "Band_GetCategoryNames", _wrap_Band_GetCategoryNames, METH_O, "\n"
   67154             :     "Band_GetCategoryNames(Band self) -> char **\n"
   67155             :     "\n"
   67156             :     "\n"
   67157             :     "Fetch the list of category names for this raster.\n"
   67158             :     "See :cpp:func:`GDALRasterBand::GetCategoryNames`.\n"
   67159             :     "\n"
   67160             :     "Returns\n"
   67161             :     "-------\n"
   67162             :     "list\n"
   67163             :     "    A list of category names, or ``None``\n"
   67164             :     "\n"
   67165             :     ""},
   67166             :    { "Band_SetCategoryNames", _wrap_Band_SetCategoryNames, METH_VARARGS, "\n"
   67167             :     "Band_SetCategoryNames(Band self, char ** papszCategoryNames) -> CPLErr\n"
   67168             :     "\n"
   67169             :     "\n"
   67170             :     "Set the category names for this band.\n"
   67171             :     "See :cpp:func:`GDALRasterBand::SetCategoryNames`.\n"
   67172             :     "\n"
   67173             :     "Parameters\n"
   67174             :     "----------\n"
   67175             :     "papszCategoryNames : list\n"
   67176             :     "\n"
   67177             :     "Returns\n"
   67178             :     "-------\n"
   67179             :     "int:\n"
   67180             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   67181             :     "\n"
   67182             :     ""},
   67183             :    { "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"},
   67184             :    { "Band_GetVirtualMemAuto", (PyCFunction)(void(*)(void))_wrap_Band_GetVirtualMemAuto, METH_VARARGS|METH_KEYWORDS, "Band_GetVirtualMemAuto(Band self, GDALRWFlag eRWFlag, char ** options=None) -> VirtualMem"},
   67185             :    { "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"},
   67186             :    { "Band_GetDataCoverageStatus", _wrap_Band_GetDataCoverageStatus, METH_VARARGS, "\n"
   67187             :     "Band_GetDataCoverageStatus(Band self, int nXOff, int nYOff, int nXSize, int nYSize, int nMaskFlagStop=0) -> int\n"
   67188             :     "\n"
   67189             :     "\n"
   67190             :     "Determine whether a sub-window of the Band contains only data, only empty blocks, or a mix of both.\n"
   67191             :     "See :cpp:func:`GDALRasterBand::GetDataCoverageStatus`.\n"
   67192             :     "\n"
   67193             :     "Parameters\n"
   67194             :     "----------\n"
   67195             :     "nXOff : int\n"
   67196             :     "nYOff : int\n"
   67197             :     "nXSize : int\n"
   67198             :     "nYSize : int\n"
   67199             :     "nMaskFlagStop : int, default=0\n"
   67200             :     "\n"
   67201             :     "Returns\n"
   67202             :     "-------\n"
   67203             :     "list\n"
   67204             :     "    First value represents a bitwise-or value of the following constants\n"
   67205             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_DATA`\n"
   67206             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_EMPTY`\n"
   67207             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED`\n"
   67208             :     "    Second value represents the approximate percentage in [0, 100] of pixels in the window that have valid values\n"
   67209             :     "\n"
   67210             :     "Examples\n"
   67211             :     "--------\n"
   67212             :     ">>> import numpy as np\n"
   67213             :     ">>> # Create a raster with four blocks\n"
   67214             :     ">>> ds = gdal.GetDriverByName('GTiff').Create('test.tif', 64, 64, options = {'SPARSE_OK':True, 'TILED':True, 'BLOCKXSIZE':32, 'BLOCKYSIZE':32})\n"
   67215             :     ">>> band = ds.GetRasterBand(1)\n"
   67216             :     ">>> # Write some data to upper-left block\n"
   67217             :     ">>> band.WriteArray(np.array([[1, 2], [3, 4]]))\n"
   67218             :     "0\n"
   67219             :     ">>> # Check status of upper-left block\n"
   67220             :     ">>> flags, pct = band.GetDataCoverageStatus(0, 0, 32, 32)\n"
   67221             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA\n"
   67222             :     "True\n"
   67223             :     ">>> pct\n"
   67224             :     "100.0\n"
   67225             :     ">>> # Check status of upper-right block\n"
   67226             :     ">>> flags, pct = band.GetDataCoverageStatus(32, 0, 32, 32)\n"
   67227             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY\n"
   67228             :     "True\n"
   67229             :     ">>> pct\n"
   67230             :     "0.0\n"
   67231             :     ">>> # Check status of window touching all four blocks\n"
   67232             :     ">>> flags, pct = band.GetDataCoverageStatus(16, 16, 32, 32)\n"
   67233             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA | gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY\n"
   67234             :     "True\n"
   67235             :     ">>> pct\n"
   67236             :     "25.0\n"
   67237             :     "\n"
   67238             :     ""},
   67239             :    { "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"},
   67240             :    { "Band_InterpolateAtPoint", _wrap_Band_InterpolateAtPoint, METH_VARARGS, "Band_InterpolateAtPoint(Band self, double pixel, double line, GDALRIOResampleAlg interpolation) -> CPLErr"},
   67241             :    { "Band_InterpolateAtGeolocation", _wrap_Band_InterpolateAtGeolocation, METH_VARARGS, "Band_InterpolateAtGeolocation(Band self, double geolocX, double geolocY, SpatialReference srs, GDALRIOResampleAlg interpolation, char ** transformerOptions=None) -> CPLErr"},
   67242             :    { "Band_ComputeMinMaxLocation", _wrap_Band_ComputeMinMaxLocation, METH_O, "Band_ComputeMinMaxLocation(Band self) -> CPLErr"},
   67243             :    { "Band_AsMDArray", _wrap_Band_AsMDArray, METH_O, "Band_AsMDArray(Band self) -> MDArray"},
   67244             :    { "Band__EnablePixelTypeSignedByteWarning", _wrap_Band__EnablePixelTypeSignedByteWarning, METH_VARARGS, "Band__EnablePixelTypeSignedByteWarning(Band self, bool b)"},
   67245             :    { "Band_UnaryOp", _wrap_Band_UnaryOp, METH_VARARGS, "Band_UnaryOp(Band self, GDALRasterAlgebraUnaryOperation op) -> ComputedBand"},
   67246             :    { "Band_BinaryOpBand", _wrap_Band_BinaryOpBand, METH_VARARGS, "Band_BinaryOpBand(Band self, GDALRasterAlgebraBinaryOperation op, Band other) -> ComputedBand"},
   67247             :    { "Band_BinaryOpDouble", _wrap_Band_BinaryOpDouble, METH_VARARGS, "Band_BinaryOpDouble(Band self, GDALRasterAlgebraBinaryOperation op, double constant) -> ComputedBand"},
   67248             :    { "Band_BinaryOpDoubleToBand", _wrap_Band_BinaryOpDoubleToBand, METH_VARARGS, "Band_BinaryOpDoubleToBand(double constant, GDALRasterAlgebraBinaryOperation op, Band band) -> ComputedBand"},
   67249             :    { "Band_IfThenElse", _wrap_Band_IfThenElse, METH_VARARGS, "Band_IfThenElse(Band condBand, Band thenBand, Band elseBand) -> ComputedBand"},
   67250             :    { "Band_AsType", _wrap_Band_AsType, METH_VARARGS, "Band_AsType(Band self, GDALDataType dt) -> ComputedBand"},
   67251             :    { "Band_MaximumOfNBands", _wrap_Band_MaximumOfNBands, METH_O, "Band_MaximumOfNBands(int band_count) -> ComputedBand"},
   67252             :    { "Band_MaxConstant", _wrap_Band_MaxConstant, METH_VARARGS, "Band_MaxConstant(Band self, double constant) -> ComputedBand"},
   67253             :    { "Band_MinimumOfNBands", _wrap_Band_MinimumOfNBands, METH_O, "Band_MinimumOfNBands(int band_count) -> ComputedBand"},
   67254             :    { "Band_MinConstant", _wrap_Band_MinConstant, METH_VARARGS, "Band_MinConstant(Band self, double constant) -> ComputedBand"},
   67255             :    { "Band_MeanOfNBands", _wrap_Band_MeanOfNBands, METH_O, "Band_MeanOfNBands(int band_count) -> ComputedBand"},
   67256             :    { "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"},
   67257             :    { "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"},
   67258             :    { "Band_swigregister", Band_swigregister, METH_O, NULL},
   67259             :    { "delete_ComputedBand", _wrap_delete_ComputedBand, METH_O, "delete_ComputedBand(ComputedBand self)"},
   67260             :    { "ComputedBand_swigregister", ComputedBand_swigregister, METH_O, NULL},
   67261             :    { "new_ColorTable", (PyCFunction)(void(*)(void))_wrap_new_ColorTable, METH_VARARGS|METH_KEYWORDS, "new_ColorTable(GDALPaletteInterp palette=GPI_RGB) -> ColorTable"},
   67262             :    { "delete_ColorTable", _wrap_delete_ColorTable, METH_O, "delete_ColorTable(ColorTable self)"},
   67263             :    { "ColorTable_Clone", _wrap_ColorTable_Clone, METH_O, "ColorTable_Clone(ColorTable self) -> ColorTable"},
   67264             :    { "ColorTable_GetPaletteInterpretation", _wrap_ColorTable_GetPaletteInterpretation, METH_O, "ColorTable_GetPaletteInterpretation(ColorTable self) -> GDALPaletteInterp"},
   67265             :    { "ColorTable_GetCount", _wrap_ColorTable_GetCount, METH_O, "ColorTable_GetCount(ColorTable self) -> int"},
   67266             :    { "ColorTable_GetColorEntry", _wrap_ColorTable_GetColorEntry, METH_VARARGS, "ColorTable_GetColorEntry(ColorTable self, int entry) -> ColorEntry"},
   67267             :    { "ColorTable_GetColorEntryAsRGB", _wrap_ColorTable_GetColorEntryAsRGB, METH_VARARGS, "ColorTable_GetColorEntryAsRGB(ColorTable self, int entry, ColorEntry centry) -> int"},
   67268             :    { "ColorTable_SetColorEntry", _wrap_ColorTable_SetColorEntry, METH_VARARGS, "ColorTable_SetColorEntry(ColorTable self, int entry, ColorEntry centry)"},
   67269             :    { "ColorTable_CreateColorRamp", _wrap_ColorTable_CreateColorRamp, METH_VARARGS, "ColorTable_CreateColorRamp(ColorTable self, int nStartIndex, ColorEntry startcolor, int nEndIndex, ColorEntry endcolor)"},
   67270             :    { "ColorTable_swigregister", ColorTable_swigregister, METH_O, NULL},
   67271             :    { "ColorTable_swiginit", ColorTable_swiginit, METH_VARARGS, NULL},
   67272             :    { "delete_SubdatasetInfo", _wrap_delete_SubdatasetInfo, METH_O, "delete_SubdatasetInfo(SubdatasetInfo self)"},
   67273             :    { "SubdatasetInfo_GetPathComponent", _wrap_SubdatasetInfo_GetPathComponent, METH_O, "SubdatasetInfo_GetPathComponent(SubdatasetInfo self) -> retStringAndCPLFree *"},
   67274             :    { "SubdatasetInfo_GetSubdatasetComponent", _wrap_SubdatasetInfo_GetSubdatasetComponent, METH_O, "SubdatasetInfo_GetSubdatasetComponent(SubdatasetInfo self) -> retStringAndCPLFree *"},
   67275             :    { "SubdatasetInfo_ModifyPathComponent", _wrap_SubdatasetInfo_ModifyPathComponent, METH_VARARGS, "SubdatasetInfo_ModifyPathComponent(SubdatasetInfo self, char const * pszNewFileName) -> retStringAndCPLFree *"},
   67276             :    { "SubdatasetInfo_swigregister", SubdatasetInfo_swigregister, METH_O, NULL},
   67277             :    { "GetSubdatasetInfo", _wrap_GetSubdatasetInfo, METH_O, "GetSubdatasetInfo(char const * pszFileName) -> GDALSubdatasetInfoShadow *"},
   67278             :    { "new_Relationship", _wrap_new_Relationship, METH_VARARGS, "new_Relationship(char const * name, char const * leftTableName, char const * rightTableName, GDALRelationshipCardinality cardinality) -> Relationship"},
   67279             :    { "delete_Relationship", _wrap_delete_Relationship, METH_O, "delete_Relationship(Relationship self)"},
   67280             :    { "Relationship_GetName", _wrap_Relationship_GetName, METH_O, "Relationship_GetName(Relationship self) -> char const *"},
   67281             :    { "Relationship_GetCardinality", _wrap_Relationship_GetCardinality, METH_O, "Relationship_GetCardinality(Relationship self) -> GDALRelationshipCardinality"},
   67282             :    { "Relationship_GetLeftTableName", _wrap_Relationship_GetLeftTableName, METH_O, "Relationship_GetLeftTableName(Relationship self) -> char const *"},
   67283             :    { "Relationship_GetRightTableName", _wrap_Relationship_GetRightTableName, METH_O, "Relationship_GetRightTableName(Relationship self) -> char const *"},
   67284             :    { "Relationship_GetMappingTableName", _wrap_Relationship_GetMappingTableName, METH_O, "Relationship_GetMappingTableName(Relationship self) -> char const *"},
   67285             :    { "Relationship_SetMappingTableName", _wrap_Relationship_SetMappingTableName, METH_VARARGS, "Relationship_SetMappingTableName(Relationship self, char const * pszName)"},
   67286             :    { "Relationship_GetLeftTableFields", _wrap_Relationship_GetLeftTableFields, METH_O, "Relationship_GetLeftTableFields(Relationship self) -> char **"},
   67287             :    { "Relationship_GetRightTableFields", _wrap_Relationship_GetRightTableFields, METH_O, "Relationship_GetRightTableFields(Relationship self) -> char **"},
   67288             :    { "Relationship_SetLeftTableFields", _wrap_Relationship_SetLeftTableFields, METH_VARARGS, "Relationship_SetLeftTableFields(Relationship self, char ** pFields)"},
   67289             :    { "Relationship_SetRightTableFields", _wrap_Relationship_SetRightTableFields, METH_VARARGS, "Relationship_SetRightTableFields(Relationship self, char ** pFields)"},
   67290             :    { "Relationship_GetLeftMappingTableFields", _wrap_Relationship_GetLeftMappingTableFields, METH_O, "Relationship_GetLeftMappingTableFields(Relationship self) -> char **"},
   67291             :    { "Relationship_GetRightMappingTableFields", _wrap_Relationship_GetRightMappingTableFields, METH_O, "Relationship_GetRightMappingTableFields(Relationship self) -> char **"},
   67292             :    { "Relationship_SetLeftMappingTableFields", _wrap_Relationship_SetLeftMappingTableFields, METH_VARARGS, "Relationship_SetLeftMappingTableFields(Relationship self, char ** pFields)"},
   67293             :    { "Relationship_SetRightMappingTableFields", _wrap_Relationship_SetRightMappingTableFields, METH_VARARGS, "Relationship_SetRightMappingTableFields(Relationship self, char ** pFields)"},
   67294             :    { "Relationship_GetType", _wrap_Relationship_GetType, METH_O, "Relationship_GetType(Relationship self) -> GDALRelationshipType"},
   67295             :    { "Relationship_SetType", _wrap_Relationship_SetType, METH_VARARGS, "Relationship_SetType(Relationship self, GDALRelationshipType type)"},
   67296             :    { "Relationship_GetForwardPathLabel", _wrap_Relationship_GetForwardPathLabel, METH_O, "Relationship_GetForwardPathLabel(Relationship self) -> char const *"},
   67297             :    { "Relationship_SetForwardPathLabel", _wrap_Relationship_SetForwardPathLabel, METH_VARARGS, "Relationship_SetForwardPathLabel(Relationship self, char const * pszLabel)"},
   67298             :    { "Relationship_GetBackwardPathLabel", _wrap_Relationship_GetBackwardPathLabel, METH_O, "Relationship_GetBackwardPathLabel(Relationship self) -> char const *"},
   67299             :    { "Relationship_SetBackwardPathLabel", _wrap_Relationship_SetBackwardPathLabel, METH_VARARGS, "Relationship_SetBackwardPathLabel(Relationship self, char const * pszLabel)"},
   67300             :    { "Relationship_GetRelatedTableType", _wrap_Relationship_GetRelatedTableType, METH_O, "Relationship_GetRelatedTableType(Relationship self) -> char const *"},
   67301             :    { "Relationship_SetRelatedTableType", _wrap_Relationship_SetRelatedTableType, METH_VARARGS, "Relationship_SetRelatedTableType(Relationship self, char const * pszType)"},
   67302             :    { "Relationship_swigregister", Relationship_swigregister, METH_O, NULL},
   67303             :    { "Relationship_swiginit", Relationship_swiginit, METH_VARARGS, NULL},
   67304             :    { "TermProgress_nocb", (PyCFunction)(void(*)(void))_wrap_TermProgress_nocb, METH_VARARGS|METH_KEYWORDS, "TermProgress_nocb(double dfProgress, char const * pszMessage=None, void * pData=None) -> int"},
   67305             :    { "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"},
   67306             :    { "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"},
   67307             :    { "ReprojectImage", (PyCFunction)(void(*)(void))_wrap_ReprojectImage, METH_VARARGS|METH_KEYWORDS, "\n"
   67308             :     "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"
   67309             :     "\n"
   67310             :     "\n"
   67311             :     "Reproject image.\n"
   67312             :     "\n"
   67313             :     "See :cpp:func:`GDALReprojectImage`.\n"
   67314             :     "\n"
   67315             :     "Consider using :py:func:`osgeo.gdal.Warp` and :py:func:`osgeo.gdal.WarpOptions` instead\n"
   67316             :     "\n"
   67317             :     ""},
   67318             :    { "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"},
   67319             :    { "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"},
   67320             :    { "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"},
   67321             :    { "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"},
   67322             :    { "FillNodata", (PyCFunction)(void(*)(void))_wrap_FillNodata, METH_VARARGS|METH_KEYWORDS, "\n"
   67323             :     "FillNodata(Band targetBand, Band maskBand, double maxSearchDist, int smoothingIterations, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int\n"
   67324             :     "\n"
   67325             :     "\n"
   67326             :     "Fill selected raster regions by interpolation from the edges.\n"
   67327             :     "\n"
   67328             :     "This algorithm will interpolate values for all designated\n"
   67329             :     "nodata pixels (marked by zeros in ``maskBand``). For each pixel\n"
   67330             :     "a four direction conic search is done to find values to interpolate\n"
   67331             :     "from (using inverse distance weighting by default). Once all values are\n"
   67332             :     "interpolated, zero or more smoothing iterations (3x3 average\n"
   67333             :     "filters on interpolated pixels) are applied to smooth out\n"
   67334             :     "artifacts.\n"
   67335             :     "\n"
   67336             :     "This algorithm is generally suitable for interpolating missing\n"
   67337             :     "regions of fairly continuously varying rasters (such as elevation\n"
   67338             :     "models for instance). It is also suitable for filling small holes\n"
   67339             :     "and cracks in more irregularly varying images (like airphotos). It\n"
   67340             :     "is generally not so great for interpolating a raster from sparse\n"
   67341             :     "point data. See :py:func:`Grid` for that case.\n"
   67342             :     "\n"
   67343             :     "See :cpp:func:`GDALFillNodata`.\n"
   67344             :     "\n"
   67345             :     "Parameters\n"
   67346             :     "----------\n"
   67347             :     "targetBand : Band\n"
   67348             :     "    Band containing values to fill. Will be modified in-place.\n"
   67349             :     "maskBand : Band\n"
   67350             :     "    Mask band with a value of 0 indicating values that should be filled.\n"
   67351             :     "    If not specified, the mask band associated with ``targetBand`` will be used.\n"
   67352             :     "maxSearchDist : float\n"
   67353             :     "    the maximum number of pixels to search in all directions to find values to interpolate from.\n"
   67354             :     "smoothingIterations : int\n"
   67355             :     "    the number of 3x3 smoothing filter passes to run (0 or more)\n"
   67356             :     "options : dict/list, optional\n"
   67357             :     "    A dict or list of name=value options. Available options are\n"
   67358             :     "    described in :cpp:func:`GDALFillNodata`.\n"
   67359             :     "callback : function, optional\n"
   67360             :     "   A progress callback function\n"
   67361             :     "callback_data: optional\n"
   67362             :     "   Optional data to be passed to callback function\n"
   67363             :     "\n"
   67364             :     "Returns\n"
   67365             :     "-------\n"
   67366             :     "int\n"
   67367             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   67368             :     "\n"
   67369             :     "Examples\n"
   67370             :     "--------\n"
   67371             :     ">>> import numpy as np\n"
   67372             :     ">>> data = np.array([[1, 2], [9, 9], [9, 9], [3, 4]], dtype=np.float32)\n"
   67373             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 2, 4, eType=gdal.GDT_Float32)\n"
   67374             :     ">>> ds.WriteArray(data)\n"
   67375             :     "0\n"
   67376             :     ">>> mask = data != 9  # replace pixels with value = 9\n"
   67377             :     ">>> mask_ds = gdal.GetDriverByName('MEM').Create('', 2, 4, eType=gdal.GDT_Byte)\n"
   67378             :     ">>> mask_ds.WriteArray(mask)\n"
   67379             :     "0\n"
   67380             :     ">>> gdal.FillNodata(ds.GetRasterBand(1), mask_ds.GetRasterBand(1), 5, 0)\n"
   67381             :     "0\n"
   67382             :     ">>> ds.ReadAsArray()\n"
   67383             :     "array([[1.       , 2.       ],\n"
   67384             :     "       [2.1485982, 2.6666667],\n"
   67385             :     "       [2.721169 , 3.3333333],\n"
   67386             :     "       [3.       , 4.       ]], dtype=float32)\n"
   67387             :     ">>> gdal.FillNodata(ds.GetRasterBand(1), mask_ds.GetRasterBand(1), 5, 0, {'INTERPOLATION':'NEAREST'})\n"
   67388             :     "0\n"
   67389             :     ">>> ds.ReadAsArray()\n"
   67390             :     "array([[1., 2.],\n"
   67391             :     "       [1., 2.],\n"
   67392             :     "       [3., 4.],\n"
   67393             :     "       [3., 4.]], dtype=float32)\n"
   67394             :     "\n"
   67395             :     "\n"
   67396             :     ""},
   67397             :    { "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"},
   67398             :    { "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"},
   67399             :    { "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"},
   67400             :    { "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"},
   67401             :    { "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"},
   67402             :    { "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"},
   67403             :    { "IsLineOfSightVisible", (PyCFunction)(void(*)(void))_wrap_IsLineOfSightVisible, METH_VARARGS|METH_KEYWORDS, "\n"
   67404             :     "IsLineOfSightVisible(Band band, int xA, int yA, double zA, int xB, int yB, double zB, char ** options=None)\n"
   67405             :     "\n"
   67406             :     "\n"
   67407             :     "Check Line of Sight between two points.\n"
   67408             :     "Both input coordinates must be within the raster coordinate bounds.\n"
   67409             :     "\n"
   67410             :     " See :cpp:func:`GDALIsLineOfSightVisible`.\n"
   67411             :     "\n"
   67412             :     ".. versionadded:: 3.9\n"
   67413             :     "\n"
   67414             :     "Parameters\n"
   67415             :     "----------\n"
   67416             :     "band : gdal.RasterBand\n"
   67417             :     "    The band to read the DEM data from. This must NOT be null.\n"
   67418             :     "xA : int\n"
   67419             :     "    The X location (raster column) of the first point to check on the raster.\n"
   67420             :     "yA : int\n"
   67421             :     "    The Y location (raster row) of the first point to check on the raster.\n"
   67422             :     "zA : float\n"
   67423             :     "    The Z location (height) of the first point to check.\n"
   67424             :     "xB : int\n"
   67425             :     "    The X location (raster column) of the second point to check on the raster.\n"
   67426             :     "yB : int\n"
   67427             :     "    The Y location (raster row) of the second point to check on the raster.\n"
   67428             :     "zB : float\n"
   67429             :     "    The Z location (height) of the second point to check.\n"
   67430             :     "options : dict/list, optional\n"
   67431             :     "    A dict or list of name=value of options for the line of sight algorithm (currently ignored).\n"
   67432             :     "\n"
   67433             :     "Returns\n"
   67434             :     "-------\n"
   67435             :     "collections.namedtuple(is_visible: bool, col_intersection: int, row_intersection: int)\n"
   67436             :     "    is_visible is True if the two points are within Line of Sight.\n"
   67437             :     "    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"
   67438             :     "    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"
   67439             :     "\n"
   67440             :     ""},
   67441             :    { "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"},
   67442             :    { "CreatePansharpenedVRT", _wrap_CreatePansharpenedVRT, METH_VARARGS, "CreatePansharpenedVRT(char const * pszXML, Band panchroBand, int nInputSpectralBands) -> Dataset"},
   67443             :    { "GetTranformerOptionList", _wrap_GetTranformerOptionList, METH_NOARGS, "GetTranformerOptionList() -> char const *"},
   67444             :    { "delete_GDALTransformerInfoShadow", _wrap_delete_GDALTransformerInfoShadow, METH_O, "delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow self)"},
   67445             :    { "GDALTransformerInfoShadow_TransformPoint", _wrap_GDALTransformerInfoShadow_TransformPoint, METH_VARARGS, "\n"
   67446             :     "GDALTransformerInfoShadow_TransformPoint(GDALTransformerInfoShadow self, int bDstToSrc, double [3] inout) -> int\n"
   67447             :     "GDALTransformerInfoShadow_TransformPoint(GDALTransformerInfoShadow self, int bDstToSrc, double x, double y, double z=0.0) -> int\n"
   67448             :     ""},
   67449             :    { "GDALTransformerInfoShadow_TransformPoints", _wrap_GDALTransformerInfoShadow_TransformPoints, METH_VARARGS, "GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow self, int bDstToSrc, int nCount) -> int"},
   67450             :    { "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"},
   67451             :    { "GDALTransformerInfoShadow_swigregister", GDALTransformerInfoShadow_swigregister, METH_O, NULL},
   67452             :    { "Transformer", _wrap_Transformer, METH_VARARGS, "Transformer(Dataset src, Dataset dst, char ** options) -> GDALTransformerInfoShadow"},
   67453             :    { "WarpGetOptionList", _wrap_WarpGetOptionList, METH_NOARGS, "WarpGetOptionList() -> char const *"},
   67454             :    { "SuggestedWarpOutputRes_width_get", _wrap_SuggestedWarpOutputRes_width_get, METH_O, "SuggestedWarpOutputRes_width_get(SuggestedWarpOutputRes self) -> int"},
   67455             :    { "SuggestedWarpOutputRes_height_get", _wrap_SuggestedWarpOutputRes_height_get, METH_O, "SuggestedWarpOutputRes_height_get(SuggestedWarpOutputRes self) -> int"},
   67456             :    { "SuggestedWarpOutputRes_xmin_get", _wrap_SuggestedWarpOutputRes_xmin_get, METH_O, "SuggestedWarpOutputRes_xmin_get(SuggestedWarpOutputRes self) -> double"},
   67457             :    { "SuggestedWarpOutputRes_ymin_get", _wrap_SuggestedWarpOutputRes_ymin_get, METH_O, "SuggestedWarpOutputRes_ymin_get(SuggestedWarpOutputRes self) -> double"},
   67458             :    { "SuggestedWarpOutputRes_xmax_get", _wrap_SuggestedWarpOutputRes_xmax_get, METH_O, "SuggestedWarpOutputRes_xmax_get(SuggestedWarpOutputRes self) -> double"},
   67459             :    { "SuggestedWarpOutputRes_ymax_get", _wrap_SuggestedWarpOutputRes_ymax_get, METH_O, "SuggestedWarpOutputRes_ymax_get(SuggestedWarpOutputRes self) -> double"},
   67460             :    { "delete_SuggestedWarpOutputRes", _wrap_delete_SuggestedWarpOutputRes, METH_O, "delete_SuggestedWarpOutputRes(SuggestedWarpOutputRes self)"},
   67461             :    { "SuggestedWarpOutputRes_GetGeotransform", _wrap_SuggestedWarpOutputRes_GetGeotransform, METH_O, "SuggestedWarpOutputRes_GetGeotransform(SuggestedWarpOutputRes self)"},
   67462             :    { "SuggestedWarpOutputRes_swigregister", SuggestedWarpOutputRes_swigregister, METH_O, NULL},
   67463             :    { "SuggestedWarpOutputFromTransformer", _wrap_SuggestedWarpOutputFromTransformer, METH_VARARGS, "SuggestedWarpOutputFromTransformer(Dataset src, GDALTransformerInfoShadow transformer) -> SuggestedWarpOutputRes"},
   67464             :    { "SuggestedWarpOutputFromOptions", _wrap_SuggestedWarpOutputFromOptions, METH_VARARGS, "SuggestedWarpOutputFromOptions(Dataset src, char ** options) -> SuggestedWarpOutputRes"},
   67465             :    { "_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"},
   67466             :    { "GetGlobalAlgorithmRegistry", _wrap_GetGlobalAlgorithmRegistry, METH_NOARGS, "\n"
   67467             :     "GetGlobalAlgorithmRegistry() -> AlgorithmRegistry\n"
   67468             :     "\n"
   67469             :     "\n"
   67470             :     "Return the default algorithm registry.\n"
   67471             :     "\n"
   67472             :     "Returns\n"
   67473             :     "-------\n"
   67474             :     "AlgorithmRegistry\n"
   67475             :     "\n"
   67476             :     "\n"
   67477             :     ""},
   67478             :    { "AlgorithmArgTypeIsList", _wrap_AlgorithmArgTypeIsList, METH_O, "\n"
   67479             :     "AlgorithmArgTypeIsList(GDALAlgorithmArgType type) -> bool\n"
   67480             :     "\n"
   67481             :     "\n"
   67482             :     "Test whether an argument type represents a list.\n"
   67483             :     "\n"
   67484             :     "Parameters\n"
   67485             :     "----------\n"
   67486             :     "type : int\n"
   67487             :     "\n"
   67488             :     "Returns\n"
   67489             :     "-------\n"
   67490             :     "boolean\n"
   67491             :     "\n"
   67492             :     "Examples\n"
   67493             :     "--------\n"
   67494             :     ">>> gdal.AlgorithmArgTypeIsList(gdal.GAAT_REAL)\n"
   67495             :     "False\n"
   67496             :     ">>> gdal.AlgorithmArgTypeIsList(gdal.GAAT_REAL_LIST)\n"
   67497             :     "True\n"
   67498             :     "\n"
   67499             :     "\n"
   67500             :     ""},
   67501             :    { "AlgorithmArgTypeName", _wrap_AlgorithmArgTypeName, METH_O, "\n"
   67502             :     "AlgorithmArgTypeName(GDALAlgorithmArgType type) -> char const *\n"
   67503             :     "\n"
   67504             :     "\n"
   67505             :     "Return a text representation of an argument type code.\n"
   67506             :     "\n"
   67507             :     "Parameters\n"
   67508             :     "----------\n"
   67509             :     "type : int\n"
   67510             :     "\n"
   67511             :     "Returns\n"
   67512             :     "-------\n"
   67513             :     "str\n"
   67514             :     "\n"
   67515             :     "Example\n"
   67516             :     "-------\n"
   67517             :     ">>> gdal.AlgorithmArgTypeName(gdal.GAAT_REAL)\n"
   67518             :     "'real'\n"
   67519             :     "\n"
   67520             :     "\n"
   67521             :     ""},
   67522             :    { "delete_AlgorithmArg", _wrap_delete_AlgorithmArg, METH_O, "delete_AlgorithmArg(AlgorithmArg self)"},
   67523             :    { "AlgorithmArg_GetName", _wrap_AlgorithmArg_GetName, METH_O, "AlgorithmArg_GetName(AlgorithmArg self) -> char const *"},
   67524             :    { "AlgorithmArg_GetType", _wrap_AlgorithmArg_GetType, METH_O, "AlgorithmArg_GetType(AlgorithmArg self) -> GDALAlgorithmArgType"},
   67525             :    { "AlgorithmArg_GetDescription", _wrap_AlgorithmArg_GetDescription, METH_O, "AlgorithmArg_GetDescription(AlgorithmArg self) -> char const *"},
   67526             :    { "AlgorithmArg_GetShortName", _wrap_AlgorithmArg_GetShortName, METH_O, "AlgorithmArg_GetShortName(AlgorithmArg self) -> char const *"},
   67527             :    { "AlgorithmArg_GetAliases", _wrap_AlgorithmArg_GetAliases, METH_O, "AlgorithmArg_GetAliases(AlgorithmArg self) -> char **"},
   67528             :    { "AlgorithmArg_GetMetaVar", _wrap_AlgorithmArg_GetMetaVar, METH_O, "AlgorithmArg_GetMetaVar(AlgorithmArg self) -> char const *"},
   67529             :    { "AlgorithmArg_GetCategory", _wrap_AlgorithmArg_GetCategory, METH_O, "AlgorithmArg_GetCategory(AlgorithmArg self) -> char const *"},
   67530             :    { "AlgorithmArg_IsPositional", _wrap_AlgorithmArg_IsPositional, METH_O, "AlgorithmArg_IsPositional(AlgorithmArg self) -> bool"},
   67531             :    { "AlgorithmArg_IsRequired", _wrap_AlgorithmArg_IsRequired, METH_O, "AlgorithmArg_IsRequired(AlgorithmArg self) -> bool"},
   67532             :    { "AlgorithmArg_GetMinCount", _wrap_AlgorithmArg_GetMinCount, METH_O, "AlgorithmArg_GetMinCount(AlgorithmArg self) -> int"},
   67533             :    { "AlgorithmArg_GetMaxCount", _wrap_AlgorithmArg_GetMaxCount, METH_O, "AlgorithmArg_GetMaxCount(AlgorithmArg self) -> int"},
   67534             :    { "AlgorithmArg_GetPackedValuesAllowed", _wrap_AlgorithmArg_GetPackedValuesAllowed, METH_O, "AlgorithmArg_GetPackedValuesAllowed(AlgorithmArg self) -> bool"},
   67535             :    { "AlgorithmArg_GetRepeatedArgAllowed", _wrap_AlgorithmArg_GetRepeatedArgAllowed, METH_O, "AlgorithmArg_GetRepeatedArgAllowed(AlgorithmArg self) -> bool"},
   67536             :    { "AlgorithmArg_GetChoices", _wrap_AlgorithmArg_GetChoices, METH_O, "AlgorithmArg_GetChoices(AlgorithmArg self) -> char **"},
   67537             :    { "AlgorithmArg_GetMetadataItem", _wrap_AlgorithmArg_GetMetadataItem, METH_VARARGS, "AlgorithmArg_GetMetadataItem(AlgorithmArg self, char const * item) -> char **"},
   67538             :    { "AlgorithmArg_IsExplicitlySet", _wrap_AlgorithmArg_IsExplicitlySet, METH_O, "AlgorithmArg_IsExplicitlySet(AlgorithmArg self) -> bool"},
   67539             :    { "AlgorithmArg_HasDefaultValue", _wrap_AlgorithmArg_HasDefaultValue, METH_O, "AlgorithmArg_HasDefaultValue(AlgorithmArg self) -> bool"},
   67540             :    { "AlgorithmArg_GetDefaultAsBoolean", _wrap_AlgorithmArg_GetDefaultAsBoolean, METH_O, "AlgorithmArg_GetDefaultAsBoolean(AlgorithmArg self) -> bool"},
   67541             :    { "AlgorithmArg_GetDefaultAsString", _wrap_AlgorithmArg_GetDefaultAsString, METH_O, "AlgorithmArg_GetDefaultAsString(AlgorithmArg self) -> char const *"},
   67542             :    { "AlgorithmArg_GetDefaultAsInteger", _wrap_AlgorithmArg_GetDefaultAsInteger, METH_O, "AlgorithmArg_GetDefaultAsInteger(AlgorithmArg self) -> int"},
   67543             :    { "AlgorithmArg_GetDefaultAsDouble", _wrap_AlgorithmArg_GetDefaultAsDouble, METH_O, "AlgorithmArg_GetDefaultAsDouble(AlgorithmArg self) -> double"},
   67544             :    { "AlgorithmArg_GetDefaultAsStringList", _wrap_AlgorithmArg_GetDefaultAsStringList, METH_O, "AlgorithmArg_GetDefaultAsStringList(AlgorithmArg self) -> char **"},
   67545             :    { "AlgorithmArg_GetDefaultAsIntegerList", _wrap_AlgorithmArg_GetDefaultAsIntegerList, METH_O, "AlgorithmArg_GetDefaultAsIntegerList(AlgorithmArg self)"},
   67546             :    { "AlgorithmArg_GetDefaultAsDoubleList", _wrap_AlgorithmArg_GetDefaultAsDoubleList, METH_O, "AlgorithmArg_GetDefaultAsDoubleList(AlgorithmArg self)"},
   67547             :    { "AlgorithmArg_IsHidden", _wrap_AlgorithmArg_IsHidden, METH_O, "AlgorithmArg_IsHidden(AlgorithmArg self) -> bool"},
   67548             :    { "AlgorithmArg_IsHiddenForCLI", _wrap_AlgorithmArg_IsHiddenForCLI, METH_O, "AlgorithmArg_IsHiddenForCLI(AlgorithmArg self) -> bool"},
   67549             :    { "AlgorithmArg_IsHiddenForAPI", _wrap_AlgorithmArg_IsHiddenForAPI, METH_O, "AlgorithmArg_IsHiddenForAPI(AlgorithmArg self) -> bool"},
   67550             :    { "AlgorithmArg_IsInput", _wrap_AlgorithmArg_IsInput, METH_O, "AlgorithmArg_IsInput(AlgorithmArg self) -> bool"},
   67551             :    { "AlgorithmArg_IsOutput", _wrap_AlgorithmArg_IsOutput, METH_O, "AlgorithmArg_IsOutput(AlgorithmArg self) -> bool"},
   67552             :    { "AlgorithmArg_GetDatasetType", _wrap_AlgorithmArg_GetDatasetType, METH_O, "AlgorithmArg_GetDatasetType(AlgorithmArg self) -> int"},
   67553             :    { "AlgorithmArg_GetDatasetInputFlags", _wrap_AlgorithmArg_GetDatasetInputFlags, METH_O, "AlgorithmArg_GetDatasetInputFlags(AlgorithmArg self) -> int"},
   67554             :    { "AlgorithmArg_GetDatasetOutputFlags", _wrap_AlgorithmArg_GetDatasetOutputFlags, METH_O, "AlgorithmArg_GetDatasetOutputFlags(AlgorithmArg self) -> int"},
   67555             :    { "AlgorithmArg_GetMutualExclusionGroup", _wrap_AlgorithmArg_GetMutualExclusionGroup, METH_O, "AlgorithmArg_GetMutualExclusionGroup(AlgorithmArg self) -> char const *"},
   67556             :    { "AlgorithmArg_GetAsBoolean", _wrap_AlgorithmArg_GetAsBoolean, METH_O, "AlgorithmArg_GetAsBoolean(AlgorithmArg self) -> bool"},
   67557             :    { "AlgorithmArg_GetAsString", _wrap_AlgorithmArg_GetAsString, METH_O, "AlgorithmArg_GetAsString(AlgorithmArg self) -> char const *"},
   67558             :    { "AlgorithmArg_GetAsInteger", _wrap_AlgorithmArg_GetAsInteger, METH_O, "AlgorithmArg_GetAsInteger(AlgorithmArg self) -> int"},
   67559             :    { "AlgorithmArg_GetAsDouble", _wrap_AlgorithmArg_GetAsDouble, METH_O, "AlgorithmArg_GetAsDouble(AlgorithmArg self) -> double"},
   67560             :    { "AlgorithmArg_GetAsDatasetValue", _wrap_AlgorithmArg_GetAsDatasetValue, METH_O, "AlgorithmArg_GetAsDatasetValue(AlgorithmArg self) -> ArgDatasetValue"},
   67561             :    { "AlgorithmArg_GetAsStringList", _wrap_AlgorithmArg_GetAsStringList, METH_O, "AlgorithmArg_GetAsStringList(AlgorithmArg self) -> char **"},
   67562             :    { "AlgorithmArg_GetAsIntegerList", _wrap_AlgorithmArg_GetAsIntegerList, METH_O, "AlgorithmArg_GetAsIntegerList(AlgorithmArg self)"},
   67563             :    { "AlgorithmArg_GetAsDoubleList", _wrap_AlgorithmArg_GetAsDoubleList, METH_O, "AlgorithmArg_GetAsDoubleList(AlgorithmArg self)"},
   67564             :    { "AlgorithmArg_SetAsBoolean", _wrap_AlgorithmArg_SetAsBoolean, METH_VARARGS, "AlgorithmArg_SetAsBoolean(AlgorithmArg self, bool value) -> bool"},
   67565             :    { "AlgorithmArg_SetAsString", _wrap_AlgorithmArg_SetAsString, METH_VARARGS, "AlgorithmArg_SetAsString(AlgorithmArg self, char const * value) -> bool"},
   67566             :    { "AlgorithmArg_SetAsInteger", _wrap_AlgorithmArg_SetAsInteger, METH_VARARGS, "AlgorithmArg_SetAsInteger(AlgorithmArg self, int value) -> bool"},
   67567             :    { "AlgorithmArg_SetAsDouble", _wrap_AlgorithmArg_SetAsDouble, METH_VARARGS, "AlgorithmArg_SetAsDouble(AlgorithmArg self, double value) -> bool"},
   67568             :    { "AlgorithmArg_SetAsDatasetValue", _wrap_AlgorithmArg_SetAsDatasetValue, METH_VARARGS, "AlgorithmArg_SetAsDatasetValue(AlgorithmArg self, ArgDatasetValue value) -> bool"},
   67569             :    { "AlgorithmArg_SetAsStringList", _wrap_AlgorithmArg_SetAsStringList, METH_VARARGS, "AlgorithmArg_SetAsStringList(AlgorithmArg self, char ** value) -> bool"},
   67570             :    { "AlgorithmArg_SetAsIntegerList", _wrap_AlgorithmArg_SetAsIntegerList, METH_VARARGS, "AlgorithmArg_SetAsIntegerList(AlgorithmArg self, int nList) -> bool"},
   67571             :    { "AlgorithmArg_SetAsDoubleList", _wrap_AlgorithmArg_SetAsDoubleList, METH_VARARGS, "AlgorithmArg_SetAsDoubleList(AlgorithmArg self, int nList) -> bool"},
   67572             :    { "AlgorithmArg_SetDataset", _wrap_AlgorithmArg_SetDataset, METH_VARARGS, "AlgorithmArg_SetDataset(AlgorithmArg self, Dataset ds) -> bool"},
   67573             :    { "AlgorithmArg_SetDatasets", _wrap_AlgorithmArg_SetDatasets, METH_VARARGS, "AlgorithmArg_SetDatasets(AlgorithmArg self, int object_list_count) -> bool"},
   67574             :    { "AlgorithmArg_SetDatasetNames", _wrap_AlgorithmArg_SetDatasetNames, METH_VARARGS, "AlgorithmArg_SetDatasetNames(AlgorithmArg self, char ** names) -> bool"},
   67575             :    { "AlgorithmArg_swigregister", AlgorithmArg_swigregister, METH_O, NULL},
   67576             :    { "delete_Algorithm", _wrap_delete_Algorithm, METH_O, "delete_Algorithm(Algorithm self)"},
   67577             :    { "Algorithm_GetName", _wrap_Algorithm_GetName, METH_O, "\n"
   67578             :     "Algorithm_GetName(Algorithm self) -> char const *\n"
   67579             :     "\n"
   67580             :     "\n"
   67581             :     "Get the name of the algorithm.\n"
   67582             :     "\n"
   67583             :     "Returns\n"
   67584             :     "-------\n"
   67585             :     "str\n"
   67586             :     "\n"
   67587             :     "Example\n"
   67588             :     "-------\n"
   67589             :     ">>> gdal.Algorithm(\"raster\", \"info\").GetName()\n"
   67590             :     "'info'\n"
   67591             :     "\n"
   67592             :     "\n"
   67593             :     ""},
   67594             :    { "Algorithm_GetDescription", _wrap_Algorithm_GetDescription, METH_O, "\n"
   67595             :     "Algorithm_GetDescription(Algorithm self) -> char const *\n"
   67596             :     "\n"
   67597             :     "\n"
   67598             :     "Get a human-readable description of the Algorithm.\n"
   67599             :     "\n"
   67600             :     "Returns\n"
   67601             :     "-------\n"
   67602             :     "str\n"
   67603             :     "\n"
   67604             :     "Example\n"
   67605             :     "-------\n"
   67606             :     ">>> alg = gdal.Algorithm(\"raster\", \"convert\")\n"
   67607             :     ">>> alg.GetDescription()\n"
   67608             :     "'Convert a raster dataset.'\n"
   67609             :     "\n"
   67610             :     "\n"
   67611             :     ""},
   67612             :    { "Algorithm_GetLongDescription", _wrap_Algorithm_GetLongDescription, METH_O, "\n"
   67613             :     "Algorithm_GetLongDescription(Algorithm self) -> char const *\n"
   67614             :     "\n"
   67615             :     "\n"
   67616             :     ":meta private:\n"
   67617             :     "\n"
   67618             :     "\n"
   67619             :     ""},
   67620             :    { "Algorithm_GetHelpFullURL", _wrap_Algorithm_GetHelpFullURL, METH_O, "\n"
   67621             :     "Algorithm_GetHelpFullURL(Algorithm self) -> char const *\n"
   67622             :     "\n"
   67623             :     "\n"
   67624             :     "Get a URL for the algorithm's documentation.\n"
   67625             :     "\n"
   67626             :     "Returns\n"
   67627             :     "-------\n"
   67628             :     "str\n"
   67629             :     "\n"
   67630             :     "Example\n"
   67631             :     "-------\n"
   67632             :     ">>> alg = gdal.Algorithm(\"raster\", \"convert\")\n"
   67633             :     ">>> alg.GetHelpFullURL()\n"
   67634             :     "'https://gdal.org/programs/gdal_raster_convert.html'\n"
   67635             :     "\n"
   67636             :     "\n"
   67637             :     ""},
   67638             :    { "Algorithm_HasSubAlgorithms", _wrap_Algorithm_HasSubAlgorithms, METH_O, "\n"
   67639             :     "Algorithm_HasSubAlgorithms(Algorithm self) -> bool\n"
   67640             :     "\n"
   67641             :     "\n"
   67642             :     "Returns whether the algorithm has sub-algorithms.\n"
   67643             :     "\n"
   67644             :     "Returns\n"
   67645             :     "-------\n"
   67646             :     "bool\n"
   67647             :     "\n"
   67648             :     "Example\n"
   67649             :     "-------\n"
   67650             :     ">>> alg = gdal.Algorithm(\"raster\")\n"
   67651             :     ">>> alg.HasSubAlgorithms()\n"
   67652             :     "True\n"
   67653             :     ">>> subalg = alg.InstantiateSubAlgorithm(\"convert\")\n"
   67654             :     ">>> subalg.HasSubAlgorithms()\n"
   67655             :     "False\n"
   67656             :     "\n"
   67657             :     "\n"
   67658             :     ""},
   67659             :    { "Algorithm_GetSubAlgorithmNames", _wrap_Algorithm_GetSubAlgorithmNames, METH_O, "\n"
   67660             :     "Algorithm_GetSubAlgorithmNames(Algorithm self) -> char **\n"
   67661             :     "\n"
   67662             :     "\n"
   67663             :     "Return a list of names of sub-algorithms.\n"
   67664             :     "\n"
   67665             :     "Returns\n"
   67666             :     "-------\n"
   67667             :     "list or None\n"
   67668             :     "\n"
   67669             :     "Example\n"
   67670             :     "-------\n"
   67671             :     ">>> alg = gdal.Algorithm(\"raster\")\n"
   67672             :     ">>> alg.GetSubAlgorithmNames()\n"
   67673             :     "['aspect', 'calc', 'clean-collar', 'clip', 'color-map', 'color-merge', 'contour', 'convert', 'create', 'edit', 'fill-nodata', 'footprint', 'hillshade', 'index', 'info', 'mosaic', 'nodata-to-alpha', 'overview', 'pansharpen', 'pipeline', 'pixel-info', 'polygonize', 'proximity', 'reclassify', 'reproject', 'resize', 'rgb-to-palette', 'roughness', 'scale', 'select', 'set-type', 'sieve', 'slope', 'stack', 'tile', 'tpi', 'tri', 'unscale', 'update', 'viewshed']\n"
   67674             :     "\n"
   67675             :     "\n"
   67676             :     ""},
   67677             :    { "Algorithm_InstantiateSubAlgorithm", _wrap_Algorithm_InstantiateSubAlgorithm, METH_VARARGS, "\n"
   67678             :     "Algorithm_InstantiateSubAlgorithm(Algorithm self, char const * algName) -> Algorithm\n"
   67679             :     "\n"
   67680             :     "\n"
   67681             :     "Instantiate a sub-algorithm if available.\n"
   67682             :     "\n"
   67683             :     "Returns\n"
   67684             :     "-------\n"
   67685             :     "Algorithm or None\n"
   67686             :     "\n"
   67687             :     "Example\n"
   67688             :     "-------\n"
   67689             :     ">>> alg = gdal.Algorithm(\"raster\")\n"
   67690             :     ">>> alg.InstantiateSubAlgorithm(\"convert\")\n"
   67691             :     "<osgeo.gdal.Algorithm; proxy of <Swig Object of type 'GDALAlgorithmHS *' at 0x7ca38a3eec40> >\n"
   67692             :     ">>> subalg = alg.InstantiateSubAlgorithm(\"does_not_exist\")\n"
   67693             :     "\n"
   67694             :     "\n"
   67695             :     ""},
   67696             :    { "Algorithm_ParseCommandLineArguments", _wrap_Algorithm_ParseCommandLineArguments, METH_VARARGS, "\n"
   67697             :     "Algorithm_ParseCommandLineArguments(Algorithm self, char ** args) -> bool\n"
   67698             :     "\n"
   67699             :     "\n"
   67700             :     "Parse a list of arguments for the algorithm, setting the appropriate parameters. May only be called once per algorithm.\n"
   67701             :     "\n"
   67702             :     "Parameters\n"
   67703             :     "----------\n"
   67704             :     "args : list\n"
   67705             :     "    List of named or positional arguments\n"
   67706             :     "\n"
   67707             :     "Returns\n"
   67708             :     "-------\n"
   67709             :     "bool\n"
   67710             :     "    Whether the arguments were successfully parsed\n"
   67711             :     "\n"
   67712             :     "Example\n"
   67713             :     "-------\n"
   67714             :     ">>> alg = gdal.Algorithm(\"vector\", \"info\")\n"
   67715             :     ">>> alg.ParseCommandLineArguments(['poly.shp', '--format', 'text'])\n"
   67716             :     "True\n"
   67717             :     "\n"
   67718             :     "\n"
   67719             :     ""},
   67720             :    { "Algorithm_GetActualAlgorithm", _wrap_Algorithm_GetActualAlgorithm, METH_O, "\n"
   67721             :     "Algorithm_GetActualAlgorithm(Algorithm self) -> Algorithm\n"
   67722             :     "\n"
   67723             :     "\n"
   67724             :     "Return the actual algorithm that is going to be invoked, if the\n"
   67725             :     "current algorithm has sub-algorithms.\n"
   67726             :     "\n"
   67727             :     "Returns\n"
   67728             :     "-------\n"
   67729             :     "Algorithm\n"
   67730             :     "\n"
   67731             :     "Example\n"
   67732             :     "-------\n"
   67733             :     ">>> alg = gdal.GetGlobalAlgorithmRegistry().InstantiateAlg(\"raster\")\n"
   67734             :     ">>> alg.ParseCommandLineArguments([\"convert\" ,\"--input\", \"byte.tif\", \"--output\",  \"/tmp/byte.png\"])\n"
   67735             :     "True\n"
   67736             :     ">>> alg.GetActualAlgorithm().GetDescription()\n"
   67737             :     "'Convert a raster dataset.'\n"
   67738             :     "\n"
   67739             :     "\n"
   67740             :     ""},
   67741             :    { "Algorithm_Run", _wrap_Algorithm_Run, METH_VARARGS, "\n"
   67742             :     "Algorithm_Run(Algorithm self, GDALProgressFunc callback=0, void * callback_data=None) -> bool\n"
   67743             :     "\n"
   67744             :     "\n"
   67745             :     "Run an algorithm and report on its success or failure.\n"
   67746             :     "\n"
   67747             :     "Parameters\n"
   67748             :     "----------\n"
   67749             :     "callback : function\n"
   67750             :     "    Optional progress callback function\n"
   67751             :     "callback_data\n"
   67752             :     "    Optional value to be provided as final argument to callback function\n"
   67753             :     "\n"
   67754             :     "Returns\n"
   67755             :     "-------\n"
   67756             :     "bool\n"
   67757             :     "    ``True`` if the algorithm succeeded, ``False`` otherwise\n"
   67758             :     "\n"
   67759             :     "Examples\n"
   67760             :     "--------\n"
   67761             :     ">>> alg = gdal.Algorithm(\"vector\", \"info\")\n"
   67762             :     ">>> alg['input'] = 'poly.shp'\n"
   67763             :     ">>> alg.Run()\n"
   67764             :     "True\n"
   67765             :     ">>> alg['input'] = 'does_not_exist.shp'\n"
   67766             :     ">>> alg.Run()\n"
   67767             :     "ERROR 4: does_not_exist.shp: No such file or directory\n"
   67768             :     "False\n"
   67769             :     "\n"
   67770             :     "\n"
   67771             :     ""},
   67772             :    { "Algorithm_Finalize", _wrap_Algorithm_Finalize, METH_O, "\n"
   67773             :     "Algorithm_Finalize(Algorithm self) -> bool\n"
   67774             :     "\n"
   67775             :     "\n"
   67776             :     "Close any dataset arguments or outputs of the algorithm.\n"
   67777             :     "\n"
   67778             :     "Returns\n"
   67779             :     "-------\n"
   67780             :     "boolean\n"
   67781             :     "\n"
   67782             :     "\n"
   67783             :     ""},
   67784             :    { "Algorithm_ParseRunAndFinalize", _wrap_Algorithm_ParseRunAndFinalize, METH_VARARGS, "\n"
   67785             :     "Algorithm_ParseRunAndFinalize(Algorithm self, char ** args, GDALProgressFunc callback=0, void * callback_data=None) -> bool\n"
   67786             :     "\n"
   67787             :     "\n"
   67788             :     "Convenience method that calls :py:meth:`ParseCommandLineArguments`, :py:meth:`Run`, and :py:meth:`Finalize`.\n"
   67789             :     "\n"
   67790             :     "Parameters\n"
   67791             :     "----------\n"
   67792             :     "args : list\n"
   67793             :     "    List of command line arguments\n"
   67794             :     "callback : function\n"
   67795             :     "    Optional progress callback function\n"
   67796             :     "callback_data\n"
   67797             :     "    Optional value to be provided as final argument to callback function\n"
   67798             :     "\n"
   67799             :     "Returns\n"
   67800             :     "-------\n"
   67801             :     "bool\n"
   67802             :     "    ``True`` if the algorithm succeeded, ``False`` otherwise\n"
   67803             :     "\n"
   67804             :     "\n"
   67805             :     ""},
   67806             :    { "Algorithm_GetUsageAsJSON", _wrap_Algorithm_GetUsageAsJSON, METH_O, "\n"
   67807             :     "Algorithm_GetUsageAsJSON(Algorithm self) -> retStringAndCPLFree *\n"
   67808             :     "\n"
   67809             :     "\n"
   67810             :     "Returns a JSON representation of an algorithm's usage information, serialized to a string.\n"
   67811             :     "\n"
   67812             :     "Returns\n"
   67813             :     "-------\n"
   67814             :     "str\n"
   67815             :     "\n"
   67816             :     "Example\n"
   67817             :     "-------\n"
   67818             :     ">>> import json\n"
   67819             :     ">>> import pprint\n"
   67820             :     ">>> usage = json.loads(gdal.Algorithm(\"vector\", \"info\").GetUsageAsJSON())\n"
   67821             :     ">>> pprint.pprint(usage)\n"
   67822             :     "{'description': 'Return information on a vector dataset.',\n"
   67823             :     " 'full_path': ['gdal', 'vector', 'info'],\n"
   67824             :     " 'input_arguments': [{'category': 'Base',\n"
   67825             :     "                      'choices': ['json', 'text'],\n"
   67826             :     "                      'description': 'Output format',\n"
   67827             :     "                      'name': 'output-format',\n"
   67828             :     "                      'required': False,\n"
   67829             :     "                      'type': 'string'},\n"
   67830             :     "                     {'category': 'Advanced',\n"
   67831             :     "                      'description': 'Open options',\n"
   67832             :     "                      'max_count': 2147483647,\n"
   67833             :     "                      'metavar': '<KEY>=<VALUE>',\n"
   67834             :     "                      'min_count': 0,\n"
   67835             :     "                      'name': 'open-option',\n"
   67836             :     "                      'packed_values_allowed': False,\n"
   67837             :     "                      'repeated_arg_allowed': True,\n"
   67838             :     "                      'required': False,\n"
   67839             :     "                      'type': 'string_list'},\n"
   67840             :     "                     {'category': 'Advanced',\n"
   67841             :     "                      'description': 'Input formats',\n"
   67842             :     "                      'max_count': 2147483647,\n"
   67843             :     "                      'metadata': {'required_capabilities': ['DCAP_VECTOR']},\n"
   67844             :     "                      'min_count': 0,\n"
   67845             :     "                      'name': 'input-format',\n"
   67846             :     "                      'packed_values_allowed': True,\n"
   67847             :     "                      'repeated_arg_allowed': True,\n"
   67848             :     "                      'required': False,\n"
   67849             :     "                      'type': 'string_list'},\n"
   67850             :     "                     {'category': 'Base',\n"
   67851             :     "                      'dataset_type': ['vector'],\n"
   67852             :     "                      'description': 'Input vector datasets',\n"
   67853             :     "                      'input_flags': ['name', 'dataset'],\n"
   67854             :     "                      'max_count': 2147483647,\n"
   67855             :     "                      'min_count': 0,\n"
   67856             :     "                      'name': 'input',\n"
   67857             :     "                      'packed_values_allowed': True,\n"
   67858             :     "                      'repeated_arg_allowed': True,\n"
   67859             :     "                      'required': True,\n"
   67860             :     "                      'type': 'dataset_list'},\n"
   67861             :     "                     {'category': 'Base',\n"
   67862             :     "                      'description': 'Layer name',\n"
   67863             :     "                      'max_count': 2147483647,\n"
   67864             :     "                      'min_count': 0,\n"
   67865             :     "                      'mutual_exclusion_group': 'layer-sql',\n"
   67866             :     "                      'name': 'layer',\n"
   67867             :     "                      'packed_values_allowed': True,\n"
   67868             :     "                      'repeated_arg_allowed': True,\n"
   67869             :     "                      'required': False,\n"
   67870             :     "                      'type': 'string_list'},\n"
   67871             :     "                     {'category': 'Base',\n"
   67872             :     "                      'description': 'List all features (beware of RAM '\n"
   67873             :     "                                     'consumption on large layers)',\n"
   67874             :     "                      'mutual_exclusion_group': 'summary-features',\n"
   67875             :     "                      'name': 'features',\n"
   67876             :     "                      'required': False,\n"
   67877             :     "                      'type': 'boolean'},\n"
   67878             :     "                     {'category': 'Base',\n"
   67879             :     "                      'description': 'List the layer names and the geometry '\n"
   67880             :     "                                     'type',\n"
   67881             :     "                      'mutual_exclusion_group': 'summary-features',\n"
   67882             :     "                      'name': 'summary',\n"
   67883             :     "                      'required': False,\n"
   67884             :     "                      'type': 'boolean'},\n"
   67885             :     "                     {'category': 'Base',\n"
   67886             :     "                      'description': 'Limit the number of features per layer '\n"
   67887             :     "                                     '(implies --features)',\n"
   67888             :     "                      'metavar': 'FEATURE-COUNT',\n"
   67889             :     "                      'min_value': 0,\n"
   67890             :     "                      'min_value_is_included': True,\n"
   67891             :     "                      'name': 'limit',\n"
   67892             :     "                      'required': False,\n"
   67893             :     "                      'type': 'integer'},\n"
   67894             :     "                     {'category': 'Base',\n"
   67895             :     "                      'description': 'Execute the indicated SQL statement and '\n"
   67896             :     "                                     'return the result',\n"
   67897             :     "                      'metavar': '<statement>|@<filename>',\n"
   67898             :     "                      'mutual_exclusion_group': 'layer-sql',\n"
   67899             :     "                      'name': 'sql',\n"
   67900             :     "                      'required': False,\n"
   67901             :     "                      'type': 'string'},\n"
   67902             :     "                     {'category': 'Base',\n"
   67903             :     "                      'description': 'Attribute query in a restricted form of '\n"
   67904             :     "                                     'the queries used in the SQL WHERE '\n"
   67905             :     "                                     'statement',\n"
   67906             :     "                      'metavar': '<WHERE>|@<filename>',\n"
   67907             :     "                      'name': 'where',\n"
   67908             :     "                      'required': False,\n"
   67909             :     "                      'type': 'string'},\n"
   67910             :     "                     {'category': 'Base',\n"
   67911             :     "                      'description': 'SQL dialect',\n"
   67912             :     "                      'name': 'dialect',\n"
   67913             :     "                      'required': False,\n"
   67914             :     "                      'type': 'string'},\n"
   67915             :     "                     {'category': 'Base',\n"
   67916             :     "                      'description': 'Open the dataset in update mode',\n"
   67917             :     "                      'name': 'update',\n"
   67918             :     "                      'required': False,\n"
   67919             :     "                      'type': 'boolean'}],\n"
   67920             :     " 'input_output_arguments': [],\n"
   67921             :     " 'name': 'info',\n"
   67922             :     " 'output_arguments': [{'category': 'Base',\n"
   67923             :     "                       'description': 'Output string, in which the result is '\n"
   67924             :     "                                      'placed',\n"
   67925             :     "                       'name': 'output-string',\n"
   67926             :     "                       'required': False,\n"
   67927             :     "                       'type': 'string'}],\n"
   67928             :     " 'short_url': '/programs/gdal_vector_info.html',\n"
   67929             :     " 'sub_algorithms': [],\n"
   67930             :     " 'supports_streamed_output': True,\n"
   67931             :     " 'url': 'https://gdal.org/programs/gdal_vector_info.html'}\n"
   67932             :     "\n"
   67933             :     "\n"
   67934             :     ""},
   67935             :    { "Algorithm_GetArgNames", _wrap_Algorithm_GetArgNames, METH_O, "\n"
   67936             :     "Algorithm_GetArgNames(Algorithm self) -> char **\n"
   67937             :     "\n"
   67938             :     "\n"
   67939             :     "Get a list of arguments understood by the Algorithm.\n"
   67940             :     "\n"
   67941             :     "Returns\n"
   67942             :     "-------\n"
   67943             :     "list\n"
   67944             :     "\n"
   67945             :     "Example\n"
   67946             :     "-------\n"
   67947             :     ">>> alg = gdal.Algorithm(\"raster\", \"convert\")\n"
   67948             :     ">>> alg.GetArgNames()\n"
   67949             :     "['help', 'help-doc', 'json-usage', 'config', 'quiet', 'progress', 'output-format', 'open-option', 'input-format', 'input', 'output', 'creation-option', 'overwrite', 'append']\n"
   67950             :     "\n"
   67951             :     "\n"
   67952             :     ""},
   67953             :    { "Algorithm_GetArg", _wrap_Algorithm_GetArg, METH_VARARGS, "\n"
   67954             :     "Algorithm_GetArg(Algorithm self, char const * argName) -> AlgorithmArg\n"
   67955             :     "\n"
   67956             :     "\n"
   67957             :     "Get an :py:class:`AlgorithmArg` object that can be queried for information about an argument.\n"
   67958             :     "\n"
   67959             :     "Parameters\n"
   67960             :     "----------\n"
   67961             :     "argName : str\n"
   67962             :     "\n"
   67963             :     "Returns\n"
   67964             :     "-------\n"
   67965             :     "AlgorithmArg\n"
   67966             :     "\n"
   67967             :     "Example\n"
   67968             :     "-------\n"
   67969             :     ">>> alg = gdal.Algorithm(\"raster\", \"polygonize\")\n"
   67970             :     ">>> arg = alg.GetArg(\"connect-diagonal-pixels\")\n"
   67971             :     ">>> arg.GetDescription()\n"
   67972             :     "'Consider diagonal pixels as connected'\n"
   67973             :     "\n"
   67974             :     "\n"
   67975             :     ""},
   67976             :    { "Algorithm_GetArgNonConst", _wrap_Algorithm_GetArgNonConst, METH_VARARGS, "\n"
   67977             :     "Algorithm_GetArgNonConst(Algorithm self, char const * argName) -> AlgorithmArg\n"
   67978             :     "\n"
   67979             :     "\n"
   67980             :     ":meta private:\n"
   67981             :     "\n"
   67982             :     "\n"
   67983             :     ""},
   67984             :    { "Algorithm_swigregister", Algorithm_swigregister, METH_O, NULL},
   67985             :    { "delete_AlgorithmRegistry", _wrap_delete_AlgorithmRegistry, METH_O, "delete_AlgorithmRegistry(AlgorithmRegistry self)"},
   67986             :    { "AlgorithmRegistry_GetAlgNames", _wrap_AlgorithmRegistry_GetAlgNames, METH_O, "\n"
   67987             :     "AlgorithmRegistry_GetAlgNames(AlgorithmRegistry self) -> char **\n"
   67988             :     "\n"
   67989             :     "\n"
   67990             :     "Return the names of available algorithms.\n"
   67991             :     "\n"
   67992             :     "Returns\n"
   67993             :     "-------\n"
   67994             :     "list\n"
   67995             :     "\n"
   67996             :     "Examples\n"
   67997             :     "--------\n"
   67998             :     ">>> gdal.GetGlobalAlgorithmRegistry().GetAlgNames()\n"
   67999             :     "['convert', 'dataset', 'info', 'mdim', 'pipeline', 'raster', 'vector', 'vsi']\n"
   68000             :     "\n"
   68001             :     "\n"
   68002             :     ""},
   68003             :    { "AlgorithmRegistry_InstantiateAlg", _wrap_AlgorithmRegistry_InstantiateAlg, METH_VARARGS, "\n"
   68004             :     "AlgorithmRegistry_InstantiateAlg(AlgorithmRegistry self, char const * algName) -> Algorithm\n"
   68005             :     "\n"
   68006             :     "\n"
   68007             :     "Instantiate an :py:class:`Algorithm`.\n"
   68008             :     "\n"
   68009             :     "Most useful algorithms are accessed as a sub-algorithm of another algorithm.\n"
   68010             :     "For example, ``polygonize`` is a sub-algorithm of ``raster`` and can be\n"
   68011             :     "instantiated by first instantiating the primary algorithm, then using\n"
   68012             :     ":py:meth:`Algorithm.InstantiateSubAlgorithm`.\n"
   68013             :     "\n"
   68014             :     "Returns\n"
   68015             :     "-------\n"
   68016             :     "Algorithm\n"
   68017             :     "\n"
   68018             :     "Examples\n"
   68019             :     "--------\n"
   68020             :     "\n"
   68021             :     ">>> alg = gdal.GetGlobalAlgorithmRegistry().InstantiateAlg('pipeline')    # or alg= gdal.Algorithm(\"pipeline\")\n"
   68022             :     ">>> alg.GetName()\n"
   68023             :     "'pipeline'\n"
   68024             :     ">>> alg.GetArgNames()\n"
   68025             :     "['help', 'help-doc', 'json-usage', 'config', 'quiet', 'progress', 'input', 'output', 'output-format', 'pipeline', 'output-string', 'stdout']\n"
   68026             :     "\n"
   68027             :     ">>> subalg = gdal.GetGlobalAlgorithmRegistry().InstantiateAlg('raster').InstantiateSubAlgorithm('polygonize')\n"
   68028             :     ">>> subalg.GetArgNames()\n"
   68029             :     "['help', 'help-doc', 'json-usage', 'config', 'quiet', 'progress', 'output-format', 'open-option', 'input-format', 'input', 'output', 'creation-option', 'layer-creation-option', 'overwrite', 'update', 'overwrite-layer', 'append', 'layer', 'band', 'attribute-name', 'connect-diagonal-pixels']\n"
   68030             :     "\n"
   68031             :     "\n"
   68032             :     ""},
   68033             :    { "AlgorithmRegistry_swigregister", AlgorithmRegistry_swigregister, METH_O, NULL},
   68034             :    { "delete_ArgDatasetValue", _wrap_delete_ArgDatasetValue, METH_O, "delete_ArgDatasetValue(ArgDatasetValue self)"},
   68035             :    { "ArgDatasetValue_GetName", _wrap_ArgDatasetValue_GetName, METH_O, "ArgDatasetValue_GetName(ArgDatasetValue self) -> char const *"},
   68036             :    { "ArgDatasetValue_GetDataset", _wrap_ArgDatasetValue_GetDataset, METH_O, "ArgDatasetValue_GetDataset(ArgDatasetValue self) -> Dataset"},
   68037             :    { "ArgDatasetValue_SetName", _wrap_ArgDatasetValue_SetName, METH_VARARGS, "ArgDatasetValue_SetName(ArgDatasetValue self, char const * name)"},
   68038             :    { "ArgDatasetValue_SetDataset", _wrap_ArgDatasetValue_SetDataset, METH_VARARGS, "ArgDatasetValue_SetDataset(ArgDatasetValue self, Dataset ds)"},
   68039             :    { "ArgDatasetValue_swigregister", ArgDatasetValue_swigregister, METH_O, NULL},
   68040             :    { "ApplyGeoTransform", _wrap_ApplyGeoTransform, METH_VARARGS, "\n"
   68041             :     "ApplyGeoTransform(double [6] padfGeoTransform, double dfPixel, double dfLine)\n"
   68042             :     "\n"
   68043             :     "\n"
   68044             :     "Apply a geotransform to convert a (col, row) location\n"
   68045             :     "into a georeferenced (x, y) coordinate. To perform the\n"
   68046             :     "inverse transformation, see :py:func:`InvGeoTransform`.\n"
   68047             :     "\n"
   68048             :     "See :cpp:func:`GDALApplyGeoTransform`.\n"
   68049             :     "\n"
   68050             :     "Parameters\n"
   68051             :     "----------\n"
   68052             :     "gt : tuple\n"
   68053             :     "   Geotransform array, as described in :ref:`geotransforms_tut`.\n"
   68054             :     "dfPixel : float\n"
   68055             :     "   (Fractional) column in image coordinates (0.0 at the left edge of the image)\n"
   68056             :     "dfLine : float\n"
   68057             :     "   (Fractional) row in image coordinates (0.0 at the top of the image)\n"
   68058             :     "\n"
   68059             :     "Returns\n"
   68060             :     "-------\n"
   68061             :     "List\n"
   68062             :     "   x, y values corresponding to the input location\n"
   68063             :     "\n"
   68064             :     "Examples\n"
   68065             :     "--------\n"
   68066             :     ">>> ds = gdal.Open('byte.tif')\n"
   68067             :     ">>> gt = ds.GetGeoTransform()\n"
   68068             :     ">>> gdal.ApplyGeoTransform(gt, 5, 7)\n"
   68069             :     "[441020.0, 3750900.0]\n"
   68070             :     "\n"
   68071             :     "\n"
   68072             :     ""},
   68073             :    { "InvGeoTransform", _wrap_InvGeoTransform, METH_O, "\n"
   68074             :     "InvGeoTransform(double [6] gt_in) -> RETURN_NONE\n"
   68075             :     "\n"
   68076             :     "\n"
   68077             :     "Invert a geotransform array so that it represents a conversion\n"
   68078             :     "from georeferenced (x, y) coordinates to image (col, row) coordinates.\n"
   68079             :     "\n"
   68080             :     "Parameters\n"
   68081             :     "----------\n"
   68082             :     "gt : tuple\n"
   68083             :     "   Geotransform array, as described in :ref:`geotransforms_tut`.\n"
   68084             :     "\n"
   68085             :     "Returns\n"
   68086             :     "-------\n"
   68087             :     "tuple\n"
   68088             :     "   Geotransform array representing the inverse transformation\n"
   68089             :     "\n"
   68090             :     "Examples\n"
   68091             :     "--------\n"
   68092             :     ">>> ds = gdal.Open('byte.tif')\n"
   68093             :     ">>> inv_gt = gdal.InvGeoTransform(ds.GetGeoTransform())\n"
   68094             :     ">>> inv_gt\n"
   68095             :     "(-7345.333333333333, 0.016666666666666666, 0.0, 62522.0, 0.0, -0.016666666666666666)\n"
   68096             :     ">>> gdal.ApplyGeoTransform(inv_gt, 441020, 3750900)\n"
   68097             :     "[5.0, 7.0]\n"
   68098             :     "\n"
   68099             :     "\n"
   68100             :     ""},
   68101             :    { "ApplyHomography", _wrap_ApplyHomography, METH_VARARGS, "ApplyHomography(double [9] padfHomography, double dfPixel, double dfLine) -> int"},
   68102             :    { "InvHomography", _wrap_InvHomography, METH_O, "InvHomography(double [9] h_in) -> RETURN_NONE"},
   68103             :    { "VersionInfo", _wrap_VersionInfo, METH_VARARGS, "VersionInfo(char const * request=\"VERSION_NUM\") -> char const *"},
   68104             :    { "AllRegister", _wrap_AllRegister, METH_NOARGS, "\n"
   68105             :     "AllRegister()\n"
   68106             :     "\n"
   68107             :     "\n"
   68108             :     "Register all known configured GDAL drivers.\n"
   68109             :     "Automatically called when the :py:mod:`gdal` module is loaded.\n"
   68110             :     "Does not need to be called in user code unless a driver was\n"
   68111             :     "deregistered and needs to be re-registered.\n"
   68112             :     "See :cpp:func:`GDALAllRegister`.\n"
   68113             :     "\n"
   68114             :     "See Also\n"
   68115             :     "--------\n"
   68116             :     ":py:func:`Driver.Register`\n"
   68117             :     "\n"
   68118             :     ""},
   68119             :    { "GDALDestroyDriverManager", _wrap_GDALDestroyDriverManager, METH_NOARGS, "GDALDestroyDriverManager()"},
   68120             :    { "GetCacheMax", _wrap_GetCacheMax, METH_NOARGS, "\n"
   68121             :     "GetCacheMax() -> GIntBig\n"
   68122             :     "\n"
   68123             :     "\n"
   68124             :     "Get the maximum size of the block cache.\n"
   68125             :     "See :cpp:func:`GDALGetCacheMax`.\n"
   68126             :     "\n"
   68127             :     "Returns\n"
   68128             :     "-------\n"
   68129             :     "int\n"
   68130             :     "    maximum cache size in bytes\n"
   68131             :     "\n"
   68132             :     ""},
   68133             :    { "GetCacheUsed", _wrap_GetCacheUsed, METH_NOARGS, "\n"
   68134             :     "GetCacheUsed() -> GIntBig\n"
   68135             :     "\n"
   68136             :     "\n"
   68137             :     "Get the number of bytes in used by the block cache.\n"
   68138             :     "See :cpp:func:`GDALGetCacheUsed`.\n"
   68139             :     "\n"
   68140             :     "Returns\n"
   68141             :     "-------\n"
   68142             :     "int\n"
   68143             :     "    cache size in bytes\n"
   68144             :     "\n"
   68145             :     ""},
   68146             :    { "SetCacheMax", _wrap_SetCacheMax, METH_O, "\n"
   68147             :     "SetCacheMax(GIntBig nBytes)\n"
   68148             :     "\n"
   68149             :     "\n"
   68150             :     "Set the maximum size of the block cache.\n"
   68151             :     "See :cpp:func:`GDALSetCacheMax`.\n"
   68152             :     "\n"
   68153             :     "Parameters\n"
   68154             :     "----------\n"
   68155             :     "nBytes: int\n"
   68156             :     "    Cache size in bytes\n"
   68157             :     "\n"
   68158             :     "See Also\n"
   68159             :     "--------\n"
   68160             :     ":config:`GDAL_CACHEMAX`\n"
   68161             :     "\n"
   68162             :     ""},
   68163             :    { "GetDataTypeSize", _wrap_GetDataTypeSize, METH_O, "GetDataTypeSize(GDALDataType eDataType) -> int"},
   68164             :    { "GetDataTypeSizeBits", _wrap_GetDataTypeSizeBits, METH_O, "GetDataTypeSizeBits(GDALDataType eDataType) -> int"},
   68165             :    { "GetDataTypeSizeBytes", _wrap_GetDataTypeSizeBytes, METH_O, "GetDataTypeSizeBytes(GDALDataType eDataType) -> int"},
   68166             :    { "DataTypeIsComplex", _wrap_DataTypeIsComplex, METH_O, "DataTypeIsComplex(GDALDataType eDataType) -> int"},
   68167             :    { "GetDataTypeName", _wrap_GetDataTypeName, METH_O, "\n"
   68168             :     "GetDataTypeName(GDALDataType eDataType) -> char const *\n"
   68169             :     "\n"
   68170             :     "\n"
   68171             :     "Return the name of the data type.\n"
   68172             :     "\n"
   68173             :     "Parameters\n"
   68174             :     "----------\n"
   68175             :     "eDataType : int\n"
   68176             :     "    data type code\n"
   68177             :     "\n"
   68178             :     "Returns\n"
   68179             :     "-------\n"
   68180             :     "str\n"
   68181             :     "\n"
   68182             :     "Examples\n"
   68183             :     "--------\n"
   68184             :     ">>> gdal.GetDataTypeName(gdal.GDT_Int16)\n"
   68185             :     "'Int16'\n"
   68186             :     ">>> gdal.GetDataTypeName(gdal.GDT_Float64)\n"
   68187             :     "'Float64'\n"
   68188             :     "\n"
   68189             :     ""},
   68190             :    { "GetDataTypeByName", _wrap_GetDataTypeByName, METH_O, "\n"
   68191             :     "GetDataTypeByName(char const * pszDataTypeName) -> GDALDataType\n"
   68192             :     "\n"
   68193             :     "\n"
   68194             :     "Return the data type for a given name.\n"
   68195             :     "\n"
   68196             :     "Parameters\n"
   68197             :     "----------\n"
   68198             :     "pszDataTypeName : str\n"
   68199             :     "    data type name\n"
   68200             :     "\n"
   68201             :     "Returns\n"
   68202             :     "-------\n"
   68203             :     "int\n"
   68204             :     "    data type code\n"
   68205             :     "\n"
   68206             :     "Examples\n"
   68207             :     "--------\n"
   68208             :     ">>> gdal.GetDataTypeByName('Int16') == gdal.GDT_Int16\n"
   68209             :     "True\n"
   68210             :     "\n"
   68211             :     "\n"
   68212             :     ""},
   68213             :    { "DataTypeUnion", _wrap_DataTypeUnion, METH_VARARGS, "DataTypeUnion(GDALDataType a, GDALDataType b) -> GDALDataType"},
   68214             :    { "DataTypeUnionWithValue", _wrap_DataTypeUnionWithValue, METH_VARARGS, "DataTypeUnionWithValue(GDALDataType a, double val, bool isComplex) -> GDALDataType"},
   68215             :    { "GetColorInterpretationName", _wrap_GetColorInterpretationName, METH_O, "GetColorInterpretationName(GDALColorInterp eColorInterp) -> char const *"},
   68216             :    { "GetColorInterpretationByName", _wrap_GetColorInterpretationByName, METH_O, "GetColorInterpretationByName(char const * pszColorInterpName) -> GDALColorInterp"},
   68217             :    { "GetPaletteInterpretationName", _wrap_GetPaletteInterpretationName, METH_O, "GetPaletteInterpretationName(GDALPaletteInterp ePaletteInterp) -> char const *"},
   68218             :    { "DecToDMS", _wrap_DecToDMS, METH_VARARGS, "DecToDMS(double arg1, char const * arg2, int arg3=2) -> char const *"},
   68219             :    { "PackedDMSToDec", _wrap_PackedDMSToDec, METH_O, "PackedDMSToDec(double dfPacked) -> double"},
   68220             :    { "DecToPackedDMS", _wrap_DecToPackedDMS, METH_O, "DecToPackedDMS(double dfDec) -> double"},
   68221             :    { "ParseXMLString", _wrap_ParseXMLString, METH_O, "ParseXMLString(char * pszXMLString) -> CPLXMLNode *"},
   68222             :    { "SerializeXMLTree", _wrap_SerializeXMLTree, METH_O, "SerializeXMLTree(CPLXMLNode * xmlnode) -> retStringAndCPLFree *"},
   68223             :    { "GetJPEG2000Structure", _wrap_GetJPEG2000Structure, METH_VARARGS, "GetJPEG2000Structure(char const * pszFilename, char ** options=None) -> CPLXMLNode *"},
   68224             :    { "GetJPEG2000StructureAsString", _wrap_GetJPEG2000StructureAsString, METH_VARARGS, "GetJPEG2000StructureAsString(char const * pszFilename, char ** options=None) -> retStringAndCPLFree *"},
   68225             :    { "HasTriangulation", _wrap_HasTriangulation, METH_NOARGS, "HasTriangulation() -> int"},
   68226             :    { "GetDriverCount", _wrap_GetDriverCount, METH_NOARGS, "\n"
   68227             :     "GetDriverCount() -> int\n"
   68228             :     "\n"
   68229             :     "\n"
   68230             :     "Return the number of registered drivers.\n"
   68231             :     "See :cpp:func:`GDALGetDriverCount`.\n"
   68232             :     "\n"
   68233             :     "Examples\n"
   68234             :     "--------\n"
   68235             :     ">>> gdal.GetDriverCount()\n"
   68236             :     "227\n"
   68237             :     ">>> gdal.GetDriverByName('ESRI Shapefile').Deregister()\n"
   68238             :     ">>> gdal.GetDriverCount()\n"
   68239             :     "226\n"
   68240             :     "\n"
   68241             :     "\n"
   68242             :     ""},
   68243             :    { "GetDriverByName", _wrap_GetDriverByName, METH_O, "GetDriverByName(char const * name) -> Driver"},
   68244             :    { "GetDriver", _wrap_GetDriver, METH_O, "GetDriver(int i) -> Driver"},
   68245             :    { "Open", _wrap_Open, METH_VARARGS, "\n"
   68246             :     "Open(char const * utf8_path, GDALAccess eAccess=GA_ReadOnly) -> Dataset\n"
   68247             :     "\n"
   68248             :     "\n"
   68249             :     "Opens a raster file as a :py:class:`Dataset` using default options.\n"
   68250             :     "See :cpp:func:`GDALOpen`.\n"
   68251             :     "For more control over how the file is opened, use :py:func:`OpenEx`.\n"
   68252             :     "\n"
   68253             :     "Parameters\n"
   68254             :     "----------\n"
   68255             :     "utf8_path : str\n"
   68256             :     "    name of the file to open\n"
   68257             :     "eAccess : int, default = :py:const:`gdal.GA_ReadOnly`\n"
   68258             :     "\n"
   68259             :     "Returns\n"
   68260             :     "-------\n"
   68261             :     "Dataset, or ``None`` on failure\n"
   68262             :     "\n"
   68263             :     "See Also\n"
   68264             :     "--------\n"
   68265             :     ":py:func:`OpenEx`\n"
   68266             :     ":py:func:`OpenShared`\n"
   68267             :     "\n"
   68268             :     "\n"
   68269             :     ""},
   68270             :    { "OpenEx", (PyCFunction)(void(*)(void))_wrap_OpenEx, METH_VARARGS|METH_KEYWORDS, "\n"
   68271             :     "OpenEx(char const * utf8_path, unsigned int nOpenFlags=0, char ** allowed_drivers=None, char ** open_options=None, char ** sibling_files=None) -> Dataset\n"
   68272             :     "\n"
   68273             :     "\n"
   68274             :     "Open a raster or vector file as a :py:class:`Dataset`.\n"
   68275             :     "See :cpp:func:`GDALOpenEx`.\n"
   68276             :     "\n"
   68277             :     "Parameters\n"
   68278             :     "----------\n"
   68279             :     "utf8_path : str\n"
   68280             :     "    name of the file to open\n"
   68281             :     "flags : int\n"
   68282             :     "        Flags controlling how the Dataset is opened. Multiple ``gdal.OF_XXX`` flags\n"
   68283             :     "        may be combined using the ``|`` operator. See :cpp:func:`GDALOpenEx`.\n"
   68284             :     "allowed_drivers : list, optional\n"
   68285             :     "        A list of the names of drivers that may attempt to open the dataset.\n"
   68286             :     "open_options : dict/list, optional\n"
   68287             :     "        A dict or list of name=value driver-specific opening options.\n"
   68288             :     "sibling_files: list, optional\n"
   68289             :     "        A list of filenames that are auxiliary to the main filename\n"
   68290             :     "\n"
   68291             :     "Returns\n"
   68292             :     "-------\n"
   68293             :     "Dataset, or ``None`` on failure.\n"
   68294             :     "\n"
   68295             :     "See Also\n"
   68296             :     "--------\n"
   68297             :     ":py:func:`Open`\n"
   68298             :     ":py:func:`OpenShared`\n"
   68299             :     "\n"
   68300             :     "\n"
   68301             :     ""},
   68302             :    { "OpenShared", _wrap_OpenShared, METH_VARARGS, "\n"
   68303             :     "OpenShared(char const * utf8_path, GDALAccess eAccess=GA_ReadOnly) -> Dataset\n"
   68304             :     "\n"
   68305             :     "\n"
   68306             :     "Open a raster file as a :py:class:`Dataset`. If the file has already been\n"
   68307             :     "opened in the current thread, return a reference to the already-opened\n"
   68308             :     ":py:class:`Dataset`.  See :cpp:func:`GDALOpenShared`.\n"
   68309             :     "\n"
   68310             :     "Parameters\n"
   68311             :     "----------\n"
   68312             :     "utf8_path : str\n"
   68313             :     "    name of the file to open\n"
   68314             :     "eAccess : int, default = :py:const:`gdal.GA_ReadOnly`\n"
   68315             :     "\n"
   68316             :     "Returns\n"
   68317             :     "-------\n"
   68318             :     "Dataset, or ``None`` on failure\n"
   68319             :     "\n"
   68320             :     "See Also\n"
   68321             :     "--------\n"
   68322             :     ":py:func:`Open`\n"
   68323             :     ":py:func:`OpenEx`\n"
   68324             :     "\n"
   68325             :     "\n"
   68326             :     ""},
   68327             :    { "IdentifyDriver", _wrap_IdentifyDriver, METH_VARARGS, "IdentifyDriver(char const * utf8_path, char ** papszSiblings=None) -> Driver"},
   68328             :    { "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"},
   68329             :    { "GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, "GeneralCmdLineProcessor(char ** papszArgv, int nOptions=0) -> char **"},
   68330             :    { "new_GDALInfoOptions", _wrap_new_GDALInfoOptions, METH_O, "new_GDALInfoOptions(char ** options) -> GDALInfoOptions"},
   68331             :    { "delete_GDALInfoOptions", _wrap_delete_GDALInfoOptions, METH_O, "delete_GDALInfoOptions(GDALInfoOptions self)"},
   68332             :    { "GDALInfoOptions_swigregister", GDALInfoOptions_swigregister, METH_O, NULL},
   68333             :    { "GDALInfoOptions_swiginit", GDALInfoOptions_swiginit, METH_VARARGS, NULL},
   68334             :    { "InfoInternal", _wrap_InfoInternal, METH_VARARGS, "InfoInternal(Dataset hDataset, GDALInfoOptions infoOptions) -> retStringAndCPLFree *"},
   68335             :    { "new_GDALVectorInfoOptions", _wrap_new_GDALVectorInfoOptions, METH_O, "new_GDALVectorInfoOptions(char ** options) -> GDALVectorInfoOptions"},
   68336             :    { "delete_GDALVectorInfoOptions", _wrap_delete_GDALVectorInfoOptions, METH_O, "delete_GDALVectorInfoOptions(GDALVectorInfoOptions self)"},
   68337             :    { "GDALVectorInfoOptions_swigregister", GDALVectorInfoOptions_swigregister, METH_O, NULL},
   68338             :    { "GDALVectorInfoOptions_swiginit", GDALVectorInfoOptions_swiginit, METH_VARARGS, NULL},
   68339             :    { "VectorInfoInternal", _wrap_VectorInfoInternal, METH_VARARGS, "VectorInfoInternal(Dataset hDataset, GDALVectorInfoOptions infoOptions) -> retStringAndCPLFree *"},
   68340             :    { "new_GDALMultiDimInfoOptions", _wrap_new_GDALMultiDimInfoOptions, METH_O, "new_GDALMultiDimInfoOptions(char ** options) -> GDALMultiDimInfoOptions"},
   68341             :    { "delete_GDALMultiDimInfoOptions", _wrap_delete_GDALMultiDimInfoOptions, METH_O, "delete_GDALMultiDimInfoOptions(GDALMultiDimInfoOptions self)"},
   68342             :    { "GDALMultiDimInfoOptions_swigregister", GDALMultiDimInfoOptions_swigregister, METH_O, NULL},
   68343             :    { "GDALMultiDimInfoOptions_swiginit", GDALMultiDimInfoOptions_swiginit, METH_VARARGS, NULL},
   68344             :    { "MultiDimInfoInternal", _wrap_MultiDimInfoInternal, METH_VARARGS, "MultiDimInfoInternal(Dataset hDataset, GDALMultiDimInfoOptions infoOptions) -> retStringAndCPLFree *"},
   68345             :    { "new_GDALTranslateOptions", _wrap_new_GDALTranslateOptions, METH_O, "new_GDALTranslateOptions(char ** options) -> GDALTranslateOptions"},
   68346             :    { "delete_GDALTranslateOptions", _wrap_delete_GDALTranslateOptions, METH_O, "delete_GDALTranslateOptions(GDALTranslateOptions self)"},
   68347             :    { "GDALTranslateOptions_swigregister", GDALTranslateOptions_swigregister, METH_O, NULL},
   68348             :    { "GDALTranslateOptions_swiginit", GDALTranslateOptions_swiginit, METH_VARARGS, NULL},
   68349             :    { "TranslateInternal", _wrap_TranslateInternal, METH_VARARGS, "TranslateInternal(char const * dest, Dataset dataset, GDALTranslateOptions translateOptions, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68350             :    { "new_GDALWarpAppOptions", _wrap_new_GDALWarpAppOptions, METH_O, "new_GDALWarpAppOptions(char ** options) -> GDALWarpAppOptions"},
   68351             :    { "delete_GDALWarpAppOptions", _wrap_delete_GDALWarpAppOptions, METH_O, "delete_GDALWarpAppOptions(GDALWarpAppOptions self)"},
   68352             :    { "GDALWarpAppOptions_swigregister", GDALWarpAppOptions_swigregister, METH_O, NULL},
   68353             :    { "GDALWarpAppOptions_swiginit", GDALWarpAppOptions_swiginit, METH_VARARGS, NULL},
   68354             :    { "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"},
   68355             :    { "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"},
   68356             :    { "new_GDALVectorTranslateOptions", _wrap_new_GDALVectorTranslateOptions, METH_O, "new_GDALVectorTranslateOptions(char ** options) -> GDALVectorTranslateOptions"},
   68357             :    { "delete_GDALVectorTranslateOptions", _wrap_delete_GDALVectorTranslateOptions, METH_O, "delete_GDALVectorTranslateOptions(GDALVectorTranslateOptions self)"},
   68358             :    { "GDALVectorTranslateOptions_swigregister", GDALVectorTranslateOptions_swigregister, METH_O, NULL},
   68359             :    { "GDALVectorTranslateOptions_swiginit", GDALVectorTranslateOptions_swiginit, METH_VARARGS, NULL},
   68360             :    { "wrapper_GDALVectorTranslateDestDS", _wrap_wrapper_GDALVectorTranslateDestDS, METH_VARARGS, "wrapper_GDALVectorTranslateDestDS(Dataset dstDS, Dataset srcDS, GDALVectorTranslateOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   68361             :    { "wrapper_GDALVectorTranslateDestName", _wrap_wrapper_GDALVectorTranslateDestName, METH_VARARGS, "wrapper_GDALVectorTranslateDestName(char const * dest, Dataset srcDS, GDALVectorTranslateOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68362             :    { "new_GDALDEMProcessingOptions", _wrap_new_GDALDEMProcessingOptions, METH_O, "new_GDALDEMProcessingOptions(char ** options) -> GDALDEMProcessingOptions"},
   68363             :    { "delete_GDALDEMProcessingOptions", _wrap_delete_GDALDEMProcessingOptions, METH_O, "delete_GDALDEMProcessingOptions(GDALDEMProcessingOptions self)"},
   68364             :    { "GDALDEMProcessingOptions_swigregister", GDALDEMProcessingOptions_swigregister, METH_O, NULL},
   68365             :    { "GDALDEMProcessingOptions_swiginit", GDALDEMProcessingOptions_swiginit, METH_VARARGS, NULL},
   68366             :    { "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"},
   68367             :    { "new_GDALNearblackOptions", _wrap_new_GDALNearblackOptions, METH_O, "new_GDALNearblackOptions(char ** options) -> GDALNearblackOptions"},
   68368             :    { "delete_GDALNearblackOptions", _wrap_delete_GDALNearblackOptions, METH_O, "delete_GDALNearblackOptions(GDALNearblackOptions self)"},
   68369             :    { "GDALNearblackOptions_swigregister", GDALNearblackOptions_swigregister, METH_O, NULL},
   68370             :    { "GDALNearblackOptions_swiginit", GDALNearblackOptions_swiginit, METH_VARARGS, NULL},
   68371             :    { "wrapper_GDALNearblackDestDS", _wrap_wrapper_GDALNearblackDestDS, METH_VARARGS, "wrapper_GDALNearblackDestDS(Dataset dstDS, Dataset srcDS, GDALNearblackOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   68372             :    { "wrapper_GDALNearblackDestName", _wrap_wrapper_GDALNearblackDestName, METH_VARARGS, "wrapper_GDALNearblackDestName(char const * dest, Dataset srcDS, GDALNearblackOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68373             :    { "new_GDALGridOptions", _wrap_new_GDALGridOptions, METH_O, "new_GDALGridOptions(char ** options) -> GDALGridOptions"},
   68374             :    { "delete_GDALGridOptions", _wrap_delete_GDALGridOptions, METH_O, "delete_GDALGridOptions(GDALGridOptions self)"},
   68375             :    { "GDALGridOptions_swigregister", GDALGridOptions_swigregister, METH_O, NULL},
   68376             :    { "GDALGridOptions_swiginit", GDALGridOptions_swiginit, METH_VARARGS, NULL},
   68377             :    { "GridInternal", _wrap_GridInternal, METH_VARARGS, "GridInternal(char const * dest, Dataset dataset, GDALGridOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68378             :    { "new_GDALContourOptions", _wrap_new_GDALContourOptions, METH_O, "new_GDALContourOptions(char ** options) -> GDALContourOptions"},
   68379             :    { "delete_GDALContourOptions", _wrap_delete_GDALContourOptions, METH_O, "delete_GDALContourOptions(GDALContourOptions self)"},
   68380             :    { "GDALContourOptions_swigregister", GDALContourOptions_swigregister, METH_O, NULL},
   68381             :    { "GDALContourOptions_swiginit", GDALContourOptions_swiginit, METH_VARARGS, NULL},
   68382             :    { "wrapper_GDALContourDestDS", _wrap_wrapper_GDALContourDestDS, METH_VARARGS, "wrapper_GDALContourDestDS(Dataset dstDS, Dataset srcDS, GDALContourOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   68383             :    { "wrapper_GDALContourDestName", _wrap_wrapper_GDALContourDestName, METH_VARARGS, "wrapper_GDALContourDestName(char const * dest, Dataset srcDS, GDALContourOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68384             :    { "new_GDALRasterizeOptions", _wrap_new_GDALRasterizeOptions, METH_O, "new_GDALRasterizeOptions(char ** options) -> GDALRasterizeOptions"},
   68385             :    { "delete_GDALRasterizeOptions", _wrap_delete_GDALRasterizeOptions, METH_O, "delete_GDALRasterizeOptions(GDALRasterizeOptions self)"},
   68386             :    { "GDALRasterizeOptions_swigregister", GDALRasterizeOptions_swigregister, METH_O, NULL},
   68387             :    { "GDALRasterizeOptions_swiginit", GDALRasterizeOptions_swiginit, METH_VARARGS, NULL},
   68388             :    { "wrapper_GDALRasterizeDestDS", _wrap_wrapper_GDALRasterizeDestDS, METH_VARARGS, "wrapper_GDALRasterizeDestDS(Dataset dstDS, Dataset srcDS, GDALRasterizeOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   68389             :    { "wrapper_GDALRasterizeDestName", _wrap_wrapper_GDALRasterizeDestName, METH_VARARGS, "wrapper_GDALRasterizeDestName(char const * dest, Dataset srcDS, GDALRasterizeOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68390             :    { "new_GDALFootprintOptions", _wrap_new_GDALFootprintOptions, METH_O, "new_GDALFootprintOptions(char ** options) -> GDALFootprintOptions"},
   68391             :    { "delete_GDALFootprintOptions", _wrap_delete_GDALFootprintOptions, METH_O, "delete_GDALFootprintOptions(GDALFootprintOptions self)"},
   68392             :    { "GDALFootprintOptions_swigregister", GDALFootprintOptions_swigregister, METH_O, NULL},
   68393             :    { "GDALFootprintOptions_swiginit", GDALFootprintOptions_swiginit, METH_VARARGS, NULL},
   68394             :    { "wrapper_GDALFootprintDestDS", _wrap_wrapper_GDALFootprintDestDS, METH_VARARGS, "wrapper_GDALFootprintDestDS(Dataset dstDS, Dataset srcDS, GDALFootprintOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   68395             :    { "wrapper_GDALFootprintDestName", _wrap_wrapper_GDALFootprintDestName, METH_VARARGS, "wrapper_GDALFootprintDestName(char const * dest, Dataset srcDS, GDALFootprintOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68396             :    { "new_GDALBuildVRTOptions", _wrap_new_GDALBuildVRTOptions, METH_O, "new_GDALBuildVRTOptions(char ** options) -> GDALBuildVRTOptions"},
   68397             :    { "delete_GDALBuildVRTOptions", _wrap_delete_GDALBuildVRTOptions, METH_O, "delete_GDALBuildVRTOptions(GDALBuildVRTOptions self)"},
   68398             :    { "GDALBuildVRTOptions_swigregister", GDALBuildVRTOptions_swigregister, METH_O, NULL},
   68399             :    { "GDALBuildVRTOptions_swiginit", GDALBuildVRTOptions_swiginit, METH_VARARGS, NULL},
   68400             :    { "BuildVRTInternalObjects", _wrap_BuildVRTInternalObjects, METH_VARARGS, "BuildVRTInternalObjects(char const * dest, int object_list_count, GDALBuildVRTOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68401             :    { "BuildVRTInternalNames", _wrap_BuildVRTInternalNames, METH_VARARGS, "BuildVRTInternalNames(char const * dest, char ** source_filenames, GDALBuildVRTOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68402             :    { "new_GDALTileIndexOptions", _wrap_new_GDALTileIndexOptions, METH_O, "new_GDALTileIndexOptions(char ** options) -> GDALTileIndexOptions"},
   68403             :    { "delete_GDALTileIndexOptions", _wrap_delete_GDALTileIndexOptions, METH_O, "delete_GDALTileIndexOptions(GDALTileIndexOptions self)"},
   68404             :    { "GDALTileIndexOptions_swigregister", GDALTileIndexOptions_swigregister, METH_O, NULL},
   68405             :    { "GDALTileIndexOptions_swiginit", GDALTileIndexOptions_swiginit, METH_VARARGS, NULL},
   68406             :    { "TileIndexInternalNames", _wrap_TileIndexInternalNames, METH_VARARGS, "TileIndexInternalNames(char const * dest, char ** source_filenames, GDALTileIndexOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   68407             :    { "new_GDALMultiDimTranslateOptions", _wrap_new_GDALMultiDimTranslateOptions, METH_O, "new_GDALMultiDimTranslateOptions(char ** options) -> GDALMultiDimTranslateOptions"},
   68408             :    { "delete_GDALMultiDimTranslateOptions", _wrap_delete_GDALMultiDimTranslateOptions, METH_O, "delete_GDALMultiDimTranslateOptions(GDALMultiDimTranslateOptions self)"},
   68409             :    { "GDALMultiDimTranslateOptions_swigregister", GDALMultiDimTranslateOptions_swigregister, METH_O, NULL},
   68410             :    { "GDALMultiDimTranslateOptions_swiginit", GDALMultiDimTranslateOptions_swiginit, METH_VARARGS, NULL},
   68411             :    { "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"},
   68412             :    { NULL, NULL, 0, NULL }
   68413             : };
   68414             : 
   68415             : static PyMethodDef SwigMethods_proxydocs[] = {
   68416             :    { NULL, NULL, 0, NULL }
   68417             : };
   68418             : 
   68419             : 
   68420             : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
   68421             : 
   68422           0 : static void *_p_p_GDALComputedRasterBandShadowTo_p_p_GDALRasterBandShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   68423           0 :     return (void *)((GDALRasterBandShadow **)  ((GDALComputedRasterBandShadow **) x));
   68424             : }
   68425         193 : static void *_p_GDALComputedRasterBandShadowTo_p_GDALRasterBandShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   68426         193 :     return (void *)((GDALRasterBandShadow *)  ((GDALComputedRasterBandShadow *) x));
   68427             : }
   68428       54967 : static void *_p_GDALDriverShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   68429       54967 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDriverShadow *) x));
   68430             : }
   68431         967 : static void *_p_OGRLayerShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   68432         967 :     return (void *)((GDALMajorObjectShadow *)  ((OGRLayerShadow *) x));
   68433             : }
   68434        6449 : static void *_p_GDALDatasetShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   68435        6449 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDatasetShadow *) x));
   68436             : }
   68437        6689 : static void *_p_GDALRasterBandShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   68438        6689 :     return (void *)((GDALMajorObjectShadow *)  ((GDALRasterBandShadow *) x));
   68439             : }
   68440           0 : static void *_p_GDALComputedRasterBandShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   68441           0 :     return (void *)((GDALMajorObjectShadow *) (GDALRasterBandShadow *) ((GDALComputedRasterBandShadow *) x));
   68442             : }
   68443             : static swig_type_info _swigt__p_CPLErrorHandler = {"_p_CPLErrorHandler", "CPLErrorHandler *", 0, 0, (void*)0, 0};
   68444             : static swig_type_info _swigt__p_CPLVirtualMemShadow = {"_p_CPLVirtualMemShadow", "CPLVirtualMemShadow *", 0, 0, (void*)0, 0};
   68445             : static swig_type_info _swigt__p_CPLXMLNode = {"_p_CPLXMLNode", "CPLXMLNode *", 0, 0, (void*)0, 0};
   68446             : static swig_type_info _swigt__p_DirEntry = {"_p_DirEntry", "DirEntry *", 0, 0, (void*)0, 0};
   68447             : static swig_type_info _swigt__p_GByte = {"_p_GByte", "GByte *", 0, 0, (void*)0, 0};
   68448             : static swig_type_info _swigt__p_GDALAlgorithmArgHS = {"_p_GDALAlgorithmArgHS", "GDALAlgorithmArgHS *", 0, 0, (void*)0, 0};
   68449             : static swig_type_info _swigt__p_GDALAlgorithmHS = {"_p_GDALAlgorithmHS", "GDALAlgorithmHS *", 0, 0, (void*)0, 0};
   68450             : static swig_type_info _swigt__p_GDALAlgorithmRegistryHS = {"_p_GDALAlgorithmRegistryHS", "GDALAlgorithmRegistryHS *", 0, 0, (void*)0, 0};
   68451             : static swig_type_info _swigt__p_GDALArgDatasetValueHS = {"_p_GDALArgDatasetValueHS", "GDALArgDatasetValueHS *", 0, 0, (void*)0, 0};
   68452             : static swig_type_info _swigt__p_GDALAsyncReaderShadow = {"_p_GDALAsyncReaderShadow", "GDALAsyncReaderShadow *", 0, 0, (void*)0, 0};
   68453             : static swig_type_info _swigt__p_GDALAttributeHS = {"_p_GDALAttributeHS", "GDALAttributeHS *", 0, 0, (void*)0, 0};
   68454             : static swig_type_info _swigt__p_GDALBuildVRTOptions = {"_p_GDALBuildVRTOptions", "GDALBuildVRTOptions *", 0, 0, (void*)0, 0};
   68455             : static swig_type_info _swigt__p_GDALColorEntry = {"_p_GDALColorEntry", "GDALColorEntry *", 0, 0, (void*)0, 0};
   68456             : static swig_type_info _swigt__p_GDALColorTableShadow = {"_p_GDALColorTableShadow", "GDALColorTableShadow *", 0, 0, (void*)0, 0};
   68457             : static swig_type_info _swigt__p_GDALComputedRasterBandShadow = {"_p_GDALComputedRasterBandShadow", "GDALComputedRasterBandShadow *", 0, 0, (void*)0, 0};
   68458             : static swig_type_info _swigt__p_GDALContourOptions = {"_p_GDALContourOptions", "GDALContourOptions *", 0, 0, (void*)0, 0};
   68459             : static swig_type_info _swigt__p_GDALDEMProcessingOptions = {"_p_GDALDEMProcessingOptions", "GDALDEMProcessingOptions *", 0, 0, (void*)0, 0};
   68460             : static swig_type_info _swigt__p_GDALDatasetShadow = {"_p_GDALDatasetShadow", "GDALDatasetShadow *", 0, 0, (void*)0, 0};
   68461             : static swig_type_info _swigt__p_GDALDimensionHS = {"_p_GDALDimensionHS", "GDALDimensionHS *", 0, 0, (void*)0, 0};
   68462             : static swig_type_info _swigt__p_GDALDriverShadow = {"_p_GDALDriverShadow", "GDALDriverShadow *", 0, 0, (void*)0, 0};
   68463             : static swig_type_info _swigt__p_GDALEDTComponentHS = {"_p_GDALEDTComponentHS", "GDALEDTComponentHS *", 0, 0, (void*)0, 0};
   68464             : static swig_type_info _swigt__p_GDALExtendedDataTypeClass = {"_p_GDALExtendedDataTypeClass", "enum GDALExtendedDataTypeClass *|GDALExtendedDataTypeClass *", 0, 0, (void*)0, 0};
   68465             : static swig_type_info _swigt__p_GDALExtendedDataTypeHS = {"_p_GDALExtendedDataTypeHS", "GDALExtendedDataTypeHS *", 0, 0, (void*)0, 0};
   68466             : static swig_type_info _swigt__p_GDALExtendedDataTypeSubType = {"_p_GDALExtendedDataTypeSubType", "enum GDALExtendedDataTypeSubType *|GDALExtendedDataTypeSubType *", 0, 0, (void*)0, 0};
   68467             : static swig_type_info _swigt__p_GDALFootprintOptions = {"_p_GDALFootprintOptions", "GDALFootprintOptions *", 0, 0, (void*)0, 0};
   68468             : static swig_type_info _swigt__p_GDALGridOptions = {"_p_GDALGridOptions", "GDALGridOptions *", 0, 0, (void*)0, 0};
   68469             : static swig_type_info _swigt__p_GDALGroupHS = {"_p_GDALGroupHS", "GDALGroupHS *", 0, 0, (void*)0, 0};
   68470             : static swig_type_info _swigt__p_GDALInfoOptions = {"_p_GDALInfoOptions", "GDALInfoOptions *", 0, 0, (void*)0, 0};
   68471             : static swig_type_info _swigt__p_GDALMDArrayHS = {"_p_GDALMDArrayHS", "GDALMDArrayHS *", 0, 0, (void*)0, 0};
   68472             : static swig_type_info _swigt__p_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, (void*)0, 0};
   68473             : static swig_type_info _swigt__p_GDALMultiDimInfoOptions = {"_p_GDALMultiDimInfoOptions", "GDALMultiDimInfoOptions *", 0, 0, (void*)0, 0};
   68474             : static swig_type_info _swigt__p_GDALMultiDimTranslateOptions = {"_p_GDALMultiDimTranslateOptions", "GDALMultiDimTranslateOptions *", 0, 0, (void*)0, 0};
   68475             : static swig_type_info _swigt__p_GDALNearblackOptions = {"_p_GDALNearblackOptions", "GDALNearblackOptions *", 0, 0, (void*)0, 0};
   68476             : static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
   68477             : static swig_type_info _swigt__p_GDALRasterAlgebraBinaryOperation = {"_p_GDALRasterAlgebraBinaryOperation", "enum GDALRasterAlgebraBinaryOperation *|GDALRasterAlgebraBinaryOperation *", 0, 0, (void*)0, 0};
   68478             : static swig_type_info _swigt__p_GDALRasterAlgebraUnaryOperation = {"_p_GDALRasterAlgebraUnaryOperation", "enum GDALRasterAlgebraUnaryOperation *|GDALRasterAlgebraUnaryOperation *", 0, 0, (void*)0, 0};
   68479             : static swig_type_info _swigt__p_GDALRasterAttributeTableShadow = {"_p_GDALRasterAttributeTableShadow", "GDALRasterAttributeTableShadow *", 0, 0, (void*)0, 0};
   68480             : static swig_type_info _swigt__p_GDALRasterBandShadow = {"_p_GDALRasterBandShadow", "GDALRasterBandShadow *", 0, 0, (void*)0, 0};
   68481             : static swig_type_info _swigt__p_GDALRasterizeOptions = {"_p_GDALRasterizeOptions", "GDALRasterizeOptions *", 0, 0, (void*)0, 0};
   68482             : static swig_type_info _swigt__p_GDALRelationshipShadow = {"_p_GDALRelationshipShadow", "GDALRelationshipShadow *", 0, 0, (void*)0, 0};
   68483             : static swig_type_info _swigt__p_GDALSubdatasetInfo = {"_p_GDALSubdatasetInfo", "GDALSubdatasetInfo *|GDALSubdatasetInfoShadow *", 0, 0, (void*)0, 0};
   68484             : static swig_type_info _swigt__p_GDALTileIndexOptions = {"_p_GDALTileIndexOptions", "GDALTileIndexOptions *", 0, 0, (void*)0, 0};
   68485             : static swig_type_info _swigt__p_GDALTransformerInfoShadow = {"_p_GDALTransformerInfoShadow", "GDALTransformerInfoShadow *", 0, 0, (void*)0, 0};
   68486             : static swig_type_info _swigt__p_GDALTranslateOptions = {"_p_GDALTranslateOptions", "GDALTranslateOptions *", 0, 0, (void*)0, 0};
   68487             : static swig_type_info _swigt__p_GDALVectorInfoOptions = {"_p_GDALVectorInfoOptions", "GDALVectorInfoOptions *", 0, 0, (void*)0, 0};
   68488             : static swig_type_info _swigt__p_GDALVectorTranslateOptions = {"_p_GDALVectorTranslateOptions", "GDALVectorTranslateOptions *", 0, 0, (void*)0, 0};
   68489             : static swig_type_info _swigt__p_GDALViewshedMode = {"_p_GDALViewshedMode", "enum GDALViewshedMode *|GDALViewshedMode *", 0, 0, (void*)0, 0};
   68490             : static swig_type_info _swigt__p_GDALViewshedOutputType = {"_p_GDALViewshedOutputType", "enum GDALViewshedOutputType *|GDALViewshedOutputType *", 0, 0, (void*)0, 0};
   68491             : static swig_type_info _swigt__p_GDALWarpAppOptions = {"_p_GDALWarpAppOptions", "GDALWarpAppOptions *", 0, 0, (void*)0, 0};
   68492             : static swig_type_info _swigt__p_GDAL_GCP = {"_p_GDAL_GCP", "GDAL_GCP *", 0, 0, (void*)0, 0};
   68493             : static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
   68494             : static swig_type_info _swigt__p_GUIntBig = {"_p_GUIntBig", "GUIntBig *", 0, 0, (void*)0, 0};
   68495             : static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
   68496             : static swig_type_info _swigt__p_OGRFieldDomainShadow = {"_p_OGRFieldDomainShadow", "OGRFieldDomainShadow *", 0, 0, (void*)0, 0};
   68497             : static swig_type_info _swigt__p_OGRGeomFieldDefnShadow = {"_p_OGRGeomFieldDefnShadow", "OGRGeomFieldDefnShadow *", 0, 0, (void*)0, 0};
   68498             : static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)0, 0};
   68499             : static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
   68500             : static swig_type_info _swigt__p_OGRStyleTableShadow = {"_p_OGRStyleTableShadow", "OGRStyleTableShadow *", 0, 0, (void*)0, 0};
   68501             : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
   68502             : static swig_type_info _swigt__p_StatBuf = {"_p_StatBuf", "StatBuf *", 0, 0, (void*)0, 0};
   68503             : static swig_type_info _swigt__p_Statistics = {"_p_Statistics", "Statistics *", 0, 0, (void*)0, 0};
   68504             : static swig_type_info _swigt__p_SuggestedWarpOutputRes = {"_p_SuggestedWarpOutputRes", "SuggestedWarpOutputRes *", 0, 0, (void*)0, 0};
   68505             : static swig_type_info _swigt__p_VSIDIR = {"_p_VSIDIR", "VSIDIR *", 0, 0, (void*)0, 0};
   68506             : static swig_type_info _swigt__p_VSILFILE = {"_p_VSILFILE", "VSILFILE *", 0, 0, (void*)0, 0};
   68507             : static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0};
   68508             : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
   68509             : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
   68510             : 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};
   68511             : 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};
   68512             : static swig_type_info _swigt__p_long_long = {"_p_long_long", "long long *", 0, 0, (void*)0, 0};
   68513             : static swig_type_info _swigt__p_p_GByte = {"_p_p_GByte", "GByte **", 0, 0, (void*)0, 0};
   68514             : static swig_type_info _swigt__p_p_GDALDatasetShadow = {"_p_p_GDALDatasetShadow", "GDALDatasetShadow **", 0, 0, (void*)0, 0};
   68515             : static swig_type_info _swigt__p_p_GDALDimensionHS = {"_p_p_GDALDimensionHS", "GDALDimensionHS **", 0, 0, (void*)0, 0};
   68516             : static swig_type_info _swigt__p_p_GDALEDTComponentHS = {"_p_p_GDALEDTComponentHS", "GDALEDTComponentHS **", 0, 0, (void*)0, 0};
   68517             : static swig_type_info _swigt__p_p_GDALMDArrayHS = {"_p_p_GDALMDArrayHS", "GDALMDArrayHS **", 0, 0, (void*)0, 0};
   68518             : static swig_type_info _swigt__p_p_GDALRasterBandShadow = {"_p_p_GDALRasterBandShadow", "GDALRasterBandShadow **", 0, 0, (void*)0, 0};
   68519             : static swig_type_info _swigt__p_p_GDALComputedRasterBandShadow = {"_p_p_GDALComputedRasterBandShadow", 0, 0, 0, 0, 0};
   68520             : static swig_type_info _swigt__p_p_GDAL_GCP = {"_p_p_GDAL_GCP", "GDAL_GCP **", 0, 0, (void*)0, 0};
   68521             : static swig_type_info _swigt__p_p_GUIntBig = {"_p_p_GUIntBig", "GUIntBig **", 0, 0, (void*)0, 0};
   68522             : static swig_type_info _swigt__p_p_OGRLayerShadow = {"_p_p_OGRLayerShadow", "OGRLayerShadow **", 0, 0, (void*)0, 0};
   68523             : static swig_type_info _swigt__p_p_OSRSpatialReferenceShadow = {"_p_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow **", 0, 0, (void*)0, 0};
   68524             : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
   68525             : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
   68526             : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
   68527             : static swig_type_info _swigt__p_p_long_long = {"_p_p_long_long", "long long **", 0, 0, (void*)0, 0};
   68528             : static swig_type_info _swigt__p_p_p_GDALAttributeHS = {"_p_p_p_GDALAttributeHS", "GDALAttributeHS ***", 0, 0, (void*)0, 0};
   68529             : static swig_type_info _swigt__p_p_p_GDALDimensionHS = {"_p_p_p_GDALDimensionHS", "GDALDimensionHS ***", 0, 0, (void*)0, 0};
   68530             : static swig_type_info _swigt__p_p_p_GDALEDTComponentHS = {"_p_p_p_GDALEDTComponentHS", "GDALEDTComponentHS ***", 0, 0, (void*)0, 0};
   68531             : static swig_type_info _swigt__p_p_p_GDALMDArrayHS = {"_p_p_p_GDALMDArrayHS", "GDALMDArrayHS ***", 0, 0, (void*)0, 0};
   68532             : static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
   68533             : static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
   68534             : static swig_type_info _swigt__p_vsi_l_offset = {"_p_vsi_l_offset", "vsi_l_offset *", 0, 0, (void*)0, 0};
   68535             : 
   68536             : static swig_type_info *swig_type_initial[] = {
   68537             :   &_swigt__p_CPLErrorHandler,
   68538             :   &_swigt__p_CPLVirtualMemShadow,
   68539             :   &_swigt__p_CPLXMLNode,
   68540             :   &_swigt__p_DirEntry,
   68541             :   &_swigt__p_GByte,
   68542             :   &_swigt__p_GDALAlgorithmArgHS,
   68543             :   &_swigt__p_GDALAlgorithmHS,
   68544             :   &_swigt__p_GDALAlgorithmRegistryHS,
   68545             :   &_swigt__p_GDALArgDatasetValueHS,
   68546             :   &_swigt__p_GDALAsyncReaderShadow,
   68547             :   &_swigt__p_GDALAttributeHS,
   68548             :   &_swigt__p_GDALBuildVRTOptions,
   68549             :   &_swigt__p_GDALColorEntry,
   68550             :   &_swigt__p_GDALColorTableShadow,
   68551             :   &_swigt__p_GDALComputedRasterBandShadow,
   68552             :   &_swigt__p_GDALContourOptions,
   68553             :   &_swigt__p_GDALDEMProcessingOptions,
   68554             :   &_swigt__p_GDALDatasetShadow,
   68555             :   &_swigt__p_GDALDimensionHS,
   68556             :   &_swigt__p_GDALDriverShadow,
   68557             :   &_swigt__p_GDALEDTComponentHS,
   68558             :   &_swigt__p_GDALExtendedDataTypeClass,
   68559             :   &_swigt__p_GDALExtendedDataTypeHS,
   68560             :   &_swigt__p_GDALExtendedDataTypeSubType,
   68561             :   &_swigt__p_GDALFootprintOptions,
   68562             :   &_swigt__p_GDALGridOptions,
   68563             :   &_swigt__p_GDALGroupHS,
   68564             :   &_swigt__p_GDALInfoOptions,
   68565             :   &_swigt__p_GDALMDArrayHS,
   68566             :   &_swigt__p_GDALMajorObjectShadow,
   68567             :   &_swigt__p_GDALMultiDimInfoOptions,
   68568             :   &_swigt__p_GDALMultiDimTranslateOptions,
   68569             :   &_swigt__p_GDALNearblackOptions,
   68570             :   &_swigt__p_GDALProgressFunc,
   68571             :   &_swigt__p_GDALRasterAlgebraBinaryOperation,
   68572             :   &_swigt__p_GDALRasterAlgebraUnaryOperation,
   68573             :   &_swigt__p_GDALRasterAttributeTableShadow,
   68574             :   &_swigt__p_GDALRasterBandShadow,
   68575             :   &_swigt__p_GDALRasterizeOptions,
   68576             :   &_swigt__p_GDALRelationshipShadow,
   68577             :   &_swigt__p_GDALSubdatasetInfo,
   68578             :   &_swigt__p_GDALTileIndexOptions,
   68579             :   &_swigt__p_GDALTransformerInfoShadow,
   68580             :   &_swigt__p_GDALTranslateOptions,
   68581             :   &_swigt__p_GDALVectorInfoOptions,
   68582             :   &_swigt__p_GDALVectorTranslateOptions,
   68583             :   &_swigt__p_GDALViewshedMode,
   68584             :   &_swigt__p_GDALViewshedOutputType,
   68585             :   &_swigt__p_GDALWarpAppOptions,
   68586             :   &_swigt__p_GDAL_GCP,
   68587             :   &_swigt__p_GIntBig,
   68588             :   &_swigt__p_GUIntBig,
   68589             :   &_swigt__p_OGRFeatureShadow,
   68590             :   &_swigt__p_OGRFieldDomainShadow,
   68591             :   &_swigt__p_OGRGeomFieldDefnShadow,
   68592             :   &_swigt__p_OGRGeometryShadow,
   68593             :   &_swigt__p_OGRLayerShadow,
   68594             :   &_swigt__p_OGRStyleTableShadow,
   68595             :   &_swigt__p_OSRSpatialReferenceShadow,
   68596             :   &_swigt__p_StatBuf,
   68597             :   &_swigt__p_Statistics,
   68598             :   &_swigt__p_SuggestedWarpOutputRes,
   68599             :   &_swigt__p_VSIDIR,
   68600             :   &_swigt__p_VSILFILE,
   68601             :   &_swigt__p_bool,
   68602             :   &_swigt__p_char,
   68603             :   &_swigt__p_double,
   68604             :   &_swigt__p_f_double_p_q_const__char_p_void__int,
   68605             :   &_swigt__p_int,
   68606             :   &_swigt__p_long_long,
   68607             :   &_swigt__p_p_GByte,
   68608             :   &_swigt__p_p_GDALComputedRasterBandShadow,
   68609             :   &_swigt__p_p_GDALDatasetShadow,
   68610             :   &_swigt__p_p_GDALDimensionHS,
   68611             :   &_swigt__p_p_GDALEDTComponentHS,
   68612             :   &_swigt__p_p_GDALMDArrayHS,
   68613             :   &_swigt__p_p_GDALRasterBandShadow,
   68614             :   &_swigt__p_p_GDAL_GCP,
   68615             :   &_swigt__p_p_GUIntBig,
   68616             :   &_swigt__p_p_OGRLayerShadow,
   68617             :   &_swigt__p_p_OSRSpatialReferenceShadow,
   68618             :   &_swigt__p_p_char,
   68619             :   &_swigt__p_p_double,
   68620             :   &_swigt__p_p_int,
   68621             :   &_swigt__p_p_long_long,
   68622             :   &_swigt__p_p_p_GDALAttributeHS,
   68623             :   &_swigt__p_p_p_GDALDimensionHS,
   68624             :   &_swigt__p_p_p_GDALEDTComponentHS,
   68625             :   &_swigt__p_p_p_GDALMDArrayHS,
   68626             :   &_swigt__p_p_void,
   68627             :   &_swigt__p_size_t,
   68628             :   &_swigt__p_vsi_l_offset,
   68629             : };
   68630             : 
   68631             : static swig_cast_info _swigc__p_CPLErrorHandler[] = {  {&_swigt__p_CPLErrorHandler, 0, 0, 0},{0, 0, 0, 0}};
   68632             : static swig_cast_info _swigc__p_CPLVirtualMemShadow[] = {  {&_swigt__p_CPLVirtualMemShadow, 0, 0, 0},{0, 0, 0, 0}};
   68633             : static swig_cast_info _swigc__p_CPLXMLNode[] = {  {&_swigt__p_CPLXMLNode, 0, 0, 0},{0, 0, 0, 0}};
   68634             : static swig_cast_info _swigc__p_DirEntry[] = {  {&_swigt__p_DirEntry, 0, 0, 0},{0, 0, 0, 0}};
   68635             : static swig_cast_info _swigc__p_GByte[] = {  {&_swigt__p_GByte, 0, 0, 0},{0, 0, 0, 0}};
   68636             : static swig_cast_info _swigc__p_GDALAlgorithmArgHS[] = {  {&_swigt__p_GDALAlgorithmArgHS, 0, 0, 0},{0, 0, 0, 0}};
   68637             : static swig_cast_info _swigc__p_GDALAlgorithmHS[] = {  {&_swigt__p_GDALAlgorithmHS, 0, 0, 0},{0, 0, 0, 0}};
   68638             : static swig_cast_info _swigc__p_GDALAlgorithmRegistryHS[] = {  {&_swigt__p_GDALAlgorithmRegistryHS, 0, 0, 0},{0, 0, 0, 0}};
   68639             : static swig_cast_info _swigc__p_GDALArgDatasetValueHS[] = {  {&_swigt__p_GDALArgDatasetValueHS, 0, 0, 0},{0, 0, 0, 0}};
   68640             : static swig_cast_info _swigc__p_GDALAsyncReaderShadow[] = {  {&_swigt__p_GDALAsyncReaderShadow, 0, 0, 0},{0, 0, 0, 0}};
   68641             : static swig_cast_info _swigc__p_GDALAttributeHS[] = {  {&_swigt__p_GDALAttributeHS, 0, 0, 0},{0, 0, 0, 0}};
   68642             : static swig_cast_info _swigc__p_GDALBuildVRTOptions[] = {  {&_swigt__p_GDALBuildVRTOptions, 0, 0, 0},{0, 0, 0, 0}};
   68643             : static swig_cast_info _swigc__p_GDALColorEntry[] = {  {&_swigt__p_GDALColorEntry, 0, 0, 0},{0, 0, 0, 0}};
   68644             : static swig_cast_info _swigc__p_GDALColorTableShadow[] = {  {&_swigt__p_GDALColorTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   68645             : static swig_cast_info _swigc__p_GDALComputedRasterBandShadow[] = {  {&_swigt__p_GDALComputedRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   68646             : static swig_cast_info _swigc__p_GDALContourOptions[] = {  {&_swigt__p_GDALContourOptions, 0, 0, 0},{0, 0, 0, 0}};
   68647             : static swig_cast_info _swigc__p_GDALDEMProcessingOptions[] = {  {&_swigt__p_GDALDEMProcessingOptions, 0, 0, 0},{0, 0, 0, 0}};
   68648             : static swig_cast_info _swigc__p_GDALDatasetShadow[] = {  {&_swigt__p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
   68649             : static swig_cast_info _swigc__p_GDALDimensionHS[] = {  {&_swigt__p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   68650             : static swig_cast_info _swigc__p_GDALDriverShadow[] = {  {&_swigt__p_GDALDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
   68651             : static swig_cast_info _swigc__p_GDALEDTComponentHS[] = {  {&_swigt__p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   68652             : static swig_cast_info _swigc__p_GDALExtendedDataTypeClass[] = {  {&_swigt__p_GDALExtendedDataTypeClass, 0, 0, 0},{0, 0, 0, 0}};
   68653             : static swig_cast_info _swigc__p_GDALExtendedDataTypeHS[] = {  {&_swigt__p_GDALExtendedDataTypeHS, 0, 0, 0},{0, 0, 0, 0}};
   68654             : static swig_cast_info _swigc__p_GDALExtendedDataTypeSubType[] = {  {&_swigt__p_GDALExtendedDataTypeSubType, 0, 0, 0},{0, 0, 0, 0}};
   68655             : static swig_cast_info _swigc__p_GDALFootprintOptions[] = {  {&_swigt__p_GDALFootprintOptions, 0, 0, 0},{0, 0, 0, 0}};
   68656             : static swig_cast_info _swigc__p_GDALGridOptions[] = {  {&_swigt__p_GDALGridOptions, 0, 0, 0},{0, 0, 0, 0}};
   68657             : static swig_cast_info _swigc__p_GDALGroupHS[] = {  {&_swigt__p_GDALGroupHS, 0, 0, 0},{0, 0, 0, 0}};
   68658             : static swig_cast_info _swigc__p_GDALInfoOptions[] = {  {&_swigt__p_GDALInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   68659             : static swig_cast_info _swigc__p_GDALMDArrayHS[] = {  {&_swigt__p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   68660             : 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},  {&_swigt__p_GDALComputedRasterBandShadow, _p_GDALComputedRasterBandShadowTo_p_GDALMajorObjectShadow, 0, 0},{0, 0, 0, 0}};
   68661             : static swig_cast_info _swigc__p_GDALMultiDimInfoOptions[] = {  {&_swigt__p_GDALMultiDimInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   68662             : static swig_cast_info _swigc__p_GDALMultiDimTranslateOptions[] = {  {&_swigt__p_GDALMultiDimTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   68663             : static swig_cast_info _swigc__p_GDALNearblackOptions[] = {  {&_swigt__p_GDALNearblackOptions, 0, 0, 0},{0, 0, 0, 0}};
   68664             : static swig_cast_info _swigc__p_GDALProgressFunc[] = {  {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
   68665             : static swig_cast_info _swigc__p_GDALRasterAlgebraBinaryOperation[] = {  {&_swigt__p_GDALRasterAlgebraBinaryOperation, 0, 0, 0},{0, 0, 0, 0}};
   68666             : static swig_cast_info _swigc__p_GDALRasterAlgebraUnaryOperation[] = {  {&_swigt__p_GDALRasterAlgebraUnaryOperation, 0, 0, 0},{0, 0, 0, 0}};
   68667             : static swig_cast_info _swigc__p_GDALRasterAttributeTableShadow[] = {  {&_swigt__p_GDALRasterAttributeTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   68668             : static swig_cast_info _swigc__p_GDALRasterBandShadow[] = {  {&_swigt__p_GDALRasterBandShadow, 0, 0, 0},  {&_swigt__p_GDALComputedRasterBandShadow, _p_GDALComputedRasterBandShadowTo_p_GDALRasterBandShadow, 0, 0},{0, 0, 0, 0}};
   68669             : static swig_cast_info _swigc__p_GDALRasterizeOptions[] = {  {&_swigt__p_GDALRasterizeOptions, 0, 0, 0},{0, 0, 0, 0}};
   68670             : static swig_cast_info _swigc__p_GDALRelationshipShadow[] = {  {&_swigt__p_GDALRelationshipShadow, 0, 0, 0},{0, 0, 0, 0}};
   68671             : static swig_cast_info _swigc__p_GDALSubdatasetInfo[] = {  {&_swigt__p_GDALSubdatasetInfo, 0, 0, 0},{0, 0, 0, 0}};
   68672             : static swig_cast_info _swigc__p_GDALTileIndexOptions[] = {  {&_swigt__p_GDALTileIndexOptions, 0, 0, 0},{0, 0, 0, 0}};
   68673             : static swig_cast_info _swigc__p_GDALTransformerInfoShadow[] = {  {&_swigt__p_GDALTransformerInfoShadow, 0, 0, 0},{0, 0, 0, 0}};
   68674             : static swig_cast_info _swigc__p_GDALTranslateOptions[] = {  {&_swigt__p_GDALTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   68675             : static swig_cast_info _swigc__p_GDALVectorInfoOptions[] = {  {&_swigt__p_GDALVectorInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   68676             : static swig_cast_info _swigc__p_GDALVectorTranslateOptions[] = {  {&_swigt__p_GDALVectorTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   68677             : static swig_cast_info _swigc__p_GDALViewshedMode[] = {  {&_swigt__p_GDALViewshedMode, 0, 0, 0},{0, 0, 0, 0}};
   68678             : static swig_cast_info _swigc__p_GDALViewshedOutputType[] = {  {&_swigt__p_GDALViewshedOutputType, 0, 0, 0},{0, 0, 0, 0}};
   68679             : static swig_cast_info _swigc__p_GDALWarpAppOptions[] = {  {&_swigt__p_GDALWarpAppOptions, 0, 0, 0},{0, 0, 0, 0}};
   68680             : static swig_cast_info _swigc__p_GDAL_GCP[] = {  {&_swigt__p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   68681             : static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
   68682             : static swig_cast_info _swigc__p_GUIntBig[] = {  {&_swigt__p_GUIntBig, 0, 0, 0},{0, 0, 0, 0}};
   68683             : static swig_cast_info _swigc__p_OGRFeatureShadow[] = {  {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
   68684             : static swig_cast_info _swigc__p_OGRFieldDomainShadow[] = {  {&_swigt__p_OGRFieldDomainShadow, 0, 0, 0},{0, 0, 0, 0}};
   68685             : static swig_cast_info _swigc__p_OGRGeomFieldDefnShadow[] = {  {&_swigt__p_OGRGeomFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
   68686             : static swig_cast_info _swigc__p_OGRGeometryShadow[] = {  {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
   68687             : static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   68688             : static swig_cast_info _swigc__p_OGRStyleTableShadow[] = {  {&_swigt__p_OGRStyleTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   68689             : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
   68690             : static swig_cast_info _swigc__p_StatBuf[] = {  {&_swigt__p_StatBuf, 0, 0, 0},{0, 0, 0, 0}};
   68691             : static swig_cast_info _swigc__p_Statistics[] = {  {&_swigt__p_Statistics, 0, 0, 0},{0, 0, 0, 0}};
   68692             : static swig_cast_info _swigc__p_SuggestedWarpOutputRes[] = {  {&_swigt__p_SuggestedWarpOutputRes, 0, 0, 0},{0, 0, 0, 0}};
   68693             : static swig_cast_info _swigc__p_VSIDIR[] = {  {&_swigt__p_VSIDIR, 0, 0, 0},{0, 0, 0, 0}};
   68694             : static swig_cast_info _swigc__p_VSILFILE[] = {  {&_swigt__p_VSILFILE, 0, 0, 0},{0, 0, 0, 0}};
   68695             : static swig_cast_info _swigc__p_bool[] = {  {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}};
   68696             : static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
   68697             : static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
   68698             : 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}};
   68699             : static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
   68700             : static swig_cast_info _swigc__p_long_long[] = {  {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
   68701             : static swig_cast_info _swigc__p_p_GByte[] = {  {&_swigt__p_p_GByte, 0, 0, 0},{0, 0, 0, 0}};
   68702             : static swig_cast_info _swigc__p_p_GDALDatasetShadow[] = {  {&_swigt__p_p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
   68703             : static swig_cast_info _swigc__p_p_GDALDimensionHS[] = {  {&_swigt__p_p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   68704             : static swig_cast_info _swigc__p_p_GDALEDTComponentHS[] = {  {&_swigt__p_p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   68705             : static swig_cast_info _swigc__p_p_GDALMDArrayHS[] = {  {&_swigt__p_p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   68706             : static swig_cast_info _swigc__p_p_GDALComputedRasterBandShadow[] = {{&_swigt__p_p_GDALComputedRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   68707             : static swig_cast_info _swigc__p_p_GDALRasterBandShadow[] = {  {&_swigt__p_p_GDALRasterBandShadow, 0, 0, 0},  {&_swigt__p_p_GDALComputedRasterBandShadow, _p_p_GDALComputedRasterBandShadowTo_p_p_GDALRasterBandShadow, 0, 0},{0, 0, 0, 0}};
   68708             : static swig_cast_info _swigc__p_p_GDAL_GCP[] = {  {&_swigt__p_p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   68709             : static swig_cast_info _swigc__p_p_GUIntBig[] = {  {&_swigt__p_p_GUIntBig, 0, 0, 0},{0, 0, 0, 0}};
   68710             : static swig_cast_info _swigc__p_p_OGRLayerShadow[] = {  {&_swigt__p_p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   68711             : static swig_cast_info _swigc__p_p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
   68712             : static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
   68713             : static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
   68714             : static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
   68715             : static swig_cast_info _swigc__p_p_long_long[] = {  {&_swigt__p_p_long_long, 0, 0, 0},{0, 0, 0, 0}};
   68716             : static swig_cast_info _swigc__p_p_p_GDALAttributeHS[] = {  {&_swigt__p_p_p_GDALAttributeHS, 0, 0, 0},{0, 0, 0, 0}};
   68717             : static swig_cast_info _swigc__p_p_p_GDALDimensionHS[] = {  {&_swigt__p_p_p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   68718             : static swig_cast_info _swigc__p_p_p_GDALEDTComponentHS[] = {  {&_swigt__p_p_p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   68719             : static swig_cast_info _swigc__p_p_p_GDALMDArrayHS[] = {  {&_swigt__p_p_p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   68720             : static swig_cast_info _swigc__p_p_void[] = {  {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
   68721             : static swig_cast_info _swigc__p_size_t[] = {  {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
   68722             : static swig_cast_info _swigc__p_vsi_l_offset[] = {  {&_swigt__p_vsi_l_offset, 0, 0, 0},{0, 0, 0, 0}};
   68723             : 
   68724             : static swig_cast_info *swig_cast_initial[] = {
   68725             :   _swigc__p_CPLErrorHandler,
   68726             :   _swigc__p_CPLVirtualMemShadow,
   68727             :   _swigc__p_CPLXMLNode,
   68728             :   _swigc__p_DirEntry,
   68729             :   _swigc__p_GByte,
   68730             :   _swigc__p_GDALAlgorithmArgHS,
   68731             :   _swigc__p_GDALAlgorithmHS,
   68732             :   _swigc__p_GDALAlgorithmRegistryHS,
   68733             :   _swigc__p_GDALArgDatasetValueHS,
   68734             :   _swigc__p_GDALAsyncReaderShadow,
   68735             :   _swigc__p_GDALAttributeHS,
   68736             :   _swigc__p_GDALBuildVRTOptions,
   68737             :   _swigc__p_GDALColorEntry,
   68738             :   _swigc__p_GDALColorTableShadow,
   68739             :   _swigc__p_GDALComputedRasterBandShadow,
   68740             :   _swigc__p_GDALContourOptions,
   68741             :   _swigc__p_GDALDEMProcessingOptions,
   68742             :   _swigc__p_GDALDatasetShadow,
   68743             :   _swigc__p_GDALDimensionHS,
   68744             :   _swigc__p_GDALDriverShadow,
   68745             :   _swigc__p_GDALEDTComponentHS,
   68746             :   _swigc__p_GDALExtendedDataTypeClass,
   68747             :   _swigc__p_GDALExtendedDataTypeHS,
   68748             :   _swigc__p_GDALExtendedDataTypeSubType,
   68749             :   _swigc__p_GDALFootprintOptions,
   68750             :   _swigc__p_GDALGridOptions,
   68751             :   _swigc__p_GDALGroupHS,
   68752             :   _swigc__p_GDALInfoOptions,
   68753             :   _swigc__p_GDALMDArrayHS,
   68754             :   _swigc__p_GDALMajorObjectShadow,
   68755             :   _swigc__p_GDALMultiDimInfoOptions,
   68756             :   _swigc__p_GDALMultiDimTranslateOptions,
   68757             :   _swigc__p_GDALNearblackOptions,
   68758             :   _swigc__p_GDALProgressFunc,
   68759             :   _swigc__p_GDALRasterAlgebraBinaryOperation,
   68760             :   _swigc__p_GDALRasterAlgebraUnaryOperation,
   68761             :   _swigc__p_GDALRasterAttributeTableShadow,
   68762             :   _swigc__p_GDALRasterBandShadow,
   68763             :   _swigc__p_GDALRasterizeOptions,
   68764             :   _swigc__p_GDALRelationshipShadow,
   68765             :   _swigc__p_GDALSubdatasetInfo,
   68766             :   _swigc__p_GDALTileIndexOptions,
   68767             :   _swigc__p_GDALTransformerInfoShadow,
   68768             :   _swigc__p_GDALTranslateOptions,
   68769             :   _swigc__p_GDALVectorInfoOptions,
   68770             :   _swigc__p_GDALVectorTranslateOptions,
   68771             :   _swigc__p_GDALViewshedMode,
   68772             :   _swigc__p_GDALViewshedOutputType,
   68773             :   _swigc__p_GDALWarpAppOptions,
   68774             :   _swigc__p_GDAL_GCP,
   68775             :   _swigc__p_GIntBig,
   68776             :   _swigc__p_GUIntBig,
   68777             :   _swigc__p_OGRFeatureShadow,
   68778             :   _swigc__p_OGRFieldDomainShadow,
   68779             :   _swigc__p_OGRGeomFieldDefnShadow,
   68780             :   _swigc__p_OGRGeometryShadow,
   68781             :   _swigc__p_OGRLayerShadow,
   68782             :   _swigc__p_OGRStyleTableShadow,
   68783             :   _swigc__p_OSRSpatialReferenceShadow,
   68784             :   _swigc__p_StatBuf,
   68785             :   _swigc__p_Statistics,
   68786             :   _swigc__p_SuggestedWarpOutputRes,
   68787             :   _swigc__p_VSIDIR,
   68788             :   _swigc__p_VSILFILE,
   68789             :   _swigc__p_bool,
   68790             :   _swigc__p_char,
   68791             :   _swigc__p_double,
   68792             :   _swigc__p_f_double_p_q_const__char_p_void__int,
   68793             :   _swigc__p_int,
   68794             :   _swigc__p_long_long,
   68795             :   _swigc__p_p_GByte,
   68796             :   _swigc__p_p_GDALComputedRasterBandShadow,
   68797             :   _swigc__p_p_GDALDatasetShadow,
   68798             :   _swigc__p_p_GDALDimensionHS,
   68799             :   _swigc__p_p_GDALEDTComponentHS,
   68800             :   _swigc__p_p_GDALMDArrayHS,
   68801             :   _swigc__p_p_GDALRasterBandShadow,
   68802             :   _swigc__p_p_GDAL_GCP,
   68803             :   _swigc__p_p_GUIntBig,
   68804             :   _swigc__p_p_OGRLayerShadow,
   68805             :   _swigc__p_p_OSRSpatialReferenceShadow,
   68806             :   _swigc__p_p_char,
   68807             :   _swigc__p_p_double,
   68808             :   _swigc__p_p_int,
   68809             :   _swigc__p_p_long_long,
   68810             :   _swigc__p_p_p_GDALAttributeHS,
   68811             :   _swigc__p_p_p_GDALDimensionHS,
   68812             :   _swigc__p_p_p_GDALEDTComponentHS,
   68813             :   _swigc__p_p_p_GDALMDArrayHS,
   68814             :   _swigc__p_p_void,
   68815             :   _swigc__p_size_t,
   68816             :   _swigc__p_vsi_l_offset,
   68817             : };
   68818             : 
   68819             : 
   68820             : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
   68821             : 
   68822             : static swig_const_info swig_const_table[] = {
   68823             : { SWIG_PY_POINTER, "TermProgress", 0, 0, (void *)((int (*)(double,char const *,void *))(GDALTermProgress)), &SWIGTYPE_p_f_double_p_q_const__char_p_void__int },
   68824             : {0, 0, 0, 0.0, 0, 0}};
   68825             : 
   68826             : #ifdef __cplusplus
   68827             : }
   68828             : #endif
   68829             : /* -----------------------------------------------------------------------------
   68830             :  * Type initialization:
   68831             :  * This problem is tough by the requirement that no dynamic
   68832             :  * memory is used. Also, since swig_type_info structures store pointers to
   68833             :  * swig_cast_info structures and swig_cast_info structures store pointers back
   68834             :  * to swig_type_info structures, we need some lookup code at initialization.
   68835             :  * The idea is that swig generates all the structures that are needed.
   68836             :  * The runtime then collects these partially filled structures.
   68837             :  * The SWIG_InitializeModule function takes these initial arrays out of
   68838             :  * swig_module, and does all the lookup, filling in the swig_module.types
   68839             :  * array with the correct data and linking the correct swig_cast_info
   68840             :  * structures together.
   68841             :  *
   68842             :  * The generated swig_type_info structures are assigned statically to an initial
   68843             :  * array. We just loop through that array, and handle each type individually.
   68844             :  * First we lookup if this type has been already loaded, and if so, use the
   68845             :  * loaded structure instead of the generated one. Then we have to fill in the
   68846             :  * cast linked list. The cast data is initially stored in something like a
   68847             :  * two-dimensional array. Each row corresponds to a type (there are the same
   68848             :  * number of rows as there are in the swig_type_initial array). Each entry in
   68849             :  * a column is one of the swig_cast_info structures for that type.
   68850             :  * The cast_initial array is actually an array of arrays, because each row has
   68851             :  * a variable number of columns. So to actually build the cast linked list,
   68852             :  * we find the array of casts associated with the type, and loop through it
   68853             :  * adding the casts to the list. The one last trick we need to do is making
   68854             :  * sure the type pointer in the swig_cast_info struct is correct.
   68855             :  *
   68856             :  * First off, we lookup the cast->type name to see if it is already loaded.
   68857             :  * There are three cases to handle:
   68858             :  *  1) If the cast->type has already been loaded AND the type we are adding
   68859             :  *     casting info to has not been loaded (it is in this module), THEN we
   68860             :  *     replace the cast->type pointer with the type pointer that has already
   68861             :  *     been loaded.
   68862             :  *  2) If BOTH types (the one we are adding casting info to, and the
   68863             :  *     cast->type) are loaded, THEN the cast info has already been loaded by
   68864             :  *     the previous module so we just ignore it.
   68865             :  *  3) Finally, if cast->type has not already been loaded, then we add that
   68866             :  *     swig_cast_info to the linked list (because the cast->type) pointer will
   68867             :  *     be correct.
   68868             :  * ----------------------------------------------------------------------------- */
   68869             : 
   68870             : #ifdef __cplusplus
   68871             : extern "C" {
   68872             : #if 0
   68873             : } /* c-mode */
   68874             : #endif
   68875             : #endif
   68876             : 
   68877             : #if 0
   68878             : #define SWIGRUNTIME_DEBUG
   68879             : #endif
   68880             : 
   68881             : 
   68882             : SWIGRUNTIME void
   68883             : SWIG_InitializeModule(void *clientdata) {
   68884             :   size_t i;
   68885             :   swig_module_info *module_head, *iter;
   68886             :   int init;
   68887             :   
   68888             :   /* check to see if the circular list has been setup, if not, set it up */
   68889             :   if (swig_module.next==0) {
   68890             :     /* Initialize the swig_module */
   68891             :     swig_module.type_initial = swig_type_initial;
   68892             :     swig_module.cast_initial = swig_cast_initial;
   68893             :     swig_module.next = &swig_module;
   68894             :     init = 1;
   68895             :   } else {
   68896             :     init = 0;
   68897             :   }
   68898             :   
   68899             :   /* Try and load any already created modules */
   68900             :   module_head = SWIG_GetModule(clientdata);
   68901             :   if (!module_head) {
   68902             :     /* This is the first module loaded for this interpreter */
   68903             :     /* so set the swig module into the interpreter */
   68904             :     SWIG_SetModule(clientdata, &swig_module);
   68905             :   } else {
   68906             :     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
   68907             :     iter=module_head;
   68908             :     do {
   68909             :       if (iter==&swig_module) {
   68910             :         /* Our module is already in the list, so there's nothing more to do. */
   68911             :         return;
   68912             :       }
   68913             :       iter=iter->next;
   68914             :     } while (iter!= module_head);
   68915             :     
   68916             :     /* otherwise we must add our module into the list */
   68917             :     swig_module.next = module_head->next;
   68918             :     module_head->next = &swig_module;
   68919             :   }
   68920             :   
   68921             :   /* When multiple interpreters are used, a module could have already been initialized in
   68922             :        a different interpreter, but not yet have a pointer in this interpreter.
   68923             :        In this case, we do not want to continue adding types... everything should be
   68924             :        set up already */
   68925             :   if (init == 0) return;
   68926             :   
   68927             :   /* Now work on filling in swig_module.types */
   68928             : #ifdef SWIGRUNTIME_DEBUG
   68929             :   printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
   68930             : #endif
   68931             :   for (i = 0; i < swig_module.size; ++i) {
   68932             :     swig_type_info *type = 0;
   68933             :     swig_type_info *ret;
   68934             :     swig_cast_info *cast;
   68935             :     
   68936             : #ifdef SWIGRUNTIME_DEBUG
   68937             :     printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
   68938             : #endif
   68939             :     
   68940             :     /* if there is another module already loaded */
   68941             :     if (swig_module.next != &swig_module) {
   68942             :       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
   68943             :     }
   68944             :     if (type) {
   68945             :       /* Overwrite clientdata field */
   68946             : #ifdef SWIGRUNTIME_DEBUG
   68947             :       printf("SWIG_InitializeModule: found type %s\n", type->name);
   68948             : #endif
   68949             :       if (swig_module.type_initial[i]->clientdata) {
   68950             :         type->clientdata = swig_module.type_initial[i]->clientdata;
   68951             : #ifdef SWIGRUNTIME_DEBUG
   68952             :         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
   68953             : #endif
   68954             :       }
   68955             :     } else {
   68956             :       type = swig_module.type_initial[i];
   68957             :     }
   68958             :     
   68959             :     /* Insert casting types */
   68960             :     cast = swig_module.cast_initial[i];
   68961             :     while (cast->type) {
   68962             :       /* Don't need to add information already in the list */
   68963             :       ret = 0;
   68964             : #ifdef SWIGRUNTIME_DEBUG
   68965             :       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
   68966             : #endif
   68967             :       if (swig_module.next != &swig_module) {
   68968             :         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
   68969             : #ifdef SWIGRUNTIME_DEBUG
   68970             :         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
   68971             : #endif
   68972             :       }
   68973             :       if (ret) {
   68974             :         if (type == swig_module.type_initial[i]) {
   68975             : #ifdef SWIGRUNTIME_DEBUG
   68976             :           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
   68977             : #endif
   68978             :           cast->type = ret;
   68979             :           ret = 0;
   68980             :         } else {
   68981             :           /* Check for casting already in the list */
   68982             :           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
   68983             : #ifdef SWIGRUNTIME_DEBUG
   68984             :           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
   68985             : #endif
   68986             :           if (!ocast) ret = 0;
   68987             :         }
   68988             :       }
   68989             :       
   68990             :       if (!ret) {
   68991             : #ifdef SWIGRUNTIME_DEBUG
   68992             :         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
   68993             : #endif
   68994             :         if (type->cast) {
   68995             :           type->cast->prev = cast;
   68996             :           cast->next = type->cast;
   68997             :         }
   68998             :         type->cast = cast;
   68999             :       }
   69000             :       cast++;
   69001             :     }
   69002             :     /* Set entry in modules->types array equal to the type */
   69003             :     swig_module.types[i] = type;
   69004             :   }
   69005             :   swig_module.types[i] = 0;
   69006             :   
   69007             : #ifdef SWIGRUNTIME_DEBUG
   69008             :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   69009             :   for (i = 0; i < swig_module.size; ++i) {
   69010             :     int j = 0;
   69011             :     swig_cast_info *cast = swig_module.cast_initial[i];
   69012             :     printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
   69013             :     while (cast->type) {
   69014             :       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
   69015             :       cast++;
   69016             :       ++j;
   69017             :     }
   69018             :     printf("---- Total casts: %d\n",j);
   69019             :   }
   69020             :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   69021             : #endif
   69022             : }
   69023             : 
   69024             : /* This function will propagate the clientdata field of type to
   69025             : * any new swig_type_info structures that have been added into the list
   69026             : * of equivalent types.  It is like calling
   69027             : * SWIG_TypeClientData(type, clientdata) a second time.
   69028             : */
   69029             : SWIGRUNTIME void
   69030             : SWIG_PropagateClientData(void) {
   69031             :   size_t i;
   69032             :   swig_cast_info *equiv;
   69033             :   static int init_run = 0;
   69034             :   
   69035             :   if (init_run) return;
   69036             :   init_run = 1;
   69037             :   
   69038             :   for (i = 0; i < swig_module.size; i++) {
   69039             :     if (swig_module.types[i]->clientdata) {
   69040             :       equiv = swig_module.types[i]->cast;
   69041             :       while (equiv) {
   69042             :         if (!equiv->converter) {
   69043             :           if (equiv->type && !equiv->type->clientdata)
   69044             :           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
   69045             :         }
   69046             :         equiv = equiv->next;
   69047             :       }
   69048             :     }
   69049             :   }
   69050             : }
   69051             : 
   69052             : #ifdef __cplusplus
   69053             : #if 0
   69054             : {
   69055             :   /* c-mode */
   69056             : #endif
   69057             : }
   69058             : #endif
   69059             : 
   69060             : 
   69061             : 
   69062             : #ifdef __cplusplus
   69063             : extern "C" {
   69064             : #endif
   69065             :   
   69066             :   /* Python-specific SWIG API */
   69067             : #define SWIG_newvarlink()                             SWIG_Python_newvarlink()
   69068             : #define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
   69069             : #define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
   69070             :   
   69071             :   /* -----------------------------------------------------------------------------
   69072             :    * global variable support code.
   69073             :    * ----------------------------------------------------------------------------- */
   69074             :   
   69075             :   typedef struct swig_globalvar {
   69076             :     char       *name;                  /* Name of global variable */
   69077             :     PyObject *(*get_attr)(void);       /* Return the current value */
   69078             :     int       (*set_attr)(PyObject *); /* Set the value */
   69079             :     struct swig_globalvar *next;
   69080             :   } swig_globalvar;
   69081             :   
   69082             :   typedef struct swig_varlinkobject {
   69083             :     PyObject_HEAD
   69084             :     swig_globalvar *vars;
   69085             :   } swig_varlinkobject;
   69086             :   
   69087             :   SWIGINTERN PyObject *
   69088             :   swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
   69089             : #if PY_VERSION_HEX >= 0x03000000
   69090             :     return PyUnicode_InternFromString("<Swig global variables>");
   69091             : #else
   69092             :     return PyString_FromString("<Swig global variables>");
   69093             : #endif
   69094             :   }
   69095             :   
   69096             :   SWIGINTERN PyObject *
   69097             :   swig_varlink_str(swig_varlinkobject *v) {
   69098             : #if PY_VERSION_HEX >= 0x03000000
   69099             :     PyObject *str = PyUnicode_InternFromString("(");
   69100             :     PyObject *tail;
   69101             :     PyObject *joined;
   69102             :     swig_globalvar *var;
   69103             :     for (var = v->vars; var; var=var->next) {
   69104             :       tail = PyUnicode_FromString(var->name);
   69105             :       joined = PyUnicode_Concat(str, tail);
   69106             :       Py_DecRef(str);
   69107             :       Py_DecRef(tail);
   69108             :       str = joined;
   69109             :       if (var->next) {
   69110             :         tail = PyUnicode_InternFromString(", ");
   69111             :         joined = PyUnicode_Concat(str, tail);
   69112             :         Py_DecRef(str);
   69113             :         Py_DecRef(tail);
   69114             :         str = joined;
   69115             :       }
   69116             :     }
   69117             :     tail = PyUnicode_InternFromString(")");
   69118             :     joined = PyUnicode_Concat(str, tail);
   69119             :     Py_DecRef(str);
   69120             :     Py_DecRef(tail);
   69121             :     str = joined;
   69122             : #else
   69123             :     PyObject *str = PyString_FromString("(");
   69124             :     swig_globalvar *var;
   69125             :     for (var = v->vars; var; var=var->next) {
   69126             :       PyString_ConcatAndDel(&str,PyString_FromString(var->name));
   69127             :       if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
   69128             :     }
   69129             :     PyString_ConcatAndDel(&str,PyString_FromString(")"));
   69130             : #endif
   69131             :     return str;
   69132             :   }
   69133             :   
   69134             :   SWIGINTERN void
   69135             :   swig_varlink_dealloc(swig_varlinkobject *v) {
   69136             :     swig_globalvar *var = v->vars;
   69137             :     while (var) {
   69138             :       swig_globalvar *n = var->next;
   69139             :       free(var->name);
   69140             :       free(var);
   69141             :       var = n;
   69142             :     }
   69143             :   }
   69144             :   
   69145             :   SWIGINTERN PyObject *
   69146             :   swig_varlink_getattr(swig_varlinkobject *v, char *n) {
   69147             :     PyObject *res = NULL;
   69148             :     swig_globalvar *var = v->vars;
   69149             :     while (var) {
   69150             :       if (strcmp(var->name,n) == 0) {
   69151             :         res = (*var->get_attr)();
   69152             :         break;
   69153             :       }
   69154             :       var = var->next;
   69155             :     }
   69156             :     if (res == NULL && !PyErr_Occurred()) {
   69157             :       PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
   69158             :     }
   69159             :     return res;
   69160             :   }
   69161             :   
   69162             :   SWIGINTERN int
   69163             :   swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
   69164             :     int res = 1;
   69165             :     swig_globalvar *var = v->vars;
   69166             :     while (var) {
   69167             :       if (strcmp(var->name,n) == 0) {
   69168             :         res = (*var->set_attr)(p);
   69169             :         break;
   69170             :       }
   69171             :       var = var->next;
   69172             :     }
   69173             :     if (res == 1 && !PyErr_Occurred()) {
   69174             :       PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
   69175             :     }
   69176             :     return res;
   69177             :   }
   69178             :   
   69179             :   SWIGINTERN PyTypeObject*
   69180             :   swig_varlink_type(void) {
   69181             :     static char varlink__doc__[] = "Swig var link object";
   69182             :     static PyTypeObject varlink_type;
   69183             :     static int type_init = 0;
   69184             :     if (!type_init) {
   69185             :       const PyTypeObject tmp = {
   69186             : #if PY_VERSION_HEX >= 0x03000000
   69187             :         PyVarObject_HEAD_INIT(NULL, 0)
   69188             : #else
   69189             :         PyObject_HEAD_INIT(NULL)
   69190             :         0,                                  /* ob_size */
   69191             : #endif
   69192             :         "swigvarlink",                      /* tp_name */
   69193             :         sizeof(swig_varlinkobject),         /* tp_basicsize */
   69194             :         0,                                  /* tp_itemsize */
   69195             :         (destructor) swig_varlink_dealloc,  /* tp_dealloc */
   69196             :         0,                                  /* tp_print */
   69197             :         (getattrfunc) swig_varlink_getattr, /* tp_getattr */
   69198             :         (setattrfunc) swig_varlink_setattr, /* tp_setattr */
   69199             :         0,                                  /* tp_compare */
   69200             :         (reprfunc) swig_varlink_repr,       /* tp_repr */
   69201             :         0,                                  /* tp_as_number */
   69202             :         0,                                  /* tp_as_sequence */
   69203             :         0,                                  /* tp_as_mapping */
   69204             :         0,                                  /* tp_hash */
   69205             :         0,                                  /* tp_call */
   69206             :         (reprfunc) swig_varlink_str,        /* tp_str */
   69207             :         0,                                  /* tp_getattro */
   69208             :         0,                                  /* tp_setattro */
   69209             :         0,                                  /* tp_as_buffer */
   69210             :         0,                                  /* tp_flags */
   69211             :         varlink__doc__,                     /* tp_doc */
   69212             :         0,                                  /* tp_traverse */
   69213             :         0,                                  /* tp_clear */
   69214             :         0,                                  /* tp_richcompare */
   69215             :         0,                                  /* tp_weaklistoffset */
   69216             :         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
   69217             :         0,                                  /* tp_del */
   69218             :         0,                                  /* tp_version_tag */
   69219             : #if PY_VERSION_HEX >= 0x03040000
   69220             :         0,                                  /* tp_finalize */
   69221             : #endif
   69222             : #ifdef COUNT_ALLOCS
   69223             :         0,                                  /* tp_allocs */
   69224             :         0,                                  /* tp_frees */
   69225             :         0,                                  /* tp_maxalloc */
   69226             :         0,                                  /* tp_prev */
   69227             :         0                                   /* tp_next */
   69228             : #endif
   69229             :       };
   69230             :       varlink_type = tmp;
   69231             :       type_init = 1;
   69232             :       if (PyType_Ready(&varlink_type) < 0)
   69233             :       return NULL;
   69234             :     }
   69235             :     return &varlink_type;
   69236             :   }
   69237             :   
   69238             :   /* Create a variable linking object for use later */
   69239             :   SWIGINTERN PyObject *
   69240             :   SWIG_Python_newvarlink(void) {
   69241             :     swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
   69242             :     if (result) {
   69243             :       result->vars = 0;
   69244             :     }
   69245             :     return ((PyObject*) result);
   69246             :   }
   69247             :   
   69248             :   SWIGINTERN void 
   69249             :   SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
   69250             :     swig_varlinkobject *v = (swig_varlinkobject *) p;
   69251             :     swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
   69252             :     if (gv) {
   69253             :       size_t size = strlen(name)+1;
   69254             :       gv->name = (char *)malloc(size);
   69255             :       if (gv->name) {
   69256             :         memcpy(gv->name, name, size);
   69257             :         gv->get_attr = get_attr;
   69258             :         gv->set_attr = set_attr;
   69259             :         gv->next = v->vars;
   69260             :       }
   69261             :     }
   69262             :     v->vars = gv;
   69263             :   }
   69264             :   
   69265             :   SWIGINTERN PyObject *
   69266             :   SWIG_globals(void) {
   69267             :     static PyObject *globals = 0;
   69268             :     if (!globals) {
   69269             :       globals = SWIG_newvarlink();
   69270             :     }
   69271             :     return globals;
   69272             :   }
   69273             :   
   69274             :   /* -----------------------------------------------------------------------------
   69275             :    * constants/methods manipulation
   69276             :    * ----------------------------------------------------------------------------- */
   69277             :   
   69278             :   /* Install Constants */
   69279             :   SWIGINTERN void
   69280         277 :   SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
   69281         277 :     PyObject *obj = 0;
   69282         277 :     size_t i;
   69283         554 :     for (i = 0; constants[i].type; ++i) {
   69284         277 :       switch(constants[i].type) {
   69285         277 :       case SWIG_PY_POINTER:
   69286         277 :         obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
   69287         277 :         break;
   69288           0 :       case SWIG_PY_BINARY:
   69289           0 :         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
   69290             :         break;
   69291             :       default:
   69292             :         obj = 0;
   69293             :         break;
   69294             :       }
   69295         277 :       if (obj) {
   69296         277 :         PyDict_SetItemString(d, constants[i].name, obj);
   69297         277 :         Py_DECREF(obj);
   69298             :       }
   69299             :     }
   69300         277 :   }
   69301             :   
   69302             :   /* -----------------------------------------------------------------------------*/
   69303             :   /* Fix SwigMethods to carry the callback ptrs when needed */
   69304             :   /* -----------------------------------------------------------------------------*/
   69305             :   
   69306             :   SWIGINTERN void
   69307         277 :   SWIG_Python_FixMethods(PyMethodDef *methods,
   69308             :     swig_const_info *const_table,
   69309             :     swig_type_info **types,
   69310             :     swig_type_info **types_initial) {
   69311         277 :     size_t i;
   69312      227417 :     for (i = 0; methods[i].ml_name; ++i) {
   69313      227140 :       const char *c = methods[i].ml_doc;
   69314      227140 :       if (!c) continue;
   69315      208581 :       c = strstr(c, "swig_ptr: ");
   69316      208581 :       if (c) {
   69317           0 :         int j;
   69318           0 :         swig_const_info *ci = 0;
   69319           0 :         const char *name = c + 10;
   69320           0 :         for (j = 0; const_table[j].type; ++j) {
   69321           0 :           if (strncmp(const_table[j].name, name, 
   69322             :               strlen(const_table[j].name)) == 0) {
   69323             :             ci = &(const_table[j]);
   69324             :             break;
   69325             :           }
   69326             :         }
   69327           0 :         if (ci) {
   69328      227140 :           void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
   69329           0 :           if (ptr) {
   69330           0 :             size_t shift = (ci->ptype) - types;
   69331           0 :             swig_type_info *ty = types_initial[shift];
   69332           0 :             size_t ldoc = (c - methods[i].ml_doc);
   69333           0 :             size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
   69334           0 :             char *ndoc = (char*)malloc(ldoc + lptr + 10);
   69335           0 :             if (ndoc) {
   69336           0 :               char *buff = ndoc;
   69337           0 :               memcpy(buff, methods[i].ml_doc, ldoc);
   69338           0 :               buff += ldoc;
   69339           0 :               memcpy(buff, "swig_ptr: ", 10);
   69340           0 :               buff += 10;
   69341           0 :               SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
   69342           0 :               methods[i].ml_doc = ndoc;
   69343             :             }
   69344             :           }
   69345             :         }
   69346             :       }
   69347             :     }
   69348         277 :   } 
   69349             :   
   69350             :   /* -----------------------------------------------------------------------------
   69351             :    * Method creation and docstring support functions
   69352             :    * ----------------------------------------------------------------------------- */
   69353             :   
   69354             :   /* -----------------------------------------------------------------------------
   69355             :    * Function to find the method definition with the correct docstring for the
   69356             :    * proxy module as opposed to the low-level API
   69357             :    * ----------------------------------------------------------------------------- */
   69358             :   
   69359           0 :   SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
   69360             :     /* Find the function in the modified method table */
   69361           0 :     size_t offset = 0;
   69362           0 :     int found = 0;
   69363           0 :     while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
   69364           0 :       if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
   69365             :         found = 1;
   69366             :         break;
   69367             :       }
   69368           0 :       offset++;
   69369             :     }
   69370             :     /* Use the copy with the modified docstring if available */
   69371           0 :     return found ? &SwigMethods_proxydocs[offset] : NULL;
   69372             :   }
   69373             :   
   69374             :   /* -----------------------------------------------------------------------------
   69375             :    * Wrapper of PyInstanceMethod_New() used in Python 3
   69376             :    * It is exported to the generated module, used for -fastproxy
   69377             :    * ----------------------------------------------------------------------------- */
   69378             :   
   69379           0 :   SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
   69380           0 :     if (PyCFunction_Check(func)) {
   69381           0 :       PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
   69382           0 :       PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
   69383           0 :       if (ml)
   69384           0 :       func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
   69385             :     }
   69386             : #if PY_VERSION_HEX >= 0x03000000
   69387           0 :     return PyInstanceMethod_New(func);
   69388             : #else
   69389             :     return PyMethod_New(func, NULL, NULL);
   69390             : #endif
   69391             :   }
   69392             :   
   69393             :   /* -----------------------------------------------------------------------------
   69394             :    * Wrapper of PyStaticMethod_New()
   69395             :    * It is exported to the generated module, used for -fastproxy
   69396             :    * ----------------------------------------------------------------------------- */
   69397             :   
   69398             :   SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
   69399             :     if (PyCFunction_Check(func)) {
   69400             :       PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
   69401             :       PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
   69402             :       if (ml)
   69403             :       func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
   69404             :     }
   69405             :     return PyStaticMethod_New(func);
   69406             :   }
   69407             :   
   69408             : #ifdef __cplusplus
   69409             : }
   69410             : #endif
   69411             : 
   69412             : /* -----------------------------------------------------------------------------*
   69413             :  *  Partial Init method
   69414             :  * -----------------------------------------------------------------------------*/
   69415             : 
   69416             : #ifdef __cplusplus
   69417             : extern "C"
   69418             : #endif
   69419             : 
   69420             : SWIGEXPORT 
   69421             : #if PY_VERSION_HEX >= 0x03000000
   69422             : PyObject*
   69423             : #else
   69424             : void
   69425             : #endif
   69426         277 : SWIG_init(void) {
   69427         277 :   PyObject *m, *d, *md, *globals;
   69428             :   
   69429             : #if PY_VERSION_HEX >= 0x03000000
   69430         277 :   static struct PyModuleDef SWIG_module = {
   69431             :     PyModuleDef_HEAD_INIT,
   69432             :     SWIG_name,
   69433             :     NULL,
   69434             :     -1,
   69435             :     SwigMethods,
   69436             :     NULL,
   69437             :     NULL,
   69438             :     NULL,
   69439             :     NULL
   69440             :   };
   69441             : #endif
   69442             :   
   69443             : #if defined(SWIGPYTHON_BUILTIN)
   69444             :   static SwigPyClientData SwigPyObject_clientdata = {
   69445             :     0, 0, 0, 0, 0, 0, 0
   69446             :   };
   69447             :   static PyGetSetDef this_getset_def = {
   69448             :     (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
   69449             :   };
   69450             :   static SwigPyGetSet thisown_getset_closure = {
   69451             :     SwigPyObject_own,
   69452             :     SwigPyObject_own
   69453             :   };
   69454             :   static PyGetSetDef thisown_getset_def = {
   69455             :     (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
   69456             :   };
   69457             :   PyTypeObject *builtin_pytype;
   69458             :   int builtin_base_count;
   69459             :   swig_type_info *builtin_basetype;
   69460             :   PyObject *tuple;
   69461             :   PyGetSetDescrObject *static_getset;
   69462             :   PyTypeObject *metatype;
   69463             :   PyTypeObject *swigpyobject;
   69464             :   SwigPyClientData *cd;
   69465             :   PyObject *public_interface, *public_symbol;
   69466             :   PyObject *this_descr;
   69467             :   PyObject *thisown_descr;
   69468             :   PyObject *self = 0;
   69469             :   int i;
   69470             :   
   69471             :   (void)builtin_pytype;
   69472             :   (void)builtin_base_count;
   69473             :   (void)builtin_basetype;
   69474             :   (void)tuple;
   69475             :   (void)static_getset;
   69476             :   (void)self;
   69477             :   
   69478             :   /* Metaclass is used to implement static member variables */
   69479             :   metatype = SwigPyObjectType();
   69480             :   assert(metatype);
   69481             : #endif
   69482             :   
   69483         277 :   (void)globals;
   69484             :   
   69485             :   /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
   69486         277 :   SWIG_This();
   69487         277 :   SWIG_Python_TypeCache();
   69488         277 :   SwigPyPacked_type();
   69489             : #ifndef SWIGPYTHON_BUILTIN
   69490         277 :   SwigPyObject_type();
   69491             : #endif
   69492             :   
   69493             :   /* Fix SwigMethods to carry the callback ptrs when needed */
   69494         277 :   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   69495             :   
   69496             : #if PY_VERSION_HEX >= 0x03000000
   69497         277 :   m = PyModule_Create(&SWIG_module);
   69498             : #else
   69499             :   m = Py_InitModule(SWIG_name, SwigMethods);
   69500             : #endif
   69501             :   
   69502         277 :   md = d = PyModule_GetDict(m);
   69503         277 :   (void)md;
   69504             :   
   69505         277 :   SWIG_InitializeModule(0);
   69506             :   
   69507             : #ifdef SWIGPYTHON_BUILTIN
   69508             :   swigpyobject = SwigPyObject_TypeOnce();
   69509             :   
   69510             :   SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
   69511             :   assert(SwigPyObject_stype);
   69512             :   cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
   69513             :   if (!cd) {
   69514             :     SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
   69515             :     SwigPyObject_clientdata.pytype = swigpyobject;
   69516             :   } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
   69517             :     PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
   69518             : # if PY_VERSION_HEX >= 0x03000000
   69519             :     return NULL;
   69520             : # else
   69521             :     return;
   69522             : # endif
   69523             :   }
   69524             :   
   69525             :   /* All objects have a 'this' attribute */
   69526             :   this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
   69527             :   (void)this_descr;
   69528             :   
   69529             :   /* All objects have a 'thisown' attribute */
   69530             :   thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
   69531             :   (void)thisown_descr;
   69532             :   
   69533             :   public_interface = PyList_New(0);
   69534             :   public_symbol = 0;
   69535             :   (void)public_symbol;
   69536             :   
   69537             :   PyDict_SetItemString(md, "__all__", public_interface);
   69538             :   Py_DECREF(public_interface);
   69539             :   for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
   69540             :   SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
   69541             :   for (i = 0; swig_const_table[i].name != 0; ++i)
   69542             :   SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
   69543             : #endif
   69544             :   
   69545         277 :   SWIG_InstallConstants(d,swig_const_table);
   69546             :   
   69547         277 :   SWIG_Python_SetConstant(d, "GRAUO_LOGICAL_NOT",SWIG_From_int(static_cast< int >(GRAUO_LOGICAL_NOT)));
   69548         277 :   SWIG_Python_SetConstant(d, "GRAUO_ABS",SWIG_From_int(static_cast< int >(GRAUO_ABS)));
   69549         277 :   SWIG_Python_SetConstant(d, "GRAUO_SQRT",SWIG_From_int(static_cast< int >(GRAUO_SQRT)));
   69550         277 :   SWIG_Python_SetConstant(d, "GRAUO_LOG",SWIG_From_int(static_cast< int >(GRAUO_LOG)));
   69551         277 :   SWIG_Python_SetConstant(d, "GRAUO_LOG10",SWIG_From_int(static_cast< int >(GRAUO_LOG10)));
   69552         277 :   SWIG_Python_SetConstant(d, "GRABO_ADD",SWIG_From_int(static_cast< int >(GRABO_ADD)));
   69553         277 :   SWIG_Python_SetConstant(d, "GRABO_SUB",SWIG_From_int(static_cast< int >(GRABO_SUB)));
   69554         277 :   SWIG_Python_SetConstant(d, "GRABO_MUL",SWIG_From_int(static_cast< int >(GRABO_MUL)));
   69555         277 :   SWIG_Python_SetConstant(d, "GRABO_DIV",SWIG_From_int(static_cast< int >(GRABO_DIV)));
   69556         277 :   SWIG_Python_SetConstant(d, "GRABO_POW",SWIG_From_int(static_cast< int >(GRABO_POW)));
   69557         277 :   SWIG_Python_SetConstant(d, "GRABO_GT",SWIG_From_int(static_cast< int >(GRABO_GT)));
   69558         277 :   SWIG_Python_SetConstant(d, "GRABO_GE",SWIG_From_int(static_cast< int >(GRABO_GE)));
   69559         277 :   SWIG_Python_SetConstant(d, "GRABO_LT",SWIG_From_int(static_cast< int >(GRABO_LT)));
   69560         277 :   SWIG_Python_SetConstant(d, "GRABO_LE",SWIG_From_int(static_cast< int >(GRABO_LE)));
   69561         277 :   SWIG_Python_SetConstant(d, "GRABO_EQ",SWIG_From_int(static_cast< int >(GRABO_EQ)));
   69562         277 :   SWIG_Python_SetConstant(d, "GRABO_NE",SWIG_From_int(static_cast< int >(GRABO_NE)));
   69563         277 :   SWIG_Python_SetConstant(d, "GRABO_LOGICAL_AND",SWIG_From_int(static_cast< int >(GRABO_LOGICAL_AND)));
   69564         277 :   SWIG_Python_SetConstant(d, "GRABO_LOGICAL_OR",SWIG_From_int(static_cast< int >(GRABO_LOGICAL_OR)));
   69565             :   
   69566             :   /* gdal_python.i %init code */
   69567         277 :   if ( GDALGetDriverCount() == 0 ) {
   69568         277 :     GDALAllRegister();
   69569             :   }
   69570             :   // Will be turned on for GDAL 4.0
   69571             :   // UseExceptions();
   69572             :   
   69573             :   
   69574         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_EXISTS_FLAG",SWIG_From_int(static_cast< int >(0x1)));
   69575         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_NATURE_FLAG",SWIG_From_int(static_cast< int >(0x2)));
   69576         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_SIZE_FLAG",SWIG_From_int(static_cast< int >(0x4)));
   69577         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_SET_ERROR_FLAG",SWIG_From_int(static_cast< int >(0x8)));
   69578         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_CACHE_ONLY",SWIG_From_int(static_cast< int >(0x10)));
   69579         277 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_UNKNOWN",SWIG_From_int(static_cast< int >(0)));
   69580         277 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_DATA",SWIG_From_int(static_cast< int >(1)));
   69581         277 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_HOLE",SWIG_From_int(static_cast< int >(2)));
   69582         277 :   SWIG_Python_SetConstant(d, "GEDTST_NONE",SWIG_From_int(static_cast< int >(GEDTST_NONE)));
   69583         277 :   SWIG_Python_SetConstant(d, "GEDTST_JSON",SWIG_From_int(static_cast< int >(GEDTST_JSON)));
   69584         277 :   SWIG_Python_SetConstant(d, "GEDTC_NUMERIC",SWIG_From_int(static_cast< int >(GEDTC_NUMERIC)));
   69585         277 :   SWIG_Python_SetConstant(d, "GEDTC_STRING",SWIG_From_int(static_cast< int >(GEDTC_STRING)));
   69586         277 :   SWIG_Python_SetConstant(d, "GEDTC_COMPOUND",SWIG_From_int(static_cast< int >(GEDTC_COMPOUND)));
   69587             :   
   69588         277 :   SWIG_Python_SetConstant(d, "GVM_Diagonal",SWIG_From_int(static_cast< int >(GVM_Diagonal)));
   69589         277 :   SWIG_Python_SetConstant(d, "GVM_Edge",SWIG_From_int(static_cast< int >(GVM_Edge)));
   69590         277 :   SWIG_Python_SetConstant(d, "GVM_Max",SWIG_From_int(static_cast< int >(GVM_Max)));
   69591         277 :   SWIG_Python_SetConstant(d, "GVM_Min",SWIG_From_int(static_cast< int >(GVM_Min)));
   69592         277 :   SWIG_Python_SetConstant(d, "GVOT_NORMAL",SWIG_From_int(static_cast< int >(GVOT_NORMAL)));
   69593         277 :   SWIG_Python_SetConstant(d, "GVOT_MIN_TARGET_HEIGHT_FROM_DEM",SWIG_From_int(static_cast< int >(GVOT_MIN_TARGET_HEIGHT_FROM_DEM)));
   69594         277 :   SWIG_Python_SetConstant(d, "GVOT_MIN_TARGET_HEIGHT_FROM_GROUND",SWIG_From_int(static_cast< int >(GVOT_MIN_TARGET_HEIGHT_FROM_GROUND)));
   69595             :   
   69596             :   /* Initialize threading */
   69597         277 :   SWIG_PYTHON_INITIALIZE_THREADS;
   69598             : #if PY_VERSION_HEX >= 0x03000000
   69599         277 :   return m;
   69600             : #else
   69601             :   return;
   69602             : #endif
   69603             : }
   69604             : 

Generated by: LCOV version 1.14